Class UMLObject

java.lang.Object
com.xxrjun.components.uml.UMLObject
Direct Known Subclasses:
UMLBasicObject, UMLConnectionLine, UMLGroup

public abstract class UMLObject extends Object
The type Uml object.
  • Constructor Details

    • UMLObject

      protected UMLObject()
      Instantiates a new Uml object.
    • UMLObject

      protected UMLObject(int x1, int y1, int x2, int y2, UMLObjectTypes objectType)
      Instantiates a new Uml object.
      Parameters:
      x1 - the x 1
      y1 - the y 1
      x2 - the x 2
      y2 - the y 2
      objectType - the object type
  • Method Details

    • draw

      public abstract void draw(Graphics g)
      Draw.
      Parameters:
      g - the g
    • initializePorts

      public abstract void initializePorts()
      Initialize ports.
    • contains

      public abstract boolean contains(Point p)
      Contains boolean.
      Parameters:
      p - the p
      Returns:
      the boolean
    • highlightSelection

      public abstract void highlightSelection(Graphics g)
      Highlight selection.
      Parameters:
      g - the g
    • updateLocation

      public void updateLocation(int moveX, int moveY)
      Update location.
      Parameters:
      moveX - the move x
      moveY - 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

      public UMLObjectTypes getObjectType()
      Gets object type.
      Returns:
      the object type
    • setObjectType

      public void setObjectType(UMLObjectTypes objectType)
      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

      public Rectangle getBounds()
      Gets bounds.
      Returns:
      the bounds