PageRenderTime 1319ms CodeModel.GetById 161ms app.highlight 448ms RepoModel.GetById 699ms app.codeStats 1ms

/src/mpv5/ui/panels/MPControlPanel.java

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Java | 929 lines | 800 code | 86 blank | 43 comment | 4 complexity | 0faeaa07735e74b883352e72334d657d MD5 | raw file
  1package mpv5.ui.panels;
  2
  3import com.sun.star.logging.LogLevel;
  4import de.muntjak.tinylookandfeel.TinyLookAndFeel;
  5import groovy.ui.Console;
  6import java.awt.BorderLayout;
  7import java.awt.Component;
  8import java.io.File;
  9import java.io.IOException;
 10import java.util.logging.Level;
 11import java.util.logging.Logger;
 12import javax.swing.Icon;
 13import javax.swing.JButton;
 14import javax.swing.JPanel;
 15import mpv5.Main;
 16import mpv5.YabsViewProxy;
 17import mpv5.db.common.Context;
 18import mpv5.db.common.DatabaseObject;
 19import mpv5.db.common.QueryHandler;
 20import mpv5.db.objects.User;
 21import mpv5.globals.LocalSettings;
 22import mpv5.globals.Messages;
 23import mpv5.logging.Log;
 24import mpv5.ui.dialogs.ControlApplet;
 25import mpv5.ui.dialogs.Popup;
 26import mpv5.ui.dialogs.subcomponents.ControlPanel_Accounts;
 27import mpv5.ui.dialogs.subcomponents.ControlPanel_AdvancedGlobalProperties;
 28import mpv5.ui.dialogs.subcomponents.ControlPanel_AdvancedLocalProperties;
 29import mpv5.ui.dialogs.subcomponents.ControlPanel_Company;
 30import mpv5.ui.dialogs.subcomponents.ControlPanel_Fonts;
 31import mpv5.ui.dialogs.subcomponents.ControlPanel_Userproperties;
 32import mpv5.ui.dialogs.subcomponents.ControlPanel_Formats;
 33import mpv5.ui.dialogs.subcomponents.ControlPanel_Groups;
 34import mpv5.ui.dialogs.subcomponents.ControlPanel_Konsole;
 35import mpv5.ui.dialogs.subcomponents.ControlPanel_Local;
 36import mpv5.ui.dialogs.subcomponents.ControlPanel_Locale;
 37import mpv5.ui.dialogs.subcomponents.ControlPanel_External;
 38import mpv5.ui.dialogs.subcomponents.ControlPanel_Massprint;
 39import mpv5.ui.dialogs.subcomponents.ControlPanel_Plugins;
 40import mpv5.ui.dialogs.subcomponents.ControlPanel_ProductGroups;
 41import mpv5.ui.dialogs.subcomponents.ControlPanel_Reminder;
 42import mpv5.ui.dialogs.subcomponents.ControlPanel_Schedule;
 43import mpv5.ui.dialogs.subcomponents.ControlPanel_Taxes;
 44import mpv5.ui.dialogs.subcomponents.ControlPanel_Templates;
 45import mpv5.ui.dialogs.subcomponents.ControlPanel_Users;
 46import mpv5.ui.dialogs.subcomponents.ControlPanel_ValueProps;
 47import mpv5.ui.dialogs.subcomponents.ControlPanel_WebShopManager;
 48import mpv5.ui.frames.MPBabelFish;
 49import mpv5.ui.frames.MPView;
 50import mpv5.utils.files.FileDirectoryHandler;
 51
 52/**
 53 *
 54 *
 55 */
 56public class MPControlPanel extends javax.swing.JPanel {
 57
 58    private static MPControlPanel cpanel;
 59
 60    /**
 61     *
 62     * @return
 63     */
 64    public static synchronized MPControlPanel instanceOf() {
 65        if (cpanel != null) {
 66            return cpanel;
 67        } else {
 68            cpanel = new MPControlPanel();
 69            return cpanel;
 70        }
 71    }
 72    private Context context;
 73
 74    /**
 75     * Creates new form ListPanel
 76     */
 77    private MPControlPanel() {
 78        initComponents();
 79        removeAll();
 80        add(jScrollPane1, BorderLayout.CENTER);
 81        validate();
 82        repaint();
 83    }
 84
 85    /**
 86     * This me4thod is called from within the constructor to initialize the
 87     * form. WARNING: Do NOT modify this code. The content of this method is
 88     * always regenerated by the Form Editor.
 89     */
 90    @SuppressWarnings("unchecked")
 91    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
 92    private void initComponents() {
 93
 94        jScrollPane1 = new javax.swing.JScrollPane();
 95        buttons = new javax.swing.JPanel();
 96        jButton16 = new javax.swing.JButton();
 97        jButton1 = new javax.swing.JButton();
 98        jButton15 = new javax.swing.JButton();
 99        jButton7 = new javax.swing.JButton();
100        jButton20 = new javax.swing.JButton();
101        jButton21 = new javax.swing.JButton();
102        jButton10 = new javax.swing.JButton();
103        jButton12 = new javax.swing.JButton();
104        jButton2 = new javax.swing.JButton();
105        jButton5 = new javax.swing.JButton();
106        jButton6 = new javax.swing.JButton();
107        jButton8 = new javax.swing.JButton();
108        jButton9 = new javax.swing.JButton();
109        jButton17 = new javax.swing.JButton();
110        jButton13 = new javax.swing.JButton();
111        jButton14 = new javax.swing.JButton();
112        jButton11 = new javax.swing.JButton();
113        jButton19 = new javax.swing.JButton();
114        jButton18 = new javax.swing.JButton();
115        jButton22 = new javax.swing.JButton();
116        jButton23 = new javax.swing.JButton();
117        jButton24 = new javax.swing.JButton();
118        jButton25 = new javax.swing.JButton();
119        jButton26 = new javax.swing.JButton();
120        details = new javax.swing.JPanel();
121        scroller = new javax.swing.JScrollPane();
122        jToolBar1 = new javax.swing.JToolBar();
123        jButton4 = new javax.swing.JButton();
124        actions = new javax.swing.JPanel();
125
126        setName("Form"); // NOI18N
127        setLayout(new java.awt.BorderLayout());
128
129        jScrollPane1.setAutoscrolls(true);
130        jScrollPane1.setName("jScrollPane1"); // NOI18N
131        jScrollPane1.setPreferredSize(new java.awt.Dimension(343, 303));
132
133        buttons.setBackground(new java.awt.Color(255, 255, 255));
134        java.util.ResourceBundle bundle = mpv5.i18n.LanguageManager.getBundle(); // NOI18N
135        buttons.setBorder(javax.swing.BorderFactory.createTitledBorder(bundle.getString("MPControlPanel.buttons.border.title"))); // NOI18N
136        buttons.setAutoscrolls(true);
137        buttons.setMaximumSize(new java.awt.Dimension(32767, 400));
138        buttons.setMinimumSize(new java.awt.Dimension(30, 150));
139        buttons.setName("buttons"); // NOI18N
140        buttons.setPreferredSize(new java.awt.Dimension(500, 250));
141
142        jButton16.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
143        jButton16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/preferences_plugin.png"))); // NOI18N
144        jButton16.setText(bundle.getString("MPControlPanel.jButton16.text")); // NOI18N
145        jButton16.setToolTipText(bundle.getString("MPControlPanel.jButton16.toolTipText")); // NOI18N
146        jButton16.setBorder(javax.swing.BorderFactory.createEtchedBorder());
147        jButton16.setContentAreaFilled(false);
148        jButton16.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
149        jButton16.setIconTextGap(1);
150        jButton16.setMaximumSize(new java.awt.Dimension(90, 90));
151        jButton16.setMinimumSize(new java.awt.Dimension(90, 80));
152        jButton16.setName("jButton16"); // NOI18N
153        jButton16.setPreferredSize(new java.awt.Dimension(80, 70));
154        jButton16.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
155        jButton16.addActionListener(new java.awt.event.ActionListener() {
156            public void actionPerformed(java.awt.event.ActionEvent evt) {
157                jButton16ActionPerformed(evt);
158            }
159        });
160        buttons.add(jButton16);
161
162        jButton1.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
163        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/internet.png"))); // NOI18N
164        jButton1.setText(bundle.getString("MPControlPanel.jButton1.text")); // NOI18N
165        jButton1.setToolTipText(bundle.getString("MPControlPanel.jButton1.toolTipText")); // NOI18N
166        jButton1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
167        jButton1.setContentAreaFilled(false);
168        jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
169        jButton1.setIconTextGap(1);
170        jButton1.setMaximumSize(new java.awt.Dimension(90, 90));
171        jButton1.setMinimumSize(new java.awt.Dimension(90, 80));
172        jButton1.setName("jButton1"); // NOI18N
173        jButton1.setPreferredSize(new java.awt.Dimension(80, 70));
174        jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
175        jButton1.addActionListener(new java.awt.event.ActionListener() {
176            public void actionPerformed(java.awt.event.ActionEvent evt) {
177                jButton1ActionPerformed(evt);
178            }
179        });
180        buttons.add(jButton1);
181
182        jButton15.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
183        jButton15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/advancedsettings.png"))); // NOI18N
184        jButton15.setText(bundle.getString("MPControlPanel.jButton15.text")); // NOI18N
185        jButton15.setToolTipText(bundle.getString("MPControlPanel.jButton15.toolTipText")); // NOI18N
186        jButton15.setBorder(javax.swing.BorderFactory.createEtchedBorder());
187        jButton15.setContentAreaFilled(false);
188        jButton15.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
189        jButton15.setIconTextGap(1);
190        jButton15.setMaximumSize(new java.awt.Dimension(90, 90));
191        jButton15.setMinimumSize(new java.awt.Dimension(90, 80));
192        jButton15.setName("jButton15"); // NOI18N
193        jButton15.setPreferredSize(new java.awt.Dimension(80, 70));
194        jButton15.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
195        jButton15.addActionListener(new java.awt.event.ActionListener() {
196            public void actionPerformed(java.awt.event.ActionEvent evt) {
197                jButton15ActionPerformed(evt);
198            }
199        });
200        buttons.add(jButton15);
201
202        jButton7.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
203        jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/openofficeorg-20.png"))); // NOI18N
204        jButton7.setText(bundle.getString("MPControlPanel.jButton7.text")); // NOI18N
205        jButton7.setToolTipText(bundle.getString("MPControlPanel.jButton7.toolTipText")); // NOI18N
206        jButton7.setBorder(javax.swing.BorderFactory.createEtchedBorder());
207        jButton7.setContentAreaFilled(false);
208        jButton7.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
209        jButton7.setIconTextGap(1);
210        jButton7.setMaximumSize(new java.awt.Dimension(90, 90));
211        jButton7.setMinimumSize(new java.awt.Dimension(90, 80));
212        jButton7.setName("jButton7"); // NOI18N
213        jButton7.setPreferredSize(new java.awt.Dimension(80, 70));
214        jButton7.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
215        jButton7.addActionListener(new java.awt.event.ActionListener() {
216            public void actionPerformed(java.awt.event.ActionEvent evt) {
217                jButton7ActionPerformed(evt);
218            }
219        });
220        buttons.add(jButton7);
221
222        jButton20.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
223        jButton20.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/advancedsettings.png"))); // NOI18N
224        jButton20.setText(bundle.getString("MPControlPanel.jButton20.text")); // NOI18N
225        jButton20.setToolTipText(bundle.getString("MPControlPanel.jButton20.toolTipText")); // NOI18N
226        jButton20.setBorder(javax.swing.BorderFactory.createEtchedBorder());
227        jButton20.setContentAreaFilled(false);
228        jButton20.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
229        jButton20.setIconTextGap(1);
230        jButton20.setMaximumSize(new java.awt.Dimension(90, 90));
231        jButton20.setMinimumSize(new java.awt.Dimension(90, 80));
232        jButton20.setName("jButton20"); // NOI18N
233        jButton20.setPreferredSize(new java.awt.Dimension(80, 70));
234        jButton20.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
235        jButton20.addActionListener(new java.awt.event.ActionListener() {
236            public void actionPerformed(java.awt.event.ActionEvent evt) {
237                jButton20ActionPerformed(evt);
238            }
239        });
240        buttons.add(jButton20);
241
242        jButton21.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
243        jButton21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/advancedsettings.png"))); // NOI18N
244        jButton21.setText(bundle.getString("MPControlPanel.jButton21.text")); // NOI18N
245        jButton21.setToolTipText(bundle.getString("MPControlPanel.jButton21.toolTipText")); // NOI18N
246        jButton21.setBorder(javax.swing.BorderFactory.createEtchedBorder());
247        jButton21.setContentAreaFilled(false);
248        jButton21.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
249        jButton21.setIconTextGap(1);
250        jButton21.setMaximumSize(new java.awt.Dimension(90, 90));
251        jButton21.setMinimumSize(new java.awt.Dimension(90, 80));
252        jButton21.setName("jButton21"); // NOI18N
253        jButton21.setPreferredSize(new java.awt.Dimension(80, 70));
254        jButton21.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
255        jButton21.addActionListener(new java.awt.event.ActionListener() {
256            public void actionPerformed(java.awt.event.ActionEvent evt) {
257                jButton21ActionPerformed(evt);
258            }
259        });
260        buttons.add(jButton21);
261
262        jButton10.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
263        jButton10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/flag.png"))); // NOI18N
264        jButton10.setText(bundle.getString("MPControlPanel.jButton10.text")); // NOI18N
265        jButton10.setToolTipText(bundle.getString("MPControlPanel.jButton10.toolTipText")); // NOI18N
266        jButton10.setBorder(javax.swing.BorderFactory.createEtchedBorder());
267        jButton10.setContentAreaFilled(false);
268        jButton10.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
269        jButton10.setIconTextGap(1);
270        jButton10.setMaximumSize(new java.awt.Dimension(90, 90));
271        jButton10.setMinimumSize(new java.awt.Dimension(90, 80));
272        jButton10.setName("jButton10"); // NOI18N
273        jButton10.setPreferredSize(new java.awt.Dimension(80, 70));
274        jButton10.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
275        jButton10.addActionListener(new java.awt.event.ActionListener() {
276            public void actionPerformed(java.awt.event.ActionEvent evt) {
277                jButton10ActionPerformed(evt);
278            }
279        });
280        buttons.add(jButton10);
281
282        jButton12.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
283        jButton12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/gkrellm2.png"))); // NOI18N
284        jButton12.setText(bundle.getString("MPControlPanel.jButton12.text")); // NOI18N
285        jButton12.setToolTipText(bundle.getString("MPControlPanel.jButton12.toolTipText")); // NOI18N
286        jButton12.setBorder(javax.swing.BorderFactory.createEtchedBorder());
287        jButton12.setContentAreaFilled(false);
288        jButton12.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
289        jButton12.setIconTextGap(1);
290        jButton12.setMaximumSize(new java.awt.Dimension(90, 90));
291        jButton12.setMinimumSize(new java.awt.Dimension(90, 80));
292        jButton12.setName("jButton12"); // NOI18N
293        jButton12.setPreferredSize(new java.awt.Dimension(80, 70));
294        jButton12.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
295        jButton12.addActionListener(new java.awt.event.ActionListener() {
296            public void actionPerformed(java.awt.event.ActionEvent evt) {
297                jButton12ActionPerformed(evt);
298            }
299        });
300        buttons.add(jButton12);
301
302        jButton2.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
303        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/locale.png"))); // NOI18N
304        jButton2.setText(bundle.getString("MPControlPanel.jButton2.text")); // NOI18N
305        jButton2.setToolTipText(bundle.getString("MPControlPanel.jButton2.toolTipText")); // NOI18N
306        jButton2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
307        jButton2.setContentAreaFilled(false);
308        jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
309        jButton2.setIconTextGap(1);
310        jButton2.setMaximumSize(new java.awt.Dimension(90, 90));
311        jButton2.setMinimumSize(new java.awt.Dimension(90, 80));
312        jButton2.setName("jButton2"); // NOI18N
313        jButton2.setPreferredSize(new java.awt.Dimension(80, 70));
314        jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
315        jButton2.addActionListener(new java.awt.event.ActionListener() {
316            public void actionPerformed(java.awt.event.ActionEvent evt) {
317                jButton2ActionPerformed(evt);
318            }
319        });
320        buttons.add(jButton2);
321
322        jButton5.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
323        jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/babelfish.png"))); // NOI18N
324        jButton5.setText(bundle.getString("MPControlPanel.jButton5.text")); // NOI18N
325        jButton5.setToolTipText(bundle.getString("MPControlPanel.jButton5.toolTipText")); // NOI18N
326        jButton5.setBorder(javax.swing.BorderFactory.createEtchedBorder());
327        jButton5.setContentAreaFilled(false);
328        jButton5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
329        jButton5.setIconTextGap(1);
330        jButton5.setMaximumSize(new java.awt.Dimension(90, 90));
331        jButton5.setMinimumSize(new java.awt.Dimension(90, 80));
332        jButton5.setName("jButton5"); // NOI18N
333        jButton5.setPreferredSize(new java.awt.Dimension(80, 70));
334        jButton5.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
335        jButton5.addActionListener(new java.awt.event.ActionListener() {
336            public void actionPerformed(java.awt.event.ActionEvent evt) {
337                jButton5ActionPerformed(evt);
338            }
339        });
340        buttons.add(jButton5);
341
342        jButton6.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
343        jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/evolution-contacts.png"))); // NOI18N
344        jButton6.setText(bundle.getString("MPControlPanel.jButton6.text")); // NOI18N
345        jButton6.setToolTipText(bundle.getString("MPControlPanel.jButton6.toolTipText")); // NOI18N
346        jButton6.setBorder(javax.swing.BorderFactory.createEtchedBorder());
347        jButton6.setContentAreaFilled(false);
348        jButton6.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
349        jButton6.setIconTextGap(1);
350        jButton6.setMaximumSize(new java.awt.Dimension(90, 90));
351        jButton6.setMinimumSize(new java.awt.Dimension(90, 80));
352        jButton6.setName("jButton6"); // NOI18N
353        jButton6.setPreferredSize(new java.awt.Dimension(80, 70));
354        jButton6.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
355        jButton6.addActionListener(new java.awt.event.ActionListener() {
356            public void actionPerformed(java.awt.event.ActionEvent evt) {
357                jButton6ActionPerformed(evt);
358            }
359        });
360        buttons.add(jButton6);
361
362        jButton8.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
363        jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/draw-eraser.png"))); // NOI18N
364        jButton8.setText(bundle.getString("MPControlPanel.jButton8.text")); // NOI18N
365        jButton8.setToolTipText(bundle.getString("MPControlPanel.jButton8.toolTipText")); // NOI18N
366        jButton8.setBorder(javax.swing.BorderFactory.createEtchedBorder());
367        jButton8.setContentAreaFilled(false);
368        jButton8.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
369        jButton8.setIconTextGap(1);
370        jButton8.setMaximumSize(new java.awt.Dimension(90, 90));
371        jButton8.setMinimumSize(new java.awt.Dimension(90, 80));
372        jButton8.setName("jButton8"); // NOI18N
373        jButton8.setPreferredSize(new java.awt.Dimension(80, 70));
374        jButton8.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
375        jButton8.addActionListener(new java.awt.event.ActionListener() {
376            public void actionPerformed(java.awt.event.ActionEvent evt) {
377                jButton8ActionPerformed(evt);
378            }
379        });
380        buttons.add(jButton8);
381
382        jButton9.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
383        jButton9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/fonts.png"))); // NOI18N
384        jButton9.setText(bundle.getString("MPControlPanel.jButton9.text")); // NOI18N
385        jButton9.setToolTipText(bundle.getString("MPControlPanel.jButton9.toolTipText")); // NOI18N
386        jButton9.setBorder(javax.swing.BorderFactory.createEtchedBorder());
387        jButton9.setContentAreaFilled(false);
388        jButton9.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
389        jButton9.setIconTextGap(1);
390        jButton9.setMaximumSize(new java.awt.Dimension(90, 90));
391        jButton9.setMinimumSize(new java.awt.Dimension(90, 80));
392        jButton9.setName("jButton9"); // NOI18N
393        jButton9.setPreferredSize(new java.awt.Dimension(80, 70));
394        jButton9.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
395        jButton9.addActionListener(new java.awt.event.ActionListener() {
396            public void actionPerformed(java.awt.event.ActionEvent evt) {
397                jButton9ActionPerformed(evt);
398            }
399        });
400        buttons.add(jButton9);
401
402        jButton17.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
403        jButton17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/preferences_system_session_services.png"))); // NOI18N
404        jButton17.setText(bundle.getString("MPControlPanel.jButton17.text")); // NOI18N
405        jButton17.setToolTipText(bundle.getString("MPControlPanel.jButton17.toolTipText")); // NOI18N
406        jButton17.setBorder(javax.swing.BorderFactory.createEtchedBorder());
407        jButton17.setContentAreaFilled(false);
408        jButton17.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
409        jButton17.setIconTextGap(1);
410        jButton17.setMaximumSize(new java.awt.Dimension(90, 90));
411        jButton17.setMinimumSize(new java.awt.Dimension(90, 80));
412        jButton17.setName("jButton17"); // NOI18N
413        jButton17.setPreferredSize(new java.awt.Dimension(80, 70));
414        jButton17.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
415        jButton17.addActionListener(new java.awt.event.ActionListener() {
416            public void actionPerformed(java.awt.event.ActionEvent evt) {
417                jButton17ActionPerformed(evt);
418            }
419        });
420        buttons.add(jButton17);
421
422        jButton13.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
423        jButton13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/blockdevice.png"))); // NOI18N
424        jButton13.setText(bundle.getString("MPControlPanel.jButton13.text")); // NOI18N
425        jButton13.setToolTipText(bundle.getString("MPControlPanel.jButton13.toolTipText")); // NOI18N
426        jButton13.setBorder(javax.swing.BorderFactory.createEtchedBorder());
427        jButton13.setContentAreaFilled(false);
428        jButton13.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
429        jButton13.setIconTextGap(1);
430        jButton13.setMaximumSize(new java.awt.Dimension(90, 90));
431        jButton13.setMinimumSize(new java.awt.Dimension(90, 80));
432        jButton13.setName("jButton13"); // NOI18N
433        jButton13.setPreferredSize(new java.awt.Dimension(80, 70));
434        jButton13.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
435        jButton13.addActionListener(new java.awt.event.ActionListener() {
436            public void actionPerformed(java.awt.event.ActionEvent evt) {
437                jButton13ActionPerformed(evt);
438            }
439        });
440        buttons.add(jButton13);
441
442        jButton14.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
443        jButton14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/konsole.png"))); // NOI18N
444        jButton14.setText(bundle.getString("MPControlPanel.jButton14.text")); // NOI18N
445        jButton14.setToolTipText(bundle.getString("MPControlPanel.jButton14.toolTipText")); // NOI18N
446        jButton14.setBorder(javax.swing.BorderFactory.createEtchedBorder());
447        jButton14.setContentAreaFilled(false);
448        jButton14.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
449        jButton14.setIconTextGap(1);
450        jButton14.setMaximumSize(new java.awt.Dimension(90, 90));
451        jButton14.setMinimumSize(new java.awt.Dimension(90, 80));
452        jButton14.setName("jButton14"); // NOI18N
453        jButton14.setPreferredSize(new java.awt.Dimension(80, 70));
454        jButton14.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
455        jButton14.addActionListener(new java.awt.event.ActionListener() {
456            public void actionPerformed(java.awt.event.ActionEvent evt) {
457                jButton14ActionPerformed(evt);
458            }
459        });
460        buttons.add(jButton14);
461
462        jButton11.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
463        jButton11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/usb.png"))); // NOI18N
464        jButton11.setText(bundle.getString("MPControlPanel.jButton11.text")); // NOI18N
465        jButton11.setToolTipText(bundle.getString("MPControlPanel.jButton11.toolTipText")); // NOI18N
466        jButton11.setBorder(javax.swing.BorderFactory.createEtchedBorder());
467        jButton11.setContentAreaFilled(false);
468        jButton11.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
469        jButton11.setIconTextGap(1);
470        jButton11.setMaximumSize(new java.awt.Dimension(90, 90));
471        jButton11.setMinimumSize(new java.awt.Dimension(90, 80));
472        jButton11.setName("jButton11"); // NOI18N
473        jButton11.setPreferredSize(new java.awt.Dimension(80, 70));
474        jButton11.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
475        jButton11.addActionListener(new java.awt.event.ActionListener() {
476            public void actionPerformed(java.awt.event.ActionEvent evt) {
477                jButton11ActionPerformed(evt);
478            }
479        });
480        buttons.add(jButton11);
481
482        jButton19.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
483        jButton19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/krfb.png"))); // NOI18N
484        jButton19.setText(bundle.getString("MPControlPanel.jButton19.text")); // NOI18N
485        jButton19.setToolTipText(bundle.getString("MPControlPanel.jButton19.toolTipText")); // NOI18N
486        jButton19.setBorder(javax.swing.BorderFactory.createEtchedBorder());
487        jButton19.setContentAreaFilled(false);
488        jButton19.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
489        jButton19.setIconTextGap(1);
490        jButton19.setMaximumSize(new java.awt.Dimension(90, 90));
491        jButton19.setMinimumSize(new java.awt.Dimension(90, 80));
492        jButton19.setName("jButton19"); // NOI18N
493        jButton19.setPreferredSize(new java.awt.Dimension(80, 70));
494        jButton19.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
495        jButton19.addActionListener(new java.awt.event.ActionListener() {
496            public void actionPerformed(java.awt.event.ActionEvent evt) {
497                jButton19ActionPerformed(evt);
498            }
499        });
500        buttons.add(jButton19);
501
502        jButton18.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
503        jButton18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/kxconfig.png"))); // NOI18N
504        jButton18.setText(bundle.getString("MPControlPanel.jButton18.text")); // NOI18N
505        jButton18.setToolTipText(bundle.getString("MPControlPanel.jButton18.toolTipText")); // NOI18N
506        jButton18.setBorder(javax.swing.BorderFactory.createEtchedBorder());
507        jButton18.setContentAreaFilled(false);
508        jButton18.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
509        jButton18.setIconTextGap(1);
510        jButton18.setMaximumSize(new java.awt.Dimension(90, 90));
511        jButton18.setMinimumSize(new java.awt.Dimension(90, 80));
512        jButton18.setName("jButton18"); // NOI18N
513        jButton18.setPreferredSize(new java.awt.Dimension(80, 70));
514        jButton18.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
515        jButton18.addActionListener(new java.awt.event.ActionListener() {
516            public void actionPerformed(java.awt.event.ActionEvent evt) {
517                jButton18ActionPerformed(evt);
518            }
519        });
520        buttons.add(jButton18);
521
522        jButton22.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
523        jButton22.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/style.png"))); // NOI18N
524        jButton22.setText(bundle.getString("MPControlPanel.jButton22.text")); // NOI18N
525        jButton22.setToolTipText(bundle.getString("MPControlPanel.jButton22.toolTipText")); // NOI18N
526        jButton22.setBorder(javax.swing.BorderFactory.createEtchedBorder());
527        jButton22.setContentAreaFilled(false);
528        jButton22.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
529        jButton22.setIconTextGap(1);
530        jButton22.setMaximumSize(new java.awt.Dimension(90, 90));
531        jButton22.setMinimumSize(new java.awt.Dimension(90, 80));
532        jButton22.setName("jButton22"); // NOI18N
533        jButton22.setPreferredSize(new java.awt.Dimension(80, 70));
534        jButton22.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
535        jButton22.addActionListener(new java.awt.event.ActionListener() {
536            public void actionPerformed(java.awt.event.ActionEvent evt) {
537                jButton22ActionPerformed(evt);
538            }
539        });
540        buttons.add(jButton22);
541
542        jButton23.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
543        jButton23.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/advancedsettings.png"))); // NOI18N
544        jButton23.setText(bundle.getString("MPControlPanel.jButton23.text")); // NOI18N
545        jButton23.setToolTipText(bundle.getString("MPControlPanel.jButton23.toolTipText")); // NOI18N
546        jButton23.setBorder(javax.swing.BorderFactory.createEtchedBorder());
547        jButton23.setContentAreaFilled(false);
548        jButton23.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
549        jButton23.setIconTextGap(1);
550        jButton23.setMaximumSize(new java.awt.Dimension(90, 90));
551        jButton23.setMinimumSize(new java.awt.Dimension(90, 80));
552        jButton23.setName("jButton23"); // NOI18N
553        jButton23.setPreferredSize(new java.awt.Dimension(80, 70));
554        jButton23.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
555        jButton23.addActionListener(new java.awt.event.ActionListener() {
556            public void actionPerformed(java.awt.event.ActionEvent evt) {
557                jButton23ActionPerformed(evt);
558            }
559        });
560        buttons.add(jButton23);
561
562        jButton24.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
563        jButton24.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/konsole.png"))); // NOI18N
564        jButton24.setText(bundle.getString("MPControlPanel.jButton24.text")); // NOI18N
565        jButton24.setToolTipText(bundle.getString("MPControlPanel.jButton24.toolTipText")); // NOI18N
566        jButton24.setBorder(javax.swing.BorderFactory.createEtchedBorder());
567        jButton24.setContentAreaFilled(false);
568        jButton24.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
569        jButton24.setIconTextGap(1);
570        jButton24.setMaximumSize(new java.awt.Dimension(90, 90));
571        jButton24.setMinimumSize(new java.awt.Dimension(90, 80));
572        jButton24.setName("jButton24"); // NOI18N
573        jButton24.setPreferredSize(new java.awt.Dimension(80, 70));
574        jButton24.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
575        jButton24.addActionListener(new java.awt.event.ActionListener() {
576            public void actionPerformed(java.awt.event.ActionEvent evt) {
577                jButton24ActionPerformed(evt);
578            }
579        });
580        buttons.add(jButton24);
581
582        jButton25.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
583        jButton25.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/advancedsettings.png"))); // NOI18N
584        jButton25.setText(bundle.getString("MPControlPanel.jButton25.text")); // NOI18N
585        jButton25.setToolTipText(bundle.getString("MPControlPanel.jButton25.toolTipText")); // NOI18N
586        jButton25.setBorder(javax.swing.BorderFactory.createEtchedBorder());
587        jButton25.setContentAreaFilled(false);
588        jButton25.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
589        jButton25.setIconTextGap(1);
590        jButton25.setMaximumSize(new java.awt.Dimension(90, 90));
591        jButton25.setMinimumSize(new java.awt.Dimension(90, 80));
592        jButton25.setName("jButton25"); // NOI18N
593        jButton25.setPreferredSize(new java.awt.Dimension(80, 70));
594        jButton25.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
595        jButton25.addActionListener(new java.awt.event.ActionListener() {
596            public void actionPerformed(java.awt.event.ActionEvent evt) {
597                jButton25ActionPerformed(evt);
598            }
599        });
600        buttons.add(jButton25);
601
602        jButton26.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
603        jButton26.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/48/konsole.png"))); // NOI18N
604        jButton26.setText(bundle.getString("MPControlPanel.jButton26.text")); // NOI18N
605        jButton26.setToolTipText(bundle.getString("MPControlPanel.jButton26.toolTipText")); // NOI18N
606        jButton26.setBorder(javax.swing.BorderFactory.createEtchedBorder());
607        jButton26.setContentAreaFilled(false);
608        jButton26.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
609        jButton26.setIconTextGap(1);
610        jButton26.setMaximumSize(new java.awt.Dimension(90, 90));
611        jButton26.setMinimumSize(new java.awt.Dimension(90, 80));
612        jButton26.setName(bundle.getString("MPControlPanel.jButton26.name")); // NOI18N
613        jButton26.setPreferredSize(new java.awt.Dimension(80, 70));
614        jButton26.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
615        jButton26.addActionListener(new java.awt.event.ActionListener() {
616            public void actionPerformed(java.awt.event.ActionEvent evt) {
617                jButton26ActionPerformed(evt);
618            }
619        });
620        buttons.add(jButton26);
621
622        jScrollPane1.setViewportView(buttons);
623
624        add(jScrollPane1, java.awt.BorderLayout.NORTH);
625
626        details.setBackground(new java.awt.Color(255, 255, 255));
627        details.setBorder(javax.swing.BorderFactory.createTitledBorder(bundle.getString("MPControlPanel.details.border.title"))); // NOI18N
628        details.setMinimumSize(new java.awt.Dimension(300, 400));
629        details.setName("details"); // NOI18N
630        details.setPreferredSize(new java.awt.Dimension(400, 400));
631        details.setLayout(new java.awt.BorderLayout());
632
633        scroller.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
634        scroller.setName("scroller"); // NOI18N
635        details.add(scroller, java.awt.BorderLayout.CENTER);
636
637        jToolBar1.setFloatable(false);
638        jToolBar1.setRollover(true);
639        jToolBar1.setName("jToolBar1"); // NOI18N
640
641        jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/32/adept_keep.png"))); // NOI18N
642        jButton4.setText(bundle.getString("MPControlPanel.jButton4.text")); // NOI18N
643        jButton4.setToolTipText(bundle.getString("MPControlPanel.jButton4.toolTipText")); // NOI18N
644        jButton4.setFocusable(false);
645        jButton4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
646        jButton4.setName("jButton4"); // NOI18N
647        jButton4.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
648        jButton4.addActionListener(new java.awt.event.ActionListener() {
649            public void actionPerformed(java.awt.event.ActionEvent evt) {
650                jButton4ActionPerformed(evt);
651            }
652        });
653        jToolBar1.add(jButton4);
654
655        details.add(jToolBar1, java.awt.BorderLayout.NORTH);
656
657        add(details, java.awt.BorderLayout.CENTER);
658
659        actions.setName("actions"); // NOI18N
660        actions.setLayout(new java.awt.BorderLayout());
661        add(actions, java.awt.BorderLayout.SOUTH);
662    }// </editor-fold>//GEN-END:initComponents
663
664    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
665
666        openDetails(new ControlPanel_Local());
667    }//GEN-LAST:event_jButton1ActionPerformed
668
669    private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed
670
671        if (Popup.Y_N_dialog(Messages.REALLY_WIPE)) {
672            try {
673                FileDirectoryHandler.deleteDirectoryContent(new File(FileDirectoryHandler.getTempDir2()));
674            } catch (IOException ex) {
675                Popup.error(ex);
676            }
677        }
678    }//GEN-LAST:event_jButton8ActionPerformed
679
680    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
681        openDetails(new ControlPanel_Locale());
682    }//GEN-LAST:event_jButton2ActionPerformed
683
684    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
685        mpv5.YabsViewProxy.instance().setWaiting(true);
686        new MPBabelFish();
687        mpv5.YabsViewProxy.instance().setWaiting(false);
688
689    }//GEN-LAST:event_jButton5ActionPerformed
690
691    private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
692
693        openDetails(new ControlPanel_Fonts());
694    }//GEN-LAST:event_jButton9ActionPerformed
695
696    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
697
698        openDetails(new ControlPanel_Users());
699    }//GEN-LAST:event_jButton6ActionPerformed
700
701    private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
702        openDetails(new ControlPanel_Groups());
703
704    }//GEN-LAST:event_jButton10ActionPerformed
705
706    private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed
707        openDetails(new ControlPanel_Plugins());
708    }//GEN-LAST:event_jButton11ActionPerformed
709
710    private void jButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton12ActionPerformed
711        openDetails(new ControlPanel_Accounts());
712    }//GEN-LAST:event_jButton12ActionPerformed
713
714    private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton13ActionPerformed
715        openDetails(new ControlPanel_Formats(mpv5.db.objects.User.getCurrentUser()));
716    }//GEN-LAST:event_jButton13ActionPerformed
717
718    private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton14ActionPerformed
719        openDetails(new ControlPanel_Konsole());
720    }//GEN-LAST:event_jButton14ActionPerformed
721
722    private void jButton15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton15ActionPerformed
723        openDetails(new ControlPanel_AdvancedGlobalProperties());
724    }//GEN-LAST:event_jButton15ActionPerformed
725
726    private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton16ActionPerformed
727        openDetails(new ControlPanel_Userproperties());
728    }//GEN-LAST:event_jButton16ActionPerformed
729
730    private void jButton17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton17ActionPerformed
731        openDetails(new ControlPanel_ProductGroups());
732    }//GEN-LAST:event_jButton17ActionPerformed
733
734    private void jButton19ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton19ActionPerformed
735        openDetails(new ControlPanel_WebShopManager());
736    }//GEN-LAST:event_jButton19ActionPerformed
737
738    private void jButton20ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton20ActionPerformed
739        openDetails(new ControlPanel_Templates());
740    }//GEN-LAST:event_jButton20ActionPerformed
741
742    private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
743        openDetails(new ControlPanel_External());
744    }//GEN-LAST:event_jButton7ActionPerformed
745
746    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
747        removeAll();
748        add(jScrollPane1, BorderLayout.CENTER);
749        validate();
750        repaint();
751    }//GEN-LAST:event_jButton4ActionPerformed
752
753    private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton21ActionPerformed
754        openDetails(new ControlPanel_Taxes());
755    }//GEN-LAST:event_jButton21ActionPerformed
756
757    private void jButton18ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton18ActionPerformed
758        openDetails(new ControlPanel_Reminder());
759    }//GEN-LAST:event_jButton18ActionPerformed
760
761    private void jButton22ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton22ActionPerformed
762        openDetails(new ControlPanel_Schedule());
763    }//GEN-LAST:event_jButton22ActionPerformed
764
765    private void jButton23ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton23ActionPerformed
766        openDetails(new ControlPanel_Company());
767    }//GEN-LAST:event_jButton23ActionPerformed
768
769    private void jButton24ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton24ActionPerformed
770        openDetails(new ControlPanel_ValueProps());
771    }//GEN-LAST:event_jButton24ActionPerformed
772
773    private void jButton25ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton25ActionPerformed
774        openDetails(new ControlPanel_Massprint());
775    }//GEN-LAST:event_jButton25ActionPerformed
776
777    private void jButton26ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton26ActionPerformed
778        Log.setLogLevel(Log.LOGLEVEL_DEBUG);
779        Console console = new Console();
780        console.setVariable("yabs", YabsViewProxy.instance());
781        console.setVariable("db", QueryHandler.instanceOf());//
782        console.setVariable("QueryHandler", QueryHandler.instanceOf());//dbo.getObjects(Context.getContacts())
783        console.setVariable("dbo", DatabaseObject.getObject(Context.getItem()));
784        console.setVariable("DatabaseObject", DatabaseObject.getObject(Context.getItem()));
785        console.setVariable("Context", Context.getItem());
786        console.setVariable("User", User.getCurrentUser());
787        console.setFrame(YabsViewProxy.instance().getIdentifierFrame());
788        console.run();
789    }//GEN-LAST:event_jButton26ActionPerformed
790    // Variables declaration - do not modify//GEN-BEGIN:variables
791    private javax.swing.JPanel actions;
792    private javax.swing.JPanel buttons;
793    private javax.swing.JPanel details;
794    private javax.swing.JButton jButton1;
795    private javax.swing.JButton jButton10;
796    private javax.swing.JButton jButton11;
797    private javax.swing.JButton jButton12;
798    private javax.swing.JButton jButton13;
799    private javax.swing.JButton jButton14;
800    private javax.swing.JButton jButton15;
801    private javax.swing.JButton jButton16;
802    private javax.swing.JButton jButton17;
803    private javax.swing.JButton jButton18;
804    private javax.swing.JButton jButton19;
805    private javax.swing.JButton jButton2;
806    private javax.swing.JButton jButton20;
807    private javax.swing.JButton jButton21;
808    private javax.swing.JButton jButton22;
809    private javax.swing.JButton jButton23;
810    private javax.swing.JButton jButton24;
811    private javax.swing.JButton jButton25;
812    private javax.swing.JButton jButton26;
813    private javax.swing.JButton jButton4;
814    private javax.swing.JButton jButton5;
815    private javax.swing.JButton jButton6;
816    private javax.swing.JButton jButton7;
817    private javax.swing.JButton jButton8;
818    private javax.swing.JButton jButton9;
819    private javax.swing.JScrollPane jScrollPane1;
820    private javax.swing.JToolBar jToolBar1;
821    private javax.swing.JScrollPane scroller;
822    // End of variables declaration//GEN-END:variables
823
824    /**
825     * This method adds a button to the Properties panel, with given Icon and
826     * Text. A click on the generated button creates a new instance of the given
827     * class.
828     *
829     * @param icon
830     * @param text
831     * @param clazz
832     */
833    public void addShortcut(Icon icon, String text, final Class clazz) {
834        JButton button = new JButton(text, icon);
835        button.setToolTipText(text); // NOI18N
836        button.setFont(new java.awt.Font(LocalSettings.getProperty("defaultfont"), 0, 10)); // NOI18N
837        button.setBorder(javax.swing.BorderFactory.createEtchedBorder());
838        button.setContentAreaFilled(false);
839        button.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
840        button.setMaximumSize(new java.awt.Dimension(90, 90));
841        button.setMinimumSize(new java.awt.Dimension(90, 80));
842        button.setPreferredSize(new java.awt.Dimension(90, 80));
843        button.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
844
845        button.addActionListener(new java.awt.event.ActionListener() {
846
847            @Override
848            public void actionPerformed(java.awt.event.ActionEvent evt) {
849                try {
850                    clazz.newInstance();
851                } catch (InstantiationException ex) {
852                    Log.Debug(this, ex);
853                } catch (IllegalAccessException ex) {
854                    Log.Debug(this, ex);
855                }
856            }
857        });
858
859        buttons.add(button);
860    }
861
862    /**
863     * This method adds a button to the Properties panel, with given Icon and
864     * Text. A click on the generated button places the JPanel on the details
865     * pane. // * <b>Bring your own scrollpane!<b>
866     *
867     * @param icon
868     * @param text
869     * @param panel
870     */
871    public void addShortcut(Icon icon, String text, final ControlApplet panel) {
872        JButton button = new JButton(text, icon);
873        button.setToolTipText(text); // NOI18N
874        button.setFont(new java.awt.Font(LocalSettings.getProperty("defaultfont"), 0, 10)); // NOI18N
875        button.setBorder(javax.swing.BorderFactory.createEtchedBorder());
876        button.setContentAreaFilled(false);
877        button.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
878        button.setMaximumSize(new java.awt.Dimension(90, 90));
879        button.setMinimumSize(new java.awt.Dimension(90, 80));
880        button.setPreferredSize(new java.awt.Dimension(90, 80));
881        button.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
882        button.addActionListener(new java.awt.event.ActionListener() {
883
884            @Override
885            public void actionPerformed(java.awt.event.ActionEvent evt) {
886                try {
887                    openDetails(panel);
888                } catch (Exception ex) {
889                    Log.Debug(this, ex);
890                }
891            }
892        });
893
894        buttons.add(button);
895        validate();
896        repaint();
897    }
898
899    /**
900     * Show a Control Panel Applet
901     *
902     * @param panel
903     */
904    public synchronized void openDetails(ControlApplet panel) {
905        mpv5.YabsViewProxy.instance().setWaiting(true);
906
907        try {
908            actions.removeAll();
909            actions.add(((JPanel) panel.getAndRemoveActionPanel()));
910            actions.validate();
911            scroller.add((Component) panel);
912            scroller.setViewportView((Component) panel);
913
914            removeAll();
915            add(details, BorderLayout.CENTER);
916            add(actions, BorderLayout.SOUTH);
917            validate();
918            repaint();
919
920            ((Component) panel).validate();
921
922        } catch (Exception e) {
923            //No rights for this!
924        } finally {
925            mpv5.YabsViewProxy.instance().setWaiting(false);
926            mpv5.YabsViewProxy.instance().getIdentifierFrame().validate();
927        }
928    }
929}