*** empty log message ***
[thera-pi.git] / Reha / src / hauptFenster / LinkeTaskPane.java
blob2a5c8ff067b39f5728350a9f725f4111ef7fae42
1 package hauptFenster;
5 import generalSplash.RehaSplash;
7 import java.awt.Color;
8 import java.awt.Dimension;
9 import java.awt.GridBagConstraints;
10 import java.awt.GridBagLayout;
11 import java.awt.Image;
12 import java.awt.Insets;
13 import java.awt.datatransfer.DataFlavor;
14 import java.awt.datatransfer.Transferable;
15 import java.awt.dnd.DropTarget;
16 import java.awt.dnd.DropTargetDragEvent;
17 import java.awt.dnd.DropTargetDropEvent;
18 import java.awt.dnd.DropTargetEvent;
19 import java.awt.dnd.DropTargetListener;
20 import java.awt.event.ActionEvent;
21 import java.awt.event.ActionListener;
22 import java.awt.event.ComponentEvent;
23 import java.awt.event.ComponentListener;
24 import java.io.File;
25 import java.sql.ResultSet;
26 import java.sql.SQLException;
27 import java.sql.Statement;
28 import java.text.SimpleDateFormat;
29 import java.util.ArrayList;
30 import java.util.Date;
31 import java.util.List;
32 import java.util.TooManyListenersException;
33 import java.util.Vector;
35 import javax.swing.ImageIcon;
36 import javax.swing.JComponent;
37 import javax.swing.JOptionPane;
38 import javax.swing.JScrollPane;
39 import javax.swing.SwingUtilities;
40 import javax.swing.UIManager;
42 import kurzAufrufe.KurzAufrufe;
43 import oOorgTools.OOTools;
45 import org.jdesktop.swingworker.SwingWorker;
46 import org.jdesktop.swingx.JXHyperlink;
47 import org.jdesktop.swingx.JXMonthView;
48 import org.jdesktop.swingx.JXPanel;
49 import org.jdesktop.swingx.JXTaskPane;
50 import org.jdesktop.swingx.JXTaskPaneContainer;
51 import org.jdesktop.swingx.border.DropShadowBorder;
52 import org.jdesktop.swingx.plaf.windows.WindowsTaskPaneUI;
53 import org.therapi.reha.patient.AktuelleRezepte;
54 import org.therapi.reha.patient.LadeProg;
56 import rechteTools.Rechte;
57 import CommonTools.ExUndHop;
58 import CommonTools.SqlInfo;
59 import systemEinstellungen.SystemConfig;
60 import systemTools.TestePatStamm;
61 import terminKalender.TerminFenster;
62 import wecker.Wecker;
63 import ag.ion.bion.officelayer.text.ITextDocument;
64 import dialoge.DatumWahl;
65 import events.PatStammEvent;
66 import events.PatStammEventClass;
68 public class LinkeTaskPane extends JXPanel implements ActionListener, ComponentListener, DropTargetListener {
69 /**
72 private static final long serialVersionUID = 1L;
73 //private Reha eltern;
74 private static JXTaskPaneContainer jxTPcontainer = null;
75 public static JXTaskPane tp1 = null;
76 public static JXTaskPane tp2 = null;
77 public static JXTaskPane tp3 = null;
78 public static JXTaskPane tp4 = null;
79 public static JXTaskPane tp5 = null;
80 public static JXTaskPane tp6 = null;
81 private JXHyperlink oo1 = null;
82 private JXHyperlink oo2 = null;
83 public static boolean OOok = true;
84 public static LinkeTaskPane thisClass = null;
85 public static ITextDocument itestdocument = null;
86 private ActionListener al;
87 private String aktTag = "x";
88 private String wahlTag = "y";
89 SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy");
90 public LinkeTaskPane(){
91 super();
93 this.setBorder(null);
94 this.setBackground(Color.WHITE);
95 //this.eltern = Reha.thisClass;
96 this.setPreferredSize(new Dimension(200,500));
98 GridBagConstraints gridBagConstraints = new GridBagConstraints() ;
99 gridBagConstraints.gridx = 0;
100 gridBagConstraints.anchor = GridBagConstraints.CENTER;
101 gridBagConstraints.fill = GridBagConstraints.BOTH;
102 gridBagConstraints.ipadx = 0;
103 gridBagConstraints.gridy = 0;
104 gridBagConstraints.weightx = 1.0D;
105 gridBagConstraints.weighty = 1.0D;
106 gridBagConstraints.insets = new Insets(5, 2, 5, 2);
108 this.setLayout(new GridBagLayout());
112 * Zuerst die Scrollpane generieren falls der
113 * sp�tere TaskPane-Container die y-Dimension des Fensters �bersteigt.
115 JScrollPane jScrp = new JScrollPane();
116 jScrp.setBorder(null);
117 jScrp.setViewportBorder(null);
118 jScrp.setBackground(Color.white);
119 jScrp.setPreferredSize(new Dimension(180, 100));
120 DropShadowBorder dropShadow = new DropShadowBorder(Color.BLACK, 10, 1, 5, false, true, true, true);
121 jScrp.setBorder(dropShadow);
122 jScrp.getVerticalScrollBar().setUnitIncrement(15);
124 * Jetz generieren wir den Taskpane-Container anschlie�end die TaskPanes
126 jxTPcontainer = new JXTaskPaneContainer();
127 jxTPcontainer.setBackground(new Color(106,130,218));
128 //jxTPcontainer.setPreferredSize(new Dimension(250,0));
130 jxTPcontainer.add(getPatientenStamm());
132 jxTPcontainer.add(getTerminKalender());
134 jxTPcontainer.add(getOpenOfficeOrg());
136 jxTPcontainer.add(getNuetzliches());
138 jxTPcontainer.add(getSystemEinstellungen());
139 jxTPcontainer.add(getMonatsUebersicht());
141 * dann f�gen wir den TaskpaneContainer der ScrollPane hinzu
143 jScrp.setViewportView(jxTPcontainer);
144 jScrp.setVisible(true);
145 jScrp.revalidate();
146 this.add(jScrp,gridBagConstraints);
147 this.validate();
148 thisClass = this;
151 * Task-Pane f�r den Patientenstamm erstellen
152 * @return
155 private JXTaskPane getPatientenStamm(){
156 Image img = null;
157 tp1 = new JXTaskPane();
158 UIManager.put("TaskPane.titleBackgroundGradientStart",Color.WHITE);
159 UIManager.put("TaskPane.titleBackgroundGradientEnd",new Color(200,212,247));
160 UIManager.put("TaskPane.background",new Color(214,223,247));
161 UIManager.put("TaskPane.foreground",Color.BLUE);
162 UIManager.put("TaskPane.useGradient", Boolean.TRUE);
163 WindowsTaskPaneUI wui = new WindowsTaskPaneUI();
164 tp1.setUI(wui);
165 tp1.setTitle("Stammdaten");
166 //tp1.setIcon(new ImageIcon(Reha.proghome+"icons/personen16.gif"));
167 JXHyperlink jxLink = new JXHyperlink();
168 jxLink.setText("Patienten und Rezepte");
169 jxLink.setToolTipText("Strg+P = Patienten-/Rezeptstamm starten");
170 img = new ImageIcon(Reha.proghome+"icons/kontact_contacts.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
171 jxLink.setIcon(new ImageIcon(img));
172 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
173 jxLink.addActionListener(this);
174 jxLink.setEnabled(true);
175 DropTarget dndt = new DropTarget();
176 DropTargetListener dropTargetListener =
177 new DropTargetListener() {
178 public void dragEnter(DropTargetDragEvent e) {}
179 public void dragExit(DropTargetEvent e) {}
180 public void dragOver(DropTargetDragEvent e) {}
181 public void drop(DropTargetDropEvent e) {
182 String mitgebracht = "";
183 try {
184 Transferable tr = e.getTransferable();
185 DataFlavor[] flavors = tr.getTransferDataFlavors();
186 for (int i = 0; i < flavors.length; i++){
187 mitgebracht = (String) tr.getTransferData(flavors[i]);
189 ////System.out.println(mitgebracht);
190 if(mitgebracht.indexOf("°") >= 0){
191 if( ! mitgebracht.split("°")[0].contains("TERMDAT")){
192 return;
194 doPatientDrop(mitgebracht.split("°")[2].trim());
195 //ProgLoader.ProgRoogleFenster(0, mitgebracht);
196 //Reha.thisClass.progLoader.ProgRoogleFenster(0, mitgebracht);
198 ////System.out.println(mitgebracht+" auf Patientenstamm gedropt");
199 } catch (Throwable t) { t.printStackTrace(); }
200 // Ein Problem ist aufgetreten
201 e.dropComplete(true);
203 public void dropActionChanged(
204 DropTargetDragEvent e) {}
206 try {
207 dndt.addDropTargetListener(dropTargetListener);
208 } catch (TooManyListenersException e1) {
209 // TODO Auto-generated catch block
210 e1.printStackTrace();
212 jxLink.setDropTarget(dndt);
214 tp1.add(jxLink);
215 jxLink = new JXHyperlink();
216 jxLink.setText("Ärzte");
217 jxLink.setActionCommand("Arztstamm");
218 jxLink.setToolTipText("Strg+A = Arztstamm starten");
219 img = new ImageIcon(Reha.proghome+"icons/system-users.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
220 jxLink.setIcon(new ImageIcon(img));
221 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
222 jxLink.addActionListener(this);
223 //jxLink.setEnabled(false);
224 tp1.add(jxLink);
225 jxLink = new JXHyperlink();
226 jxLink.setText("Krankenkassen");
227 jxLink.setToolTipText("Strg+K = Kassenstamm starten");
228 img = new ImageIcon(Reha.proghome+"icons/krankenkasse.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
229 jxLink.setIcon(new ImageIcon(img));
230 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
231 jxLink.addActionListener(this);
232 tp1.add(jxLink);
233 tp1.setCollapsed(SystemConfig.taskPaneCollapsed[0]);
234 return tp1;
237 private JXTaskPane getTerminKalender(){
238 Image img = null;
239 tp4 = new JXTaskPane();
240 UIManager.put("TaskPane.titleBackgroundGradientStart",Color.WHITE);
241 UIManager.put("TaskPane.titleBackgroundGradientEnd",new Color(200,212,247));
242 UIManager.put("TaskPane.background",new Color(214,223,247));
243 UIManager.put("TaskPane.useGradient", Boolean.TRUE);
244 WindowsTaskPaneUI wui = new WindowsTaskPaneUI();
245 tp4.setUI(wui);
246 tp4.setTitle("Termin-Management");
247 tp4.setIcon(new ImageIcon(Reha.proghome+"icons/table_mode.png"));
248 JXHyperlink jxLink = new JXHyperlink();
249 jxLink.setText("Terminkalender starten");
250 jxLink.setToolTipText("Strg+T = Terminkalender starten");
251 img = new ImageIcon(Reha.proghome+"icons/evolution-addressbook.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
252 jxLink.setIcon(new ImageIcon(img));
253 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
254 jxLink.addActionListener(this);
255 tp4.add(jxLink);
256 jxLink = new JXHyperlink();
257 DropTarget dndt = new DropTarget();
258 DropTargetListener dropTargetListener =
259 new DropTargetListener() {
260 public void dragEnter(DropTargetDragEvent e) {}
261 public void dragExit(DropTargetEvent e) {}
262 public void dragOver(DropTargetDragEvent e) {}
263 public void drop(DropTargetDropEvent e) {
264 String mitgebracht = "";
265 try {
266 Transferable tr = e.getTransferable();
267 DataFlavor[] flavors = tr.getTransferDataFlavors();
268 for (int i = 0; i < flavors.length; i++){
269 mitgebracht = (String) tr.getTransferData(flavors[i]);
271 //System.out.println("Es wurde mitgebracht "+mitgebracht);
272 if(mitgebracht.indexOf("°") >= 0){
273 if( ! mitgebracht.split("°")[0].contains("TERMDAT")){
274 return;
276 //ProgLoader.ProgRoogleFenster(0, mitgebracht);
277 Reha.thisClass.progLoader.ProgRoogleFenster(0, mitgebracht);
279 ////System.out.println(mitgebracht);
280 } catch (Throwable t) { t.printStackTrace(); }
281 // Ein Problem ist aufgetreten
282 e.dropComplete(true);
284 public void dropActionChanged(
285 DropTargetDragEvent e) {}
287 try {
288 dndt.addDropTargetListener(dropTargetListener);
289 } catch (TooManyListenersException e1) {
290 // TODO Auto-generated catch block
291 e1.printStackTrace();
293 jxLink.setDropTarget(dndt);
294 jxLink.setName("Rugl");
295 String srugl = "<html><font color='#000000'>[</font><font color='#0000ff'>R</font><font color='#ff0000'>u</font>"+
296 "<font color='#00ffff'><b>:</b></font><font color='#0000ff'>g</font><font color='#00ff00'>l</font>"+
297 "<font color='#000000'>]</font>&nbsp;- Die Terminsuchmaschine";
298 jxLink.setText(srugl);
299 //jxLink.setText("[Ru:gl] - Die Terminsuchmaschine");
300 jxLink.setToolTipText("Strg+R = [Ru:gl] starten");
301 img = new ImageIcon(Reha.proghome+"icons/orca.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
302 jxLink.setIcon(new ImageIcon(img));
303 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
304 jxLink.setActionCommand("[Ru:gl] - Die Terminsuchmaschine");
305 jxLink.addActionListener(this);
306 tp4.add(jxLink);
307 jxLink = new JXHyperlink();
308 jxLink.setText("Wochenarbeitszeiten definieren");
309 img = new ImageIcon(Reha.proghome+"icons/alacarte.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
310 jxLink.setIcon(new ImageIcon(img));
311 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
312 jxLink.addActionListener(this);
313 tp4.add(jxLink);
314 jxLink = new JXHyperlink();
315 jxLink.setText("Akutliste - kurzfristige Termine");
316 jxLink.setActionCommand("Akutliste");
317 img = new ImageIcon(Reha.proghome+"icons/vcalendar.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
318 jxLink.setIcon(new ImageIcon(img));
319 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
320 jxLink.addActionListener(this);
321 tp4.add(jxLink);
323 jxLink = new JXHyperlink();
324 jxLink.setText("Thera-\u03C0"+" Erinnerungs-System");
325 //img = new ImageIcon(Reha.proghome+"icons/wecker.gif").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
326 img = new ImageIcon(Reha.proghome+"icons/chronometer.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
327 jxLink.setIcon(new ImageIcon(img));
328 jxLink.setActionCommand("neuerwecker");
329 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
330 jxLink.addActionListener(this);
331 dndt = new DropTarget();
332 dropTargetListener =
333 new DropTargetListener() {
334 public void dragEnter(DropTargetDragEvent e) {}
335 public void dragExit(DropTargetEvent e) {}
336 public void dragOver(DropTargetDragEvent e) {}
337 public void drop(DropTargetDropEvent e) {
338 String mitgebracht = "";
339 try {
340 Transferable tr = e.getTransferable();
341 DataFlavor[] flavors = tr.getTransferDataFlavors();
342 for (int i = 0; i < flavors.length; i++){
343 mitgebracht = (String) tr.getTransferData(flavors[i]);
345 ////System.out.println(mitgebracht);
346 if(mitgebracht.indexOf("°") >= 0){
347 if( ! mitgebracht.split("°")[0].contains("TERMDAT")){
348 return;
350 //ProgLoader.ProgRoogleFenster(0, mitgebracht);
351 doWeckerDrop(mitgebracht);
353 ////System.out.println(mitgebracht);
354 } catch (Throwable t) { t.printStackTrace(); }
355 // Ein Problem ist aufgetreten
356 e.dropComplete(true);
358 public void dropActionChanged(
359 DropTargetDragEvent e) {}
361 try {
362 dndt.addDropTargetListener(dropTargetListener);
363 } catch (TooManyListenersException e1) {
364 // TODO Auto-generated catch block
365 e1.printStackTrace();
367 jxLink.setDropTarget(dndt);
368 jxLink.setName("Rugl");
370 tp4.add(jxLink);
371 tp4.setCollapsed(SystemConfig.taskPaneCollapsed[1]);
372 //tp4.setExpanded(true);
373 return tp4;
377 private JXTaskPane getOpenOfficeOrg(){
378 tp3 = new JXTaskPane();
379 UIManager.put("TaskPane.titleBackgroundGradientStart",Color.WHITE);
380 UIManager.put("TaskPane.titleBackgroundGradientEnd",new Color(200,212,247));
381 UIManager.put("TaskPane.background",new Color(214,223,247));
382 UIManager.put("TaskPane.useGradient", Boolean.TRUE);
383 WindowsTaskPaneUI wui = new WindowsTaskPaneUI();
384 tp3.setUI(wui);
385 tp3.setTitle("OpenOffice.org");
386 tp3.setIcon(SystemConfig.hmSysIcons.get("openoffice"));
387 oo1 = new JXHyperlink();
388 oo1.setText("OpenOffice-Writer");
389 oo1.setClickedColor(new Color(0, 0x33, 0xFF));
390 oo1.setIcon(SystemConfig.hmSysIcons.get("ooowriter"));
391 oo1.addActionListener(this);
392 tp3.add(oo1);
393 oo2 = new JXHyperlink();
394 oo2.setIcon(SystemConfig.hmSysIcons.get("ooocalc"));
395 oo2.setText("OpenOffice-Calc");
396 oo2.setClickedColor(new Color(0, 0x33, 0xFF));
397 oo2.addActionListener(this);
398 tp3.add(oo2);
399 oo2 = new JXHyperlink();
400 oo2.setIcon(SystemConfig.hmSysIcons.get("oooimpress"));
401 oo2.setText("OpenOffice-Impress");
402 oo2.setClickedColor(new Color(0, 0x33, 0xFF));
403 oo2.addActionListener(this);
404 tp3.add(oo2);
405 tp3.setCollapsed(SystemConfig.taskPaneCollapsed[2]);
406 return tp3;
409 private JXTaskPane getNuetzliches(){
410 Image img = null;
411 tp5 = new JXTaskPane();
412 UIManager.put("TaskPane.titleBackgroundGradientStart",Color.WHITE);
413 UIManager.put("TaskPane.titleBackgroundGradientEnd",new Color(200,212,247));
414 UIManager.put("TaskPane.background",new Color(214,223,247));
415 UIManager.put("TaskPane.useGradient", Boolean.TRUE);
416 WindowsTaskPaneUI wui = new WindowsTaskPaneUI();
417 tp5.setUI(wui);
419 tp5.setTitle("Nützliches...");
420 //tp3.setIcon(new ImageIcon("icons/pdf.gif"));
421 JXHyperlink jxLink = new JXHyperlink();
422 jxLink.setText("Thera-PI - Nachrichten");
423 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
424 img = new ImageIcon(Reha.proghome+"icons/emblem-mail.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
425 jxLink.setIcon(new ImageIcon(img));
426 jxLink.addActionListener(this);
427 tp5.add(jxLink);
428 jxLink = new JXHyperlink();
429 jxLink.setText("Thera-PI - Browser");
430 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
431 img = new ImageIcon(Reha.proghome+"icons/home.gif").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
432 jxLink.setIcon(new ImageIcon(img));
433 jxLink.addActionListener(this);
434 tp5.add(jxLink);
435 jxLink = new JXHyperlink();
436 jxLink.setText("piTool - ScreenShots");
437 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
438 img = new ImageIcon(Reha.proghome+"icons/camera_unmount.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
439 //Reha.proghome+"icons/cameraklein.png"
440 jxLink.setIcon(new ImageIcon(img));
441 jxLink.setActionCommand("piTool");
442 jxLink.addActionListener(this);
443 //jxLink.setEnabled(false);
444 tp5.add(jxLink);
445 jxLink = new JXHyperlink();
446 jxLink.setText("piHelp - Hifetextgenerator");
447 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
448 img = new ImageIcon(Reha.proghome+"icons/fragezeichenklein.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
449 jxLink.setIcon(new ImageIcon(img));
450 jxLink.setActionCommand("piHelp");
451 jxLink.addActionListener(this);
452 //jxLink.setEnabled(false);
453 tp5.add(jxLink);
454 jxLink = new JXHyperlink();
455 jxLink.setText("Textbausteine - Therapiebericht");
456 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
457 img = new ImageIcon(Reha.proghome+"icons/abiword.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
458 jxLink.setIcon(new ImageIcon(img));
459 jxLink.setActionCommand("piTextb");
460 jxLink.addActionListener(this);
461 //jxLink.setEnabled(false);
462 tp5.add(jxLink);
464 jxLink = new JXHyperlink();
465 jxLink.setText("Textbausteine - Gutachten");
466 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
467 img = new ImageIcon(Reha.proghome+"icons/abiword.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
468 jxLink.setIcon(new ImageIcon(img));
469 jxLink.setActionCommand("piArztTextb");
470 jxLink.addActionListener(this);
471 //jxLink.setEnabled(false);
472 tp5.add(jxLink);
474 jxLink = new JXHyperlink();
475 jxLink.setText("ICD-10 Recherche");
476 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
477 img = new ImageIcon(Reha.proghome+"icons/mag.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
478 jxLink.setIcon(new ImageIcon(img));
479 jxLink.setActionCommand("piIcd10");
480 jxLink.addActionListener(this);
481 //jxLink.setEnabled(false);
482 tp5.add(jxLink);
483 File f = new File(Reha.proghome+"QMHandbuch.jar");
484 if(f.exists()){
485 jxLink = new JXHyperlink();
486 jxLink.setText("QM-Handbuch");
487 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
488 img = new ImageIcon(Reha.proghome+"icons/abiword.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
489 jxLink.setIcon(new ImageIcon(img));
490 jxLink.setActionCommand("piQM");
491 jxLink.addActionListener(this);
492 //jxLink.setEnabled(false);
493 tp5.add(jxLink);
495 f = new File(Reha.proghome+"QMAuswertung.jar");
496 if(f.exists()){
497 jxLink = new JXHyperlink();
498 jxLink.setText("QM-Auswertungen");
499 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
500 img = new ImageIcon(Reha.proghome+"icons/abiword.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
501 jxLink.setIcon(new ImageIcon(img));
502 jxLink.setActionCommand("piAW");
503 jxLink.addActionListener(this);
504 //jxLink.setEnabled(false);
505 tp5.add(jxLink);
508 tp5.setCollapsed(SystemConfig.taskPaneCollapsed[3]);
509 return tp5;
513 private JXTaskPane getSystemEinstellungen(){
514 Image img = null;
515 tp2 = new JXTaskPane();
516 UIManager.put("TaskPane.titleBackgroundGradientStart",Color.WHITE);
517 UIManager.put("TaskPane.titleBackgroundGradientEnd",new Color(200,212,247));
518 UIManager.put("TaskPane.background",new Color(214,223,247));
519 UIManager.put("TaskPane.useGradient", Boolean.TRUE);
520 WindowsTaskPaneUI wui = new WindowsTaskPaneUI();
521 tp2.setUI(wui);
523 tp2.setTitle("Systemeinstellungen");
524 tp2.setIcon(new ImageIcon(Reha.proghome+"icons/pdf.gif"));
525 JXHyperlink jxLink = new JXHyperlink();
526 jxLink.setText("Benutzerverwaltung");
527 img = new ImageIcon(Reha.proghome+"icons/contact-new.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
528 jxLink.setIcon(new ImageIcon(img));
529 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
530 jxLink.addActionListener(this);
531 jxLink.setEnabled(true);
532 tp2.add(jxLink);
533 jxLink = new JXHyperlink();
534 jxLink.setText("System Initialisierung");
535 img = new ImageIcon(Reha.proghome+"icons/galternatives.png").getImage().getScaledInstance(24, 24, Image.SCALE_SMOOTH);
536 jxLink.setIcon(new ImageIcon(img));
537 jxLink.setClickedColor(new Color(0, 0x33, 0xFF));
538 jxLink.addActionListener(this);
539 tp2.add(jxLink);
540 jxLink = new JXHyperlink();
541 jxLink.setText("Look & Feel");
542 jxLink.addActionListener(this);
543 jxLink.setEnabled(false);
544 tp2.add(jxLink);
545 tp2.setCollapsed(SystemConfig.taskPaneCollapsed[4]);
546 return tp2;
549 private JXTaskPane getMonatsUebersicht(){
550 tp6 = new JXTaskPane();
551 UIManager.put("TaskPane.titleBackgroundGradientStart",Color.WHITE);
552 UIManager.put("TaskPane.titleBackgroundGradientEnd",new Color(200,212,247));
553 UIManager.put("TaskPane.background",new Color(214,223,247));
554 UIManager.put("TaskPane.useGradient", Boolean.TRUE);
555 WindowsTaskPaneUI wui = new WindowsTaskPaneUI();
556 tp6.setUI(wui);
557 tp6.setTitle("Monatsübersicht");
558 final JXMonthView monthView = new JXMonthView ();
559 monthView.setPreferredColumnCount (1);
560 monthView.setPreferredRowCount (1);
561 monthView.setTraversable(true);
562 monthView.setShowingWeekNumber(true);
563 al = new ActionListener(){
564 @Override
565 public void actionPerformed(ActionEvent e) {
566 if(TerminFenster.getThisClass()!= null){
567 Date dat = monthView.getSelectionDate();
568 if(dat==null){
569 return;
571 wahlTag = sdf.format(monthView.getSelectionDate());
572 if(wahlTag.equals(aktTag)){
573 return;
575 aktTag = wahlTag;
576 Reha.thisClass.progLoader.ProgTerminFenster(1, 0);
577 TerminFenster.getThisClass().springeAufDatum(aktTag);
578 }else{
579 Date dat = monthView.getSelectionDate();
580 if(dat==null){
581 return;
583 wahlTag = sdf.format(monthView.getSelectionDate());
584 if(wahlTag.equals(aktTag)){
585 return;
587 aktTag = wahlTag;
588 Reha.thisClass.progLoader.ProgTerminFenster(1, 0);
589 SwingUtilities.invokeLater(new Runnable(){
590 public void run(){
591 TerminFenster.getThisClass().springeAufDatum(aktTag);
599 monthView.addActionListener(al);
600 tp6.add(monthView);
601 tp6.setCollapsed(true);
602 tp6.setCollapsed(SystemConfig.taskPaneCollapsed[5]);
603 return tp6;
607 public static void UpdateUI(){
608 jxTPcontainer.updateUI();
609 tp1.updateUI();
610 tp2.updateUI();
611 tp3.updateUI();
612 tp4.updateUI();
613 tp5.updateUI();
614 tp6.updateUI();
615 ////System.out.println("TaskPane-Container L&F");
618 * Eigener Event-Handler man wird sehen ob das vern�ftig ist.
619 * @Override
621 public void actionPerformed(ActionEvent e) {
622 String cmd = e.getActionCommand();
623 int i;
624 for(i=0;i<1;i++){
625 if (cmd.equals("Look & Feel")) {
626 ExUndHop eUh = new ExUndHop();
627 eUh.setzeStatement("delete from flexlock");
628 //ProgLoader.ProgLookAndFeel(0);
629 break;
632 if (cmd.equals("System Initialisierung")){
633 new SwingWorker<Void,Void>(){
634 @Override
635 protected Void doInBackground() throws Exception {
636 try{
637 Reha.thisFrame.setCursor(Reha.thisClass.wartenCursor);
638 //ProgLoader.SystemInitialisierung();
639 Reha.thisClass.progLoader.SystemInit(1, "");
640 Reha.thisFrame.setCursor(Reha.thisClass.normalCursor);
641 }catch(Exception ex){
642 ex.printStackTrace();
644 return null;
647 }.execute();
649 /*SystemUtil sysUtil = new SystemUtil(Reha.thisFrame);
650 sysUtil.setSize(800,600);
651 sysUtil.setLocation(100,75);
652 sysUtil.setVisible(true);
654 break;
657 if (cmd.equals("Krankenkassen")){
658 new SwingWorker<Void,Void>(){
659 @Override
660 protected Void doInBackground() throws Exception {
661 Reha.thisFrame.setCursor(Reha.thisClass.wartenCursor);
662 Reha.thisClass.progLoader.KassenFenster(0,TestePatStamm.PatStammKasseID());
663 //ProgLoader.KassenFenster(0,TestePatStamm.PatStammKasseID());
664 Reha.thisFrame.setCursor(Reha.thisClass.normalCursor);
665 return null;
667 }.execute();
668 break;
671 if (cmd.equals("Terminkalender starten")){
672 new SwingWorker<Void,Void>(){
673 @Override
674 protected Void doInBackground() throws Exception {
675 Reha.thisFrame.setCursor(Reha.thisClass.wartenCursor);
676 Reha.thisClass.progLoader.ProgTerminFenster(1, (SystemConfig.KalenderStartWochenAnsicht ? 1 : 0));
677 //ProgLoader.ProgTerminFenster(1,0);
678 Reha.thisFrame.setCursor(Reha.thisClass.normalCursor);
679 return null;
681 }.execute();
682 break;
684 if (cmd.equals("Arztstamm")){
685 new SwingWorker<Void,Void>(){
686 @Override
687 protected Void doInBackground() throws Exception {
688 Reha.thisFrame.setCursor(Reha.thisClass.wartenCursor);
689 Reha.thisClass.progLoader.ArztFenster(0,TestePatStamm.PatStammArztID());
690 //ProgLoader.ArztFenster(0,TestePatStamm.PatStammArztID());
691 Reha.thisFrame.setCursor(Reha.thisClass.normalCursor);
692 return null;
694 }.execute();
695 break;
697 if (cmd.equals("Wochenarbeitszeiten definieren")){
698 JComponent termin = AktiveFenster.getFensterAlle("TerminFenster");
699 if(termin != null){
700 JOptionPane.showMessageDialog (null, "Achtung!!!!! \n\nWährend der Arbeitszeit-Definition\n" +
701 "darf der Terminkalender aus Sicherheitsgründen nicht geöffnet sein.\n"+
702 "Beenden Sie den Terminkalender und rufen Sie diese Funktion erneut auf.\n\n");
703 return;
705 Reha.thisClass.progLoader.ProgTerminFenster(0, 2);
706 //ProgLoader.ProgTerminFenster(0,2);
707 //MaskenErstellen();
708 break;
710 if (cmd.equals("monthview")){
711 new DatumWahl(200,200);
712 break;
715 if (cmd.equals("OpenOffice-Writer")){
716 OOTools.starteLeerenWriter();
717 break;
720 if (cmd.equals("OpenOffice-Calc")){
721 OOTools.starteLeerenCalc();
722 break;
725 if (cmd.equals("OpenOffice-Impress")){
726 OOTools.starteLeerenImpress();
727 break;
730 if (cmd.equals("Benutzerverwaltung")){
731 Reha.thisClass.progLoader.BenutzerrechteFenster(1,"");
732 break;
734 if (cmd.equals("[Ru:gl] - Die Terminsuchmaschine")){
735 Reha.thisClass.progLoader.ProgRoogleFenster(0,null);
736 //ProgLoader.ProgRoogleFenster(0,null);
737 break;
739 if (cmd.equals("RTA-Wisssen das Universalwissen")){
740 break;
742 if (cmd.equals("Thera-PI - Browser")){
744 File file = new File(Reha.proghome+"xulrunner/xulrunner.exe");
745 if(! file.exists()){
746 JOptionPane.showMessageDialog(null,"Die Mozilla-Runtime 'xulrunner' wurde nicht, oder nicht korrekt installiert\n"+
747 "Der Thera-PI - Browser kann deshalb nicht gestartet werden");
748 return;
751 new Thread(){
752 public void run(){
753 new LadeProg(Reha.proghome+"RehaWissen.jar");
755 }.start();
756 new SwingWorker<Void,Void>(){
757 @Override
758 protected Void doInBackground() throws Exception {
759 RehaSplash rspl = new RehaSplash(null,"Hilfebrowser laden....dieser Vorgang kann einige Sekunden dauern...");
760 long zeit = System.currentTimeMillis();
761 while(true){
762 Thread.sleep(20);
763 if(System.currentTimeMillis()-zeit > 6000){
764 break;
767 rspl.dispose();
768 return null;
771 }.execute();
774 break;
776 if (cmd.equals("Thera-PI - Nachrichten")){
777 //Reha.nachrichtenRegeln();
778 if(! RehaIOServer.rehaMailIsActive){
779 if(Reha.aktUser.startsWith("Therapeut")){return;}
780 Reha.thisFrame.setCursor(Reha.thisClass.wartenCursor);
781 new Thread(){
782 public void run(){
783 new LadeProg(Reha.proghome+"RehaMail.jar"+" "+Reha.proghome+" "+Reha.aktIK+" "+Reha.xport+" "+Reha.aktUser.replace(" ", "#"));
785 }.start();
787 }else{
788 if(Reha.aktUser.startsWith("Therapeut")){return;}
789 new ReverseSocket().setzeRehaNachricht(RehaIOServer.rehaMailreversePort,"Reha#"+RehaIOMessages.MUST_GOTOFRONT);
795 if (cmd.equals("Neuer Wissensbeitrag anlegen")){
796 JOptionPane.showMessageDialog (null, "Achtung!!!!! \n\nDer Wissens-Generator ist auf diesem System\n\n" +
797 "nicht installiert - oder konnte nicht gefunden werden...\n\n");
798 break;
800 if (cmd.equals("Patienten und Rezepte")){
801 new SwingWorker<Void,Void>(){
802 @Override
803 protected Void doInBackground() throws Exception {
804 setCursor(Reha.thisClass.wartenCursor);
805 Reha.thisClass.progLoader.ProgPatientenVerwaltung(1);
806 //Reha.thisClass.progLoader.ProgTerminFenster(0, 1);
807 //ProgLoader.ProgPatientenVerwaltung(1);
808 setCursor(Reha.thisClass.normalCursor);
809 return null;
811 }.execute();
812 break;
814 if (cmd.equals("piHelp")){
815 new Thread(){
816 public void run(){
817 try{
818 //Runtime.getRuntime().exec(Reha.proghome+"piHelp.jar");
819 new LadeProg(Reha.proghome+"piHelp.jar "+
820 Reha.proghome+" "+Reha.aktIK);
821 }catch(Exception ex){
822 ex.printStackTrace();
825 }.start();
827 new SwingWorker<Void,Void>(){
828 @Override
829 protected Void doInBackground() throws Exception {
830 RehaSplash rspl = new RehaSplash(null,"piHelp - Hilfetextgenerator laden....dieser Vorgang kann einige Sekunden dauern...");
831 long zeit = System.currentTimeMillis();
832 while(true){
833 Thread.sleep(20);
834 if(System.currentTimeMillis()-zeit > 2000){
835 break;
838 rspl.dispose();
839 return null;
842 }.execute();
844 new Thread(){
845 public void run(){
846 new LadeProg(Reha.proghome+"piHelp.jar");
848 }.start();
850 break;
852 if (cmd.equals("piTool")){
853 new LadeProg(Reha.proghome+"piTool.jar");
854 break;
856 if (cmd.equals("piTextb")){
857 new LadeProg(Reha.proghome+"TBedit.jar "+
858 Reha.proghome+" "+Reha.aktIK);
859 new SwingWorker<Void,Void>(){
860 @Override
861 protected Void doInBackground() throws Exception {
862 RehaSplash rspl = new RehaSplash(null,"Textbaustein-Editor laden....dieser Vorgang kann einige Sekunden dauern...");
863 long zeit = System.currentTimeMillis();
864 while(true){
865 Thread.sleep(20);
866 if(System.currentTimeMillis()-zeit > 2000){
867 break;
870 rspl.dispose();
871 return null;
874 }.execute();
876 break;
878 if (cmd.equals("piArztTextb")){
879 if(!Rechte.hatRecht(Rechte.Sonstiges_textbausteinegutachten, true)){
880 return;
882 new Thread(){
883 public void run(){
884 new LadeProg(Reha.proghome+"ArztBaustein.jar "+
885 Reha.proghome+" "+Reha.aktIK);
887 }.start();
889 new SwingWorker<Void,Void>(){
890 @Override
891 protected Void doInBackground() throws Exception {
892 RehaSplash rspl = new RehaSplash(null,"Textbaustein-Editor laden....dieser Vorgang kann einige Sekunden dauern...");
893 long zeit = System.currentTimeMillis();
894 while(true){
895 Thread.sleep(20);
896 if(System.currentTimeMillis()-zeit > 2000){
897 break;
900 rspl.dispose();
901 return null;
903 }.execute();
905 break;
907 if (cmd.equals("piIcd10")){
908 new LadeProg(Reha.proghome+"ICDSuche.jar"+" "+Reha.proghome+" "+Reha.aktIK);
910 if (cmd.equals("piQM")){
911 new Thread(){
912 public void run(){
913 new LadeProg(Reha.proghome+"QMHandbuch.jar");
915 }.start();
916 new SwingWorker<Void,Void>(){
917 @Override
918 protected Void doInBackground() throws Exception {
919 RehaSplash rspl = new RehaSplash(null,"QM-Handbuch laden....dieser Vorgang kann einige Sekunden dauern...");
920 long zeit = System.currentTimeMillis();
921 while(true){
922 Thread.sleep(20);
923 if(System.currentTimeMillis()-zeit > 4000){
924 break;
927 rspl.dispose();
928 return null;
931 }.execute();
934 if (cmd.equals("piAW")){
935 new Thread(){
936 public void run(){
937 new LadeProg(Reha.proghome+"QMAuswertung.jar"+" "+Reha.proghome+" "+Reha.aktIK);
939 }.start();
940 new SwingWorker<Void,Void>(){
941 @Override
942 protected Void doInBackground() throws Exception {
943 RehaSplash rspl = new RehaSplash(null,"QM-Auswertung laden....dieser Vorgang kann einige Sekunden dauern...");
944 long zeit = System.currentTimeMillis();
945 while(true){
946 Thread.sleep(20);
947 if(System.currentTimeMillis()-zeit > 4000){
948 break;
951 rspl.dispose();
952 return null;
955 }.execute();
960 if (cmd.equals("Akutliste")){
961 if(SqlInfo.holeEinzelFeld("select id from pat5 where akutpat='T' LIMIT 1").equals("")){
962 JOptionPane.showMessageDialog(null,"Keine Akutpatienten im Patientenstamm vermerkt");
963 return;
965 new SwingWorker<Void,Void>(){
966 @Override
967 protected Void doInBackground() throws Exception {
968 try{
969 Reha.thisFrame.setCursor(Reha.thisClass.wartenCursor);
970 KurzAufrufe.starteFunktion("Akutliste",null,null);
971 Reha.thisFrame.setCursor(Reha.thisClass.cdefault);
972 }catch(Exception ex){
973 ex.printStackTrace();
975 return null;
977 }.execute();
979 new SwingWorker<Void,Void>(){
980 @Override
981 protected Void doInBackground() throws Exception {
982 RehaSplash rspl = new RehaSplash(null,"Akutliste starten - dieser Vorgang kann einige Sekunden dauern...");
983 long zeit = System.currentTimeMillis();
984 while(true){
985 Thread.sleep(20);
986 if(System.currentTimeMillis()-zeit > 2000){
987 break;
990 rspl.dispose();
991 return null;
994 }.execute();
995 break;
997 if (cmd.equals("neuerwecker")){
998 Wecker wecker = new Wecker(null);
999 wecker.pack();
1000 wecker.setVisible(true);
1001 wecker = null;
1009 @Override
1010 public void componentHidden(ComponentEvent e) {
1011 // TODO Auto-generated method stub
1014 @Override
1015 public void componentMoved(ComponentEvent e) {
1016 // TODO Auto-generated method stub
1019 @Override
1020 public void componentResized(ComponentEvent e) {
1021 // TODO Auto-generated method stub
1022 ////System.out.println("Linke-Task-Pane: "+e);
1025 @Override
1026 public void componentShown(ComponentEvent e) {
1027 // TODO Auto-generated method stub
1030 public static void OoOk(){
1031 //LinkeTaskPane.thisClass.oo1.setEnabled(true);
1032 //LinkeTaskPane.thisClass.oo2.setEnabled(true);
1035 public void MaskenErstellen(){
1036 String sstmt = "";
1037 String behandler = "";
1038 Statement stmt = null;
1039 try{
1040 stmt = (Statement) Reha.thisClass.conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
1041 ResultSet.CONCUR_UPDATABLE );
1042 for(int i=1;i<61;i++){
1043 for(int t=1;t<8;t++){
1044 behandler = (i<10 ? "0"+i+"BEHANDLER" : Integer.toString(i)+"BEHANDLER");
1045 sstmt = "insert into masken set behandler='"+behandler+"' , art = '"+t+"' ,belegt='1', N1='@FREI', TS1='07:00:00', TD1='900', TE1='22:00:00'";
1046 ////System.out.println(sstmt);
1047 try {
1048 stmt.execute(sstmt);
1049 } catch (SQLException e) {
1050 // TODO Auto-generated catch block
1051 e.printStackTrace();
1056 } catch (SQLException e) {
1057 // TODO Auto-generated catch block
1058 e.printStackTrace();
1059 }finally {
1060 if (stmt != null) {
1061 try {
1062 stmt.close();
1063 } catch (SQLException e) {
1064 // TODO Auto-generated catch block
1065 e.printStackTrace();
1070 private void doWeckerDrop(String drops){
1071 Wecker wecker = new Wecker(drops);
1072 wecker.pack();
1073 wecker.setVisible(true);
1074 wecker = null;
1076 private void doPatientDrop(String rez_nr){
1077 String pat_int = "";
1078 String reznr = rez_nr;
1079 boolean inhistorie = false;
1080 int ind = reznr.indexOf("\\");
1081 if(ind >= 0){
1082 reznr = reznr.substring(0,ind);
1085 Vector<String> vec = SqlInfo.holeSatz("verordn", "pat_intern", "rez_nr='"+reznr+"'",(List<?>) new ArrayList<String>() );
1086 if(vec.size() == 0){
1087 vec = SqlInfo.holeSatz("lza", "pat_intern", "rez_nr='"+reznr+"'",(List<?>) new ArrayList<String>() );
1088 if(vec.size() == 0){
1089 JOptionPane.showMessageDialog(null,"Rezept weder im aktuellen Rezeptstamm noch in der Historie vorhanden!\nIst die eingetragene Rezeptnummer korrekt?");
1090 return;
1091 }else{
1092 JOptionPane.showMessageDialog(null,"Rezept ist bereits abgerechnet und somit in der Historie des Patienten!");
1093 inhistorie = true;
1096 vec = SqlInfo.holeSatz("pat5", "pat_intern", "pat_intern='"+vec.get(0)+"'",(List<?>) new ArrayList<String>() );
1097 if(vec.size() == 0){
1098 JOptionPane.showMessageDialog(null,"Patient mit zugeordneter Rezeptnummer -> "+reznr+" <- wurde nicht gefunden");
1099 return;
1101 pat_int = (String) vec.get(0);
1102 JComponent patient = AktiveFenster.getFensterAlle("PatientenVerwaltung");
1103 final String xreznr = reznr;
1104 final boolean xinhistorie = inhistorie;
1105 if(patient == null){
1106 final String xpat_int = pat_int;
1107 new SwingWorker<Void,Void>(){
1108 protected Void doInBackground() throws Exception {
1109 JComponent xpatient = AktiveFenster.getFensterAlle("PatientenVerwaltung");
1110 Reha.thisClass.progLoader.ProgPatientenVerwaltung(1);
1111 while( (xpatient == null) ){
1112 Thread.sleep(20);
1113 xpatient = AktiveFenster.getFensterAlle("PatientenVerwaltung");
1115 while( (!AktuelleRezepte.initOk) ){
1116 Thread.sleep(20);
1119 String s1 = "#PATSUCHEN";
1120 String s2 = (String) xpat_int;
1121 PatStammEvent pEvt = new PatStammEvent(Reha.thisClass.terminpanel);
1122 pEvt.setPatStammEvent("PatSuchen");
1123 pEvt.setDetails(s1,s2,"#REZHOLEN-"+xreznr) ;
1124 PatStammEventClass.firePatStammEvent(pEvt);
1125 if(xinhistorie){
1126 Reha.thisClass.patpanel.getTab().setSelectedIndex(1);
1127 }else{
1128 Reha.thisClass.patpanel.getTab().setSelectedIndex(0);
1131 return null;
1134 }.execute();
1135 }else{
1136 Reha.thisClass.progLoader.ProgPatientenVerwaltung(1);
1137 String s1 = "#PATSUCHEN";
1138 String s2 = (String) pat_int;
1139 PatStammEvent pEvt = new PatStammEvent(Reha.thisClass.terminpanel);
1140 pEvt.setPatStammEvent("PatSuchen");
1141 pEvt.setDetails(s1,s2,"#REZHOLEN-"+xreznr) ;
1142 PatStammEventClass.firePatStammEvent(pEvt);
1143 if(xinhistorie){
1144 Reha.thisClass.patpanel.getTab().setSelectedIndex(1);
1145 }else{
1146 Reha.thisClass.patpanel.getTab().setSelectedIndex(0);
1152 /************************************************************/
1154 /************************************************************/
1156 @Override
1157 public void dragEnter(DropTargetDragEvent arg0) {
1158 // TODO Auto-generated method stub
1159 ////System.out.println("Enter---->"+arg0);
1160 ////System.out.println(((JComponent)arg0.getSource()).getName());
1163 @Override
1164 public void dragExit(DropTargetEvent arg0) {
1165 // TODO Auto-generated method stub
1168 @Override
1169 public void dragOver(DropTargetDragEvent arg0) {
1170 // TODO Auto-generated method stub
1173 @Override
1174 public void drop(DropTargetDropEvent arg0) {
1175 // TODO Auto-generated method stub
1176 ////System.out.println(arg0);
1179 @Override
1180 public void dropActionChanged(DropTargetDragEvent arg0) {
1181 // TODO Auto-generated method stub
1185 /************************************************************/
1190 class ladeProg{
1192 public ladeProg(String prog){
1193 String progname= null;
1194 if(prog.indexOf(" ")>=0){
1195 progname = prog.split(" ")[0];
1196 }else{
1197 progname = prog;
1199 File f = new File(progname);
1200 if(! f.exists()){
1201 JOptionPane.showMessageDialog(null,"Diese Software ist auf Ihrem System nicht installiert!");
1202 return;
1204 String vmload = "java -jar ";
1205 String commandx = vmload + prog;
1206 File ausgabedatei = new File(Reha.proghome+"laden.bat");
1207 FileWriter fw;
1208 try {
1209 fw = new FileWriter(ausgabedatei);
1210 BufferedWriter bw = new BufferedWriter(fw);
1211 bw.write(commandx);
1212 bw.close();
1213 } catch (IOException e1) {
1214 e1.printStackTrace();
1216 final String xprog = prog;
1217 new SwingWorker<Void, Void>(){
1219 @Override
1220 protected Void doInBackground() throws Exception {
1221 try {
1222 List<String>list = Arrays.asList(xprog.split(" "));
1223 ArrayList<String> alist = new ArrayList<String>(list);
1224 alist.add(0,"-jar");
1225 alist.add(0,"java");
1226 //System.out.println(list);
1227 //System.out.println("Die Liste = "+alist);
1229 //System.out.println("Liste = "+list);
1230 Process process = new ProcessBuilder(alist).start();
1231 InputStream is = process.getInputStream();
1232 InputStreamReader isr = new InputStreamReader(is);
1233 BufferedReader br = new BufferedReader(isr);
1234 String line;
1235 while ((line = br.readLine()) != null) {
1236 //System.out.println(line);
1238 is.close();
1239 isr.close();
1240 br.close();
1243 } catch (IOException e) {
1244 // TODO Auto-generated catch block
1245 e.printStackTrace();
1247 return null;
1250 }.execute();