Class ViewAndColorbarsLayout
java.lang.Object
org.jzy3d.plot3d.rendering.view.layout.ViewAndColorbarsLayout
- All Implemented Interfaces:
IViewportLayout
- Direct Known Subclasses:
EmulGLViewAndColorbarsLayout
This class handles the layout of a main 3D plot on the left with additional legends (colorbars)
on the right side.
The canvas is composed of two
AbstractViewportManager
- The
View
which handles its viewport with theCamera
. If the view is andinvalid @link
AWTView
IViewOverlay
that can span on the left 3D side only or on the full canvas (hence also covering the 2D right side). - The
ILegend
objects which handle their viewport on their own. They are added to the right of the chart according to the number ofDrawable
having aILegend
set such asinvalid @link
AWTColorbarLegend
- Author:
- Martin Pernollet
-
Field Summary
Modifier and TypeFieldDescriptionprotected ViewportConfiguration
protected Chart
protected boolean
protected float
protected ViewportConfiguration
protected float
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
computeSeparator
(IPainter painter, ICanvas canvas, List<ILegend> legends) protected float
computeSeparator
(ICanvas canvas, int minWidth) Return the scene viewport as it was processed to cover the whole canvas.getChart()
getLegends
(Chart chart) float
Return the legend width as it was processed at the rendering stage.Return the scene viewport as it was processed according to the number of legends to display.void
Once rendered, this layout knows the colorbar width which can be retrieved withgetLegendsWidth()
protected void
renderLegends
(IPainter painter, float left, float right, List<ILegend> legends, ICanvas canvas) Renders the legends within the screen slice given by the left and right parameters.protected void
renderLegends
(IPainter painter, Chart chart) protected void
renderView
(IPainter painter, Chart chart) void
void
protected int
updateAndGetMinDimensions
(IPainter painter, ILegend legend) protected void
updateLegendsWidth
(Chart chart)
-
Field Details
-
screenSeparator
protected float screenSeparator -
hasColorbars
protected boolean hasColorbars -
sceneViewport
-
backgroundViewport
-
legendsWidth
protected float legendsWidth -
chart
-
-
Constructor Details
-
ViewAndColorbarsLayout
public ViewAndColorbarsLayout()
-
-
Method Details
-
getChart
-
setChart
-
update
- Specified by:
update
in interfaceIViewportLayout
-
computeSeparator
-
updateAndGetMinDimensions
-
computeSeparator
-
render
Once rendered, this layout knows the colorbar width which can be retrieved withgetLegendsWidth()
- Specified by:
render
in interfaceIViewportLayout
-
renderView
-
renderLegends
-
updateLegendsWidth
-
renderLegends
protected void renderLegends(IPainter painter, float left, float right, List<ILegend> legends, ICanvas canvas) Renders the legends within the screen slice given by the left and right parameters. -
getLegends
-
getLegends
-
getSceneViewport
Return the scene viewport as it was processed according to the number of legends to display. -
getBackgroundViewport
Return the scene viewport as it was processed to cover the whole canvas. -
getLegendsWidth
public float getLegendsWidth()Return the legend width as it was processed at the rendering stage. Hence this value is defined after a first rendering. It is used for processing the remaining part of the layout (other viewport needing the colorbar width information).
-