com.ibm.eNetwork.beans.HOD.event
Class MacroStateEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.ibm.eNetwork.beans.HOD.event.HODEvent
              |
              +--com.ibm.eNetwork.beans.HOD.event.MacroStateEvent
All Implemented Interfaces:
java.io.Serializable

public class MacroStateEvent
extends com.ibm.eNetwork.beans.HOD.event.HODEvent

MacroExtractEvent is fired to MacroRuntimeListeners by Macro when Macro's state changes. This event is useful for controlling GUI feedback implemented on top of Macro.

See Also:
MacroRuntimeListener, Macro, Serialized Form

Field Summary
static int STATE_DISCONNECTED
          Macro state constant that when returned from getState(), indicates that the Macro bean is not wired properly.
static int STATE_EMPTY
          Macro state constant that when returned from getState(), indicates that there is no macro currently in the Macro bean.
static int STATE_INTERNAL_ERROR
          State property value.
static int STATE_PLAY_ERROR
          Macro state constant that when returned from getState(), indicates that the Macro bean was playing, but the macro failed to complete successfully.
static int STATE_PLAY_PAUSED
          Macro state constant that when returned from getState(), indicates a macro is playing, but is paused.
static int STATE_PLAYING
          Macro state constant that when returned from getState(), indicates a macro is loaded and running.
static int STATE_RECORD_ERROR
          State property value.
static int STATE_RECORD_PAUSED
          Macro state constant that when returned from getState(), indicates a macro is recording, but is paused.
static int STATE_RECORDING
          Macro state constant that when returned from getState(), indicates a macro is currently being recorded.
static int STATE_STOPPED
          Macro state constant that when returned from getState(), indicates a macro is loaded, but stopped.
static int STATE_USER_ERROR
          State property value.
 
Constructor Summary
MacroStateEvent(Macro src, int s)
          Constructs a new MacroStateEvent object.
 
Method Summary
 com.ibm.eNetwork.ECL.ECLErr getECLErr()
          Retrieve the ECLErr that was the cause of the MacroEvent.STATE_PLAY_ERROR.
 java.lang.String getLine()
          Retrieve the line of the Macro.
 MacroScreen getMacroScreen()
          Return the current MacroScreen object for the state.
 int getState()
          Retrieve the state of the Macro.
 void setECLErr(com.ibm.eNetwork.ECL.ECLErr error)
          Set the ECLErr that was the cause of the MacroEvent.STATE_PLAY_ERROR.
 void setLine(java.lang.String str)
          Set the line of the Macro.
 void setMacroScreen(MacroScreen ms)
          Set the current MacroScreen object for the state.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATE_STOPPED

public static final int STATE_STOPPED
Macro state constant that when returned from getState(), indicates a macro is loaded, but stopped.

STATE_PLAYING

public static final int STATE_PLAYING
Macro state constant that when returned from getState(), indicates a macro is loaded and running.

STATE_RECORDING

public static final int STATE_RECORDING
Macro state constant that when returned from getState(), indicates a macro is currently being recorded.

STATE_PLAY_PAUSED

public static final int STATE_PLAY_PAUSED
Macro state constant that when returned from getState(), indicates a macro is playing, but is paused.

STATE_RECORD_PAUSED

public static final int STATE_RECORD_PAUSED
Macro state constant that when returned from getState(), indicates a macro is recording, but is paused.

STATE_EMPTY

public static final int STATE_EMPTY
Macro state constant that when returned from getState(), indicates that there is no macro currently in the Macro bean.

STATE_DISCONNECTED

public static final int STATE_DISCONNECTED
Macro state constant that when returned from getState(), indicates that the Macro bean is not wired properly.

STATE_PLAY_ERROR

public static final int STATE_PLAY_ERROR
Macro state constant that when returned from getState(), indicates that the Macro bean was playing, but the macro failed to complete successfully.

STATE_RECORD_ERROR

public static final int STATE_RECORD_ERROR
State property value. Macro is stopped due to an error during recording. This is the same as STATE_STOPPED with the added information that the most recent record command failed to complete.

STATE_INTERNAL_ERROR

public static final int STATE_INTERNAL_ERROR
State property value. Macro is stopped due to an internal error. This is the same as STATE_STOPPED.

STATE_USER_ERROR

public static final int STATE_USER_ERROR
State property value. Macro is encountered a user error. This is the same as STATE_STOPPED.
Constructor Detail

MacroStateEvent

public MacroStateEvent(Macro src,
                       int s)
Constructs a new MacroStateEvent object.
Method Detail

getState

public int getState()
Retrieve the state of the Macro.
Returns:
int Macro state.

getLine

public java.lang.String getLine()
Retrieve the line of the Macro. This will be null except for error states.
Returns:
String Macro line

setLine

public void setLine(java.lang.String str)
Set the line of the Macro. This will be used only for error states.
Parameters:
String - Macro line

getECLErr

public com.ibm.eNetwork.ECL.ECLErr getECLErr()
Retrieve the ECLErr that was the cause of the MacroEvent.STATE_PLAY_ERROR. This will be null if the MacroEvent.STATE_PLAY_ERROR was not caused by a thrown ECLErr.
Returns:
ECLErr ECLErr

setECLErr

public void setECLErr(com.ibm.eNetwork.ECL.ECLErr error)
Set the ECLErr that was the cause of the MacroEvent.STATE_PLAY_ERROR. This will only be set if the MacroEvent.STATE_PLAY_ERROR was caused by a thrown ECLErr.
Parameters:
ECLErr - ECLErr

setMacroScreen

public void setMacroScreen(MacroScreen ms)
Set the current MacroScreen object for the state.
Parameters:
ms - MacroScreen

getMacroScreen

public MacroScreen getMacroScreen()
Return the current MacroScreen object for the state. Especially useful for discovering what the last screen was when Macro stopped playing.
Returns:
MacroScreen