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
ConstructorsModifierConstructorDescriptionprotectedInstantiates a new Uml object.protectedUMLObject(int x1, int y1, int x2, int y2, UMLObjectTypes objectType) Instantiates a new Uml object. -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanContains boolean.abstract voidDraw.Gets bounds.Gets object type.intgetX1()Gets x 1.intgetX2()Gets x 2.intgetY1()Gets y 1.intgetY2()Gets y 2.abstract voidHighlight selection.abstract voidInitialize ports.booleanIs group selected boolean.booleanIs name changeable boolean.voidsetGroupSelected(boolean groupSelected) Sets group selected.voidsetNameChangeable(boolean nameChangeable) Sets name changeable.voidsetObjectType(UMLObjectTypes objectType) Sets object type.voidsetX1(int x1) Sets x 1.voidsetX2(int x2) Sets x 2.voidsetY1(int y1) Sets y 1.voidsetY2(int y2) Sets y 2.voidupdateLocation(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
-