Class AbstractJWindowOverlayComponent

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
javax.swing.JWindow
uk.co.caprica.vlcj.player.component.overlay.AbstractJWindowOverlayComponent
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer

public abstract class AbstractJWindowOverlayComponent extends JWindow
Base implementation for a video overlay component.

Overlay contents may be implemented by using Swing/AWT components in a layout using onCreateOverlay(), and/or by implementing custom painting using onNewSize(int, int) and onPaintOverlay(Graphics2D).

Various template method are provided for sub-classes to provide the required behaviour.

The default implementation of the onSetWindowTransparency() template method attempts to make a transparent overlay by either the preferred method of simply setting the background colour to a transparent colour for Java7+, or by using com.sun.awt.AWTUtilities, if it exists, for Java6.

Best results will be obtained by disabling any compositing desktop window manager.

See Also: