Example usage for javax.swing JPopupMenu JPopupMenu

List of usage examples for javax.swing JPopupMenu JPopupMenu

Introduction

In this page you can find the example usage for javax.swing JPopupMenu JPopupMenu.

Prototype

public JPopupMenu() 

Source Link

Document

Constructs a JPopupMenu without an "invoker".

Usage

From source file:ro.nextreports.designer.querybuilder.DBBrowserTree.java

private void selectionDatabase(TreePath selPath, DBBrowserNode selectedNode, MouseEvent e) {
    if (e.getClickCount() == 2) {
        return;// w w w  .j a v a2 s  .co m
    }
    boolean connected = false;
    String name = selectedNode.getDBObject().getName();
    DataSourceManager manager = DefaultDataSourceManager.getInstance();
    DataSource ds = manager.getDataSource(name);
    if (ds.getStatus() == DataSourceType.CONNECTED) {
        connected = true;
    } else {
        connected = false;
    }

    // try to create source directory (may not exists if we copy datasource.xml)
    (new File(FileReportPersistence.CONNECTIONS_DIR + File.separator + name + File.separator
            + FileReportPersistence.QUERIES_FOLDER)).mkdirs();
    (new File(FileReportPersistence.CONNECTIONS_DIR + File.separator + name + File.separator
            + FileReportPersistence.REPORTS_FOLDER)).mkdirs();
    (new File(FileReportPersistence.CONNECTIONS_DIR + File.separator + name + File.separator
            + FileReportPersistence.CHARTS_FOLDER)).mkdirs();

    JPopupMenu popupMenu = new JPopupMenu();
    JMenuItem menuItem = new JMenuItem(new DataSourceConnectAction(instance, selPath));
    popupMenu.add(menuItem);
    if (connected) {
        menuItem.setEnabled(false);
    } else {
        menuItem.setEnabled(true);
    }

    JMenuItem menuItem2 = new JMenuItem(new DataSourceDisconnectAction(instance, selectedNode));
    popupMenu.add(menuItem2);
    if (connected) {
        menuItem2.setEnabled(true);
    } else {
        menuItem2.setEnabled(false);
    }

    JMenuItem menuItem5 = new JMenuItem(new DataSourceViewInfoAction(selectedNode));
    popupMenu.add(menuItem5);

    JMenuItem menuItem3 = new JMenuItem(new DataSourceEditAction(instance, selectedNode));
    popupMenu.add(menuItem3);
    if (connected) {
        menuItem3.setEnabled(false);
    } else {
        menuItem3.setEnabled(true);
    }

    JMenuItem menuItem4 = new JMenuItem(new DataSourceDeleteAction(instance, selectedNode));
    popupMenu.add(menuItem4);
    if (connected) {
        menuItem4.setEnabled(false);
    } else {
        menuItem4.setEnabled(true);
    }

    if (!DefaultDataSourceManager.memoryDataSources()) {
        JMenuItem menuItem6 = new JMenuItem(new DataSourceSchemaSelectionAction(instance, selectedNode));
        popupMenu.add(menuItem6);
    }

    popupMenu.show((Component) e.getSource(), e.getX(), e.getY());
}

From source file:ro.nextreports.designer.querybuilder.DBBrowserTree.java

private void selectionTableOrView(DBBrowserNode selectedNode, MouseEvent e) {
    boolean isTable = true;
    if (selectedNode.getDBObject().getType() == DBObject.VIEW) {
        isTable = false;/*  w w w . j  a v  a 2 s .  co m*/
    }
    ViewTableColumnsInfoAction infoAction = new ViewTableColumnsInfoAction(selectedNode.getDBObject(), isTable);
    if (e.getClickCount() == 2) {
        infoAction.actionPerformed(null);
    } else {
        JPopupMenu popupMenu = new JPopupMenu();
        JMenuItem menuItem = new JMenuItem(infoAction);
        popupMenu.add(menuItem);
        popupMenu.show((Component) e.getSource(), e.getX(), e.getY());
    }
}

From source file:ro.nextreports.designer.querybuilder.DBBrowserTree.java

private void selectionProcedure(DBBrowserNode selectedNode, MouseEvent e) {

    ViewProcedureColumnsInfoAction infoAction = new ViewProcedureColumnsInfoAction(selectedNode.getDBObject());
    if (e.getClickCount() == 2) {
        infoAction.actionPerformed(null);
    } else {// www  . jav  a  2s . c  o m
        JPopupMenu popupMenu = new JPopupMenu();
        JMenuItem menuItem = new JMenuItem(infoAction);
        popupMenu.add(menuItem);
        JMenuItem menuItem2 = new JMenuItem(new ValidateProceduresAction(selectedNode.getDBObject()));
        popupMenu.add(menuItem2);
        popupMenu.show((Component) e.getSource(), e.getX(), e.getY());
    }
}

From source file:ro.nextreports.designer.querybuilder.DBBrowserTree.java

private void selectionProcedureGroup(DBBrowserNode selectedNode, MouseEvent e) {
    if (e.getClickCount() == 2) {
        return;//from  w  w  w.  j a  v a2s  .  com
    }
    ValidateProceduresAction validateAction = new ValidateProceduresAction();
    JPopupMenu popupMenu = new JPopupMenu();
    JMenuItem menuItem = new JMenuItem(validateAction);
    popupMenu.add(menuItem);
    NamePatternAction patternAction = new NamePatternAction(NamePatternAction.PROCEDURE_NAME_PATTERN);
    JMenuItem menuItem2 = new JMenuItem(patternAction);
    popupMenu.add(menuItem2);
    popupMenu.show((Component) e.getSource(), e.getX(), e.getY());
}

From source file:ro.nextreports.designer.querybuilder.DBBrowserTree.java

private void selectionTablesGroup(DBBrowserNode selectedNode, MouseEvent e) {
    if (e.getClickCount() == 2) {
        return;/*from  ww w  . j a v a2  s  . c o  m*/
    }
    JPopupMenu popupMenu = new JPopupMenu();
    NamePatternAction patternAction = new NamePatternAction(NamePatternAction.TABLE_NAME_PATTERN);
    JMenuItem menuItem = new JMenuItem(patternAction);
    popupMenu.add(menuItem);
    popupMenu.show((Component) e.getSource(), e.getX(), e.getY());
}

From source file:ro.nextreports.designer.querybuilder.DBBrowserTree.java

private void selectionViewsGroup(DBBrowserNode selectedNode, MouseEvent e) {
    if (e.getClickCount() == 2) {
        return;/* www.j  a va  2  s .  com*/
    }
    JPopupMenu popupMenu = new JPopupMenu();
    NamePatternAction patternAction = new NamePatternAction(NamePatternAction.VIEW_NAME_PATTERN);
    JMenuItem menuItem = new JMenuItem(patternAction);
    popupMenu.add(menuItem);
    popupMenu.show((Component) e.getSource(), e.getX(), e.getY());
}

From source file:ro.nextreports.designer.querybuilder.DBBrowserTree.java

private void selectionFolder(DBBrowserNode selectedNode, MouseEvent e) {
    if (e.getClickCount() == 2) {
        return;/*from  w  w  w. ja v a 2s  .  c om*/
    }
    JPopupMenu popupMenu = new JPopupMenu();

    boolean testSql = false;
    if (selectedNode.getDBObject().getType() == DBObject.FOLDER_QUERY) {
        testSql = true;
        JMenuItem menuItem = new JMenuItem(new ImportQueryAction(selectedNode.getDBObject().getAbsolutePath()));
        popupMenu.add(menuItem);
    } else if (selectedNode.getDBObject().getType() == DBObject.FOLDER_REPORT) {
        testSql = true;
        JMenuItem menuItem = new JMenuItem(
                new ImportReportAction(selectedNode.getDBObject().getAbsolutePath()));
        popupMenu.add(menuItem);
        JMenuItem menuItem2 = new JMenuItem(
                new DownloadBulkReportAction(selectedNode.getDBObject().getAbsolutePath()));
        popupMenu.add(menuItem2);
    } else if (selectedNode.getDBObject().getType() == DBObject.FOLDER_CHART) {
        testSql = true;
        JMenuItem menuItem = new JMenuItem(new ImportChartAction(selectedNode.getDBObject().getAbsolutePath()));
        popupMenu.add(menuItem);
        JMenuItem menuItem2 = new JMenuItem(
                new DownloadBulkChartAction(selectedNode.getDBObject().getAbsolutePath()));
        popupMenu.add(menuItem2);
    }

    JMenuItem menuItem = new JMenuItem(
            new AddFolderAction(this, selectedNode, selectedNode.getDBObject().getType()));
    popupMenu.add(menuItem);
    JMenuItem menuItem2 = new JMenuItem(new RenameFolderAction(this, selectedNode));
    popupMenu.add(menuItem2);
    JMenuItem menuItem3 = new JMenuItem(new DeleteFolderAction(this, selectedNode));
    popupMenu.add(menuItem3);

    if (testSql) {
        JMenuItem menuItem4 = new JMenuItem(new ValidateSqlsAction(selectedNode.getDBObject()));
        popupMenu.add(menuItem4);
    }

    popupMenu.show((Component) e.getSource(), e.getX(), e.getY());
}

From source file:ro.nextreports.designer.querybuilder.SelectionColumnPanel.java

private void buildUI() {

    setLayout(new GridBagLayout());

    final DBViewer viewer = Globals.getDBViewer();

    schemaCombo = new JComboBox();
    schemaCombo.setPreferredSize(comboDim);

    schemaCombo.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
            String schema = (String) e.getItem();
            shownColumnModel.clear();/*w w  w. ja  v a2 s .c  om*/
            columnModel.clear();
            tableModel.clear();
            try {
                DBInfo dbInfo = viewer.getDBInfo(schema, DBInfo.TABLES | DBInfo.VIEWS);
                List<DBTable> tables = dbInfo.getTables();
                Collections.sort(tables);
                for (DBTable table : tables) {
                    tableModel.addElement(table);
                }
            } catch (NextSqlException ex) {
                LOG.error(ex.getMessage(), ex);
                ex.printStackTrace();
            }
        }
    });

    try {
        List<String> schemas = viewer.getSchemas();
        String schemaName = viewer.getUserSchema();
        Collections.sort(schemas);
        boolean added = false;
        for (String schema : schemas) {
            if (DefaultSchemaManager.getInstance().isVisible(
                    DefaultDataSourceManager.getInstance().getConnectedDataSource().getName(), schema)) {
                added = true;
                schemaCombo.addItem(schema);
            }
        }

        if ((schema == null) || schema.equals(DefaultDBViewer.NO_SCHEMA_NAME)) {
            schema = DefaultDBViewer.NO_SCHEMA_NAME;//viewer.getUserSchema();
        }
        if (!added) {
            schemaCombo.addItem(schema);
        }
        schemaCombo.setSelectedItem(schema);
    } catch (NextSqlException e) {
        LOG.error(e.getMessage(), e);
        e.printStackTrace();
    }

    // create table list
    tableList = new JXList(tableModel);
    tableList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    tableList.setCellRenderer(new DBTableCellRenderer());

    // create column list
    columnList = new JXList(columnModel);
    if (singleSelection) {
        columnList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    } else {
        columnList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    }
    columnList.setCellRenderer(new DBColumnCellRenderer());

    shownColumnList = new JXList(shownColumnModel);
    if (singleSelection) {
        shownColumnList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    } else {
        columnList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    }
    addDoubleClick();

    shownColumnList.setCellRenderer(new DBColumnCellRenderer());
    shownColumnList.addMouseListener(new MouseAdapter() {
        public void mouseClicked(MouseEvent mouseEvent) {
            if ((mouseEvent.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK) {
                JPopupMenu popupMenu = new JPopupMenu();
                JMenuItem menuItem = new JMenuItem(new DeselectListAction(shownColumnList));
                popupMenu.add(menuItem);
                popupMenu.show((Component) mouseEvent.getSource(), mouseEvent.getX(), mouseEvent.getY());
            }
        }
    });

    tableList.addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent e) {
            if (e.getValueIsAdjusting() == false) {
                int index = tableList.getSelectedIndex();
                if (index == -1) {
                    return;
                }
                DBTable table = (DBTable) tableModel.getElementAt(index);
                try {
                    List<DBColumn> columns = null;
                    try {
                        columns = viewer.getColumns(table.getSchema(), table.getName());
                    } catch (MalformedTableNameException e1) {
                        Show.error("Malformed table name : " + table.getName());
                        return;
                    }
                    Collections.sort(columns);
                    columnModel.clear();
                    shownColumnModel.clear();
                    for (DBColumn column : columns) {
                        columnModel.addElement(column);
                        shownColumnModel.addElement(column);
                    }
                } catch (NextSqlException e1) {
                    LOG.error(e1.getMessage(), e1);
                    e1.printStackTrace();
                    Show.error(e1);
                }
            }
        }
    });

    columnList.addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent e) {
            shownColumnList.clearSelection();
        }
    });

    scrTable = new JScrollPane(tableList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
            JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    scrTable.setPreferredSize(scrDim);
    scrTable.setMinimumSize(scrDim);
    scrTable.setBorder(new TitledBorder(I18NSupport.getString("parameter.source.tables")));
    scrColumn = new JScrollPane(columnList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
            JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    scrColumn.setPreferredSize(scrDim);
    scrColumn.setMinimumSize(scrDim);
    scrColumn.setBorder(new TitledBorder(I18NSupport.getString("parameter.source.columns")));
    scrShownColumn = new JScrollPane(shownColumnList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
            JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    scrShownColumn.setPreferredSize(scrDim);
    scrShownColumn.setMinimumSize(scrDim);
    scrShownColumn.setBorder(new TitledBorder(I18NSupport.getString("parameter.source.shown.columns")));

    JPanel schemaPanel = new JPanel();
    schemaPanel.setLayout(new BoxLayout(schemaPanel, BoxLayout.X_AXIS));
    schemaPanel.add(new JLabel("Schema"));
    schemaPanel.add(Box.createHorizontalStrut(5));
    schemaPanel.add(schemaCombo);

    add(schemaPanel, new GridBagConstraints(0, 0, 3, 1, 0.0, 0.0, GridBagConstraints.WEST,
            GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
    add(scrTable, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 5), 0, 0));
    add(scrColumn, new GridBagConstraints(1, 1, 1, 1, 1.0, 1.0, GridBagConstraints.WEST,
            GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0));
    if (show) {
        add(scrShownColumn, new GridBagConstraints(2, 1, 1, 1, 1.0, 1.0, GridBagConstraints.WEST,
                GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    }
}

From source file:ro.nextreports.designer.wizpublish.JcrBrowserTree.java

public JcrBrowserTree(final byte typeRoot, WebServiceClient client) {
    super();//from www.ja  va2 s.co  m
    this.client = client;
    populateTree(typeRoot);

    setCellRenderer(new JcrBrowserTreeRenderer());
    getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);

    instance = this;

    addMouseListener(new MouseAdapter() {
        public void mousePressed(MouseEvent e) {
            job(e, true);
        }

        public void mouseReleased(MouseEvent e) {
            job(e, false);
        }

        private void job(MouseEvent e, boolean pressed) {
            if (e.isPopupTrigger()) {
                final TreePath selPath = getPathForLocation(e.getX(), e.getY());
                if (selPath == null) {
                    return;
                }
                setSelectionPath(selPath);
                try {
                    final DBBrowserNode selectedNode = (DBBrowserNode) selPath.getLastPathComponent();
                    if (selectedNode != null) {

                        JPopupMenu popupMenu = new JPopupMenu();
                        boolean show = false;
                        if ((selectedNode.getDBObject().getType() == DBObject.FOLDER_REPORT)
                                || (selectedNode.getDBObject().getType() == DBObject.DATABASE)
                                || (selectedNode.getDBObject().getType() == DBObject.REPORTS_GROUP)
                                || (selectedNode.getDBObject().getType() == DBObject.CHARTS_GROUP)) {
                            JMenuItem menuItem = new JMenuItem(new PublishFolderAction(selectedNode));
                            popupMenu.add(menuItem);
                            show = true;
                        }

                        if ((typeRoot == DBObject.DATABASE)
                                && ((selectedNode.getDBObject().getType() == DBObject.FOLDER_REPORT)
                                        || (selectedNode.getDBObject().getType() == DBObject.DATABASE))) {
                            PublishDataSourceAction publishDSAction = new PublishDataSourceAction(selectedNode);

                            JMenuItem menuItem2 = new JMenuItem(publishDSAction);
                            popupMenu.add(menuItem2);
                            show = true;
                        }
                        if (show) {
                            popupMenu.show((Component) e.getSource(), e.getX(), e.getY());
                        }
                    }
                } catch (Exception ex) {
                    Show.error(ex);
                }
            }
        }
    });

}

From source file:ru.goodfil.catalog.ui.forms.CarsPanel.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Sasha Ivanov
    DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance();
    panel1 = new JPanel();
    label1 = new JLabel();
    createTypeBtn = new JButton();
    editTypeBtn = new JButton();
    removeTypeBtn = new JButton();
    label2 = new JLabel();
    joinManufactorsBtn = new JButton();
    createManufactorBtn = new JButton();
    editManufactorBtn = new JButton();
    removeManufactorBtn = new JButton();
    label3 = new JLabel();
    joinSeriesBtn = new JButton();
    createSeriaBtn = new JButton();
    editSeriaBtn = new JButton();
    removeSeriaBtn = new JButton();
    scrollPane1 = new JScrollPane();
    vechicleTypesList = new JList();
    scrollPane2 = new JScrollPane();
    manufactorsList = new JList();
    scrollPane3 = new JScrollPane();
    seriesList = new JList();
    panel10 = new JPanel();
    label5 = new JLabel();
    createMotorBtn = new JButton();
    editMotorBtn = new JButton();
    removeMotorBtn = new JButton();
    joinMotorsBtn = new JButton();
    scrollPane4 = new JScrollPane();
    motorsTable = new JTable();
    panel3 = new JPanel();
    label6 = new JLabel();
    label7 = new JLabel();
    panel4 = new JPanel();
    label4 = compFactory.createLabel("\u0424\u0438\u043b\u044c\u0442\u0440");
    filterSearchField = new JTextField();
    filterSearchBtn = new JButton();
    scrollPane5 = new JScrollPane();
    filtersTable = new JTable();
    filterRelationComment = new JButton();
    attachFilterBtn = new JButton();
    scrollPane6 = new JScrollPane();
    allFiltersTable = new JTable();
    detachFilterBtn = new JButton();
    listsPopupMenu = new JPopupMenu();
    miCopyToExcel = new JMenuItem();
    miExportToExcel = new JMenuItem();
    menuItem1 = new JMenuItem();
    menuItem3 = new JMenuItem();
    menuItem2 = new JMenuItem();
    menuItem4 = new JMenuItem();
    CellConstraints cc = new CellConstraints();

    //======== this ========

    // JFormDesigner evaluation mark
    setBorder(/*from   ww  w . j av  a  2s . com*/
            new javax.swing.border.CompoundBorder(
                    new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
                            "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER,
                            javax.swing.border.TitledBorder.BOTTOM,
                            new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red),
                    getBorder()));
    addPropertyChangeListener(new java.beans.PropertyChangeListener() {
        public void propertyChange(java.beans.PropertyChangeEvent e) {
            if ("border".equals(e.getPropertyName()))
                throw new RuntimeException();
        }
    });

    setLayout(new FormLayout("default:grow", "fill:default:grow"));

    //======== panel1 ========
    {
        panel1.setLayout(new FormLayout(
                "default:grow, $lcgap, 3*(21pt), $lcgap, default:grow, $lcgap, 21dlu, $lcgap, 3*(21pt), $lcgap, default:grow, $lcgap, 21dlu, $lcgap, 3*(21pt)",
                "fill:21pt, fill:50dlu:grow, $lgap, min, fill:100dlu:grow, $lgap, fill:80dlu:grow"));

        //---- label1 ----
        label1.setText("\u0422\u0438\u043f \u0422\u0421");
        label1.setFont(label1.getFont().deriveFont(label1.getFont().getStyle() | Font.BOLD));
        panel1.add(label1, cc.xy(1, 1));

        //---- createTypeBtn ----
        createTypeBtn.setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/add_24.png")));
        createTypeBtn.setAlignmentY(0.0F);
        createTypeBtn.setToolTipText(
                "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0438\u043f \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u043e\u0433\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430");
        createTypeBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                createTypeBtnActionPerformed(e);
            }
        });
        panel1.add(createTypeBtn, cc.xy(3, 1));

        //---- editTypeBtn ----
        editTypeBtn.setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/edit_24.png")));
        editTypeBtn.setToolTipText(
                "\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u043e\u0433\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430");
        editTypeBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                editTypeBtnActionPerformed(e);
            }
        });
        panel1.add(editTypeBtn, cc.xy(4, 1));

        //---- removeTypeBtn ----
        removeTypeBtn
                .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/delete_24.png")));
        removeTypeBtn.setToolTipText(
                "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u0438\u043f \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u043e\u0433\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430");
        removeTypeBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                removeTypeBtnActionPerformed(e);
            }
        });
        panel1.add(removeTypeBtn, cc.xy(5, 1));

        //---- label2 ----
        label2.setText("\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c");
        label2.setFont(label2.getFont().deriveFont(label2.getFont().getStyle() | Font.BOLD));
        panel1.add(label2, cc.xy(7, 1));

        //---- joinManufactorsBtn ----
        joinManufactorsBtn
                .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/recycle_24.png")));
        joinManufactorsBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                joinManufactorsBtnActionPerformed(e);
            }
        });
        panel1.add(joinManufactorsBtn, cc.xy(9, 1));

        //---- createManufactorBtn ----
        createManufactorBtn
                .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/add_24.png")));
        createManufactorBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                createManufactorBtnActionPerformed(e);
            }
        });
        panel1.add(createManufactorBtn, cc.xy(11, 1));

        //---- editManufactorBtn ----
        editManufactorBtn
                .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/edit_24.png")));
        editManufactorBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                editManufactorBtnActionPerformed(e);
            }
        });
        panel1.add(editManufactorBtn, cc.xy(12, 1));

        //---- removeManufactorBtn ----
        removeManufactorBtn
                .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/delete_24.png")));
        removeManufactorBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                removeManufactorBtnActionPerformed(e);
            }
        });
        panel1.add(removeManufactorBtn, cc.xy(13, 1));

        //---- label3 ----
        label3.setText("\u0421\u0435\u0440\u0438\u044f");
        label3.setFont(label3.getFont().deriveFont(label3.getFont().getStyle() | Font.BOLD));
        panel1.add(label3, cc.xy(15, 1));

        //---- joinSeriesBtn ----
        joinSeriesBtn
                .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/recycle_24.png")));
        joinSeriesBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                joinSeriesBtnActionPerformed(e);
            }
        });
        panel1.add(joinSeriesBtn, cc.xy(17, 1));

        //---- createSeriaBtn ----
        createSeriaBtn
                .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/add_24.png")));
        createSeriaBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                createSeriaBtnActionPerformed(e);
            }
        });
        panel1.add(createSeriaBtn, cc.xy(19, 1));

        //---- editSeriaBtn ----
        editSeriaBtn.setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/edit_24.png")));
        editSeriaBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                editSeriaBtnActionPerformed(e);
            }
        });
        panel1.add(editSeriaBtn, cc.xy(20, 1));

        //---- removeSeriaBtn ----
        removeSeriaBtn
                .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/delete_24.png")));
        removeSeriaBtn.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                removeSeriaBtnActionPerformed(e);
            }
        });
        panel1.add(removeSeriaBtn, cc.xy(21, 1));

        //======== scrollPane1 ========
        {

            //---- vechicleTypesList ----
            vechicleTypesList.setDoubleBuffered(true);
            vechicleTypesList.addListSelectionListener(new ListSelectionListener() {
                @Override
                public void valueChanged(ListSelectionEvent e) {
                    vechicleTypesListValueChanged(e);
                }
            });
            vechicleTypesList.addKeyListener(new KeyAdapter() {
                @Override
                public void keyPressed(KeyEvent e) {
                    vechicleTypesListKeyPressed(e);
                }
            });
            vechicleTypesList.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    vechicleTypesListMouseClicked(e);
                }
            });
            scrollPane1.setViewportView(vechicleTypesList);
        }
        panel1.add(scrollPane1, cc.xywh(1, 2, 5, 1));

        //======== scrollPane2 ========
        {

            //---- manufactorsList ----
            manufactorsList.setDoubleBuffered(true);
            manufactorsList.addListSelectionListener(new ListSelectionListener() {
                @Override
                public void valueChanged(ListSelectionEvent e) {
                    manufactorsListValueChanged(e);
                }
            });
            manufactorsList.addKeyListener(new KeyAdapter() {
                @Override
                public void keyPressed(KeyEvent e) {
                    manufactorsListKeyPressed(e);
                }
            });
            manufactorsList.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    manufactorsListMouseClicked(e);
                }
            });
            scrollPane2.setViewportView(manufactorsList);
        }
        panel1.add(scrollPane2, cc.xywh(7, 2, 7, 1));

        //======== scrollPane3 ========
        {

            //---- seriesList ----
            seriesList.addListSelectionListener(new ListSelectionListener() {
                @Override
                public void valueChanged(ListSelectionEvent e) {
                    seriesListValueChanged(e);
                }
            });
            seriesList.addKeyListener(new KeyAdapter() {
                @Override
                public void keyPressed(KeyEvent e) {
                    seriesListKeyPressed(e);
                }
            });
            seriesList.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    seriesListMouseClicked(e);
                }
            });
            scrollPane3.setViewportView(seriesList);
        }
        panel1.add(scrollPane3, cc.xywh(15, 2, 7, 1));

        //======== panel10 ========
        {
            panel10.setLayout(new FormLayout("default, $lcgap, 4*(21dlu)", "default"));

            //---- label5 ----
            label5.setText("\u0414\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0438");
            label5.setFont(label5.getFont().deriveFont(label5.getFont().getStyle() | Font.BOLD));
            panel10.add(label5, cc.xy(1, 1));

            //---- createMotorBtn ----
            createMotorBtn
                    .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/add_24.png")));
            createMotorBtn.setAlignmentY(0.0F);
            createMotorBtn.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    createMotorBtnActionPerformed(e);
                }
            });
            panel10.add(createMotorBtn, cc.xy(3, 1));

            //---- editMotorBtn ----
            editMotorBtn
                    .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/edit_24.png")));
            editMotorBtn.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    editMotorBtnActionPerformed(e);
                }
            });
            panel10.add(editMotorBtn, cc.xy(4, 1));

            //---- removeMotorBtn ----
            removeMotorBtn.setIcon(
                    new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/delete_24.png")));
            removeMotorBtn.setEnabled(false);
            removeMotorBtn.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    removeMotorBtnActionPerformed(e);
                }
            });
            panel10.add(removeMotorBtn, cc.xy(5, 1));

            //---- joinMotorsBtn ----
            joinMotorsBtn.setIcon(
                    new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/recycle_24.png")));
            joinMotorsBtn.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    joinMotorsBtnActionPerformed(e);
                }
            });
            panel10.add(joinMotorsBtn, cc.xy(6, 1));
        }
        panel1.add(panel10, cc.xywh(1, 4, 21, 1));

        //======== scrollPane4 ========
        {

            //---- motorsTable ----
            motorsTable.setAutoCreateRowSorter(true);
            motorsTable.addKeyListener(new KeyAdapter() {
                @Override
                public void keyPressed(KeyEvent e) {
                    motorsTableKeyPressed(e);
                }
            });
            motorsTable.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    motorsTableMouseClicked(e);
                }
            });
            scrollPane4.setViewportView(motorsTable);
        }
        panel1.add(scrollPane4, cc.xywh(1, 5, 21, 1));

        //======== panel3 ========
        {
            panel3.setLayout(new FormLayout("default:grow, $lcgap, 21dlu, $lcgap, default:grow",
                    "3*(default), $lgap, default, $lgap, fill:default:grow"));

            //---- label6 ----
            label6.setText(
                    "\u041f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u044b");
            label6.setFont(label6.getFont().deriveFont(label6.getFont().getStyle() | Font.BOLD));
            panel3.add(label6, cc.xy(1, 1));

            //---- label7 ----
            label7.setText("\u0412\u0441\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u044b");
            label7.setFont(label7.getFont().deriveFont(label7.getFont().getStyle() | Font.BOLD));
            panel3.add(label7, cc.xy(5, 1));

            //======== panel4 ========
            {
                panel4.setLayout(new FormLayout("default, $lcgap, default:grow, 21pt", "21dlu"));
                panel4.add(label4, cc.xy(1, 1));

                //---- filterSearchField ----
                filterSearchField.addKeyListener(new KeyAdapter() {
                    @Override
                    public void keyPressed(KeyEvent e) {
                        filterSearchFieldKeyPressed(e);
                    }
                });
                panel4.add(filterSearchField, cc.xy(3, 1));

                //---- filterSearchBtn ----
                filterSearchBtn.setIcon(
                        new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/find_next_24.png")));
                filterSearchBtn.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        filterSearchBtnActionPerformed(e);
                    }
                });
                panel4.add(filterSearchBtn, cc.xy(4, 1));
            }
            panel3.add(panel4, cc.xy(5, 2));

            //======== scrollPane5 ========
            {

                //---- filtersTable ----
                filtersTable.setAutoCreateRowSorter(true);
                filtersTable.addMouseListener(new MouseAdapter() {
                    @Override
                    public void mouseClicked(MouseEvent e) {
                        filtersTableMouseClicked(e);
                    }
                });
                scrollPane5.setViewportView(filtersTable);
            }
            panel3.add(scrollPane5, cc.xywh(1, 2, 1, 6));

            //---- filterRelationComment ----
            filterRelationComment
                    .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/edit.png")));
            filterRelationComment.setToolTipText(
                    "\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043a \u0444\u0438\u043b\u044c\u0442\u0440\u0443 \u0443 \u0434\u0430\u043d\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b");
            filterRelationComment.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    filterRelationCommentActionPerformed(e);
                }
            });
            panel3.add(filterRelationComment, cc.xy(3, 2));

            //---- attachFilterBtn ----
            attachFilterBtn.setIcon(new ImageIcon(
                    getClass().getResource("/ru/goodfil/catalog/ui/icons/arrow_left_green_24.png")));
            attachFilterBtn.setToolTipText(
                    "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440 \u0432 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e\u0441\u0442\u044c");
            attachFilterBtn.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    attachFilterBtnActionPerformed(e);
                }
            });
            panel3.add(attachFilterBtn, cc.xy(3, 3));

            //======== scrollPane6 ========
            {

                //---- allFiltersTable ----
                allFiltersTable.setAutoCreateRowSorter(true);
                allFiltersTable.addMouseListener(new MouseAdapter() {
                    @Override
                    public void mouseClicked(MouseEvent e) {
                        allFiltersTableMouseClicked(e);
                    }
                });
                scrollPane6.setViewportView(allFiltersTable);
            }
            panel3.add(scrollPane6, cc.xywh(5, 3, 1, 5));

            //---- detachFilterBtn ----
            detachFilterBtn.setIcon(new ImageIcon(
                    getClass().getResource("/ru/goodfil/catalog/ui/icons/arrow_right_green_24.png")));
            detachFilterBtn.setToolTipText(
                    "\u0423\u0431\u0440\u0430\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e\u0441\u0442\u0438");
            detachFilterBtn.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    detachFilterBtnActionPerformed(e);
                }
            });
            panel3.add(detachFilterBtn, cc.xy(3, 5));
        }
        panel1.add(panel3, cc.xywh(1, 7, 21, 1));
    }
    add(panel1, cc.xy(1, 1));

    //======== listsPopupMenu ========
    {
        listsPopupMenu.addPopupMenuListener(new PopupMenuListener() {
            @Override
            public void popupMenuCanceled(PopupMenuEvent e) {
            }

            @Override
            public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
            }

            @Override
            public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
                listsPopupMenuPopupMenuWillBecomeVisible(e);
            }
        });

        //---- miCopyToExcel ----
        miCopyToExcel.setText("\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 Excel");
        miCopyToExcel.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                miCopyToExcelActionPerformed(e);
            }
        });
        listsPopupMenu.add(miCopyToExcel);

        //---- miExportToExcel ----
        miExportToExcel.setText("\u0412\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432 Excel");
        miExportToExcel.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                miExportToExcelActionPerformed(e);
            }
        });
        listsPopupMenu.add(miExportToExcel);
        listsPopupMenu.addSeparator();

        //---- menuItem1 ----
        menuItem1.setText(
                "\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440");
        menuItem1.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                copyToClipboard(e);
            }
        });
        listsPopupMenu.add(menuItem1);

        //---- menuItem3 ----
        menuItem3.setText(
                "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u0437 \u0431\u0443\u0444\u0435\u0440\u0430");
        menuItem3.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                pasteFromClipboard(e);
            }
        });
        listsPopupMenu.add(menuItem3);
        listsPopupMenu.addSeparator();

        //---- menuItem2 ----
        menuItem2.setText(
                "\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440 (\u0421 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c)");
        menuItem2.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                cutToClipboard(e);
            }
        });
        listsPopupMenu.add(menuItem2);

        //---- menuItem4 ----
        menuItem4.setText(
                "\u0412\u044b\u043d\u0435\u0441\u0442\u0438 \u0438\u0437 \u0431\u0443\u0444\u0435\u0440\u0430");
        menuItem4.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                pasteFromClipboard(e);
            }
        });
        listsPopupMenu.add(menuItem4);
    }
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}