|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Abstract superclass of all graphical components in the model. Subclasses include Nodes and Lines.
Field Summary | |
static int |
SEL_ALL
Indicates that this component may be selected together with any other component. |
static int |
SEL_EQUALS
Indicates that this component may only be selected with components of the same type. |
static int |
SEL_MOVABLES
Indicates that this component may be selected together with all movable components. |
static int |
SEL_NOTHING
Indicates that this component may only be selected alone. |
Method Summary | |
Object |
clone()
Clones the component |
void |
deselect()
Deselects the component. |
GraphicalSystem |
getGraphicalSystem()
Returns the system which includes the component. |
Shape |
getShape()
Returns the shape of the component. |
double |
getX()
Returns the x coordinate of the component (or its most prominent point). |
double |
getY()
Returns the y coordinate of the component (or its most prominent point). |
boolean |
isMovable()
Can this component be moved directly by the user? |
boolean |
isSelected()
Returns whether the component is currently selected. |
void |
move(double xOffset,
double yOffset)
Move the component (or its most prominent point). |
void |
recalculateShape()
Recalculates the shape of the component. |
void |
select()
Selects the component. |
int |
selectableWith()
Returns with which class of components this component can be selected. |
void |
setGraphicalSystem(GraphicalSystem graphicalSystem)
Sets the system which includes the component |
void |
setXY(double x,
double y)
Sets the coordinates of the component (or of its most prominent point). |
Object |
visit(ComponentVisitor visitor)
Visitor-pattern: visits this component. |
Field Detail |
public static final int SEL_NOTHING
public static final int SEL_EQUALS
public static final int SEL_MOVABLES
public static final int SEL_ALL
Method Detail |
public boolean isMovable()
public void move(double xOffset, double yOffset)
xOffset
- offset for move in x directionyOffset
- offset for move in y directionpublic int selectableWith()
public void select()
public void deselect()
public boolean isSelected()
public double getX()
public double getY()
public void setXY(double x, double y)
x
- the x coordinatey
- the y coordinatepublic Shape getShape()
public void recalculateShape()
public GraphicalSystem getGraphicalSystem()
public void setGraphicalSystem(GraphicalSystem graphicalSystem)
graphicalSystem
- the graphical systempublic Object visit(ComponentVisitor visitor)
visitor
- the visitor
public Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |