public interface DVBScene
| Modifier and Type | Method and Description |
|---|---|
boolean |
addShortcut(int keyCode,
HActionable comp)
Adds a shortcut key to action the specified
HActionable. |
void |
addWindowListener(WindowListener wl)
Add a listener to receive any java.awt.event.WindowEvents sent
from this
DVBScene. |
void |
enableShortcuts(boolean enable)
Enables or disables all short cuts that are currently set on
the Scene.
|
int[] |
getAllShortcutKeycodes()
Returns all keycodes added in the DVBScene as shortcuts.
|
Image |
getBackgroundImage()
Retrieve any image used as a background for this
DVBScene. |
int |
getBackgroundMode()
Get the background mode of this
DVBScene. |
Component |
getFocusOwner()
|
int |
getRenderMode()
Get the rendering mode of any background image associated with
this
DVBScene. |
HActionable |
getShortcutComponent(int keyCode)
Retrieve the
HActionable
associated with the specified shortcut key. |
int |
getShortcutKeycode(HActionable comp)
Returns the keycode associated with the specified HActionable
component.
|
boolean |
isDoubleBuffered()
Returns
true if all the drawing done during the update and
paint methods for this specific DVBScene object is automatically double buffered. |
boolean |
isEnableShortcuts()
Returns the status of all short cuts that are currently set on
the DVBScene.
|
boolean |
isOpaque()
Returns true if the entire
DVBScene
area, as given by the java.awt.Component#getBounds
method, is fully opaque, i.e. |
boolean |
isVisible()
Determines if the
DVBScene (or more
properly its added child components) is Visible. |
void |
removeShortcut(int keyCode)
Removes the specified short-cut key.
|
void |
removeWindowListener(WindowListener wl)
Remove a listener so that it no longer receives any
java.awt.event.WindowEvents.
|
void |
setBackgroundImage(Image image)
Set an image which shall be painted in the background of the
DVBScene, after the background has
been drawn according to the current mode set with setBackgroundMode,
but before any children are drawn. |
void |
setBackgroundMode(int mode)
Set the background mode of this
DVBScene. |
boolean |
setRenderMode(int mode)
Set the rendering mode of any background image associated with
this
DVBScene. |
void addWindowListener(WindowListener wl)
DVBScene. If the listener
has already been added further calls will add further
references to the listener, which will then receive multiple
copies of a single event.wl - The java.awt.event.WindowListener to be notified of
any java.awt.event.WindowEvents.void enableShortcuts(boolean enable)
addShortcut or removeShortcut.
Note enableShortcuts(false) does not remove existing added DVBScene shortcuts - they are merely disabled
and may be subsequently re-enabled with enableShortcuts(true).
enable - a value of true indicates all shortcuts are to be
enabled, and a value of false indicates all shortcuts are to be
disabled.int[] getAllShortcutKeycodes()
Image getBackgroundImage()
DVBScene.null if
no image is set. Note that depending on the current render mode
any image set may not actually be rendered.setRenderMode(int)int getBackgroundMode()
DVBScene. The return value specifies whether the paint method
should draw the background (i.e. a rectangle filling the bounds
of the DVBScene).NO_BACKGROUND_FILL or BACKGROUND_FILL.Component getFocusOwner()
DVBScene which has focus if and only if this
DVBScene is active.int getRenderMode()
DVBScene.IMAGE_NONE, IMAGE_STRETCH, IMAGE_CENTER or IMAGE_TILE.HActionable getShortcutComponent(int keyCode)
HActionable
associated with the specified shortcut key.keyCode - the shortcut key code to be queried for an
associated HActionable.HActionable
associated with the specified key if keyCode is a
valid shortcut key for this DVBScene,
null otherwise.int getShortcutKeycode(HActionable comp)
comp - the HActionable to return the keycode that it is
associated with.boolean isDoubleBuffered()
true if all the drawing done during the update and
paint methods for this specific DVBScene object is automatically double buffered.true if all the drawing done during the
update and paint methods for this specific DVBScene object is automatically
double buffered, or false if drawing is not double
buffered. The default value for the double buffering setting
is platform-specific.boolean isEnableShortcuts()
enableShortcuts(boolean)boolean isOpaque()
DVBScene
area, as given by the java.awt.Component#getBounds
method, is fully opaque, i.e. its paint method (or surrogate
methods) guarantee that all pixels are painted in an opaque
Color.
By default, the return value depends on the value of the
current background mode, as set by the
setBackgroundMode
method. The return value should be overridden by subclasses
that can guarantee full opacity. The consequences of an invalid
overridden value are implementation specific.
true if all the pixels within the area
given by the java.awt.Component#getBounds method
are fully opaque, i.e. its paint method (or surrogate methods)
guarantee that all pixels are painted in an opaque Color,
otherwise false.boolean isVisible()
DVBScene (or more
properly its added child components) is Visible. Initially an
DVBScene is invisible.DVBScene is
visible; false otherwise.void removeShortcut(int keyCode)
keyCode - The keycode that represents the short cutvoid removeWindowListener(WindowListener wl)
wl - The java.awt.event.WindowListener to be removed from
notification of any java.awt.event.WindowEvents.void setBackgroundImage(Image image)
DVBScene, after the background has
been drawn according to the current mode set with setBackgroundMode,
but before any children are drawn. The image is rendered
according to the current render mode set with setRenderMode.
Note that the use of a background image in this way may affect
the return value of the isOpaque
method, depending on the image and the current rendering mode.
image - the image to be used as a background. If this
parameter is null any current image is
removed. Note that depending on the current render mode any
image set may not actually be rendered.setRenderMode(int)void setBackgroundMode(int mode)
DVBScene. The value specifies whether the paint method
should draw the background (i.e. a rectangle filling the bounds
of the DVBScene).
Note that the background mode will affect the return value of
the isOpaque method, depending
on the value of the mode parameter. A fill mode of
BACKGROUND_FILL
implies that isOpaque must
return true.
mode - one of NO_BACKGROUND_FILL or BACKGROUND_FILL. If mode is
not a valid value, an IllegalArgumentException will be thrown.boolean setRenderMode(int mode)
DVBScene. Note that the
minimum requirement is to support only the
IMAGE_NONE mode. Support of the other modes is
platform and implementation specific.
mode - the rendering mode, one of IMAGE_NONE, IMAGE_STRETCH, IMAGE_CENTER or IMAGE_TILE.true if the mode was set successfully,
false if the mode is not supported by the
platform.boolean addShortcut(int keyCode,
HActionable comp)
HActionable. Generating the defined
java.awt.KeyEvent or HRcEvent keycode causes the specified component to become
actioned --- potentially any keyCode may have a shortcut
associated with it. The shortcut will only be added if the
HActionable component is a child
component in the container hierarchy of which the HScene is the root container. If this is
not the case this method shall return false.
Note that a maximum of one HActionable may be associated with a given keyCode. An HActionable can have at most one
associated shortcut keycode. Calling addShortcut repeatedly with the
same HActionable will result in
the previous short cut being removed. A short cut can be set on
an invisible HActionable and
therefore it is possible to provide short-cuts that have no
user representation.
If the relevant keyCode is received by the HScene, then the HActionable will be actioned by the
HScene sending it an ACTION_PERFORMED.
Note that it is the responsibility of the application to ensure that
the keyCode used is included in the set registered with the setKeyEvents
method and is one which the platform can generate, i.e. where the method
HRcCapabilities.isSupported() returns true.
keyCode - the keycode that represents the short cut. If
keycode is java.awt.event.KeyEvent#VK_UNDEFINED, then the
shortcut will not be added, any existing shortcut for this
component will not be changed and this method shall return false.comp - The actionable component that will be actioned.Copyright © 2012 code4tv.com. All Rights Reserved.