Class TerraAccordionSkin

    • Constructor Detail

      • TerraAccordionSkin

        public TerraAccordionSkin()
    • Method Detail

      • setSize

        public void setSize​(int width,
                            int height)
        Description copied from class: ComponentSkin
        Set the final size of the component after layout has finished.

        All subclasses must call this superclass method in order to set the ComponentSkin.width and ComponentSkin.height values, but may need to do additional calculations before doing so.

        Specified by:
        setSize in interface ConstrainedVisual
        Overrides:
        setSize in class ComponentSkin
        Parameters:
        width - The new (final) width of the component after layout.
        height - The new (final) height of the component after layout.
      • 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.
      • 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.
      • 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)
      • getButtonFont

        public java.awt.Font getButtonFont()
      • setButtonFont

        public void setButtonFont​(java.awt.Font buttonFont)
      • setButtonFont

        public final void setButtonFont​(java.lang.String buttonFont)
      • setButtonFont

        public final void setButtonFont​(Dictionary<java.lang.String,​?> buttonFont)
      • 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)
      • getButtonColor

        public java.awt.Color getButtonColor()
      • setButtonColor

        public void setButtonColor​(java.awt.Color buttonColor)
      • setButtonColor

        public final void setButtonColor​(java.lang.String buttonColor)
      • setButtonColor

        public final void setButtonColor​(int buttonColor)
      • getDisabledButtonColor

        public java.awt.Color getDisabledButtonColor()
      • setDisabledButtonColor

        public void setDisabledButtonColor​(java.awt.Color disabledButtonColor)
      • setDisabledButtonColor

        public final void setDisabledButtonColor​(java.lang.String disabledButtonColor)
      • setDisabledButtonColor

        public final void setDisabledButtonColor​(int disabledButtonColor)
      • getButtonBackgroundColor

        public java.awt.Color getButtonBackgroundColor()
      • setButtonBackgroundColor

        public void setButtonBackgroundColor​(java.awt.Color buttonBackgroundColor)
      • setButtonBackgroundColor

        public final void setButtonBackgroundColor​(java.lang.String buttonBackgroundColor)
      • setButtonBackgroundColor

        public final void setButtonBackgroundColor​(int buttonBackgroundColor)
      • getButtonPadding

        public Insets getButtonPadding()
      • setButtonPadding

        public void setButtonPadding​(Insets buttonPadding)
      • setButtonPadding

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

        public final void setButtonPadding​(Sequence<?> buttonPadding)
      • setButtonPadding

        public final void setButtonPadding​(int buttonPadding)
      • setButtonPadding

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

        public final void setButtonPadding​(java.lang.String padding)
      • getSelectionChangeDuration

        public int getSelectionChangeDuration()
      • setSelectionChangeDuration

        public void setSelectionChangeDuration​(int selectionChangeDuration)
      • getSelectionChangeRate

        public int getSelectionChangeRate()
      • setSelectionChangeRate

        public void setSelectionChangeRate​(int selectionChangeRate)
      • keyPressed

        public boolean keyPressed​(Component component,
                                  int keyCode,
                                  Keyboard.KeyLocation keyLocation)
        Key presses have no effect if the event has already been consumed.

        CommandModifier + KEYPAD_1 to KEYPAD_9
        or CommandModifier + 1 to 9 Select the (enabled) pane at index 0 to 8 respectively

        ALT + UP Select the next enabled panel.
        ALT + DOWN Select the previous enabled panel.

        Specified by:
        keyPressed in interface ComponentKeyListener
        Overrides:
        keyPressed in class ComponentSkin
        Parameters:
        component - Component that has the focus.
        keyCode - The key code for the key that was pressed.
        keyLocation - Location value for the key (left or right for shift keys, etc.).
        Returns:
        true to consume the event; false to allow it to propagate.
        See Also:
        Platform.getCommandModifier()
      • panelInserted

        public void panelInserted​(Accordion accordion,
                                  int index)
        Description copied from interface: AccordionListener
        Called when a panel has been inserted into a accordion's panel sequence.
        Specified by:
        panelInserted in interface AccordionListener
        Parameters:
        accordion - The accordion that has changed.
        index - The index of the newly inserted panel.
      • panelsRemoved

        public void panelsRemoved​(Accordion accordion,
                                  int index,
                                  Sequence<Component> removed)
        Description copied from interface: AccordionListener
        Called when a panel has been removed from an accordion's panel sequence.
        Specified by:
        panelsRemoved in interface AccordionListener
        Parameters:
        accordion - The accordion that has changed.
        index - The starting index of the panel(s) that were removed.
        removed - The sequence of removed panels.
      • headerDataRendererChanged

        public void headerDataRendererChanged​(Accordion accordion,
                                              Button.DataRenderer previousHeaderDataRenderer)
        Description copied from interface: AccordionListener
        Called when an accordion's header data renderer has changed.
        Specified by:
        headerDataRendererChanged in interface AccordionListener
        Parameters:
        accordion - The accordion that was changed.
        previousHeaderDataRenderer - The previous version of the header data renderer.
      • previewSelectedIndexChange

        public Vote previewSelectedIndexChange​(Accordion accordion,
                                               int selectedIndex)
        Description copied from interface: AccordionSelectionListener
        Called to preview a selected index change.
        Specified by:
        previewSelectedIndexChange in interface AccordionSelectionListener
        Parameters:
        accordion - The source of the event.
        selectedIndex - The index that will be selected.
        Returns:
        The consensus vote as to whether to allow the selected index change.
      • selectedIndexChanged

        public void selectedIndexChanged​(Accordion accordion,
                                         int previousSelectedIndex)
        Description copied from interface: AccordionSelectionListener
        Called when an accordion's selected index has changed.
        Specified by:
        selectedIndexChanged in interface AccordionSelectionListener
        Parameters:
        accordion - The source of the event.
        previousSelectedIndex - If the selection changed directly, contains the index that was previously selected. Otherwise, contains the current selection.
      • headerDataChanged

        public void headerDataChanged​(Accordion accordion,
                                      Component component,
                                      java.lang.Object previousHeaderData)
        Description copied from interface: AccordionAttributeListener
        Called when a panel's header data attribute has changed.
        Specified by:
        headerDataChanged in interface AccordionAttributeListener
        Parameters:
        accordion - The enclosing accordion that has changed.
        component - The child component in question.
        previousHeaderData - The previous header data for this component.
      • tooltipTextChanged

        public void tooltipTextChanged​(Accordion accordion,
                                       Component component,
                                       java.lang.String previousTooltipText)
        Description copied from interface: AccordionAttributeListener
        Called when a panel's tooltip text has changed.
        Specified by:
        tooltipTextChanged in interface AccordionAttributeListener
        Parameters:
        accordion - The enclosing accordion that has changed.
        component - The child component in question.
        previousTooltipText - The previous tooltip text for the component.