javax.microedition.lcdui
Class Item

java.lang.Object
  extended by javax.microedition.lcdui.Item
Direct Known Subclasses:
ChoiceGroup, Gauge, Spacer, StringItem, TextField

public abstract class Item
extends Object

Author:
Andre Nijholt

Field Summary
protected  ItemCommandListener cmdListener
           
protected  ArrayList<Command> commands
           
protected  boolean interactive
           
protected  String label
           
protected  int minHeight
           
protected  int minWidth
           
protected  int prefHeight
           
protected  int prefWidth
           
 
Constructor Summary
Item()
           
 
Method Summary
 void addCommand(Command cmd)
           
 String getLabel()
           
 int getMinimumHeight()
           
 int getMinimumWidth()
           
 boolean getPaintRequest()
           
 int getPreferredHeight()
           
 int getPreferredWidth()
           
protected  void hideNotify()
           
 boolean isInteractive()
           
protected  void keyPressed(int keyCode)
           
protected  void keyReleased(int keyCode)
           
 void notifyStateChanged()
           
protected abstract  void paint(Graphics g, int x, int y, int w, int h, boolean selected)
           
 void removeCommand(Command cmd)
           
protected  void repaint()
           
 void setItemCommandListener(ItemCommandListener l)
           
 void setPreferredSize(int width, int height)
           
protected  void showNotify()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

label

protected String label

minWidth

protected int minWidth

minHeight

protected int minHeight

prefWidth

protected int prefWidth

prefHeight

protected int prefHeight

interactive

protected boolean interactive

cmdListener

protected ItemCommandListener cmdListener

commands

protected ArrayList<Command> commands
Constructor Detail

Item

public Item()
Method Detail

getLabel

public String getLabel()

getMinimumHeight

public int getMinimumHeight()

getMinimumWidth

public int getMinimumWidth()

getPreferredHeight

public int getPreferredHeight()

getPreferredWidth

public int getPreferredWidth()

setPreferredSize

public void setPreferredSize(int width,
                             int height)

isInteractive

public boolean isInteractive()

notifyStateChanged

public void notifyStateChanged()

addCommand

public void addCommand(Command cmd)

removeCommand

public void removeCommand(Command cmd)

setItemCommandListener

public void setItemCommandListener(ItemCommandListener l)

getPaintRequest

public boolean getPaintRequest()

repaint

protected void repaint()

keyPressed

protected void keyPressed(int keyCode)

keyReleased

protected void keyReleased(int keyCode)

showNotify

protected void showNotify()

hideNotify

protected void hideNotify()

paint

protected abstract void paint(Graphics g,
                              int x,
                              int y,
                              int w,
                              int h,
                              boolean selected)