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
FieldsModifier and TypeFieldDescriptionprotected AbstractAdativeRenderingHandlerprotected AdaptByDroppingHiDPIprotected AdaptByDroppingSmoothColorprotected AdaptByDroppingWireframeprotected AdaptByKeepingBoundingBoxOnlyprotected AdaptByPerformanceKnowledgeprotected ICanvasprotected booleanprotected Qualityprotected 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 GLprotected booleanKeep track if this is the first mouse drag event since the last mouse released event.protected booleanKeep track if optimization should be triggered or not.protected EmulGLPainterprotected AdaptiveRenderingPolicyAn optimization policyFields inherited from class org.jzy3d.chart.controllers.mouse.camera.AWTCameraMouseController
maintainInAxis, prevMouse, rateLimiter, scaledFields inherited from class org.jzy3d.chart.controllers.camera.AbstractCameraController
perf, threadController, updateViewDefaultFields inherited from class org.jzy3d.chart.controllers.AbstractController
controllerListeners, target -
Constructor Summary
ConstructorsConstructorDescriptionAdaptiveMouseController(Chart chart) AdaptiveMouseController(Chart chart, AdaptiveRenderingPolicy policy) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleandetectIfRenderingIsSlow(double lastRenderingTime) protected doubleprotected voidloadChartFields(Chart chart) voidWhen 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 rectanglevoidWhen 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 rectanglevoidWhen mouse button is released In 3D, does nothing In 2D, perform the zoom according to the selectionvoidsetPolicy(AdaptiveRenderingPolicy policy) protected voidprotected voidMethods 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, yMethods 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, zoomZMethods 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:AWTCameraMouseControllerWhen 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:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classAWTCameraMouseController
-
mouseDragged
Description copied from class:AWTCameraMouseControllerWhen 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:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classAWTCameraMouseController
-
mouseReleased
Description copied from class:AWTCameraMouseControllerWhen mouse button is released- In 3D, does nothing
- In 2D, perform the zoom according to the selection
- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classAWTCameraMouseController
-
getLastRenderingTimeFromCanvas
protected double getLastRenderingTimeFromCanvas() -
detectIfRenderingIsSlow
protected boolean detectIfRenderingIsSlow(double lastRenderingTime) -
loadChartFields
-
startOptimizations
protected void startOptimizations() -
stopOptimizations
protected void stopOptimizations() -
getPolicy
-
setPolicy
-