Class ComboScale

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, IControl

public class ComboScale extends JPanel implements IControl
See Also:
  • Constructor Details

    • ComboScale

      public ComboScale()
      This is the default constructor
  • Method Details

    • getValue

      public Object getValue()
      Specified by:
      getValue in interface IControl
    • setItems

      public void setItems(long[] items)
    • setScale

      public void setScale(double scale)
    • setScale

      public void setScale(double scale, boolean temporal)
      This funcion ONLY sets the text in combo. It will NOT call listeners.
      Parameters:
      scale -
    • addActionListener

      public void addActionListener(ActionListener listener)
      Description copied from interface: IControl
      Adds an ActionListener to the control
      Specified by:
      addActionListener in interface IControl
      Parameters:
      listener -
    • removeActionListener

      public void removeActionListener(ActionListener listener)
      Description copied from interface: IControl
      Removes an ActionListener from the control
      Specified by:
      removeActionListener in interface IControl
      Parameters:
      listener -
    • getScale

      public double getScale()
      Returns the current selected item.
      Returns:
      The value of the selected scale, or -1 if there was an invalid value (ie. not long value).
    • setLabel

      public void setLabel(String label)
      Sets the label to be displayed on the left of the combo
    • getLabel

      public String getLabel()
      Gets the label
    • setValue

      public Object setValue(Object value)
      Description copied from interface: IControl
      Sets the value of the control. It may mean different things for different kinds of controls.
      Specified by:
      setValue in interface IControl
      Returns:
      The value which was set, or null if the value was not valid for this control
    • setEnabled

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