|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinteractors.Interactor
interactors.ScaleInteractor
public class ScaleInteractor
Interaction for scaling an object.
Field Summary | |
---|---|
(package private) boolean |
mouseMoved
specifies if the mouse has moved while scaling an object |
(package private) double |
scale
the scale of the selected object |
Fields inherited from class interactors.Interactor |
---|
handler |
Constructor Summary | |
---|---|
ScaleInteractor(InteractionHandler handler)
Constructs the scale interactor. |
Method Summary | |
---|---|
void |
draw(GL gl,
GLU glu,
GLUT glut)
Draws the scaled outline of the selected object. |
java.awt.Cursor |
getCursor()
Gets the scale cursor. |
void |
mouseMoved(java.awt.event.MouseEvent arg0)
Moving the mouse modifies the the scale of the selected object. |
void |
mousePressed(java.awt.event.MouseEvent arg0)
Processes mouse presses: - Left click selects a new object if no object is selected - Left click applies the new scale if an object was selected and the mouse was moved |
void |
startInteraction()
Initializes the scale interaction. |
Methods inherited from class interactors.Interactor |
---|
endInteraction, keyPressed, keyReleased, mouseDragged, mouseReleased |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
double scale
boolean mouseMoved
Constructor Detail |
---|
public ScaleInteractor(InteractionHandler handler)
handler
- - the interaction handlerMethod Detail |
---|
public void startInteraction()
startInteraction
in class Interactor
public void draw(GL gl, GLU glu, GLUT glut)
draw
in class Interactor
public java.awt.Cursor getCursor()
getCursor
in class Interactor
public void mousePressed(java.awt.event.MouseEvent arg0)
mousePressed
in class Interactor
public void mouseMoved(java.awt.event.MouseEvent arg0)
mouseMoved
in class Interactor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |