All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----c2.framework.Brick
|
+----c2.framework.Component
|
+----c2.framework.ComponentThread
|
+----c2.comp.StackArtist
Implements a graphical visualization of a stack. Maintains an abstract model of the entire contents of a stack, as well as buttons to push elements onto the stack, pop them off the stack, and access the top element. A text field allows a user to specify the value to be pushed, and a quit button to exit the application to which the Artist belongs.
The Artist issues stack manipulation requests to a stack ADT above it in a C2 architecture and notifications to components (if any) below it. In turn, it receives notifications from the stack ADT and requests from a graphics server and acts accordingly.
Incoming Notifications
pushed (Integer value);
popped (Integer value);
top (Integer value);
state (Vector stack);
empty ();
Outgoing Requests
push (Integer value);
pop ();
top ()
get_state ();
Incoming Requests
AcceptEvent (String button, String parent_id);
AcceptEvent (String text_field, String value,
String parent_id);
Outgoing Notifications
ViewportCreated (Integer x, Integer y,
Integer width, Integer height,
String title, String id,
String foreground, String background);
ApplicationTerminated ();
PanelAdded (Integer x, Integer y,
Integer width, Integer height,
String foreground, String background,
String id, String parent_id);
PanelCleared (String id);
ButtonAdded (Integer x, Integer y,
Integer width, Integer height,
String foreground, String background,
String label, String parent_id);
TextFieldAdded (Integer x, Integer y,
Integer width, Integer height,
String foreground, String background,
String label, String parent_id);
TextFieldSet (String label, String value,
String parent_id);
TextFieldCleared (String label, String parent_id);
c2Gtext (Integer x, Integer y,
String value, String font,
String color, String style,
Integer size, String parent_id);
protected String vport
protected String panel
protected String push_button
protected String pop_button
protected String top_button
protected String quit_button
protected String txt_field
protected Integer tf_value
public StackArtist()
public StackArtist(String _name)
public void create(String _name)
public void start()
public synchronized void handle(Request r)
public synchronized void handle(Notification n)
All Packages Class Hierarchy This Package Previous Next Index