Class ViewAndColorbarsLayout
java.lang.Object
org.jzy3d.plot3d.rendering.view.layout.ViewAndColorbarsLayout
- All Implemented Interfaces:
IViewportLayout
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
Viewwhich handles its viewport with theCamera. If the view is andor children, it also allows defining 2Dinvalid reference
AWTViewIViewOverlaythat can span on the left 3D side only or on the full canvas (hence also covering the 2D right side). - The
ILegendobjects which handle their viewport on their own. They are added to the right of the chart according to the number ofDrawablehaving aILegendset such asinvalid reference
AWTColorbarLegend
- Author:
- Martin Pernollet
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ViewportConfigurationprotected Chartprotected booleanprotected floatprotected ViewportConfigurationprotected float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcomputeSeparator(IPainter painter, ICanvas canvas, List<ILegend> legends) protected floatcomputeSeparator(ICanvas canvas, int minWidth) Return the scene viewport as it was processed to cover the whole canvas.getChart()getLegends(Chart chart) floatReturn 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.voidOnce rendered, this layout knows the colorbar width which can be retrieved withgetLegendsWidth()protected voidrenderLegends(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 voidrenderLegends(IPainter painter, Chart chart) protected voidrenderView(IPainter painter, Chart chart) voidvoidprotected intupdateAndGetMinDimensions(IPainter painter, ILegend legend) protected voidupdateLegendsWidth(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:
updatein interfaceIViewportLayout
-
computeSeparator
-
updateAndGetMinDimensions
-
computeSeparator
-
render
Once rendered, this layout knows the colorbar width which can be retrieved withgetLegendsWidth()- Specified by:
renderin interfaceIViewportLayout
-
renderView
-
renderLegends
-
updateLegendsWidth
-
renderLegends
-
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).
-