public class SelectionInputHandler extends InputAdapter implements CanvasMarker
Constructor and Description |
---|
SelectionInputHandler(TNetwork network)
Constructs a instance that is initialized with given network.
|
Modifier and Type | Method and Description |
---|---|
TNetwork |
getNetwork()
Return the network be listened.
|
void |
init()
Initialize the input handler here.
|
void |
mark(java.awt.Graphics2D g)
draw current select rectangle
|
void |
mouseDragged(java.awt.event.MouseEvent e)
When user drag mouse, this class draw a dragged rectangle
and make the selection of this rectangle.
|
void |
mousePressed(java.awt.event.MouseEvent e)
Mouse pressed.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
Mouse released.
|
cleanup, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseMoved
public SelectionInputHandler(TNetwork network)
network
- network will been listened.public void init()
InputHandler
init
in interface InputHandler
init
in class InputAdapter
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class InputAdapter
e
- mouse event.public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class InputAdapter
e
- mouse event.public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class InputAdapter
e
- public TNetwork getNetwork()
public void mark(java.awt.Graphics2D g)
mark
in interface CanvasMarker
g
- Copyright © 2002 - 2010 Serva Software. All Rights Reserved.