5 import generalSplash
.RehaSplash
;
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
;
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
;
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
{
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(){
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);
146 this.add(jScrp
,gridBagConstraints
);
151 * Task-Pane f�r den Patientenstamm erstellen
155 private JXTaskPane
getPatientenStamm(){
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();
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
= "";
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")){
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
) {}
207 dndt
.addDropTargetListener(dropTargetListener
);
208 } catch (TooManyListenersException e1
) {
209 // TODO Auto-generated catch block
210 e1
.printStackTrace();
212 jxLink
.setDropTarget(dndt
);
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);
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);
233 tp1
.setCollapsed(SystemConfig
.taskPaneCollapsed
[0]);
237 private JXTaskPane
getTerminKalender(){
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();
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);
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
= "";
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")){
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
) {}
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> - 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);
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);
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);
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();
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
= "";
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")){
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
) {}
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");
371 tp4
.setCollapsed(SystemConfig
.taskPaneCollapsed
[1]);
372 //tp4.setExpanded(true);
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();
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);
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);
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);
405 tp3
.setCollapsed(SystemConfig
.taskPaneCollapsed
[2]);
409 private JXTaskPane
getNuetzliches(){
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();
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);
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);
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);
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);
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);
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);
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);
483 File f
= new File(Reha
.proghome
+"QMHandbuch.jar");
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);
495 f
= new File(Reha
.proghome
+"QMAuswertung.jar");
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);
508 tp5
.setCollapsed(SystemConfig
.taskPaneCollapsed
[3]);
513 private JXTaskPane
getSystemEinstellungen(){
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();
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);
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);
540 jxLink
= new JXHyperlink();
541 jxLink
.setText("Look & Feel");
542 jxLink
.addActionListener(this);
543 jxLink
.setEnabled(false);
545 tp2
.setCollapsed(SystemConfig
.taskPaneCollapsed
[4]);
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();
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(){
565 public void actionPerformed(ActionEvent e
) {
566 if(TerminFenster
.getThisClass()!= null){
567 Date dat
= monthView
.getSelectionDate();
571 wahlTag
= sdf
.format(monthView
.getSelectionDate());
572 if(wahlTag
.equals(aktTag
)){
576 Reha
.thisClass
.progLoader
.ProgTerminFenster(1, 0);
577 TerminFenster
.getThisClass().springeAufDatum(aktTag
);
579 Date dat
= monthView
.getSelectionDate();
583 wahlTag
= sdf
.format(monthView
.getSelectionDate());
584 if(wahlTag
.equals(aktTag
)){
588 Reha
.thisClass
.progLoader
.ProgTerminFenster(1, 0);
589 SwingUtilities
.invokeLater(new Runnable(){
591 TerminFenster
.getThisClass().springeAufDatum(aktTag
);
599 monthView
.addActionListener(al
);
601 tp6
.setCollapsed(true);
602 tp6
.setCollapsed(SystemConfig
.taskPaneCollapsed
[5]);
607 public static void UpdateUI(){
608 jxTPcontainer
.updateUI();
615 ////System.out.println("TaskPane-Container L&F");
618 * Eigener Event-Handler man wird sehen ob das vern�ftig ist.
621 public void actionPerformed(ActionEvent e
) {
622 String cmd
= e
.getActionCommand();
625 if (cmd
.equals("Look & Feel")) {
626 ExUndHop eUh
= new ExUndHop();
627 eUh
.setzeStatement("delete from flexlock");
628 //ProgLoader.ProgLookAndFeel(0);
632 if (cmd
.equals("System Initialisierung")){
633 new SwingWorker
<Void
,Void
>(){
635 protected Void
doInBackground() throws Exception
{
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();
649 /*SystemUtil sysUtil = new SystemUtil(Reha.thisFrame);
650 sysUtil.setSize(800,600);
651 sysUtil.setLocation(100,75);
652 sysUtil.setVisible(true);
657 if (cmd
.equals("Krankenkassen")){
658 new SwingWorker
<Void
,Void
>(){
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
);
671 if (cmd
.equals("Terminkalender starten")){
672 new SwingWorker
<Void
,Void
>(){
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
);
684 if (cmd
.equals("Arztstamm")){
685 new SwingWorker
<Void
,Void
>(){
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
);
697 if (cmd
.equals("Wochenarbeitszeiten definieren")){
698 JComponent termin
= AktiveFenster
.getFensterAlle("TerminFenster");
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");
705 Reha
.thisClass
.progLoader
.ProgTerminFenster(0, 2);
706 //ProgLoader.ProgTerminFenster(0,2);
710 if (cmd
.equals("monthview")){
711 new DatumWahl(200,200);
715 if (cmd
.equals("OpenOffice-Writer")){
716 OOTools
.starteLeerenWriter();
720 if (cmd
.equals("OpenOffice-Calc")){
721 OOTools
.starteLeerenCalc();
725 if (cmd
.equals("OpenOffice-Impress")){
726 OOTools
.starteLeerenImpress();
730 if (cmd
.equals("Benutzerverwaltung")){
731 Reha
.thisClass
.progLoader
.BenutzerrechteFenster(1,"");
734 if (cmd
.equals("[Ru:gl] - Die Terminsuchmaschine")){
735 Reha
.thisClass
.progLoader
.ProgRoogleFenster(0,null);
736 //ProgLoader.ProgRoogleFenster(0,null);
739 if (cmd
.equals("RTA-Wisssen das Universalwissen")){
742 if (cmd
.equals("Thera-PI - Browser")){
744 File file = new File(Reha.proghome+"xulrunner/xulrunner.exe");
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");
753 new LadeProg(Reha
.proghome
+"RehaWissen.jar");
756 new SwingWorker
<Void
,Void
>(){
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();
763 if(System
.currentTimeMillis()-zeit
> 6000){
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
);
783 new LadeProg(Reha
.proghome
+"RehaMail.jar"+" "+Reha
.proghome
+" "+Reha
.aktIK
+" "+Reha
.xport
+" "+Reha
.aktUser
.replace(" ", "#"));
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");
800 if (cmd
.equals("Patienten und Rezepte")){
801 new SwingWorker
<Void
,Void
>(){
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
);
814 if (cmd
.equals("piHelp")){
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();
827 new SwingWorker
<Void
,Void
>(){
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();
834 if(System
.currentTimeMillis()-zeit
> 2000){
846 new LadeProg(Reha.proghome+"piHelp.jar");
852 if (cmd
.equals("piTool")){
853 new LadeProg(Reha
.proghome
+"piTool.jar");
856 if (cmd
.equals("piTextb")){
857 new LadeProg(Reha
.proghome
+"TBedit.jar "+
858 Reha
.proghome
+" "+Reha
.aktIK
);
859 new SwingWorker
<Void
,Void
>(){
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();
866 if(System
.currentTimeMillis()-zeit
> 2000){
878 if (cmd
.equals("piArztTextb")){
879 if(!Rechte
.hatRecht(Rechte
.Sonstiges_textbausteinegutachten
, true)){
884 new LadeProg(Reha
.proghome
+"ArztBaustein.jar "+
885 Reha
.proghome
+" "+Reha
.aktIK
);
889 new SwingWorker
<Void
,Void
>(){
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();
896 if(System
.currentTimeMillis()-zeit
> 2000){
907 if (cmd
.equals("piIcd10")){
908 new LadeProg(Reha
.proghome
+"ICDSuche.jar"+" "+Reha
.proghome
+" "+Reha
.aktIK
);
910 if (cmd
.equals("piQM")){
913 new LadeProg(Reha
.proghome
+"QMHandbuch.jar");
916 new SwingWorker
<Void
,Void
>(){
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();
923 if(System
.currentTimeMillis()-zeit
> 4000){
934 if (cmd
.equals("piAW")){
937 new LadeProg(Reha
.proghome
+"QMAuswertung.jar"+" "+Reha
.proghome
+" "+Reha
.aktIK
);
940 new SwingWorker
<Void
,Void
>(){
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();
947 if(System
.currentTimeMillis()-zeit
> 4000){
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");
965 new SwingWorker
<Void
,Void
>(){
967 protected Void
doInBackground() throws Exception
{
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();
979 new SwingWorker
<Void
,Void
>(){
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();
986 if(System
.currentTimeMillis()-zeit
> 2000){
997 if (cmd
.equals("neuerwecker")){
998 Wecker wecker
= new Wecker(null);
1000 wecker
.setVisible(true);
1010 public void componentHidden(ComponentEvent e
) {
1011 // TODO Auto-generated method stub
1015 public void componentMoved(ComponentEvent e
) {
1016 // TODO Auto-generated method stub
1020 public void componentResized(ComponentEvent e
) {
1021 // TODO Auto-generated method stub
1022 ////System.out.println("Linke-Task-Pane: "+e);
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(){
1037 String behandler
= "";
1038 Statement stmt
= null;
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);
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();
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
);
1073 wecker
.setVisible(true);
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("\\");
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?");
1092 JOptionPane
.showMessageDialog(null,"Rezept ist bereits abgerechnet und somit in der Historie des Patienten!");
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");
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) ){
1113 xpatient
= AktiveFenster
.getFensterAlle("PatientenVerwaltung");
1115 while( (!AktuelleRezepte
.initOk
) ){
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
);
1126 Reha
.thisClass
.patpanel
.getTab().setSelectedIndex(1);
1128 Reha
.thisClass
.patpanel
.getTab().setSelectedIndex(0);
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
);
1144 Reha
.thisClass
.patpanel
.getTab().setSelectedIndex(1);
1146 Reha
.thisClass
.patpanel
.getTab().setSelectedIndex(0);
1152 /************************************************************/
1154 /************************************************************/
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());
1164 public void dragExit(DropTargetEvent arg0
) {
1165 // TODO Auto-generated method stub
1169 public void dragOver(DropTargetDragEvent arg0
) {
1170 // TODO Auto-generated method stub
1174 public void drop(DropTargetDropEvent arg0
) {
1175 // TODO Auto-generated method stub
1176 ////System.out.println(arg0);
1180 public void dropActionChanged(DropTargetDragEvent arg0
) {
1181 // TODO Auto-generated method stub
1185 /************************************************************/
1192 public ladeProg(String prog){
1193 String progname= null;
1194 if(prog.indexOf(" ")>=0){
1195 progname = prog.split(" ")[0];
1199 File f = new File(progname);
1201 JOptionPane.showMessageDialog(null,"Diese Software ist auf Ihrem System nicht installiert!");
1204 String vmload = "java -jar ";
1205 String commandx = vmload + prog;
1206 File ausgabedatei = new File(Reha.proghome+"laden.bat");
1209 fw = new FileWriter(ausgabedatei);
1210 BufferedWriter bw = new BufferedWriter(fw);
1213 } catch (IOException e1) {
1214 e1.printStackTrace();
1216 final String xprog = prog;
1217 new SwingWorker<Void, Void>(){
1220 protected Void doInBackground() throws Exception {
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);
1235 while ((line = br.readLine()) != null) {
1236 //System.out.println(line);
1243 } catch (IOException e) {
1244 // TODO Auto-generated catch block
1245 e.printStackTrace();