chrriis.dj.nativeswing.swtimpl.components.win32
Class WMPControls

java.lang.Object
  extended by chrriis.dj.nativeswing.swtimpl.components.win32.WMPControls

public class WMPControls
extends Object

A Media Player object responsible for controls-related actions.

Author:
Christopher Deckers

Method Summary
 int getAbsolutePosition()
          Get the current position on the timeline.
 boolean isPauseEnabled()
          Indicate if the pause functionality is enabled.
 boolean isPlayEnabled()
          Indicate if the play functionality is enabled.
 boolean isStopEnabled()
          Indicate if the stop functionality is enabled.
 void pause()
          Pause the currently playing media.
 void play()
          Start playing the loaded media.
 void setAbsolutePosition(int time)
          Set the current position on the timeline.
 void stop()
          Stop the currently playing media.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isPlayEnabled

public boolean isPlayEnabled()
Indicate if the play functionality is enabled.

Returns:
true if the play functionality is enabled.

play

public void play()
Start playing the loaded media.


isStopEnabled

public boolean isStopEnabled()
Indicate if the stop functionality is enabled.

Returns:
true if the stop functionality is enabled.

stop

public void stop()
Stop the currently playing media.


isPauseEnabled

public boolean isPauseEnabled()
Indicate if the pause functionality is enabled.

Returns:
true if the pause functionality is enabled.

pause

public void pause()
Pause the currently playing media.


setAbsolutePosition

public void setAbsolutePosition(int time)
Set the current position on the timeline.

Parameters:
time - The current position in milliseconds.

getAbsolutePosition

public int getAbsolutePosition()
Get the current position on the timeline.

Returns:
the current position in milliseconds, or -1 in case of failure.