gzz.client.awt
Class AWTScreen

java.lang.Object
  |
  +--gzz.client.GraphicsAPI.AbstractRenderingSurface
        |
        +--gzz.client.GraphicsAPI.AbstractWindow
              |
              +--gzz.client.awt.AWTScreen
All Implemented Interfaces:
java.util.EventListener, GraphicsAPI.RenderingSurface, GraphicsAPI.Window, JUpdateManager.EventProcessor, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, Obs
Direct Known Subclasses:
FrameScreen

public abstract class AWTScreen
extends GraphicsAPI.AbstractWindow
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, Obs, JUpdateManager.EventProcessor

A single output window.


Field Summary
static boolean dbg
           
 java.awt.Color fg
           
static java.lang.String rcsid
           
 
Constructor Summary
AWTScreen(GraphicsAPI api)
           
 
Method Summary
 VobScene createVobScene(java.awt.Dimension size)
          Create a new vobscene of the appropriate type for this window.
 java.awt.Dimension getSize()
          Get the current size of the window.
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 int[] readPixels(int x, int y, int w, int h)
          Read pixels from the screen.
 void registerBinder(Binder s)
          Set the event handler for the window.
 void renderAnim(VobScene prev, VobScene next, float fract, float lod, boolean showFinal)
          Renders and display a frame of the view animation on screen
 void renderStill(VobScene prev, float lod)
          Render the still image of the vobscreen.
 void setLocation(int x, int y, int w, int h)
          Sets window size and location.
 void zzProcessEvent(java.awt.AWTEvent e)
           
 
Methods inherited from class gzz.client.GraphicsAPI.AbstractWindow
addTimeout
 
Methods inherited from class gzz.client.GraphicsAPI.AbstractRenderingSurface
createVobScene, getGraphicsAPI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gzz.Obs
chg
 
Methods inherited from interface gzz.client.GraphicsAPI.Window
getGraphicsAPI
 
Methods inherited from interface gzz.client.GraphicsAPI.RenderingSurface
createVobScene
 

Field Detail

rcsid

public static final java.lang.String rcsid
See Also:
Constant Field Values

dbg

public static boolean dbg

fg

public java.awt.Color fg
Constructor Detail

AWTScreen

public AWTScreen(GraphicsAPI api)
Method Detail

createVobScene

public VobScene createVobScene(java.awt.Dimension size)
Description copied from interface: GraphicsAPI.RenderingSurface
Create a new vobscene of the appropriate type for this window.

Specified by:
createVobScene in interface GraphicsAPI.RenderingSurface

registerBinder

public void registerBinder(Binder s)
Description copied from interface: GraphicsAPI.Window
Set the event handler for the window.

Specified by:
registerBinder in interface GraphicsAPI.Window

setLocation

public void setLocation(int x,
                        int y,
                        int w,
                        int h)
Sets window size and location.

Specified by:
setLocation in interface GraphicsAPI.Window
Parameters:
x - x-coordinate for window upper left-hand corner
y - y-coordinate for window upper left-hand corner
w - width of window in pixels
h - height of window in pixels

getSize

public java.awt.Dimension getSize()
Description copied from interface: GraphicsAPI.RenderingSurface
Get the current size of the window.

Specified by:
getSize in interface GraphicsAPI.RenderingSurface

renderStill

public void renderStill(VobScene prev,
                        float lod)
Description copied from interface: GraphicsAPI.RenderingSurface
Render the still image of the vobscreen.

Specified by:
renderStill in interface GraphicsAPI.RenderingSurface

renderAnim

public void renderAnim(VobScene prev,
                       VobScene next,
                       float fract,
                       float lod,
                       boolean showFinal)
Renders and display a frame of the view animation on screen

Specified by:
renderAnim in interface GraphicsAPI.RenderingSurface

readPixels

public int[] readPixels(int x,
                        int y,
                        int w,
                        int h)
Description copied from interface: GraphicsAPI.RenderingSurface
Read pixels from the screen.

Specified by:
readPixels in interface GraphicsAPI.RenderingSurface
Returns:
An array of size w*h, of A, R, G, B from highest to lowest bit. (BGRA)

zzProcessEvent

public void zzProcessEvent(java.awt.AWTEvent e)
Specified by:
zzProcessEvent in interface JUpdateManager.EventProcessor

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener