|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jzy3d.plot3d.rendering.view.AWTImageViewport
org.jzy3d.plot3d.rendering.legends.AWTLegend
public abstract class AWTLegend
A AWTLegend
represent information concerning a
AbstractDrawable
that may be displayed as a metadata in the
ChartView
.
The constructor of a AWTLegend
registers itself as listener of its
parent AbstractDrawable
, and unregister itself when it is disposed.
When defining a concrete AWTLegend
, one should:
toImage(int width, int height)
method, that defines
the picture representation.
drawableChanged(DrawableChangedEvent e)
method, that
must select events that actually triggers an image update.
AWTLegend
optimizes rendering by :
AWTLegend
dimensions
changed.
Field Summary | |
---|---|
protected ViewportConfiguration |
lastViewPort
|
protected ViewportMode |
mode
|
protected AbstractDrawable |
parent
|
protected float |
ratioHeight
|
protected float |
ratioWidth
|
protected int |
screenBottom
|
protected boolean |
screenGridDisplayed
|
protected int |
screenHeight
|
protected int |
screenLeft
|
protected int |
screenSquaredDim
|
protected int |
screenWidth
|
protected int |
screenXOffset
|
protected int |
screenYOffset
|
Fields inherited from class org.jzy3d.plot3d.rendering.view.AWTImageViewport |
---|
imageHeight, imageObj, imageWidth |
Constructor Summary | |
---|---|
AWTLegend(AbstractDrawable parent)
|
Method Summary | |
---|---|
protected ViewportConfiguration |
applyViewport(javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu)
Build and return a ViewportConfiguration . |
void |
dispose()
|
abstract void |
drawableChanged(DrawableChangedEvent e)
|
ViewportConfiguration |
getLastViewPort()
|
ViewportMode |
getMode()
|
Rectangle |
getRectangle()
Returns the (x,y) offset that was applied to make this AbstractViewportManager stand in the appropriate canvas part. and
the actual width and height of the viewport. |
void |
saveImage(String filename)
|
void |
setScreenGridDisplayed(boolean status)
Set the status of the screen grid. |
void |
setViewPort(int width,
int height)
Set the view port (size of the renderer). |
void |
setViewPort(int width,
int height,
float left,
float right)
Defines viewport dimensions, and precompute an image if required (i.e. if the viewport dimension have changed |
void |
setViewPort(ViewportConfiguration viewport)
|
void |
setViewportMode(ViewportMode mode)
|
abstract BufferedImage |
toImage(int width,
int height)
|
void |
updateImage()
Recompute the picture, using last used dimensions. |
Methods inherited from class org.jzy3d.plot3d.rendering.view.AWTImageViewport |
---|
getImage, getMinimumSize, getPreferedSize, render, setImage, setImage, setImage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jzy3d.plot3d.rendering.view.IImageViewport |
---|
getLastViewPort, getMinimumSize, getMode, getPreferedSize, render, setViewPort, setViewPort, setViewportMode |
Field Detail |
---|
protected AbstractDrawable parent
protected ViewportConfiguration lastViewPort
protected int screenLeft
protected int screenBottom
protected int screenXOffset
protected int screenYOffset
protected int screenWidth
protected int screenHeight
protected int screenSquaredDim
protected boolean screenGridDisplayed
protected ViewportMode mode
protected float ratioWidth
protected float ratioHeight
Constructor Detail |
---|
public AWTLegend(AbstractDrawable parent)
Method Detail |
---|
public void dispose()
public abstract BufferedImage toImage(int width, int height)
public abstract void drawableChanged(DrawableChangedEvent e)
drawableChanged
in interface IDrawableListener
drawableChanged
in interface ILegend
public void setViewPort(int width, int height, float left, float right)
setViewPort
in interface IImageViewport
width
- the width of the target window.height
- the height of the target window.left
- the width's ratio where this subscreen starts in the target
window.right
- the width's ratio where this subscreen stops in the target
window.public void updateImage()
ILegend
updateImage
in interface ILegend
public void saveImage(String filename) throws IOException
IOException
public void setViewPort(int width, int height)
width
- the width of the target window.height
- the height of the target window.public ViewportMode getMode()
public void setViewportMode(ViewportMode mode)
public void setViewPort(ViewportConfiguration viewport)
public ViewportConfiguration getLastViewPort()
protected ViewportConfiguration applyViewport(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu)
ViewportConfiguration
. Uses gl to
gl
- glu
- public Rectangle getRectangle()
AbstractViewportManager
stand in the appropriate canvas part. and
the actual width and height of the viewport. Only relevant after a call
to applyViewPort
.
public void setScreenGridDisplayed(boolean status)
status
- the grid is displayed if status is set to true
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |