Class WindowTabButtonProperties


  • public class WindowTabButtonProperties
    extends PropertyMapContainer
    Properties and property values for a button in a window tab.
    • Field Detail

      • PROPERTIES

        public static final PropertyMapGroup PROPERTIES
        Property group containing all window tab button properties.
      • VISIBLE

        public static final BooleanProperty VISIBLE
        True if the button is visible.
      • ICON

        public static final IconProperty ICON
        The button icon.
      • TOOL_TIP_TEXT

        public static final StringProperty TOOL_TIP_TEXT
        The button tool tip text.
        Since:
        IDW 1.1.0
      • FACTORY

        public static final ButtonFactoryProperty FACTORY
        The button factory. This factory is used to create the button when it's first needed. Modifying this property will NOT cause already created buttons to be replaced. The created button will be set to non-focusable and will be assigned the icon from ICON and the tool tip from TOOL_TIP_TEXT. An action listener is also added to the button.
        Since:
        IDW 1.1.0
    • Constructor Detail

      • WindowTabButtonProperties

        public WindowTabButtonProperties()
        Creates an empty property object.
      • WindowTabButtonProperties

        public WindowTabButtonProperties​(PropertyMap map)
        Creates a property object containing the map.
        Parameters:
        map - the property map
      • WindowTabButtonProperties

        public WindowTabButtonProperties​(WindowTabButtonProperties inheritFrom)
        Creates a property object that inherit values from another property object.
        Parameters:
        inheritFrom - the object from which to inherit property values
    • Method Detail

      • addSuperObject

        public WindowTabButtonProperties addSuperObject​(WindowTabButtonProperties properties)
        Adds a super object from which property values are inherited.
        Parameters:
        properties - the object from which to inherit property values
        Returns:
        this
      • setVisible

        public WindowTabButtonProperties setVisible​(boolean visible)
        Set to true if this button should be visible.
        Parameters:
        visible - true if this button should be visible
        Returns:
        this
      • isVisible

        public boolean isVisible()
        Returns true if this button is visible.
        Returns:
        true if this button is visible
      • setIcon

        public WindowTabButtonProperties setIcon​(javax.swing.Icon icon)
        Sets the button icon.
        Parameters:
        icon - the button icon
        Returns:
        this
      • getIcon

        public javax.swing.Icon getIcon()
        Returns the button icon.
        Returns:
        the button icon
      • getToolTipText

        public java.lang.String getToolTipText()
        Returns the button tool tip text.
        Returns:
        the button tool tip text
        Since:
        IDW 1.1.0
      • setToolTipText

        public WindowTabButtonProperties setToolTipText​(java.lang.String text)
        Sets the button tool tip text.
        Parameters:
        text - the button tool tip text
        Returns:
        this
        Since:
        IDW 1.1.0
      • getFactory

        public ButtonFactory getFactory()
        Gets the button factory. This factory is used to create the button when it's first needed. Modifying this property will NOT cause already created buttons to be replaced. The created button will be set to non-focusable and will be assigned the icon from ICON and the tool tip from TOOL_TIP_TEXT. An action listener is also added to the button.
        Returns:
        the button factory
        Since:
        IDW 1.1.0
      • setFactory

        public WindowTabButtonProperties setFactory​(ButtonFactory factory)
        Sets the button factory. This factory is used to create the button when it's first needed. Modifying this property will NOT cause already created buttons to be replaced. The created button will be set to non-focusable and will be assigned the icon from ICON and the tool tip from TOOL_TIP_TEXT. An action listener is also added to the button.
        Parameters:
        factory - the button factory
        Returns:
        this
        Since:
        IDW 1.1.0
      • setTo

        public WindowTabButtonProperties setTo​(DockingWindowAction action)
        Sets the action is performed when the button is clicked. Also sets the icon and tooltip text of the button using the values from DockingWindowAction.
        Parameters:
        action - the action that is performed when the button is clicked
        Returns:
        this
        Since:
        IDW 1.3.0