VeaR/JEllipse

pl.krakow.cmuj.bioinformatics.jellipse
Class PlotRenderer

java.lang.Object
  extended by pl.krakow.cmuj.bioinformatics.jellipse.PlotRenderer
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, net.java.games.jogl.GLEventListener, Screenshottable

public class PlotRenderer
extends java.lang.Object
implements Screenshottable, net.java.games.jogl.GLEventListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener


Field Summary
private  float[] black
           
(package private)  Peptide chain
           
(package private)  java.awt.image.DataBufferInt dbInt
           
private  float[] golden
           
(package private)  jEllipse owner
           
(package private)  int pbufferHeight
           
(package private)  int pbufferWidth
           
private  int prevMouseX
           
private  int prevMouseY
           
(package private)  boolean SCREENSHOTTING
           
private  float[] white
           
 
Constructor Summary
PlotRenderer(jEllipse owner, Peptide chain)
           
 
Method Summary
 void display(net.java.games.jogl.GLDrawable drawable)
          Main rederning function.
 void displayChanged(net.java.games.jogl.GLDrawable drawable, boolean modeChanged, boolean deviceChanged)
          Rumour has it that in JoGL 1.0 not implemeted...
 void drawText(net.java.games.jogl.GLDrawable drawable, java.lang.String text)
           
 java.awt.image.DataBufferInt getScreenshotBuffer()
           
 java.awt.Dimension getScreenshotDims()
           
 void init(net.java.games.jogl.GLDrawable drawable)
          Initialize OpenGL scene.
 void mouseClicked(java.awt.event.MouseEvent e)
          Dummy implementation, required by interface.
 void mouseDragged(java.awt.event.MouseEvent e)
          Navigation with mouse.
 void mouseEntered(java.awt.event.MouseEvent e)
          Dummy implementation, required by interface.
 void mouseExited(java.awt.event.MouseEvent e)
          Dummy implementation, required by interface.
 void mouseMoved(java.awt.event.MouseEvent e)
          Dummy implementation, required by interface.
 void mousePressed(java.awt.event.MouseEvent e)
          Save when clicked for dragging (=> rotating) purposes.
 void mouseReleased(java.awt.event.MouseEvent e)
          Dummy implementation, required by interface.
 void reshape(net.java.games.jogl.GLDrawable drawable, int x, int y, int width, int height)
          Reshape and establish rendering context.
 void setScreenshotting(java.awt.image.DataBufferInt dbInt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dbInt

java.awt.image.DataBufferInt dbInt

owner

jEllipse owner

chain

Peptide chain

prevMouseX

private int prevMouseX

prevMouseY

private int prevMouseY

white

private final float[] white

black

private final float[] black

golden

private final float[] golden

pbufferWidth

int pbufferWidth

pbufferHeight

int pbufferHeight

SCREENSHOTTING

boolean SCREENSHOTTING
Constructor Detail

PlotRenderer

public PlotRenderer(jEllipse owner,
                    Peptide chain)
Method Detail

init

public void init(net.java.games.jogl.GLDrawable drawable)
Initialize OpenGL scene.

Specified by:
init in interface net.java.games.jogl.GLEventListener
Parameters:
drawable - OpenGL area (obtained via AWT Canvas)

reshape

public void reshape(net.java.games.jogl.GLDrawable drawable,
                    int x,
                    int y,
                    int width,
                    int height)
Reshape and establish rendering context.

Specified by:
reshape in interface net.java.games.jogl.GLEventListener
Parameters:
drawable - OpenGL rendering area
x - horizontal location
y - vertical location
width - new viewport width
height - new viewport height
See Also:
display(net.java.games.jogl.GLDrawable)

display

public void display(net.java.games.jogl.GLDrawable drawable)
Main rederning function.

Specified by:
display in interface net.java.games.jogl.GLEventListener
Parameters:
drawable - OpenGL area with established rendering context

displayChanged

public void displayChanged(net.java.games.jogl.GLDrawable drawable,
                           boolean modeChanged,
                           boolean deviceChanged)
Rumour has it that in JoGL 1.0 not implemeted...

Specified by:
displayChanged in interface net.java.games.jogl.GLEventListener

drawText

public void drawText(net.java.games.jogl.GLDrawable drawable,
                     java.lang.String text)

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Save when clicked for dragging (=> rotating) purposes.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Dummy implementation, required by interface.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Navigation with mouse.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Dummy implementation, required by interface.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Dummy implementation, required by interface.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Dummy implementation, required by interface.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Dummy implementation, required by interface.

Specified by:
mouseExited in interface java.awt.event.MouseListener

setScreenshotting

public void setScreenshotting(java.awt.image.DataBufferInt dbInt)
Specified by:
setScreenshotting in interface Screenshottable

getScreenshotBuffer

public java.awt.image.DataBufferInt getScreenshotBuffer()
Specified by:
getScreenshotBuffer in interface Screenshottable

getScreenshotDims

public java.awt.Dimension getScreenshotDims()
Specified by:
getScreenshotDims in interface Screenshottable

VeaR/JEllipse