public class Rectangle extends Shape implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private GShape |
basic |
private java.util.ArrayList<Vector2D> |
basicShape |
private static int |
counter |
private static long |
serialVersionUID |
private int |
sizeX |
private int |
sizeY |
| Constructor and Description |
|---|
Rectangle(Vector3D position,
int sizeX,
int sizeY)
Creates a rectangle.
|
| Modifier and Type | Method and Description |
|---|---|
Shape |
copy()
Creates a copy of this shape
|
Shape |
copyBaseForm()
Creates a copy of this shape with the basic values
|
toxi.geom.Rect |
getBoundingBox()
Not used
|
int |
getControlType(int index)
Returns the type of control for the parameter.
|
GShape |
getGShape()
Get the corresponding GShape
|
java.lang.String |
getNameOfControl(int index)
Returns the name (label) for the control for the parameter
|
int |
getNumberOfControls()
Returns the total number of possible controls to change the parameter
(allows properties enable this number of controls)
|
int |
getSizeX() |
int |
getSizeY() |
int |
getValue(int index)
Returns the actual value for the corresponding parameter
|
boolean |
mouseOver(Vector2D mousePosition)
Delegates check, if mouse is over this shape to the corresponding GShape
|
void |
recalculate()
Recalculates the vectors of the rectangle based on the input parameter
|
void |
setName(java.lang.String theValue)
Sets the name of this shape to name
|
void |
setShape(GShape shape)
Set the corresponding GShape
|
void |
setSize(Vector2D newSize)
Changes sizes of the rectangle
|
void |
setValue0(int size)
Change Parameter 1
|
void |
setValue1(int size)
Change Parameter 2
|
private static final long serialVersionUID
private int sizeX
private int sizeY
private static int counter
private GShape basic
private java.util.ArrayList<Vector2D> basicShape
public Rectangle(Vector3D position, int sizeX, int sizeY)
position - Position within the coordinate systemsizeX - Width of the rectangle (0.1mm)sizeY - Length of the rectangle (0.1mm)public void setName(java.lang.String theValue)
name - the namepublic int getNumberOfControls()
getNumberOfControls in interface PluggablegetNumberOfControls in class Shapepublic int getValue(int index)
public int getControlType(int index)
getControlType in interface PluggablegetControlType in class Shapeindex - The number of the controlled parameterpublic java.lang.String getNameOfControl(int index)
getNameOfControl in interface PluggablegetNameOfControl in class Shapeindex - The number of the controlled parameterpublic void recalculate()
recalculate in class Shapepublic void setValue0(int size)
size - Width of the rectangle (0.1mm)public void setValue1(int size)
size - Height of the rectangle (0.1mm)public int getSizeX()
public int getSizeY()
public void setSize(Vector2D newSize)
newSize - Length and Height of the rectangle (0.1mm)public void setShape(GShape shape)
shape - the corresponding GShapepublic GShape getGShape()
public boolean mouseOver(Vector2D mousePosition)
mousePosition - position of the mousepublic toxi.geom.Rect getBoundingBox()
public Shape copyBaseForm()
copyBaseForm in class Shape