org.openbp.jaspira.gui.interaction
Class CircleDropRegion

java.lang.Object
  extended by org.openbp.jaspira.gui.interaction.BasicDropRegion
      extended by org.openbp.jaspira.gui.interaction.CircleDropRegion
All Implemented Interfaces:
DragAwareRegion

public class CircleDropRegion
extends BasicDropRegion

A circular drop region is a region that is only visible by displaying a small circle in its center.

Author:
Stephan Moritz

Field Summary
 
Fields inherited from class org.openbp.jaspira.gui.interaction.BasicDropRegion
id, origin, parent, toolTipText
 
Fields inherited from interface org.openbp.jaspira.gui.interaction.DragAwareRegion
COPY, COPY_OR_MOVE, MOVE, NONE
 
Constructor Summary
CircleDropRegion(java.lang.Object id, InteractionClient parent, java.awt.geom.RectangularShape shape, int diameter, java.awt.Component origin)
          Constructor.
 
Method Summary
 void draw(java.awt.Graphics2D g)
          Draws the region with the given attributes.
 java.awt.Rectangle getBounds()
          Returns the bounding box of the region.
 
Methods inherited from class org.openbp.jaspira.gui.interaction.BasicDropRegion
canImport, dragEnter, dragExit, getCursor, getFrameColor, getId, getOrigin, getOverlay, getPaint, getParent, getShape, getStroke, getToolTipText, importData, reactsOn, setCursor, setFrameColor, setId, setOrigin, setOverlay, setPaint, setParent, setShape, setStroke, setToolTipText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CircleDropRegion

public CircleDropRegion(java.lang.Object id,
                        InteractionClient parent,
                        java.awt.geom.RectangularShape shape,
                        int diameter,
                        java.awt.Component origin)
Constructor.

Parameters:
diameter - Diameter of the circle
Method Detail

draw

public void draw(java.awt.Graphics2D g)
Draws the region with the given attributes.

Specified by:
draw in interface DragAwareRegion
Overrides:
draw in class BasicDropRegion
Parameters:
g - Graphics context

getBounds

public java.awt.Rectangle getBounds()
Returns the bounding box of the region.

Specified by:
getBounds in interface DragAwareRegion
Overrides:
getBounds in class BasicDropRegion
Returns:
The bounding box


Copyright © 2011. All Rights Reserved.