com.sun.lwuit
Class MediaComponent
java.lang.Object
com.sun.lwuit.Component
com.sun.lwuit.MediaComponent
- All Implemented Interfaces:
- Animation, StyleListener
Deprecated. replaced by VideoComponent, this class will be removed in the next
version of LWUIT
public class MediaComponent
- extends Component
A component allowing us to embed and control rich media content
Constructor Summary |
MediaComponent(java.lang.Object player)
Deprecated. Creates a new instance of MediaComponent |
Method Summary |
protected Dimension |
calcPreferredSize()
Deprecated. Calculates the preferred size based on component content. |
protected void |
deinitialize()
Deprecated. Invoked to indicate that the component initialization is being reversed
since the component was detached from the container hierarchy. |
long |
getMediaTime()
Deprecated. Return the duration of the media |
java.lang.Object |
getVideoControl()
Deprecated. Returns the native video control if such a control exists, this is required
for some platforms. |
protected void |
initComponent()
Deprecated. Allows subclasses to bind functionality that relies on fully initialized and
"ready for action" component state |
boolean |
isFullScreen()
Deprecated. Indicates the fullscreen mode |
void |
paint(Graphics g)
Deprecated. This method paints the Component on the screen, it should be overriden
by subclasses to perform custom drawing or invoke the UI API's to let
the PLAF perform the rendering. |
protected void |
paintBackground(Graphics g)
Deprecated. Paints the background of the component, invoked with the clipping region
and appropriate scroll translation. |
void |
paintBackgrounds(Graphics g)
Deprecated. This method paints all the parents Components Background. |
void |
setFullScreen(boolean fullscreen)
Deprecated. Toggles the fullscreen mode |
void |
setLoopCount(int count)
Deprecated. Set the number of times the media should loop |
long |
setMediaTime(long now)
Deprecated. "Jump" to a point in time within the media |
void |
setVisible(boolean visible)
Deprecated. Display the embedded media component |
void |
start()
Deprecated. Start media playback implicitly setting the component to visible |
void |
stop()
Deprecated. Stope media playback |
Methods inherited from class com.sun.lwuit.Component |
addFocusListener, animate, calcScrollSize, contains, deinitializeCustomStyle, dragEnter, dragExit, draggingOver, dragInitiated, drawDraggedImage, drop, fireClicked, focusGained, focusLost, getAbsoluteX, getAbsoluteY, getBaseline, getBaselineResizeBehavior, getBorder, getBottomGap, getBounds, getClientProperty, getComponentForm, getDirtyRegion, getDisabledStyle, getDragImage, getGridPosX, getGridPosY, getHeight, getLabelForComponent, getName, getNextFocusDown, getNextFocusLeft, getNextFocusRight, getNextFocusUp, getParent, getPreferredH, getPreferredSize, getPreferredW, getPressedStyle, getPropertyNames, getPropertyTypes, getPropertyValue, getScrollAnimationSpeed, getScrollDimension, getScrollOpacity, getScrollOpacityChangeSpeed, getScrollX, getScrollY, getSelectCommandText, getSelectedRect, getSelectedStyle, getSideGap, getStyle, getTensileLength, getUIID, getUnselectedStyle, getWidth, getVisibleBounds, getX, getY, growShrink, handlesInput, hasFocus, initCustomStyle, installDefaultPainter, isAlwaysTensile, isDragActivated, isDragAndDropOperation, isDraggable, isDropTarget, isEnabled, isFlatten, isFocusable, isGrabsPointerEvents, isHideInPortrait, isInitialized, isRTL, isScrollable, isScrollableX, isScrollableY, isScrollVisible, isSelectableInteraction, isSmoothScrolling, isSnapToGrid, isTactileTouch, isTactileTouch, isTensileDragEnabled, isVisible, keyPressed, keyReleased, keyRepeated, laidOut, longKeyPress, longPointerPress, paintBorder, paintComponent, paintComponent, paintLock, paintLockRelease, paintScrollbars, paintScrollbarX, paintScrollbarY, paramString, pointerDragged, pointerDragged, pointerHover, pointerHoverPressed, pointerHoverReleased, pointerPressed, pointerPressed, pointerReleased, pointerReleased, putClientProperty, refreshTheme, refreshTheme, removeFocusListener, repaint, repaint, requestFocus, scrollRectToVisible, scrollRectToVisible, setAlwaysTensile, setCellRenderer, setDirtyRegion, setDisabledStyle, setDraggable, setDropTarget, setEnabled, setFlatten, setFocus, setFocusable, setGrabsPointerEvents, setHandlesInput, setHeight, setHideInPortrait, setInitialized, setIsScrollVisible, setLabelForComponent, setName, setNextFocusDown, setNextFocusLeft, setNextFocusRight, setNextFocusUp, setPreferredH, setPreferredSize, setPreferredW, setPressedStyle, setPropertyValue, setRTL, setScrollAnimationSpeed, setScrollOpacityChangeSpeed, setScrollSize, setScrollVisible, setScrollX, setScrollY, setSelectCommandText, setSelectedStyle, setShouldCalcPreferredSize, setSize, setSmoothScrolling, setSnapToGrid, setTactileTouch, setTensileDragEnabled, setTensileLength, setUIID, setUnselectedStyle, setWidth, setX, setY, styleChanged, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MediaComponent
public MediaComponent(java.lang.Object player)
- Deprecated.
- Creates a new instance of MediaComponent
- Parameters:
player
- the media player
initComponent
protected void initComponent()
- Deprecated.
- Description copied from class:
Component
- Allows subclasses to bind functionality that relies on fully initialized and
"ready for action" component state
- Overrides:
initComponent
in class Component
deinitialize
protected void deinitialize()
- Deprecated.
- Description copied from class:
Component
- Invoked to indicate that the component initialization is being reversed
since the component was detached from the container hierarchy. This allows
the component to deregister animators and cleanup after itself. This
method is the opposite of the initComponent() method.
- Overrides:
deinitialize
in class Component
paint
public void paint(Graphics g)
- Deprecated.
- Description copied from class:
Component
- This method paints the Component on the screen, it should be overriden
by subclasses to perform custom drawing or invoke the UI API's to let
the PLAF perform the rendering.
- Specified by:
paint
in interface Animation
- Overrides:
paint
in class Component
- Parameters:
g
- the component graphics
paintBackground
protected void paintBackground(Graphics g)
- Deprecated.
- Description copied from class:
Component
- Paints the background of the component, invoked with the clipping region
and appropriate scroll translation.
- Overrides:
paintBackground
in class Component
- Parameters:
g
- the component graphics
paintBackgrounds
public void paintBackgrounds(Graphics g)
- Deprecated.
- Description copied from class:
Component
- This method paints all the parents Components Background.
- Overrides:
paintBackgrounds
in class Component
- Parameters:
g
- the graphics object
calcPreferredSize
protected Dimension calcPreferredSize()
- Deprecated.
- Description copied from class:
Component
- Calculates the preferred size based on component content. This method is
invoked lazily by getPreferred size.
- Overrides:
calcPreferredSize
in class Component
- Returns:
- the calculated preferred size based on component content
setVisible
public void setVisible(boolean visible)
- Deprecated.
- Display the embedded media component
- Overrides:
setVisible
in class Component
- Parameters:
visible
- true to display, false to hide
start
public void start()
- Deprecated.
- Start media playback implicitly setting the component to visible
stop
public void stop()
- Deprecated.
- Stope media playback
setLoopCount
public void setLoopCount(int count)
- Deprecated.
- Set the number of times the media should loop
- Parameters:
count
- the number of times the media should loop
getMediaTime
public long getMediaTime()
- Deprecated.
- Return the duration of the media
- Returns:
- the duration of the media
setMediaTime
public long setMediaTime(long now)
- Deprecated.
- "Jump" to a point in time within the media
- Parameters:
now
- the point in time to "Jump" to
- Returns:
- the media time in microseconds
setFullScreen
public void setFullScreen(boolean fullscreen)
- Deprecated.
- Toggles the fullscreen mode
- Parameters:
fullscreen
- true for fullscreen mode
isFullScreen
public boolean isFullScreen()
- Deprecated.
- Indicates the fullscreen mode
- Returns:
- true for fullscreen mode
getVideoControl
public java.lang.Object getVideoControl()
- Deprecated.
- Returns the native video control if such a control exists, this is required
for some platforms.
- Returns:
- the underlying native video control or null