org.netbeans.microedition.lcdui.laf
Class DefaultColorSchema

java.lang.Object
  extended by org.netbeans.microedition.lcdui.laf.ColorSchema
      extended by org.netbeans.microedition.lcdui.laf.DefaultColorSchema

public class DefaultColorSchema
extends ColorSchema


Constructor Summary
DefaultColorSchema()
           
 
Method Summary
 javax.microedition.lcdui.Image getBackgroundImage()
          Returns image which should be used as a background.
 int getBackgroundImageAnchorPoint()
          Gets anchor of the background image.
 int getColor(int aColorSpecifier)
          Gets color based on color specifier.
 boolean isBackgroundImageTiled()
          If true, background image should be drawn in tiled.
 boolean isBackgroundTransparent()
          If true the background is transparent.
 void setBGColor(int color)
           
 void setFGColor(int color)
           
 
Methods inherited from class org.netbeans.microedition.lcdui.laf.ColorSchema
paintBackground
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultColorSchema

public DefaultColorSchema()
Method Detail

getColor

public int getColor(int aColorSpecifier)
Description copied from class: ColorSchema
Gets color based on color specifier. The color specifer corresponds to values listed in Display class.

Specified by:
getColor in class ColorSchema
Parameters:
aColorSpecifier - - color specifier from Display.COLOR* constnants
Returns:
color to be used for given specifier
See Also:
Display

getBackgroundImage

public javax.microedition.lcdui.Image getBackgroundImage()
Description copied from class: ColorSchema
Returns image which should be used as a background.

Specified by:
getBackgroundImage in class ColorSchema
Returns:
Image to be drawn. If null is returned, no image will be drawn on background

getBackgroundImageAnchorPoint

public int getBackgroundImageAnchorPoint()
Description copied from class: ColorSchema
Gets anchor of the background image. See Graphics class for details

Specified by:
getBackgroundImageAnchorPoint in class ColorSchema
Returns:
anchor where the image should be drawn. Might retun 0 if no image is used or if the image is going to be tiled.
See Also:
Graphics

isBackgroundImageTiled

public boolean isBackgroundImageTiled()
Description copied from class: ColorSchema
If true, background image should be drawn in tiled. Usefull when using simple patterns to draw background.

Specified by:
isBackgroundImageTiled in class ColorSchema
Returns:
true when the background image should be tiled, false if just one image should be drawn based on suggestion of position by getBackgroundImageAnchorPoint() method

isBackgroundTransparent

public boolean isBackgroundTransparent()
Description copied from class: ColorSchema
If true the background is transparent. This is helpful for some devices, for example when drawing custom items on Nokia Seris 40 feature pack 1, the background does not have to be erased and the custom item looks much better when transparent

Specified by:
isBackgroundTransparent in class ColorSchema
Returns:
true when the background should be transparent, false otherwise

setFGColor

public void setFGColor(int color)

setBGColor

public void setBGColor(int color)