Class UpDownButton

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
xal.extension.widgets.swing.wheelswitch.UpDownButton
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class UpDownButton extends JComponent
Descendant of javax.swing.JComponent that contains two ArrowButtons acting as a two-way (up/down) control.
Version:
$id$
Author:
Jernej Kamenik
See Also:
  • Field Details

  • Constructor Details

    • UpDownButton

      public UpDownButton()
      Constructor for UpDownButton.
  • Method Details

    • getValue

      public int getValue()
      Returns UpDownButton.UP_PRESSED if the upper arrowed button was last pressed and UpDownButton.DOWN_PRESSED if the lower arrowed button was last pressed
    • addUpDownListener

      public void addUpDownListener(UpDownListener l)
      Adds an UpDownListener to the array of listeners currently registered for listening to the changes of the UpDownButton. These listeners are notified whenever the user clicks the UpDownButton.
      Parameters:
      l -
      See Also:
    • fireUpDownChanged

      public void fireUpDownChanged()
      Fires a java.swing.event.ChangeEvent to all currently registered UpDownListeners of the UpDownButton.
    • removeUpDownListener

      public void removeUpDownListener(UpDownListener l)
      Removes an UpDownListener from the array of listeners currently registered for listening to the changes of the UpDownButton.
    • getPreferredSize

      public Dimension getPreferredSize()
      This method was overridden to implement correct UpDownButton placement inside the Wheelswitch container.
      Overrides:
      getPreferredSize in class JComponent
      See Also:
    • getMinimumSize

      public Dimension getMinimumSize()
      This method was overridden to implement correct UpDownButton placement inside the Wheelswitch container.
      Overrides:
      getMinimumSize in class JComponent
      See Also:
    • setEnabled

      public void setEnabled(boolean arg0)
      Overrides:
      setEnabled in class JComponent