|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--did.gui.DIDCreationHandler
File: DIDCreationHandler.java Version: 1.0 Description: This class is responsible for the creation of both rectangle and polygon ROIs. Both types are created using mouse events. Rectangles are created by pressing the mouse at the point where you want the rectangle to begin then dragging the mouse to the proper size. Releasing the mouse completes the creation process. Polygons are created by clicking the mouse wherever you want a vertex to be placed. To complete the Polygon click on the orginal vertex. 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 | |
DIDCreationHandler(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 detect mouse clicks. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Method used to respond to the user dragging the mouse. |
void |
mouseEntered(java.awt.event.MouseEvent e)
This method is called when the mouse enters the component. |
void |
mouseExited(java.awt.event.MouseEvent e)
This method is called when the mouse leaves the component. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Method used to respond to the mouse being moved. |
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 user releasing the mouse. |
void |
setImageMax(int x,
int y)
Method used to set the maximum x and y coordinates thus establishing a virtual bounding rectangle (defined by the origin and max coordinates) which all ROIs must reside in. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public DIDCreationHandler(DIDImageCanvas canvas)
canvas
- The ImageCanvas to which this listener is registered.Method Detail |
public void setImageMax(int x, int y)
x
- The largest x coordinate.y
- The largest y coordinate.public void mouseClicked(java.awt.event.MouseEvent e)
e
- MouseEvent refelecting the current mouse properties.Polygon.addPoint(int, int)
public void mouseMoved(java.awt.event.MouseEvent e)
e
- MouseEvent refelecting the current mouse properties.mouseClicked(java.awt.event.MouseEvent)
,
DIDPolyRoi.setLastVertex(int, int)
public void mousePressed(java.awt.event.MouseEvent e)
e
- MouseEvent refelecting the current mouse properties.public void mouseDragged(java.awt.event.MouseEvent e)
e
- MouseEvent refelecting the current mouse properties.DIDRectRoi.setLocation(int, int)
public void mouseReleased(java.awt.event.MouseEvent e)
e
- MouseEvent refelecting the current mouse properties.#addRoi
public void mouseEntered(java.awt.event.MouseEvent e)
e
- MouseEvent refelecting the current mouse properties.public void mouseExited(java.awt.event.MouseEvent e)
e
- MouseEvent refelecting the current mouse properties.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 |