org.netbeans.microedition.lcdui.laf
Class UserColorSchema

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

public class UserColorSchema
extends ColorSchema

A color schema, which can hold user color values. When using this implementation, please note you have to manually repaint the shown component when the color is changed. There is no event model which could inform the component about the change.


Constructor Summary
UserColorSchema()
          Creates a new instance of UserColorSchema
 
Method Summary
 javax.microedition.lcdui.Image getBackgroundImage()
          Gets background image.
 int getBackgroundImageAnchorPoint()
          Gets anchor point for the background image.
 int getColor(int aColorSpecifier)
          Gets color based on color specifier.
 boolean isBackgroundImageTiled()
          Should be background image used as a tiled background.
 boolean isBackgroundTransparent()
          Should be the background transparent? For details see definition in parent class.
 void setBackgroundImage(javax.microedition.lcdui.Image backgroundImage)
          Sets background image to schema
 void setBackgroundImageAnchorPoint(int anchorPoint)
          Sets anchor point for background image.
 void setBackgroundImageTiled(boolean tiled)
          Sets the fact whether the background image should be tiled or not
 void setBackgroundTransparent(boolean transparent)
          Sets the fact whether the background should be transparent
 void setBGColor(int color)
           
 void setColor(int aColorSpecifier, int color)
          Sets color to user color schema
 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

UserColorSchema

public UserColorSchema()
Creates a new instance of UserColorSchema

Method Detail

setColor

public void setColor(int aColorSpecifier,
                     int color)
Sets color to user color schema

Parameters:
aColorSpecifier - - color specifier from Display.COLOR* values
color - - color to be used for given specified

getColor

public int getColor(int aColorSpecifier)
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* constants
Returns:
color to be used for given specifier. If a wrong specified is specified or the instance does not have given color defined, it returns -1
See Also:
Display

setBackgroundImage

public void setBackgroundImage(javax.microedition.lcdui.Image backgroundImage)
Sets background image to schema

Parameters:
backgroundImage - background image

getBackgroundImage

public javax.microedition.lcdui.Image getBackgroundImage()
Gets background image.

Specified by:
getBackgroundImage in class ColorSchema
Returns:
background image, by default returns null, no image is defined.

setBackgroundImageAnchorPoint

public void setBackgroundImageAnchorPoint(int anchorPoint)
Sets anchor point for background image. The anchor point is based on anchor values from Graphics class

Parameters:
anchorPoint - - an anchor point

getBackgroundImageAnchorPoint

public int getBackgroundImageAnchorPoint()
Gets anchor point for the background image. For details see parent method

Specified by:
getBackgroundImageAnchorPoint in class ColorSchema
Returns:
anchor point
See Also:
Graphics

setBackgroundImageTiled

public void setBackgroundImageTiled(boolean tiled)
Sets the fact whether the background image should be tiled or not

Parameters:
tiled - if true, the image should be tiled, false otherwise

isBackgroundImageTiled

public boolean isBackgroundImageTiled()
Should be background image used as a tiled background. For details see parent class.

Specified by:
isBackgroundImageTiled in class ColorSchema
Returns:
true of the background image should be tiled, false otherwise. The default value is false.

setBackgroundTransparent

public void setBackgroundTransparent(boolean transparent)
Sets the fact whether the background should be transparent

Parameters:
transparent - - if true, the background should be transparent, false otherwise

isBackgroundTransparent

public boolean isBackgroundTransparent()
Should be the background transparent? For details see definition in parent class.

Specified by:
isBackgroundTransparent in class ColorSchema
Returns:
true if the background should be transparent, false otherwise. The default value is false.

setFGColor

public void setFGColor(int color)

setBGColor

public void setBGColor(int color)