All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
   |
   +----c2.framework.Brick
           |
           +----c2.framework.Component
                   |
                   +----c2.framework.ComponentThread
                           |
                           +----c2.comp.StackPieArtist
Implements a graphical visualization of a stack. Maintains an abstract model of the top of the stack and an arc from zero to stack_top mod 360 degrees. Also maintains 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);
       empty                 ();
   Outgoing Requests
       push                  (Integer value);
       pop                   ();
       top                   ();
   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);
       c2Garc                (Integer x, Integer y,
                              Integer width, Integer height,
                              Integer angle1, Integer angle2,
                              String fill, String border,
                              String parent_id);
 
 panel
	panel
   pop_button
	pop_button
   push_button
	push_button
   quit_button
	quit_button
   tf_value
	tf_value
   top_button
	top_button
   txt_field
	txt_field
   vport
	vport
   
 StackPieArtist()
	StackPieArtist()
   StackPieArtist(String)
	StackPieArtist(String)
   
 create(String)
	create(String)
   handle(Notification)
	handle(Notification)
   handle(Request)
	handle(Request)
   start()
	start()
   
 vport
vport
protected String vport
 panel
panel
protected String panel
 push_button
push_button
protected String push_button
 pop_button
pop_button
protected String pop_button
 top_button
top_button
protected String top_button
 quit_button
quit_button
protected String quit_button
 txt_field
txt_field
protected String txt_field
 tf_value
tf_value
protected Integer tf_value
 
 StackPieArtist
StackPieArtist
public StackPieArtist()
 StackPieArtist
StackPieArtist
public StackPieArtist(String _name)
 
 create
create
public void create(String _name)
 start
start
public void start()
 handle
handle
public synchronized void handle(Request r)
 handle
handle
public synchronized void handle(Notification n)
All Packages Class Hierarchy This Package Previous Next Index