public class JDGroup extends JDRectangular
Here is an exmaple of few group :
FILL_STYLE_DOT_PATTERN_1, FILL_STYLE_DOT_PATTERN_2, FILL_STYLE_DOT_PATTERN_3, FILL_STYLE_GRADIENT, FILL_STYLE_LARGE_CROSS_HATCH, FILL_STYLE_LARGE_LEFT_HATCH, FILL_STYLE_LARGE_RIGHT_HATCH, FILL_STYLE_NONE, FILL_STYLE_SMALL_CROSS_HATCH, FILL_STYLE_SMALL_LEFT_HATCH, FILL_STYLE_SMALL_RIGHT_HATCH, FILL_STYLE_SOLID, LINE_STYLE_DASH, LINE_STYLE_DASH_DOT, LINE_STYLE_DOT, LINE_STYLE_LONG_DASH, LINE_STYLE_SOLID, VALUE_CHANGE_ON_XDRAG_LEFT, VALUE_CHANGE_ON_XDRAG_RIGHT, VALUE_CHANGE_ON_YDRAG_BOTTOM, VALUE_CHANGE_ON_YDRAG_TOP, VALUE_INC_ON_CLICK, VALUE_INC_ON_PRESSRELEASE
Constructor and Description |
---|
JDGroup(java.lang.String objectName,
java.util.Vector o)
Construct a group.
|
Modifier and Type | Method and Description |
---|---|
JDObject |
copy(int x,
int y)
Returns a copy of this object at the specified location.
|
void |
generateJavaClass(java.io.FileWriter f)
Generates a Java class capable to paint this object using only
java awt functions.
|
JDObject |
getChildAt(int idx)
Returns the child at the specifed position.
|
java.util.Vector |
getChildren()
Returns a Vector containing all children of this group.
|
int |
getChildrenNumber()
Returns the number of child of this group.
|
void |
getObjectsByName(java.util.Vector result,
java.lang.String name,
boolean recurseGroup)
Returns all objects having the given name.
|
boolean |
isInsideObject(int x,
int y)
Determines whether the specified point is inside this object.
|
boolean |
isProgrammed()
Determines whether this object has a programmed behavior.
|
void |
moveSummit(int id,
double x,
double y)
Moves the specifed summit to the specified position.
|
void |
paint(JDrawEditor parent,
java.awt.Graphics g)
Paints this object.
|
void |
restoreTransform()
Restore original shape previously backuped by saveTransform
|
void |
rotate90(double x,
double y)
Rotate the object by 90deg.
|
void |
saveTransform()
Backup the shape.
|
void |
setAntiAlias(boolean alias)
Sets the anti aliasing for all objects of this group
|
void |
setBackground(java.awt.Color c)
Sets the background of this group, Apply it on all children.
|
void |
setChildrenList(java.util.Vector o)
Sets the children of this group.
|
void |
setFillStyle(int s)
Sets the fill style of this group, Apply it on all children.
|
void |
setForeground(java.awt.Color c)
Sets the foreground of this group, Apply it on all children.
|
void |
setInitValue(int v)
Sets the init value of this object.
|
void |
setInverseShadow(boolean b)
Sets the inverse shadow of this group, Apply it on all children.
|
void |
setLineStyle(int s)
Sets the line style of this group, Apply it on all children.
|
void |
setLineWidth(int w)
Sets the line width of this group, Apply it on all children.
|
void |
setMaxValue(int v)
Sets the max value of this object.
|
void |
setMinValue(int v)
Sets the minimum value of this object.
|
void |
setShadow(boolean b)
Sets the shadow of this group, Apply it on all children.
|
void |
setShadowWidth(int w)
Sets the shadow width of this group, Apply it on all children.
|
void |
setVisible(boolean b)
Shows or hides this object, Apply it on all children.
|
addExtension, addMouseListener, addValueListener, centerOrigin, clearMouseListener, clearValueListener, getBackground, getBackgroundMapper, getBoundRect, getExtendedParam, getExtendedParam, getExtendedParamDesc, getExtendedParamIndex, getExtendedParamName, getExtendedParamNumber, getFillStyle, getForeground, getForegroundMapper, getHTranslationMapper, getInitValue, getInvertShadowMapper, getLineStyle, getLineWidth, getMaxValue, getMinValue, getName, getOrigin, getShadowWidth, getSummit, getSummitNumber, getValue, getValueChangeMode, getVisibilityMapper, getVTranslationMapper, hasBackgroundMapper, hasExtendedParam, hasForegroundMapper, hasHTranslationMapper, hasInverseShadow, hasInvertShadowMapper, hasShadow, hasVisibilityMapper, hasVTranslationMapper, isAntiAliased, isDisabled, isFixedExtendedParam, isInteractive, isVisible, moveSummitH, moveSummitV, preRefresh, refresh, removeExtension, removeMouseListener, removeValueListener, scale, scaleTranslate, setBackgroundMapper, setDisabled, setExtendedParam, setExtendedParam, setExtensionList, setForegroundMapper, setGradientFillParam, setHTranslationMapper, setInteractive, setInvertShadowMapper, setName, setOrigin, setValue, setValueChangeMode, setVisibilityMapper, setVTranslationMapper, toString, translate
public JDGroup(java.lang.String objectName, java.util.Vector o)
objectName
- Group name.o
- Vector of JDObject to be grouped.public JDObject copy(int x, int y)
JDObject
public void paint(JDrawEditor parent, java.awt.Graphics g)
JDObject
paint
in class JDRectangular
parent
- JdrawEditor parent (Can be null except for JDSwingObject)g
- the specified Graphics windowpublic boolean isInsideObject(int x, int y)
JDObject
isInsideObject
in class JDObject
x
- X coordinate (pixel)y
- Y coordinate (pixel)public void restoreTransform()
JDObject
restoreTransform
in class JDObject
JDObject.saveTransform()
public void saveTransform()
JDObject
saveTransform
in class JDObject
JDObject.restoreTransform()
public void rotate90(double x, double y)
JDObject
rotate90
in class JDRectangular
x
- Rotation center horizontal posy
- Rotation center vertical posJDObject.refresh()
public void moveSummit(int id, double x, double y)
JDObject
moveSummit
in class JDRectangular
id
- Summit indexx
- Absolute X positiony
- Absolute Y positionJDObject.refresh()
public void setBackground(java.awt.Color c)
setBackground
in class JDObject
c
- Background color.JDObject.setBackground(java.awt.Color)
public void setForeground(java.awt.Color c)
setForeground
in class JDObject
c
- Foreground color.JDObject.setForeground(java.awt.Color)
public void setFillStyle(int s)
setFillStyle
in class JDObject
s
- Fill style.JDObject.setFillStyle(int)
public void setLineStyle(int s)
setLineStyle
in class JDObject
s
- Line style.JDObject.setLineStyle(int)
public void setAntiAlias(boolean alias)
setAntiAlias
in class JDObject
alias
- Anti aliasJDObject.setAntiAlias(boolean)
public void setLineWidth(int w)
setLineWidth
in class JDObject
w
- Line width.JDObject.setLineWidth(int)
public void setShadow(boolean b)
setShadow
in class JDObject
b
- Shadow flag.JDObject.setShadow(boolean)
public void setVisible(boolean b)
setVisible
in class JDObject
b
- True to show, false otherwise.public void setInverseShadow(boolean b)
setInverseShadow
in class JDObject
b
- Invert shadow flag.JDObject.setInverseShadow(boolean)
public void setShadowWidth(int w)
setShadowWidth
in class JDObject
w
- Shadow width.JDObject.setShadowWidth(int)
public void setMinValue(int v)
JDObject
setMinValue
in class JDObject
v
- Min valueJDObject.setInitValue(int)
,
JDObject.setMaxValue(int)
,
JDObject.setValue(int)
public void setMaxValue(int v)
JDObject
setMaxValue
in class JDObject
v
- Max valueJDObject.setInitValue(int)
,
JDObject.setMinValue(int)
,
JDObject.setValue(int)
public void setInitValue(int v)
JDObject
setInitValue
in class JDObject
v
- Initial value object.JDObject.setMaxValue(int)
,
JDObject.setMinValue(int)
,
JDObject.setValue(int)
public void getObjectsByName(java.util.Vector result, java.lang.String name, boolean recurseGroup)
JDObject
getObjectsByName
in class JDObject
result
- Result vector (must be constructed by the caller)name
- JDObject name (Case sensitive)recurseGroup
- true to perform a deep search whithin group, false otherwise.JDrawEditor.getObjectsByName(java.lang.String, boolean)
public boolean isProgrammed()
JDObject
isProgrammed
in class JDObject
JDObject.setValue(int)
public JDObject getChildAt(int idx)
idx
- Child indexpublic int getChildrenNumber()
public void setChildrenList(java.util.Vector o)
o
- Vector of JDObject to be grouped.public java.util.Vector getChildren()
public void generateJavaClass(java.io.FileWriter f) throws java.io.IOException
f
- file to be savedjava.io.IOException