public class ResizeInputHandler extends InputAdapter implements CanvasMarker
Constructor and Description |
---|
ResizeInputHandler(TNetwork network) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Call this method to do some cleanup work.
|
java.awt.geom.Rectangle2D.Double |
getColRectangle(Grid grid,
int colIndex) |
java.awt.geom.Rectangle2D.Double |
getGridContent(Grid grid) |
java.awt.geom.Rectangle2D.Double |
getRowRectangle(Grid grid,
int rowIndex) |
void |
init()
Initialize the input handler here.
|
void |
keyPressed(java.awt.event.KeyEvent 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) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
setHostAttribute(Grid grid) |
keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited
public ResizeInputHandler(TNetwork network)
public void init()
InputHandler
init
in interface InputHandler
init
in class InputAdapter
public void cleanup()
InputHandler
cleanup
in interface InputHandler
cleanup
in class InputAdapter
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class InputAdapter
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class InputAdapter
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
keyPressed
in class InputAdapter
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class InputAdapter
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
mouseMoved
in class InputAdapter
public void setHostAttribute(Grid grid)
public java.awt.geom.Rectangle2D.Double getGridContent(Grid grid)
public java.awt.geom.Rectangle2D.Double getColRectangle(Grid grid, int colIndex)
public java.awt.geom.Rectangle2D.Double getRowRectangle(Grid grid, int rowIndex)
public void mark(java.awt.Graphics2D g)
CanvasMarker
mark
in interface CanvasMarker
g
- the graphics object.Copyright © 2002 - 2010 Serva Software. All Rights Reserved.