|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.cockpit.modeler.figures.generic.XFigureDescriptor
public class XFigureDescriptor
Delegation object that implements some functionality of the XFigure interface.
| Field Summary | |
|---|---|
static int |
DEFAULT_FRAME_STROKE_WIDTH
Default frame stroke width |
static int |
DEFAULT_GRADIENT_POS
Default gradient position |
static Orientation |
DEFAULT_ORIENTATION
Default orientation |
static int |
DEFAULT_SIZE
Default x/y size |
static int |
FLAG_CYCLIC_GRADIENT
Flag: We have a cyclic gradient |
static int |
GRADIENTPOS_CENTER
Center |
static int |
GRADIENTPOS_E
E (right) |
static int |
GRADIENTPOS_N
N (top) |
static int |
GRADIENTPOS_NE
NE (top left) |
static int |
GRADIENTPOS_NW
NW (top left) |
static int |
GRADIENTPOS_S
S (bottom) |
static int |
GRADIENTPOS_SE
SE (bottom right) |
static int |
GRADIENTPOS_SW
SW (bottom left) |
static int |
GRADIENTPOS_W
W (left) |
static int |
MAX_SIZE
Maximum size |
static int |
MIN_SIZE
Minimum size |
| Constructor Summary | |
|---|---|
XFigureDescriptor()
Default constructor. |
|
| Method Summary | |
|---|---|
protected void |
addErrorMsg(java.util.List errorMsgs,
java.lang.String errorMsg)
Adds an error msg, prepending it by the node type name. |
void |
addTaggedValue(TaggedValue taggedValue)
Adds a tagged value. |
void |
clearTaggedValues()
Clears the tagged value list. |
XFigure |
createFigure()
Creates a new figure according to the figure type of this descriptor. |
protected java.lang.String |
determineFigureClassName()
Determines the figure class name from the figure type. |
int |
getCustomIntAttributeValue(java.lang.String name,
int dflt)
Gets the value of a tagged value as integer. |
java.lang.String |
getFigureClassName()
Gets the figure class. |
java.lang.String |
getFigureType()
Gets the figure type. |
java.awt.Color |
getFillColor()
Gets the fill color. |
java.awt.Color |
getFillColor2()
Gets the second (optional) fill color for gradients. |
java.lang.String |
getFillColor2Str()
Gets the second (optional) fill color for gradients (colon-separated RGBA value). |
java.lang.String |
getFillColorStr()
Gets the fill color (colon-separated RGBA value). |
java.awt.Color |
getFrameColor()
Gets the frame color. |
java.lang.String |
getFrameColorStr()
Gets the frame color (colon-separated RGBA value). |
java.awt.Stroke |
getFrameStroke()
Gets the frame stroke. |
int |
getFrameStrokeWidth()
Gets the stroke width. |
int |
getGradientPos1()
Gets the position of the gradient (position 1) in a top-down figure orientation. |
java.lang.String |
getGradientPos1Str()
Gets the position of the gradient (position 1) in a top-down figure orientation (string access). |
int |
getGradientPos2()
Gets the position of the gradient (position 2) in a top-down figure orientation. |
java.lang.String |
getGradientPos2Str()
Gets the position of the gradient (position 2) in a top-down figure orientation (string access). |
java.lang.String |
getImageFileName()
Gets the image file name. |
javax.swing.ImageIcon |
getImageIcon()
Gets the image. |
int |
getMaxSizeX()
Gets the maximum horizontal size. |
int |
getMaxSizeY()
Gets the maximum vertical size. |
int |
getMinSizeX()
Gets the minimum horizontal size. |
int |
getMinSizeY()
Gets the minimum vertical size. |
Orientation |
getOrientation()
Gets the orientation of the figure. |
java.lang.String |
getOrientationStr()
Gets the orientation of the figure (string access). |
int |
getSizeX()
Gets the horizontal size. |
int |
getSizeY()
Gets the vertical size. |
TaggedValue |
getTaggedValue(int index)
Gets a tagged value by its collection index. |
java.lang.String |
getTaggedValue(java.lang.String name)
Gets the value of a tagged value. |
java.util.List |
getTaggedValueList()
Gets the tagged value list. |
java.util.Iterator |
getTaggedValues()
Gets the tagged value list. |
boolean |
hasFrameStrokeWidth()
Determines if the stroke width should be persisted. |
boolean |
hasOrientation()
Determines if the orientation of the figure should be persisted. |
boolean |
hasSizeX()
Determines if the horizontal size should be persisted. |
boolean |
hasSizeY()
Determines if the vertical size should be persisted. |
boolean |
initialize(java.lang.String descriptorResourcePath)
Initializes the descriptor. |
boolean |
isCyclicGradient()
Gets the cyclic gradient. |
void |
setCyclicGradient(boolean cyclicGradient)
Sets the cyclic gradient. |
void |
setFigureClassName(java.lang.String figureClassName)
Sets the figure class. |
void |
setFigureType(java.lang.String figureType)
Sets the figure type. |
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 |
setFillColor2Str(java.lang.String s)
Sets the second (optional) fill color for gradients (colon-separated RGBA value). |
void |
setFillColorStr(java.lang.String s)
Sets the fill color (colon-separated RGBA value). |
void |
setFrameColor(java.awt.Color frameColor)
Sets the frame color. |
void |
setFrameColorStr(java.lang.String s)
Sets the frame color (colon-separated RGBA value). |
void |
setFrameStrokeWidth(int frameStrokeWidth)
Sets the stroke width. |
void |
setGradientPos1(int gradientPos1)
Sets the position of the gradient (position 1) in a top-down figure orientation. |
void |
setGradientPos1Str(java.lang.String s)
Sets the position of the gradient (position 1) in a top-down figure orientation (string access). |
void |
setGradientPos2(int gradientPos2)
Sets the position of the gradient (position 2) in a top-down figure orientation. |
void |
setGradientPos2Str(java.lang.String s)
Sets the position of the gradient (position 2) in a top-down figure orientation (string access). |
void |
setImageFileName(java.lang.String imageFileName)
Sets the image file name. |
void |
setMaxSizeX(int maxSizeX)
Sets the maximum horizontal size. |
void |
setMaxSizeY(int maxSizeY)
Sets the maximum vertical size. |
void |
setMinSizeX(int minSizeX)
Sets the minimum horizontal size. |
void |
setMinSizeY(int minSizeY)
Sets the minimum vertical size. |
void |
setOrientation(Orientation orientation)
Sets the orientation of the figure. |
void |
setOrientationStr(java.lang.String s)
Sets the orientation of the figure (string access). |
void |
setSizeX(int sizeX)
Sets the horizontal size. |
void |
setSizeY(int sizeY)
Sets the vertical size. |
void |
setTaggedValueList(java.util.List taggedValueList)
Sets the tagged value list. |
boolean |
validate(java.lang.String descriptorResourcePath,
java.util.List errorMsgs)
Validates the descriptor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int GRADIENTPOS_CENTER
public static final int GRADIENTPOS_E
public static final int GRADIENTPOS_SE
public static final int GRADIENTPOS_S
public static final int GRADIENTPOS_SW
public static final int GRADIENTPOS_W
public static final int GRADIENTPOS_NW
public static final int GRADIENTPOS_N
public static final int GRADIENTPOS_NE
public static final int DEFAULT_SIZE
public static final int DEFAULT_FRAME_STROKE_WIDTH
public static final Orientation DEFAULT_ORIENTATION
public static final int DEFAULT_GRADIENT_POS
public static final int MIN_SIZE
public static final int MAX_SIZE
public static final int FLAG_CYCLIC_GRADIENT
| Constructor Detail |
|---|
public XFigureDescriptor()
| Method Detail |
|---|
public boolean validate(java.lang.String descriptorResourcePath,
java.util.List errorMsgs)
descriptorResourcePath - Resource path to the descriptor resourceserrorMsgs - List of strings that holds error messages
protected void addErrorMsg(java.util.List errorMsgs,
java.lang.String errorMsg)
errorMsgs - List of strings that holds error messageserrorMsg - Error msg to addpublic boolean initialize(java.lang.String descriptorResourcePath)
descriptorResourcePath - Resource path to the resource folder containing the descriptor
public XFigure createFigure()
protected java.lang.String determineFigureClassName()
public java.util.Iterator getTaggedValues()
TaggedValue objectspublic TaggedValue getTaggedValue(int index)
index - Collection index
public void addTaggedValue(TaggedValue taggedValue)
taggedValue - The tagged value to addpublic void clearTaggedValues()
public java.util.List getTaggedValueList()
TaggedValue objectspublic void setTaggedValueList(java.util.List taggedValueList)
taggedValueList - A list of TaggedValue objectspublic java.lang.String getTaggedValue(java.lang.String name)
name - Name of the attribute
public int getCustomIntAttributeValue(java.lang.String name,
int dflt)
name - Name of the attributedflt - The default value
public java.lang.String getFigureType()
public void setFigureType(java.lang.String figureType)
public java.lang.String getFigureClassName()
public void setFigureClassName(java.lang.String figureClassName)
public boolean hasOrientation()
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.lang.String getOrientationStr()
Orientation.RIGHT/Orientation.BOTTOM/Orientation.LEFT/Orientation.TOPpublic void setOrientationStr(java.lang.String s)
s - Orientation.RIGHT/Orientation.BOTTOM/Orientation.LEFT/Orientation.TOPpublic boolean hasSizeX()
public int getSizeX()
public void setSizeX(int sizeX)
public boolean hasSizeY()
public int getSizeY()
public void setSizeY(int sizeY)
public int getMinSizeX()
public void setMinSizeX(int minSizeX)
public int getMinSizeY()
public void setMinSizeY(int minSizeY)
public int getMaxSizeX()
public void setMaxSizeX(int maxSizeX)
public int getMaxSizeY()
public void setMaxSizeY(int maxSizeY)
public boolean hasFrameStrokeWidth()
public int getFrameStrokeWidth()
public void setFrameStrokeWidth(int frameStrokeWidth)
frameStrokeWidth - The stroke width in pixel/10 or 0 for no strokepublic java.awt.Color getFrameColor()
public void setFrameColor(java.awt.Color frameColor)
frameColor - The frame color or null for no framepublic java.awt.Color getFillColor()
public void setFillColor(java.awt.Color fillColor)
fillColor - Fill color or null for no fill colorpublic java.awt.Color getFillColor2()
public void setFillColor2(java.awt.Color fillColor2)
fillColor2 - Gradient color or null for solid fillpublic int getGradientPos1()
public void setGradientPos1(int gradientPos1)
gradientPos1 - See the NUM_* constants of the CircleConstants classpublic int getGradientPos2()
public void setGradientPos2(int gradientPos2)
gradientPos2 - See the NUM_* constants of the CircleConstants classpublic java.lang.String getGradientPos1Str()
public void setGradientPos1Str(java.lang.String s)
s - See the NUM_* constants of the CircleConstants classpublic java.lang.String getGradientPos2Str()
public void setGradientPos2Str(java.lang.String s)
s - See the NUM_* constants of the CircleConstants classpublic boolean isCyclicGradient()
public void setCyclicGradient(boolean cyclicGradient)
public java.lang.String getFrameColorStr()
public void setFrameColorStr(java.lang.String s)
public java.lang.String getFillColorStr()
public void setFillColorStr(java.lang.String s)
public java.lang.String getFillColor2Str()
public void setFillColor2Str(java.lang.String s)
public java.lang.String getImageFileName()
public void setImageFileName(java.lang.String imageFileName)
public java.awt.Stroke getFrameStroke()
public javax.swing.ImageIcon getImageIcon()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||