kaapo.gui.diagramview
Class HotSpot

java.lang.Object
  extended by java.awt.geom.RectangularShape
      extended by java.awt.geom.Rectangle2D
          extended by java.awt.geom.Rectangle2D.Double
              extended by kaapo.gui.diagramview.HotSpot
All Implemented Interfaces:
Shape, Cloneable

public class HotSpot
extends Rectangle2D.Double

This class describes the HotSpot. It is a small rectangle which user can grab and resize elements or move connecions' points.

Author:
iheikkin

Nested Class Summary
static class HotSpot.HotSpotType
          Enum of HotSpot types available.
 
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float
 
Field Summary
static double HOTSPOT_SIZE
          Size of the HotSpot used in pixels.
 
Fields inherited from class java.awt.geom.Rectangle2D.Double
height, width, x, y
 
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
 
Constructor Summary
HotSpot(DiagramComponentWrapper dcw, HotSpot.HotSpotType type, Point2D location)
          Creates a new HotSpot
HotSpot(DiagramComponentWrapper dcw, HotSpot.HotSpotType type, Point2D location, int pathIndex)
          Creates a new HotSpot
 
Method Summary
 DiagramComponentWrapper getDcw()
          Gets the DiagramComponentWrapper of the HotSpot
 int getPathIndex()
          Gets the pathIndex of the HotSpot
 HotSpot.HotSpotType getType()
          Gets the type of the HotSpot
 void paint(Graphics2D g2)
          Paints this HotSpot
 
Methods inherited from class java.awt.geom.Rectangle2D.Double
createIntersection, createUnion, getBounds2D, getHeight, getWidth, getX, getY, isEmpty, outcode, setRect, setRect, toString
 
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, equals, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, union
 
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getBounds, 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
 

Field Detail

HOTSPOT_SIZE

public static final double HOTSPOT_SIZE
Size of the HotSpot used in pixels.

See Also:
Constant Field Values
Constructor Detail

HotSpot

public HotSpot(DiagramComponentWrapper dcw,
               HotSpot.HotSpotType type,
               Point2D location,
               int pathIndex)
Creates a new HotSpot

Parameters:
dcw - DiagramComponentWrapper this HotSpot is on
type - Type of the action
location - Location this HotSpot will be painted in
pathIndex - Connections pathIndex this HotSpot will handle with

HotSpot

public HotSpot(DiagramComponentWrapper dcw,
               HotSpot.HotSpotType type,
               Point2D location)
Creates a new HotSpot

Parameters:
dcw - DiagramComponentWrapper this HotSpot is on
type - Type of the action
location - Location this HotSpot will be painted in
Method Detail

paint

public void paint(Graphics2D g2)
Paints this HotSpot

Parameters:
g2 - Graphics2D context

getType

public HotSpot.HotSpotType getType()
Gets the type of the HotSpot

Returns:
Type of the HotSpot

getPathIndex

public int getPathIndex()
Gets the pathIndex of the HotSpot

Returns:
pathIndex of the HotSpot

getDcw

public DiagramComponentWrapper getDcw()
Gets the DiagramComponentWrapper of the HotSpot

Returns:
DiagramComponentWrapper of the HotSpot