01: /*
02: * Copyright Javelin Software, All rights reserved.
03: */
04:
05: package com.javelin.swinglets;
06:
07: import java.awt.*;
08: import java.util.*;
09: import java.io.*;
10:
11: import javax.servlet.*;
12:
13: /**
14: * SOptionPane defines a component that can render a customised
15: * dialog window.
16: *
17: * @author Robin Sharp
18: */
19:
20: public class SOptionPane {
21: //Message Type
22: public final static int ERROR = 0;
23: public final static int INFORMATION = 1;
24: public final static int WARNING = 2;
25: public final static int QUESTION = 3;
26: public final static int PLAIN = -1;
27:
28: //Option
29: public static final int OK_OPTION = -1;
30: public static final int YES_NO_OPTION = 0;
31: public static final int YES_NO_CANCEL_OPTION = 1;
32: public static final int OK_CANCEL_OPTION = 2;
33:
34: //Result
35: public static final int YES_RESULT = 0;
36: public static final int NO_RESULT = 1;
37: public static final int CANCEL_RESULT = 2;
38: public static final int OK_RESULT = 0;
39: public static final int CLOSED_RESULT = -1;
40:
41: /**
42: * Creates a SDialog, defaults to "Question", QUESTION
43: */
44: public static void showDialog(SComponent parent) {
45: //super( parent.getTopLevelAncestor() instanceof SFrame ? (SFrame)parent.getTopLevelAncestor() : null );
46: }
47:
48: /**
49: * Creates a SDialog.
50: */
51: public static void showDialog(SComponent parent, String title) {
52: //super( parent.getTopLevelAncestor() instanceof SFrame ? (SFrame)parent.getTopLevelAncestor() : null );
53: //this.title = title;
54: }
55:
56: /**
57: * Creates a SDialog.
58: */
59: public static void showDialog(SComponent parent, String title,
60: Object message) {
61: //super( parent.getTopLevelAncestor() instanceof SFrame ? (SFrame)parent.getTopLevelAncestor() : null );
62: //this.title = title;
63:
64: //this.message = message;
65: }
66:
67: }
|