org.wcb.autohome.implementations
Class Macro

java.lang.Object
  extended byorg.wcb.autohome.implementations.Macro
All Implemented Interfaces:
IMacro, java.io.Serializable

public class Macro
extends java.lang.Object
implements IMacro, java.io.Serializable

Filename: $Id: Macro.java,v 1.3 2004/02/28 00:21:49 wbogaardt Exp $ Abstract: This class is a serialized place holder for a Macro object it there for has elements that are needed for the IMacro interface which is handled by the GUI. $Log: Macro.java,v $ Revision 1.3 2004/02/28 00:21:49 wbogaardt fixed formating to be compliant with sun coding convention Revision 1.2 2003/10/10 21:39:07 wbogaardt modified macro triggers to use calendar in stead of strings

Version:
1.0
Author:
wbogaardt
See Also:
Serialized Form

Constructor Summary
Macro()
          Default Constructor which automatically sets the macro name to Macro1
Macro(IMacro newO)
          Clone constructor using the interface
Macro(java.lang.String n, java.lang.String desc, int d, java.util.Vector evt)
          Full constructor to allow building of the macro
 
Method Summary
 int getDelay()
          Delay in minutes before macro starts executing.
 java.lang.String getDescription()
          Description of the macro for user reference only.
 java.util.Vector getEvents()
          The associated modules and their actions to take for the macro.
 java.lang.String getMacroName()
          Simple accessor for the name of the macro
 void print()
          Print routine for debugging
 void setDelay(int dly)
          This is the delay in minutes from when the macro is executed.
 void setDescription(java.lang.String desc)
          This is a description of from a users standpoint this description can be a phase used to describe the purpose of this macro.
 void setEvents(java.util.Vector ev)
          This is a vector of Modules and their actions which are wraped in a X10Events object.
 void setMacroName(java.lang.String name)
          The name of the macro this gets used to assign a macro to a trigger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Macro

public Macro(java.lang.String n,
             java.lang.String desc,
             int d,
             java.util.Vector evt)
Full constructor to allow building of the macro

Parameters:
n - Name of the macro
desc - brief description of the macro
d - Delay in minutes for the macro
evt - Vector of MacroEvent objects

Macro

public Macro()
Default Constructor which automatically sets the macro name to Macro1


Macro

public Macro(IMacro newO)
Clone constructor using the interface

Parameters:
newO - The IMacro interface to clone this object.
Method Detail

print

public void print()
Print routine for debugging


setMacroName

public void setMacroName(java.lang.String name)
The name of the macro this gets used to assign a macro to a trigger.

Specified by:
setMacroName in interface IMacro
Parameters:
name - - name of the macro

setDescription

public void setDescription(java.lang.String desc)
This is a description of from a users standpoint this description can be a phase used to describe the purpose of this macro.

Specified by:
setDescription in interface IMacro
Parameters:
desc - - string description of macro

setDelay

public void setDelay(int dly)
This is the delay in minutes from when the macro is executed. It is passed on to the macro events in the JessePeterson api.

Specified by:
setDelay in interface IMacro
Parameters:
dly - - delay in minutes

setEvents

public void setEvents(java.util.Vector ev)
This is a vector of Modules and their actions which are wraped in a X10Events object. This object then is enumerated through so when the macro is run the modules and the associated action will run after the delay time has passed.

Specified by:
setEvents in interface IMacro
Parameters:
ev - - of objects related to X10Events

getMacroName

public java.lang.String getMacroName()
Simple accessor for the name of the macro

Specified by:
getMacroName in interface IMacro
Returns:
Macro's assigned name

getDescription

public java.lang.String getDescription()
Description of the macro for user reference only. The default value of this is NO DESCRIPTION.

Specified by:
getDescription in interface IMacro
Returns:
- User description of macro.

getDelay

public int getDelay()
Delay in minutes before macro starts executing.

Specified by:
getDelay in interface IMacro
Returns:
- minutes in int format.

getEvents

public java.util.Vector getEvents()
The associated modules and their actions to take for the macro. These objects are in a X10Events object.

Specified by:
getEvents in interface IMacro
Returns:
Vector - X10Events


Copyright © 1999-2004 Walter Bogaardt. All Rights Reserved.