AWTVideoSizeControl

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

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

## javax.tv.media
Interface AWTVideoSizeControl

All Superinterfaces:
  Control

    public interface AWTVideoSizeControl

extends Control

`AWTVideoSizeControl` allows setting clipping, scaling, and translation of a video stream in a simple, interoperable way. Not all possible combinations of positioning will be supported, so this interface provides a mechanism to discover how closely the underlying platform will approximate a request for positioning.

All interactions via AWTVideoSizeControl happen in the coordinate space of the screen. For example, successfully setting the video's position to the location reported by `Component.getLocationOnScreen()` on the `Xlet`'s root container will cause the upper left-hand corner of the video and the root container to coincide.

The screen, in the context of AWT, is the area into which graphics drawing operations are done. Its size is given by java.awt.Toolkit.getScreenSize(), and locations reported by Component.getLocationOnScreen() are given in the screen's coordinate system.

Instances of `AWTVideoSizeControl` may be obtained from a JMF `Player` via the methods `getControl(String)` and `getControls()`. Note that a Java TV API implementation may not always or ever support `AWTVideoSizeControl` for a given Player; in such a case, the failure modes specified by the two aforementioned methods will apply.

Version:
  1.16, 10/09/00
Author:
  Bill Foote
See Also:
  `AWTVideoSize`, `java.awt.Component.getLocationOnScreen()`, `Player`

Method Summary
`AWTVideoSize` | `checkSize(AWTVideoSize sz)` Reports how closely the underlying platform can approximate a desired video size.
`AWTVideoSize` | `getDefaultSize()` Reports the default `AWTVideoSize` for this control.
`AWTVideoSize` | `getSize()` Reports the `AWTVideoSize` at which the Player is currently operating.
`Dimension` | `getSourceVideoSize()` Reports the size of the source video, in the screen's coordinate system.
`boolean` | `setSize(AWTVideoSize sz)` Sets the video size.

Methods inherited from interface javax.media.Control
`getControlComponent`

Method Detail

### getSize

    AWTVideoSize getSize()

  Reports the `AWTVideoSize` at which the Player is currently operating.

  Returns:
    A copy of the JMF Player's current video size, in the AWT coordinate space.

### getDefaultSize

    AWTVideoSize getDefaultSize()

  Reports the default `AWTVideoSize` for this control. For the background video plane, this will be the size that the video would be presented at if no program had manipulated the video size.

  Returns:
    The default `AWTVideoSize`.

### getSourceVideoSize

    Dimension getSourceVideoSize()

  Reports the size of the source video, in the screen's coordinate system.

  Returns:
    The size of the source video.

### setSize

    boolean setSize(AWTVideoSize sz)

  Sets the video size. If the size provided cannot be supported by the underlying platform, this method does nothing and returns `false`.

  Parameters:
    `sz` - The desired video size, in the AWT coordinate space.
  Returns:
    `true` if the size was successfully changed; `false` if the platform is incapable of supporting the given size.
  See Also:
    `checkSize(AWTVideoSize)`

### checkSize

    AWTVideoSize checkSize(AWTVideoSize sz)

  Reports how closely the underlying platform can approximate a desired video size. If the underlying platform cannot support the given size, this method gives the closest approximation that the platform is capable of.

  Parameters:
    `sz` - The desired video size.
  Returns:
    The actual size that the platform would be able to set.

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

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