|
||||||||||
| 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.XFigure
public abstract class XFigure
Extended figure.
| Field Summary | |
|---|---|
static java.lang.String |
DECO_FILLCOLOR2
Decoration key for the second fill color (used with Color objects) |
static java.lang.String |
DECO_FRAMECOLOR
Decoration key for the frame color (used with Color objects) |
static java.lang.String |
DECO_FRAMESTROKE
Decoration key for the frame stroke (used with Stroke objects) |
protected XFigureDescriptor |
descriptor
Figure descriptor |
protected boolean |
needUpdatePaint
Flag if the paint should be updated |
protected java.awt.Paint |
paint
Paint used to fill the figure |
| 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 | |
|---|---|
XFigure()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
changed()
|
java.lang.Object |
clone()
Creates a clone of this object. |
java.awt.geom.RectangularShape |
createRectangularShape()
Creates a rectangular shape object that defines the outline of the figure. |
java.awt.Shape |
createShape()
Creates a shape object that defines the outline of the figure. |
void |
draw(java.awt.Graphics g)
Draws the figure in the given graphics. |
protected void |
drawAppliances(java.awt.Graphics g)
Draws additional frame parts. |
protected void |
drawFrame(java.awt.Graphics g)
Draws the frame of the figure. |
protected void |
drawImage(java.awt.Graphics g)
Draws the image of the figure. |
java.awt.Color |
getDefaultFillColor()
Gets the default fill color. |
java.awt.Color |
getDefaultFillColor2()
Gets the default second (optional) fill color for gradients. |
java.awt.Color |
getDefaultFrameColor()
Gets the default frame color. |
XFigureDescriptor |
getDescriptor()
Gets the figure descriptor. |
java.awt.Color |
getFillColor2()
Gets the second (optional) fill color for gradients. |
java.awt.Color |
getFrameColor()
Gets the frame color. |
java.awt.Stroke |
getFrameStroke()
Gets the frame stroke. |
javax.swing.ImageIcon |
getImageIcon()
Gets the optional image. |
Orientation |
getOrientation()
Gets the orientation of the figure. |
void |
initialize()
Initializes the figure after all information from the figure descriptor has been set (template method). |
abstract java.awt.Rectangle |
placeAdjacent(java.awt.Rectangle rect,
double angle)
Places the given rectangle so that its center is in the given direction and it exactly touches the figure, without crossing any lines. |
void |
requestPaintUpdate()
Requests an update of the figure's paint. |
void |
setDescriptor(XFigureDescriptor descriptor)
Sets the figure descriptor. |
void |
setFillColor(java.awt.Color fillColor)
Sets the fill color. |
void |
setFillColor2(java.awt.Color fillColor2)
Sets the second (optional) fill color for gradients. |
void |
setFrameColor(java.awt.Color frameColor)
Sets the frame color. |
void |
setFrameStroke(java.awt.Stroke frameStroke)
Sets the frame stroke. |
void |
setImageIcon(javax.swing.ImageIcon imageIcon)
Sets the optional image. |
void |
setOrientation(Orientation orientation)
Sets the orientation of the figure. |
void |
updatePaint()
Updates the paint object used for filling the figure. |
| Methods inherited from class org.openbp.cockpit.modeler.figures.generic.BasicFigure |
|---|
decorateValue, drawFigure, getDecorationOwner, getFillColor, getParent, setParent |
| Methods inherited from class CH.ifa.draw.standard.AbstractFigure |
|---|
addFigureChangeListener, addToContainer, basicDisplayBox, basicMoveBy, canConnect, center, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, displayBox, figures, findFigureInside, getAttribute, getZValue, handles, includes, invalidate, 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, basicDisplayBox, canConnect, center, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, displayBox, figures, findFigureInside, getAttribute, getZValue, handles, includes, invalidate, 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 java.lang.String DECO_FRAMESTROKE
public static final java.lang.String DECO_FRAMECOLOR
public static final java.lang.String DECO_FILLCOLOR2
protected transient XFigureDescriptor descriptor
protected transient java.awt.Paint paint
protected transient boolean needUpdatePaint
| Constructor Detail |
|---|
public XFigure()
| Method Detail |
|---|
public java.lang.Object clone()
clone in interface CH.ifa.draw.framework.Figureclone in class BasicFigurepublic XFigureDescriptor getDescriptor()
public void setDescriptor(XFigureDescriptor descriptor)
public void initialize()
public void draw(java.awt.Graphics g)
BasicFigure.drawFigure(java.awt.Graphics) followed by drawFrame(java.awt.Graphics) and drawImage(java.awt.Graphics).
draw in interface CH.ifa.draw.framework.Figuredraw in class BasicFigureg - Graphics to draw toBasicFigure.draw(Graphics g)public void changed()
changed in interface CH.ifa.draw.framework.Figurechanged in class CH.ifa.draw.standard.AbstractFigure()protected void drawFrame(java.awt.Graphics g)
g - Graphics to draw toprotected void drawAppliances(java.awt.Graphics g)
g - Graphics to draw toprotected void drawImage(java.awt.Graphics g)
g - Graphics to draw topublic void requestPaintUpdate()
public void updatePaint()
setFillColor(java.awt.Color) or setFillColor2(java.awt.Color) methods)
or when the size or orientation of the figure changes.
public abstract java.awt.Rectangle placeAdjacent(java.awt.Rectangle rect,
double angle)
rect - Rectangle to adjustangle - Direction in which the rectangle should be placed
public java.awt.Shape createShape()
createRectangularShape().
However, for most figure types it will be the same.
public java.awt.geom.RectangularShape createRectangularShape()
createShape(), but it is supposed to
be faster and it returns an easily translatable and scalable object.
public void setFillColor(java.awt.Color fillColor)
setFillColor in interface ColorizablesetFillColor in class BasicFigurefillColor - Fill color or null for no fill colorpublic java.awt.Color getDefaultFillColor()
getDefaultFillColor in interface ColorizablegetDefaultFillColor in class BasicFigurepublic java.awt.Color getFillColor2()
public void setFillColor2(java.awt.Color fillColor2)
fillColor2 - Gradient color or null for solid fillpublic java.awt.Color getDefaultFillColor2()
public java.awt.Color getFrameColor()
public void setFrameColor(java.awt.Color frameColor)
frameColor - The frame color or null for no framepublic java.awt.Color getDefaultFrameColor()
public javax.swing.ImageIcon getImageIcon()
public void setImageIcon(javax.swing.ImageIcon imageIcon)
public Orientation getOrientation()
Orientation.RIGHT/Orientation.BOTTOM/Orientation.LEFT/Orientation.TOPpublic void setOrientation(Orientation orientation)
orientation - Orientation.RIGHT/Orientation.BOTTOM/Orientation.LEFT/Orientation.TOPpublic java.awt.Stroke getFrameStroke()
public void setFrameStroke(java.awt.Stroke frameStroke)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||