com.monica.javacom.interfaces
Interface MJCText

All Known Implementing Classes:
MJCSoftFont

public interface MJCText

Provides functionality for drawing fixed space text on the graphical display. This interface is also referenced as "text renderer" for the MJCVirtualDisplay.


Method Summary
 void drawChar(char c, int x, int y, java.awt.Color f, java.awt.Color b, java.awt.Graphics g)
          Draws the specified character (c) at the specified position (x,y: lower left corner) with the specified foregroung (f) and background (b) colors on the specified Graphics (g).
 int getHeight()
          Returns the charHeight of a single character.
 java.lang.String getTextName()
          Returns the MJC name of the MJCText.
 java.lang.String getTextVersion()
          Returns the MJC version of the MJCText.
 int getWidth()
          Returns the charWidth of a single character.
 void init(int sX, int sY, java.io.InputStream is)
          Initializes the MJCText by specifying charWith, charHeight and an InputStream for configuration processing.
 

Method Detail

getTextName

public java.lang.String getTextName()
Returns the MJC name of the MJCText.
Returns:
String: the MJC name of the MJCText

getTextVersion

public java.lang.String getTextVersion()
Returns the MJC version of the MJCText.
Returns:
String: the MJC version of the MJCText

init

public void init(int sX,
                 int sY,
                 java.io.InputStream is)
Initializes the MJCText by specifying charWith, charHeight and an InputStream for configuration processing.
Parameters:
int - sX: the charWith in pixels
int - sY: the charheight in pixels
InputStream - is: the configuration InputStream

getWidth

public int getWidth()
Returns the charWidth of a single character.
Returns:
int: the charWidth of a single characted

getHeight

public int getHeight()
Returns the charHeight of a single character.
Returns:
int: the charHeight of a single character

drawChar

public void drawChar(char c,
                     int x,
                     int y,
                     java.awt.Color f,
                     java.awt.Color b,
                     java.awt.Graphics g)
Draws the specified character (c) at the specified position (x,y: lower left corner) with the specified foregroung (f) and background (b) colors on the specified Graphics (g).
Parameters:
char - c: the char to be drawn
int - x: the left X coordinate of the char
int - y: the lower Y coordinate of the char
Color - f: the foreground color of the char
Color - b: the background color of the char
Graphics - g: the Graphics on that the char is drawn