Class SelectionMouseOwner
java.lang.Object
java.awt.event.MouseAdapter
com.j3d.engine.interact.input.mouse.MouseOwner
com.j3d.engine.interact.selection.SelectionMouseOwner
- All Implemented Interfaces:
EventEmitterInterface,MouseListener,MouseMotionListener,MouseWheelListener,EventListener
SelectionMouseOwner is a MouseOwner which is responsible for handling mouse events related to
selection in the sceneManager. It allows the user to click and drag to create a selection square on
the screen, which can be used to select multiple objects in the sceneManager. It also allows the user
to click to clear the selection square and broadcast an event to clear the selection in the
SceneManager- Author:
- Lehlogonolo Poole
- See Also:
-
Field Summary
Fields inherited from class com.j3d.engine.interact.input.mouse.MouseOwner
registered -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the selection square drawn on the screen and resets the mouse position.voidvoidThis method is called when a mouse drag event occurs, but only after theMouseOwner.clickDelayThresholdhas been exceeded.voidvoidHandles the mouse pressed event.Methods inherited from class com.j3d.engine.interact.input.mouse.MouseOwner
attachListener, broadcast, clear, detachAll, detachListener, getMouseLoc, getMouseLocFromPhysical, getPhysicalMouse, getSelectionMouseLoc, isAttached, isNotOwner, mouseDragged, mouseMoved, requestOwnership, sendMouseToCentre, setOldPoint, wrapMethods inherited from class java.awt.event.MouseAdapter
mouseEntered, mouseExited, mouseWheelMoved
-
Constructor Details
-
SelectionMouseOwner
public SelectionMouseOwner()
-
-
Method Details
-
clearSelectionSquare
public void clearSelectionSquare()Clears the selection square drawn on the screen and resets the mouse position. -
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener- Overrides:
mouseClickedin classMouseAdapter
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classMouseAdapter
-
mouseReleased
Description copied from class:MouseOwnerHandles the mouse pressed event.- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classMouseOwner- Parameters:
e- the event to be processed
-
mouseDraggedUsingClickDelay
Description copied from class:MouseOwnerThis method is called when a mouse drag event occurs, but only after theMouseOwner.clickDelayThresholdhas been exceeded. This is used to differentiate between a click and a drag.- Overrides:
mouseDraggedUsingClickDelayin classMouseOwner- Parameters:
e- The mouse event.
-