]> code.citadel.org Git - citadel.git/blob - shaggy/promptCmd.java
don't use libtool -avoid-version for libcitserver - this might help for
[citadel.git] / shaggy / promptCmd.java
1 /* promptCmd.java
2  * interface to make easy prompt windows
3  */
4
5 public abstract class promptCmd {
6   public abstract String getTitle();    /* Return the title of the window */
7   public abstract String getPrompt();   /* Return the text for label */
8   public abstract int getType();        /* Get type of query */
9
10   /* actions */
11   // type == YES_NO
12   public void yes() {}
13   // type == ONE_FIELD
14   public void one_field( String s ) {}
15   // type == TWO_FIELD
16   public void two_fields( String s1, String s2 ) {}
17
18   /* Override these as necessary */
19
20   /* type == ONE_FIELD || TWO_FIELD */
21   public String firstPrompt() { return ""; }
22   public boolean firstEcho() { return true; }
23
24   /* type == TWO_FIELD */
25   public String secondPrompt() { return ""; }
26   public boolean secondEcho() { return true; }
27
28   /* type == YES_NO */
29   public String affirm() { return "Yes"; }
30   public String negate() { return "No"; }
31 }