Class DragText
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----DragCanvas
|
+----DragText
- class DragText
- extends DragCanvas
-
Bold
-
-
Centered
-
-
Italic
-
-
Multiline
-
-
Shaded
-
-
Size
-
-
Text
-
-
TextColor
-
-
textFont
-
-
DragText(String, int, int, int, Color)
- construct a text (s) at position (x,y) of size(sis) and color(c)
-
Intersects(int, int)
- point(x,y) intersects current object?
-
paint(Graphics)
- paint text, for shaded, simply paint twice with a displacement
-
paintText(Graphics, String, int, int, int, boolean)
- calculate line width, etc, paint line by line if needed - nothing exciting ...
-
setBold(boolean)
-
-
setCentered(boolean)
-
-
setColor(Color)
-
-
setItalic(boolean)
-
-
setMultiline(boolean)
-
-
setShaded(boolean)
-
-
setText(String)
-
-
setWidth(int)
-
-
updateFont()
-
Size
private int Size
TextColor
private Color TextColor
Text
private String Text
Multiline
private boolean Multiline
Centered
private boolean Centered
Shaded
private boolean Shaded
Italic
private boolean Italic
Bold
private boolean Bold
textFont
private Font textFont
DragText
DragText(String s,
int x,
int y,
int sis,
Color c)
- construct a text (s) at position (x,y) of size(sis) and color(c)
setColor
public void setColor(Color c)
setShaded
public void setShaded(boolean Value)
setBold
public void setBold(boolean Value)
setItalic
public void setItalic(boolean Value)
setMultiline
public void setMultiline(boolean Value)
setCentered
public void setCentered(boolean Value)
setWidth
public void setWidth(int iWidth)
setText
public void setText(String Value)
Intersects
public boolean Intersects(int x,
int y)
- point(x,y) intersects current object?
- Overrides:
- Intersects in class DragCanvas
updateFont
protected void updateFont()
paint
public void paint(Graphics g)
- paint text, for shaded, simply paint twice with a displacement
- Overrides:
- paint in class DragCanvas
paintText
public void paintText(Graphics g,
String s,
int x,
int y,
int w,
boolean center)
- calculate line width, etc, paint line by line if needed - nothing exciting ...