< prev index next >

modules/javafx.controls/src/main/java/javafx/scene/control/ToolBar.java

Print this page




 119         // CssMetaData ensures that css will be able to override the value.
 120         ((StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
 121 
 122         // initialize css pseudo-class state
 123         pseudoClassStateChanged(HORIZONTAL_PSEUDOCLASS_STATE, true);
 124 
 125     }
 126 
 127     /***************************************************************************
 128      *                                                                         *
 129      * Properties                                                              *
 130      *                                                                         *
 131      **************************************************************************/
 132 
 133     /**
 134      * The items contained in the {@code ToolBar}. Typical use case for a
 135      * {@code ToolBar} suggest that the most common items to place within it
 136      * are {@link Button Buttons}, {@link ToggleButton ToggleButtons}, and  {@link Separator Separators},
 137      * but you are not restricted to just these, and can insert any {@link Node}.
 138      * The items added must not be null.

 139      */
 140     public final ObservableList<Node> getItems() { return items; }
 141 
 142     private final ObservableList<Node> items = FXCollections.<Node>observableArrayList();
 143 
 144     /**
 145      * The orientation of the {@code ToolBar} - this can either be horizontal
 146      * or vertical.
 147      */
 148     private ObjectProperty<Orientation> orientation;
 149     public final void setOrientation(Orientation value) {
 150         orientationProperty().set(value);
 151     };
 152     public final Orientation getOrientation() {
 153         return orientation == null ? Orientation.HORIZONTAL : orientation.get();
 154     }
 155     public final ObjectProperty<Orientation> orientationProperty() {
 156         if (orientation == null) {
 157             orientation = new StyleableObjectProperty<Orientation>(Orientation.HORIZONTAL) {
 158                 @Override public void invalidated() {




 119         // CssMetaData ensures that css will be able to override the value.
 120         ((StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty()).applyStyle(null, Boolean.FALSE);
 121 
 122         // initialize css pseudo-class state
 123         pseudoClassStateChanged(HORIZONTAL_PSEUDOCLASS_STATE, true);
 124 
 125     }
 126 
 127     /***************************************************************************
 128      *                                                                         *
 129      * Properties                                                              *
 130      *                                                                         *
 131      **************************************************************************/
 132 
 133     /**
 134      * The items contained in the {@code ToolBar}. Typical use case for a
 135      * {@code ToolBar} suggest that the most common items to place within it
 136      * are {@link Button Buttons}, {@link ToggleButton ToggleButtons}, and  {@link Separator Separators},
 137      * but you are not restricted to just these, and can insert any {@link Node}.
 138      * The items added must not be null.
 139      * @return the list of items
 140      */
 141     public final ObservableList<Node> getItems() { return items; }
 142 
 143     private final ObservableList<Node> items = FXCollections.<Node>observableArrayList();
 144 
 145     /**
 146      * The orientation of the {@code ToolBar} - this can either be horizontal
 147      * or vertical.
 148      */
 149     private ObjectProperty<Orientation> orientation;
 150     public final void setOrientation(Orientation value) {
 151         orientationProperty().set(value);
 152     };
 153     public final Orientation getOrientation() {
 154         return orientation == null ? Orientation.HORIZONTAL : orientation.get();
 155     }
 156     public final ObjectProperty<Orientation> orientationProperty() {
 157         if (orientation == null) {
 158             orientation = new StyleableObjectProperty<Orientation>(Orientation.HORIZONTAL) {
 159                 @Override public void invalidated() {


< prev index next >