backend.mousehandlerstates
Class DrawLineBaseState

java.lang.Object
  extended by backend.mousehandlerstates.MouseHandlerBaseState
      extended by backend.mousehandlerstates.DrawLineBaseState
Direct Known Subclasses:
DrawGreatCircleState, DrawLongLineState, DrawShortLineState

public abstract class DrawLineBaseState
extends MouseHandlerBaseState

DrawLineBaseState is a base class used for line drawing states of the MouseHandler


Constructor Summary
DrawLineBaseState(SphereWorldModel theWorld, java.lang.String theLabel)
          The default constructor just initalized the MouseHandlerBaseState
 
Method Summary
 void addCircle(SphereCircleModel addMe)
          addCircle will add a circle to be processed by this state
 void addLine(SphereLineModel addMe)
          addLine will add a line to be processed by this state
 void addPoint(float x, float y, float z)
          addPoints behavior changes based on the current state of the MouseHandler
 void addPoint(SpherePointModel addMe)
          addPoint will add a point to be processed by the mouse handler depending on when mode it's set it
 void enter()
          Code in the enter function will be executed when the MouseHandler changes to this state
 void exit()
          The exit function is always called when the state is being changed to a new state
 void newMouseLoc(java.awt.event.MouseEvent newLoc, javax.vecmath.Point3f worldLoc)
          newMouseLoc will be called when the mouse changes location
 void reset()
          The reset function should reset the state of this state
 boolean shouldHighlight(SphereBasicObject highlightMe)
          shouldHighlight will return ture if the given SphereBasicObject should be highlighted
 
Methods inherited from class backend.mousehandlerstates.MouseHandlerBaseState
getStateLabel, sendMouseLoc, setSendMouseLoc
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawLineBaseState

public DrawLineBaseState(SphereWorldModel theWorld,
                         java.lang.String theLabel)
The default constructor just initalized the MouseHandlerBaseState

Parameters:
theWorld -
Method Detail

addPoint

public void addPoint(float x,
                     float y,
                     float z)
Description copied from class: MouseHandlerBaseState
addPoints behavior changes based on the current state of the MouseHandler

Specified by:
addPoint in class MouseHandlerBaseState
Parameters:
x - is the x point to work with
y - is the y point to add to the world
z - is the z point to add to the world

addPoint

public void addPoint(SpherePointModel addMe)
Description copied from class: MouseHandlerBaseState
addPoint will add a point to be processed by the mouse handler depending on when mode it's set it

Specified by:
addPoint in class MouseHandlerBaseState
Parameters:
addMe - the point to add in SpheriosityPoint form

shouldHighlight

public boolean shouldHighlight(SphereBasicObject highlightMe)
Description copied from class: MouseHandlerBaseState
shouldHighlight will return ture if the given SphereBasicObject should be highlighted

Specified by:
shouldHighlight in class MouseHandlerBaseState
Parameters:
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!
Returns:
true if it should be highlighted false if not

enter

public void enter()
Description copied from class: MouseHandlerBaseState
Code in the enter function will be executed when the MouseHandler changes to this state

Specified by:
enter in class MouseHandlerBaseState

exit

public void exit()
Description copied from class: MouseHandlerBaseState
The exit function is always called when the state is being changed to a new state

Specified by:
exit in class MouseHandlerBaseState

reset

public void reset()
Description copied from class: MouseHandlerBaseState
The reset function should reset the state of this state

Specified by:
reset in class MouseHandlerBaseState

newMouseLoc

public void newMouseLoc(java.awt.event.MouseEvent newLoc,
                        javax.vecmath.Point3f worldLoc)
Description copied from class: MouseHandlerBaseState
newMouseLoc will be called when the mouse changes location

Specified by:
newMouseLoc in class MouseHandlerBaseState
Parameters:
newLoc - is the MouseEvent which has the latest mouse position stored in it
worldLoc - will be the mouse point in world coordinantes

addCircle

public void addCircle(SphereCircleModel addMe)
Description copied from class: MouseHandlerBaseState
addCircle will add a circle to be processed by this state

Specified by:
addCircle in class MouseHandlerBaseState
Parameters:
addMe - a SphereCircleModel to be added for processing

addLine

public void addLine(SphereLineModel addMe)
Description copied from class: MouseHandlerBaseState
addLine will add a line to be processed by this state

Specified by:
addLine in class MouseHandlerBaseState
Parameters:
addMe - a line to add for processing