org.jzy3d.plot3d.rendering.legends.colorbars
Class ColorbarLegend

java.lang.Object
  extended by org.jzy3d.plot3d.rendering.view.ImageViewport
      extended by org.jzy3d.plot3d.rendering.legends.Legend
          extended by org.jzy3d.plot3d.rendering.legends.colorbars.ColorbarLegend
All Implemented Interfaces:
IDrawableListener

public class ColorbarLegend
extends Legend


Constructor Summary
ColorbarLegend(AbstractDrawable parent, IAxeLayout layout)
           
ColorbarLegend(AbstractDrawable parent, IAxeLayout layout, Color foreground)
           
ColorbarLegend(AbstractDrawable parent, IAxeLayout layout, Color foreground, Color background)
           
ColorbarLegend(AbstractDrawable parent, ITickProvider provider, ITickRenderer renderer)
           
ColorbarLegend(AbstractDrawable parent, ITickProvider provider, ITickRenderer renderer, Color foreground, Color background)
           
 
Method Summary
 void drawableChanged(DrawableChangedEvent e)
           
 java.awt.Dimension getMinimumSize()
          Return the minimum size for this graphic.
 java.awt.Rectangle getRectangle()
          Returns the (x,y) offset that was applied to make this AbstractViewport stand in the appropriate canvas part.
 boolean getStretchToFill()
           
 void render(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu)
          Renders the picture into the window, according to the viewport settings.
 void setMinimumSize(java.awt.Dimension dimension)
           
 void setScreenGridDisplayed(boolean status)
          Set the status of the screen grid.
 void setStretchToFill(boolean status)
          Set the status of the stretching mode (activated or not).
 void setViewPort(int width, int height)
          Set the view port (size of the renderer).
 java.awt.Image toImage(int width, int height)
           
 
Methods inherited from class org.jzy3d.plot3d.rendering.legends.Legend
dispose, saveImage, setViewPort, updateImage
 
Methods inherited from class org.jzy3d.plot3d.rendering.view.ImageViewport
getImage, getPreferedSize, setImage, setImage, setImage
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorbarLegend

public ColorbarLegend(AbstractDrawable parent,
                      IAxeLayout layout)

ColorbarLegend

public ColorbarLegend(AbstractDrawable parent,
                      IAxeLayout layout,
                      Color foreground)

ColorbarLegend

public ColorbarLegend(AbstractDrawable parent,
                      IAxeLayout layout,
                      Color foreground,
                      Color background)

ColorbarLegend

public ColorbarLegend(AbstractDrawable parent,
                      ITickProvider provider,
                      ITickRenderer renderer)

ColorbarLegend

public ColorbarLegend(AbstractDrawable parent,
                      ITickProvider provider,
                      ITickRenderer renderer,
                      Color foreground,
                      Color background)
Method Detail

render

public void render(javax.media.opengl.GL gl,
                   javax.media.opengl.glu.GLU glu)
Description copied from class: ImageViewport
Renders the picture into the window, according to the viewport settings. If the picture is bigger than the viewport, it is simply centered in it, otherwise, it is scaled in order to fit into the viewport.

Overrides:
render in class ImageViewport

toImage

public java.awt.Image toImage(int width,
                              int height)
Specified by:
toImage in class Legend

drawableChanged

public void drawableChanged(DrawableChangedEvent e)
Specified by:
drawableChanged in interface IDrawableListener
Specified by:
drawableChanged in class Legend

getMinimumSize

public java.awt.Dimension getMinimumSize()
Description copied from class: ImageViewport
Return the minimum size for this graphic.

Overrides:
getMinimumSize in class ImageViewport

setMinimumSize

public void setMinimumSize(java.awt.Dimension dimension)

setStretchToFill

public void setStretchToFill(boolean status)
Set the status of the stretching mode (activated or not). Stretching consist in displaying the projection into the full screen slice (i.e. viewport).

Parameters:
status -

getStretchToFill

public boolean getStretchToFill()

setViewPort

public void setViewPort(int width,
                        int height)
Set the view port (size of the renderer).

Parameters:
width - the width of the target window.
height - the height of the target window.

getRectangle

public java.awt.Rectangle getRectangle()
Returns the (x,y) offset that was applied to make this AbstractViewport stand in the appropriate canvas part. and the actual width and height of the viewport. Only relevant after a call to applyViewPort.


setScreenGridDisplayed

public void setScreenGridDisplayed(boolean status)
Set the status of the screen grid.

Parameters:
status - the grid is displayed if status is set to true