Class TerraExpanderSkin

    • Constructor Detail

      • TerraExpanderSkin

        public TerraExpanderSkin()
    • 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 ExpanderSkin
        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.
      • 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
      • paint

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

        public java.awt.Font getTitleBarFont()
      • setTitleBarFont

        public void setTitleBarFont​(java.awt.Font titleBarFont)
      • setTitleBarFont

        public final void setTitleBarFont​(java.lang.String titleBarFont)
      • setTitleBarFont

        public final void setTitleBarFont​(Dictionary<java.lang.String,​?> titleBarFont)
      • getTitleBarColor

        public java.awt.Color getTitleBarColor()
      • setTitleBarColor

        public void setTitleBarColor​(java.awt.Color titleBarColor)
      • setTitleBarColor

        public final void setTitleBarColor​(java.lang.String titleBarColor)
      • setTitleBarColor

        public final void setTitleBarColor​(int titleBarColor)
      • getTitleBarBackgroundColor

        public java.awt.Color getTitleBarBackgroundColor()
      • setTitleBarBackgroundColor

        public void setTitleBarBackgroundColor​(java.awt.Color titleBarBackgroundColor)
      • setTitleBarBackgroundColor

        public final void setTitleBarBackgroundColor​(java.lang.String titleBarBackgroundColor)
      • setTitleBarBackgroundColor

        public final void setTitleBarBackgroundColor​(int titleBarBackgroundColor)
      • getTitleBarBorderColor

        public java.awt.Color getTitleBarBorderColor()
      • setTitleBarBorderColor

        public void setTitleBarBorderColor​(java.awt.Color titleBarBorderColor)
      • setTitleBarBorderColor

        public final void setTitleBarBorderColor​(java.lang.String titleBarBorderColor)
      • setTitleBarBorderColor

        public final void setTitleBarBorderColor​(int titleBarBorderColor)
      • getShadeButtonColor

        public java.awt.Color getShadeButtonColor()
      • setShadeButtonColor

        public void setShadeButtonColor​(java.awt.Color shadeButtonColor)
      • setShadeButtonColor

        public final void setShadeButtonColor​(java.lang.String shadeButtonColor)
      • setShadeButtonColor

        public final void setShadeButtonColor​(int shadeButtonColor)
      • getDisabledShadeButtonColor

        public java.awt.Color getDisabledShadeButtonColor()
      • setDisabledShadeButtonColor

        public void setDisabledShadeButtonColor​(java.awt.Color disabledShadeButtonColor)
      • setDisabledShadeButtonColor

        public final void setDisabledShadeButtonColor​(java.lang.String disabledShadeButtonColor)
      • setDisabledShadeButtonColor

        public final void setDisabledShadeButtonColor​(int disabledShadeButtonColor)
      • 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)
      • 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)
      • getExpandDuration

        public int getExpandDuration()
      • setExpandDuration

        public void setExpandDuration​(int expandDuration)
      • getExpandRate

        public int getExpandRate()
      • setExpandRate

        public void setExpandRate​(int expandRate)
      • buttonPressed

        public void buttonPressed​(Button button)
        Listener for expander button events.
        Specified by:
        buttonPressed in interface ButtonPressListener
        Parameters:
        button - The source of the button event.
      • enabledChanged

        public void enabledChanged​(Component component)
        Called when a component's enabled state has changed.

        Called both when the component is enabled and when it is disabled. The component's enabled flag has already been set when this method is called so the new state can be determined by calling the Component.isEnabled() method.

        Specified by:
        enabledChanged in interface ComponentStateListener
        Overrides:
        enabledChanged in class ComponentSkin
        Parameters:
        component - The component whose enabled state is changing.
      • titleChanged

        public void titleChanged​(Expander expander,
                                 java.lang.String previousTitle)
        Called when an expander's title has changed.
        Specified by:
        titleChanged in interface ExpanderListener
        Overrides:
        titleChanged in class ExpanderSkin
        Parameters:
        expander - The expander that has changed.
        previousTitle - The previous title for the expander.
      • contentChanged

        public void contentChanged​(Expander expander,
                                   Component previousContent)
        Called when an expander's content component has changed.
        Specified by:
        contentChanged in interface ExpanderListener
        Overrides:
        contentChanged in class ExpanderSkin
        Parameters:
        expander - The expander that has changed content.
        previousContent - The previous content of the expander.