|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsimtools.shapes.AbstractShape
simtools.shapes.CompoundShape
public class CompoundShape
A class to group other shapes into
| Nested Class Summary | |
|---|---|
class |
CompoundShape.ShapeAndSize
|
| Nested classes/interfaces inherited from class simtools.shapes.AbstractShape |
|---|
AbstractShape.AbstractShapePropertiesNames |
| Field Summary | |
|---|---|
protected java.util.Vector |
_shapes
|
| Fields inherited from class simtools.shapes.AbstractShape |
|---|
_h, _ox, _oy, _propertyNames, _w, _x, _y, ANTI_ALIASING, currentDialogBox, FONT_NAMES, listeners, REFRESH_PERIOD |
| Constructor Summary | |
|---|---|
CompoundShape()
Creates a new shape |
|
| Method Summary | |
|---|---|
void |
addShape(AbstractShape as)
Adds a shape into |
void |
addShapes(java.util.Vector shapes)
Adds a set of shapes into |
protected AbstractShape |
cloneShape()
Performs a copy of the shape |
protected void |
computeAnchor()
|
protected void |
computeBounds()
|
boolean |
contains(AbstractShape as)
|
void |
draw(java.awt.Graphics2D g)
Draws the shape |
java.lang.String[] |
getPropertyNames()
Get the list of property names |
java.lang.Object |
getPropertyValue(java.lang.String name)
Get the value of the property named name |
AbstractShape |
getShape(int i)
|
void |
removeShape(AbstractShape as)
Removes a shape |
void |
removeShapes(java.util.Vector shapes)
Removes a set of shapes |
void |
resize(int dx,
int dy)
Resizes the shape |
java.util.Vector |
retainShapes(java.util.Vector shapes)
Retains only the shapes that are contained in a set of shapes |
void |
setPropertyValue(java.lang.String name,
java.lang.Object value)
Assigns value to the property named name |
void |
shapeChanged(AbstractShape shape,
java.awt.Rectangle changedArea)
Listen to our shapes |
int |
size()
|
void |
synchroSizes()
|
void |
translate(int dx,
int dy)
Translates the shape |
| Methods inherited from class simtools.shapes.AbstractShape |
|---|
addListener, contains, contains, contains, contains, getAnchor, getBounds, getBounds2D, getInnerProperties, getMax, getMaxTranslated, getMin, getPathIterator, getPathIterator, intersects, intersects, notifyChange, notifyChange, refresh, removeListener, setAnchor, setAnchor, setProperties, wipeOff |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Vector _shapes
| Constructor Detail |
|---|
public CompoundShape()
| Method Detail |
|---|
protected AbstractShape cloneShape()
cloneShape in class AbstractShapepublic int size()
public boolean contains(AbstractShape as)
public AbstractShape getShape(int i)
public void addShape(AbstractShape as)
public void addShapes(java.util.Vector shapes)
public void removeShape(AbstractShape as)
public void removeShapes(java.util.Vector shapes)
public java.util.Vector retainShapes(java.util.Vector shapes)
public void resize(int dx,
int dy)
resize in interface Resizabledx - value on x axisdy - value on y axis
public void translate(int dx,
int dy)
translate in class AbstractShapepublic void draw(java.awt.Graphics2D g)
draw in class AbstractShapeg - the graphics contextpublic void synchroSizes()
protected void computeBounds()
protected void computeAnchor()
public void shapeChanged(AbstractShape shape,
java.awt.Rectangle changedArea)
shapeChanged in interface ShapeListenerShapeListener.shapeChanged(simtools.shapes.AbstractShape,
java.awt.Rectangle)public java.lang.String[] getPropertyNames()
NamedProperties
getPropertyNames in interface NamedPropertiesgetPropertyNames in class AbstractShapepublic java.lang.Object getPropertyValue(java.lang.String name)
AbstractShapename
getPropertyValue in interface NamedPropertiesgetPropertyValue in class AbstractShapename - the name of the property to get
AbstractShape.getPropertyValue(String)
public void setPropertyValue(java.lang.String name,
java.lang.Object value)
AbstractShapevalue to the property named name
setPropertyValue in interface NamedPropertiessetPropertyValue in class AbstractShapename - the name of the property to getvalue - its new valueAbstractShape.setPropertyValue(String, Object)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||