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.BaselineResizeBehaviorBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, 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, updateaction, 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, validatepublic void release()
public void addMouseListener(MouseListener l)
addMouseListener in class Componentpublic void removeMouseListener(MouseListener l)
removeMouseListener in class Componentpublic void addMouseMotionListener(MouseMotionListener l)
addMouseMotionListener in class Componentpublic void removeMouseMotionListener(MouseMotionListener l)
removeMouseMotionListener in class Componentpublic void addMouseWheelListener(MouseWheelListener l)
addMouseWheelListener in class Componentpublic void removeMouseWheelListener(MouseWheelListener l)
removeMouseWheelListener in class Componentpublic void addKeyListener(KeyListener l)
addKeyListener in class Componentpublic void removeKeyListener(KeyListener l)
removeKeyListener in class ComponentCopyright © 2009-2012 Caprica Software Limited. All Rights Reserved.