Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: rcsdesign/rcsDesignGui.java


1   package rcsdesign;
2   
3   import java.awt.*;
4   import java.applet.*;
5   import java.util.*;
6   import java.io.*;
7   
8   import rcs.*;
9   import rcs.utils.*;
10  import diagapplet.*;
11  import diagapplet.CodeGen.*;
12  import diagapplet.utils.*;
13  import diagapplet.utils.StandAloneApplet;
14  
15  
16  
17  public class rcsDesignGui extends StandAloneApplet
18  {
19    public String currentLoadedFile = "";
20    public Label filesListLabel = null;
21    public Label fileTextLabel = null;
22    public java.awt.List filesList = null;
23    public TextArea fileTextArea = null;
24    public CodeGen codeGenerationApplet = null;
25    public CheckboxGroup overwriteGroup = null;
26    public Checkbox overwriteAlwaysCheckbox = null;
27    public Checkbox overwritePromptCheckbox = null;
28    public Checkbox overwriteNeverCheckbox = null;
29    static public boolean debug_on = false;
30    public Checkbox makeBackupsCheckbox = null;
31    public Choice screenChoice = null;
32    public boolean inside_alert = false;
33    public boolean inside_query = false;
34    public boolean inside_run = false;
35  
36    public Label libsLabel;
37    public java.awt.List libsList;
38    public Label addLibLabel;
39    public TextField addLibField;
40    public Button delLibButton;
41    public Label includesLabel;
42    public java.awt.List includesList;
43    public Label addIncludeLabel;
44    public TextField addIncludeField;
45    public Button delIncludeButton;
46  
47    public Label mainLoopLabel = null;
48    public java.awt.List mainLoopList = null;
49    public Label addmainLoopLabel = null;
50    public TextField addmainLoopField = null;
51    public Button delmainLoopButton = null;
52    public Label modsInLoopLabel = null;
53    public java.awt.List modsInLoopList = null;
54    public Label mainLoopHostLabel = null;
55    public TextField mainLoopHostField = null;
56    public Label cycletimeLabel = null;
57    public TextField cycletimeField = null;
58  
59    public Label serverLabel = null;
60    public java.awt.List serverList = null;
61    public Label addServerLabel = null;
62    public TextField addServerField = null;
63    public Button delServerButton = null;
64    public Label bufsInServerLabel = null;
65    public java.awt.List bufsInServerList = null;
66    public Label serverHostLabel = null;
67    public TextField serverHostField = null;
68  
69  
70  
71    public Label javaCommandLabel = null;
72    public TextField javaCommandField = null;
73    public Label javaSetupLabel = null;
74    public TextArea javaSetupArea = null;
75    public Checkbox useJavaInScriptsCheckbox = null;
76  
77    public Label appnameLabel = null;
78    public TextField appnameField = null;
79    public Label appdirLabel = null;
80    public TextField appdirField = null;
81    public Label userdirLabel = null;
82    public TextField userdirField = null;
83    public Label rcslibdirLabel = null;
84    public TextField rcslibdirField = null;
85    public Label platLabel = null;
86    public java.awt.List platList = null;
87    public Label addPlatLabel = null;
88    public TextField addPlatField = null;
89    public Button delPlatButton = null;
90    public Label overwriteLabel = null;
91    public Checkbox useMergerCheckbox = null;
92    public Button  removeBackupsButton = null;
93    public Label devPlatTypeLabel = null;
94    public CheckboxGroup devPlatTypeGroup = null;
95    public Checkbox unixCheckbox = null;
96    public Checkbox mswinCheckbox = null;
97    public Label cppExtLabel = null;
98    public TextField cppExtField = null;
99    public Label hppExtLabel = null;
100   public TextField hppExtField = null;
101   public Label objExtLabel = null;
102   public TextField objExtField = null;
103   public Label makeCommandLabel = null;
104   public TextField makeCommandField = null;
105   public Label runCommandLabel = null;
106   public TextField runCommandField = null;
107   public Label diagCommandLabel = null;
108   public TextField diagCommandField = null;
109   public Label browserCommandLabel = null;
110   public TextField browserCommandField = null;
111   public Label fileCheckinTypeLabel = null;
112   public Choice fileCheckinTypeChoice = null;
113   public Label fileCheckinDirectoryLabel = null;
114   public TextField fileCheckinDirectoryField = null;
115   public Label checkOutCommandLabel = null;
116   public TextField checkOutCommandField = null;
117   public Label checkInCommandLabel = null;
118   public TextField checkInCommandField = null;
119   public Label symLinkCommandLabel = null;
120   public TextField symLinkCommandField = null;
121   public Button checkInEverythingButton = null;
122   public Checkbox autoCheckInCheckbox = null;
123   public Checkbox autoCheckOutCheckbox = null;
124   public Checkbox fileCheckOutCheckbox = null;
125   public Label fileAsterixLabel = null;
126 
127   public java.awt.List modulesList = null;
128   public Label addModuleLabel = null;
129   public TextField addModuleField = null;
130 
131   public FileTypeInfo current_fti = null;
132   public boolean text_file_needs_saving = false;
133   public boolean list_modules_by_number=false;
134   public String default_version_control_type = "RCS";
135 
136   public String default_version_control_directory = null;
137   public String default_version_control_checkout_command = null;
138   public String default_version_control_checkin_command = null;
139   public String default_version_control_symlink_command = "ln -s ";
140 
141   public boolean auto_checkin = true;
142   public boolean auto_checkout = true;
143 
144   public Frame parentFrame = null;
145 
146   public static void printThreadInfo()
147   {
148     try
149       {
150   Thread tarray[] = new Thread[100];
151   int tarray_length = Thread.enumerate(tarray);
152   for(int i = 0; i< tarray_length; i++)
153     {
154       System.out.println("Thread :"+i+" "+tarray[i]+" alive:"+tarray[i].isAlive()+" priority:"+tarray[i].getPriority());
155       try
156         {
157     if(!tarray[i].isAlive())
158       {
159         System.out.println("frames:"+tarray[i].countStackFrames());
160       }
161         }
162       catch(Exception e)
163         {
164     e.printStackTrace();
165         }
166     }
167       }
168     catch(Exception e)
169       {
170   e.printStackTrace();
171       }
172   }
173   public QueryDialog Query(String str)
174   {
175     try
176       {
177   inside_query=true;
178   if(debug_on)
179     {
180       System.out.println("Query:"+str);
181       Thread.dumpStack();
182       printThreadInfo();
183     }
184   if(null == parentFrame)
185     {
186       try
187         {
188     parentFrame = (Frame) getParent();
189         }
190       catch(ClassCastException e)
191         {
192     parentFrame = new Frame();
193         }
194     }
195   QueryDialog qd = new QueryDialog(parentFrame,"RCS-Design Query",str);
196   qd.show();
197   if(debug_on)
198     {
199       System.out.println("Waiting for QueryDialog . . .");
200     }
201   while(!qd.done)
202     {
203       try
204         {
205     Thread.sleep(300);
206         }
207       catch(Exception e)
208         {
209     e.printStackTrace();
210         }
211       if(debug_on)
212         {
213     System.out.print(" .");
214         }
215     }
216   inside_query=false;
217   return qd;
218       }
219     catch(Exception e)
220       {
221   e.printStackTrace();
222       }
223     inside_query=false;
224     return null;
225   }
226 
227 
228   
229   public void Alert(String str)
230   {
231     inside_alert=true;
232     if(AlertDialog.count > 3)
233       {
234   inside_alert=false;
235   return;
236       }
237     if(debug_on)
238       {
239   System.out.println("Alert:"+str);
240       }
241     try
242       {
243   Frame f = new Frame();
244   AlertDialog ad = new AlertDialog(f,"RCS-Design Notice",str);
245   ad.show();
246       }
247     catch(Exception e)
248       {
249   e.printStackTrace();
250       }
251     inside_alert=false;
252     return;
253   }
254 
255   public void ReadFileIntoTextArea(String s, String label, FileTypeInfo fti)
256   {
257     try
258       {
259   if(null != fti)
260     {
261       current_fti = fti;
262     }
263   URL_and_FileLoader loader = new URL_and_FileLoader(s);
264   if(null == loader)
265     {
266       return;
267     }
268   String line = loader.readLine();
269   if(null == line)
270     {
271       return;
272     }
273   currentLoadedFile = s;
274   StringBuffer tempBuffer = new StringBuffer();
275   while(line != null)
276     {
277       tempBuffer.append(line+"\n");
278       line = loader.readLine();
279     }
280   fileTextArea.setText(tempBuffer.toString());
281   fileTextLabel.setText(s+" "+label);
282   loader.close();
283       }
284     catch(Exception e)
285       {
286   e.printStackTrace();
287       }
288   }
289 
290   // Always override this method
291   public void CheckOutFile(File f)
292   {
293     return;
294   }
295   
296   // Always override this method
297   public void CheckInFile(File f)
298   {
299     return;
300   }
301   
302 }