What about to add ebableProperty() on Node class ?
Tadashi Ohmura
omurata at ga2.so-net.ne.jp
Mon Jul 30 08:03:46 PDT 2012
Hellow everyone.
What about to add "enableProperty()" on Node class ?
Just write in the following way if Node has "enableProperty()"
Button button = new Button("Button");
CheckBox check = new CheckBox("selectable");
button.enableProperty().bind( check.selectedProperty() );
insread of
final Button button = new Button("Button");
CheckBox check = new CheckBox("selectable");
check.selectedProperty().addListener( new ChangeListener<Boolean>(){
public void changed( ObservableValue<? extends Boolean> value, Boolean
oldVal, Boolean newVal ) {
if( newVal==false ) button.setDisable(true);
else button.setDisable(false);
}
});
Best regards
Tadashi Ohmura
More information about the openjfx-dev
mailing list