Class TerraMenuBarSkin

    • Constructor Detail

      • TerraMenuBarSkin

        public TerraMenuBarSkin()
    • Method Detail

      • install

        public void install​(Component component)
        Description copied from class: ComponentSkin
        Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.
        Specified by:
        install in interface Skin
        Overrides:
        install in class ContainerSkin
        Parameters:
        component - The component to which the skin is being attached.
      • getPreferredWidth

        public int getPreferredWidth​(int height)
        Description copied from interface: ConstrainedVisual
        Returns the visual's preferred width given the provided height constraint.
        Specified by:
        getPreferredWidth in interface ConstrainedVisual
        Overrides:
        getPreferredWidth in class ContainerSkin
        Parameters:
        height - The height by which to constrain the preferred width, or -1 for no constraint.
        Returns:
        The preferred width given the height constraint.
      • getPreferredHeight

        public int getPreferredHeight​(int width)
        Description copied from interface: ConstrainedVisual
        Returns the visual's preferred height given the provided width constraint.
        Specified by:
        getPreferredHeight in interface ConstrainedVisual
        Overrides:
        getPreferredHeight in class ContainerSkin
        Parameters:
        width - The width by which to constrain the preferred height, or -1 for no constraint.
        Returns:
        The preferred height given the width constraint.
      • layout

        public void layout()
        Description copied from interface: Skin
        If the component on which the skin is installed is a container, lays out the container's children.
        Specified by:
        layout in interface Skin
      • getFont

        public java.awt.Font getFont()
      • setFont

        public void setFont​(java.awt.Font font)
      • setFont

        public final void setFont​(java.lang.String font)
      • setFont

        public final void setFont​(Dictionary<java.lang.String,​?> font)
      • getColor

        public java.awt.Color getColor()
      • setColor

        public void setColor​(java.awt.Color color)
      • setColor

        public final void setColor​(java.lang.String color)
      • setColor

        public final void setColor​(int color)
      • getDisabledColor

        public java.awt.Color getDisabledColor()
      • setDisabledColor

        public void setDisabledColor​(java.awt.Color disabledColor)
      • setDisabledColor

        public final void setDisabledColor​(java.lang.String disabledColor)
      • setDisabledColor

        public final void setDisabledColor​(int color)
      • getActiveColor

        public java.awt.Color getActiveColor()
      • setActiveColor

        public void setActiveColor​(java.awt.Color activeColor)
      • setActiveColor

        public final void setActiveColor​(java.lang.String activeColor)
      • setActiveColor

        public final void setActiveColor​(int color)
      • getActiveBackgroundColor

        public java.awt.Color getActiveBackgroundColor()
      • setActiveBackgroundColor

        public void setActiveBackgroundColor​(java.awt.Color activeBackgroundColor)
      • setActiveBackgroundColor

        public final void setActiveBackgroundColor​(java.lang.String activeBackgroundColor)
      • setActiveBackgroundColor

        public final void setActiveBackgroundColor​(int color)
      • getSpacing

        public int getSpacing()
      • setSpacing

        public void setSpacing​(int spacing)
      • itemInserted

        public void itemInserted​(MenuBar menuBar,
                                 int index)
        Description copied from interface: MenuBarListener
        Called when a menu bar item has been inserted.
        Specified by:
        itemInserted in interface MenuBarListener
        Parameters:
        menuBar - The menu bar that changed.
        index - The index where a new item was inserted.
      • itemsRemoved

        public void itemsRemoved​(MenuBar menuBar,
                                 int index,
                                 Sequence<MenuBar.Item> removed)
        Description copied from interface: MenuBarListener
        Called when menu bar items have been removed.
        Specified by:
        itemsRemoved in interface MenuBarListener
        Parameters:
        menuBar - The source of the event.
        index - The starting index where items were removed.
        removed - The sequence of removed items.
      • activeItemChanged

        public void activeItemChanged​(MenuBar menuBar,
                                      MenuBar.Item previousActiveItem)
        Description copied from interface: MenuBarListener
        Called when a menu bar's active item has changed.
        Specified by:
        activeItemChanged in interface MenuBarListener
        Parameters:
        menuBar - The source of the event.
        previousActiveItem - Which item was active previously.