|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--did.gui.DIDEditHandler
File: DIDEditHandler.java Version: 1.1 Description: This class handles all movement and scaling of ROIs (rotation was inteded to be handled by this class but for now is handled by the ImageCanvas). To do so it must be registered on the DIDImageCanvas for the type of events that it is to listen for. This class is setup to handle Mouse and Key events. Example: DIDEditHandler newEditHandler = new DIDEditHandler(DIDImageCanvas); addMouseMotionListener(newEditHandler) Three basic functionalities are exposed by this class: the ablility to translate an ROI to the active vertex, set the active vertex, and skew the active vertex (Rotation is also performed arount the active vertex but at the moment not by this class). The active vertex is therefore an important concept in the manipulation of ROIs and is set by holding down the control key and clicking on the on the vertex handle(the square around the vertex). Once set the active vertex appears in green. Note: This class also extends the KeyListener interface but does not implement any special code. Due to an unresolved issue which does not allow KeyEvent detection on any other object than the main Frame all key detection is being handled in the main Frame. This is only a stopgap measure. Once the soure of the error has been identified all KeyEvent detection should be moved to the appropriate classes. Modification Log: Date Name Comment xx-xx-xxxx XXX xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Constructor Summary | |
DIDEditHandler(DIDImageCanvas canvas)
Method used to instantiate the class. |
Method Summary | |
void |
keyPressed(java.awt.event.KeyEvent e)
This method is triggered when the user presses a key. |
void |
keyReleased(java.awt.event.KeyEvent e)
This method is triggered when the user releases a key. |
void |
keyTyped(java.awt.event.KeyEvent e)
This method is triggered when the user presses then releases a key. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Method used to respond to the mouse being clicked. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Method used to respond to the mouse being dragged. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Method used to respond to the mouse entering the Canvas. |
void |
mouseExited(java.awt.event.MouseEvent e)
Method used to respond to the mouse leaving the Canvas. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Method used to respond to the mouse moving in the Canvas. |
void |
mousePressed(java.awt.event.MouseEvent e)
Method used to respond to the mouse being pressed. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Method used to respond to the mouse being released. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public DIDEditHandler(DIDImageCanvas canvas)
canvas
- The ImageCanvas to which this listener is registered.Method Detail |
public void mousePressed(java.awt.event.MouseEvent e)
e
- A MouseEvent class describing the current state of the physical mouse device.public void mouseDragged(java.awt.event.MouseEvent e)
e
- A MouseEvent class describing the current state of the physical mouse device.public void mouseClicked(java.awt.event.MouseEvent e)
e
- A MouseEvent class describing the current state of the physical mouse device.public void mouseReleased(java.awt.event.MouseEvent e)
e
- A MouseEvent class describing the current state of the physical mouse device.public void mouseEntered(java.awt.event.MouseEvent e)
e
- A MouseEvent class describing the current state of the physical mouse device.public void mouseExited(java.awt.event.MouseEvent e)
e
- A MouseEvent class describing the current state of the physical mouse device.public void mouseMoved(java.awt.event.MouseEvent e)
e
- A MouseEvent class describing the current state of the physical mouse device.public void keyPressed(java.awt.event.KeyEvent e)
e
- KeyEvent refelecting the current keyboard properties.public void keyReleased(java.awt.event.KeyEvent e)
e
- KeyEvent refelecting the current keyboard properties.public void keyTyped(java.awt.event.KeyEvent e)
e
- KeyEvent refelecting the current keyboard properties.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |