moka.x
Class List

java.lang.Object
  extended bymoka.lang.Object
      extended bymoka.event.EventListener
          extended bymoka.x.Component
              extended bymoka.x.CaptionedComponent
                  extended bymoka.x.List
All Implemented Interfaces:
Captioned
Direct Known Subclasses:
ComboBox

public class List
extends CaptionedComponent

List class is a list selection component.

Since:
MDK1.0a

Field Summary
 short index
          The selected item's index.
 Vector items
          A vector containing the items of this list.
 
Fields inherited from class moka.x.Component
enabled, height, listen, mnemonic, next, parent, prev, visible, width, x, y
 
Fields inherited from interface moka.x.Captioned
caption, font
 
Constructor Summary
List()
          Constructs a new List.
 
Method Summary
 void clear()
          Disposes of all ressources used by this List's elements.
 void finalize()
          Frees the memory of system ressources used by this List object.
 Object getSelectedItem()
          Returns the item identified by the selected index.
 void paint()
          Paints the List.
 void setListData(Vector data)
          Use the items in the specified Vector as the data for this List.
 void update()
          Updates the display of the list.
 void use()
          This method is invoked by the GEM when the user interacts with the List.
 
Methods inherited from class moka.x.Component
bottom, center, checkMnemonic, clean, eventTriggered, isCursorOver, left, move, onPaint, right, setBounds, setEnabled, setHeight, setMnemonic, setVisible, setWidth, setX, setY, toFront, top
 
Methods inherited from class moka.event.EventListener
eventTriggered
 
Methods inherited from class moka.lang.Object
equals, getClassName, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface moka.x.Captioned
setCaption, setFont
 

Field Detail

items

public Vector items
A vector containing the items of this list. Should be only read.


index

public short index
The selected item's index. Should be only read.

Constructor Detail

List

public List()
Constructs a new List.

Method Detail

paint

public void paint()
Paints the List.

Overrides:
paint in class Component

finalize

public void finalize()
Frees the memory of system ressources used by this List object.

Overrides:
finalize in class CaptionedComponent

use

public void use()
This method is invoked by the GEM when the user interacts with the List.

Overrides:
use in class Component

getSelectedItem

public Object getSelectedItem()
Returns the item identified by the selected index.

Returns:
The item identified by the selected index

update

public void update()
Updates the display of the list.


setListData

public void setListData(Vector data)
Use the items in the specified Vector as the data for this List.

Parameters:
data - The Vector that contain the desired objects

clear

public void clear()
Disposes of all ressources used by this List's elements.

Since:
MDK1.01a