Class JCommandButtonStrip

    • Constructor Detail

      • JCommandButtonStrip

        public JCommandButtonStrip()
        Creates an empty horizontally-oriented strip.
      • JCommandButtonStrip

        public JCommandButtonStrip​(JCommandButtonStrip.StripOrientation orientation)
        Creates an empty strip.
        Parameters:
        orientation - Orientation for this strip.
    • Method Detail

      • setDisplayState

        public void setDisplayState​(CommandButtonDisplayState elementState)
        Sets the display state for the buttons in this button strip. This method must be called before adding the first command button. The default state is CommandButtonDisplayState.SMALL.
        Parameters:
        elementState - New element state for the buttons in this button strip.
      • setHGapScaleFactor

        public void setHGapScaleFactor​(double hgapScaleFactor)
        Sets the horizontal gap scale factor for the buttons in this button strip. This method must be called before adding the first command button.

        The default horizontal gap scale factor for horizontally oriented strips is 0.75. The default horizontal gap scale factor for vertically oriented strips is 1.0.

        Parameters:
        hgapScaleFactor - New horizontal gap scale factor for the buttons in this button strip.
        See Also:
        setVGapScaleFactor(double)
      • setVGapScaleFactor

        public void setVGapScaleFactor​(double vgapScaleFactor)
        Sets the vertical gap scale factor for the buttons in this button strip. This method must be called before adding the first command button.

        The default vertical gap scale factor for vertically oriented strips is 0.75. The default vertical gap scale factor for horizontally oriented strips is 1.0.

        Parameters:
        vgapScaleFactor - New vertical gap scale factor for the buttons in this button strip.
        See Also:
        setHGapScaleFactor(double)
      • setUI

        public void setUI​(CommandButtonStripUI ui)
        Sets the new UI delegate.
        Parameters:
        ui - New UI delegate.
      • getButtonCount

        public int getButtonCount()
        Returns the number of buttons in this strip.
        Returns:
        Number of buttons in this strip.
        See Also:
        getButton(int)
      • getButton

        public AbstractCommandButton getButton​(int index)
        Returns the specified button component of this strip.
        Parameters:
        index - Button index.
        Returns:
        The matching button.
        See Also:
        getButtonCount()
      • isFirst

        public boolean isFirst​(AbstractCommandButton button)
        Checks whether the specified button is the first button in this strip.
        Parameters:
        button - Button to check.
        Returns:
        true if the specified button is the first button in this strip, false otherwise.
        See Also:
        isLast(AbstractCommandButton)
      • isLast

        public boolean isLast​(AbstractCommandButton button)
        Checks whether the specified button is the last button in this strip.
        Parameters:
        button - Button to check.
        Returns:
        true if the specified button is the last button in this strip, false otherwise.
        See Also:
        isFirst(AbstractCommandButton)
      • removeChangeListener

        public void removeChangeListener​(ChangeListener l)
        Removes the specified change listener from tracking changes to this command button strip.
        Parameters:
        l - Change listener to remove.
        See Also:
        addChangeListener(ChangeListener)
      • fireStateChanged

        protected void fireStateChanged()
        Notifies all registered listener that the state of this command button strip has changed.