|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectCH.ifa.draw.standard.AbstractFigure
org.openbp.cockpit.modeler.figures.generic.BasicFigure
org.openbp.cockpit.modeler.figures.generic.XTextFigure
public class XTextFigure
The text element figure represents a simple text rectangle. The size of the figure is computed automatically based on the text and font settings.
| Field Summary | |
|---|---|
protected java.awt.Rectangle |
displayBoxCache
Display box cache |
static int |
HANDLE_DISTANCE
Distance between display box and font size handle |
protected int |
originX
X origin |
protected int |
originY
Y origin |
| Fields inherited from class org.openbp.cockpit.modeler.figures.generic.BasicFigure |
|---|
DECO_FILLCOLOR, DECO_OVERLAY |
| Fields inherited from interface CH.ifa.draw.framework.Figure |
|---|
POPUP_MENU |
| Constructor Summary | |
|---|---|
XTextFigure()
Constructor. |
|
| Method Summary | |
|---|---|
void |
basicDisplayBox(java.awt.Point newOrigin,
java.awt.Point newCorner)
|
protected void |
basicMoveBy(int x,
int y)
|
java.lang.String |
createGeometry()
Encodes the geometry information of this object into a string. |
java.awt.Rectangle |
displayBox()
|
protected void |
drawFigure(java.awt.Graphics g)
Draws the figure. |
int |
getAlignment()
Gets the text alignment. |
java.awt.Font |
getFont()
Gets the text font. |
int |
getFontSize()
Gets the font size. |
java.lang.String |
getText()
Gets the text to display. |
java.util.Vector |
handles()
|
void |
invalidate()
|
boolean |
isAutoSize()
Gets the auto-size flag. |
void |
parseGeometry(java.lang.String geometry)
Decodes the given geometry information by breaking it into single parameters and handing them to parseParameter(java.lang.String). |
protected void |
parseParameter(java.lang.String parameter)
Decodes a single geometry parameter. |
void |
setAlignment(int alignment)
Sets the text alignment. |
void |
setAutoSize(boolean autoSize)
Sets the auto-size flag. |
void |
setFont(java.awt.Font font)
Sets the text font. |
void |
setFontSize(int fontSize)
Sets the font size. |
void |
setText(java.lang.String text)
Sets the text to display. |
| Methods inherited from class org.openbp.cockpit.modeler.figures.generic.BasicFigure |
|---|
clone, decorateValue, draw, getDecorationOwner, getDefaultFillColor, getFillColor, getParent, setFillColor, setParent |
| Methods inherited from class CH.ifa.draw.standard.AbstractFigure |
|---|
addFigureChangeListener, addToContainer, canConnect, center, changed, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, figures, findFigureInside, getAttribute, getZValue, includes, isEmpty, listener, moveBy, read, release, removeFigureChangeListener, removeFromContainer, setAttribute, setZValue, size, willChange, write |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface CH.ifa.draw.framework.Figure |
|---|
addFigureChangeListener, addToContainer, canConnect, center, changed, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, figures, findFigureInside, getAttribute, getZValue, includes, isEmpty, listener, moveBy, release, removeFigureChangeListener, removeFromContainer, setAttribute, setZValue, size, willChange |
| Methods inherited from interface CH.ifa.draw.util.Storable |
|---|
read, write |
| Field Detail |
|---|
public static final int HANDLE_DISTANCE
protected int originX
protected int originY
protected java.awt.Rectangle displayBoxCache
| Constructor Detail |
|---|
public XTextFigure()
| Method Detail |
|---|
protected void basicMoveBy(int x,
int y)
basicMoveBy in class CH.ifa.draw.standard.AbstractFigure
public void basicDisplayBox(java.awt.Point newOrigin,
java.awt.Point newCorner)
basicDisplayBox in interface CH.ifa.draw.framework.FigurebasicDisplayBox in class CH.ifa.draw.standard.AbstractFigurepublic java.awt.Rectangle displayBox()
displayBox in interface CH.ifa.draw.framework.FiguredisplayBox in class CH.ifa.draw.standard.AbstractFigureprotected void drawFigure(java.awt.Graphics g)
BasicFigure
drawFigure in class BasicFigureg - Graphics to draw topublic void invalidate()
invalidate in interface CH.ifa.draw.framework.Figureinvalidate in class CH.ifa.draw.standard.AbstractFigurepublic java.util.Vector handles()
handles in interface CH.ifa.draw.framework.Figurehandles in class CH.ifa.draw.standard.AbstractFigurepublic java.lang.String getText()
public void setText(java.lang.String text)
public int getFontSize()
public void setFontSize(int fontSize)
public java.awt.Font getFont()
public void setFont(java.awt.Font font)
public int getAlignment()
public void setAlignment(int alignment)
alignment - Text alignmentpublic boolean isAutoSize()
public void setAutoSize(boolean autoSize)
public void parseGeometry(java.lang.String geometry)
parseParameter(java.lang.String).
geometry - '|'-separated geometry information or nullprotected void parseParameter(java.lang.String parameter)
parameter - Parameter to decodepublic java.lang.String createGeometry()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||