public class CopyShape extends Shape
| Modifier and Type | Field and Description |
|---|---|
private GShape |
basic |
private java.util.List<Vector2D> |
basicShape |
private static int |
counter |
private Vector2D |
position |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
CopyShape(java.util.List<Vector2D> list,
Vector2D position,
java.lang.String name)
Creates a copy of an existing shape - Set parameter corresponding
to the original shape
|
| Modifier and Type | Method and Description |
|---|---|
Shape |
copy()
Creates a copy of this shape
|
Shape |
copyBaseForm() |
int |
getControlType(int index)
Dummy - No Controls
|
GShape |
getGShape() |
java.lang.String |
getNameOfControl(int index)
Dummy - No Controls
|
int |
getNumberOfControls()
Dummy - No Controls
|
int |
getValue(int index)
Dummy - No Controls
|
void |
recalculate()
Dummy - Nothing to recalculate
|
void |
setName(java.lang.String theValue)
Sets the name of this shape to name
|
void |
setShape(GShape shape)
Set the corresponding GShape
|
private static final long serialVersionUID
private java.util.List<Vector2D> basicShape
private Vector2D position
private GShape basic
private static int counter
public CopyShape(java.util.List<Vector2D> list, Vector2D position, java.lang.String name)
list - list of vertices of the shape, same for copyposition - position of the original shape also as position for the copy
(update with mouse position)name - Name of the original shape will be modified with a "Copy"
string beforepublic GShape getGShape()
public void setName(java.lang.String theValue)
name - the namepublic void setShape(GShape shape)
shape - the corresponding GShapepublic int getValue(int index)
public int getNumberOfControls()
getNumberOfControls in interface PluggablegetNumberOfControls in class Shapepublic java.lang.String getNameOfControl(int index)
getNameOfControl in interface PluggablegetNameOfControl in class Shapepublic int getControlType(int index)
getControlType in interface PluggablegetControlType in class Shapepublic void recalculate()
recalculate in class Shapepublic Shape copyBaseForm()
copyBaseForm in class Shape