com.threerings.opengl.gui
Class CanvasRoot
java.lang.Object
com.threerings.opengl.util.SimpleRenderable
com.threerings.opengl.util.SimpleOverlay
com.threerings.opengl.gui.Root
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.
| Fields inherited from class com.threerings.opengl.gui.Root |
_buttons, _ccomponent, _clipboard, _cursor, _daction, _ddata, _defaults, _dhandler, _dicon, _dsource, _focus, _globals, _hcomponent, _invalidRoots, _lastMoveTime, _lastTipTime, _modalShade, _modifiers, _mouseX, _mouseY, _pressedKeys, _px, _py, _soundGroup, _tickOp, _tickParticipants, _tickStamp, _tipTime, _tipWidth, _tipwin, _windows, CLICK_CHAIN_INTERVAL, CLICK_INTERVAL, DEFAULT_CURSOR, DRAG_DISTANCE, KEY_REPEAT_DELAY, KEY_REPEAT_RATE, SOUND_SOURCES, TIP_MODE_RESET |
| Methods inherited from class com.threerings.opengl.gui.Root |
addGlobalEventListener, addTickParticipant, addWindow, addWindow, checkMouseMoved, clearDrag, clearTipWindow, dispatchEvent, dispatchKeyEvent, dispatchMouseEvent, dispose, draw, getClipboard, getClipboardText, getDefaultCursor, getFocus, getModifiers, getMouseX, getMouseY, getSound, getSoundGroup, getTargetComponent, getTickStamp, getTooltipTimeout, getTopWindow, getWindow, getWindowCount, isDragging, isOnTop, keyPressed, keyReleased, mouseDidMove, mouseMoved, mousePressed, mouseReleased, mouseWheeled, moveToTop, playSound, popDefaultEventTarget, pushDefaultEventTarget, removeAllWindows, removeGlobalEventListener, removeTickParticipant, removeWindow, renderModalShade, requestFocus, resortWindows, rootInvalidated, setClipboardText, setCursor, setFocus, setModalShade, setMouseDown, setMousePosition, setMouseUp, setTooltipPreferredWidth, setTooltipTimeout, startDrag, tick, tipTextChanged, toString, updateHoverComponent, windowDidMove |
_canvas
protected Component _canvas
CanvasRoot
public CanvasRoot(GlContext ctx,
Component canvas)
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
updateCursor
protected void updateCursor(Cursor cursor)
- Description copied from class:
Root
- Updates the cursor.
- Specified by:
updateCursor in class Root
convertModifiers
protected int convertModifiers(int modifiers)
convertButton
protected int convertButton(MouseEvent e)
convertKeyCode
protected int convertKeyCode(KeyEvent e)