public class WindowsCanvas extends Canvas
When VLC plays a movie file, it does not send keyboard or mouse events to the Canvas component used as the video surface.
To work around this requires two strategies.
For keyboard events add a global AWTEventListener
.
For mouse events register a global Windows message hook.
This component implements both of those strategies behind the scenes - as far as client code is concerned key and mouse listeners are added in the usual way.
This class is experimental, unsupported and unstable in operation.
Component.BaselineResizeBehavior
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
WindowsCanvas()
Create a new canvas.
|
Modifier and Type | Method and Description |
---|---|
void |
addKeyListener(KeyListener l) |
void |
addMouseListener(MouseListener l) |
void |
addMouseMotionListener(MouseMotionListener l) |
void |
addMouseWheelListener(MouseWheelListener l) |
void |
release()
Release the canvas resources.
|
void |
removeKeyListener(KeyListener l) |
void |
removeMouseListener(MouseListener l) |
void |
removeMouseMotionListener(MouseMotionListener l) |
void |
removeMouseWheelListener(MouseWheelListener l) |
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, paint, update
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
public void release()
public void addMouseListener(MouseListener l)
addMouseListener
in class Component
public void removeMouseListener(MouseListener l)
removeMouseListener
in class Component
public void addMouseMotionListener(MouseMotionListener l)
addMouseMotionListener
in class Component
public void removeMouseMotionListener(MouseMotionListener l)
removeMouseMotionListener
in class Component
public void addMouseWheelListener(MouseWheelListener l)
addMouseWheelListener
in class Component
public void removeMouseWheelListener(MouseWheelListener l)
removeMouseWheelListener
in class Component
public void addKeyListener(KeyListener l)
addKeyListener
in class Component
public void removeKeyListener(KeyListener l)
removeKeyListener
in class Component
Copyright © 2009-2012 Caprica Software Limited. All Rights Reserved.