Class TerraMenuButtonSkin

    • Constructor Detail

      • TerraMenuButtonSkin

        public TerraMenuButtonSkin()
    • Method Detail

      • getPreferredWidth

        public int getPreferredWidth​(int height)
        Description copied from interface: ConstrainedVisual
        Returns the visual's preferred width given the provided height constraint.
        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.
        Parameters:
        width - The width by which to constrain the preferred height, or -1 for no constraint.
        Returns:
        The preferred height given the width constraint.
      • getBaseline

        public int getBaseline​(int width,
                               int height)
        Description copied from class: ComponentSkin
        Should be implemented in every subclass.

        The default implementation here simply returns -1 (no baseline).

        Specified by:
        getBaseline in interface ConstrainedVisual
        Overrides:
        getBaseline in class ComponentSkin
        Parameters:
        width - Constrained width to compute the baseline for.
        height - Constrained height to compute the baseline for.
        Returns:
        The baseline relative to the origin of this visual, or -1 if this visual does not have a baseline.
      • 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
        Overrides:
        layout in class ButtonSkin
      • paint

        public void paint​(java.awt.Graphics2D graphics)
        Description copied from interface: Visual
        Paints the visual.
        Parameters:
        graphics - The graphics context in which to paint the visual.
      • isFocusable

        public boolean isFocusable()
        Description copied from class: ComponentSkin
        By default, skins are focusable.
        Specified by:
        isFocusable in interface Skin
        Overrides:
        isFocusable in class ComponentSkin
        Returns:
        true if this skin is focusable; false, otherwise.
      • isOpaque

        public boolean isOpaque()
        Description copied from class: ComponentSkin
        By default, skins are assumed to be opaque.
        Specified by:
        isOpaque in interface Skin
        Overrides:
        isOpaque in class ComponentSkin
        Returns:
        true if this skin is opaque; false if any part of it is transparent or translucent.
      • 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 disabledColor)
      • getBackgroundColor

        public java.awt.Color getBackgroundColor()
      • setBackgroundColor

        public void setBackgroundColor​(java.awt.Color backgroundColor)
      • setBackgroundColor

        public final void setBackgroundColor​(java.lang.String backgroundColor)
      • setBackgroundColor

        public final void setBackgroundColor​(int backgroundColor)
      • getDisabledBackgroundColor

        public java.awt.Color getDisabledBackgroundColor()
      • setDisabledBackgroundColor

        public void setDisabledBackgroundColor​(java.awt.Color disabledBackgroundColor)
      • setDisabledBackgroundColor

        public final void setDisabledBackgroundColor​(java.lang.String disabledBackgroundColor)
      • setDisabledBackgroundColor

        public final void setDisabledBackgroundColor​(int disabledBackgroundColor)
      • getBorderColor

        public java.awt.Color getBorderColor()
      • setBorderColor

        public void setBorderColor​(java.awt.Color borderColor)
      • setBorderColor

        public final void setBorderColor​(java.lang.String borderColor)
      • setBorderColor

        public final void setBorderColor​(int borderColor)
      • getDisabledBorderColor

        public java.awt.Color getDisabledBorderColor()
      • setDisabledBorderColor

        public void setDisabledBorderColor​(java.awt.Color disabledBorderColor)
      • setDisabledBorderColor

        public final void setDisabledBorderColor​(java.lang.String disabledBorderColor)
      • setDisabledBorderColor

        public final void setDisabledBorderColor​(int disabledBorderColor)
      • getPadding

        public Insets getPadding()
      • setPadding

        public void setPadding​(Insets padding)
      • setPadding

        public final void setPadding​(Dictionary<java.lang.String,​?> padding)
      • setPadding

        public final void setPadding​(Sequence<?> padding)
      • setPadding

        public final void setPadding​(int padding)
      • setPadding

        public final void setPadding​(java.lang.Number padding)
      • setPadding

        public final void setPadding​(java.lang.String padding)
      • getSpacing

        public int getSpacing()
      • setSpacing

        public void setSpacing​(int spacing)
      • setSpacing

        public final void setSpacing​(java.lang.Number spacing)
      • getMinimumAspectRatio

        public float getMinimumAspectRatio()
      • setMinimumAspectRatio

        public void setMinimumAspectRatio​(float minumumAspectRatio)
      • setMinimumAspectRatio

        public final void setMinimumAspectRatio​(java.lang.Number minumumAspectRatio)
      • getMaximumAspectRatio

        public float getMaximumAspectRatio()
      • setMaximumAspectRatio

        public void setMaximumAspectRatio​(float maximumAspectRatio)
      • setMaximumAspectRatio

        public final void setMaximumAspectRatio​(java.lang.Number maximumAspectRatio)
      • isToolbar

        public boolean isToolbar()
      • setToolbar

        public void setToolbar​(boolean toolbar)
      • getCloseTransitionDuration

        public int getCloseTransitionDuration()
      • setCloseTransitionDuration

        public void setCloseTransitionDuration​(int closeTransitionDuration)
      • getCloseTransitionRate

        public int getCloseTransitionRate()
      • setCloseTransitionRate

        public void setCloseTransitionRate​(int closeTransitionRate)
      • mouseClick

        public boolean mouseClick​(Component component,
                                  Mouse.Button button,
                                  int x,
                                  int y,
                                  int count)
        Description copied from interface: ComponentMouseButtonListener
        Called when a mouse button is clicked over a component.
        Specified by:
        mouseClick in interface ComponentMouseButtonListener
        Overrides:
        mouseClick in class ComponentSkin
        Parameters:
        component - Component user the mouse pointer.
        button - Which mouse button was clicked.
        x - X position of the mouse.
        y - Y position of the mouse.
        count - Number of clicks (1 = single click, 2 = double click, etc.).
        Returns:
        true to consume the event; false to allow it to propagate (default).