|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pzgui.AbstractDrawable
public abstract class AbstractDrawable
Designates an object which may be drawn and/or selected.
| Constructor Summary | |
|---|---|
AbstractDrawable()
|
|
| Method Summary | |
|---|---|
abstract boolean |
contains(int x,
int y)
Whether these x, y coordinates fall are contained by the object |
void |
drag(int x,
int y)
Called when the object is dragged to position x, y |
void |
drawBeforeObject(java.awt.Graphics2D gfx)
Graphics to be drawn before drawObject() is called |
abstract void |
drawObject(java.awt.Graphics2D gfx)
Draw this object |
boolean |
isDrawn()
Whether this object has been drawn this redraw cycle |
boolean |
isHovered()
Whether this object currently has the mouse over it |
boolean |
isSelected()
Whether this object is currently selected |
void |
setHovered(boolean hovering)
Set whether this object currently has the mouse over it |
void |
setSelected(boolean selected)
Set whether this object is currently selected |
void |
unsetDrawn()
Flag this object as undrawn for the current redraw cycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractDrawable()
| Method Detail |
|---|
public void drawBeforeObject(java.awt.Graphics2D gfx)
Drawable
drawBeforeObject in interface Drawablepublic abstract void drawObject(java.awt.Graphics2D gfx)
Drawable
drawObject in interface Drawable
public abstract boolean contains(int x,
int y)
Drawable
contains in interface Drawablepublic final boolean isDrawn()
Drawable
isDrawn in interface Drawablepublic void unsetDrawn()
Drawable
unsetDrawn in interface Drawablepublic boolean isSelected()
Drawable
isSelected in interface Drawablepublic void setSelected(boolean selected)
Drawable
setSelected in interface Drawablepublic boolean isHovered()
Drawable
isHovered in interface Drawablepublic void setHovered(boolean hovering)
Drawable
setHovered in interface Drawable
public void drag(int x,
int y)
Drawable
drag in interface Drawable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||