Class AdaptiveMouseController
java.lang.Object
org.jzy3d.chart.controllers.AbstractController
org.jzy3d.chart.controllers.camera.AbstractCameraController
org.jzy3d.chart.controllers.mouse.camera.AWTCameraMouseController
org.jzy3d.chart.controllers.mouse.camera.AdaptiveMouseController
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,MouseWheelListener
,EventListener
,ICameraMouseController
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jzy3d.chart.controllers.mouse.camera.AWTCameraMouseController
AWTCameraMouseController.MouseSelectionSettings
-
Field Summary
Modifier and TypeFieldDescriptionprotected AbstractAdativeRenderingHandler
protected AdaptByDroppingHiDPI
protected AdaptByDroppingSmoothColor
protected AdaptByDroppingWireframe
protected AdaptByKeepingBoundingBoxOnly
protected AdaptByPerformanceKnowledge
protected ICanvas
protected boolean
protected Quality
protected List<Wireframeable>
Keep track of drawable that have had their face disabled for optimization in order to re-activate at mouse release.protected List<Wireframeable>
Keep track of drawable that have had their wireframe disabled for optimization in order to re-activate at mouse release.protected GL
protected boolean
Keep track if this is the first mouse drag event since the last mouse released event.protected boolean
Keep track if optimization should be triggered or not.protected EmulGLPainter
protected AdaptiveRenderingPolicy
An optimization policyFields inherited from class org.jzy3d.chart.controllers.mouse.camera.AWTCameraMouseController
maintainInAxis, prevMouse, rateLimiter, scaled
Fields inherited from class org.jzy3d.chart.controllers.camera.AbstractCameraController
perf, threadController, updateViewDefault
Fields inherited from class org.jzy3d.chart.controllers.AbstractController
controllerListeners, target
-
Constructor Summary
ConstructorDescriptionAdaptiveMouseController
(Chart chart) AdaptiveMouseController
(Chart chart, AdaptiveRenderingPolicy policy) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
detectIfRenderingIsSlow
(double lastRenderingTime) protected double
protected void
loadChartFields
(Chart chart) void
When mouse is dragged In 3D, if left button is hold, rotates the view around the center of the scene In 3D, if right button is hold, shift the view along Z axis In 2D, update the memory of the stop point (bottom right) of the selection rectanglevoid
When a mouse button is pressed In 3D, if double click, start or stop the camera rotation thread if there is any attached In 2D, memorize the starting point (top left) of the selection rectanglevoid
When mouse button is released In 3D, does nothing In 2D, perform the zoom according to the selectionvoid
setPolicy
(AdaptiveRenderingPolicy policy) protected void
protected void
Methods inherited from class org.jzy3d.chart.controllers.mouse.camera.AWTCameraMouseController
applyMouse2DSelection, configureScaler, configureZoomAccordingTo2DView, dispose, drawCoord, drawCoord, format, getRateLimiter, getSelectionSettings, getViewportExcludingColorbar, handleSlaveThread, maintainInAxis, modelToScreen, mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved, register, screenToModel, screenToModel, screenToModel, setRateLimiter, setSelectionSettings, unregister, x, xy, y
Methods inherited from class org.jzy3d.chart.controllers.camera.AbstractCameraController
addSlaveThreadController, addThread, getLODPerf, getSlaveThreadController, getThread, isUpdateViewDefault, removeSlaveThreadController, rotate, rotate, rotate, setLODPerf, setUpdateViewDefault, shift, shift, startThreadController, stopThreadController, zoomX, zoomX, zoomY, zoomY, zoomZ, zoomZ
Methods inherited from class org.jzy3d.chart.controllers.AbstractController
addControllerEventListener, fireControllerEvent, getChart, getCharts, removeControllerEventListener
-
Field Details
-
currentQuality
-
currentHiDPI
protected boolean currentHiDPI -
canvas
-
gl
-
painter
-
policy
An optimization policy -
mustOptimizeMouseDrag
protected boolean mustOptimizeMouseDragKeep track if optimization should be triggered or not. Defined at mouse pressed. -
isFirstDrag
protected boolean isFirstDragKeep track if this is the first mouse drag event since the last mouse released event. This is used to trigger optimization only once when multiple successive mouse drag events are received. -
adaptByDroppingFace
-
adaptByDroppingFaceAndColoringWire
-
adaptByDroppingWireframe
-
adaptByDroppingHiDPI
-
adaptByDroppingSmoothColor
-
adaptByKeepingBoundingBoxOnly
-
adaptByPerformanceKnowledge
-
droppedWireframeToReset
Keep track of drawable that have had their wireframe disabled for optimization in order to re-activate at mouse release. -
droppedFaceAndColoredWireframeToReset
Keep track of drawable that have had their face disabled for optimization in order to re-activate at mouse release.
-
-
Constructor Details
-
AdaptiveMouseController
public AdaptiveMouseController() -
AdaptiveMouseController
-
AdaptiveMouseController
-
-
Method Details
-
mousePressed
Description copied from class:AWTCameraMouseController
When a mouse button is pressed- In 3D, if double click, start or stop the camera rotation thread if there is any attached
- In 2D, memorize the starting point (top left) of the selection rectangle
- Specified by:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classAWTCameraMouseController
-
mouseDragged
Description copied from class:AWTCameraMouseController
When mouse is dragged- In 3D, if left button is hold, rotates the view around the center of the scene
- In 3D, if right button is hold, shift the view along Z axis
- In 2D, update the memory of the stop point (bottom right) of the selection rectangle
- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classAWTCameraMouseController
-
mouseReleased
Description copied from class:AWTCameraMouseController
When mouse button is released- In 3D, does nothing
- In 2D, perform the zoom according to the selection
- Specified by:
mouseReleased
in interfaceMouseListener
- Overrides:
mouseReleased
in classAWTCameraMouseController
-
getLastRenderingTimeFromCanvas
protected double getLastRenderingTimeFromCanvas() -
detectIfRenderingIsSlow
protected boolean detectIfRenderingIsSlow(double lastRenderingTime) -
loadChartFields
-
startOptimizations
protected void startOptimizations() -
stopOptimizations
protected void stopOptimizations() -
getPolicy
-
setPolicy
-