|
|||||||||||
| 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.output.Output
edu.berkeley.guir.ptk.output.OrbOutput
Provides an interface for displaying events on an Ambient Orb. Uses the
Ambient Orb's API to provide animation methods without implementing
Animatable. For an example of an application that uses this, see the
AudioOrbAppNon.
| Field Summary | |
static int[] |
ALL_COLORS
An array of integers representing all the pre-defined colors displayed by the ambient orb. |
static int[] |
BASIC_COLORS
An array of normal color constants. |
static int[] |
BLUE_COLORS
An array of blue color constants. |
static int |
BRIGHT
Brightness constant: use to set OrbOutput.brightness. |
int |
brightness
The brightness of the Orb: set to DIM, MEDIUM_BRIGHT, or, BRIGHT. |
int |
changeblind_anim
These define the speed and style of animations on the orb for each notification level. |
long |
COLOR_TIME
The amount of time the Orb stays on one color - used in the methods provided in this class for looping through colors. |
static int[] |
DARK_COLORS
An array of dark color constants. |
static int |
DIM
Brightness constant: use to set OrbOutput.brightness. |
static int[] |
GREEN_COLORS
An array of green color constants. |
int |
interrupt_anim
Default for interrupt is AML.ANIM_NONE, which is an abrupt change. |
static int[] |
LIGHT_COLORS
An array of light color constants. |
static int[] |
MAGENTA_COLORS
An array of magenta color constants. |
int |
makeaware_anim
Default for make aware is AML.ANIM_FAST, which is a smooth, medium-paced change. |
static int |
MEDIUM_BRIGHT
Brightness constant: use to set OrbOutput.brightness. |
static java.lang.String |
my_port
The COM port to which the Ambient Orb is connected |
static int[] |
NORMAL_COLORS
An array of normal color constants. |
protected ambient.orb.AML |
orb
An ambient orb API object. |
static int[] |
PURPLE_COLORS
An array of purple color constants. |
static int[] |
RED_YELLOW_COLORS
An array of red, orange, and yellow color constants. |
| Fields inherited from class edu.berkeley.guir.ptk.output.Output |
animatable, d_queue, data_ids_I_want, history, ITEMS_LENGTH, metadata_I_want, num_ids, num_metadata, output_cycle_time, transition |
| Fields inherited from class edu.berkeley.guir.ptk.PTK |
debug, MAX_DEBUG, MED_DEBUG, MIN_DEBUG, NO_DEBUG |
| Constructor Summary | |
OrbOutput()
Constructor that initializes serial port communication with the Ambient Orb, sets the Orb's brightness and resets it. |
|
| Method Summary | |
Event |
alternateStep(Event prev_event,
Event new_event,
int display_step)
Returns an event that represents the "alternate" or "opposite" of what is displayed by the other transition methods in order to create a "flashing" effect. |
Event |
changeblindTransStep(Event prev_event,
Event new_event,
int display_step)
Returns an event that is somewhere between the start and end points of a change blind transition, depending on the display_step and the number of steps involved in the transition. |
void |
displayEvent(Event e)
This code needs to actually display the event (e.g. |
Event |
endTransition(Event prev_event,
Event new_event,
int display_step)
Returns an event representative of the end state of a transition. |
int[] |
getChangeblindColors()
|
int[] |
getInterruptColors()
|
int[] |
getMakeAwareColors()
|
Event |
interruptTransStep(Event prev_event,
Event new_event,
int display_step)
Returns an event that is somewhere between the start and end points of a interrupt transition, depending on the display_step and the number of steps involved in the transition. |
void |
loopAllColors(long time)
Calls loopColors to display all the colors. |
void |
loopBlues(long time)
Calls loopColors to display all the blue colors. |
void |
loopColors(int[] colors,
long time)
Loops through the given colors, displaying each on the Orb for the given time. |
void |
loopDarkColors(long time)
Calls loopColors to display all the dark colors. |
void |
loopGreens(long time)
Calls loopColors to display all the green colors. |
void |
loopLightColors(long time)
Calls loopColors to display all the light colors. |
void |
loopMagenta(long time)
Calls loopColors to display all the magenta colors. |
void |
loopNormalColors(long time)
Calls loopColors to display all the normal colors. |
void |
loopPurples(long time)
Calls loopColors to display all the purple colors. |
void |
loopRedYellow(long time)
Calls loopColors to display all the red-orange-yellow colors. |
Event |
makeawareTransStep(Event prev_event,
Event new_event,
int display_step)
Returns an event that is somewhere between the start and end points of a make aware transition, depending on the display_step and the number of steps involved in the transition. |
void |
reset()
Sets to white (tends to still pulse some). |
void |
sendColor(int c,
int animation)
|
void |
sendColorAbrupt(int c)
Transitions from the previous color to given color with an abrupt transition between them. |
void |
sendColorPulse(int c)
Transitions from the previous color to given color with a pulsing transition between them. |
void |
sendColorsAbrupt(int[] colors,
long time)
Loop through the given colors with an abrupt transition between them. |
void |
sendColorSmoothFast(int c)
Transitions from the previous color to given color with a smooth, fast transition between them. |
void |
sendColorSmoothMed(int c)
Transitions from the previous color to given color with a smooth, medium transition between them. |
void |
sendColorSmoothMedFast(int c)
Transitions from the previous color to given color with a smooth, medium fast transition between them. |
void |
sendColorSmoothMedSlow(int c)
Transitions from the previous color to given color with a smooth, medium slow transition between them. |
void |
sendColorSmoothSlow(int c)
Transitions from the previous color to given color with a smooth, slow transition between them. |
void |
sendColorSmoothVeryFast(int c)
Transitions from the previous color to given color with a smooth, very fast transition between them. |
void |
sendColorSmoothVerySlow(int c)
Transitions from the previous color to given color with a smooth, very slow transition between them. |
void |
sendColorsPulse(int[] colors,
long time)
Loop through the given colors with a pulsing transition between them. |
void |
sendColorsSmoothFast(int[] colors,
long time)
Loop through the given colors with a smooth, fast transition between them. |
void |
sendColorsSmoothMed(int[] colors,
long time)
Loop through the given colors with a smooth, medium transition between them. |
void |
sendColorsSmoothMedFast(int[] colors,
long time)
Loop through the given colors with a smooth, medium fast transition between them. |
void |
sendColorsSmoothMedSlow(int[] colors,
long time)
Loop through the given colors with a smooth, medium slow transition between them. |
void |
sendColorsSmoothSlow(int[] colors,
long time)
Loop through the given colors with a smooth, slow transition between them. |
void |
sendColorsSmoothVeryFast(int[] colors,
long time)
Loop through the given colors with a smooth, very fast transition between them. |
void |
sendColorsSmoothVerySlow(int[] colors,
long time)
Loop through the given colors with a smooth, very slow transition between them. |
void |
setChangeblindColors(int[] colors)
|
void |
setChangeblindParams(Event e,
int step)
|
void |
setInterruptColors(int[] colors)
|
void |
setInterruptParams(Event e,
int step)
|
void |
setMakeawareColors(int[] colors)
|
void |
setMakeawareParams(Event e,
int step)
|
Event |
startTransition(Event prev_event,
Event new_event,
int display_step)
Returns an event representative of the beginning of a transition. |
| Methods inherited from class edu.berkeley.guir.ptk.output.Output |
addDataID, addMetadataIWant, checkAction, doIWant, getAllMetadata, getDataIDs, getFirstMetadata, getHistory, handleEvent, interDisplayEvent, isAnimatable, printMetadataIWant, run, setChangeblindTransitionSteps, setDataIDsIWant, setInterruptTransitionSteps, setMakeawareTransitionSteps, setTimeBetweenDisplayEvents, setTransition, setUnsetNotification |
| 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 static final int DIM
public static final int MEDIUM_BRIGHT
public static final int BRIGHT
public static final int[] ALL_COLORS
public static final int[] DARK_COLORS
public static final int[] NORMAL_COLORS
public static final int[] BASIC_COLORS
public static final int[] LIGHT_COLORS
public static final int[] MAGENTA_COLORS
public static final int[] PURPLE_COLORS
public static final int[] BLUE_COLORS
public static final int[] GREEN_COLORS
public static final int[] RED_YELLOW_COLORS
protected ambient.orb.AML orb
public static java.lang.String my_port
public int brightness
public final long COLOR_TIME
public int changeblind_anim
public int makeaware_anim
public int interrupt_anim
| Constructor Detail |
public OrbOutput()
| Method Detail |
public int[] getChangeblindColors()
public int[] getMakeAwareColors()
public int[] getInterruptColors()
public void setChangeblindColors(int[] colors)
public void setMakeawareColors(int[] colors)
public void setInterruptColors(int[] colors)
public void displayEvent(Event e)
Output
displayEvent in class Outpute - This event to be displayed
public void setChangeblindParams(Event e,
int step)
public void setMakeawareParams(Event e,
int step)
public void setInterruptParams(Event e,
int step)
public Event startTransition(Event prev_event,
Event new_event,
int display_step)
Animatable
startTransition in interface Animatableprev_event - the previous event sent to this Output (null if the
new event is the first).new_event - the new event to be displayed on the Output.display_step - a number indicating the display order of the event
returned if the Transition is creating a set of events.
public Event endTransition(Event prev_event,
Event new_event,
int display_step)
Animatable
endTransition in interface Animatableprev_event - the previous event sent to this Output (null if the
new event is the first).new_event - the new event to be displayed on the Output.display_step - a number indicating the display order of the event
returned if the Transition is creating a set of events.
public Event changeblindTransStep(Event prev_event,
Event new_event,
int display_step)
Animatable
changeblindTransStep in interface Animatableprev_event - the previous event sent to this Output (null if the
new event is the first).new_event - the new event to be displayed on the Output.display_step - a number indicating the display order of the event
returned if the Transition is creating a set of events.
public Event makeawareTransStep(Event prev_event,
Event new_event,
int display_step)
Animatable
makeawareTransStep in interface Animatableprev_event - the previous event sent to this Output (null if the
new event is the first).new_event - the new event to be displayed on the Output.display_step - a number indicating the display order of the event
returned if the Transition is creating a set of events.
public Event interruptTransStep(Event prev_event,
Event new_event,
int display_step)
Animatable
interruptTransStep in interface Animatableprev_event - the previous event sent to this Output (null if the
new event is the first).new_event - the new event to be displayed on the Output.display_step - a number indicating the display order of the event
returned if the Transition is creating a set of events.
public Event alternateStep(Event prev_event,
Event new_event,
int display_step)
Animatable
alternateStep in interface Animatableprev_event - the previous event sent to this Output (null if the
new event is the first).new_event - the new event to be displayed on the Output.display_step - a number indicating the display order of the event
returned if the Transition is creating a set of events.
public void reset()
public void sendColor(int c,
int animation)
public void loopColors(int[] colors,
long time)
colors - time - public void loopRedYellow(long time)
public void loopGreens(long time)
public void loopPurples(long time)
public void loopMagenta(long time)
public void loopBlues(long time)
public void loopDarkColors(long time)
public void loopLightColors(long time)
public void loopNormalColors(long time)
public void loopAllColors(long time)
public void sendColorsAbrupt(int[] colors,
long time)
colors - an integer array of Orb color constants.time - indicates how long to display each color.
public void sendColorsPulse(int[] colors,
long time)
colors - an integer array of Orb color constants.time - indicates how long to display each color.
public void sendColorsSmoothVeryFast(int[] colors,
long time)
colors - an integer array of Orb color constants.time - indicates how long to display each color.
public void sendColorsSmoothFast(int[] colors,
long time)
colors - an integer array of Orb color constants.time - indicates how long to display each color.
public void sendColorsSmoothMedFast(int[] colors,
long time)
colors - an integer array of Orb color constants.time - indicates how long to display each color.
public void sendColorsSmoothMed(int[] colors,
long time)
colors - an integer array of Orb color constants.time - indicates how long to display each color.
public void sendColorsSmoothMedSlow(int[] colors,
long time)
colors - an integer array of Orb color constants.time - indicates how long to display each color.
public void sendColorsSmoothSlow(int[] colors,
long time)
colors - an integer array of Orb color constants.time - indicates how long to display each color.
public void sendColorsSmoothVerySlow(int[] colors,
long time)
colors - an integer array of Orb color constants.time - indicates how long to display each color.public void sendColorAbrupt(int c)
c - an Orb color constant.public void sendColorPulse(int c)
c - an Orb color constant.public void sendColorSmoothVeryFast(int c)
c - an Orb color constant.public void sendColorSmoothFast(int c)
c - an Orb color constant.public void sendColorSmoothMedFast(int c)
c - an Orb color constant.public void sendColorSmoothMed(int c)
c - an Orb color constant.public void sendColorSmoothMedSlow(int c)
c - an Orb color constant.public void sendColorSmoothSlow(int c)
c - an Orb color constant.public void sendColorSmoothVerySlow(int c)
c - an Orb color constant.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||