com.bramosystems.oss.player.core.event.client
Class PlayStateEvent

java.lang.Object
  extended by com.google.gwt.event.shared.GwtEvent<PlayStateHandler>
      extended by com.bramosystems.oss.player.core.event.client.PlayStateEvent

public class PlayStateEvent
extends com.google.gwt.event.shared.GwtEvent<PlayStateHandler>

The event fired when the state of media playback changes

Author:
Sikirulai Braheem

Nested Class Summary
static class PlayStateEvent.State
          An enum of playback states
 
Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent
com.google.gwt.event.shared.GwtEvent.Type<H>
 
Field Summary
static com.google.gwt.event.shared.GwtEvent.Type<PlayStateHandler> TYPE
           
 
Constructor Summary
protected PlayStateEvent(PlayStateEvent.State state, int itemIndex)
          Creates a new play state event
 
Method Summary
protected  void dispatch(PlayStateHandler handler)
           
static void fire(HasPlayStateHandlers source, PlayStateEvent.State state, int itemIndex)
          Fires play state events on all registered handlers
 com.google.gwt.event.shared.GwtEvent.Type<PlayStateHandler> getAssociatedType()
           
 int getItemIndex()
          Retrieves the index of the media item in the playlist
 PlayStateEvent.State getPlayState()
          Retrieves the new state of media playback
 
Methods inherited from class com.google.gwt.event.shared.GwtEvent
assertLive, getSource, isLive, kill, revive, toDebugString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final com.google.gwt.event.shared.GwtEvent.Type<PlayStateHandler> TYPE
Constructor Detail

PlayStateEvent

protected PlayStateEvent(PlayStateEvent.State state,
                         int itemIndex)
Creates a new play state event

Parameters:
state - the new state
itemIndex - the playlist index of the media
Method Detail

fire

public static void fire(HasPlayStateHandlers source,
                        PlayStateEvent.State state,
                        int itemIndex)
Fires play state events on all registered handlers

Parameters:
source - the source of the event
state - the new state of the media
itemIndex - the playlist index of the media

getAssociatedType

public com.google.gwt.event.shared.GwtEvent.Type<PlayStateHandler> getAssociatedType()
Specified by:
getAssociatedType in class com.google.gwt.event.shared.GwtEvent<PlayStateHandler>

dispatch

protected void dispatch(PlayStateHandler handler)
Specified by:
dispatch in class com.google.gwt.event.shared.GwtEvent<PlayStateHandler>

getPlayState

public PlayStateEvent.State getPlayState()
Retrieves the new state of media playback

Returns:
the state of the playback

getItemIndex

public int getItemIndex()
Retrieves the index of the media item in the playlist

Returns:
the index of the media item in the playlist


Copyright © 2009-2011. All Rights Reserved.