Package com.xxrjun.components.uml.basics
Class UMLBasicObject
java.lang.Object
com.xxrjun.components.uml.UMLObject
com.xxrjun.components.uml.basics.UMLBasicObject
- Direct Known Subclasses:
ClassBasicObject
,UseCaseBasicObject
The type Uml basic object.
-
Constructor Summary
ModifierConstructorDescriptionprotected
UMLBasicObject
(int x, int y, int width, int height, String objectName, UMLObjectTypes objectType) Instantiates a new Uml basic object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addConnectionLine
(UMLConnectionLine connectionLine, UMLConnectionLine.EndPointTypes endPointType) Add connection line.boolean
Contains boolean.void
drawObjectName
(int width, int textOffset, Graphics g) Draw object name.findNearestPort
(Point point) Find nearest port uml port.Gets object name.void
Highlight selection.void
Initialize ports.void
setObjectName
(String objectName) Sets object name.void
Update connection line.void
updateLocation
(int deltaX, int deltaY) Update location.Methods inherited from class com.xxrjun.components.uml.UMLObject
draw, getBounds, getObjectType, getX1, getX2, getY1, getY2, isGroupSelected, isNameChangeable, setGroupSelected, setNameChangeable, setObjectType, setX1, setX2, setY1, setY2
-
Constructor Details
-
UMLBasicObject
protected UMLBasicObject(int x, int y, int width, int height, String objectName, UMLObjectTypes objectType) Instantiates a new Uml basic object.- Parameters:
x
- the xy
- the ywidth
- the widthheight
- the heightobjectName
- the object nameobjectType
- the object type
-
-
Method Details
-
initializePorts
public void initializePorts()Description copied from class:UMLObject
Initialize ports.- Specified by:
initializePorts
in classUMLObject
-
highlightSelection
Description copied from class:UMLObject
Highlight selection.- Specified by:
highlightSelection
in classUMLObject
- Parameters:
g
- the g
-
contains
Description copied from class:UMLObject
Contains boolean. -
findNearestPort
Find nearest port uml port.- Parameters:
point
- the point- Returns:
- the uml port
-
updateConnectionLine
public void updateConnectionLine()Update connection line. -
updateLocation
public void updateLocation(int deltaX, int deltaY) Description copied from class:UMLObject
Update location.- Overrides:
updateLocation
in classUMLObject
- Parameters:
deltaX
- the move xdeltaY
- the move y
-
addConnectionLine
public void addConnectionLine(UMLConnectionLine connectionLine, UMLConnectionLine.EndPointTypes endPointType) Add connection line.- Parameters:
connectionLine
- the connection lineendPointType
- the end point type
-
setObjectName
Sets object name.- Parameters:
objectName
- the object name
-
getObjectName
Gets object name.- Returns:
- the object name
-
drawObjectName
Draw object name.- Parameters:
width
- the widthtextOffset
- the text offsetg
- the g
-