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
ConstructorsModifierConstructorDescriptionprotectedUMLBasicObject(int x, int y, int width, int height, String objectName, UMLObjectTypes objectType) Instantiates a new Uml basic object. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConnectionLine(UMLConnectionLine connectionLine, UMLConnectionLine.EndPointTypes endPointType) Add connection line.booleanContains boolean.voiddrawObjectName(int width, int textOffset, Graphics g) Draw object name.findNearestPort(Point point) Find nearest port uml port.Gets object name.voidHighlight selection.voidInitialize ports.voidsetObjectName(String objectName) Sets object name.voidUpdate connection line.voidupdateLocation(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:UMLObjectInitialize ports.- Specified by:
initializePortsin classUMLObject
-
highlightSelection
Description copied from class:UMLObjectHighlight selection.- Specified by:
highlightSelectionin classUMLObject- Parameters:
g- the g
-
contains
Description copied from class:UMLObjectContains 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:UMLObjectUpdate location.- Overrides:
updateLocationin 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
-