PageRenderTime 1176ms CodeModel.GetById 225ms app.highlight 806ms RepoModel.GetById 130ms app.codeStats 1ms

/src/mpv5/ui/frames/MPView.java

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Java | 1483 lines | 1147 code | 131 blank | 205 comment | 78 complexity | 1b2ddcf14e1380209a87e3fa685012fe MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1/*
   2 * MPView.java
   3 */
   4package mpv5.ui.frames;
   5
   6import com.l2fprod.common.swing.JOutlookBar;
   7import enoa.connection.NoaConnection;
   8import enoa.connection.NoaConnectionLocalServer;
   9import java.awt.BorderLayout;
  10import java.awt.Color;
  11import java.awt.Component;
  12import java.awt.Cursor;
  13import java.awt.Dimension;
  14import java.awt.Image;
  15import java.awt.Toolkit;
  16import java.awt.event.ActionEvent;
  17import java.awt.event.ActionListener;
  18import java.awt.event.ComponentAdapter;
  19import java.awt.event.ComponentEvent;
  20import java.awt.event.MouseAdapter;
  21import java.awt.event.MouseEvent;
  22import java.awt.event.MouseListener;
  23import java.io.File;
  24import java.net.URI;
  25import java.util.ArrayList;
  26import java.util.LinkedList;
  27import java.util.List;
  28import java.util.logging.Level;
  29import java.util.logging.Logger;
  30import javax.swing.ImageIcon;
  31import javax.swing.JButton;
  32import javax.swing.JComboBox;
  33import javax.swing.JComponent;
  34import javax.swing.JFrame;
  35import javax.swing.JLabel;
  36import javax.swing.JMenu;
  37import javax.swing.JMenuItem;
  38import javax.swing.JPopupMenu;
  39import javax.swing.JProgressBar;
  40import javax.swing.JScrollPane;
  41import javax.swing.JTable;
  42import javax.swing.JViewport;
  43import javax.swing.SwingUtilities;
  44import javax.swing.UIManager;
  45import mpv5.Main;
  46import mpv5.YabsView;
  47import mpv5.YabsViewProxy;
  48import mpv5.YabsViewProxy.FlowProvider;
  49import mpv5.bugtracker.ExceptionHandler;
  50import mpv5.bugtracker.SubmitForm;
  51import mpv5.data.MPList;
  52import mpv5.db.common.Context;
  53import mpv5.db.common.DatabaseObject;
  54import mpv5.db.common.NodataFoundException;
  55import mpv5.db.common.QueryHandler;
  56import mpv5.db.migration.MigrationWB;
  57import mpv5.db.objects.Contact;
  58import mpv5.db.objects.Favourite;
  59import mpv5.db.objects.Item;
  60import mpv5.db.objects.Product;
  61import mpv5.db.objects.User;
  62import mpv5.db.objects.ValueProperty;
  63import mpv5.globals.Constants;
  64import mpv5.globals.LocalSettings;
  65import mpv5.globals.Messages;
  66import mpv5.handler.Scheduler;
  67import mpv5.logging.Log;
  68import mpv5.pluginhandling.YabsPluginLoader;
  69import mpv5.server.MPServer;
  70import mpv5.ui.dialogs.About;
  71import mpv5.ui.dialogs.BigPopup;
  72import mpv5.ui.dialogs.DialogForFile;
  73import mpv5.ui.dialogs.ListView;
  74import mpv5.ui.dialogs.Popup;
  75import mpv5.ui.dialogs.Search;
  76import mpv5.ui.dialogs.Search2;
  77import mpv5.ui.dialogs.Wizard;
  78import mpv5.ui.dialogs.subcomponents.ControlPanel_MailTemplates;
  79import mpv5.ui.dialogs.subcomponents.wizard_CSVImport2_1;
  80import mpv5.ui.dialogs.subcomponents.wizard_MP45_Import;
  81import mpv5.ui.dialogs.subcomponents.wizard_XMLImport_1;
  82import mpv5.ui.dialogs.subcomponents.wizard_XMLImport_2;
  83import mpv5.ui.dialogs.subcomponents.wizard_Yabs1_Import;
  84import mpv5.ui.menus.ClipboardMenuItem;
  85import mpv5.ui.menus.FavouritesMenuItem;
  86import mpv5.ui.misc.CloseableTabbedPane;
  87import mpv5.ui.misc.FadeOnChangeLabel;
  88import mpv5.ui.misc.MPTable;
  89import mpv5.ui.misc.Position;
  90import mpv5.ui.panels.ActivityConfirmationPanel;
  91import mpv5.ui.panels.ChangeNotApprovedException;
  92import mpv5.ui.panels.ContactsList;
  93import mpv5.ui.panels.ConversationPanel;
  94import mpv5.ui.panels.DataPanel;
  95import mpv5.ui.panels.ExpensePanel;
  96import mpv5.ui.panels.GeneralListPanel;
  97import mpv5.ui.panels.HistoryPanel;
  98import mpv5.ui.panels.ItemPanel;
  99import mpv5.ui.panels.JournalPanel;
 100import mpv5.ui.panels.MPControlPanel;
 101import mpv5.ui.panels.MassPrintPanel;
 102import mpv5.ui.panels.ProductList;
 103import mpv5.ui.panels.ProductListsPanel;
 104import mpv5.ui.panels.ProductOrderPanel;
 105import mpv5.ui.panels.ProductPanel;
 106import mpv5.ui.panels.ProductsOverview;
 107import mpv5.ui.panels.QueryPanel;
 108import mpv5.ui.panels.RevenuePanel;
 109import mpv5.ui.panels.StartPage;
 110import mpv5.ui.panels.TrashPanel;
 111import mpv5.usermanagement.MPSecurityManager;
 112import mpv5.utils.export.Export;
 113import mpv5.utils.export.VCFParser;
 114import mpv5.utils.files.TextDatFile;
 115import mpv5.utils.images.MPIcon;
 116import mpv5.utils.renderer.ComboBoxRendererForTooltip;
 117import mpv5.utils.xml.XMLWriter;
 118import net.sf.vcard4j.java.VCard;
 119import org.jdesktop.application.Application;
 120import org.jdesktop.application.FrameView;
 121import org.jdesktop.application.SingleFrameApplication;
 122
 123/**
 124 * The application's main frame.
 125 */
 126public class MPView extends FrameView implements YabsView, FlowProvider {
 127
 128    public static MPView identifierView;
 129    private static Dimension initialSize = new Dimension(1100, 900);
 130    public static JFrame identifierFrame;
 131    private static CloseableTabbedPane tabPane;
 132    private static JLabel messagelabel = new JLabel();
 133    private static JComboBox history = new JComboBox();
 134    private static JProgressBar progressbar = new JProgressBar();
 135    private static JMenu favMenu;
 136    private static String predefTitle;
 137    private static DialogForFile filedialog;
 138    public static SingleFrameApplication identifierApplication;
 139    private static boolean navBarAnimated = true;
 140    private static boolean tabPaneScrolled = false;
 141    private static JLabel staterrorlabel = new JLabel();
 142    private static MPList currentList = new MPList();
 143    private static ListView clistview = new ListView(currentList);
 144    private static JFrame clipboard = null;
 145    private static boolean loaded = false;
 146
 147    /**
 148     * Display a message at the bottom of the MP frame
 149     *
 150     * @param message
 151     */
 152    public void addMessage(Object message, Color color) {
 153        addMessage(String.valueOf(message));
 154    }
 155
 156    /**
 157     * Display a message at the bottom of the MP frame
 158     *
 159     * @param message
 160     */
 161    public void addMessage(Object message) {
 162        MPView.addMessage(String.valueOf(message), Color.GREEN);
 163    }
 164
 165    /**
 166     * Display a message at the bottom of the MP frame
 167     *
 168     * @param message
 169     */
 170    public static synchronized void addMessage(final String message, final Color color) {
 171        if (loaded && messagelabel !=null) {//dont do anything if main frame is not constructed
 172            Runnable runnable = new Runnable() {
 173                public void run() {
 174                    if (messagelabel instanceof FadeOnChangeLabel) {
 175                        ((FadeOnChangeLabel) getMessagelabel()).setFadeColor(color);
 176                    }
 177                    messagelabel.setText(message);
 178                    getHistory().addItem(message);
 179                    getHistory().setSelectedItem(message);
 180                    identifierFrame.validate();
 181                }
 182            };
 183            SwingUtilities.invokeLater(runnable);
 184        }
 185    }
 186
 187    /**
 188     * Returns the currently selected tab on the main tab pane
 189     *
 190     * @return
 191     */
 192    public static Object getShowingTab() {
 193        return getTabPane().getSelectedComponent();
 194    }
 195
 196    /**
 197     * Change the navigation bar behavior
 198     *
 199     * @param animated
 200     */
 201    public static void setNavBarAnimated(boolean animated) {
 202        navBarAnimated = animated;
 203    }
 204
 205    /**
 206     * Change the main tabPane behavior
 207     *
 208     * @param scroll
 209     */
 210    public static void setTabPaneScrolled(boolean scroll) {
 211        tabPaneScrolled = scroll;
 212    }
 213
 214    /**
 215     * Shows a file save dialog with the selcted file f. If the file's parent
 216     * directory is not the current directory, changes the current directory to
 217     * be the file's parent directory.
 218     *
 219     * @param f
 220     */
 221    public void showFilesaveDialogFor(File f) {
 222        getFiledialog().setSelectedFile(new File(f.getName()));
 223        getFiledialog().saveFile(f);
 224    }
 225
 226    /**
 227     * Initialize and show the secondary JFrame. This method is intended for
 228     * showing "secondary" windows, like message dialogs, about boxes, and so
 229     * on.
 230     *
 231     * Unlike the mainFrame, dismissing a secondary window will not exit the
 232     * application. Session state is only automatically saved if the specified
 233     * JFrame has a name, and then only for component descendants that are
 234     * named. Throws an IllegalArgumentException if c is null
 235     *
 236     * @param c
 237     */
 238    public static void show(JFrame c) {
 239        Main.getApplication().show(c);
 240    }
 241    /**
 242     * The handler for all plugins
 243     */
 244    private static YabsPluginLoader pluginLoader;
 245
 246    /**
 247     * Let the view notify the user about an unexpected error
 248     */
 249    public static void showError() {
 250        if (Main.INSTANTIATED) {
 251            try {
 252                getStaterrorlabel().setIcon(new javax.swing.ImageIcon(MPView.class.getResource("/mpv5/resources/images/16/remove.png"))); // NOI18N
 253            } catch (Exception e) {
 254            }
 255        }
 256    }
 257
 258    /**
 259     * @return the tabPane
 260     */
 261    public static CloseableTabbedPane getTabPane() {
 262        return tabPane;
 263    }
 264
 265    /**
 266     * @return the messagelabel
 267     */
 268    public static JLabel getMessagelabel() {
 269        return messagelabel;
 270    }
 271
 272    /**
 273     * @return the progressbar
 274     */
 275    public JProgressBar getProgressbar() {
 276        return progressbar;
 277    }
 278
 279    /**
 280     * @return the tabpanePanel
 281     */
 282    public static javax.swing.JPanel getTabpanePanel() {
 283        return tabpanePanel;
 284    }
 285
 286    /**
 287     * @return the identifierView
 288     */
 289    public MPView getIdentifierView() {
 290        return identifierView;
 291    }
 292
 293    /**
 294     * @return the initialSize
 295     */
 296    public static Dimension getInitialSize() {
 297        return initialSize;
 298    }
 299
 300    /**
 301     * @return the identifierFrame
 302     */
 303    public JFrame getIdentifierFrame() {
 304        return identifierFrame;
 305    }
 306
 307    /**
 308     * @return the history
 309     */
 310    public static JComboBox getHistory() {
 311        return history;
 312    }
 313
 314    /**
 315     * @return the favMenu
 316     */
 317    public static JMenu getFavMenu() {
 318        return favMenu;
 319    }
 320
 321    /**
 322     * @return the predefTitle
 323     */
 324    public static String getPredefTitle() {
 325        return predefTitle;
 326    }
 327
 328    /**
 329     * @return the filedialog
 330     */
 331    public DialogForFile getFiledialog() {
 332        return filedialog;
 333    }
 334
 335    /**
 336     * @return the identifierApplication
 337     */
 338    public Application getIdentifierApplication() {
 339        return identifierApplication;
 340    }
 341
 342    /**
 343     * @return the navBarAnimated
 344     */
 345    public static boolean isNavBarAnimated() {
 346        return navBarAnimated;
 347    }
 348
 349    /**
 350     * @return the tabPaneScrolled
 351     */
 352    public static boolean isTabPaneScrolled() {
 353        return tabPaneScrolled;
 354    }
 355
 356    /**
 357     * @return the staterrorlabel
 358     */
 359    public static JLabel getStaterrorlabel() {
 360        return staterrorlabel;
 361    }
 362
 363    /**
 364     * @return the currentList
 365     */
 366    public static MPList getCurrentList() {
 367        return currentList;
 368    }
 369
 370    /**
 371     * @return the pluginLoader
 372     */
 373    public YabsPluginLoader getPluginLoader() {
 374        return pluginLoader;
 375    }
 376
 377    /**
 378     * @param c
 379     * @return the clisttab
 380     */
 381    public static synchronized ContactsList getClisttab(Context c) {
 382        if (c.equals(Context.getCustomer())) {
 383            if (clisttabc == null) {
 384                clisttabc = new ContactsList(c);
 385            }
 386            return clisttabc;
 387        } else if (c.equals(Context.getSupplier())) {
 388            if (clisttabs == null) {
 389                clisttabs = new ContactsList(c);
 390            }
 391            return clisttabs;
 392        } else if (c.equals(Context.getManufacturer())) {
 393            if (clisttabm == null) {
 394                clisttabm = new ContactsList(c);
 395            }
 396            return clisttabm;
 397        } else {
 398            return new ContactsList();
 399        }
 400    }
 401
 402    /**
 403     * @return the plisttab
 404     */
 405    public static ProductList getPlisttab() {
 406        return plisttab;
 407    }
 408
 409    public static void setPredefTitle(String string) {
 410        predefTitle = string;
 411    }
 412
 413    /**
 414     * Sets the max value for the progressbar
 415     *
 416     * @param max
 417     */
 418    public synchronized void setProgressMaximumValue(int max) {
 419        getProgressbar().setMaximum(max);
 420    }
 421
 422    /**
 423     * Sets the current value for the progressbar
 424     *
 425     * @param val
 426     */
 427    public synchronized void setProgressValue(int val) {
 428        getProgressbar().setValue(val);
 429    }
 430
 431    /**
 432     * Reset the progress bar
 433     */
 434    public synchronized void setProgressReset() {
 435        getProgressbar().setValue(0);
 436        getProgressbar().setIndeterminate(false);
 437    }
 438
 439    /**
 440     * Sets the indeterminate property of the progress bar.
 441     *
 442     * @param b
 443     */
 444    public synchronized void setProgressRunning(boolean b) {
 445        getProgressbar().setIndeterminate(b);
 446    }
 447
 448    /**
 449     *
 450     * @return The currently logged in user
 451     * @deprecated Use User.getCurrentUser instead
 452     */
 453    @Deprecated
 454    public static User getUser() {
 455        return mpv5.db.objects.User.getCurrentUser();
 456    }
 457
 458    /**
 459     * Sets the cursor to waiting state if true
 460     *
 461     * @param truee
 462     */
 463    public void setWaiting(boolean truee) {
 464        if (Main.INSTANTIATED && getIdentifierFrame() != null) {
 465            if (truee) {
 466                getIdentifierFrame().setCursor(new Cursor(Cursor.WAIT_CURSOR));
 467            } else {
 468                getIdentifierFrame().setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
 469            }
 470        }
 471    }
 472
 473    /**
 474     * Returns the curently selected tab or null if this is not a
 475     * {@link DataPanel}
 476     *
 477     * @return
 478     */
 479    public DataPanel getCurrentTab() {
 480        if (getTabPane().getSelectedComponent() instanceof DataPanel) {
 481            return (DataPanel) getTabPane().getSelectedComponent();
 482        } else if (getTabPane().getSelectedComponent() instanceof JScrollPane) {
 483            try {
 484                return (DataPanel) ((JScrollPane) getTabPane().getSelectedComponent()).getComponent(0);
 485            } catch (ClassCastException e) {
 486                try {
 487                    return (DataPanel) ((JViewport) ((JScrollPane) getTabPane().getSelectedComponent()).getComponent(0)).getComponent(0);
 488                } catch (Exception ek) {
 489                    return null;
 490                }
 491            }
 492        } else {
 493            return null;
 494        }
 495    }
 496
 497    /**
 498     * Returns the tab at the specified position, or NULL if the tab is not
 499     * existing OR not a {@link DataPanel}
 500     *
 501     * @param position
 502     * @return
 503     */
 504    public DataPanel getTabAt(int position) {
 505        if (getTabPane().getComponent(position) instanceof DataPanel) {
 506            return (DataPanel) getTabPane().getComponent(position);
 507        } else if (getTabPane().getComponent(position) instanceof JScrollPane) {
 508            try {
 509                return (DataPanel) ((JScrollPane) getTabPane().getComponent(position)).getComponent(0);
 510            } catch (ClassCastException e) {
 511                try {
 512                    return (DataPanel) ((JViewport) ((JScrollPane) getTabPane().getComponent(position)).getComponent(0)).getComponent(0);
 513                } catch (Exception et) {
 514                    return null;
 515                }
 516            }
 517        } else {
 518            return null;
 519        }
 520    }
 521
 522    public final void reloadFavorites() {
 523        Favourite[] favs = Favourite.getUserFavourites();
 524        for (int i = 0; i < favs.length; i++) {
 525            Favourite fav = favs[i];
 526            try {
 527                getFavMenu().add(new FavouritesMenuItem(Favourite.getObject(fav.getFavContext(), fav.__getItemsids())));
 528            } catch (NodataFoundException ex) {
 529//                Log.Debug(this, ex.getMessage());
 530            }
 531        }
 532    }
 533
 534    /**
 535     * Add something to the clipboard menu
 536     *
 537     * @param obj
 538     */
 539    public void addToClipBoard(DatabaseObject obj) {
 540        getClipboardMenu().add(new ClipboardMenuItem(obj));
 541        getCurrentList().add(obj);
 542        setClipBoardVisible(true);
 543    }
 544
 545    public MPView(SingleFrameApplication app) {
 546        super(app);
 547
 548        MPView.identifierApplication = app;
 549
 550        initComponents();
 551
 552        try {
 553            Image icon = Toolkit.getDefaultToolkit().getImage(this.getFrame().getClass().getResource(Constants.ICON));
 554            this.getFrame().setIconImage(icon);
 555            this.getFrame().setTitle(Constants.TITLE);
 556        } catch (Exception e) {
 557            Log.Debug(e);
 558        }
 559
 560        tabPane = new CloseableTabbedPane(this);
 561        identifierFrame = this.getFrame();
 562        Popup.identifier = identifierFrame;
 563        progressbar = this.progressBar;
 564        progressbar.setMinimum(0);
 565        messagelabel = statusMessageLabel;
 566        staterrorlabel = errorlabel;
 567        history = xhistory;
 568        history.setRenderer(new ComboBoxRendererForTooltip());
 569        if (tabPaneScrolled) {
 570            tabpanePanel.add(new JScrollPane(getTabPane()), BorderLayout.CENTER);
 571            jMenuItem25.setIcon(MPIcon.ICON_ENABLED);
 572        } else {
 573            tabpanePanel.add(tabPane, BorderLayout.CENTER);
 574        }
 575        favMenu = favouritesMenu;
 576        reloadFavorites();
 577        identifierView = this;
 578        filedialog = new DialogForFile(DialogForFile.FILES_ONLY);
 579        jMenuItem24.setEnabled(!LocalSettings.getBooleanProperty(LocalSettings.OFFICE_REMOTE));
 580
 581        nav_outlookbar.setAnimated(navBarAnimated);
 582        getFrame().addComponentListener(new ComponentAdapter() {
 583            @Override
 584            public void componentResized(ComponentEvent event) {
 585                setNaviPanelSize();
 586            }
 587        });
 588
 589        if (predefTitle != null) {
 590            identifierFrame.setTitle(identifierFrame.getTitle() + predefTitle);
 591        }
 592
 593        QueryHandler.setWaitCursorFor(identifierFrame);
 594
 595        pluginLoader = new YabsPluginLoader();
 596
 597        addTab(new StartPage(), Messages.WELCOME);
 598        LocalSettings.save();
 599
 600        if (Log.getLoglevel() == Log.LOGLEVEL_DEBUG) {
 601//            jMenuItem45.setEnabled(true);
 602        }
 603
 604        identifierFrame.validate();
 605        loaded = true;
 606    }
 607
 608    /**
 609     * Set the state of the main toolbar
 610     *
 611     * @param enable
 612     */
 613    public void enableToolBar(boolean enable) {
 614        getMainToolbar().setEnabled(enable);
 615    }
 616
 617    private void setNaviPanelSize() {
 618        Runnable runnable = new Runnable() {
 619            public void run() {
 620                getNav_outlookbar().setPreferredSize(new Dimension(getNav_outlookbar().getWidth(), getFrame().getHeight() - 200));
 621                getNav_outlookbar().setMaximumSize(new Dimension(getNav_outlookbar().getWidth(), getFrame().getHeight() - 200));
 622                getNav_outlookbar().setMinimumSize(new Dimension(getNav_outlookbar().getWidth(), getFrame().getHeight() - 200));
 623                getNav_outlookbar().setSize(new Dimension(getNav_outlookbar().getWidth(), getFrame().getHeight() - 200));
 624                getNaviPanel().revalidate();
 625                getNaviPanel().repaint();
 626            }
 627        };
 628
 629        SwingUtilities.invokeLater(runnable);
 630    }
 631
 632    /**
 633     * Add a tab to the main tab pane, automatically determines the needed View
 634     *
 635     * @param item
 636     * @param tabTitle
 637     * @return The added tab
 638     */
 639    public DataPanel addTab(final DatabaseObject item, Object tabTitle) {
 640        setWaiting(true);
 641        boolean found = false;
 642        boolean proceed = true;
 643        if (mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", "avoidmultipleviews")) {
 644            Log.Debug(this, "Looking for an existing view for: " + item);
 645            int count = getTabPane().getTabCount();
 646            for (int i = 0; i < count; i++) {
 647                if (getTabAt(i) != null) {
 648                    DataPanel panel = getTabAt(i);
 649                    if (item.equals(panel.getDataOwner())) {
 650                        getTabPane().setSelectedIndex(i);
 651                        if (tabTitle == null) {
 652                            getTabPane().setTitleAt(i, item.__getCname());
 653                        } else {
 654                            getTabPane().setTitleAt(i, tabTitle + ": " + item.__getCname());
 655                        }
 656                        proceed = false;
 657                        break;
 658                    }
 659                }
 660            }
 661        }
 662
 663        if (proceed) {
 664            if (item.getView() != null && mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", "norecycletabs")) {
 665                if (tabTitle == null) {
 666                    final DataPanel p = ((DataPanel) item.getView());
 667                    addTab((JComponent) p, item.__getCname());
 668                    Runnable runnable = new Runnable() {
 669                        public void run() {
 670                            p.setDataOwner(item, true);
 671                        }
 672                    };
 673                    SwingUtilities.invokeLater(runnable);
 674                } else {
 675                    final DataPanel p = ((DataPanel) item.getView());
 676                    addTab((JComponent) p, tabTitle + ": " + item.__getCname());
 677                    Runnable runnable = new Runnable() {
 678                        public void run() {
 679                            p.setDataOwner(item, true);
 680                        }
 681                    };
 682                    SwingUtilities.invokeLater(runnable);
 683                }
 684                getCurrentTab().setDataOwner(item, true);
 685            } else if (item.getView() != null) {
 686                int count = getTabPane().getTabCount();
 687                for (int i = 0; i < count; i++) {
 688                    if (getTabAt(i) != null) {
 689                        DataPanel panel = getTabAt(i);
 690                        if (!panel.getDataOwner().isExisting()
 691                                && panel.getDataOwner().getContext().equals(item.getContext())
 692                                && panel.getClass() == item.getView().getClass()) {
 693//                        if (!panel.getDataOwner().isExisting() && panel.getDataOwner().getContext().equals(item.getContext())) {
 694                            getTabPane().setSelectedIndex(i);
 695                            panel.setDataOwner(item, true);
 696                            if (tabTitle == null) {
 697                                getTabPane().setTitleAt(i, item.__getCname());
 698                            } else {
 699                                getTabPane().setTitleAt(i, tabTitle + ": " + item.__getCname());
 700                            }
 701                            found = true;
 702                            break;
 703                        }
 704                    }
 705                }
 706                if (!found) {
 707                    try {
 708                        final DataPanel p = (DataPanel) item.getView();
 709
 710                        if (tabTitle == null) {
 711                            addTab((JComponent) p, item.__getCname());
 712                        } else {
 713                            addTab((JComponent) p, tabTitle + ": " + item.__getCname());
 714                        }
 715                        Runnable runnable = new Runnable() {
 716                            public void run() {
 717                                p.setDataOwner(item, true);
 718                            }
 719                        };
 720                        SwingUtilities.invokeLater(runnable);
 721                    } catch (ClassCastException e) {
 722                        if (tabTitle == null) {
 723                            addTab(item.getView(), item.__getCname());
 724                        } else {
 725                            addTab(item.getView(), tabTitle + ": " + item.__getCname());
 726                        }
 727                    }
 728                }
 729            }
 730        }
 731
 732        setPointInFlow(addToFlow(item));
 733        setWaiting(false);
 734        return getCurrentTab();
 735    }
 736
 737    /**
 738     * Add a tab to the main tab pane, automatically determines the needed View
 739     *
 740     * @param item
 741     * @return
 742     */
 743    public DataPanel addTab(DatabaseObject item) {
 744        return addTab(item, null);
 745    }
 746
 747    /**
 748     * Shows a tab or adds it if needed
 749     *
 750     * @param instanceOf
 751     * @param label
 752     */
 753    public void addOrShowTab(JComponent instanceOf, Object label) {
 754        Component[] tabs = getTabPane().getComponents();
 755        boolean found = false;
 756        JScrollPane scroll = null;
 757        for (int i = 0; i < tabs.length; i++) {
 758            JComponent component = (JComponent) tabs[i];
 759            if (component instanceof JScrollPane) {
 760                scroll = (JScrollPane) component;
 761                component = (JComponent) ((JScrollPane) component).getComponent(0);
 762            }
 763            try {
 764                if (component.getComponent(0).equals(instanceOf)) {
 765                    if (scroll == null) {
 766                        getTabPane().setSelectedComponent(instanceOf);
 767                    } else {
 768                        getTabPane().setSelectedComponent(scroll);
 769                    }
 770                    found = true;
 771                }
 772            } catch (Exception e) {
 773                Log.Debug(this, e.getMessage());
 774            }
 775        }
 776
 777        if (!found) {
 778            addTab(instanceOf, label.toString());
 779        }
 780    }
 781
 782    /**
 783     * Add a tab to the main tab pane, with new JScrollPane
 784     *
 785     * @param tab
 786     * @param name
 787     * @return The now selected index
 788     */
 789    public int addTab(JComponent tab, String name) {
 790        JScrollPane spane = new JScrollPane(tab);
 791        getTabPane().addTab(name, spane);
 792        getTabPane().setSelectedComponent(spane);
 793        return getTabPane().getSelectedIndex();
 794    }
 795
 796    private void addTab(JComponent tab, Messages name) {
 797        addTab(tab, name.toString());
 798    }
 799
 800    private void importXML() {
 801        Wizard w = new Wizard(false);
 802        w.addPanel(new wizard_XMLImport_1(w));
 803        w.addPanel(new wizard_XMLImport_2(w));
 804        w.showWiz();
 805    }
 806
 807    /**
 808     * This method is called from within the constructor to initialize the form.
 809     * WARNING: Do NOT modify this code. The content of this method is always
 810     * regenerated by the Form Editor.
 811     */
 812    @SuppressWarnings("unchecked")
 813    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
 814    private void initComponents() {
 815
 816        mainPanel = new javax.swing.JPanel();
 817        naviPanel = new javax.swing.JPanel();
 818        nav_outlookbar = new com.l2fprod.common.swing.JOutlookBar();
 819        parent_nav_contacts = new javax.swing.JPanel();
 820        nav_contacts = new javax.swing.JPanel();
 821        jButton5 = new javax.swing.JButton();
 822        jButton1 = new javax.swing.JButton();
 823        jButton18 = new javax.swing.JButton();
 824        parent_nav_accounting = new javax.swing.JPanel();
 825        nav_accounting = new javax.swing.JPanel();
 826        jButton8 = new javax.swing.JButton();
 827        jButton11 = new javax.swing.JButton();
 828        jButton21 = new javax.swing.JButton();
 829        jButton10 = new javax.swing.JButton();
 830        jButton15 = new javax.swing.JButton();
 831        jButton16 = new javax.swing.JButton();
 832        jButton17 = new javax.swing.JButton();
 833        parent_nav_products = new javax.swing.JPanel();
 834        nav_products = new javax.swing.JPanel();
 835        jButton13 = new javax.swing.JButton();
 836        jButton14 = new javax.swing.JButton();
 837        jButton19 = new javax.swing.JButton();
 838        jButton20 = new javax.swing.JButton();
 839        jButton12 = new javax.swing.JButton();
 840        jButton22 = new javax.swing.JButton();
 841        parent_nav_extras = new javax.swing.JPanel();
 842        nav_extras = new javax.swing.JPanel();
 843        jButton6 = new javax.swing.JButton();
 844        jButton7 = new javax.swing.JButton();
 845        jButton9 = new javax.swing.JButton();
 846        menuBar = new javax.swing.JMenuBar();
 847        javax.swing.JMenu fileMenu = new javax.swing.JMenu();
 848        jMenu14 = new javax.swing.JMenu();
 849        jMenuItem33 = new javax.swing.JMenuItem();
 850        jMenuItem34 = new javax.swing.JMenuItem();
 851        jMenuItem13 = new javax.swing.JMenuItem();
 852        jMenuItem14 = new javax.swing.JMenuItem();
 853        jSeparator3 = new javax.swing.JSeparator();
 854        jMenuItem6 = new javax.swing.JMenuItem();
 855        jMenu4 = new javax.swing.JMenu();
 856        jMenu5 = new javax.swing.JMenu();
 857        jMenuItem8 = new javax.swing.JMenuItem();
 858        jMenuItem22 = new javax.swing.JMenuItem();
 859        jMenu10 = new javax.swing.JMenu();
 860        jMenuItem20 = new javax.swing.JMenuItem();
 861        jMenuItem21 = new javax.swing.JMenuItem();
 862        jMenu11 = new javax.swing.JMenu();
 863        jMenuItem26 = new javax.swing.JMenuItem();
 864        jMenu13 = new javax.swing.JMenu();
 865        jMenuItem32 = new javax.swing.JMenuItem();
 866        jMenuItem41 = new javax.swing.JMenuItem();
 867        jSeparator8 = new javax.swing.JPopupMenu.Separator();
 868        jMenu8 = new javax.swing.JMenu();
 869        jMenuItem11 = new javax.swing.JMenuItem();
 870        jMenuItem38 = new javax.swing.JMenuItem();
 871        jMenuItem40 = new javax.swing.JMenuItem();
 872        jMenu12 = new javax.swing.JMenu();
 873        jMenuItem28 = new javax.swing.JMenuItem();
 874        jMenuItem29 = new javax.swing.JMenuItem();
 875        jSeparator1 = new javax.swing.JSeparator();
 876        jMenu3 = new javax.swing.JMenu();
 877        jMenuItem18 = new javax.swing.JMenuItem();
 878        jMenuItem37 = new javax.swing.JMenuItem();
 879        jMenuItem46 = new javax.swing.JMenuItem();
 880        jSeparator9 = new javax.swing.JPopupMenu.Separator();
 881        jMenuItem12 = new javax.swing.JMenuItem();
 882        editMenu = new javax.swing.JMenu();
 883        jMenuItem15 = new javax.swing.JMenuItem();
 884        jSeparator4 = new javax.swing.JSeparator();
 885        jMenuItem9 = new javax.swing.JMenuItem();
 886        jMenuItem16 = new javax.swing.JMenuItem();
 887        jSeparator5 = new javax.swing.JSeparator();
 888        jMenuItem17 = new javax.swing.JMenuItem();
 889        viewMenu = new javax.swing.JMenu();
 890        jMenu2 = new javax.swing.JMenu();
 891        jMenuItem1 = new javax.swing.JMenuItem();
 892        jMenuItem2 = new javax.swing.JMenuItem();
 893        jMenuItem39 = new javax.swing.JMenuItem();
 894        jMenuItem25 = new javax.swing.JMenuItem();
 895        jMenuItem19 = new javax.swing.JMenuItem();
 896        jMenuItem4 = new javax.swing.JMenuItem();
 897        jMenu15 = new javax.swing.JMenu();
 898        jMenuItem35 = new javax.swing.JMenuItem();
 899        jMenuItem36 = new javax.swing.JMenuItem();
 900        toolsMenu = new javax.swing.JMenu();
 901        jMenuItem3 = new javax.swing.JMenuItem();
 902        jMenuItem23 = new javax.swing.JMenuItem();
 903        jMenuItem31 = new javax.swing.JMenuItem();
 904        jMenuItem24 = new javax.swing.JMenuItem();
 905        jMenuItem47 = new javax.swing.JMenuItem();
 906        jSeparator6 = new javax.swing.JSeparator();
 907        jMenuItem43 = new javax.swing.JMenuItem();
 908        jMenuItem45 = new javax.swing.JMenuItem();
 909        jMenu1 = new javax.swing.JMenu();
 910        jMenuItem42 = new javax.swing.JMenuItem();
 911        jMenuItem44 = new javax.swing.JMenuItem();
 912        favouritesMenu = new javax.swing.JMenu();
 913        clipboardMenu = new javax.swing.JMenu();
 914        jMenu6 = new javax.swing.JMenu();
 915        jMenuItem7 = new javax.swing.JMenuItem();
 916        jMenuItem5 = new javax.swing.JMenuItem();
 917        helpmenu = new javax.swing.JMenu();
 918        jMenuItem10 = new javax.swing.JMenuItem();
 919        jMenuItem27 = new javax.swing.JMenuItem();
 920        jMenuItem30 = new javax.swing.JMenuItem();
 921        statusPanel = new javax.swing.JPanel();
 922        statusMessageLabel =   new FadeOnChangeLabel();
 923        pluginIcons = new javax.swing.JPanel();
 924        separator = new javax.swing.JPanel();
 925        progressBar = new javax.swing.JProgressBar();
 926        separator1 = new javax.swing.JPanel();
 927        xhistory = new javax.swing.JComboBox();
 928        serverlabel = new javax.swing.JPanel();
 929        errorlabel = new javax.swing.JLabel();
 930        officelabel = new javax.swing.JPanel();
 931        mainToolbar = new javax.swing.JToolBar();
 932        closeButton1 = new javax.swing.JButton();
 933        closeButton2 = new javax.swing.JButton();
 934        jSeparator7 = new javax.swing.JToolBar.Separator();
 935        closeButton = new javax.swing.JButton();
 936        lockButton = new javax.swing.JButton();
 937        jSeparator2 = new javax.swing.JToolBar.Separator();
 938        calculatorButton = new javax.swing.JButton();
 939        jButton2 = new javax.swing.JButton();
 940
 941        mainPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
 942        mainPanel.setName("mainPanel"); // NOI18N
 943
 944        tabpanePanel.setBackground(new java.awt.Color(255, 255, 255));
 945        tabpanePanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
 946        tabpanePanel.setName("tabpanePanel"); // NOI18N
 947        tabpanePanel.setLayout(new java.awt.BorderLayout());
 948
 949        naviPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
 950        naviPanel.setAutoscrolls(true);
 951        naviPanel.setFocusCycleRoot(true);
 952        naviPanel.setName("naviPanel"); // NOI18N
 953
 954        nav_outlookbar.setAnimated(false);
 955        nav_outlookbar.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
 956        nav_outlookbar.setName("nav_outlookbar"); // NOI18N
 957
 958        parent_nav_contacts.setBackground(new java.awt.Color(153, 153, 153));
 959        parent_nav_contacts.setName("parent_nav_contacts"); // NOI18N
 960        parent_nav_contacts.setPreferredSize(new java.awt.Dimension(110, 400));
 961        parent_nav_contacts.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0));
 962
 963        nav_contacts.setBackground(new java.awt.Color(153, 153, 153));
 964        nav_contacts.setName("nav_contacts"); // NOI18N
 965        nav_contacts.setLayout(new java.awt.GridLayout(0, 1, 2, 5));
 966
 967        jButton5.setFont(jButton5.getFont().deriveFont(jButton5.getFont().getSize()-1f));
 968        jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/32/agt_family.png"))); // NOI18N
 969        java.util.ResourceBundle bundle = mpv5.i18n.LanguageManager.getBundle(); // NOI18N
 970        jButton5.setText(bundle.getString("MPView.jButton5.text_1")); // NOI18N
 971        jButton5.setToolTipText(bundle.getString("MPView.jButton5.toolTipText_1")); // NOI18N
 972        jButton5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
 973        jButton5.setMaximumSize(new java.awt.Dimension(250, 60));
 974        jButton5.setMinimumSize(new java.awt.Dimension(80, 50));
 975        jButton5.setName("jButton5"); // NOI18N
 976        jButton5.setPreferredSize(new java.awt.Dimension(110, 57));
 977        jButton5.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
 978        jButton5.addActionListener(new java.awt.event.ActionListener() {
 979            public void actionPerformed(java.awt.event.ActionEvent evt) {
 980                jButton5ActionPerformed(evt);
 981            }
 982        });
 983        nav_contacts.add(jButton5);
 984
 985        jButton1.setFont(jButton1.getFont().deriveFont(jButton1.getFont().getSize()-1f));
 986        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/32/edit_group.png"))); // NOI18N
 987        jButton1.setText(bundle.getString("MPView.jButton1.text_1")); // NOI18N
 988        jButton1.setToolTipText(bundle.getString("MPView.jButton1.toolTipText_1")); // NOI18N
 989        jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
 990        jButton1.setMaximumSize(new java.awt.Dimension(250, 60));
 991        jButton1.setMinimumSize(new java.awt.Dimension(80, 50));
 992        jButton1.setName("jButton1"); // NOI18N
 993        jButton1.setPreferredSize(new java.awt.Dimension(110, 57));
 994        jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
 995        jButton1.addActionListener(new java.awt.event.ActionListener() {
 996            public void actionPerformed(java.awt.event.ActionEvent evt) {
 997                jButton1ActionPerformed(evt);
 998            }
 999        });
1000        nav_contacts.add(jButton1);
1001
1002        jButton18.setFont(jButton18.getFont().deriveFont(jButton18.getFont().getSize()-1f));
1003        jButton18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/32/edit_group.png"))); // NOI18N
1004        jButton18.setText(bundle.getString("MPView.jButton18.text_1")); // NOI18N
1005        jButton18.setToolTipText(bundle.getString("MPView.jButton18.toolTipText_1")); // NOI18N
1006        jButton18.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
1007        jButton18.setMaximumSize(new java.awt.Dimension(250, 60));
1008        jButton18.setMinimumSize(new java.awt.Dimension(80, 50));
1009        jButton18.setName("jButton18"); // NOI18N
1010        jButton18.setPreferredSize(new java.awt.Dimension(110, 57));
1011        jButton18.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
1012        jButton18.addActionListener(new java.awt.event.ActionListener() {
1013            public void actionPerformed(java.awt.event.ActionEvent evt) {
1014                jButton18ActionPerformed(evt);
1015            }
1016        });
1017        nav_contacts.add(jButton18);
1018
1019        parent_nav_contacts.add(nav_contacts);
1020
1021        nav_outlookbar.addTab(bundle.getString("MPView.parent_nav_contacts.TabConstraints.tabTitle_1"), parent_nav_contacts); // NOI18N
1022
1023        parent_nav_accounting.setBackground(new java.awt.Color(153, 153, 153));
1024        parent_nav_accounting.setName("parent_nav_accounting"); // NOI18N
1025        parent_nav_accounting.setPreferredSize(new java.awt.Dimension(110, 400));
1026        parent_nav_accounting.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0));
1027
1028        nav_accounting.setBackground(new java.awt.Color(153, 153, 153));
1029        nav_accounting.setName("nav_accounting"); // NOI18N
1030        nav_accounting.setLayout(new java.awt.GridLayout(0, 1, 2, 5));
1031
1032        jButton8.setFont(jButton8.getFont().deriveFont(jButton8.getFont().getSize()-1f));
1033        jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/32/folder_blue.png"))); // NOI18N
1034        jButton8.setText(bundle.getString("MPView.jButton8.text")); // NOI18N
1035        jButton8.setToolTipText(bundle.getString("MPView.jButton8.toolTipText")); // NOI18N
1036        jButton8.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
1037        jButton8.setMaximumSize(new java.awt.Dimension(250, 60));
1038        jButton8.setMinimumSize(new java.awt.Dimension(80, 50));
1039        jButton8.setName("jButton8"); // NOI18N
1040        jButton8.setPreferredSize(new java.awt.Dimension(110, 57));
1041        jButton8.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
1042        jButton8.addActionListener(new java.awt.event.ActionListener() {
1043            public void actionPerformed(java.awt.event.ActionEvent evt) {
1044                jButton8ActionPerformed(evt);
1045            }
1046        });
1047        nav_accounting.add(jButton8);
1048
1049        jButton11.setFont(jButton11.getFont().deriveFont(jButton11.getFont().getSize()-1f));
1050        jButton11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/32/folder_green.png"))); // NOI18N
1051        jButton11.setText(bundle.getString("MPView.jButton11.text")); // NOI18N
1052        jButton11.setToolTipText(bundle.getString("MPView.jButton11.toolTipText")); // NOI18N
1053        jButton11.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
1054        jButton11.setMaximumSize(new java.awt.Dimension(250, 60));
1055        jButton11.setMinimumSize(new java.awt.Dimension(80, 50));
1056        jButton11.setName("jButton11"); // NOI18N
1057        jButton11.setPreferredSize(new java.awt.Dimension(110, 57));
1058        jButton11.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
1059        jButton11.addActionListener(new java.awt.event.ActionListener() {
1060            public void actionPerformed(java.awt.event.ActionEvent evt) {
1061                jButton11ActionPerformed(evt);
1062            }
1063        });
1064        nav_accounting.add(jButton11);
1065
1066        jButton21.setFont(jButton21.getFont().deriveFont(jButton21.getFont().getSize()-1f));
1067        jButton21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/32/folder_documents.png"))); // NOI18N
1068        jButton21.setText(bundle.getString("MPView.jButton21.text")); // NOI18N
1069        jButton21.setToolTipText(bundle.getString("MPView.jButton21.toolTipText")); // NOI18N
1070        jButton21.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
1071        jButton21.setMaximumSize(new java.awt.Dimension(250, 60));
1072        jButton21.setMinimumSize(new java.awt.Dimension(80, 50));
1073        jButton21.setName("jButton21"); // NOI18N
1074        jButton21.setPreferredSize(new java.awt.Dimension(110, 57));
1075        jButton21.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
1076        jButton21.addActionListener(new java.awt.event.ActionListener() {
1077            public void actionPerformed(java.awt.event.ActionEvent evt) {
1078                jButton21ActionPerformed(evt);
1079            }
1080        });
1081        nav_accounting.add(jButton21);
1082
1083        jButton10.setFont(jButton10.getFont().deriveFont(jButton10.getFont().getSize()-1f));
1084        jButton10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/32/folder_grey.png"))); // NOI18N
1085        jButton10.setText(bundle.getString("MPView.jButton10.text")); // NOI18N
1086        jButton10.setToolTipText(bundle.getString("MPView.jButton10.toolTipText")); // NOI18N
1087        jButton10.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
1088        jButton10.setMaximumSize(new java.awt.Dimension(250, 60));
1089        jButton10.setMinimumSize(new java.awt.Dimension(80, 50));
1090        jButton10.setName("jButton10"); // NOI18N
1091        jButton10.setPreferredSize(new java.awt.Dimension(110, 57));
1092        jButton10.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
1093        jButton10.addActionListener(new java.awt.event.ActionListener() {
1094            public void actionPerformed(java.awt.event.ActionEvent evt) {
1095                jButton10ActionPerformed(evt);
1096            }
1097        });
1098        nav_accounting.add(jButton10);
1099
1100        jButton15.setFont(jButton15.getFont().deriveFont(jButton15.getFont().getSize()-1f));
1101        jButton15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/32/folder_red.png"))); // NOI18N
1102        jButton15.setText(bundle.getString("MPView.jButton15.text")); // NOI18N
1103        jButton15.setToolTipText(bundle.getString("MPView.jButton15.toolTipText")); // NOI18N
1104        jButton15.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
1105        jButton15.setMaximumSize(new java.awt.Dimension(250, 60));
1106        jButton15.setMinimumSize(new java.awt.Dimension(80, 50));
1107        jButton15.setName("jButton15"); // NOI18N
1108        jButton15.setPreferredSize(new java.awt.Dimension(110, 57));
1109        jButton15.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
1110        jButton15.addActionListener(new java.awt.event.ActionListener() {
1111            public void actionPerformed(java.awt.event.ActionEvent evt) {
1112                jButton15ActionPerformed(evt);
1113            }
1114        });
1115        nav_accounting.add(jButton15);
1116
1117        jButton16.setFont(jButton16.getFont().deriveFont(jButton16.getFont().getSize()-1f));
1118        jButton16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/32/folder_yellow.png"))); // NOI18N
1119        jButton16.setText(bundle.getString("MPView.jButton16.text")); // NOI18N
1120        jButton16.setToolTipText(bundle.getString("MPView.jButton16.toolTipText")); // NOI18N
1121        jButton16.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
1122        jButton16.setMaximumSize(new java.awt.Dimension(250, 60));
1123        jButton16.setMinimumSize(new java.awt.Dimension(80, 50));
1124        jButton16.setName("jButton16"); // NOI18N
1125        jButton16.setPreferredSize(new java.awt.Dimension(110, 57));
1126        jButton16.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
1127        jButton16.addActionListener(new java.awt.event.ActionListener() {
1128            public void actionPerformed(java.awt.event.ActionEvent evt) {
1129                jButton16ActionPerformed(evt);
1130            }
1131        });
1132        nav_accounting.add(jButton16);
1133
1134        jButton17.setFont(jButton17.getFont().deriveFont(jButton17.getFont().getSize()-1f));
1135        jButton17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/32/reload.png"))); // NOI18N
1136        jButton17.setText(bundle.getString("MPView.jButton17.text")); // NOI18N
1137        jButton17.setToolTipText(bundle.getString("MPView.jButton17.toolTipText")); // NOI18N
1138        jButton17.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
1139        jButton17.setMaximumSize(new java.awt.Dimension(250, 60));
1140        jButton17.setMinimumSize(new java.awt.Dimension(80, 50));
1141        jButton17.setName("jButton17"); // NOI18N
1142        jButton17.setPreferredSize(new java.awt.Dimension(110, 57));
1143        jButton17.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
1144        jButton17.addActionListener(new java.awt.event.ActionListener() {
1145            public void actionPerformed(java.awt.event.ActionEvent evt) {
1146                jButton17ActionPerformed(evt);
1147            }
1148        });
1149        nav_accounting.add(jButton17);
1150
1151        parent_nav_accounting.add(nav_accounting);
1152
1153        nav_outlookbar.addTab(bundle.getString("MPView.parent_nav_accounting.TabConstraints.tabTitle_1"), parent_nav_accounting); // NOI18N
1154
1155        parent_nav_products.setBackground(new java.awt.Color(153, 153, 153));
1156        parent_nav_products.setName("parent_nav_products"); // NOI18N
1157        parent_nav_products.setPreferredSize(new java.awt.Dimension(110, 400));
1158        parent_nav_products.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0));
1159
1160        nav_products.setBackground(new java.awt.Color(153, 153, 153));
1161        nav_products.setName("nav_products"); // NOI18N
1162        nav_products.setLayout(new java.awt.GridLayout(0, 1, 2, 5));
1163
1164        jButton13.setFont(jButton13.getFont().deriveFont(jButton13.getFont().getSize()-1f));
1165        jButton13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/32/tux.png"))); // NOI18N
1166        jButton13.setText(bundle.getString("MPView.jButton13.text")); // NOI18N
1167        jButton13.setToolTipText(bundle.getString("MPView.jButton13.toolTipText")); // NOI18N
1168        jButton13.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
1169        jButton13.setMaximumSize(new java.awt.Dimension(250, 60));
1170        jButton13.setMinimumSize(new java.awt.Dimension(80, 50));
1171        jButton13.setName("jButton13"); // NOI18N
1172        jButton13.setPreferredSize(new java.awt.Dimension(110, 57));
1173        jButton13.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
1174        jButton13.addActionListener(new java.awt.event.ActionListener() {
1175            public void actionPerformed(java.awt.event.ActionEvent evt) {
1176                jButton13ActionPerformed(evt);
1177            }
1178        });
1179        nav_products.add(jButton13);
1180
1181        jButton14.setFont(jButton14.getFont().deriveFont(jButton14.getFont().getSize()-1f));
1182        jButton14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/32/playlist.png"))); // NOI18N
1183        jButton14.setText(bundle.getString("MPView.jButton14.text")); // NOI18N
1184        jButton14.setToolTipText(bundle.getString("MPView.jButton14.toolTipText")); // NOI18N
1185        jButton14.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
1186        jButton14.setMaximumSize(new java.awt.Dimension(250, 60));
1187        jButton14.setMinimumSize(new java.awt.Dimension(80, 50));
1188        jButton14.setName("jButton14"); // NOI18N
1189        jButton14.setPreferredSize(new java.awt.Dimension(110, 57));
1190        jButton14.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
1191        jButton14.addActionListener(new java.awt.event.ActionListener() {
1192            public void actionPerformed(java.awt.event.ActionEvent evt) {
1193                jButton14ActionPerformed(evt);
1194            }
1195        });
1196        nav_products.add(jButton14);
1197
1198        jButton19.setFont(jButton19.getFont().deriveFont(jButton19.getFont().getSize()-1f));
1199        jButton19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/32/kghostview.png"))); // NOI18N
1200        jButton19.setText(bundle.getString("MPView.jButton19.text")); // NOI18N
1201        jButton19.setToolTipText(bundle.getString("MPView.jButton19.toolTipText")); // NOI18N
1202        jButton19.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
1203        jButton19.setMaximumSize(new java.awt.Dimension(250, 60));
1204        jButton19.setMinimumSize(new java.awt.Dimension(80, 50));
1205        jButton19.setName("jButton19"); // NOI18N
1206        jButton19.setPreferredSize(new java.awt.Dimension(110, 57));
1207        jButton19.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
1208        jButton19.addActionListener(new java.awt.event.ActionListener() {
1209            public void actionPerformed(java.awt.event.ActionEvent evt) {
1210                jButto

Large files files are truncated, but you can click here to view the full file