|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectbucketTool
public class bucketTool
This class is for the bucket option which is coloring the canvas with a specific color. The state should be enable. OS is windows. Implementation variances are not allowed. There are no security constraints. There are no external specifications.
Field Summary | |
---|---|
(package private) int |
imgHeight
These variable are ints that stores in the width and height. |
(package private) int |
imgWidth
These variable are ints that stores in the width and height. |
Constructor Summary | |
---|---|
bucketTool()
Creates a bucketTool with no parameters. |
Method Summary | |
---|---|
void |
clickAction(java.awt.event.MouseEvent mevt,
main_canvas theCanvas)
Controls what the user clicks as specified by the MouseEvent and main_canvas passed in. |
void |
dragAction(java.awt.event.MouseEvent mevt,
main_canvas theCanvas)
Should allow the user to drag the bucket as specified by the MouseEvent and main_canvas passed in. |
void |
mouseReleaseAction(java.awt.event.MouseEvent mevt,
main_canvas theCanvas)
Should allow the user to release the mouse on the bucket as specified by the MouseEvent and main_canvas passed in. |
void |
pour(java.awt.image.BufferedImage theImage,
int boundRGB,
int newRGBValue,
int x,
int y)
Pours the paint onto the canvas as specified by the BufferedImage, and size passed in. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
int imgWidth
int imgHeight
Constructor Detail |
---|
public bucketTool()
Method Detail |
---|
public void clickAction(java.awt.event.MouseEvent mevt, main_canvas theCanvas)
clickAction
in interface ourTool
mevt
- this is a MouseEventtheCanvas
- this is a main_canvas variablepublic void dragAction(java.awt.event.MouseEvent mevt, main_canvas theCanvas)
dragAction
in interface ourTool
mevt
- this is a MouseEventtheCanvas
- this is a main_canvas variablepublic void mouseReleaseAction(java.awt.event.MouseEvent mevt, main_canvas theCanvas)
mouseReleaseAction
in interface ourTool
mevt
- this is a MouseEventtheCanvas
- this is a main_canvas variablepublic void pour(java.awt.image.BufferedImage theImage, int boundRGB, int newRGBValue, int x, int y)
theImage
- BufferedImageboundRGB
- intnewRGBValue
- intx
- int reflecting widthy
- int reflecting height
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |