Class ToggleGroup

  • public class ToggleGroup
    extends Object
    A class which contains a reference to all Toggles whose selected variables should be managed such that only a single Toggle within the ToggleGroup may be selected at any one time.

    Generally ToggleGroups are managed automatically simply by specifying the name of a ToggleGroup on the Toggle, but in some situations it is desirable to explicitly manage which ToggleGroup is used by Toggles.

    JavaFX 2.0
    • Constructor Detail

      • ToggleGroup

        public ToggleGroup()
        Creates a default ToggleGroup instance.
    • Method Detail

      • getToggles

        public final ObservableList<Toggle> getToggles()
        The list of toggles within the ToggleGroup.
        the list of toggles within the ToggleGroup
      • selectToggle

        public final void selectToggle​(Toggle value)
        Selects the toggle.
        value - The Toggle that is to be selected.
      • getSelectedToggle

        public final Toggle getSelectedToggle()
        Gets the selected Toggle.
        Toggle The selected toggle.
      • getProperties

        public final ObservableMap<Object,​Object> getProperties()
        Returns an observable map of properties on this node for use primarily by application developers.
        an observable map of properties on this node for use primarily by application developers
        JavaFX 8u40
      • hasProperties

        public boolean hasProperties()
        Tests if ToggleGroup has properties.
        true if node has properties.
        JavaFX 8u40
      • setUserData

        public void setUserData​(Object value)
        Convenience method for setting a single Object property that can be retrieved at a later date. This is functionally equivalent to calling the getProperties().put(Object key, Object value) method. This can later be retrieved by calling getUserData().
        value - The value to be stored - this can later be retrieved by calling getUserData().
        JavaFX 8u40
      • getUserData

        public Object getUserData()
        Returns a previously set Object property, or null if no such property has been set using the setUserData(java.lang.Object) method.
        The Object that was previously set, or null if no property has been set or if null was set.
        JavaFX 8u40