|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbackend.mousehandlerstates.MouseHandlerBaseState
public abstract class MouseHandlerBaseState
MouseHandlerBaseState is the state which needs to be extended by any state that the MouseHandler will use
Constructor Summary | |
---|---|
MouseHandlerBaseState(SphereWorldModel theWorld,
java.lang.String theLabel,
boolean needMouseLoc)
MouseHandlerBaseState constructor simply does variable initalization but should be called |
Method Summary | |
---|---|
abstract void |
addCircle(SphereCircleModel addMe)
addCircle will add a circle to be processed by this state |
abstract void |
addLine(SphereLineModel addMe)
addLine will add a line to be processed by this state |
abstract void |
addPoint(float x,
float y,
float z)
addPoints behavior changes based on the current state of the MouseHandler |
abstract void |
addPoint(SpherePointModel addMe)
addPoint will add a point to be processed by the mouse handler depending on when mode it's set it |
abstract void |
enter()
Code in the enter function will be executed when the MouseHandler changes to this state |
abstract void |
exit()
The exit function is always called when the state is being changed to a new state |
java.lang.String |
getStateLabel()
Returns the label for this state |
abstract void |
newMouseLoc(java.awt.event.MouseEvent newPoint,
javax.vecmath.Point3f worldLoc)
newMouseLoc will be called when the mouse changes location |
abstract void |
reset()
The reset function should reset the state of this state |
boolean |
sendMouseLoc()
|
void |
setSendMouseLoc(boolean newVal)
|
abstract boolean |
shouldHighlight(SphereBasicObject highlightMe)
shouldHighlight will return ture if the given SphereBasicObject should be highlighted |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MouseHandlerBaseState(SphereWorldModel theWorld, java.lang.String theLabel, boolean needMouseLoc)
theWorld
- Is the SphereWorld we are dealing withtheLabel
- is the label corresponding to the button for this stateneedMouseLoc
- should be set to true if you want to receive the
current location of the mouseMethod Detail |
---|
public abstract void enter()
public abstract void addPoint(float x, float y, float z)
x
- is the x point to work withy
- is the y point to add to the worldz
- is the z point to add to the worldpublic abstract void addPoint(SpherePointModel addMe)
addMe
- the point to add in SpheriosityPoint formpublic abstract void addLine(SphereLineModel addMe)
addMe
- a line to add for processingpublic abstract void addCircle(SphereCircleModel addMe)
addMe
- a SphereCircleModel to be added for processingpublic boolean sendMouseLoc()
public void setSendMouseLoc(boolean newVal)
public abstract void newMouseLoc(java.awt.event.MouseEvent newPoint, javax.vecmath.Point3f worldLoc)
newPoint
- is the MouseEvent which has the latest mouse position
stored in itworldLoc
- will be the mouse point in world coordinantespublic abstract void exit()
public abstract void reset()
public java.lang.String getStateLabel()
public abstract boolean shouldHighlight(SphereBasicObject highlightMe)
highlightMe
- the SphereBasicObject to test for highlighting. It
will be assumed that the mouse is already hovering over this object. Do
not think this function will test for that as well!
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |