background, foreground, height, width, x, y
Constructor and Description |
---|
GraphView.CustomString(java.lang.String string,
int x,
int y)
Creates a new custom string.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(java.awt.Graphics2D g)
Draws the object.
|
java.lang.String |
getString()
Gets the string that is painted.
|
void |
setString(java.lang.String string)
Sets the string that should be painted.
|
getBackground, getForeground, getHeight, getWidth, getX, getY, setBackground, setForeground, setHeight, setWidth, setX, setY
public GraphView.CustomString(java.lang.String string, int x, int y) throws java.lang.IllegalArgumentException
string
- the stringx
- the x position of the string in the graphy
- the y position of the string in the graphjava.lang.IllegalArgumentException
- public java.lang.String getString()
public void setString(java.lang.String string) throws java.lang.IllegalArgumentException
string
- the stringjava.lang.IllegalArgumentException
- public void draw(java.awt.Graphics2D g)
GraphView.CustomObject
draw
in class GraphView.CustomObject
g
- the graphics context