Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
Added creatable forwarding to workspace actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Edvin Syse committed Dec 21, 2018
1 parent c8f72f3 commit cff8075
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/tornadofx/Component.kt
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,9 @@ abstract class UIComponent(viewTitle: String? = "", icon: Node? = null) : Compon
deletableWhen { uiComponent.deletable }
whenDeleted { uiComponent.onDelete() }

creatableWhen { uiComponent.creatable }
whenCreated { uiComponent.onCreate() }

refreshableWhen { uiComponent.refreshable }
whenRefreshed { uiComponent.onRefresh() }
}
Expand Down Expand Up @@ -1128,7 +1131,7 @@ abstract class UIComponent(viewTitle: String? = "", icon: Node? = null) : Compon
labelPosition: Orientation = Orientation.HORIZONTAL,
builder: StageAwareFieldset.() -> Unit
): Stage? {
val fragment = builderFragment(title, scope, { form() })
val fragment = builderFragment(title, scope) { form() }
val fieldset = StageAwareFieldset(title, labelPosition)
fragment.root.add(fieldset)
fieldset.stage = fragment.openWindow(modality = modality, stageStyle = stageStyle, owner = owner)!!
Expand Down

0 comments on commit cff8075

Please sign in to comment.