|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCH.ifa.draw.standard.AbstractFigure
CH.ifa.draw.figures.AttributeFigure
CH.ifa.draw.figures.TextFigure
public class TextFigure
A text figure.
TextTool,
Serialized Form| Field Summary |
|---|
| Fields inherited from interface CH.ifa.draw.framework.Figure |
|---|
POPUP_MENU |
| Constructor Summary | |
|---|---|
TextFigure()
|
|
| Method Summary | |
|---|---|
boolean |
acceptsTyping()
Tests whether the figure accepts typing. |
void |
basicDisplayBox(java.awt.Point newOrigin,
java.awt.Point newCorner)
Sets the display box of a figure. |
protected void |
basicMoveBy(int x,
int y)
Moves the figure. |
void |
changed()
Updates the location whenever the figure changes itself. |
void |
connect(Figure figure)
Connects a figure to another figure. |
static java.awt.Font |
createCurrentFont()
Creates the current font to be used for new text figures. |
void |
disconnect()
Disconnects the text figure. |
java.awt.Rectangle |
displayBox()
Gets the display box of a figure. |
void |
drawBackground(java.awt.Graphics g)
Draws the background of the figure. |
void |
drawFrame(java.awt.Graphics g)
Draws the frame of the figure. |
void |
figureChanged(FigureChangeEvent e)
Sent when a figure changed |
void |
figureInvalidated(FigureChangeEvent e)
Sent when an area is invalid |
void |
figureRemoved(FigureChangeEvent e)
Sent when a figure was removed |
void |
figureRequestRemove(FigureChangeEvent e)
Sent when requesting to remove a figure. |
void |
figureRequestUpdate(FigureChangeEvent e)
Sent when an update should happen. |
java.lang.Object |
getAttribute(java.lang.String name)
A text figure understands the "FontSize", "FontStyle", and "FontName" attributes. |
java.awt.Font |
getFont()
Gets the font. |
java.lang.String |
getText()
Gets the text shown by the text figure. |
java.util.Vector |
handles()
Returns the handles of a Figure that can be used to manipulate some of its attributes. |
void |
moveBy(int x,
int y)
Moves the figure by the given offset. |
int |
overlayColumns()
Gets the number of columns to be overlaid when the figure is edited. |
void |
read(StorableInput dr)
Reads the Figure from a StorableInput. |
boolean |
readOnly()
Tests whether this figure is read only. |
void |
release()
A figure is released from the drawing. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
A text figure understands the "FontSize", "FontStyle", and "FontName" attributes. |
static void |
setCurrentFontName(java.lang.String name)
Sets the current font name |
static void |
setCurrentFontSize(int size)
Sets the current font size. |
static void |
setCurrentFontStyle(int style)
Sets the current font style. |
void |
setFont(java.awt.Font newFont)
Sets the font. |
void |
setReadOnly(boolean isReadOnly)
Sets the read only status of the text figure. |
void |
setText(java.lang.String newText)
Sets the text shown by the text figure. |
java.awt.Rectangle |
textDisplayBox()
|
protected void |
updateLocation()
Updates the location relative to the connected figure. |
void |
write(StorableOutput dw)
Stores the Figure to a StorableOutput. |
| Methods inherited from class CH.ifa.draw.figures.AttributeFigure |
|---|
draw, getDefaultAttribute, getFillColor, getFrameColor |
| Methods inherited from class CH.ifa.draw.standard.AbstractFigure |
|---|
addFigureChangeListener, addToContainer, canConnect, center, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, figures, findFigureInside, includes, invalidate, isEmpty, listener, removeFigureChangeListener, removeFromContainer, size, willChange |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextFigure()
| Method Detail |
|---|
public void moveBy(int x,
int y)
AbstractFigure
moveBy in interface FiguremoveBy in class AbstractFigure
protected void basicMoveBy(int x,
int y)
AbstractFigure
basicMoveBy in class AbstractFigureAbstractFigure.moveBy(int, int)
public void basicDisplayBox(java.awt.Point newOrigin,
java.awt.Point newCorner)
AbstractFigure
basicDisplayBox in interface FigurebasicDisplayBox in class AbstractFigurenewOrigin - the new originnewCorner - the new cornerAbstractFigure.displayBox(java.awt.Point, java.awt.Point)public java.awt.Rectangle displayBox()
AbstractFigure
displayBox in interface FiguredisplayBox in class AbstractFigureFigure.basicDisplayBox(java.awt.Point, java.awt.Point)public java.awt.Rectangle textDisplayBox()
textDisplayBox in interface TextHolderpublic boolean readOnly()
public void setReadOnly(boolean isReadOnly)
public java.awt.Font getFont()
getFont in interface TextHolderpublic void setFont(java.awt.Font newFont)
public void changed()
changed in interface Figurechanged in class AbstractFigureFigureChangeEvent,
Figure.changed()public java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface FiguregetAttribute in class AttributeFigure
public void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in interface FiguresetAttribute in class AttributeFigurepublic java.lang.String getText()
getText in interface TextHolderpublic void setText(java.lang.String newText)
setText in interface TextHolderpublic boolean acceptsTyping()
acceptsTyping in interface TextHolderpublic void drawBackground(java.awt.Graphics g)
AttributeFigure
drawBackground in class AttributeFigureAttributeFigure.draw(java.awt.Graphics)public void drawFrame(java.awt.Graphics g)
AttributeFigure
drawFrame in class AttributeFigureAttributeFigure.draw(java.awt.Graphics)public int overlayColumns()
overlayColumns in interface TextHolderpublic java.util.Vector handles()
AbstractFigure
handles in interface Figurehandles in class AbstractFigureHandlepublic void write(StorableOutput dw)
AttributeFigure
write in interface Storablewrite in class AttributeFigure
public void read(StorableInput dr)
throws java.io.IOException
AttributeFigure
read in interface Storableread in class AttributeFigurejava.io.IOExceptionpublic void connect(Figure figure)
TextHolder
connect in interface TextHolderpublic void figureChanged(FigureChangeEvent e)
FigureChangeListener
figureChanged in interface FigureChangeListenerpublic void figureRemoved(FigureChangeEvent e)
FigureChangeListener
figureRemoved in interface FigureChangeListenerpublic void figureRequestRemove(FigureChangeEvent e)
FigureChangeListener
figureRequestRemove in interface FigureChangeListenerpublic void figureInvalidated(FigureChangeEvent e)
FigureChangeListener
figureInvalidated in interface FigureChangeListenerpublic void figureRequestUpdate(FigureChangeEvent e)
FigureChangeListener
figureRequestUpdate in interface FigureChangeListenerprotected void updateLocation()
public void release()
AbstractFigure
release in interface Figurerelease in class AbstractFigureFigure.release()public void disconnect()
public static java.awt.Font createCurrentFont()
public static void setCurrentFontName(java.lang.String name)
public static void setCurrentFontSize(int size)
public static void setCurrentFontStyle(int style)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||