Class JListShape

All Implemented Interfaces:
Archivable, DeepChangeListener, RMPropertyChanger, RMTypes, PropertyChangeListener, Cloneable, EventListener

public class JListShape extends JComponentShape
An RMShape subclass for JLists.
  • Constructor Details

    • JListShape

      public JListShape()
  • Method Details

    • getSelectionMode

      public int getSelectionMode()
      Returns the selection mode.
    • setSelectionMode

      public void setSelectionMode(int aMode)
      Sets the selection mode.
    • getSelectedIndex

      public int getSelectedIndex()
      Returns the selected index.
    • setSelectedIndex

      public void setSelectedIndex(int anIndex)
      Sets the selected index.
    • getItems

      public List<String> getItems()
      Returns list items.
    • setItems

      public void setItems(List<String> theItems)
      Sets list items.
    • getItemsString

      public String getItemsString()
      Returns the list items as a single string with items separated by newlines.
    • setItemsString

      public void setItemsString(String aString)
      Sets the list items as a single string with items separated by newlines.
    • getComponentClass

      public Class<? extends JComponent> getComponentClass()
      Creates the component for this component shape.
      Overrides:
      getComponentClass in class JComponentShape
    • configureComponent

      protected void configureComponent(JBuilder aBldr, JComponent aComp)
      Override to configure component.
      Overrides:
      configureComponent in class JComponentShape
    • toXMLShape

      public RXElement toXMLShape(RXArchiver anArchiver)
      XML archival.
      Overrides:
      toXMLShape in class JComponentShape
    • fromXMLShape

      public void fromXMLShape(RXArchiver anArchiver, RXElement anElement)
      XML unarchival.
      Overrides:
      fromXMLShape in class JComponentShape
    • fromXMLChildren

      protected void fromXMLChildren(RXArchiver anArchiver, RXElement anElement)
      Override JComponentShape version to suppress reading of JMenuItems as JComponentShapes (JListHpr will load them).
      Overrides:
      fromXMLChildren in class RMParentShape