org.openbp.jaspira.gui.interaction
Class ViewDropRegion
java.lang.Object
org.openbp.jaspira.gui.interaction.BasicDropRegion
org.openbp.jaspira.gui.interaction.ViewDropRegion
- All Implemented Interfaces:
- DragAwareRegion
public class ViewDropRegion
- extends BasicDropRegion
Drop region that takes works on a view component.
Takes into account the particularities of JScrollPane wrapping the view.
- Author:
- Stephan Moritz
|
Field Summary |
protected java.awt.Rectangle |
clipRect
Clip rectangle |
|
Constructor Summary |
ViewDropRegion(java.lang.Object id,
InteractionClient parent,
java.awt.geom.RectangularShape shape,
java.awt.Component origin)
Convenience constructor. |
|
Method Summary |
void |
draw(java.awt.Graphics2D g)
Draws the region with the given attributes. |
boolean |
reactsOn(int x,
int y)
Checks if the given coordinates are within the shapes region. |
| Methods inherited from class org.openbp.jaspira.gui.interaction.BasicDropRegion |
canImport, dragEnter, dragExit, getBounds, getCursor, getFrameColor, getId, getOrigin, getOverlay, getPaint, getParent, getShape, getStroke, getToolTipText, importData, 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 |
clipRect
protected java.awt.Rectangle clipRect
- Clip rectangle
ViewDropRegion
public ViewDropRegion(java.lang.Object id,
InteractionClient parent,
java.awt.geom.RectangularShape shape,
java.awt.Component origin)
- Convenience constructor.
reactsOn
public boolean reactsOn(int x,
int y)
- Checks if the given coordinates are within the shapes region.
- Specified by:
reactsOn in interface DragAwareRegion- Overrides:
reactsOn in class BasicDropRegion
- Parameters:
x - Position in screen coordinatesy - Position in screen coordinates
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
Copyright © 2011. All Rights Reserved.