com.bramosystems.oss.player.core.client.spi
Class PlayerWidget

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.bramosystems.oss.player.core.client.spi.PlayerWidget
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget

public class PlayerWidget
extends com.google.gwt.user.client.ui.Widget

High level helper class to create widget for players.

The widget manages the DOM object of players as created by the PlayerElement helper class.

Since:
1.3
Author:
Sikiru Braheem
See Also:
PlayerElement

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
PlayerWidget(String playerProvider, String playerName, String playerId, String mediaURL, boolean autoplay)
          Creates a PlayerWidget
 
Method Summary
 void addParam(String name, String value)
          Adds the specified parameters to the element.
 String getParam(String name)
          Returns the value of the specified parameter
protected  void onLoad()
           
 void removeParam(String name)
          Removes the specified parameter from the parameter map.
 void replace(String playerProvider, String playerName, String playerId, String mediaURL, boolean autoplay)
          Replaces the DOM object of this widget with another created with the specified information
 void setHeight(String height)
           
 void setWidth(String width)
           
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlayerWidget

public PlayerWidget(String playerProvider,
                    String playerName,
                    String playerId,
                    String mediaURL,
                    boolean autoplay)
Creates a PlayerWidget

Parameters:
playerProvider - the player provider to consult for browser-specific implementations
playerName - the name of the player to be created
playerId - the DOM ID of the player
mediaURL - the URL of the media to be embedded
autoplay - true to autoplay the media, false otherwise.
Method Detail

addParam

public void addParam(String name,
                     String value)
Adds the specified parameters to the element. The parameters are used as HTML params tags in the eventual HTML DOM object

Parameters:
name - the name of the parameter
value - the value of the parameter

removeParam

public void removeParam(String name)
Removes the specified parameter from the parameter map.

Parameters:
name - the parameter to be removed from the parameter map

getParam

public String getParam(String name)
Returns the value of the specified parameter

Parameters:
name - the parameter
Returns:
the value of the parameter

onLoad

protected void onLoad()
Overrides:
onLoad in class com.google.gwt.user.client.ui.Widget

setHeight

public void setHeight(String height)
Overrides:
setHeight in class com.google.gwt.user.client.ui.UIObject

setWidth

public void setWidth(String width)
Overrides:
setWidth in class com.google.gwt.user.client.ui.UIObject

replace

public void replace(String playerProvider,
                    String playerName,
                    String playerId,
                    String mediaURL,
                    boolean autoplay)
Replaces the DOM object of this widget with another created with the specified information

Parameters:
playerProvider - the player provider to consult for browser-specific implementations
playerName - the name of the player to be created
playerId - the DOM ID of the player
mediaURL - the URL of the media to be embedded
autoplay - true to autoplay the media, false otherwise.


Copyright © 2009-2011. All Rights Reserved.