Archive

Posts Tagged ‘combobox’

JavaFX – ComboBox [Mobile]

November 26, 2009 8 comments

Bookmark and Share

JavaFX 1.3 introduces many new controls.
Please use ChoiceBox, MenuButton or SplitMenuButton

Its more almost 6 months since I implemented a sample ComboBox using Control and Skin interface. There is lot of interest for proper implementation of this control. This post is still among my top posts. So thought of enhancing the implementation a bit so as to make it work on real mobile!

For Applet mode, click on above image

For standalone mode

I could also run this sample on Sony-Ericsson XPERIA

Try this new version and let me know feedback

Categories: javafx Tags: , , ,

JavaFX – ComboBox

July 3, 2009 25 comments

JavaFX 1.3 introduces many new controls.
Please use ChoiceBox, MenuButton or SplitMenuButton

JavaFX SDK provides Control and Skin interface which can be used to create custom controls. Lets create a ComboBox with these two classes…

Update: Please also refer to JFXtras – XPicker for more advanced picker control.

For Applet mode, click on above image

For standalone mode

The ComboBox is created using a combination of Label and ListView. The ListView instance is dynamically inserted into content of Scene so that it appears on top of all existing content. Its deleted from Scene on making list invisible.

The entire logic of control is implemented in Skin. Behavior class can be implemented to handle keyboard events. The look can be easily customized.

Also available – Color Picker

Try it out and let me know feedback

Categories: javafx Tags: ,