Package rma.swing

Class RmaJList<E>

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, Scrollable, Modifiable, EditableComponent, FormManagementListener
Direct Known Subclasses:
RmaJCheckBoxList

public class RmaJList<E> extends JList<E> implements FormManagementListener, EditableComponent, Modifiable
See Also:
  • Constructor Details

    • RmaJList

      public RmaJList(Vector<? extends E> listData)
      Construct a JList that displays the elements in the specified Vector.
    • RmaJList

      public RmaJList()
      Constructs a JList with an empty model.
    • RmaJList

      public RmaJList(ListModel<E> dataModel)
      Construct a JList that displays the elements in the specified, non-null model.
    • RmaJList

      public RmaJList(E[] listData)
      Construct a JList that displays the elements in the specified array.
  • Method Details

    • clearPerformed

      public void clearPerformed()
      Specified by:
      clearPerformed in interface FormManagementListener
    • createKeyListener

      protected KeyListener createKeyListener()
      Creates the key listener for handling type-ahead. Returns an instance of BasicComboBoxUI$KeyHandler.
    • createDefaultKeySelectionManager

      protected RmaJList.KeySelectionManager createDefaultKeySelectionManager()
      Returns an instance of the default key-selection manager.
      Returns:
      the KeySelectionManager currently used by the list
    • selectWithKeyChar

      public boolean selectWithKeyChar(char keyChar)
      Selects the list item that correponds to the specified keyboard character and returns true, if there is an item corresponding to that character. Otherwise, returns false.
      Parameters:
      keyChar - a char, typically this is a keyboard key typed by the user
    • isNavigationKey

      protected boolean isNavigationKey(int keyCode)
      Returns whether or not the supplied keyCode maps to a key that is used for navigation. This is used for optimizing key input by only passing non- navigation keys to the type-ahead mechanism. Subclasses should override this if they change the navigation keys.
    • setIsEditable

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

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

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

      public int getItemCount()
      get the number of items in the List
      Returns:
      the number of items.
      See Also:
    • getValueAt

      public E getValueAt(int idx)
      get the Value in the list at index idx
      Parameters:
      idx - the index to get the value at
      Returns:
      the value at idx or null if idx isn't a valid index