templates.presentation
Class EventLinker.EventLabel

java.lang.Object
  extended by java.awt.geom.RectangularShape
      extended by java.awt.geom.Rectangle2D
          extended by java.awt.Rectangle
              extended by templates.presentation.EventLinker.EventLabel
All Implemented Interfaces:
java.awt.Shape, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<EventLinker.EventLabel>
Enclosing class:
EventLinker

protected class EventLinker.EventLabel
extends java.awt.Rectangle
implements java.lang.Comparable<EventLinker.EventLabel>

The UI component used to render an event label in the event linker.

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
 boolean isInModel
          Information about whether the event is a part of the underlying model of the corresponding template component.
 Entity mom
          The Entity for the TemplateComponent whose event is rendered.
 java.lang.String name
          The name of the event.
 
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
EventLinker.EventLabel(Entity mom, java.lang.String name)
          Construct a new event label for the given event.
 
Method Summary
 int compareTo(EventLinker.EventLabel arg0)
          Compare first according to the hash code of the template component whose event is rendered; then according to the name of the event.
 boolean equals(java.lang.Object o)
           
 void paint(java.awt.Graphics2D g2d)
          Render the event label in the given graphics context.
 
Methods inherited from class java.awt.Rectangle
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, 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

mom

public Entity mom
The Entity for the TemplateComponent whose event is rendered.


name

public java.lang.String name
The name of the event.


isInModel

public boolean isInModel
Information about whether the event is a part of the underlying model of the corresponding template component. Set to true if the event is a part of the model, set to false otherwise.

Constructor Detail

EventLinker.EventLabel

public EventLinker.EventLabel(Entity mom,
                              java.lang.String name)
Construct a new event label for the given event.

Parameters:
mom - the Entity for the TemplateComponent whose event will be rendered
name - the name of the event
Method Detail

paint

public void paint(java.awt.Graphics2D g2d)
Render the event label in the given graphics context.

Parameters:
g2d - the graphics context where the event label should be rendered

compareTo

public int compareTo(EventLinker.EventLabel arg0)
Compare first according to the hash code of the template component whose event is rendered; then according to the name of the event.

Specified by:
compareTo in interface java.lang.Comparable<EventLinker.EventLabel>

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.awt.Rectangle