HComponent

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.havi.ui
Class HComponent

    java.lang.Object
      java.awt.Component
          org.havi.ui.HComponent

All Implemented Interfaces:
  ImageObserver, Serializable, TestOpacity, HMatteLayer

Direct Known Subclasses:
  HVideoComponent, HVisible

    public abstract class HComponent

extends Component
implements HMatteLayer, TestOpacity

The `HComponent` class extends the java.awt.Component class by implementing the `HMatteLayer` interface.

The parameters to the constructors are as follows, in cases where parameters are not used, then the constructor should use the default values.

### Default parameter values exposed in the constructors

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

### Default parameter values not exposed in the constructors

Description | Default value | Set method | Get method
--- | --- | --- | ---
Associated matte (`HMatte`). | none (i.e. getMatte() returns `null`) | `setMatte` | `getMatte`

See Also:
  Serialized Form

Field Summary

Fields inherited from class java.awt.Component
`BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`HComponent()` Creates an HComponent object.
`HComponent(int x, int y, int width, int height)` Creates an HComponent object.

Method Summary
`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.
`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.

Methods inherited from class java.awt.Component
`addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, areFocusTraversalKeysSet, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, doLayout, enableInputMethods, 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, prepareImage, prepareImage, print, printAll, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, setBackground, setBounds, setBounds, setCursor, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### HComponent

    public HComponent()

  Creates an HComponent object. See the class description for details of constructor parameters and default values.

### HComponent

    public HComponent(int x,
                      int y,
                      int width,
                      int height)

  Creates an HComponent object. See the class description for details of constructor parameters and default values.

Method Detail

### setMatte

    public void setMatte(HMatte m)
                  throws HMatteException

  Applies an `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.

  Specified by:
    `setMatte` in interface `HMatteLayer`
  Parameters:
    `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.)
  Throws:
    `HMatteException` - if the `HMatte` cannot be associated with the component. This can occur:
    - if the specific matte type is not supported
    - if the platform does not support any matte type
    - if the component is associated with an already running `HFlatEffectMatte` or `HImageEffectMatte`. The exception is thrown even if m is null.
  See Also:
    `HMatte`

### getMatte

    public HMatte getMatte()

  Get any `HMatte` currently associated with this component.

  Specified by:
    `getMatte` in interface `HMatteLayer`
  Returns:
    the `HMatte` currently associated with this component or null if there is no associated matte.

### isDoubleBuffered

    public boolean isDoubleBuffered()

  Returns true if all the drawing done during the update and paint methods for this specific HComponent object is automatically double buffered.

  Overrides:
    `isDoubleBuffered` in class `Component`
  Returns:
    `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.

### isOpaque

    public boolean isOpaque()

  Returns true if the entire HComponent 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 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.

  Specified by:
    `isOpaque` in interface `TestOpacity`
  Overrides:
    `isOpaque` in class `Component`
  Returns:
    `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`.
  See Also:
    `Component.isLightweight()`

### setEnabled

    public void setEnabled(boolean b)

  Enables or disables this component, depending on the value of the parameter b. HComponents which are disabled will still generate and respond to `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.

  Overrides:
    `setEnabled` in class `Component`
  Parameters:
    `b` - If true, this HComponent is enabled; otherwise this HComponent is disabled.
  See Also:
    `Component.isEnabled()`, `Component.isLightweight()`

### isEnabled

    public boolean isEnabled()

  Determines whether this HComponent is enabled. An HComponent may be enabled or disabled by calling its setEnabled method.

  Overrides:
    `isEnabled` in class `Component`
  Returns:
    `true` if the HComponent is enabled; `false` otherwise.
  See Also:
    `Component.setEnabled(boolean)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD