All Packages Class Hierarchy This Package Previous Next Index
Class CH.ifa.draw.figures.TextFigure
CH.ifa.draw.standard.AbstractFigure
|
+----CH.ifa.draw.figures.AttributeFigure
|
+----CH.ifa.draw.figures.TextFigure
- public class TextFigure
- extends AttributeFigure
- implements FigureChangeListener, TextHolder
A text figure.
- See Also:
- TextTool
-
fLocator
-
-
fObservedFigure
-
-
TextFigure()
-
-
acceptsTyping()
- Tests whether the figure accepts typing.
-
basicDisplayBox(Point, Point)
- Sets the display box of a figure.
-
basicMoveBy(int, int)
- Moves the figure.
-
changed()
- Updates the location whenever the figure changes itself.
-
connect(Figure)
-
-
createCurrentFont()
- Creates the current font to be used for new text figures.
-
disconnect()
- Disconnects the text figure.
-
displayBox()
- Gets the display box of a figure.
-
drawBackground(Graphics)
- Draws the background of the figure.
-
drawFrame(Graphics)
- Draws the frame of the figure.
-
figureChanged(FigureChangeEvent)
- Disconnects this.
-
figureInvalidated(FigureChangeEvent)
-
-
figureRemoved(FigureChangeEvent)
-
-
figureRequestRemove(FigureChangeEvent)
-
-
figureRequestUpdate(FigureChangeEvent)
-
-
getAttribute(String)
- A text figure understands the "FontSize", "FontStyle", and "FontName"
attributes.
-
getFont()
- Gets the font.
-
getFont()
- Gets the font.
-
getMinimumSize()
- Returns the current text extent.
-
getText()
- Gets the text shown by the text figure.
-
getText()
- Gets the text shown by the text figure.
-
handles()
- Returns the handles of a Figure that can be used
to manipulate some of its attributes.
-
isConnected()
-
-
markDirty()
-
APT: This is now public in Figure.
-
moveBy(int, int)
- Moves the figure by the given offset.
-
overlayColumns()
- Gets the number of columns to be overlaid when the figure is edited.
-
parent(Figure)
- Extends the inherited method by disconnecting this.
-
read(StorableInput)
- Reads the Figure from a StorableInput.
-
readOnly()
- Tests whether this figure is read only.
-
release()
- A figure is released from the drawing.
-
setAttribute(String, Object)
- A text figure understands the "FontSize", "FontStyle", and "FontName"
attributes.
-
setCurrentFontName(String)
- Sets the current font name
-
setCurrentFontSize(int)
- Sets the current font size.
-
setCurrentFontStyle(int)
- Sets the current font style.
-
setFont(Font)
- Sets the font.
-
setReadOnly(boolean)
- Sets the read only status of the text figure.
-
setText(String)
- Sets the text shown by the text figure.
-
setText(String)
- Sets the text shown by the text figure.
-
textDisplayBox()
-
-
toString()
-
-
updateLocation()
- Updates the location relative to the connected figure.
-
write(StorableOutput)
- Stores the Figure to a StorableOutput.
fObservedFigure
protected Figure fObservedFigure
fLocator
protected OffsetLocator fLocator
TextFigure
public TextFigure()
moveBy
public void moveBy(int x,
int y)
- Moves the figure by the given offset.
- Overrides:
- moveBy in class AbstractFigure
basicMoveBy
public void basicMoveBy(int x,
int y)
- Moves the figure.
- Overrides:
- basicMoveBy in class AbstractFigure
basicDisplayBox
public void basicDisplayBox(Point newOrigin,
Point newCorner)
- Sets the display box of a figure.
- Overrides:
- basicDisplayBox in class AbstractFigure
displayBox
public Rectangle displayBox()
- Gets the display box of a figure.
- Overrides:
- displayBox in class AbstractFigure
textDisplayBox
public Rectangle textDisplayBox()
readOnly
public boolean readOnly()
- Tests whether this figure is read only.
setReadOnly
public void setReadOnly(boolean isReadOnly)
- Sets the read only status of the text figure.
getFont
public Font getFont()
- Gets the font.
setFont
public void setFont(Font newFont)
- Sets the font.
changed
public void changed()
- Updates the location whenever the figure changes itself.
- Overrides:
- changed in class AbstractFigure
getAttribute
public Object getAttribute(String name)
- A text figure understands the "FontSize", "FontStyle", and "FontName"
attributes.
- Overrides:
- getAttribute in class AttributeFigure
setAttribute
public void setAttribute(String name,
Object value)
- A text figure understands the "FontSize", "FontStyle", and "FontName"
attributes.
- Overrides:
- setAttribute in class AttributeFigure
getText
public String getText()
- Gets the text shown by the text figure.
setText
public void setText(String newText)
- Sets the text shown by the text figure.
acceptsTyping
public boolean acceptsTyping()
- Tests whether the figure accepts typing.
drawBackground
public void drawBackground(Graphics g)
- Draws the background of the figure.
- Overrides:
- drawBackground in class AttributeFigure
drawFrame
public void drawFrame(Graphics g)
- Draws the frame of the figure.
- Overrides:
- drawFrame in class AttributeFigure
markDirty
public void markDirty()
- APT: This is now public in Figure.
- Overrides:
- markDirty in class AbstractFigure
getMinimumSize
public Dimension getMinimumSize()
- Returns the current text extent.
- Overrides:
- getMinimumSize in class AbstractFigure
overlayColumns
public int overlayColumns()
- Gets the number of columns to be overlaid when the figure is edited.
handles
public Vector handles()
- Returns the handles of a Figure that can be used
to manipulate some of its attributes.
- Overrides:
- handles in class AbstractFigure
write
public void write(StorableOutput dw)
- Stores the Figure to a StorableOutput.
- Overrides:
- write in class AttributeFigure
read
public void read(StorableInput dr) throws IOException
- Reads the Figure from a StorableInput.
- Overrides:
- read in class AttributeFigure
isConnected
public boolean isConnected()
connect
public void connect(Figure figure)
parent
public void parent(Figure aFigure)
- Extends the inherited method by disconnecting this.
- Overrides:
- parent in class AbstractFigure
figureChanged
public void figureChanged(FigureChangeEvent e)
- Disconnects this.
figureRemoved
public void figureRemoved(FigureChangeEvent e)
figureRequestRemove
public void figureRequestRemove(FigureChangeEvent e)
figureInvalidated
public void figureInvalidated(FigureChangeEvent e)
figureRequestUpdate
public void figureRequestUpdate(FigureChangeEvent e)
updateLocation
protected void updateLocation()
- Updates the location relative to the connected figure.
The TextFigure is centered around the located point.
release
public void release()
- A figure is released from the drawing.
- Overrides:
- release in class AbstractFigure
disconnect
public void disconnect()
- Disconnects the text figure.
toString
public String toString()
createCurrentFont
public static Font createCurrentFont()
- Creates the current font to be used for new text figures.
setCurrentFontName
public static void setCurrentFontName(String name)
- Sets the current font name
setCurrentFontSize
public static void setCurrentFontSize(int size)
- Sets the current font size.
setCurrentFontStyle
public static void setCurrentFontStyle(int style)
- Sets the current font style.
All Packages Class Hierarchy This Package Previous Next Index