public abstract class HComponent extends Component implements HMatteLayer, TestOpacity
HComponent
class extends the
java.awt.Component class by implementing the HMatteLayer
interface.
Parameter | Description | Default value | Set method | Get method |
---|---|---|---|---|
x | x-coordinate of top left hand corner of this component in pixels, relative to its parent container (subject to layout management). | --- | java.awt.Component#setBounds | java.awt.Component#getBounds |
y | y-coordinate of top left hand corner of this component in pixels, relative to its parent container (subject to layout management). | --- | java.awt.Component#setBounds | java.awt.Component#getBounds |
width | width of this component in pixels (subject to layout management). | --- | java.awt.Component#setBounds | java.awt.Component#getBounds |
height | height of this component in pixels (subject to layout management). | --- | java.awt.Component#setBounds | java.awt.Component#getBounds |
Description | Default value | Set method | Get method |
---|---|---|---|
Associated matte (HMatte ). |
none (i.e. getMatte() returns null ) |
setMatte |
getMatte |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
HComponent()
Creates an HComponent object.
|
HComponent(int x,
int y,
int width,
int height)
Creates an HComponent object.
|
Modifier and Type | Method and Description |
---|---|
HMatte |
getMatte()
Get any
HMatte currently associated
with this component. |
boolean |
isDoubleBuffered()
Returns true if all the drawing done during the update and
paint methods for this specific
HComponent object is automatically double buffered.
|
boolean |
isEnabled()
Determines whether this HComponent is
enabled.
|
boolean |
isOpaque()
Returns true if the entire
HComponent area, as given by the
java.awt.Component#getBounds method, is fully
opaque, i.e. |
protected void |
processEvent(AWTEvent evt)
The implementation of the method
HComponent.processEvent() shall ensure
that key events which are translated to HAVi events shall not be
reported to processKeyEvent() or reported to
KeyListeners . |
void |
setEnabled(boolean b)
Enables or disables this component, depending on the value of the
parameter b.
|
void |
setMatte(HMatte m)
Applies an
HMatte to this component,
for matte compositing. |
addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, areFocusTraversalKeysSet, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, doLayout, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getCursor, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPreferredSize, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, hasFocus, imageUpdate, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, list, list, list, list, list, paint, paintAll, paramString, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, setBackground, setBounds, setBounds, setCursor, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
public HComponent()
public HComponent(int x, int y, int width, int height)
public void setMatte(HMatte m) throws HMatteException
HMatte
to this component,
for matte compositing. Any existing animated matte must be
stopped before this method is called or an HMatteException will
be thrown.setMatte
in interface HMatteLayer
m
- The HMatte
to be applied to
this component -- note that only one matte may be associated
with the component, thus any previous matte will be replaced.
If m is null, then any matte associated with the component is
removed and further calls to getMatte() shall return null. The
component shall behave as if it had a fully opaque HFlatMatte
associated with it (i.e an
HFlatMatte with the default value of 1.0.)HMatteException
- if the HMatte
cannot be associated with the component. This can occur:
HFlatEffectMatte
or HImageEffectMatte
. The exception
is thrown even if m is null.
HMatte
public HMatte getMatte()
HMatte
currently associated
with this component.getMatte
in interface HMatteLayer
HMatte
currently
associated with this component or null if there is no
associated matte.public boolean isDoubleBuffered()
isDoubleBuffered
in class Component
true
if all the drawing done during the update and
paint methods for this specific
HComponent object is automatically double buffered, or false
if drawing is not double buffered. The default value for the
double buffering setting is platform-specific.public boolean isOpaque()
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 is false
. The return
value should be overridden by subclasses that can guarantee
full opacity. The consequences of an invalid overridden value
are implementation specific.
isOpaque
in interface TestOpacity
isOpaque
in class Component
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
.Component.isLightweight()
public void setEnabled(boolean b)
HFocusEvent
if they implement
HNavigationInputPreferred
.
They will not generate or respond to
HActionEvent
,
HAdjustmentEvent
,
HItemEvent
,
HKeyEvent
or
HTextEvent
. (This method should not
invoke the superclass method.) HComponents
are enabled initially by default.
If a widget implementing
HKeyboardInputPreferred
is
disabled while in edit mode, it will automatically set edit mode to
false and generate an HTextEvent.TEXT_END_CHANGE. Calls to
setEditMode() should be ignored while being disabled.
If a widget implementing
HAdjustmentInputPreferred
is disabled while in adjust mode, it will automatically set adjust mode
to false and generate an HAdjustmentEvent.ADJUST_END_CHANGE. Calls to
setAdjustMode() should be ignored while being disabled.
If a widget implementing
HSelectionInputPreferred
is
disabled while in selection mode, it will automatically set selection
mode to false and generate an HItemEvent.ITEM_END_CHANGE. Calls to
setSelectionMode() should be ignored while being disabled.
setEnabled
in class Component
b
- If true, this HComponent is enabled; otherwise this
HComponent is disabled.Component.isEnabled()
,
Component.isLightweight()
public boolean isEnabled()
isEnabled
in class Component
true
if the
HComponent is enabled; false
otherwise.Component.setEnabled(boolean)
protected void processEvent(AWTEvent evt)
HComponent.processEvent()
shall ensure
that key events which are translated to HAVi events shall not be
reported to processKeyEvent()
or reported to
KeyListeners
. Key events which are not translated
to HAVi events shall be reported to
processKeyEvent()
and KeyListeners
as
defined in the Java specification.
NOTE: If applications override processEvent
they
may terminally disturb these processes. Applications should not
do this without extreme care, as the results may be very
implementation dependent.
processEvent
in class Component
evt
- the java.awt.AWTEvent to handle.Component.processComponentEvent(java.awt.event.ComponentEvent)
,
Component.processFocusEvent(java.awt.event.FocusEvent)
,
Component.processKeyEvent(java.awt.event.KeyEvent)
,
Component.processMouseEvent(java.awt.event.MouseEvent)
,
Component.processMouseMotionEvent(java.awt.event.MouseEvent)
,
Component.processInputMethodEvent(java.awt.event.InputMethodEvent)
,
Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent)
Copyright © 2012 CableLabs. All Rights Reserved.