net.sourceforge.mewt.iform
Class IFormCustomItem

java.lang.Object
  extended by javax.microedition.lcdui.Item
      extended by javax.microedition.lcdui.CustomItem
          extended by net.sourceforge.mewt.iform.IFormCustomItem

public class IFormCustomItem
extends javax.microedition.lcdui.CustomItem

This class is for embedding the IForm onto existing form items, and thus subclasses CustomItem. Warning : For some unknown reason it will not work on Blackberries, and one of the other IForms must be used instead.


Field Summary
 
Fields inherited from class javax.microedition.lcdui.Item
BUTTON, HYPERLINK, LAYOUT_2, LAYOUT_BOTTOM, LAYOUT_CENTER, LAYOUT_DEFAULT, LAYOUT_EXPAND, LAYOUT_LEFT, LAYOUT_NEWLINE_AFTER, LAYOUT_NEWLINE_BEFORE, LAYOUT_RIGHT, LAYOUT_SHRINK, LAYOUT_TOP, LAYOUT_VCENTER, LAYOUT_VEXPAND, LAYOUT_VSHRINK, PLAIN
 
Constructor Summary
IFormCustomItem(int w, int h)
          Instantiates a new i form custom item.
IFormCustomItem(int r, int c, int w, int h)
          Instantiates a new i form custom item.
 
Method Summary
 ImageButton addItem(ImageButton newItem)
          Adds the item.
 ImageButton addItem(java.lang.String label, java.lang.String imageRes)
          Adds the item.
 void addPopperListener(IFormListener pl)
          Adds the popper listener.
 void dispose()
          Dispose.
 int getBackground()
          Gets the background.
 int getCols()
          Gets the cols.
 int getForeground()
          Gets the foreground.
 int getRows()
          Gets the rows.
 ImageButton getSelected()
          Gets the selected.
 int getSelectedIndex()
          Gets the selected index.
 void removeAll()
          Removes the all.
 void setBackground(int background)
          Sets the background.
 void setCols(int cols)
          Sets the cols.
 void setForeground(int foreground)
          Sets the foreground.
 void setRows(int rows)
          Sets the rows.
 void setSelectedIndex(int index)
          Sets the selected index.
 
Methods inherited from class javax.microedition.lcdui.CustomItem
getGameAction
 
Methods inherited from class javax.microedition.lcdui.Item
addCommand, getLabel, getLayout, getMinimumHeight, getMinimumWidth, getPreferredHeight, getPreferredWidth, notifyStateChanged, removeCommand, setDefaultCommand, setItemCommandListener, setLabel, setLayout, setPreferredSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IFormCustomItem

public IFormCustomItem(int w,
                       int h)
Instantiates a new i form custom item.

Parameters:
w - the w
h - the h

IFormCustomItem

public IFormCustomItem(int r,
                       int c,
                       int w,
                       int h)
Instantiates a new i form custom item.

Parameters:
r - the r
c - the c
w - the w
h - the h
Method Detail

addPopperListener

public void addPopperListener(IFormListener pl)
Adds the popper listener.

Parameters:
pl - the pl

addItem

public ImageButton addItem(java.lang.String label,
                           java.lang.String imageRes)
Adds the item.

Parameters:
label - the label
imageRes - the image res
Returns:
the image button

addItem

public ImageButton addItem(ImageButton newItem)
Adds the item.

Parameters:
newItem - the new item
Returns:
the image button

getSelectedIndex

public int getSelectedIndex()
Gets the selected index.

Returns:
the selected index

getSelected

public ImageButton getSelected()
Gets the selected.

Returns:
the selected

setSelectedIndex

public void setSelectedIndex(int index)
Sets the selected index.

Parameters:
index - the new selected index

removeAll

public void removeAll()
Removes the all.


dispose

public void dispose()
Dispose.


getForeground

public int getForeground()
Gets the foreground.

Returns:
the foreground

setForeground

public void setForeground(int foreground)
Sets the foreground.

Parameters:
foreground - the new foreground

getBackground

public int getBackground()
Gets the background.

Returns:
the background

setBackground

public void setBackground(int background)
Sets the background.

Parameters:
background - the new background

getRows

public int getRows()
Gets the rows.

Returns:
the rows

setRows

public void setRows(int rows)
Sets the rows.

Parameters:
rows - the new rows

getCols

public int getCols()
Gets the cols.

Returns:
the cols

setCols

public void setCols(int cols)
Sets the cols.

Parameters:
cols - the new cols