|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jdraw.graphicalobjects.GraphicalObject | +--jdraw.graphicalobjects.TextArea
A text area.
Field Summary | |
private static BufferedImage |
biDummyImage
A dummy buffered image used to obtain a graphic context. |
private static Cursor |
CURSOR
The mouse cursor for this object. |
private Font |
fntFont
The font used to display the text. |
static String |
FRIENDLYNAME
The friendly name of objects of this class. |
private int |
iAlignment
The position of the text from the position of this object (a constant from SwingConstants like CENTER , SOUTH_EAST , ...). |
private Rectangle |
rectBoundingBox
The bounding box of this text. |
private String |
strText
The text to be displayed. |
Fields inherited from class jdraw.graphicalobjects.GraphicalObject |
bDragInProgress, colColor, iX, iY, lstPropertyChangeListeners, ptDragAndDropStartPosition, ptInitialObjectPosition, rectInitialBoundingBox |
Constructor Summary | |
TextArea(int iX,
int iY,
Color colColor,
String strText)
Creates a new TextArea with specified position, color, text and default font, centered on both axis. |
|
TextArea(int iX,
int iY,
Color colColor,
String strText,
Font fntFont)
Creates a new TextArea with specified position, color, text and font, centered on both axis. |
|
TextArea(int iX,
int iY,
Color colColor,
String strText,
Font fntFont,
int iAlignment)
Creates a new TextArea with specified position, color, text, font and alignment. |
|
TextArea(int iX,
int iY,
Color colColor,
String strText,
int iAlignment)
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 ptPoint)
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. |
GraphicalObjectProperties |
getPropertyDialog(Frame frmOwner)
Returns a dialog box used to set the properties of this graphical object. |
String |
getText()
Returns the text to be displayed. |
void |
paint(Graphics g)
Paints this text area. |
protected void |
setAlignment_silent(int iNewAlignment)
Sets the position of the text from the position of this object (a constant from SwingConstants like CENTER , SOUTH_EAST , ...), without firing any event. |
void |
setAlignment(int iNewAlignment)
Sets the position of the text from the position of this object (a constant from SwingConstants like CENTER , SOUTH_EAST , ...). |
protected void |
setFont_silent(Font fntNewFont)
Sets the font used to display the text, without firing any event. |
protected void |
setFont_silent(String strFontName,
int iFontStyle,
int iFontSize)
Sets the font used to display the text, without firing any event. |
void |
setFont(String strFontName,
int iFontStyle,
int iFontSize)
Sets the font used to display the text. |
protected void |
setText_silent(String strNewText)
Sets the text to be displayed, without firing any event. |
void |
setText(String strNewText)
Sets the text to be displayed. |
protected void |
updateBoundingBox()
Updates the size of this text area. |
Methods inherited from class jdraw.graphicalobjects.GraphicalObject |
addPropertyChangeListener, commitDragAndDrop, drag, fireBoudingBoxChange, getColor, getDistance, getDistanceSq, getDistanceSq, getX, getY, isDragInProgress, moveTo_silent, moveTo, openPropertyDialog, prepareBoudingBoxEvent, removePropertyChangeListener, rollbackDragAndDrop, setColor_silent, setColor, setX_silent, setX, setY_silent, setY, startDragAndDrop, suspendDragAndDrop, updateCachedData |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final String FRIENDLYNAME
private static final Cursor CURSOR
private static final BufferedImage biDummyImage
private final Rectangle rectBoundingBox
private String strText
private Font fntFont
private int iAlignment
SwingConstants
like CENTER
, SOUTH_EAST
, ...).Constructor Detail |
public TextArea(int iX, int iY, Color colColor, String strText)
TextArea
with specified position, color, text and default font, centered on both axis.public TextArea(int iX, int iY, Color colColor, String strText, int iAlignment)
TextArea
with specified position, color, text, alignment and default font.public TextArea(int iX, int iY, Color colColor, String strText, Font fntFont)
TextArea
with specified position, color, text and font, centered on both axis.public TextArea(int iX, int iY, Color colColor, String strText, Font fntFont, int iAlignment)
TextArea
with specified position, color, text, font and alignment.Method Detail |
public Rectangle getBoundingBox()
getBoundingBox
in class GraphicalObject
public Cursor getCursor()
getCursor
in class GraphicalObject
public GraphicalObjectProperties getPropertyDialog(Frame frmOwner)
getPropertyDialog
in class GraphicalObject
public String getFriendlyName()
getFriendlyName
in class GraphicalObject
public void paint(Graphics g)
paint
in class GraphicalObject
protected void updateBoundingBox()
public int getDistanceSq(Point ptPoint)
getDistanceSq
in class GraphicalObject
public Font getFont()
public String getFontName()
public int getFontSize()
public int getFontStyle()
public void setFont(String strFontName, int iFontStyle, int iFontSize)
protected void setFont_silent(String strFontName, int iFontStyle, int iFontSize)
protected void setFont_silent(Font fntNewFont)
public String getText()
public void setText(String strNewText)
protected void setText_silent(String strNewText)
public int getAligment()
SwingConstants
like CENTER
, SOUTH_EAST
, ...).public void setAlignment(int iNewAlignment)
SwingConstants
like CENTER
, SOUTH_EAST
, ...).protected void setAlignment_silent(int iNewAlignment)
SwingConstants
like CENTER
, SOUTH_EAST
, ...), without firing any event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |