236 // initialize pseudo-class state 237 pseudoClassStateChanged(HORIZONTAL_PSEUDOCLASS_STATE, true); 238 } 239 240 /*************************************************************************** 241 * * 242 * Properties * 243 * * 244 **************************************************************************/ 245 246 // --- Vertical 247 private ObjectProperty<Orientation> orientation; 248 249 /** 250 * <p>This property controls how the SplitPane should be displayed to the 251 * user. {@link javafx.geometry.Orientation#HORIZONTAL} will result in 252 * two (or more) nodes being placed next to each other horizontally, whilst 253 * {@link javafx.geometry.Orientation#VERTICAL} will result in the nodes being 254 * stacked vertically.</p> 255 * 256 */ 257 public final void setOrientation(Orientation value) { 258 orientationProperty().set(value); 259 }; 260 261 /** 262 * The orientation for the SplitPane. 263 * @return The orientation for the SplitPane. 264 */ 265 public final Orientation getOrientation() { 266 return orientation == null ? Orientation.HORIZONTAL : orientation.get(); 267 } 268 269 /** 270 * The orientation for the SplitPane. 271 */ 272 public final ObjectProperty<Orientation> orientationProperty() { 273 if (orientation == null) { 274 orientation = new StyleableObjectProperty<Orientation>(Orientation.HORIZONTAL) { 275 @Override public void invalidated() { 276 final boolean isVertical = (get() == Orientation.VERTICAL); 277 pseudoClassStateChanged(VERTICAL_PSEUDOCLASS_STATE, isVertical); 278 pseudoClassStateChanged(HORIZONTAL_PSEUDOCLASS_STATE, !isVertical); 279 } 280 281 @Override public CssMetaData<SplitPane,Orientation> getCssMetaData() { 282 return StyleableProperties.ORIENTATION; 283 } 284 285 @Override 286 public Object getBean() { 287 return SplitPane.this; 288 } 289 290 @Override | 236 // initialize pseudo-class state 237 pseudoClassStateChanged(HORIZONTAL_PSEUDOCLASS_STATE, true); 238 } 239 240 /*************************************************************************** 241 * * 242 * Properties * 243 * * 244 **************************************************************************/ 245 246 // --- Vertical 247 private ObjectProperty<Orientation> orientation; 248 249 /** 250 * <p>This property controls how the SplitPane should be displayed to the 251 * user. {@link javafx.geometry.Orientation#HORIZONTAL} will result in 252 * two (or more) nodes being placed next to each other horizontally, whilst 253 * {@link javafx.geometry.Orientation#VERTICAL} will result in the nodes being 254 * stacked vertically.</p> 255 * 256 * @param value the orientation value 257 */ 258 public final void setOrientation(Orientation value) { 259 orientationProperty().set(value); 260 }; 261 262 /** 263 * The orientation for the SplitPane. 264 * @return The orientation for the SplitPane. 265 */ 266 public final Orientation getOrientation() { 267 return orientation == null ? Orientation.HORIZONTAL : orientation.get(); 268 } 269 270 /** 271 * The orientation for the SplitPane. 272 * @return the orientation property for the SplitPane 273 */ 274 public final ObjectProperty<Orientation> orientationProperty() { 275 if (orientation == null) { 276 orientation = new StyleableObjectProperty<Orientation>(Orientation.HORIZONTAL) { 277 @Override public void invalidated() { 278 final boolean isVertical = (get() == Orientation.VERTICAL); 279 pseudoClassStateChanged(VERTICAL_PSEUDOCLASS_STATE, isVertical); 280 pseudoClassStateChanged(HORIZONTAL_PSEUDOCLASS_STATE, !isVertical); 281 } 282 283 @Override public CssMetaData<SplitPane,Orientation> getCssMetaData() { 284 return StyleableProperties.ORIENTATION; 285 } 286 287 @Override 288 public Object getBean() { 289 return SplitPane.this; 290 } 291 292 @Override |