net.sourceforge.mewt.iform
Class IFormCommon

java.lang.Object
  extended by net.sourceforge.mewt.iform.IFormCommon
All Implemented Interfaces:
Themeable

public class IFormCommon
extends java.lang.Object
implements Themeable

The Class IFormCommon.


Constructor Summary
IFormCommon(int w, int h)
          Instantiates a new i form common.
IFormCommon(int r, int c, int w, int h)
          Instantiates a new i form common.
 
Method Summary
 ImageButton addItem(ImageButton newItem)
          Adds the item.
 TextButton addItem(java.lang.String label, java.lang.String imageRes)
          Adds the item.
 void addPopperListener(IFormListener pl)
          Adds the popper listener.
 void applyTheme(Theme t)
          Apply theme.
 void dispose()
          Dispose.
 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 getButtonStyle()
          Gets the button style.
 int getCols()
          Gets the cols.
 int getForeground()
          Gets the foreground.
 int getHeight()
          Gets the height.
 int getRows()
          Gets the rows.
 ImageButton getSelected()
          Gets the selected.
 int getSelectedBackground()
          Gets the selected background.
 int getSelectedForeground()
          Gets the selected foreground.
 int getSelectedIndex()
          Gets the selected index.
 int getTitleBackground()
          Gets the title background.
 int getTitleForeground()
          Gets the title foreground.
 int getWidth()
          Gets the width.
 boolean isStretchIcon()
          Checks if is stretch icon.
 void paintControl(javax.microedition.lcdui.Graphics gc, int width, int height)
          Paint control.
 void processGameAction(int gameAction)
          Process game action.
 void removeAll()
          Removes the all.
 void setBackground(int background)
          Sets the background.
 void setBorder1(int highLight1)
          Sets the border1.
 void setBorder2(int highLight2)
          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 setButtonStyle(int buttonStyle)
          Sets the button style.
 void setCols(int cols)
          Sets the cols.
 void setForeground(int foreground)
          Sets the foreground.
 void setHeight(int height)
          Sets the height.
 void setRows(int rows)
          Sets the rows.
 void setSelectedBackground(int selectedBackground)
          Sets the selected background.
 void setSelectedForeground(int selectedForeground)
          Sets the selected foreground.
 void setSelectedIndex(int index)
          Sets the selected index.
 void setStretchIcon(boolean stretchIcon)
          Sets the stretch icon.
 void setTitleBackground(int titleBackground)
          Sets the title background.
 void setTitleForeground(int titleForeground)
          Sets the title foreground.
 void setWidth(int width)
          Sets the width.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IFormCommon

public IFormCommon(int w,
                   int h)
Instantiates a new i form common.

Parameters:
w - the w
h - the h

IFormCommon

public IFormCommon(int r,
                   int c,
                   int w,
                   int h)
Instantiates a new i form common.

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 TextButton addItem(java.lang.String label,
                          java.lang.String imageRes)
Adds the item.

Parameters:
label - the label
imageRes - the image res
Returns:
the text 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.


processGameAction

public void processGameAction(int gameAction)
Process game action.

Parameters:
gameAction - the game action

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

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

getWidth

public int getWidth()
Gets the width.

Returns:
the width

setWidth

public void setWidth(int width)
Sets the width.

Parameters:
width - the new width

getHeight

public int getHeight()
Gets the height.

Returns:
the height

setHeight

public void setHeight(int height)
Sets the height.

Parameters:
height - the new height

paintControl

public void paintControl(javax.microedition.lcdui.Graphics gc,
                         int width,
                         int height)
Paint control.

Parameters:
gc - the gc
width - the width
height - the height

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 highLight1)
Description copied from interface: Themeable
Sets the border1.

Specified by:
setBorder1 in interface Themeable
Parameters:
highLight1 - 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 highLight2)
Description copied from interface: Themeable
Sets the border2.

Specified by:
setBorder2 in interface Themeable
Parameters:
highLight2 - 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

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

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

isStretchIcon

public boolean isStretchIcon()
Checks if is stretch icon.

Returns:
true, if is stretch icon

setStretchIcon

public void setStretchIcon(boolean stretchIcon)
Sets the stretch icon.

Parameters:
stretchIcon - the new stretch icon

getButtonStyle

public int getButtonStyle()
Gets the button style.

Returns:
the button style

setButtonStyle

public void setButtonStyle(int buttonStyle)
Sets the button style.

Parameters:
buttonStyle - the new button style