|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectmedicineTool
public class medicineTool
The medicineTool class handles the image with the mouse events and color. The class medicineTool includes methods for clicking, dragging, and releasing the mouse, and for obtaining the color of the image. There are no OS/Hardware dependencies and no variances. There is no need for any security constraints and no references to external specifications.
Field Summary | |
---|---|
(package private) java.awt.Color |
myColor
The Color object that represents the image with the specified color. |
Constructor Summary | |
---|---|
medicineTool()
Creates a medinceTool object. |
Method Summary | |
---|---|
void |
clickAction(java.awt.event.MouseEvent mevt,
main_canvas theCanvas)
Presents the mouse event when a mouse button is pressed on a component without moving the mouse cursor. |
void |
dragAction(java.awt.event.MouseEvent mevt,
main_canvas theCanvas)
Allows the user to drag the mouse, using the medicineTool. |
java.awt.Color |
getMyColor()
Returns the Color of medicineTool. |
void |
mouseReleaseAction(java.awt.event.MouseEvent mevt,
main_canvas theCanvas)
Allows the user to release the mouse, using the medicineTool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.awt.Color myColor
Constructor Detail |
---|
public medicineTool()
Method Detail |
---|
public void clickAction(java.awt.event.MouseEvent mevt, main_canvas theCanvas)
clickAction
in interface ourTool
mevt
- contains information about the mouse event with x-coordinates and y-coordinates.theCanvas
- contains contents of the bufferedImage with its x-coordinate and y-coordinate.public void dragAction(java.awt.event.MouseEvent mevt, main_canvas theCanvas)
dragAction
in interface ourTool
mevt
- contains information about the mouse event.theCanvas
- contains contents of the main canvas image.public void mouseReleaseAction(java.awt.event.MouseEvent mevt, main_canvas theCanvas)
mouseReleaseAction
in interface ourTool
mevt
- contains information of the mouse events.theCanvas
- provides contents of the main canvas image.public java.awt.Color getMyColor()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |