|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectsprayTool
public class sprayTool
sprayTool is basically a tool which acts like a spraycan to spray onto the image the selected color. There are three sizes: small, medium, large. These sizes indicate how big of the diameter you want the spray to take up on the image. This tool works in all operating systems. There are no variances known. Also there are no security constraints known. No references to external specifications.
Field Summary | |
---|---|
(package private) java.awt.image.BufferedImage |
sprayImage
This is a BufferedImage. |
(package private) int |
sprayType
This integer is initially set at 8. |
(package private) java.awt.Color |
theColor
This is of class type Color. |
Constructor Summary | |
---|---|
sprayTool()
Creates a sprayTool object. |
Method Summary | |
---|---|
void |
clickAction(java.awt.event.MouseEvent mevt,
main_canvas theCanvas)
Allows the user to click on the canvas, using the spray tool. |
void |
dragAction(java.awt.event.MouseEvent mevt,
main_canvas theCanvas)
Allows the user to drag the spraying action. |
int |
getSprayType()
Returns the spray type of the can as an int. |
void |
mouseReleaseAction(java.awt.event.MouseEvent mevt,
main_canvas theCanvas)
Allows the user to release the mouse, and therefore stop spraying. |
void |
setSprayType(int newSprayType)
Sets the diameter of the spray can to the int passed in. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
int sprayType
java.awt.image.BufferedImage sprayImage
java.awt.Color theColor
Constructor Detail |
---|
public sprayTool()
Method Detail |
---|
public void clickAction(java.awt.event.MouseEvent mevt, main_canvas theCanvas)
clickAction
in interface ourTool
mevt
- This variable knows which button was clicked on the mouse. Left or right.theCanvas
- This is the main canvas where the mouse will click.public void dragAction(java.awt.event.MouseEvent mevt, main_canvas theCanvas)
dragAction
in interface ourTool
mevt
- This variable knows which button was clicked on the mouse. Left or right.theCanvas
- This is the main canvas where the mouse will click.public void mouseReleaseAction(java.awt.event.MouseEvent mevt, main_canvas theCanvas)
mouseReleaseAction
in interface ourTool
mevt
- This variable knows which button was clicked on the mouse. Left or right.theCanvas
- This is the main canvas where the mouse will click.public void setSprayType(int newSprayType)
newSprayType
- This variable is the spray diameter you want.getSprayType()
public int getSprayType()
setSprayType(int)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |