All Packages Class Hierarchy This Package Previous Next Index
Class cs101.canvas.Text
java.lang.Object
|
+----cs101.canvas.GraphicsObject
|
+----cs101.canvas.Text
- public class Text
- extends GraphicsObject
A GraphicsObject that represents ordinary text
-
defaultFont
-
-
Text(int, int, Font, String)
- Constructs a Text
-
Text(int, int, Font, String, Color)
- Constructs a Text
-
Text(int, int, String)
- Constructs a Text
-
Text(int, int, String, Color)
- Constructs a Text
-
draw(Graphics)
-
-
toString()
-
defaultFont
public static Font defaultFont
Text
public Text(int x,
int y,
String string)
- Constructs a Text
- Parameters:
- x - x coordinate of the left side
- y - y coordinate of the top side
- string - string to be printed
- Returns:
- none
Text
public Text(int x,
int y,
String string,
Color graphicsColor)
- Constructs a Text
- Parameters:
- x - x coordinate of the left side
- y - y coordinate of the top side
- string - string to be printed
- graphicsColor - color of the string
- Returns:
- none
Text
public Text(int x,
int y,
Font font,
String string)
- Constructs a Text
- Parameters:
- x - x coordinate of the left side
- y - y coordinate of the top side
- font - font of the string
- string - string to be printed
- Returns:
- none
Text
public Text(int x,
int y,
Font font,
String string,
Color graphicsColor)
- Constructs a Text
- Parameters:
- x - x coordinate of the left side
- y - y coordinate of the top side
- font - font of the string
- string - string to be printed
- graphicsColor - color of the string
- Returns:
- none
draw
public void draw(Graphics g)
- Overrides:
- draw in class GraphicsObject
toString
public String toString()
- Overrides:
- toString in class GraphicsObject
All Packages Class Hierarchy This Package Previous Next Index