|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.berkeley.guir.ptk.PTK
edu.berkeley.guir.ptk.notification.NotificationSetter
edu.berkeley.guir.ptk.notification.ThresholdNotificationSetter
Used to specify the notification levels that should be set when event data falls within a certain range or threshold. You must set the data fields of this class specifying what range of data values correspond to each notification level. If you do not set some of the data fields, the notification will simply not be set for those notification levels. You do need to worry about setting metadata or data ids for any data fields in this class - they are not checked. Only the data values are checked: data value, min, max, and step.
Takes either five or six parameters (parameter (1) is optional):
| Field Summary | |
DataRange |
threshold_changeblind
|
DataRange |
threshold_demandaction
|
DataRange |
threshold_ignore
Indicate the threshold number ranges needed for each notification level. |
DataRange |
threshold_interrupt
|
DataRange |
threshold_makeaware
|
| Fields inherited from class edu.berkeley.guir.ptk.notification.NotificationSetter |
data_id, translate |
| Fields inherited from class edu.berkeley.guir.ptk.PTK |
debug, MAX_DEBUG, MED_DEBUG, MIN_DEBUG, NO_DEBUG |
| Constructor Summary | |
ThresholdNotificationSetter()
Default constructor. |
|
ThresholdNotificationSetter(DataRange ignore,
DataRange changeblind,
DataRange makeaware,
DataRange interrupt,
DataRange demandaction)
Same as the previous two, except no data IDs. |
|
ThresholdNotificationSetter(java.lang.String[] data_id_to_check,
DataRange ignore,
DataRange changeblind,
DataRange makeaware,
DataRange interrupt,
DataRange demandaction)
Same as previous constructor, except for the first parameter. |
|
ThresholdNotificationSetter(java.lang.String data_id_to_check,
DataRange ignore,
DataRange changeblind,
DataRange makeaware,
DataRange interrupt,
DataRange demandaction)
Constructor. |
|
| Method Summary | |
int |
set(Event e,
History h)
Assumes data passed with event will have some quantifiable range that can be put in a certain order (i.e., numbers, alphabetized strings). |
| Methods inherited from class edu.berkeley.guir.ptk.notification.NotificationSetter |
addMetadataIWant, canISetNotification, getAllMetadata, getEventData, getEventDataAsDouble, getFirstMetadata |
| Methods inherited from class edu.berkeley.guir.ptk.PTK |
getMAX, getMED, getMIN, getNO, printDebug, printDebug, printError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public DataRange threshold_ignore
The setter will simply not set the notification level to any level for which a change value is not specified.
public DataRange threshold_changeblind
public DataRange threshold_makeaware
public DataRange threshold_interrupt
public DataRange threshold_demandaction
| Constructor Detail |
public ThresholdNotificationSetter()
public ThresholdNotificationSetter(java.lang.String data_id_to_check,
DataRange ignore,
DataRange changeblind,
DataRange makeaware,
DataRange interrupt,
DataRange demandaction)
data_id_to_check - The data ID in the input event that this
notification setter will check when setting the notification level.
For example, if the setter is sets the notification level depending
on the volume of an audio input, then this would be set to
PTKConstants.VOLUME_ID.ignore - This is a DataRange object that will be compared to the input
event. If the input event is a number that falls in the range of this
DataRange, then the notification level will be set to ignore.changeblind - This is a DataRange object that will be compared to the input
event. If the input event is a number that falls in the range of this
DataRange, then the notification level will be set to changeblind.makeaware - This is a DataRange object that will be compared to the input
event. If the input event is a number that falls in the range of this
DataRange, then the notification level will be set to makeaware.interrupt - This is a DataRange object that will be compared to the input
event. If the input event is a number that falls in the range of this
DataRange, then the notification level will be set to interrupt.demandaction - This is a DataRange object that will be compared to the input
event. If the input event is a number that falls in the range of this
DataRange, then the notification level will be set to demandchange.
public ThresholdNotificationSetter(java.lang.String[] data_id_to_check,
DataRange ignore,
DataRange changeblind,
DataRange makeaware,
DataRange interrupt,
DataRange demandaction)
public ThresholdNotificationSetter(DataRange ignore,
DataRange changeblind,
DataRange makeaware,
DataRange interrupt,
DataRange demandaction)
| Method Detail |
public int set(Event e,
History h)
set in class NotificationSettere - The event that may have its notification set.h - The history of events that have been passed to this
application.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||