com.threerings.opengl.gui
Class CanvasRoot

java.lang.Object
  extended by com.threerings.opengl.util.SimpleRenderable
      extended by com.threerings.opengl.util.SimpleOverlay
          extended by com.threerings.opengl.gui.Root
              extended by com.threerings.opengl.gui.CanvasRoot
All Implemented Interfaces:
Compositable, Enqueueable, Tickable, KeyListener, MouseListener, MouseMotionListener, MouseWheelListener, EventListener

public class CanvasRoot
extends Root
implements MouseListener, MouseMotionListener, MouseWheelListener, KeyListener

Bridges between the AWT and the BUI input event system when we are being used in an AWT canvas.


Field Summary
 
Fields inherited from class com.threerings.opengl.gui.Root
DEFAULT_CURSOR
 
Constructor Summary
CanvasRoot(GlContext ctx, Component canvas)
           
 
Method Summary
 int getDisplayHeight()
          Returns the height of the display area.
 int getDisplayWidth()
          Returns the width of the display area.
 void keyPressed(KeyEvent e)
           
 void keyReleased(KeyEvent e)
           
 void keyTyped(KeyEvent e)
           
 void mouseClicked(MouseEvent e)
           
 void mouseDragged(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mouseMoved(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void mouseWheelMoved(MouseWheelEvent e)
           
 
Methods inherited from class com.threerings.opengl.gui.Root
addGlobalEventListener, addTickParticipant, addWindow, addWindow, clearDrag, dispose, getClipboard, getClipboardText, getFocus, getModifiers, getMouseX, getMouseY, getSound, getSoundGroup, getTickStamp, getTooltipTimeout, getTopWindow, getWindow, getWindowCount, isDragging, isOnTop, moveToTop, playSound, popDefaultEventTarget, pushDefaultEventTarget, removeAllWindows, removeGlobalEventListener, removeTickParticipant, removeWindow, requestFocus, resortWindows, rootInvalidated, setClipboardText, setCursor, setModalShade, setMouseDown, setMousePosition, setMouseUp, setTooltipPreferredWidth, setTooltipTimeout, startDrag, tick, tipTextChanged, toString
 
Methods inherited from class com.threerings.opengl.util.SimpleOverlay
composite
 
Methods inherited from class com.threerings.opengl.util.SimpleRenderable
enqueue, getStates
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CanvasRoot

public CanvasRoot(GlContext ctx,
                  Component canvas)
Method Detail

getDisplayWidth

public int getDisplayWidth()
Description copied from class: Root
Returns the width of the display area.

Specified by:
getDisplayWidth in class Root

getDisplayHeight

public int getDisplayHeight()
Description copied from class: Root
Returns the height of the display area.

Specified by:
getDisplayHeight in class Root

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

mouseDragged

public void mouseDragged(MouseEvent e)
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Specified by:
mouseMoved in interface MouseMotionListener

mouseWheelMoved

public void mouseWheelMoved(MouseWheelEvent e)
Specified by:
mouseWheelMoved in interface MouseWheelListener

keyPressed

public void keyPressed(KeyEvent e)
Specified by:
keyPressed in interface KeyListener

keyReleased

public void keyReleased(KeyEvent e)
Specified by:
keyReleased in interface KeyListener

keyTyped

public void keyTyped(KeyEvent e)
Specified by:
keyTyped in interface KeyListener


Copyright © 2011. All Rights Reserved.