AuD
Lecture 'Algorithmen und Datenstrukturen' (code examples)
aud.util.SingleStepperDemo Class Reference

Demonstrate use of SingleStepper. More...

+ Inheritance diagram for aud.util.SingleStepperDemo:
+ Collaboration diagram for aud.util.SingleStepperDemo:

Static Public Member Functions

static void main (String args[])
 
static void main (String[] args)
 

Protected Member Functions

void onHalt ()
 
- Protected Member Functions inherited from aud.util.SingleStepper
JComponent createComponents ()
 
void onNext ()
 call on button pressed More...
 
void println (String text)
 print to both, text area and stdout More...
 
void onHalt ()
 

Protected Attributes

DList<?> list = null
 
DotViewer v
 
- Protected Attributes inherited from aud.util.SingleStepper
JFrame frame
 
JTextArea history
 
JButton next
 
Object monitor = new Object()
 
int timeout = 0
 

Additional Inherited Members

- Public Member Functions inherited from aud.util.SingleStepper
 SingleStepper (JFrame parent)
 create new instance More...
 
 SingleStepper (String caption)
 create new instance More...
 
JFrame parent ()
 get parent widget More...
 
void halt (String text, int timeout)
 display text and wait for user or timeout
More...
 
void setTimeout (int timeout)
 Set global timeout. More...
 
SingleStepper whereAmI ()
 print location of calling code More...
 
SingleStepper showSource ()
 jmp to caller's location in editor (emacs only) More...
 
void halt (String text)
 display text and wait for user (or global timeout) More...
 
void halt ()
 wait for user More...
 

Detailed Description

Demonstrate use of SingleStepper.

Definition at line 7 of file SingleStepperDemo.java.

Member Function Documentation

◆ main()

static void aud.util.SingleStepperDemo.main ( String  args[])
static

Reimplemented from aud.util.SingleStepper.

Definition at line 23 of file SingleStepperDemo.java.

23 {
24
25 DList<String> list=new DList<String>();
26 SingleStepperDemo app=new SingleStepperDemo(list);
27
28 list.push_back("b"); app.halt();
29 list.push_back("d"); app.halt();
30 list.push_back("e"); app.halt();
31
32 list.push_front("a"); app.halt();
33 list.insert(2,"c"); app.halt();
34
35 app.halt("QUIT");
36 System.exit(0);
37 }
void push_front(T obj)
insert entry at front of list [O(1)]
Definition: DList.java:142
void push_back(T obj)
append entry obj at end of list [O(1)]
Definition: DList.java:154
void insert(int i, T obj)
insert new entry obj at position i [O(n)]
Definition: DList.java:185

References aud.util.SingleStepper.halt(), aud.DList< T >.insert(), aud.util.SingleStepperDemo.list, aud.DList< T >.push_back(), and aud.DList< T >.push_front().

+ Here is the call graph for this function:

◆ onHalt()

void aud.util.SingleStepperDemo.onHalt ( )
protected

Reimplemented from aud.util.SingleStepper.

Definition at line 18 of file SingleStepperDemo.java.

18 {
19 if (list!=null)
20 v.display(list);
21 }
void display(String code)
display dot code
Definition: DotViewer.java:108

References aud.util.DotViewer.display(), aud.util.SingleStepperDemo.list, and aud.util.SingleStepperDemo.v.

+ Here is the call graph for this function:

Member Data Documentation

◆ list

DList<?> aud.util.SingleStepperDemo.list = null
protected

◆ v

DotViewer aud.util.SingleStepperDemo.v
protected
Initial value:
= DotViewer.displayWindow((String) null,
"aud.util.GraphDemo")

Definition at line 10 of file SingleStepperDemo.java.

Referenced by aud.util.SingleStepperDemo.onHalt().


The documentation for this class was generated from the following file: