|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jdraw.graphicobjects.GraphicObject | +--jdraw.graphicobjects.TextArea
A text area.
Field Summary | |
private int |
alignment
The position of the text from the position of this object (a constant from SwingConstants like CENTER , SOUTH_EAST , ...). |
private float |
ascent
The ascent of this text. |
private Rectangle |
bounding_box
The bounding box of this text. |
private static Cursor |
CURSOR
The mouse cursor for this object. |
private Font |
font
The font used to display the text. |
static String |
FRIENDLY_NAME
The friendly name of objects of this class. |
private String |
text
The text to be displayed. |
Fields inherited from class jdraw.graphicobjects.GraphicObject |
|
Constructor Summary | |
TextArea(int x,
int y,
Color color,
String text)
Creates a new TextArea with specified position, color, text and default font, centered on both axis. |
|
TextArea(int x,
int y,
Color color,
String text,
Font font)
Creates a new TextArea with specified position, color, text and font, centered on both axis. |
|
TextArea(int x,
int y,
Color color,
String text,
Font font,
int alignment)
Creates a new TextArea with specified position, color, text, font and alignment. |
|
TextArea(int x,
int y,
Color color,
String text,
int alignment)
Creates a new TextArea with specified position, color, text, alignment and default font. |
Method Summary | |
int |
getAligment()
Returns the position of the text from the position of this object (a constant from SwingConstants like CENTER , SOUTH_EAST , ...). |
Rectangle |
getBoundingBox()
Returns the bounding box of this text area. |
Cursor |
getCursor()
Returns the mouse cursor for this object. |
int |
getDistanceSq(Point point)
Returns the square of the minimal distance between this text area and the specified point. |
Font |
getFont()
Returns the font used to display the text. |
String |
getFontName()
Returns name of the font used to display the text. |
int |
getFontSize()
Returns the size of the font used to display the text. |
int |
getFontStyle()
Returns the style of the font used to display the text. |
String |
getFriendlyName()
Returns the friendly name of this text area. |
String |
getText()
Returns the text to be displayed. |
void |
paint(Graphics g)
Paints this text area. |
Methods inherited from class jdraw.graphicobjects.GraphicObject |
getColor, getDistance, getDistanceSq, getDistanceSq, getX, getY, updateCachedData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String FRIENDLY_NAME
private static final Cursor CURSOR
private String text
private Font font
private int alignment
SwingConstants
like CENTER
, SOUTH_EAST
, ...).
private final Rectangle bounding_box
private float ascent
Constructor Detail |
public TextArea(int x, int y, Color color, String text)
TextArea
with specified position, color, text and default font, centered on both axis.
public TextArea(int x, int y, Color color, String text, int alignment)
TextArea
with specified position, color, text, alignment and default font.
public TextArea(int x, int y, Color color, String text, Font font)
TextArea
with specified position, color, text and font, centered on both axis.
public TextArea(int x, int y, Color color, String text, Font font, int alignment)
TextArea
with specified position, color, text, font and alignment.
Method Detail |
public Rectangle getBoundingBox()
getBoundingBox
in class GraphicObject
public Cursor getCursor()
getCursor
in class GraphicObject
public String getFriendlyName()
getFriendlyName
in class GraphicObject
public void paint(Graphics g)
paint
in class GraphicObject
public int getDistanceSq(Point point)
getDistanceSq
in class GraphicObject
public Font getFont()
public String getFontName()
public int getFontSize()
public int getFontStyle()
public String getText()
public int getAligment()
SwingConstants
like CENTER
, SOUTH_EAST
, ...).
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |