public abstract class CreatePointsInputHandler extends InputAdapter implements CanvasMarker
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
buttonTags |
protected java.awt.Point |
movingPoint |
protected TNetwork |
network |
protected java.util.List |
points |
Constructor and Description |
---|
CreatePointsInputHandler(TNetwork network) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Call this method to do some cleanup work.
|
TNetwork |
getNetwork() |
java.awt.geom.GeneralPath |
getPath() |
void |
init()
Initialize the input handler here.
|
protected boolean |
isValid(java.awt.event.MouseEvent e) |
void |
mark(java.awt.Graphics2D g)
Developers can implements this method to given additional code
to paint more information on the network canvas.
|
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
abstract boolean |
multiPointProcess(java.awt.event.MouseEvent e,
java.util.List points,
java.util.List buttonTags) |
keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseReleased
protected TNetwork network
protected java.awt.Point movingPoint
protected java.util.List points
protected java.util.List buttonTags
public CreatePointsInputHandler(TNetwork network)
public TNetwork getNetwork()
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class InputAdapter
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class InputAdapter
protected boolean isValid(java.awt.event.MouseEvent e)
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
mouseMoved
in class InputAdapter
public abstract boolean multiPointProcess(java.awt.event.MouseEvent e, java.util.List points, java.util.List buttonTags)
public void mark(java.awt.Graphics2D g)
CanvasMarker
mark
in interface CanvasMarker
g
- the graphics object.public java.awt.geom.GeneralPath getPath()
public void init()
init
in interface InputHandler
init
in class InputAdapter
public void cleanup()
cleanup
in interface InputHandler
cleanup
in class InputAdapter
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.