templates.diagram
Class Entity.LabelBox

java.lang.Object
  extended by java.awt.geom.RectangularShape
      extended by java.awt.geom.Rectangle2D
          extended by java.awt.Rectangle
              extended by templates.diagram.Entity.LabelBox
All Implemented Interfaces:
java.awt.Shape, java.io.Serializable, java.lang.Cloneable
Enclosing class:
Entity

protected class Entity.LabelBox
extends java.awt.Rectangle

Class to maintain the graphical representation of the label of the entity.

Author:
Lenko Grigorov
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D
java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float
 
Field Summary
protected  java.util.Vector<java.lang.String> lines
          List of the lines into which the label is split.
 
Fields inherited from class java.awt.Rectangle
height, width, x, y
 
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
 
Constructor Summary
Entity.LabelBox(java.util.Vector<java.lang.String> lines)
          Construct a label box to render the lines of an Entity label.
 
Method Summary
 void draw(java.awt.Graphics2D g2d)
          Render the label box in the given graphical context.
 
Methods inherited from class java.awt.Rectangle
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, toString, translate, union
 
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
 
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects
 

Field Detail

lines

protected java.util.Vector<java.lang.String> lines
List of the lines into which the label is split.

Constructor Detail

Entity.LabelBox

public Entity.LabelBox(java.util.Vector<java.lang.String> lines)
Construct a label box to render the lines of an Entity label.

Parameters:
lines - the lines into which the label is split
Method Detail

draw

public void draw(java.awt.Graphics2D g2d)
Render the label box in the given graphical context.

Parameters:
g2d - the graphical context where the label box has to be rendered