Package rma.swing

Class RmaJComboBox<E>

All Implemented Interfaces:
ActionListener, ItemListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, EventListener, Accessible, ListDataListener, Modifiable, EditableComponent, FormManagementListener, RmaValidComponent
Direct Known Subclasses:
JComboBoxEx, RmaJColorComboBox, RmaJColorComboBox2

public class RmaJComboBox<E> extends JComboBox<E> implements RmaValidComponent, FormManagementListener, ItemListener, Modifiable, EditableComponent
class that overrides the JComboBox makes sure that removeAllItems() doesn't blowup when there are no items and makes sure that the correct border gets set.
See Also:
  • Constructor Details

    • RmaJComboBox

      public RmaJComboBox(Vector<E> items)
      Creates a JComboBox that contains the elements in the specified Vector.
    • RmaJComboBox

      public RmaJComboBox()
      Creates a JComboBox with a default data model.
    • RmaJComboBox

      public RmaJComboBox(ComboBoxModel<E> aModel)
      Creates a JComboBox that takes its items from an existing ComboBoxDataModel.
    • RmaJComboBox

      public RmaJComboBox(E[] items)
      Creates a JComboBox that contains the elements in the specified array.
  • Method Details

    • init

      protected void init()
    • copy

      public void copy()
    • itemStateChanged

      public void itemStateChanged(ItemEvent event)
      Listens for ItemEvents if we are modifiable
      Specified by:
      itemStateChanged in interface ItemListener
      See Also:
    • removeAllItems

      public void removeAllItems()
      if the combo box has items then remove them
      Overrides:
      removeAllItems in class JComboBox<E>
    • getPreferredSize

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class JComponent
    • getMaximumSize

      public Dimension getMaximumSize()
      Overrides:
      getMaximumSize in class JComponent
    • getMinimumSize

      public Dimension getMinimumSize()
      Overrides:
      getMinimumSize in class JComponent
    • setSelectedIndex

      public void setSelectedIndex(int anIndex)
      Overrides:
      setSelectedIndex in class JComboBox<E>
    • setSelectedItem

      public void setSelectedItem(Object anObject)
      Overrides:
      setSelectedItem in class JComboBox<E>
    • setToolTipText

      public void setToolTipText(String s)
      Overrides:
      setToolTipText in class JComponent
    • setToolTipText

      protected void setToolTipText()
    • setFixedSize

      public void setFixedSize(boolean b)
    • getFixedSize

      public boolean getFixedSize()
    • addItemExclusive

      public void addItemExclusive(E obj)
    • isValid

      public boolean isValid(boolean showErr)
      Checks to see if this data is valid
      Specified by:
      isValid in interface RmaValidComponent
    • setListenToFormManager

      public void setListenToFormManager(boolean b)
    • clearPerformed

      public void clearPerformed()
      Listenes for Management calls from the parent form. IE clearPerfomred()
      Specified by:
      clearPerformed in interface FormManagementListener
    • setModifiable

      public void setModifiable(boolean m)
      If modifiable is true then we will look for events that can modify us and report them to the base dialog if it is an RmaJDialog/RmaJFrame
    • setModified

      public void setModified(boolean b)
      Specified by:
      setModified in interface Modifiable
    • isModified

      public boolean isModified()
      Specified by:
      isModified in interface Modifiable
    • setChangeColor

      public void setChangeColor(Color changeColor)
      set the foreground color when the combo box's selection changes. adds an ItemListener to itself.
    • setIsEditable

      public void setIsEditable(boolean b)
      Specified by:
      setIsEditable in interface EditableComponent