All Packages Class Hierarchy This Package Previous Next Index
Class CH.ifa.draw.figures.TextFigure
java.lang.Object
|
+----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
-
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)
-
-
figureInvalidated(FigureChangeEvent)
-
-
figureRemoved(FigureChangeEvent)
-
-
figureRequestRemove(FigureChangeEvent)
-
-
figureRequestUpdate(FigureChangeEvent)
-
-
getAttribute(String)
- A text figure understands the "FontSize", "FontStyle", and "FontName"
attributes.
-
getFont()
- Gets the font.
-
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.
-
moveBy(int, int)
- Moves the figure by the given offset.
-
overlayColumns()
- Gets the number of columns to be overlaid when the figure is edited.
-
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.
-
textDisplayBox()
-
-
updateLocation()
- Updates the location relative to the connected figure.
-
write(StorableOutput)
- Stores the Figure to a StorableOutput.
TextFigure
public TextFigure()
moveBy
public void moveBy(int x,
int y)
- Moves the figure by the given offset.
- Overrides:
- moveBy in class AbstractFigure
basicMoveBy
protected 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
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
connect
public void connect(Figure figure)
figureChanged
public void figureChanged(FigureChangeEvent e)
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.
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