PageRenderTime 276ms CodeModel.GetById 81ms app.highlight 154ms RepoModel.GetById 26ms app.codeStats 1ms

/src/mpv5/ui/panels/ItemPanel.java

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Java | 1374 lines | 1114 code | 161 blank | 99 comment | 64 complexity | 5de5d1af88e7a286e7a26acb65f88f6a MD5 | raw file

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

   1/*
   2This file is part of YaBS.
   3
   4YaBS is free software: you can redistribute it and/or modify
   5it under the terms of the GNU General Public License as published by
   6the Free Software Foundation, either version 3 of the License, or
   7(at your option) any later version.
   8
   9YaBS is distributed in the hope that it will be useful,
  10but WITHOUT ANY WARRANTY; without even the implied warranty of
  11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12GNU General Public License for more details.
  13
  14You should have received a copy of the GNU General Public License
  15along with YaBS.  If not, see <http://www.gnu.org/licenses/>.
  16 */
  17/*
  18 * ContactPanel.java
  19 *
  20 * Created on Nov 20, 2008, 8:17:28 AM
  21 */
  22package mpv5.ui.panels;
  23
  24import enoa.handler.TemplateHandler;
  25import java.awt.BorderLayout;
  26import java.awt.Color;
  27import java.awt.Component;
  28import java.awt.event.ActionEvent;
  29import java.awt.event.ActionListener;
  30import java.awt.event.InputEvent;
  31import java.awt.event.KeyEvent;
  32import java.awt.event.MouseEvent;
  33import java.awt.event.MouseListener;
  34import java.io.File;
  35import java.math.BigDecimal;
  36import java.math.RoundingMode;
  37import java.util.ArrayList;
  38import java.util.Arrays;
  39import java.util.Date;
  40import java.util.Iterator;
  41import java.util.List;
  42import javax.swing.*;
  43import javax.swing.table.TableCellRenderer;
  44import javax.swing.event.TableModelEvent;
  45import javax.swing.event.TableModelListener;
  46import mpv5.YabsViewProxy;
  47import mpv5.db.common.*;
  48import mpv5.db.objects.ActivityList;
  49import mpv5.db.objects.Product;
  50import mpv5.globals.Headers;
  51import mpv5.globals.Messages;
  52import mpv5.db.objects.Contact;
  53import mpv5.db.objects.Favourite;
  54import mpv5.db.objects.Item;
  55import mpv5.db.objects.MailMessage;
  56import mpv5.db.objects.ProductList;
  57import mpv5.db.objects.ProductlistSubItem;
  58import mpv5.db.objects.SubItem;
  59import mpv5.db.objects.Template;
  60import mpv5.logging.Log;
  61import mpv5.ui.dialogs.BigPopup;
  62import mpv5.ui.dialogs.Popup;
  63import mpv5.ui.popups.FileTablePopUp;
  64import mpv5.ui.toolbars.DataPanelTB;
  65import mpv5.db.objects.User;
  66import mpv5.db.objects.ValueProperty;
  67import mpv5.globals.Constants;
  68import mpv5.handler.FormatHandler;
  69import mpv5.ui.beans.MPCBSelectionChangeReceiver;
  70import mpv5.ui.dialogs.DialogForFile;
  71import mpv5.ui.dialogs.ScheduleDayEvent;
  72import mpv5.ui.dialogs.Search2;
  73import mpv5.ui.dialogs.subcomponents.*;
  74import mpv5.ui.misc.MPTable;
  75import mpv5.ui.misc.Position;
  76import mpv5.ui.popups.TablePopUp;
  77import mpv5.utils.arrays.ArrayUtilities;
  78import mpv5.utils.date.DateConverter;
  79import mpv5.utils.export.Export;
  80import mpv5.utils.files.FileDirectoryHandler;
  81import mpv5.utils.jobs.Job;
  82import mpv5.utils.models.MPComboBoxModelItem;
  83import mpv5.utils.models.MPTableModel;
  84import mpv5.utils.numberformat.FormatNumber;
  85import mpv5.utils.renderer.ButtonEditor;
  86import mpv5.utils.renderer.ButtonRenderer;
  87import mpv5.utils.renderer.TableCellRendererForDezimal;
  88import mpv5.utils.renderer.TableTabAction;
  89import mpv5.utils.renderer.TextAreaCellEditor;
  90import mpv5.utils.renderer.TextAreaCellRenderer;
  91import mpv5.utils.tables.TableFormat;
  92import mpv5.ui.misc.TableViewPersistenceHandler;
  93import mpv5.usermanagement.MPSecurityManager;
  94import mpv5.utils.renderer.LazyCellEditor;
  95import mpv5.utils.renderer.LazyCellRenderer;
  96import mpv5.utils.renderer.TableCellRendererForProducts;
  97import mpv5.utils.tables.DynamicTableCalculator;
  98import mpv5.utils.ui.TextFieldUtils;
  99
 100/**
 101 *
 102 *
 103 */
 104public class ItemPanel extends javax.swing.JPanel implements DataPanel, MPCBSelectionChangeReceiver, ExportablePanel {
 105
 106    private static final long serialVersionUID = 1L;
 107    private Item dataOwner;
 108    private DataPanelTB tb;
 109    private SearchPanel sp;
 110    private DynamicTableCalculator itemMultiplier;
 111    private DynamicTableCalculator taxcalculator;
 112    private DynamicTableCalculator netCalculator;
 113    private DynamicTableCalculator disccalculator;
 114    private boolean loading = true;
 115    private java.util.ResourceBundle bundle = mpv5.i18n.LanguageManager.getBundle();
 116
 117    /**
 118     * Creates new form ContactPanel
 119     *
 120     * @param context
 121     * @param type
 122     */
 123    public ItemPanel(Context context, int type) {
 124        initComponents();
 125        jButton1.setEnabled(MPSecurityManager.checkAdminAccess());
 126
 127        inttype_ = type;
 128        sp = new SearchPanel(context, this);
 129        sp.setVisible(true);
 130        tb = new mpv5.ui.toolbars.DataPanelTB(this);
 131        toolbarpane.add(tb, BorderLayout.CENTER);
 132        dataOwner = (Item) DatabaseObject.getObject(context);
 133        if (type >= 0) {
 134            dataOwner.setInttype(type);
 135            this.type.setText(Item.getTypeString(type));
 136        } else {
 137            this.type.setText("");
 138        }
 139
 140        refresh();
 141//        shipping.set_ValueClass(Double.class);
 142
 143//        checkb_pront_oc.setSelected(
 144//            mpv5.db.objects.User.getCurrentUser().getProperties().getProperty(
 145//                "org.openyabs.uiproperty", 
 146//                "orderconfirmationalways"));
 147        addedby.setText(mpv5.db.objects.User.getCurrentUser().getName());
 148        contactname.setSearchEnabled(true);
 149        contactname.setContext(Context.getCustomer());
 150        contactname.getComboBox().addActionListener(new ActionListener() {
 151
 152            @Override
 153            public void actionPerformed(ActionEvent e) {
 154                final MPComboBoxModelItem item = contactname.getSelectedItem();
 155                if (item != null && item.isValid()) {
 156                    Runnable runnable = new Runnable() {
 157
 158                        @Override
 159                        public void run() {
 160                            try {
 161                                Contact dbo = (Contact) DatabaseObject.getObject(Context.getContact(), Integer.valueOf(item.getId()));
 162                                contactcity.setText(dbo.__getCity());
 163                                contactcompany.setText(dbo.__getCompany());
 164                                contactid.setText(dbo.__getCNumber());
 165                            } catch (NodataFoundException ex) {
 166                            }
 167                        }
 168                    };
 169                    SwingUtilities.invokeLater(runnable);
 170                }
 171            }
 172        });
 173
 174        accountselect.setContext(Context.getAccounts());
 175        accountselect.setSearchEnabled(true);
 176        groupnameselect.setContext(Context.getGroup());
 177        groupnameselect.setSearchEnabled(true);
 178
 179        date1.setDate(new Date());
 180        try {
 181            date3.setDate(DateConverter.addDays(new Date(), Integer.valueOf(mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("bills.warn.days"))));
 182            date2.setDate(new Date());
 183        } catch (Exception e) {
 184            date3.setDate(DateConverter.addDays(new Date(), 14));
 185            date2.setDate(new Date());
 186        }
 187//        itemtable.getTableHeader().addMouseListener(new MouseListener() {
 188//
 189//            @Override
 190//            public void mouseClicked(MouseEvent e) {
 191//                if (e.getButton() == MouseEvent.BUTTON2) {
 192//                    MPTableModel m = (MPTableModel) itemtable.getModel();
 193//                    if (m.getRowCount() > 0) {
 194//                        m.addRow(5);
 195//                    } else {
 196//                        itemtable.setModel(SubItem.toModel(new SubItem[]{
 197//                                    SubItem.getDefaultItem(), SubItem.getDefaultItem(),
 198//                                    SubItem.getDefaultItem(), SubItem.getDefaultItem(),
 199//                                    SubItem.getDefaultItem(), SubItem.getDefaultItem()
 200//                                }));
 201//                        formatTable();
 202//                    }
 203//                } else if (e.getButton() == MouseEvent.BUTTON3) {
 204//                    MPTableModel m = (MPTableModel) itemtable.getModel();
 205//                    Product p = (Product) Popup.SelectValue(Context.getProduct());
 206//                    if (p != null) {
 207//                        int row = m.getLastValidRow(new int[]{4});
 208//                        m.setRowAt(new SubItem(p).getRowData(row), row + 1, 1);
 209//                    }
 210//                }
 211//            }
 212//
 213//            @Override
 214//            public void mousePressed(MouseEvent e) {
 215//            }
 216//
 217//            @Override
 218//            public void mouseReleased(MouseEvent e) {
 219//            }
 220//
 221//            @Override
 222//            public void mouseEntered(MouseEvent e) {
 223//            }
 224//
 225//            @Override
 226//            public void mouseExited(MouseEvent e) {
 227//            }
 228//        });
 229
 230        InputMap inputMap = itemtable.getInputMap(JTable.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
 231        KeyStroke tab = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0);
 232        Action oldAction = itemtable.getActionMap().get(inputMap.get(tab));
 233        itemtable.getActionMap().put(inputMap.get(tab), new TableTabAction(notes, oldAction, false));
 234        KeyStroke shifttab = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK);
 235        oldAction = itemtable.getActionMap().get(inputMap.get(shifttab));
 236        itemtable.getActionMap().put(inputMap.get(shifttab), new TableTabAction(date3, oldAction, true));
 237
 238//        KeyStroke right = KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0);
 239//        oldAction = itemtable.getActionMap().get(inputMap.get(right));
 240//        itemtable.getActionMap().put(inputMap.get(right), new TableTabAction(notes, oldAction, false));
 241//        KeyStroke left = KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0);
 242//        oldAction = itemtable.getActionMap().get(inputMap.get(left));
 243//        itemtable.getActionMap().put(inputMap.get(left), new TableTabAction(date3, oldAction, true));
 244
 245        number.setSearchOnEnterEnabled(true);
 246        number.setParent(this);
 247        number.setSearchField("cname");
 248        number.setContext(Context.getItem());
 249
 250        final DataPanel p = this;
 251        status.getComboBox().addActionListener(new ActionListener() {
 252
 253            Item dato = (Item) getDataOwner();
 254
 255            public void actionPerformed(ActionEvent e) {
 256                if (dato.__getInttype() == Item.TYPE_BILL && !loading && dataOwner.isExisting() && Integer.valueOf(status.getSelectedItem().getId()) == Item.STATUS_PAID && mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", "autocreaterevenue")) {
 257                    if (Popup.Y_N_dialog(Messages.BOOK_NOW)) {
 258
 259                        if (dato.getPanelData(p) && dato.save()) {
 260                            try {
 261                                actionAfterSave();
 262                                dato.createRevenue();
 263                            } catch (Exception ef) {
 264                                Log.Debug(this, ef);
 265                            }
 266                        } else {
 267                            showRequiredFields();
 268                        }
 269                    }
 270                }
 271
 272                if (dato.__getInttype() == Item.TYPE_BILL && !loading && dataOwner.isExisting()
 273                        && Integer.valueOf(status.getSelectedItem().getId()) == Item.STATUS_PAID) {
 274
 275                    //set dateend
 276                    date3.setDate(new Date());
 277                }
 278            }
 279        });
 280
 281        labeledCombobox1.setContext(Context.getMessage());
 282        labeledCombobox1.getComboBox().addActionListener(new ActionListener() {
 283
 284            @Override
 285            public void actionPerformed(ActionEvent e) {
 286                try {
 287                    MailMessage d = (MailMessage) DatabaseObject.getObject(Context.getMessage(), Integer.valueOf(labeledCombobox1.getSelectedItem().getId()));
 288                    notes.setText(d.__getDescription());
 289                } catch (Exception ex) {
 290                }
 291            }
 292        });
 293        labeledCombobox1.setSearchOnEnterEnabled(true);
 294
 295        ((MPTable) dataTable).setPersistanceHandler(new TableViewPersistenceHandler((MPTable) dataTable, this));
 296        ((MPTable) proptable).setPersistanceHandler(new TableViewPersistenceHandler((MPTable) proptable, this));
 297        jSplitPane1.setDividerLocation((User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty.itempanel.divider1.dividerLocation", 150)));
 298        jSplitPane2.setDividerLocation((User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty.itempanel.divider2.dividerLocation", -1)));
 299
 300    }
 301
 302    /**
 303     *
 304     * @param items
 305     */
 306    public ItemPanel(Context items) {
 307        this(items, -1);
 308    }
 309
 310    @Override
 311    public DatabaseObject getDataOwner() {
 312        return dataOwner;
 313    }
 314
 315    @Override
 316    public void setDataOwner(DatabaseObject object, boolean populate) {
 317        loading = true;
 318
 319        if (object instanceof Item) {
 320            dataOwner = (Item) object;
 321            if (populate) {
 322                dataOwner.setPanelData(this);
 323                inttype_ = dataOwner.__getInttype();
 324                button_reminders.setEnabled(inttype_ == Item.TYPE_BILL);
 325                button_schedule.setEnabled(inttype_ == Item.TYPE_BILL);
 326                toorder.setEnabled(inttype_ != Item.TYPE_ORDER && inttype_ != Item.TYPE_BILL);
 327                toinvoice.setEnabled(inttype_ != Item.TYPE_BILL);
 328                type.setText(Item.getTypeString(inttype_));
 329                //            typelabel.setIcon(dataOwner.getIcon());
 330                this.exposeData();
 331
 332                setTitle();
 333
 334                tb.setFavourite(Favourite.isFavourite(object));
 335                tb.setEditable(!object.isReadOnly());
 336
 337
 338                itemtable.setModel(SubItem.toModel(((Item) object).getSubitems()));
 339                if (((MPTableModel) itemtable.getModel()).getEmptyRows(new int[]{4}) < 2) {
 340                    ((MPTableModel) itemtable.getModel()).addRow(1);
 341                }
 342
 343                omodel = (MPTableModel) itemtable.getModel();
 344
 345                formatTable();
 346                try {
 347                    ((MPTableModel) itemtable.getModel()).fireTableCellUpdated(0, 0);
 348                } catch (Exception e) {
 349                }
 350                if (object.isReadOnly()) {
 351                    Popup.notice(Messages.LOCKED_BY);
 352                }
 353                button_preview.setEnabled(false);
 354                preloadTemplates();
 355                validate();
 356            }
 357        } else if (object instanceof SubItem) {
 358            Item i;
 359            try {
 360                i = (Item) DatabaseObject.getObject(Context.getItem(), ((SubItem) object).__getItemsids());
 361                setDataOwner(i, populate);
 362            } catch (NodataFoundException ex) {
 363                Log.Debug(ex);
 364            }
 365        }
 366
 367        properties();
 368        loading = false;
 369
 370    }
 371
 372    private void setTitle() {
 373        if (this.getParent() instanceof JViewport || this.getParent() instanceof JTabbedPane) {
 374            JTabbedPane jTabbedPane = null;
 375            String title1 = cname_;
 376            //this->viewport->scrollpane->tabbedpane
 377            if (this.getParent().getParent().getParent() instanceof JTabbedPane) {
 378                jTabbedPane = (JTabbedPane) this.getParent().getParent().getParent();
 379            } else {
 380                try {
 381                    jTabbedPane = (JTabbedPane) this.getParent();
 382                } catch (Exception e) {
 383                    //Free floating window
 384                    ((JFrame) this.getRootPane().getParent()).setTitle(title1);
 385                }
 386            }
 387            if (jTabbedPane != null) {
 388                jTabbedPane.setTitleAt(jTabbedPane.getSelectedIndex(), title1);
 389            }
 390        }
 391    }
 392
 393    @Override
 394    public void showRequiredFields() {
 395        TextFieldUtils.blink(contactname.getComboBox(), Color.RED);
 396        contactname.requestFocus();
 397//        Popup.notice(Messages.SELECT_A_CONTACT);
 398    }
 399
 400    private void addFile() {
 401        if (dataOwner.isExisting()) {
 402            DialogForFile d = new DialogForFile(DialogForFile.FILES_ONLY);
 403            if (d.chooseFile()) {
 404                String s = Popup.Enter_Value(Messages.ENTER_A_DESCRIPTION);
 405                if (s != null) {
 406                    QueryHandler.instanceOf().clone(Context.getFiles(), this).insertFile(d.getFile(), dataOwner, QueryCriteria.getSaveStringFor(s));
 407                }
 408            }
 409        }
 410    }
 411
 412    private void deleteFile() {
 413        if (dataOwner.isExisting()) {
 414            try {
 415                DatabaseObject.getObject(Context.getFilesToItems(), "filename", (dataTable.getModel().getValueAt(dataTable.getSelectedRow(), 0).toString())).delete();
 416            } catch (Exception e) {
 417                Log.Debug(this, e.getMessage());
 418            }
 419            fillFiles();
 420          
 421        }
 422    }
 423
 424    private void fileTableClicked(MouseEvent evt) {
 425        if (evt.getClickCount() > 1) {
 426            FileDirectoryHandler.open(QueryHandler.instanceOf().clone(Context.getFiles()).
 427                    retrieveFile(dataTable.getModel().getValueAt(dataTable.getSelectedRow(), 0).
 428                    toString(), new File(FileDirectoryHandler.getTempDir() + dataTable.getModel().
 429                    getValueAt(dataTable.getSelectedRow(), 1).toString())));
 430        } else if (evt.getClickCount() == 1 && evt.getButton() == MouseEvent.BUTTON3) {
 431
 432            JTable source = (JTable) evt.getSource();
 433            int row = source.rowAtPoint(evt.getPoint());
 434            int column = source.columnAtPoint(evt.getPoint());
 435
 436            if (!source.isRowSelected(row)) {
 437                source.changeSelection(row, column, false, false);
 438            }
 439
 440            FileTablePopUp.instanceOf(dataTable).show(source, evt.getX(), evt.getY());
 441        }
 442    }
 443
 444    private void fillFiles() {
 445
 446        Runnable runnable = new Runnable() {
 447
 448            public void run() {
 449                Context c = Context.getFilesToItems();
 450                c.addReference(Context.getFiles().getDbIdentity(), "cname", "filename");
 451                Object[][] data = new DatabaseSearch(c).getValuesFor(Context.DETAILS_FILES_TO_ITEMS, "itemsids", dataOwner.__getIDS());
 452
 453                dataTable.setModel(new MPTableModel(data, Headers.FILE_REFERENCES.getValue()));
 454                TableFormat.stripFirstColumn(dataTable);
 455            }
 456        };
 457        new Thread(runnable).start();
 458    }
 459
 460    /**
 461     * This method is called from within the constructor to initialize the form.
 462     * WARNING: Do NOT modify this code. The content of this method is always
 463     * regenerated by the Form Editor.
 464     */
 465    @SuppressWarnings("unchecked")
 466    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
 467    private void initComponents() {
 468
 469        buttonGroup1 = new javax.swing.ButtonGroup();
 470        leftpane = new javax.swing.JPanel();
 471        rightpane = new javax.swing.JPanel();
 472        jPanel1 = new javax.swing.JPanel();
 473        jPanel9 = new javax.swing.JPanel();
 474        type = new javax.swing.JLabel();
 475        number = new mpv5.ui.beans.LabeledTextField();
 476        jButton1 = new javax.swing.JButton();
 477        accountselect = new mpv5.ui.beans.LabeledCombobox();
 478        staus_icon = new javax.swing.JLabel();
 479        jPanel10 = new javax.swing.JPanel();
 480        status = new mpv5.ui.beans.LabeledCombobox();
 481        jLabel4 = new javax.swing.JLabel();
 482        groupnameselect = new mpv5.ui.beans.MPCombobox();
 483        button_order2 = new javax.swing.JButton();
 484        addedby = new javax.swing.JLabel();
 485        jToolBar1 = new javax.swing.JToolBar();
 486        toorder = new javax.swing.JButton();
 487        toinvoice = new javax.swing.JButton();
 488        jSeparator4 = new javax.swing.JToolBar.Separator();
 489        typelabel = new javax.swing.JLabel();
 490        jSeparator1 = new javax.swing.JToolBar.Separator();
 491        button_reminders = new javax.swing.JButton();
 492        jButton2 = new javax.swing.JButton();
 493        jSeparator7 = new javax.swing.JToolBar.Separator();
 494        button_schedule = new javax.swing.JButton();
 495        button_preview = new javax.swing.JButton();
 496        button_deliverynote = new javax.swing.JButton();
 497        button_orderconf = new javax.swing.JButton();
 498        checkb_pront_oc = new javax.swing.JCheckBox();
 499        jPanel2 = new javax.swing.JPanel();
 500        contactname = new mpv5.ui.beans.LabeledCombobox();
 501        contactcity = new javax.swing.JTextField();
 502        contactcompany = new javax.swing.JTextField();
 503        contactid = new javax.swing.JTextField();
 504        jButton3 = new javax.swing.JButton();
 505        jButton4 = new javax.swing.JButton();
 506        jPanel5 = new javax.swing.JPanel();
 507        date1 = new mpv5.ui.beans.LabeledDateChooser();
 508        date2 = new mpv5.ui.beans.LabeledDateChooser();
 509        date3 = new mpv5.ui.beans.LabeledDateChooser();
 510        jSplitPane2 = new javax.swing.JSplitPane();
 511        jPanel6 = new javax.swing.JPanel();
 512        jToolBar2 = new alignRightToolbar();
 513        jLabel1 = new javax.swing.JLabel();
 514        jSeparator3 = new javax.swing.JToolBar.Separator();
 515        netvalue = new javax.swing.JLabel();
 516        jSeparator9 = new javax.swing.JToolBar.Separator();
 517        jLabel2 = new javax.swing.JLabel();
 518        jSeparator6 = new javax.swing.JToolBar.Separator();
 519        taxvalue = new javax.swing.JLabel();
 520        jSeparator10 = new javax.swing.JToolBar.Separator();
 521        jLabel3 = new javax.swing.JLabel();
 522        jSeparator5 = new javax.swing.JToolBar.Separator();
 523        value = new javax.swing.JLabel();
 524        jSeparator11 = new javax.swing.JToolBar.Separator();
 525        jLabel5 = new javax.swing.JLabel();
 526        jSeparator8 = new javax.swing.JToolBar.Separator();
 527        discount = new javax.swing.JLabel();
 528        jPanel4 = new javax.swing.JPanel();
 529        jScrollPane3 = new javax.swing.JScrollPane();
 530        itemtable = new javax.swing.JTable();
 531        itemPanel = new javax.swing.JPanel();
 532        addItem = new javax.swing.JButton();
 533        delItem = new javax.swing.JButton();
 534        upItem = new javax.swing.JButton();
 535        upItem1 = new javax.swing.JButton();
 536        jPanel7 = new javax.swing.JPanel();
 537        jSplitPane1 = new javax.swing.JSplitPane();
 538        jTabbedPane1 = new javax.swing.JTabbedPane();
 539        jPanel3 = new javax.swing.JPanel();
 540        jScrollPane1 = new javax.swing.JScrollPane();
 541        class NoTabTextArea extends JTextPane {
 542            private static final long serialVersionUID = 1L;
 543            protected void processComponentKeyEvent( KeyEvent e ) {
 544                if ( e.getID() == KeyEvent.KEY_PRESSED &&
 545                    e.getKeyCode() == KeyEvent.VK_TAB ) {
 546                    e.consume();
 547                    if (e.isShiftDown()) {
 548                        transferFocusBackward();
 549                    } else {
 550                        itemtable.requestFocusInWindow();
 551                    }
 552                } else {
 553                    super.processComponentKeyEvent( e );
 554                }
 555            }
 556        }
 557        notes = new NoTabTextArea();
 558        labeledCombobox1 = new mpv5.ui.beans.LabeledCombobox();
 559        jScrollPane4 = new javax.swing.JScrollPane();
 560        proptable = new  mpv5.ui.misc.MPTable(this) {
 561            private static final long serialVersionUID = 1L;
 562            public Component prepareRenderer(TableCellRenderer renderer,
 563                int rowIndex, int vColIndex) {
 564                Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
 565                if (c instanceof JComponent) {
 566                    JComponent jc = (JComponent)c;
 567                    jc.setToolTipText(String.valueOf(getValueAt(rowIndex, vColIndex)));
 568                }
 569                return c;
 570            }
 571        };
 572        jPanel8 = new javax.swing.JPanel();
 573        jScrollPane2 = new javax.swing.JScrollPane();
 574        dataTable = new  mpv5.ui.misc.MPTable(this) {
 575            private static final long serialVersionUID = 1L;
 576            public Component prepareRenderer(TableCellRenderer renderer,
 577                int rowIndex, int vColIndex) {
 578                Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
 579                if (c instanceof JComponent) {
 580                    JComponent jc = (JComponent)c;
 581                    jc.setToolTipText(String.valueOf(getValueAt(rowIndex, vColIndex)));
 582                }
 583                return c;
 584            }
 585        }
 586        ;
 587        removefile = new javax.swing.JButton();
 588        addfile = new javax.swing.JButton();
 589        toolbarpane = new javax.swing.JPanel();
 590
 591        java.util.ResourceBundle bundle = mpv5.i18n.LanguageManager.getBundle();// NOI18N
 592        setBorder(javax.swing.BorderFactory.createTitledBorder(bundle.getString("ItemPanel.border.title_1"))); // NOI18N
 593        setName("ItemPanel"); // NOI18N
 594        setLayout(new java.awt.BorderLayout());
 595
 596        leftpane.setName("leftpane"); // NOI18N
 597        leftpane.setLayout(new java.awt.BorderLayout());
 598        add(leftpane, java.awt.BorderLayout.WEST);
 599
 600        rightpane.setBorder(javax.swing.BorderFactory.createTitledBorder(bundle.getString("ItemPanel.rightpane.border.title"))); // NOI18N
 601        rightpane.setName("rightpane"); // NOI18N
 602
 603        jPanel1.setBackground(new java.awt.Color(204, 204, 204));
 604        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
 605        jPanel1.setName("jPanel1"); // NOI18N
 606        jPanel1.setPreferredSize(new java.awt.Dimension(843, 100));
 607
 608        jPanel9.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(232, 227, 227), 1, true));
 609        jPanel9.setName("jPanel9"); // NOI18N
 610        jPanel9.setOpaque(false);
 611        jPanel9.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 10, 5));
 612
 613        type.setBackground(new java.awt.Color(255, 255, 255));
 614        type.setFont(type.getFont().deriveFont(type.getFont().getStyle() | java.awt.Font.BOLD, type.getFont().getSize()+4));
 615        type.setForeground(new java.awt.Color(26, 34, 70));
 616        type.setText(bundle.getString("ItemPanel.type.text")); // NOI18N
 617        type.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
 618        type.setMaximumSize(new java.awt.Dimension(250, 20));
 619        type.setMinimumSize(new java.awt.Dimension(38, 20));
 620        type.setName("type"); // NOI18N
 621        type.setPreferredSize(new java.awt.Dimension(200, 20));
 622        jPanel9.add(type);
 623
 624        number.set_Label(bundle.getString("ItemPanel.number._Label")); // NOI18N
 625        number.setFocusable(false);
 626        number.setFont(number.getFont());
 627        number.setName("number"); // NOI18N
 628        number.setPreferredSize(new java.awt.Dimension(250, 20));
 629        jPanel9.add(number);
 630
 631        jButton1.setText(bundle.getString("ItemPanel.jButton1.text")); // NOI18N
 632        jButton1.setMaximumSize(new java.awt.Dimension(20, 20));
 633        jButton1.setMinimumSize(new java.awt.Dimension(20, 20));
 634        jButton1.setName(bundle.getString("ItemPanel.jButton1.name")); // NOI18N
 635        jButton1.setPreferredSize(new java.awt.Dimension(20, 20));
 636        jButton1.addActionListener(new java.awt.event.ActionListener() {
 637            public void actionPerformed(java.awt.event.ActionEvent evt) {
 638                jButton1ActionPerformed(evt);
 639            }
 640        });
 641        jPanel9.add(jButton1);
 642
 643        accountselect.set_Label(bundle.getString("ItemPanel.accountselect._Label")); // NOI18N
 644        accountselect.setName("accountselect"); // NOI18N
 645        accountselect.setPreferredSize(new java.awt.Dimension(250, 20));
 646        accountselect.setSearchOnEnterEnabled(false);
 647        jPanel9.add(accountselect);
 648
 649        staus_icon.setText(bundle.getString("ItemPanel.staus_icon.text")); // NOI18N
 650        staus_icon.setMaximumSize(new java.awt.Dimension(50, 33));
 651        staus_icon.setMinimumSize(new java.awt.Dimension(20, 20));
 652        staus_icon.setName("staus_icon"); // NOI18N
 653        staus_icon.setPreferredSize(new java.awt.Dimension(20, 20));
 654        jPanel9.add(staus_icon);
 655
 656        jPanel10.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(232, 227, 227), 1, true));
 657        jPanel10.setName("jPanel10"); // NOI18N
 658        jPanel10.setOpaque(false);
 659        jPanel10.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 10, 5));
 660
 661        status.set_Label(bundle.getString("ItemPanel.status._Label")); // NOI18N
 662        status.setMaximumSize(new java.awt.Dimension(333, 20));
 663        status.setMinimumSize(new java.awt.Dimension(100, 20));
 664        status.setName("status"); // NOI18N
 665        status.setPreferredSize(new java.awt.Dimension(250, 20));
 666        jPanel10.add(status);
 667
 668        jLabel4.setFont(jLabel4.getFont());
 669        jLabel4.setText(bundle.getString("ItemPanel.jLabel4.text")); // NOI18N
 670        jLabel4.setName("jLabel4"); // NOI18N
 671        jPanel10.add(jLabel4);
 672
 673        groupnameselect.setMaximumSize(new java.awt.Dimension(333, 20));
 674        groupnameselect.setMinimumSize(new java.awt.Dimension(100, 20));
 675        groupnameselect.setName("groupnameselect"); // NOI18N
 676        groupnameselect.setPreferredSize(new java.awt.Dimension(200, 20));
 677        jPanel10.add(groupnameselect);
 678
 679        button_order2.setFont(button_order2.getFont().deriveFont(button_order2.getFont().getStyle() & ~java.awt.Font.BOLD, button_order2.getFont().getSize()-2));
 680        button_order2.setText(bundle.getString("ItemPanel.button_order2.text")); // NOI18N
 681        button_order2.setFocusable(false);
 682        button_order2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
 683        button_order2.setMaximumSize(new java.awt.Dimension(20, 20));
 684        button_order2.setMinimumSize(new java.awt.Dimension(20, 20));
 685        button_order2.setName("button_order2"); // NOI18N
 686        button_order2.setPreferredSize(new java.awt.Dimension(20, 20));
 687        button_order2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
 688        button_order2.addActionListener(new java.awt.event.ActionListener() {
 689            public void actionPerformed(java.awt.event.ActionEvent evt) {
 690                button_order2ActionPerformed(evt);
 691            }
 692        });
 693        jPanel10.add(button_order2);
 694
 695        addedby.setFont(addedby.getFont());
 696        addedby.setText(bundle.getString("ItemPanel.addedby.text")); // NOI18N
 697        addedby.setToolTipText(bundle.getString("ItemPanel.addedby.toolTipText")); // NOI18N
 698        addedby.setBorder(javax.swing.BorderFactory.createEtchedBorder());
 699        addedby.setMaximumSize(new java.awt.Dimension(333, 20));
 700        addedby.setMinimumSize(new java.awt.Dimension(100, 20));
 701        addedby.setName("addedby"); // NOI18N
 702        addedby.setPreferredSize(new java.awt.Dimension(200, 20));
 703        jPanel10.add(addedby);
 704
 705        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
 706        jPanel1.setLayout(jPanel1Layout);
 707        jPanel1Layout.setHorizontalGroup(
 708            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 709            .addGroup(jPanel1Layout.createSequentialGroup()
 710                .addContainerGap()
 711                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 712                    .addComponent(jPanel10, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 877, Short.MAX_VALUE)
 713                    .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, 877, Short.MAX_VALUE))
 714                .addGap(32, 32, 32))
 715        );
 716        jPanel1Layout.setVerticalGroup(
 717            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 718            .addGroup(jPanel1Layout.createSequentialGroup()
 719                .addContainerGap()
 720                .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
 721                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 722                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
 723                .addContainerGap())
 724        );
 725
 726        jToolBar1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
 727        jToolBar1.setFloatable(false);
 728        jToolBar1.setRollover(true);
 729        jToolBar1.setName("jToolBar1"); // NOI18N
 730
 731        toorder.setBackground(new java.awt.Color(255, 255, 255));
 732        toorder.setText(bundle.getString("ItemPanel.toorder.text")); // NOI18N
 733        toorder.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(153, 153, 153), 1, true));
 734        toorder.setEnabled(false);
 735        toorder.setFocusable(false);
 736        toorder.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
 737        toorder.setMaximumSize(new java.awt.Dimension(333, 20));
 738        toorder.setMinimumSize(new java.awt.Dimension(80, 20));
 739        toorder.setName(bundle.getString("ItemPanel.toorder.name")); // NOI18N
 740        toorder.setPreferredSize(new java.awt.Dimension(120, 20));
 741        toorder.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
 742        toorder.addActionListener(new java.awt.event.ActionListener() {
 743            public void actionPerformed(java.awt.event.ActionEvent evt) {
 744                toorderActionPerformed(evt);
 745            }
 746        });
 747        jToolBar1.add(toorder);
 748
 749        toinvoice.setBackground(new java.awt.Color(255, 255, 255));
 750        toinvoice.setText(bundle.getString("ItemPanel.toinvoice.text")); // NOI18N
 751        toinvoice.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(153, 153, 153), 1, true));
 752        toinvoice.setEnabled(false);
 753        toinvoice.setFocusable(false);
 754        toinvoice.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
 755        toinvoice.setMaximumSize(new java.awt.Dimension(333, 20));
 756        toinvoice.setMinimumSize(new java.awt.Dimension(80, 20));
 757        toinvoice.setName(bundle.getString("ItemPanel.toinvoice.name")); // NOI18N
 758        toinvoice.setPreferredSize(new java.awt.Dimension(120, 20));
 759        toinvoice.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
 760        toinvoice.addActionListener(new java.awt.event.ActionListener() {
 761            public void actionPerformed(java.awt.event.ActionEvent evt) {
 762                toinvoiceActionPerformed(evt);
 763            }
 764        });
 765        jToolBar1.add(toinvoice);
 766
 767        jSeparator4.setName("jSeparator4"); // NOI18N
 768        jToolBar1.add(jSeparator4);
 769
 770        typelabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/22/editcopy.png"))); // NOI18N
 771        typelabel.setText(bundle.getString("ItemPanel.typelabel.text")); // NOI18N
 772        typelabel.setName("typelabel"); // NOI18N
 773        jToolBar1.add(typelabel);
 774
 775        jSeparator1.setName("jSeparator1"); // NOI18N
 776        jToolBar1.add(jSeparator1);
 777
 778        button_reminders.setBackground(new java.awt.Color(255, 255, 255));
 779        button_reminders.setText(bundle.getString("ItemPanel.button_reminders.text")); // NOI18N
 780        button_reminders.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(153, 153, 153), 1, true));
 781        button_reminders.setEnabled(false);
 782        button_reminders.setFocusable(false);
 783        button_reminders.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
 784        button_reminders.setMaximumSize(new java.awt.Dimension(333, 20));
 785        button_reminders.setMinimumSize(new java.awt.Dimension(80, 20));
 786        button_reminders.setName("button_reminders"); // NOI18N
 787        button_reminders.setPreferredSize(new java.awt.Dimension(120, 20));
 788        button_reminders.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
 789        button_reminders.addActionListener(new java.awt.event.ActionListener() {
 790            public void actionPerformed(java.awt.event.ActionEvent evt) {
 791                button_remindersActionPerformed(evt);
 792            }
 793        });
 794        jToolBar1.add(button_reminders);
 795
 796        jButton2.setBackground(new java.awt.Color(255, 255, 255));
 797        jButton2.setText(bundle.getString("ItemPanel.jButton2.text")); // NOI18N
 798        jButton2.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(153, 153, 153), 1, true));
 799        jButton2.setFocusable(false);
 800        jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
 801        jButton2.setMaximumSize(new java.awt.Dimension(333, 20));
 802        jButton2.setMinimumSize(new java.awt.Dimension(80, 20));
 803        jButton2.setName("jButton2"); // NOI18N
 804        jButton2.setPreferredSize(new java.awt.Dimension(120, 20));
 805        jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
 806        jButton2.addActionListener(new java.awt.event.ActionListener() {
 807            public void actionPerformed(java.awt.event.ActionEvent evt) {
 808                jButton2ActionPerformed(evt);
 809            }
 810        });
 811        jToolBar1.add(jButton2);
 812
 813        jSeparator7.setName("jSeparator7"); // NOI18N
 814        jToolBar1.add(jSeparator7);
 815
 816        button_schedule.setBackground(new java.awt.Color(255, 255, 255));
 817        button_schedule.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpv5/resources/images/16/kalarm.png"))); // NOI18N
 818        button_schedule.setText(bundle.getString("ItemPanel.button_schedule.text")); // NOI18N
 819        button_schedule.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(153, 153, 153), 1, true));
 820        button_schedule.setEnabled(false);
 821        button_schedule.setMaximumSize(new java.awt.Dimension(333, 20));
 822        button_schedule.setMinimumSize(new java.awt.Dimension(80, 20));
 823        button_schedule.setName("button_schedule"); // NOI18N
 824        button_schedule.setPreferredSize(new java.awt.Dimension(120, 20));
 825        button_schedule.addMouseListener(new java.awt.event.MouseAdapter() {
 826            public void mouseClicked(java.awt.event.MouseEvent evt) {
 827                button_scheduleMouseClicked(evt);
 828            }
 829        });
 830        button_schedule.addActionListener(new java.awt.event.ActionListener() {
 831            public void actionPerformed(java.awt.event.ActionEvent evt) {
 832                button_scheduleActionPerformed(evt);
 833            }
 834        });
 835        jToolBar1.add(button_schedule);
 836
 837        button_preview.setBackground(new java.awt.Color(255, 255, 255));
 838        button_preview.setText(bundle.getString("ItemPanel.button_preview.text")); // NOI18N
 839        button_preview.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(153, 153, 153), 1, true));
 840        button_preview.setEnabled(false);
 841        button_preview.setFocusable(false);
 842        button_preview.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
 843        button_preview.setMaximumSize(new java.awt.Dimension(333, 20));
 844        button_preview.setMinimumSize(new java.awt.Dimension(80, 20));
 845        button_preview.setName("button_preview"); // NOI18N
 846        button_preview.setPreferredSize(new java.awt.Dimension(120, 20));
 847        button_preview.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
 848        button_preview.addActionListener(new java.awt.event.ActionListener() {
 849            public void actionPerformed(java.awt.event.ActionEvent evt) {
 850                button_previewActionPerformed(evt);
 851            }
 852        });
 853        jToolBar1.add(button_preview);
 854
 855        button_deliverynote.setBackground(new java.awt.Color(255, 255, 255));
 856        button_deliverynote.setText(bundle.getString("ItemPanel.button_deliverynote.text")); // NOI18N
 857        button_deliverynote.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(153, 153, 153), 1, true));
 858        button_deliverynote.setEnabled(false);
 859        button_deliverynote.setFocusable(false);
 860        button_deliverynote.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
 861        button_deliverynote.setMaximumSize(new java.awt.Dimension(333, 20));
 862        button_deliverynote.setMinimumSize(new java.awt.Dimension(80, 20));
 863        button_deliverynote.setName("button_deliverynote"); // NOI18N
 864        button_deliverynote.setPreferredSize(new java.awt.Dimension(120, 20));
 865        button_deliverynote.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
 866        button_deliverynote.addActionListener(new java.awt.event.ActionListener() {
 867            public void actionPerformed(java.awt.event.ActionEvent evt) {
 868                button_deliverynoteActionPerformed(evt);
 869            }
 870        });
 871        jToolBar1.add(button_deliverynote);
 872
 873        button_orderconf.setBackground(new java.awt.Color(255, 255, 255));
 874        button_orderconf.setText(bundle.getString("ItemPanel.button_orderconf.text")); // NOI18N
 875        button_orderconf.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(153, 153, 153), 1, true));
 876        button_orderconf.setEnabled(false);
 877        button_orderconf.setFocusable(false);
 878        button_orderconf.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
 879        button_orderconf.setMaximumSize(new java.awt.Dimension(333, 20));
 880        button_orderconf.setMinimumSize(new java.awt.Dimension(80, 20));
 881        button_orderconf.setName("button_orderconf"); // NOI18N
 882        button_orderconf.setPreferredSize(new java.awt.Dimension(120, 20));
 883        button_orderconf.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
 884        button_orderconf.addActionListener(new java.awt.event.ActionListener() {
 885            public void actionPerformed(java.awt.event.ActionEvent evt) {
 886                button_orderconfActionPerformed(evt);
 887            }
 888        });
 889        jToolBar1.add(button_orderconf);
 890
 891        checkb_pront_oc.setBackground(new java.awt.Color(255, 255, 255));
 892        checkb_pront_oc.setText(bundle.getString("ItemPanel.checkb_pront_oc.text")); // NOI18N
 893        checkb_pront_oc.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(153, 153, 153), 1, true));
 894        checkb_pront_oc.setEnabled(false);
 895        checkb_pront_oc.setFocusable(false);
 896        checkb_pront_oc.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
 897        checkb_pront_oc.setMaximumSize(new java.awt.Dimension(333, 20));
 898        checkb_pront_oc.setMinimumSize(new java.awt.Dimension(80, 20));
 899        checkb_pront_oc.setName("checkb_pront_oc"); // NOI18N
 900        checkb_pront_oc.setPreferredSize(new java.awt.Dimension(120, 20));
 901        checkb_pront_oc.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
 902        jToolBar1.add(checkb_pront_oc);
 903
 904        jPanel2.setBackground(new java.awt.Color(255, 255, 255));
 905        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(bundle.getString("ItemPanel.jPanel2.border.title"))); // NOI18N
 906        jPanel2.setName("jPanel2"); // NOI18N
 907        jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));
 908
 909        contactname.set_Label(bundle.getString("ItemPanel.contactname._Label")); // NOI18N
 910        contactname.setName("contactname"); // NOI18N
 911        contactname.setPreferredSize(new java.awt.Dimension(300, 20));
 912        jPanel2.add(contactname);
 913
 914        contactcity.setEditable(false);
 915        contactcity.setText(bundle.getString("ItemPanel.contactcity.text")); // NOI18N
 916        contactcity.setName("contactcity"); // NOI18N
 917        contactcity.setPreferredSize(new java.awt.Dimension(150, 20));
 918        jPanel2.add(contactcity);
 919
 920        contactcompany.setEditable(false);
 921        contactcompany.setText(bundle.getString("ItemPanel.contactcompany.text")); // NOI18N
 922        contactcompany.setName("contactcompany"); // NOI18N
 923        contactcompany.setPreferredSize(new java.awt.Dimension(150, 20));
 924        jPanel2.add(contactcompany);
 925
 926        contactid.setEditable(false);
 927        contactid.setText(bundle.getString("ItemPanel.contactid.text")); // NOI18N
 928        contactid.setName("contactid"); // NOI18N
 929        contactid.setPreferredSize(new java.awt.Dimension(150, 20));
 930        jPanel2.add(contactid);
 931
 932        jButton3.setText(bundle.getString("ItemPanel.jButton3.text")); // NOI18N
 933        jButton3.setName("jButton3"); // NOI18N
 934        jButton3.addActionListener(new java.awt.event.ActionListener() {
 935            public void actionPerformed(java.awt.event.ActionEvent evt) {
 936                jButton3ActionPerformed(evt);
 937            }
 938        });
 939        jPanel2.add(jButton3);
 940
 941        jButton4.setText(bundle.getString("ItemPanel.jButton4.text")); // NOI18N
 942        jButton4.setName("jButton4"); // NOI18N
 943        jButton4.addActionListener(new java.awt.event.ActionListener() {
 944            public void actionPerformed(java.awt.event.ActionEvent evt) {
 945                jButton4ActionPerformed(evt);
 946            }
 947        });
 948        jPanel2.add(jButton4);
 949
 950        jPanel5.setBackground(new java.awt.Color(255, 255, 255));
 951        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(bundle.getString("ItemPanel.jPanel5.border.title"))); // NOI18N
 952        jPanel5.setName("jPanel5"); // NOI18N
 953        jPanel5.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 10, 0));
 954
 955        date1.set_Label(bundle.getString("ItemPanel.date1._Label")); // NOI18N
 956        date1.setName("date1"); // NOI18N
 957        date1.setPreferredSize(new java.awt.Dimension(280, 20));
 958        jPanel5.add(date1);
 959
 960        date2.set_Label(bundle.getString("ItemPanel.date2._Label")); // NOI18N
 961        date2.setName("date2"); // NOI18N
 962        date2.setPreferredSize(new java.awt.Dimension(280, 20));
 963        jPanel5.add(date2);
 964
 965        date3.set_Label(bundle.getString("ItemPanel.date3._Label")); // NOI18N
 966        date3.setName("date3"); // NOI18N
 967        date3.setPreferredSize(new java.awt.Dimension(280, 20));
 968        jPanel5.add(date3);
 969
 970        jSplitPane2.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
 971        jSplitPane2.setResizeWeight(0.8);
 972        jSplitPane2.setName("jSplitPane2"); // NOI18N
 973        jSplitPane2.setOneTouchExpandable(true);
 974        jSplitPane2.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
 975            public void propertyChange(java.beans.PropertyChangeEvent evt) {
 976                jSplitPane2PropertyChange(evt);
 977            }
 978        });
 979
 980        jPanel6.setName("jPanel6"); // NOI18N
 981        jPanel6.setPreferredSize(new java.awt.Dimension(869, 250));
 982        jPanel6.setLayout(new java.awt.BorderLayout());
 983
 984        jToolBar2.setBackground(new java.awt.Color(255, 255, 255));
 985        jToolBar2.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 102, 102), 1, true));
 986        jToolBar2.setFloatable(false);
 987        jToolBar2.setRollover(true);
 988        jToolBar2.setName("jToolBar2"); // NOI18N
 989        jToolBar2.setPreferredSize(new java.awt.Dimension(210, 26));
 990
 991        jLabel1.setText(bundle.getString("ItemPanel.jLabel1.text")); // NOI18N
 992        jLabel1.setName("jLabel1"); // NOI18N
 993        jToolBar2.add(jLabel1);
 994
 995        jSeparator3.setName("jSeparator3"); // NOI18N
 996        jSeparator3.setSeparatorSize(new java.awt.Dimension(15, 10));
 997        jToolBar2.add(jSeparator3);
 998
 999        netvalue.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
1000        netvalue.setText(bundle.getString("ItemPanel.netvalue.text")); // NOI18N
1001        netvalue.setName("netvalue"); // NOI18N
1002        jToolBar2.add(netvalue);
1003
1004        jSeparator9.setName("jSeparator9"); // NOI18N
1005        jToolBar2.add(jSeparator9);
1006
1007        jLabel2.setText(bundle.getString("ItemPanel.jLabel2.text")); // NOI18N
1008        jLabel2.setName("jLabel2"); // NOI18N
1009        jToolBar2.add(jLabel2);
1010
1011        jSeparator6.setName("jSeparator6"); // NOI18N
1012        jSeparator6.setSeparatorSize(new java.awt.Dimension(15, 10));
1013        jToolBar2.add(jSeparator6);
1014
1015        taxvalue.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
1016        taxvalue.setText(bundle.getString("ItemPanel.taxvalue.text")); // NOI18N
1017        taxvalue.setName("taxvalue"); // NOI18N
1018        jToolBar2.add(taxvalue);
1019
1020        jSeparator10.setName("jSeparator10"); // NOI18N
1021        jToolBar2.add(jSeparator10);
1022
1023        jLabel3.setText(bundle.getString("ItemPanel.jLabel3.text")); // NOI18N
1024        jLabel3.setName("jLabel3"); // NOI18N
1025        jToolBar2.add(jLabel3);
1026
1027        jSeparator5.setName("jSeparator5"); // NOI18N
1028        jSeparator5.setSeparatorSize(new java.awt.Dimension(15, 10));
1029        jToolBar2.add(jSeparator5);
1030
1031        value.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
1032        value.setText(bundle.getString("ItemPanel.value.text")); // NOI18N
1033        value.setName("value"); // NOI18N
1034        jToolBar2.add(value);
1035
1036        jSeparator11.setName("jSeparator11"); // NOI18N
1037        jToolBar2.add(jSeparator11);
1038
1039        jLabel5.setText(bundle.getString("ItemPanel.jLabel5.text_1")); // NOI18N
1040        jLabel5.setName("jLabel5"); // NOI18N
1041        jToolBar2.add(jLabel5);
1042
1043        jSeparator8.setName("jSeparator8"); // NOI18N
1044        jSeparator8.setSeparatorSize(new java.awt.Dimension(15, 10));
1045        jToolBar2.add(jSeparator8);
1046
1047        discount.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
1048        discount.setText(bundle.getString("ItemPanel.discount.text")); // NOI18N
1049        discount.setName("discount"); // NOI18N
1050        jToolBar2.add(discount);
1051
1052        jPanel6.add(jToolBar2, java.awt.BorderLayout.PAGE_END);
1053
1054        jPanel4.setBackground(new java.awt.Color(204, 204, 204));
1055        jPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder());
1056        jPanel4.setName("jPanel4"); // NOI18N
1057
1058        jScrollPane3.setName("jScrollPane3"); // NOI18N
1059
1060        itemtable.setModel(new javax.swing.table.DefaultTableModel(
1061            new Object [][] {
1062
1063            },
1064            new String [] {
1065
1066            }
1067        ));
1068        itemtable.setName("itemtable"); // NOI18N
1069        itemtable.setSelectionBackground(new java.awt.Color(161, 176, 190));
1070        itemtable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
1071        itemtable.setSurrendersFocusOnKeystroke(true);
1072        itemtable.addMouseListener(new java.awt.event.MouseAdapter() {
1073            public void mouseClicked(java.awt.event.MouseEvent evt) {
1074                itemtableMouseClicked(evt);
1075            }
1076        });
1077        jScrollPane3.setViewportView(itemtable);
1078        itemtable.getColum

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