Methods Summary |
---|
public int | getBackgroundColor()Get the color of font currently being displayed.
return bgcolor;
|
public int | getFace()Get the face of font currently being displayed.
return face;
|
public int | getForegroundColor()Get the color of font currently being displayed.
return fgcolor;
|
public int | getSize()Get the size of font currently being displayed.
return size;
|
public int | getStyle()Get the style of font currently being displayed.
return style;
|
protected void | paint(Graphics g)Paint the canvas with the current color and controls to change it.
int w = getWidth();
int h = getHeight();
// Fill the background
g.setColor(bgcolor);
g.fillRect(0, 0, w, h);
g.setColor(fgcolor);
Font font = Font.getFont(face, style, size);
g.setFont(font);
g.drawString(text, 2, border, Graphics.LEFT|Graphics.TOP);
|
public void | setBackgroundColor(int color)Set the Color of font to display.
bgcolor = color;
|
public void | setFace(int face)Set the Face of font to display.
this.face = face;
|
public void | setForegroundColor(int color)Set the Color of font to display.
fgcolor = color;
|
public void | setSize(int size)Set the Size of font to display.
this.size = size;
|
public void | setStyle(int style)Set the Style of font to display.
this.style = style;
|