net.sourceforge.mewt
Class DefaultForm

java.lang.Object
  extended by javax.microedition.lcdui.Displayable
      extended by javax.microedition.lcdui.Screen
          extended by javax.microedition.lcdui.Form
              extended by net.sourceforge.mewt.DefaultForm
All Implemented Interfaces:
java.lang.Runnable, javax.microedition.lcdui.CommandListener, Themeable
Direct Known Subclasses:
ListForm, Settings, TableForm, TreeForm

public abstract class DefaultForm
extends javax.microedition.lcdui.Form
implements Themeable, javax.microedition.lcdui.CommandListener, java.lang.Runnable

The Class DefaultForm.


Constructor Summary
DefaultForm(java.lang.String arg0, javax.microedition.lcdui.Display d, javax.microedition.lcdui.Displayable parent)
          Instantiates a new default form.
 
Method Summary
 void applyTheme(Theme theme)
          Apply theme.
abstract  void cancelEdit()
          Cancel edit.
 void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable s)
           
 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.Display getParentDisplay()
          Gets the parent display.
 javax.microedition.lcdui.Displayable getParentForm()
          Gets the parent form.
 int getSelectedBackground()
          Gets the selected background.
 int getSelectedForeground()
          Gets the selected foreground.
 int getTitleBackground()
          Gets the title background.
 int getTitleForeground()
          Gets the title foreground.
abstract  void run()
           
 void setBackground(int background)
          Sets the background.
 void setBorder1(int border1)
          Sets the border1.
 void setBorder2(int border2)
          Sets the border2.
 void setButtonBgDark(int buttonBgDark)
          Sets the button bg dark.
 void setButtonBgLight(int buttonBgLight)
          Sets the button bg light.
 void setButtonSelDark(int buttonSelDark)
          Sets the button sel dark.
 void setButtonSelLight(int buttonSelLight)
          Sets the button sel light.
 void setForeground(int foreground)
          Sets the foreground.
 void setParentDisplay(javax.microedition.lcdui.Display display)
          Sets the parent display.
 void setParentForm(javax.microedition.lcdui.Displayable parentForm)
          Sets the parent form.
 void setSelectedBackground(int selectedBackground)
          Sets the selected background.
 void setSelectedForeground(int selectedForeground)
          Sets the selected foreground.
 void setTitleBackground(int titleBackground)
          Sets the title background.
 void setTitleForeground(int titleForeground)
          Sets the title foreground.
 void synchroniseChanges()
          Synchronise changes.
 
Methods inherited from class javax.microedition.lcdui.Form
append, append, append, delete, deleteAll, get, getHeight, getWidth, insert, set, setItemStateListener, size
 
Methods inherited from class javax.microedition.lcdui.Displayable
addCommand, getTicker, getTitle, isShown, removeCommand, setCommandListener, setTicker, setTitle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultForm

public DefaultForm(java.lang.String arg0,
                   javax.microedition.lcdui.Display d,
                   javax.microedition.lcdui.Displayable parent)
Instantiates a new default form.

Parameters:
arg0 - the arg0
d - the d
parent - the parent
Method Detail

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

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

setButtonBgLight

public void setButtonBgLight(int buttonBgLight)
Sets the button bg light.

Parameters:
buttonBgLight - the new button bg light

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

setButtonBgDark

public void setButtonBgDark(int buttonBgDark)
Sets the button bg dark.

Parameters:
buttonBgDark - the new button bg 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

setButtonSelLight

public void setButtonSelLight(int buttonSelLight)
Sets the button sel light.

Parameters:
buttonSelLight - the new button sel 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

setButtonSelDark

public void setButtonSelDark(int buttonSelDark)
Sets the button sel dark.

Parameters:
buttonSelDark - the new button sel dark

getBorder1

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

Specified by:
getBorder1 in interface Themeable
Returns:
the border1

setBorder1

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

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

getBorder2

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

Specified by:
getBorder2 in interface Themeable
Returns:
the border2

setBorder2

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

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

getTitleForeground

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

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

setTitleForeground

public void setTitleForeground(int titleForeground)
Sets the title foreground.

Parameters:
titleForeground - the new title foreground

getTitleBackground

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

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

setTitleBackground

public void setTitleBackground(int titleBackground)
Sets the title background.

Parameters:
titleBackground - the new title background

cancelEdit

public abstract void cancelEdit()
Cancel edit.


commandAction

public void commandAction(javax.microedition.lcdui.Command c,
                          javax.microedition.lcdui.Displayable s)
Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener

getParentDisplay

public javax.microedition.lcdui.Display getParentDisplay()
Gets the parent display.

Returns:
the parent display

setParentDisplay

public void setParentDisplay(javax.microedition.lcdui.Display display)
Sets the parent display.

Parameters:
display - the new parent display

getParentForm

public javax.microedition.lcdui.Displayable getParentForm()
Gets the parent form.

Returns:
the parent form

setParentForm

public void setParentForm(javax.microedition.lcdui.Displayable parentForm)
Sets the parent form.

Parameters:
parentForm - the new parent form

run

public abstract void run()
Specified by:
run in interface java.lang.Runnable

synchroniseChanges

public void synchroniseChanges()
Synchronise changes.


applyTheme

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

Specified by:
applyTheme in interface Themeable
Parameters:
theme - 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

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 selectedBackground)
Description copied from interface: Themeable
Sets the selected background.

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