tornadofx v1.6.0 Release Notes
Release Date: 2017-01-18 // over 7 years ago-
- Workspaces (https://edvin.gitbooks.io/tornadofx-guide/content/16.%20Workspaces.html)
- ๐ OpenXXX functions: Windows opens centered over owner if owner is passed in as parameter (https://github.com/edvin/tornadofx/issues/231)
- API break: View params are now map(property-ref, value) instead of vararg Pair(String, value)
- ๐ menu builder correctly supports sub-menus
- ๐ Introduced
item
menu item builder, should be used in favor ofmenuitem
, which took the onAction callback insteadof an operation on the MenuItem as the op block parameter (breaks with the other builders) - ๐ menu builder accepts graphic parameter
- ViewModel autocommit bindings doesn't affect dirty state any more
- ๐ buttonbar builder for forms
- 0๏ธโฃ InternalWindow now has
overlayPaint
that defaults `c("#000", 0.4) - ๐ builderInternalWindow added
- ItemViewModel constructor takes optional initial value
ObservableList.asyncItems
andListProperty.asyncItems
confirm()
function that executes an action if the user confirms- ๐ di delegate overload to support injecting a dependency by name (in addition to type)
- ๐
builderFragment
andbuilderWindow
builders - fragment and window by just supplying a title and builder ObservableList<T>.onChange
to easy listening to change events from observable listssetInScope()
now uses correct KClass when entering the injectable into the components mapItemViewModel.isEmpty
boolean, complementsempty
propertysetStageIcon(icon)
will replace all existing icons with the supplied (https://github.com/edvin/tornadofx/issues/228)TableColumn.useCheckbox(editable = true)
now fires edit/commit events when value is changed- Create nested, observable, writable properties using the
observableValue.select()
function - ViewModel
bind
has optional parameterforceObjectProperty
to avoid creatingIntegerProperty
for ints etc, so you can have nullable values TableView.onEditCommit()
handler fires when a cell is edited. No need to manage domain object value, just add your business logic- ๐ Fixed scope support.
DefaultScope(MyController::class)
orMyController::class.scope(DefaultScope)
- ๐ TableColumn hasClass/addClass/removeClass/toggleClass supports type safe stylesheets
- Lots of functions that earlier accepted Double now accept Number
- TableView.enableCellEditing() makes table editable and enables cell selection
- TableView.regainFocusAfterEdit() - make sure TableView doesn't look focus after cell edit
- TableColumn.makeEditable(converter) - supply specific converter for editable fields
- TableColumn.converter(converter) - supply specific converter for read only text fields
- ๐ TableColumn.makeEditable() supports BigDecimal
- โ Added scope.set(injectable) as easier alternative to setInScope(injectable, scope)
- ๐ tableview builder that takes
ObservableValue<ObservableList<T>>
, supporting automatic rebind when items change - ๐ vbox and hbox builders supports any Number as spacing parameter, not just Double
runAsync
exposesTaskStatus
model for binding towards task states: running, message, title, progress, value- โก๏ธ
runAsync
now run in the context ofTask
so you can accessupdateMessage()
etc - ๐ progressbar and progressindicator builders binds to
Property<Number>
instead ofProperty<Double>
to supportDoubleProperty
- โ Added
insets()
builder - ๐ Fixed a race condition in Slideshow with overlapping transitions (https://github.com/edvin/tornadofx/issues/225)
- Node
onHover { doSomething() }
helper, param is boolean indicating hover state - ๐ Node builder bindings: disableWhen, enableWhen, visibleWhen, hiddenWhen, removeWhen
- ObservableValue.toBinding() converts observable boolean to BooleanBinding
- ๐ TableCell.useCombobox now supports every kind of Property (bug)
- Observable padding properties for Region
paddingXXXProperty
(top/right/bottom/left/vertical/horizontal/all) - Padding vars for Region: `paddingXXX' (top/right/bottom/left/vertical/horizontal/all)
- โ Added
proxyprop
helper to create proxied properties - ๐
DataGrid
maxCellsInRow
property (also CSS styleable as-fx-max-cells-in-row
) - โ Added
DataGrid.asyncItems
to load items async with more concise syntax - โ Added
DataGrid.bindSelected
to bind selected item to another property or ViewModel - ๐ Fixed a ViewModel binding bug causing errors if external changes were made to a bound facade
- โ Added
squeezebox
builder. SqueezeBox is an accordion that allows multiple open titledpanes, added usingfold()
- ๐
cellCache
supports builders. Earlier, builders would be appended to the ListView, creating undesirable results - ๐
Scene.reloadViews()
is removed from the public API, no need to call it manually - ๐
titledpane
builder now accepts op parameter like every other builder. node parameter is now optional - Fieldset.wrapWidth is now Number instead of Double