< prev index next >

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

Print this page




 154             final boolean active = get();
 155             pseudoClassStateChanged(PSEUDO_CLASS_EXPANDED,   active);
 156             pseudoClassStateChanged(PSEUDO_CLASS_COLLAPSED, !active);
 157             notifyAccessibleAttributeChanged(AccessibleAttribute.EXPANDED);
 158         }
 159 
 160         @Override
 161         public Object getBean() {
 162             return TitledPane.this;
 163         }
 164 
 165         @Override
 166         public String getName() {
 167             return "expanded";
 168         }
 169     };
 170 
 171     /**
 172      * Sets the expanded state of the TitledPane.  The default is {@code true}.
 173      *

 174      */
 175     public final void setExpanded(boolean value) { expandedProperty().set(value); }
 176 
 177     /*
 178      * Returns the expanded state of the TitledPane.
 179      *
 180      * @return The expanded state of the TitledPane.
 181      */
 182     public final boolean isExpanded() { return expanded.get(); }
 183 
 184     /**
 185      * The expanded state of the TitledPane.

 186      */
 187     public final BooleanProperty expandedProperty() { return expanded; }
 188 
 189 
 190     // --- Animated
 191     private BooleanProperty animated = new StyleableBooleanProperty(true) {
 192 
 193         @Override
 194         public Object getBean() {
 195             return TitledPane.this;
 196         }
 197 
 198         @Override
 199         public String getName() {
 200             return "animated";
 201         }
 202 
 203         @Override
 204         public CssMetaData<TitledPane,Boolean> getCssMetaData() {
 205             return StyleableProperties.ANIMATED;
 206         }
 207 
 208     };
 209 
 210     /**
 211      * Specifies how the TitledPane should open and close.  The panel will be
 212      * animated out when this value is set to {@code true}.  The default is {@code true}.
 213      *

 214      */
 215     public final void setAnimated(boolean value) { animatedProperty().set(value); }
 216 
 217     /**
 218      * Returns the animated state of the TitledPane.
 219      *
 220      * @return The animated state of the TitledPane.
 221      */
 222     public final boolean isAnimated() { return animated.get(); }
 223 
 224     /**
 225      *  The animated state of the TitledPane.

 226      */
 227     public final BooleanProperty animatedProperty() { return animated; }
 228 
 229 
 230     // --- Collapsible
 231     private BooleanProperty collapsible = new StyleableBooleanProperty(true) {
 232 
 233         @Override
 234         public Object getBean() {
 235             return TitledPane.this;
 236         }
 237 
 238         @Override
 239         public String getName() {
 240             return "collapsible";
 241         }
 242 
 243         @Override
 244         public CssMetaData<TitledPane,Boolean> getCssMetaData() {
 245             return StyleableProperties.COLLAPSIBLE;
 246         }
 247 
 248     };
 249 
 250     /**
 251      * Specifies if the TitledPane can be collapsed.  The default is {@code true}.
 252      *

 253      */
 254     public final void setCollapsible(boolean value) { collapsibleProperty().set(value); }
 255 
 256     /**
 257      * Returns the collapsible state of the TitlePane.
 258      *
 259      * @return The collapsible state of the TitledPane.
 260      */
 261     public final boolean isCollapsible() { return collapsible.get(); }
 262 
 263     /**
 264      * The collapsible state of the TitledPane.

 265      */
 266     public final BooleanProperty collapsibleProperty() { return collapsible; }
 267 
 268     /***************************************************************************
 269      *                                                                         *
 270      * Methods                                                                 *
 271      *                                                                         *
 272      **************************************************************************/
 273 
 274     /** {@inheritDoc} */
 275     @Override protected Skin<?> createDefaultSkin() {
 276         return new TitledPaneSkin(this);
 277     }
 278 
 279     /***************************************************************************
 280      *                                                                         *
 281      * Stylesheet Handling                                                     *
 282      *                                                                         *
 283      **************************************************************************/
 284 




 154             final boolean active = get();
 155             pseudoClassStateChanged(PSEUDO_CLASS_EXPANDED,   active);
 156             pseudoClassStateChanged(PSEUDO_CLASS_COLLAPSED, !active);
 157             notifyAccessibleAttributeChanged(AccessibleAttribute.EXPANDED);
 158         }
 159 
 160         @Override
 161         public Object getBean() {
 162             return TitledPane.this;
 163         }
 164 
 165         @Override
 166         public String getName() {
 167             return "expanded";
 168         }
 169     };
 170 
 171     /**
 172      * Sets the expanded state of the TitledPane.  The default is {@code true}.
 173      *
 174      * @param value a flag indicating the expanded state
 175      */
 176     public final void setExpanded(boolean value) { expandedProperty().set(value); }
 177 
 178     /*
 179      * Returns the expanded state of the TitledPane.
 180      *
 181      * @return The expanded state of the TitledPane.
 182      */
 183     public final boolean isExpanded() { return expanded.get(); }
 184 
 185     /**
 186      * The expanded state of the TitledPane.
 187      * @return the expanded state property
 188      */
 189     public final BooleanProperty expandedProperty() { return expanded; }
 190 
 191 
 192     // --- Animated
 193     private BooleanProperty animated = new StyleableBooleanProperty(true) {
 194 
 195         @Override
 196         public Object getBean() {
 197             return TitledPane.this;
 198         }
 199 
 200         @Override
 201         public String getName() {
 202             return "animated";
 203         }
 204 
 205         @Override
 206         public CssMetaData<TitledPane,Boolean> getCssMetaData() {
 207             return StyleableProperties.ANIMATED;
 208         }
 209 
 210     };
 211 
 212     /**
 213      * Specifies how the TitledPane should open and close.  The panel will be
 214      * animated out when this value is set to {@code true}.  The default is {@code true}.
 215      *
 216      * @param value if flag indicating the animated state
 217      */
 218     public final void setAnimated(boolean value) { animatedProperty().set(value); }
 219 
 220     /**
 221      * Returns the animated state of the TitledPane.
 222      *
 223      * @return The animated state of the TitledPane.
 224      */
 225     public final boolean isAnimated() { return animated.get(); }
 226 
 227     /**
 228      *  The animated state of the TitledPane.
 229      * @return the animated state property
 230      */
 231     public final BooleanProperty animatedProperty() { return animated; }
 232 
 233 
 234     // --- Collapsible
 235     private BooleanProperty collapsible = new StyleableBooleanProperty(true) {
 236 
 237         @Override
 238         public Object getBean() {
 239             return TitledPane.this;
 240         }
 241 
 242         @Override
 243         public String getName() {
 244             return "collapsible";
 245         }
 246 
 247         @Override
 248         public CssMetaData<TitledPane,Boolean> getCssMetaData() {
 249             return StyleableProperties.COLLAPSIBLE;
 250         }
 251 
 252     };
 253 
 254     /**
 255      * Specifies if the TitledPane can be collapsed.  The default is {@code true}.
 256      *
 257      * @param value a flag indicating the collapsible state
 258      */
 259     public final void setCollapsible(boolean value) { collapsibleProperty().set(value); }
 260 
 261     /**
 262      * Returns the collapsible state of the TitlePane.
 263      *
 264      * @return The collapsible state of the TitledPane.
 265      */
 266     public final boolean isCollapsible() { return collapsible.get(); }
 267 
 268     /**
 269      * The collapsible state of the TitledPane.
 270      * @return the collapsible property
 271      */
 272     public final BooleanProperty collapsibleProperty() { return collapsible; }
 273 
 274     /***************************************************************************
 275      *                                                                         *
 276      * Methods                                                                 *
 277      *                                                                         *
 278      **************************************************************************/
 279 
 280     /** {@inheritDoc} */
 281     @Override protected Skin<?> createDefaultSkin() {
 282         return new TitledPaneSkin(this);
 283     }
 284 
 285     /***************************************************************************
 286      *                                                                         *
 287      * Stylesheet Handling                                                     *
 288      *                                                                         *
 289      **************************************************************************/
 290 


< prev index next >