View Javadoc

1   
2   package org.catacomb.druid.gui.base;
3   
4   import java.awt.Point;
5   
6   import org.catacomb.druid.swing.DDialog;
7   import org.catacomb.interlish.structure.ActionRelay;
8   import org.catacomb.interlish.structure.ActionSource;
9   import org.catacomb.interlish.structure.Dialog;
10  
11  
12  
13  public class DruDialog implements ActionSource, Dialog {
14      static final long serialVersionUID = 1001;
15  
16      // DruPanel druPanel;
17  
18      String id;
19  
20      // ActionRelay actionRelay;
21  
22      DDialog dDialog;
23  
24  
25      public DruDialog(DruFrame druf, String s) {
26          dDialog = new DDialog(druf.getGUIPeer(), s);
27      }
28  
29  
30      public void setID(String s) {
31          id = s;
32      }
33  
34  
35      public String getID() {
36          return id;
37      }
38  
39      public void setActionRelay(ActionRelay ac) {
40          // actionRelay = ac;
41      }
42  
43  
44      public void setDruPanel(DruPanel drup) {
45          // druPanel = drup;
46          dDialog.setPanel(drup.getGUIPeer());
47  
48      }
49  
50      public void setModal(boolean b) {
51          dDialog.setModal(b);
52      }
53  
54      public void open() {
55          dDialog.open();
56      }
57  
58  
59      public void close() {
60          dDialog.close();
61      }
62      public int[] getLocation() {
63          Point p = dDialog.getLocation();
64          int[] ret = {(int)(p.getX()), (int)(p.getY())};
65          return ret;
66      }
67  
68      public int[] getIntArraySize() {
69          return dDialog.getIntArraySize();
70      }
71  
72  
73      public void setLocation(int x, int y) {
74          dDialog.setLocation(x, y);
75      }
76  
77  
78      public void pack() {
79          dDialog.pack();
80      }
81  
82  
83      public void setVisible(boolean b) {
84          dDialog.setVisible(b);
85      }
86  
87  
88      public boolean isShowing() {
89          boolean ret = dDialog.isShowing();
90          return ret;
91      }
92  
93  
94      public void toFront() {
95          dDialog.toFront();
96      }
97  
98  
99  }