Important master state

JavaFX Composer comes with the concept of application states. State represents a set of property values. If you switch to another state, new values are assigned to all the components. Using states, it is easy to create multiple screens, zoom effects, sidebars, etc. Read more about states in NetBeans wiki. There is always one state - master state (<master> in the list of states). It is a global state and all states inherit values from master until they are re-defined in a particular state. We recommend to do most of the design in the master state, change individual states only if necessary.

 One of the common mistakes is if you are designing an application where individual screens share a lot of components and accidentally switch to another state. Then all changes apply only to this particular state and have to be repeated in other states. To prevent such a situation, the IDE draws a red rectangle around the scene if non-master state is selected.

States

If you have added or modified the component in a non-master state and now you would like to move it to the master, simply select the component | right-click | Set component to master. In such a case, all property values of the component will be set to the master set.

Set as master

 If only some properties should be set in master state, simply use Set As Master and Reset to Master buttons on the property customizer in property sheet. Set As Master will set the current value to the master state, Reset to Master will make this property value to be inherited from the master state. --Martin



Comments:

Also see the tutorial at http://netbeans.org/kb/docs/javafx/states.html.

Posted by Jeffrey Rubinoff on May 03, 2010 at 05:03 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

NetBeans JavaFX Composer blog

Search

Categories
Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today