|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gvsig.fmap.mapcontrol.tools.Behavior.Behavior
public abstract class Behavior
When user is working with a tool on a MapControl instance, Behavior defines
the basic ways of interacting: selecting a point, a circle, a rectangle, or ...
All events generated will be MouseEvent, and will depend on the nature of the
behavior, like the kind of tool for applying the changes.
Behavior defines the common and basic functionality for all kinds of interacting ways
with the MapControl object.
IBehavior| Field Summary | |
|---|---|
protected org.gvsig.fmap.geom.GeometryManager |
geomManager
|
| Constructor Summary | |
|---|---|
Behavior()
|
|
| Method Summary | |
|---|---|
protected org.gvsig.fmap.geom.primitive.Arc |
createArc(double centerX,
double centerY,
double radious,
double angleStart,
double angleExtent)
Create an arc. |
protected org.gvsig.fmap.geom.primitive.Arc |
createArc(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2,
java.awt.geom.Point2D p3)
Create an Arc. |
protected org.gvsig.fmap.geom.primitive.Arc |
createArc(org.gvsig.fmap.geom.primitive.Point p1,
org.gvsig.fmap.geom.primitive.Point p2,
org.gvsig.fmap.geom.primitive.Point p3)
Create an arc. |
protected org.gvsig.fmap.geom.primitive.Circle |
createCircle(double centerX,
double centerY,
double radious)
Create an circle. |
protected org.gvsig.fmap.geom.primitive.Curve |
createLineString(org.gvsig.fmap.geom.primitive.GeneralPathX gpx)
Create a lineString from a GeneralPath. |
protected org.gvsig.fmap.geom.primitive.Point |
createPoint(double x,
double y)
Create point. |
protected org.gvsig.fmap.geom.primitive.Point |
createPoint(java.awt.geom.Point2D p1)
Create a curve point. |
java.awt.Image |
getImageCursor()
Gets the mouse cursor of the tool listener associated to this behavior. |
abstract ToolListener |
getListener()
Gets the ToolListener used by this behavior to perform actions on the
associated MapControl object. |
MapControl |
getMapControl()
Returns the reference to the MapControl object that this behavior uses. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
|
void |
paintComponent(MapControlDrawer mapControlDrawer)
Method executed in real-time, when user is working with a tool on the associated MapControl
object, repainting the MapControl's image. |
void |
setMapControl(MapControl mc)
Associates this behavior to a MapControl object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.gvsig.fmap.geom.GeometryManager geomManager
| Constructor Detail |
|---|
public Behavior()
| Method Detail |
|---|
protected org.gvsig.fmap.geom.primitive.Arc createArc(double centerX,
double centerY,
double radious,
double angleStart,
double angleExtent)
null and add the error
to the log
centerX - centerY - angleStart - angleExtent -
protected org.gvsig.fmap.geom.primitive.Arc createArc(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2,
java.awt.geom.Point2D p3)
null and add the error
to the log
p1 - p2 - p3 -
protected org.gvsig.fmap.geom.primitive.Arc createArc(org.gvsig.fmap.geom.primitive.Point p1,
org.gvsig.fmap.geom.primitive.Point p2,
org.gvsig.fmap.geom.primitive.Point p3)
null and add the error
to the log
p1 - p2 - p3 -
protected org.gvsig.fmap.geom.primitive.Circle createCircle(double centerX,
double centerY,
double radious)
null and add the error
to the log
centerX - centerY -
protected org.gvsig.fmap.geom.primitive.Curve createLineString(org.gvsig.fmap.geom.primitive.GeneralPathX gpx)
null and add the error
to the log
gpx - The GeneralPath
protected org.gvsig.fmap.geom.primitive.Point createPoint(double x,
double y)
null and add the error
to the log
x - The X coordinatey - The y coordinate
protected org.gvsig.fmap.geom.primitive.Point createPoint(java.awt.geom.Point2D p1)
null and add the error
to the log
p1 - The AWT point
public java.awt.Image getImageCursor()
IBehaviorGets the mouse cursor of the tool listener associated to this behavior.
getImageCursor in interface IBehaviorpublic abstract ToolListener getListener()
IBehaviorGets the ToolListener used by this behavior to perform actions on the
associated MapControl object.
getListener in interface IBehaviorToolListener used by this behaviorpublic MapControl getMapControl()
IBehaviorReturns the reference to the MapControl object that this behavior uses.
getMapControl in interface IBehaviorMapControl object used this behaviorIBehavior.setMapControl(MapControl)
public void mouseClicked(java.awt.event.MouseEvent e)
throws BehaviorException
mouseClicked in interface IBehaviorBehaviorException - any exception processing the action associated to a mouse clicked event, by the IBehavior objectMouseListener.mouseClicked(java.awt.event.MouseEvent)
public void mouseDragged(java.awt.event.MouseEvent e)
throws BehaviorException
mouseDragged in interface IBehaviorBehaviorException - any exception processing the action associated to a mouse dragged event, by the IBehavior objectMouseMotionListener.mouseDragged(java.awt.event.MouseEvent)
public void mouseEntered(java.awt.event.MouseEvent e)
throws BehaviorException
mouseEntered in interface IBehaviorBehaviorException - any exception processing the action associated to a mouse entered event, by the IBehavior objectMouseListener.mouseEntered(java.awt.event.MouseEvent)
public void mouseExited(java.awt.event.MouseEvent e)
throws BehaviorException
mouseExited in interface IBehaviorBehaviorException - any exception processing the action associated to a mouse exited event, by the IBehavior objectMouseListener.mouseExited(java.awt.event.MouseEvent)
public void mouseMoved(java.awt.event.MouseEvent e)
throws BehaviorException
mouseMoved in interface IBehaviorBehaviorException - any exception processing the action associated to a mouse moved event, by the IBehavior objectMouseMotionListener.mouseMoved(java.awt.event.MouseEvent)
public void mousePressed(java.awt.event.MouseEvent e)
throws BehaviorException
mousePressed in interface IBehaviorBehaviorException - any exception processing the action associated to a mouse pressed event, by the IBehavior objectMouseListener.mousePressed(java.awt.event.MouseEvent)
public void mouseReleased(java.awt.event.MouseEvent e)
throws BehaviorException
mouseReleased in interface IBehaviorBehaviorException - any exception processing the action associated to a mouse released event, by the IBehavior objectMouseListener.mouseReleased(java.awt.event.MouseEvent)
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
throws BehaviorException
mouseWheelMoved in interface IBehaviorBehaviorException - any exception processing the action associated to a mouse wheel event, by the IBehavior objectMouseWheelListener.mouseWheelMoved(java.awt.event.MouseWheelEvent)public void paintComponent(MapControlDrawer mapControlDrawer)
IBehaviorMethod executed in real-time, when user is working with a tool on the associated MapControl
object, repainting the MapControl's image.
Returns immediately in all cases, even if the complete image has not yet been loaded.
This method will be implemented according to the specific nature of each behavior, and its extra and particular features.
paintComponent in interface IBehaviorGraphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver)public void setMapControl(MapControl mc)
IBehaviorAssociates this behavior to a MapControl object.
setMapControl in interface IBehaviormc - the MapControl object to associateIBehavior.getMapControl()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||