|
|||||||||||
| 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.DegreeChangeNotificationSetter
Determines if a given event has changed by an amount specified by any of the notification level Data parameters. Compares the new event to the last event. Sets the notification level based on which Data parameter indicates the amount of change.
Takes either five or six parameters (parameter (1) is optional):
| Field Summary | |
DataRange |
change_changeblind
|
DataRange |
change_demandaction
|
DataRange |
change_ignore
These data fields indicate the degree of change needed for each notification level. |
DataRange |
change_interrupt
|
DataRange |
change_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 | |
DegreeChangeNotificationSetter()
Default constructor. |
|
DegreeChangeNotificationSetter(DataRange ignore,
DataRange changeblind,
DataRange makeaware,
DataRange interrupt,
DataRange demandaction)
Same as the previous two, except no data IDs. |
|
DegreeChangeNotificationSetter(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. |
|
DegreeChangeNotificationSetter(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 difference from one event to another is defined (i.e., in an alphabetized string, 10 could be defined to be the difference between c and m). |
| 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 change_ignore
The setter will simply not set the notification level to any level for which a change value is not specified.
public DataRange change_changeblind
public DataRange change_makeaware
public DataRange change_interrupt
public DataRange change_demandaction
| Constructor Detail |
public DegreeChangeNotificationSetter()
public DegreeChangeNotificationSetter(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. The setter subtracts the input event to the previous input event
with from the same input source and if the result 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. The setter subtracts the input event to the previous input event
with from the same input source and if the result 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. The setter subtracts the input event to the previous input event
with from the same input source and if the result 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. The setter subtracts the input event to the previous input event
with from the same input source and if the result 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. The setter subtracts the input event to the previous input event
with from the same input source and if the result is a number that
falls in the range of this DataRange, then the notification level will
be set to demandchange.
public DegreeChangeNotificationSetter(java.lang.String[] data_id_to_check,
DataRange ignore,
DataRange changeblind,
DataRange makeaware,
DataRange interrupt,
DataRange demandaction)
public DegreeChangeNotificationSetter(DataRange ignore,
DataRange changeblind,
DataRange makeaware,
DataRange interrupt,
DataRange demandaction)
| Method Detail |
public int set(Event e,
History h)
The application developer specifies what amount of change is necessary for different notification levels by setting the data fields of this NotificationSetter.
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 | ||||||||||