net.sourceforge.mewt.tree
Class Tree

java.lang.Object
  extended by javax.microedition.lcdui.Item
      extended by javax.microedition.lcdui.CustomItem
          extended by net.sourceforge.mewt.tree.Tree
All Implemented Interfaces:
Themeable

public class Tree
extends javax.microedition.lcdui.CustomItem
implements Themeable

The Class Tree.


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
Tree(javax.microedition.lcdui.Form parent, java.lang.String rootName)
          Instantiates a new tree.
 
Method Summary
 void addTreeListener(TreeListener tl)
          Adds the tree listener.
 void applyTheme(Theme t)
          Apply theme.
 int getBackground()
          Gets the background.
 int getBorder1()
          Gets the border1.
 int getBorder2()
          Gets the border2.
 int getButtonBgDark()
          Gets the button bg dark.
 int getButtonBgLight()
          Gets the button bg light.
 int getButtonSelDark()
          Gets the button sel dark.
 int getButtonSelLight()
          Gets the button sel light.
 int getForeground()
          Gets the foreground.
 javax.microedition.lcdui.Image getLeafImage()
          Gets the leaf image.
 javax.microedition.lcdui.Image getNodeClosedImage()
          Gets the node closed image.
 javax.microedition.lcdui.Image getNodeOpenImage()
          Gets the node open image.
 Node getRoot()
          Gets the root.
 int getSelectedBackground()
          Gets the selected background.
 int getSelectedForeground()
          Gets the selected foreground.
 Node getSelectedNode()
          Gets the selected node.
 int getTitleBackground()
          Gets the title background.
 int getTitleForeground()
          Gets the title foreground.
 void keyPressed(int key)
           
 void notifyLayout()
          Notify layout.
 void removeTreeListener(TreeListener tl)
          Removes the tree listener.
 void setBackground(int background)
          Sets the background.
 void setBorder1(int c)
          Sets the border1.
 void setBorder2(int c)
          Sets the border2.
 void setForeground(int foreground)
          Sets the foreground.
 void setLeafImage(javax.microedition.lcdui.Image leafImage)
          Sets the leaf image.
 void setNodeClosedImage(javax.microedition.lcdui.Image nodeClosedImage)
          Sets the node closed image.
 void setNodeOpenImage(javax.microedition.lcdui.Image nodeOpenImage)
          Sets the node open image.
 void setSelectedBackground(int selectColor)
          Sets the selected background.
 void setSelectedForeground(int selectedForeground)
          Sets the selected foreground.
 
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

Tree

public Tree(javax.microedition.lcdui.Form parent,
            java.lang.String rootName)
Instantiates a new tree.

Parameters:
parent - the parent
rootName - the root name
Method Detail

notifyLayout

public void notifyLayout()
Notify layout.


getRoot

public Node getRoot()
Gets the root.

Returns:
the root

getSelectedBackground

public int getSelectedBackground()
Description copied from interface: Themeable
Gets the selected background.

Specified by:
getSelectedBackground in interface Themeable
Returns:
the selected background

setSelectedBackground

public void setSelectedBackground(int selectColor)
Description copied from interface: Themeable
Sets the selected background.

Specified by:
setSelectedBackground in interface Themeable
Parameters:
selectColor - the new selected background

getSelectedNode

public Node getSelectedNode()
Gets the selected node.

Returns:
the selected node

keyPressed

public void keyPressed(int key)
Overrides:
keyPressed in class javax.microedition.lcdui.CustomItem

addTreeListener

public void addTreeListener(TreeListener tl)
Adds the tree listener.

Parameters:
tl - the tl

removeTreeListener

public void removeTreeListener(TreeListener tl)
Removes the tree listener.

Parameters:
tl - the tl

getForeground

public int getForeground()
Description copied from interface: Themeable
Gets the foreground.

Specified by:
getForeground in interface Themeable
Returns:
the foreground

setForeground

public void setForeground(int foreground)
Description copied from interface: Themeable
Sets the foreground.

Specified by:
setForeground in interface Themeable
Parameters:
foreground - the new foreground

getBackground

public int getBackground()
Description copied from interface: Themeable
Gets the background.

Specified by:
getBackground in interface Themeable
Returns:
the background

setBackground

public void setBackground(int background)
Description copied from interface: Themeable
Sets the background.

Specified by:
setBackground in interface Themeable
Parameters:
background - the new background

applyTheme

public void applyTheme(Theme t)
Description copied from interface: Themeable
Apply theme.

Specified by:
applyTheme in interface Themeable
Parameters:
t - the t

getSelectedForeground

public int getSelectedForeground()
Description copied from interface: Themeable
Gets the selected foreground.

Specified by:
getSelectedForeground in interface Themeable
Returns:
the selected foreground

setSelectedForeground

public void setSelectedForeground(int selectedForeground)
Description copied from interface: Themeable
Sets the selected foreground.

Specified by:
setSelectedForeground in interface Themeable
Parameters:
selectedForeground - the new selected foreground

getLeafImage

public javax.microedition.lcdui.Image getLeafImage()
Gets the leaf image.

Returns:
the leaf image

setLeafImage

public void setLeafImage(javax.microedition.lcdui.Image leafImage)
Sets the leaf image.

Parameters:
leafImage - the new leaf image

getNodeOpenImage

public javax.microedition.lcdui.Image getNodeOpenImage()
Gets the node open image.

Returns:
the node open image

setNodeOpenImage

public void setNodeOpenImage(javax.microedition.lcdui.Image nodeOpenImage)
Sets the node open image.

Parameters:
nodeOpenImage - the new node open image

getNodeClosedImage

public javax.microedition.lcdui.Image getNodeClosedImage()
Gets the node closed image.

Returns:
the node closed image

setNodeClosedImage

public void setNodeClosedImage(javax.microedition.lcdui.Image nodeClosedImage)
Sets the node closed image.

Parameters:
nodeClosedImage - the new node closed image

getBorder1

public int getBorder1()
Description copied from interface: Themeable
Gets the border1.

Specified by:
getBorder1 in interface Themeable
Returns:
the border1

getBorder2

public int getBorder2()
Description copied from interface: Themeable
Gets the border2.

Specified by:
getBorder2 in interface Themeable
Returns:
the border2

getButtonBgDark

public int getButtonBgDark()
Description copied from interface: Themeable
Gets the button bg dark.

Specified by:
getButtonBgDark in interface Themeable
Returns:
the button bg dark

getButtonBgLight

public int getButtonBgLight()
Description copied from interface: Themeable
Gets the button bg light.

Specified by:
getButtonBgLight in interface Themeable
Returns:
the button bg light

getButtonSelDark

public int getButtonSelDark()
Description copied from interface: Themeable
Gets the button sel dark.

Specified by:
getButtonSelDark in interface Themeable
Returns:
the button sel dark

getButtonSelLight

public int getButtonSelLight()
Description copied from interface: Themeable
Gets the button sel light.

Specified by:
getButtonSelLight in interface Themeable
Returns:
the button sel light

getTitleBackground

public int getTitleBackground()
Description copied from interface: Themeable
Gets the title background.

Specified by:
getTitleBackground in interface Themeable
Returns:
the title background

getTitleForeground

public int getTitleForeground()
Description copied from interface: Themeable
Gets the title foreground.

Specified by:
getTitleForeground in interface Themeable
Returns:
the title foreground

setBorder1

public void setBorder1(int c)
Description copied from interface: Themeable
Sets the border1.

Specified by:
setBorder1 in interface Themeable
Parameters:
c - the new border1

setBorder2

public void setBorder2(int c)
Description copied from interface: Themeable
Sets the border2.

Specified by:
setBorder2 in interface Themeable
Parameters:
c - the new border2