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


Variable Index

 o defaultFont

Constructor Index

 o Text(int, int, Font, String)
Constructs a Text
 o Text(int, int, Font, String, Color)
Constructs a Text
 o Text(int, int, String)
Constructs a Text
 o Text(int, int, String, Color)
Constructs a Text

Method Index

 o draw(Graphics)
 o toString()

Variables

 o defaultFont
 public static Font defaultFont

Constructors

 o 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
 o 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
 o 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
 o 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

Methods

 o draw
 public void draw(Graphics g)
Overrides:
draw in class GraphicsObject
 o toString
 public String toString()
Overrides:
toString in class GraphicsObject

All Packages  Class Hierarchy  This Package  Previous  Next  Index