Class ViewAndColorbarsLayout

java.lang.Object
org.jzy3d.plot3d.rendering.view.layout.ViewAndColorbarsLayout
All Implemented Interfaces:
IViewportLayout
Direct Known Subclasses:
EmulGLViewAndColorbarsLayout

public class ViewAndColorbarsLayout extends Object implements 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 View which handles its viewport with the Camera. If the view is and
    invalid @link
    AWTView
    or children, it also allows defining 2D 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 of Drawable having a ILegend set such as
    invalid @link
    AWTColorbarLegend
This allow making a composition of 3D and 2D content in a single screen.
Author:
Martin Pernollet
  • Field Details

    • screenSeparator

      protected float screenSeparator
    • hasColorbars

      protected boolean hasColorbars
    • sceneViewport

      protected ViewportConfiguration sceneViewport
    • backgroundViewport

      protected ViewportConfiguration backgroundViewport
    • legendsWidth

      protected float legendsWidth
    • chart

      protected Chart chart
  • Constructor Details

    • ViewAndColorbarsLayout

      public ViewAndColorbarsLayout()
  • Method Details

    • getChart

      public Chart getChart()
    • setChart

      public void setChart(Chart chart)
    • update

      public void update(Chart chart)
      Specified by:
      update in interface IViewportLayout
    • computeSeparator

      protected void computeSeparator(IPainter painter, ICanvas canvas, List<ILegend> legends)
    • updateAndGetMinDimensions

      protected int updateAndGetMinDimensions(IPainter painter, ILegend legend)
    • computeSeparator

      protected float computeSeparator(ICanvas canvas, int minWidth)
    • render

      public void render(IPainter painter, Chart chart)
      Once rendered, this layout knows the colorbar width which can be retrieved with getLegendsWidth()
      Specified by:
      render in interface IViewportLayout
    • renderView

      protected void renderView(IPainter painter, Chart chart)
    • renderLegends

      protected void renderLegends(IPainter painter, Chart chart)
    • updateLegendsWidth

      protected void updateLegendsWidth(Chart chart)
    • 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

      public List<ILegend> getLegends()
    • getLegends

      protected List<ILegend> getLegends(Chart chart)
    • getSceneViewport

      public ViewportConfiguration getSceneViewport()
      Return the scene viewport as it was processed according to the number of legends to display.
    • getBackgroundViewport

      public ViewportConfiguration 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).