Package com.xxrjun.components.uml
Class UMLObject
java.lang.Object
com.xxrjun.components.uml.UMLObject
- Direct Known Subclasses:
UMLBasicObject
,UMLConnectionLine
,UMLGroup
The type Uml object.
-
Constructor Summary
ModifierConstructorDescriptionprotected
Instantiates a new Uml object.protected
UMLObject
(int x1, int y1, int x2, int y2, UMLObjectTypes objectType) Instantiates a new Uml object. -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
Contains boolean.abstract void
Draw.Gets bounds.Gets object type.int
getX1()
Gets x 1.int
getX2()
Gets x 2.int
getY1()
Gets y 1.int
getY2()
Gets y 2.abstract void
Highlight selection.abstract void
Initialize ports.boolean
Is group selected boolean.boolean
Is name changeable boolean.void
setGroupSelected
(boolean groupSelected) Sets group selected.void
setNameChangeable
(boolean nameChangeable) Sets name changeable.void
setObjectType
(UMLObjectTypes objectType) Sets object type.void
setX1
(int x1) Sets x 1.void
setX2
(int x2) Sets x 2.void
setY1
(int y1) Sets y 1.void
setY2
(int y2) Sets y 2.void
updateLocation
(int moveX, int moveY) Update location.
-
Constructor Details
-
UMLObject
protected UMLObject()Instantiates a new Uml object. -
UMLObject
Instantiates a new Uml object.- Parameters:
x1
- the x 1y1
- the y 1x2
- the x 2y2
- the y 2objectType
- the object type
-
-
Method Details
-
draw
Draw.- Parameters:
g
- the g
-
initializePorts
public abstract void initializePorts()Initialize ports. -
contains
Contains boolean.- Parameters:
p
- the p- Returns:
- the boolean
-
highlightSelection
Highlight selection.- Parameters:
g
- the g
-
updateLocation
public void updateLocation(int moveX, int moveY) Update location.- Parameters:
moveX
- the move xmoveY
- the move y
-
getX1
public int getX1()Gets x 1.- Returns:
- the x 1
-
setX1
public void setX1(int x1) Sets x 1.- Parameters:
x1
- the x 1
-
getY1
public int getY1()Gets y 1.- Returns:
- the y 1
-
setY1
public void setY1(int y1) Sets y 1.- Parameters:
y1
- the y 1
-
getX2
public int getX2()Gets x 2.- Returns:
- the x 2
-
setX2
public void setX2(int x2) Sets x 2.- Parameters:
x2
- the x 2
-
getY2
public int getY2()Gets y 2.- Returns:
- the y 2
-
setY2
public void setY2(int y2) Sets y 2.- Parameters:
y2
- the y 2
-
getObjectType
Gets object type.- Returns:
- the object type
-
setObjectType
Sets object type.- Parameters:
objectType
- the object type
-
isGroupSelected
public boolean isGroupSelected()Is group selected boolean.- Returns:
- the boolean
-
setGroupSelected
public void setGroupSelected(boolean groupSelected) Sets group selected.- Parameters:
groupSelected
- the group selected
-
isNameChangeable
public boolean isNameChangeable()Is name changeable boolean.- Returns:
- the boolean
-
setNameChangeable
public void setNameChangeable(boolean nameChangeable) Sets name changeable.- Parameters:
nameChangeable
- the name changeable
-
getBounds
Gets bounds.- Returns:
- the bounds
-