|
|||||||||
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 FormField 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 Figure
moveBy
in class AbstractFigure
protected void basicMoveBy(int x, int y)
AbstractFigure
basicMoveBy
in class AbstractFigure
AbstractFigure.moveBy(int, int)
public void basicDisplayBox(java.awt.Point newOrigin, java.awt.Point newCorner)
AbstractFigure
basicDisplayBox
in interface Figure
basicDisplayBox
in class AbstractFigure
newOrigin
- the new originnewCorner
- the new cornerAbstractFigure.displayBox(java.awt.Point, java.awt.Point)
public java.awt.Rectangle displayBox()
AbstractFigure
displayBox
in interface Figure
displayBox
in class AbstractFigure
Figure.basicDisplayBox(java.awt.Point, java.awt.Point)
public java.awt.Rectangle textDisplayBox()
textDisplayBox
in interface TextHolder
public boolean readOnly()
public void setReadOnly(boolean isReadOnly)
public java.awt.Font getFont()
getFont
in interface TextHolder
public void setFont(java.awt.Font newFont)
public void changed()
changed
in interface Figure
changed
in class AbstractFigure
FigureChangeEvent
,
Figure.changed()
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface Figure
getAttribute
in class AttributeFigure
public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface Figure
setAttribute
in class AttributeFigure
public java.lang.String getText()
getText
in interface TextHolder
public void setText(java.lang.String newText)
setText
in interface TextHolder
public boolean acceptsTyping()
acceptsTyping
in interface TextHolder
public void drawBackground(java.awt.Graphics g)
AttributeFigure
drawBackground
in class AttributeFigure
AttributeFigure.draw(java.awt.Graphics)
public void drawFrame(java.awt.Graphics g)
AttributeFigure
drawFrame
in class AttributeFigure
AttributeFigure.draw(java.awt.Graphics)
public int overlayColumns()
overlayColumns
in interface TextHolder
public java.util.Vector handles()
AbstractFigure
handles
in interface Figure
handles
in class AbstractFigure
Handle
public void write(StorableOutput dw)
AttributeFigure
write
in interface Storable
write
in class AttributeFigure
public void read(StorableInput dr) throws java.io.IOException
AttributeFigure
read
in interface Storable
read
in class AttributeFigure
java.io.IOException
public void connect(Figure figure)
TextHolder
connect
in interface TextHolder
public void figureChanged(FigureChangeEvent e)
FigureChangeListener
figureChanged
in interface FigureChangeListener
public void figureRemoved(FigureChangeEvent e)
FigureChangeListener
figureRemoved
in interface FigureChangeListener
public void figureRequestRemove(FigureChangeEvent e)
FigureChangeListener
figureRequestRemove
in interface FigureChangeListener
public void figureInvalidated(FigureChangeEvent e)
FigureChangeListener
figureInvalidated
in interface FigureChangeListener
public void figureRequestUpdate(FigureChangeEvent e)
FigureChangeListener
figureRequestUpdate
in interface FigureChangeListener
protected void updateLocation()
public void release()
AbstractFigure
release
in interface Figure
release
in class AbstractFigure
Figure.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 |