|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--CH.ifa.draw.standard.AbstractFigure | +--CH.ifa.draw.figures.AttributeFigure | +--org.objectweb.jac.ide.diagrams.TextFigure
A TextFigure whose text color can be redefined with the method getTextColor()
Field Summary | |
protected int |
fOriginX
|
protected int |
fOriginY
|
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(Point newOrigin,
Point newCorner)
|
protected void |
basicMoveBy(int x,
int y)
|
void |
changed()
Updates the location whenever the figure changes itself. |
void |
connect(CH.ifa.draw.framework.Figure figure)
|
static Font |
createCurrentFont()
Creates the current font to be used for new text figures. |
void |
disconnect(CH.ifa.draw.framework.Figure disconnectFigure)
Disconnects a text holder from a connect figure. |
Rectangle |
displayBox()
|
void |
drawBackground(Graphics g)
|
void |
drawFrame(Graphics g)
|
void |
figureChanged(CH.ifa.draw.framework.FigureChangeEvent e)
|
void |
figureInvalidated(CH.ifa.draw.framework.FigureChangeEvent e)
|
void |
figureRemoved(CH.ifa.draw.framework.FigureChangeEvent e)
|
void |
figureRequestRemove(CH.ifa.draw.framework.FigureChangeEvent e)
|
void |
figureRequestUpdate(CH.ifa.draw.framework.FigureChangeEvent e)
|
Object |
getAttribute(String name)
A text figure understands the "FontSize", "FontStyle", and "FontName" attributes. |
Font |
getFont()
Gets the font. |
String |
getText()
Gets the text shown by the text figure. |
protected Color |
getTextColor()
|
Vector |
handles()
|
void |
moveBy(int x,
int y)
|
int |
overlayColumns()
Gets the number of columns to be overlaid when the figure is edited. |
boolean |
readOnly()
Tests whether this figure is read only. |
void |
release()
|
void |
setAttribute(String name,
Object value)
A text figure understands the "FontSize", "FontStyle", and "FontName" attributes. |
static void |
setCurrentFontName(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(Font newFont)
Sets the font. |
void |
setReadOnly(boolean isReadOnly)
Sets the read only status of the text figure. |
void |
setText(String newText)
Sets the text shown by the text figure. |
Rectangle |
textDisplayBox()
|
protected void |
updateLocation()
Updates the location relative to the connected figure. |
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, getZValue, includes, invalidate, isEmpty, listener, removeFigureChangeListener, removeFromContainer, setZValue, size, willChange |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int fOriginX
protected int fOriginY
Constructor Detail |
public TextFigure()
Method Detail |
public void moveBy(int x, int y)
moveBy
in interface CH.ifa.draw.framework.Figure
moveBy
in class CH.ifa.draw.standard.AbstractFigure
protected void basicMoveBy(int x, int y)
basicMoveBy
in class CH.ifa.draw.standard.AbstractFigure
public void basicDisplayBox(Point newOrigin, Point newCorner)
basicDisplayBox
in interface CH.ifa.draw.framework.Figure
basicDisplayBox
in class CH.ifa.draw.standard.AbstractFigure
public Rectangle displayBox()
displayBox
in interface CH.ifa.draw.framework.Figure
displayBox
in class CH.ifa.draw.standard.AbstractFigure
public Rectangle textDisplayBox()
textDisplayBox
in interface CH.ifa.draw.standard.TextHolder
public boolean readOnly()
public void setReadOnly(boolean isReadOnly)
public Font getFont()
getFont
in interface CH.ifa.draw.standard.TextHolder
public void setFont(Font newFont)
public void changed()
changed
in interface CH.ifa.draw.framework.Figure
changed
in class CH.ifa.draw.standard.AbstractFigure
public Object getAttribute(String name)
getAttribute
in interface CH.ifa.draw.framework.Figure
getAttribute
in class CH.ifa.draw.figures.AttributeFigure
public void setAttribute(String name, Object value)
setAttribute
in interface CH.ifa.draw.framework.Figure
setAttribute
in class CH.ifa.draw.figures.AttributeFigure
public String getText()
getText
in interface CH.ifa.draw.standard.TextHolder
public void setText(String newText)
setText
in interface CH.ifa.draw.standard.TextHolder
public boolean acceptsTyping()
acceptsTyping
in interface CH.ifa.draw.standard.TextHolder
public void drawBackground(Graphics g)
drawBackground
in class CH.ifa.draw.figures.AttributeFigure
public void drawFrame(Graphics g)
drawFrame
in class CH.ifa.draw.figures.AttributeFigure
protected Color getTextColor()
public int overlayColumns()
overlayColumns
in interface CH.ifa.draw.standard.TextHolder
public Vector handles()
handles
in interface CH.ifa.draw.framework.Figure
handles
in class CH.ifa.draw.standard.AbstractFigure
public void connect(CH.ifa.draw.framework.Figure figure)
connect
in interface CH.ifa.draw.standard.TextHolder
public void figureChanged(CH.ifa.draw.framework.FigureChangeEvent e)
figureChanged
in interface CH.ifa.draw.framework.FigureChangeListener
public void figureRemoved(CH.ifa.draw.framework.FigureChangeEvent e)
figureRemoved
in interface CH.ifa.draw.framework.FigureChangeListener
public void figureRequestRemove(CH.ifa.draw.framework.FigureChangeEvent e)
figureRequestRemove
in interface CH.ifa.draw.framework.FigureChangeListener
public void figureInvalidated(CH.ifa.draw.framework.FigureChangeEvent e)
figureInvalidated
in interface CH.ifa.draw.framework.FigureChangeListener
public void figureRequestUpdate(CH.ifa.draw.framework.FigureChangeEvent e)
figureRequestUpdate
in interface CH.ifa.draw.framework.FigureChangeListener
protected void updateLocation()
public void release()
release
in interface CH.ifa.draw.framework.Figure
release
in class CH.ifa.draw.standard.AbstractFigure
public void disconnect(CH.ifa.draw.framework.Figure disconnectFigure)
disconnect
in interface CH.ifa.draw.standard.TextHolder
public static Font createCurrentFont()
public static void setCurrentFontName(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 |