jreceiver.common.rec.driver
Class SignalRec

java.lang.Object
  |
  +--jreceiver.common.rec.BaseRec
        |
        +--jreceiver.common.rec.driver.SignalRec
All Implemented Interfaces:
Hashable, Rec, Selectable, Signal

public class SignalRec
extends BaseRec
implements Signal, Selectable

Bean to represent a signal (command:driverbind binding)

Version:
$Revision: 1.3 $ $Date: 2002/12/29 00:44:06 $
Author:
Reed Esau

Field Summary
protected  Command cmd
           
protected  boolean is_checked
          is the item selected in the form?
protected  SignalKey key
           
protected  Device master_device
           
protected  java.lang.String sig_data
           
 
Fields inherited from interface jreceiver.common.rec.driver.Signal
HKEY_COMMAND, HKEY_MASTER_DEVICE, HKEY_SIG_DATA, POPULATE_COMMAND, POPULATE_MASTER_DEVICE
 
Fields inherited from interface jreceiver.common.rec.Rec
HKEY_KEY, NO_LIMIT
 
Fields inherited from interface jreceiver.common.rec.Selectable
HKEY_CHECKED
 
Constructor Summary
SignalRec()
          ctor - default
SignalRec(java.util.Hashtable hash)
          ctor - construct from a hashtable, usually retrieved via XML-RPC
SignalRec(SignalKey key)
          ctor - shallow
SignalRec(SignalKey key, java.lang.String sig_data, Command cmd, Device master_device)
          ctor - deep
 
Method Summary
 boolean getChecked()
          get the current select state
 Command getCommand()
           
 java.lang.Object getKey()
          return the Number-derived, Key-derived or String that serves as this Rec's key.
 Device getMasterDevice()
           
 java.lang.String getSignalData()
           
static java.util.Vector reconstitute(java.util.Vector vector)
          Reconstitute each SignalRec object that appears as a hash in the list.
 void setChecked(boolean is_checked)
          set the select state
 void setCommand(Command cmd)
           
 void setKey(java.lang.Object new_key)
          assign the Number-derived, Key-derived or String that serves as this Rec's key.
 void setMasterDevice(Device master_device)
           
 void setSignalData(java.lang.String sig_data)
           
 java.util.Hashtable toHash()
          Store the object as a hash suitable for transport over an XML-RPC connection or similar.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class jreceiver.common.rec.BaseRec
dissolve, dissolveMap, find, find, find, find
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

key

protected SignalKey key

sig_data

protected java.lang.String sig_data

cmd

protected Command cmd

master_device

protected Device master_device

is_checked

protected boolean is_checked
is the item selected in the form?
Constructor Detail

SignalRec

public SignalRec()
ctor - default

SignalRec

public SignalRec(SignalKey key)
ctor - shallow

SignalRec

public SignalRec(SignalKey key,
                 java.lang.String sig_data,
                 Command cmd,
                 Device master_device)
ctor - deep

SignalRec

public SignalRec(java.util.Hashtable hash)
          throws RecException
ctor - construct from a hashtable, usually retrieved via XML-RPC
Parameters:
hash -  
Method Detail

getKey

public java.lang.Object getKey()
Description copied from interface: Rec
return the Number-derived, Key-derived or String that serves as this Rec's key.
Specified by:
getKey in interface Rec

setKey

public void setKey(java.lang.Object new_key)
assign the Number-derived, Key-derived or String that serves as this Rec's key.
Specified by:
setKey in interface Rec

getSignalData

public java.lang.String getSignalData()
Specified by:
getSignalData in interface Signal

setSignalData

public void setSignalData(java.lang.String sig_data)
Specified by:
setSignalData in interface Signal

getCommand

public Command getCommand()
Specified by:
getCommand in interface Signal

setCommand

public void setCommand(Command cmd)
Specified by:
setCommand in interface Signal

getMasterDevice

public Device getMasterDevice()
Specified by:
getMasterDevice in interface Signal

setMasterDevice

public void setMasterDevice(Device master_device)
Specified by:
setMasterDevice in interface Signal

getChecked

public boolean getChecked()
Description copied from interface: Selectable
get the current select state
Specified by:
getChecked in interface Selectable
Following copied from interface: jreceiver.common.rec.Selectable
Returns:
boolean true if the item has been selected by the user; false otherwise

setChecked

public void setChecked(boolean is_checked)
Description copied from interface: Selectable
set the select state
Specified by:
setChecked in interface Selectable
Following copied from interface: jreceiver.common.rec.Selectable
Parameters:
is_checked -  

toHash

public java.util.Hashtable toHash()
Store the object as a hash suitable for transport over an XML-RPC connection or similar.

Use SignalRec(Hashtable) to transform the data back into an object of this type.

Specified by:
toHash in interface Hashable
Returns:
 

toString

public java.lang.String toString()
Description copied from interface: Hashable
Returns a string representation of the object.
Specified by:
toString in interface Hashable
Overrides:
toString in class java.lang.Object

reconstitute

public static java.util.Vector reconstitute(java.util.Vector vector)
                                     throws RecException
Reconstitute each SignalRec object that appears as a hash in the list.


Copyright © 2001-2002 Reed Esau, All Rights Reserved.