Search in sources :

Example 96 with JTableHeader

use of javax.swing.table.JTableHeader in project mars-sim by mars-sim.

the class DefaultTableHeaderCellRenderer method getTableCellRendererComponent.

/**
 * Returns the default table header cell renderer.
 * <P>
 * If the column is sorted, the approapriate icon is retrieved from the
 * current Look and Feel, and a border appropriate to a table header cell
 * is applied.
 * <P>
 * Subclasses may overide this method to provide custom content or
 * formatting.
 *
 * @param table the <code>JTable</code>.
 * @param value the value to assign to the header cell
 * @param isSelected This parameter is ignored.
 * @param hasFocus This parameter is ignored.
 * @param row This parameter is ignored.
 * @param column the column of the header cell to render
 * @return the default table header cell renderer
 */
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
    super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
    JTableHeader tableHeader = table.getTableHeader();
    if (tableHeader != null) {
        setForeground(tableHeader.getForeground());
        // new Color(205, 133, 63));//Color.ORANGE);
        setBackground(tableHeader.getBackground());
        setForeground(new Color(255, 255, 120));
    }
    // TableStyle.setTableStyle(table);
    setIcon(getIcon(table, column));
    setBorder(UIManager.getBorder("TableHeader.cellBorder"));
    return this;
}
Also used : Color(java.awt.Color) JTableHeader(javax.swing.table.JTableHeader)

Example 97 with JTableHeader

use of javax.swing.table.JTableHeader in project spotbugs by spotbugs.

the class MainFrameTree method bugListPanel.

public JPanel bugListPanel() {
    tableheader = new JTableHeader();
    getTableheader().setCursor(Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR));
    // Listener put here for when user double clicks on sorting
    // column header SorterDialog appears.
    getTableheader().addMouseListener(new MouseAdapter() {

        @Override
        public void mouseClicked(MouseEvent e) {
            Debug.println("tableheader.getReorderingAllowed() = " + getTableheader().getReorderingAllowed());
            if (!getTableheader().getReorderingAllowed()) {
                return;
            }
            if (e.getClickCount() == 2) {
                SorterDialog.getInstance().setVisible(true);
            }
        }

        @Override
        public void mouseReleased(MouseEvent arg0) {
            if (!getTableheader().getReorderingAllowed()) {
                return;
            }
            BugTreeModel bt = (BugTreeModel) (getTree().getModel());
            bt.checkSorter();
        }
    });
    sorter = GUISaveState.getInstance().getStarterTable();
    getTableheader().setColumnModel(getSorter());
    getTableheader().setToolTipText(edu.umd.cs.findbugs.L10N.getLocalString("tooltip.reorder_message", "Drag to reorder tree folder and sort order"));
    tree = new JTree();
    getTree().setLargeModel(true);
    getTree().getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    getTree().setCellRenderer(new BugRenderer());
    getTree().setRowHeight((int) (Driver.getFontSize() + 7));
    getTree().setModel(new BugTreeModel(mainFrame, getTree(), getSorter(), new BugSet(new ArrayList<BugLeafNode>())));
    setupTreeListeners();
    mainFrame.setProject(new Project());
    treeScrollPane = new JScrollPane(getTree());
    treePanel = new JPanel(new BorderLayout());
    treePanel.add(treeScrollPane, BorderLayout.CENTER);
    JTable t = new JTable(new DefaultTableModel(0, sortables().length));
    t.setTableHeader(getTableheader());
    textFieldForPackagesToDisplay = new JTextField();
    ActionListener filterAction = e -> {
        try {
            String text = textFieldForPackagesToDisplay.getText();
            if (text.indexOf('/') >= 0) {
                text = text.replace('/', '.');
                textFieldForPackagesToDisplay.setText(text);
            }
            mainFrame.getViewFilter().setPackagesToDisplay(text);
            mainFrame.resetViewCache();
        } catch (IllegalArgumentException err) {
            JOptionPane.showMessageDialog(mainFrame, err.getMessage(), "Bad class search string", JOptionPane.ERROR_MESSAGE);
        }
    };
    textFieldForPackagesToDisplay.addActionListener(filterAction);
    JButton filterButton = new JButton("Filter");
    filterButton.addActionListener(filterAction);
    JPanel filterPanel = new JPanel();
    filterPanel.setLayout(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.weightx = 1;
    gbc.fill = GridBagConstraints.BOTH;
    gbc.gridy = 1;
    filterPanel.add(textFieldForPackagesToDisplay, gbc);
    gbc.weightx = 0;
    gbc.fill = GridBagConstraints.NONE;
    filterPanel.add(filterButton, gbc);
    filterPanel.setToolTipText("Only show classes containing the word(s) you specify");
    JPanel sortablePanel = new JPanel(new GridBagLayout());
    JLabel sortableLabel = new JLabel("Group bugs by:");
    sortableLabel.setLabelFor(getTableheader());
    gbc = new GridBagConstraints();
    gbc.weightx = 0;
    gbc.gridy = 1;
    gbc.insets = new Insets(3, 3, 3, 3);
    gbc.fill = GridBagConstraints.BOTH;
    sortablePanel.add(sortableLabel, gbc);
    gbc.weightx = 1;
    sortablePanel.add(getTableheader(), gbc);
    getTableheader().setBorder(new LineBorder(Color.BLACK));
    JPanel topPanel = makeNavigationPanel("Class name filter:", filterPanel, sortablePanel, treePanel);
    cardPanel = new JPanel(new CardLayout());
    JPanel waitPanel = new JPanel();
    waitPanel.setLayout(new BoxLayout(waitPanel, BoxLayout.Y_AXIS));
    waitPanel.add(new JLabel("Please wait..."));
    waitStatusLabel = new JLabel();
    waitPanel.add(waitStatusLabel);
    cardPanel.add(topPanel, MainFrame.BugCard.TREECARD.name());
    cardPanel.add(waitPanel, MainFrame.BugCard.WAITCARD.name());
    return cardPanel;
}
Also used : Color(java.awt.Color) Insets(java.awt.Insets) Arrays(java.util.Arrays) TreeModelEvent(javax.swing.event.TreeModelEvent) CardLayout(java.awt.CardLayout) ActionListener(java.awt.event.ActionListener) Filter(edu.umd.cs.findbugs.filter.Filter) JTextField(javax.swing.JTextField) Cursor(java.awt.Cursor) Action(javax.swing.Action) LineBorder(javax.swing.border.LineBorder) JTableHeader(javax.swing.table.JTableHeader) TreeSelectionEvent(javax.swing.event.TreeSelectionEvent) ArrayList(java.util.ArrayList) SwingUtilities(javax.swing.SwingUtilities) TreeSelectionListener(javax.swing.event.TreeSelectionListener) JMenuItem(javax.swing.JMenuItem) FilterActivityNotifier(edu.umd.cs.findbugs.gui2.FilterActivity.FilterActivityNotifier) MouseAdapter(java.awt.event.MouseAdapter) BorderLayout(java.awt.BorderLayout) ActionMap(javax.swing.ActionMap) MouseListener(java.awt.event.MouseListener) BoxLayout(javax.swing.BoxLayout) JComponent(javax.swing.JComponent) Project(edu.umd.cs.findbugs.Project) JButton(javax.swing.JButton) DefaultTableModel(javax.swing.table.DefaultTableModel) TreePath(javax.swing.tree.TreePath) Window(java.awt.Window) JPopupMenu(javax.swing.JPopupMenu) Matcher(edu.umd.cs.findbugs.filter.Matcher) TreeSelectionModel(javax.swing.tree.TreeSelectionModel) GridBagConstraints(java.awt.GridBagConstraints) JOptionPane(javax.swing.JOptionPane) JTree(javax.swing.JTree) MouseEvent(java.awt.event.MouseEvent) JScrollPane(javax.swing.JScrollPane) Dimension(java.awt.Dimension) List(java.util.List) JLabel(javax.swing.JLabel) JTable(javax.swing.JTable) GridBagLayout(java.awt.GridBagLayout) Collections(java.util.Collections) JPanel(javax.swing.JPanel) JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) DefaultTableModel(javax.swing.table.DefaultTableModel) LineBorder(javax.swing.border.LineBorder) BoxLayout(javax.swing.BoxLayout) JButton(javax.swing.JButton) JTableHeader(javax.swing.table.JTableHeader) JTextField(javax.swing.JTextField) BorderLayout(java.awt.BorderLayout) JScrollPane(javax.swing.JScrollPane) CardLayout(java.awt.CardLayout) MouseEvent(java.awt.event.MouseEvent) MouseAdapter(java.awt.event.MouseAdapter) JLabel(javax.swing.JLabel) Project(edu.umd.cs.findbugs.Project) JTree(javax.swing.JTree) ActionListener(java.awt.event.ActionListener) JTable(javax.swing.JTable)

Example 98 with JTableHeader

use of javax.swing.table.JTableHeader in project spotbugs by spotbugs.

the class SorterDialog method createSorterPane.

/**
 * Creates JPanel with checkboxes of different things to sort by. List is:
 * priority, class, package, category, bugcode, status, and type.
 */
private JPanel createSorterPane() {
    JPanel insidePanel = new JPanel();
    insidePanel.setLayout(new GridBagLayout());
    preview = new JTableHeader();
    Sortables[] sortables = MainFrame.getInstance().getAvailableSortables();
    preview.setColumnModel(new SorterTableColumnModel(sortables));
    for (Sortables s : sortables) {
        if (s != Sortables.DIVIDER) {
            checkBoxSortList.add(new SortableCheckBox(s));
        }
    }
    setSorterCheckBoxes();
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.fill = GridBagConstraints.BOTH;
    gbc.gridx = 1;
    gbc.insets = new Insets(2, 5, 2, 5);
    insidePanel.add(new JLabel("<html><h2>1. Choose bug properties"), gbc);
    insidePanel.add(new CheckBoxList<>(checkBoxSortList.toArray(new JCheckBox[checkBoxSortList.size()])), gbc);
    JTable t = new JTable(new DefaultTableModel(0, sortables.length));
    t.setTableHeader(preview);
    preview.setCursor(Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR));
    insidePanel.add(new JLabel("<html><h2>2. Drag and drop to change grouping priority"), gbc);
    insidePanel.add(createAppropriatelySizedScrollPane(t), gbc);
    sortApply = new JButton(edu.umd.cs.findbugs.L10N.getLocalString("dlg.apply_btn", "Apply"));
    sortApply.addActionListener(e -> {
        MainFrame.getInstance().getSorter().createFrom((SorterTableColumnModel) preview.getColumnModel());
        ((BugTreeModel) MainFrame.getInstance().getTree().getModel()).checkSorter();
        SorterDialog.this.dispose();
    });
    gbc.fill = GridBagConstraints.NONE;
    insidePanel.add(sortApply, gbc);
    JPanel sorter = new JPanel();
    sorter.setLayout(new BorderLayout());
    sorter.add(new JScrollPane(insidePanel), BorderLayout.CENTER);
    return sorter;
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) DefaultTableModel(javax.swing.table.DefaultTableModel) JButton(javax.swing.JButton) JTableHeader(javax.swing.table.JTableHeader) JLabel(javax.swing.JLabel) BorderLayout(java.awt.BorderLayout) JTable(javax.swing.JTable)

Example 99 with JTableHeader

use of javax.swing.table.JTableHeader in project peptide-shaker by compomics.

the class ProteinStructurePanel method initComponents.

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
void initComponents() {
    pdbStructureJPanel = new javax.swing.JPanel();
    pdbStructureLayeredPane = new javax.swing.JLayeredPane();
    pdbOuterPanel = new javax.swing.JPanel();
    pdbLayeredPane = new javax.swing.JLayeredPane();
    pdbPanel = new javax.swing.JPanel();
    labelsJButton = new javax.swing.JButton();
    ribbonJButton = new javax.swing.JButton();
    backboneJButton = new javax.swing.JButton();
    playJButton = new javax.swing.JButton();
    pdbStructureHelpJButton = new javax.swing.JButton();
    exportPdbStructureJButton = new javax.swing.JButton();
    contextMenuPdbStructureBackgroundPanel = new javax.swing.JPanel();
    proteinsJPanel = new javax.swing.JPanel();
    proteinsLayeredPane = new javax.swing.JLayeredPane();
    proteinsPanel = new javax.swing.JPanel();
    proteinScrollPane = new javax.swing.JScrollPane();
    proteinTable = new JTable() {

        protected JTableHeader createDefaultTableHeader() {
            return new JTableHeader(columnModel) {

                public String getToolTipText(MouseEvent e) {
                    java.awt.Point p = e.getPoint();
                    int index = columnModel.getColumnIndexAtX(p.x);
                    int realIndex = columnModel.getColumn(index).getModelIndex();
                    String tip = (String) proteinTableToolTips.get(realIndex);
                    return tip;
                }
            };
        }
    };
    proteinsHelpJButton = new javax.swing.JButton();
    exportProteinsJButton = new javax.swing.JButton();
    contextMenuProteinsBackgroundPanel = new javax.swing.JPanel();
    peptidesJPanel = new javax.swing.JPanel();
    peptidesLayeredPane = new javax.swing.JLayeredPane();
    peptidesPanel = new javax.swing.JPanel();
    peptideScrollPane = new javax.swing.JScrollPane();
    peptideTable = new JTable() {

        protected JTableHeader createDefaultTableHeader() {
            return new JTableHeader(columnModel) {

                public String getToolTipText(MouseEvent e) {
                    java.awt.Point p = e.getPoint();
                    int index = columnModel.getColumnIndexAtX(p.x);
                    int realIndex = columnModel.getColumn(index).getModelIndex();
                    String tip = (String) peptideTableToolTips.get(realIndex);
                    return tip;
                }
            };
        }
    };
    peptidesHelpJButton = new javax.swing.JButton();
    exportPeptidesJButton = new javax.swing.JButton();
    contextMenuPeptidesBackgroundPanel = new javax.swing.JPanel();
    pdbMatchesJPanel = new javax.swing.JPanel();
    pdbMatchesLayeredPane = new javax.swing.JLayeredPane();
    pdbMatchesPanel = new javax.swing.JPanel();
    pdbJScrollPane = new javax.swing.JScrollPane();
    pdbMatchesJTable = new JTable() {

        protected JTableHeader createDefaultTableHeader() {
            return new JTableHeader(columnModel) {

                public String getToolTipText(MouseEvent e) {
                    java.awt.Point p = e.getPoint();
                    int index = columnModel.getColumnIndexAtX(p.x);
                    int realIndex = columnModel.getColumn(index).getModelIndex();
                    String tip = (String) pdbTableToolTips.get(realIndex);
                    return tip;
                }
            };
        }
    };
    pdbMatchesHelpJButton = new javax.swing.JButton();
    exportPdbMatchesJButton = new javax.swing.JButton();
    contextMenuPdbMatchesBackgroundPanel = new javax.swing.JPanel();
    pdbChainsJPanel = new javax.swing.JPanel();
    pdbChainsLayeredPane = new javax.swing.JLayeredPane();
    pdbChainsPanel = new javax.swing.JPanel();
    pdbChainsJScrollPane = new javax.swing.JScrollPane();
    pdbChainsJTable = new JTable() {

        protected JTableHeader createDefaultTableHeader() {
            return new JTableHeader(columnModel) {

                public String getToolTipText(MouseEvent e) {
                    java.awt.Point p = e.getPoint();
                    int index = columnModel.getColumnIndexAtX(p.x);
                    int realIndex = columnModel.getColumn(index).getModelIndex();
                    String tip = (String) pdbChainsTableToolTips.get(realIndex);
                    return tip;
                }
            };
        }
    };
    pdbChainHelpJButton = new javax.swing.JButton();
    exportPdbChainsJButton = new javax.swing.JButton();
    contextMenuPdbChainsBackgroundPanel = new javax.swing.JPanel();
    setBackground(new java.awt.Color(255, 255, 255));
    addComponentListener(new java.awt.event.ComponentAdapter() {

        public void componentResized(java.awt.event.ComponentEvent evt) {
            formComponentResized(evt);
        }
    });
    pdbStructureJPanel.setOpaque(false);
    pdbOuterPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("PDB Structure"));
    pdbOuterPanel.setOpaque(false);
    pdbLayeredPane.addComponentListener(new java.awt.event.ComponentAdapter() {

        public void componentResized(java.awt.event.ComponentEvent evt) {
            pdbLayeredPaneComponentResized(evt);
        }
    });
    pdbPanel.setLayout(new javax.swing.BoxLayout(pdbPanel, javax.swing.BoxLayout.LINE_AXIS));
    pdbPanel.setBounds(0, 0, 435, 440);
    pdbLayeredPane.add(pdbPanel, javax.swing.JLayeredPane.DEFAULT_LAYER);
    // NOI18N
    labelsJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/labels_selected.png")));
    labelsJButton.setToolTipText("Hide Modification Labels");
    labelsJButton.setBorder(null);
    labelsJButton.setBorderPainted(false);
    labelsJButton.setContentAreaFilled(false);
    labelsJButton.setFocusable(false);
    labelsJButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    labelsJButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    labelsJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            labelsJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            labelsJButtonMouseExited(evt);
        }
    });
    labelsJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            labelsJButtonActionPerformed(evt);
        }
    });
    labelsJButton.setBounds(0, 0, 25, 25);
    pdbLayeredPane.add(labelsJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    // NOI18N
    ribbonJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/ribbon_selected.png")));
    ribbonJButton.setToolTipText("Ribbon Model");
    ribbonJButton.setBorder(null);
    ribbonJButton.setBorderPainted(false);
    ribbonJButton.setContentAreaFilled(false);
    ribbonJButton.setFocusable(false);
    ribbonJButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    ribbonJButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    ribbonJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            ribbonJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            ribbonJButtonMouseExited(evt);
        }
    });
    ribbonJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            ribbonJButtonActionPerformed(evt);
        }
    });
    ribbonJButton.setBounds(0, 0, 25, 25);
    pdbLayeredPane.add(ribbonJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    // NOI18N
    backboneJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/backbone.png")));
    backboneJButton.setToolTipText("Backbone Model");
    backboneJButton.setBorder(null);
    backboneJButton.setBorderPainted(false);
    backboneJButton.setContentAreaFilled(false);
    backboneJButton.setFocusable(false);
    backboneJButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    backboneJButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    backboneJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            backboneJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            backboneJButtonMouseExited(evt);
        }
    });
    backboneJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            backboneJButtonActionPerformed(evt);
        }
    });
    backboneJButton.setBounds(0, 0, 25, 25);
    pdbLayeredPane.add(backboneJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    // NOI18N
    playJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/pause.png")));
    playJButton.setToolTipText("Stop Rotation");
    playJButton.setBorder(null);
    playJButton.setBorderPainted(false);
    playJButton.setContentAreaFilled(false);
    playJButton.setFocusable(false);
    playJButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    playJButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    playJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            playJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            playJButtonMouseExited(evt);
        }
    });
    playJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            playJButtonActionPerformed(evt);
        }
    });
    playJButton.setBounds(0, 0, 21, 21);
    pdbLayeredPane.add(playJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    javax.swing.GroupLayout pdbOuterPanelLayout = new javax.swing.GroupLayout(pdbOuterPanel);
    pdbOuterPanel.setLayout(pdbOuterPanelLayout);
    pdbOuterPanelLayout.setHorizontalGroup(pdbOuterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 448, Short.MAX_VALUE).addGroup(pdbOuterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(pdbOuterPanelLayout.createSequentialGroup().addContainerGap().addComponent(pdbLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 428, Short.MAX_VALUE).addContainerGap())));
    pdbOuterPanelLayout.setVerticalGroup(pdbOuterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 463, Short.MAX_VALUE).addGroup(pdbOuterPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pdbOuterPanelLayout.createSequentialGroup().addContainerGap().addComponent(pdbLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 441, Short.MAX_VALUE).addContainerGap())));
    pdbOuterPanel.setBounds(0, 0, 460, 490);
    pdbStructureLayeredPane.add(pdbOuterPanel, javax.swing.JLayeredPane.DEFAULT_LAYER);
    // NOI18N
    pdbStructureHelpJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame_grey.png")));
    pdbStructureHelpJButton.setToolTipText("Help");
    pdbStructureHelpJButton.setBorder(null);
    pdbStructureHelpJButton.setBorderPainted(false);
    pdbStructureHelpJButton.setContentAreaFilled(false);
    // NOI18N
    pdbStructureHelpJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame.png")));
    pdbStructureHelpJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            pdbStructureHelpJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            pdbStructureHelpJButtonMouseExited(evt);
        }
    });
    pdbStructureHelpJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            pdbStructureHelpJButtonActionPerformed(evt);
        }
    });
    pdbStructureHelpJButton.setBounds(440, 0, 10, 19);
    pdbStructureLayeredPane.add(pdbStructureHelpJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    // NOI18N
    exportPdbStructureJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportPdbStructureJButton.setToolTipText("Export");
    exportPdbStructureJButton.setBorder(null);
    exportPdbStructureJButton.setBorderPainted(false);
    exportPdbStructureJButton.setContentAreaFilled(false);
    // NOI18N
    exportPdbStructureJButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportPdbStructureJButton.setEnabled(false);
    // NOI18N
    exportPdbStructureJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame.png")));
    exportPdbStructureJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            exportPdbStructureJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            exportPdbStructureJButtonMouseExited(evt);
        }
    });
    exportPdbStructureJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exportPdbStructureJButtonActionPerformed(evt);
        }
    });
    exportPdbStructureJButton.setBounds(430, 0, 10, 19);
    pdbStructureLayeredPane.add(exportPdbStructureJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    contextMenuPdbStructureBackgroundPanel.setBackground(new java.awt.Color(255, 255, 255));
    javax.swing.GroupLayout contextMenuPdbStructureBackgroundPanelLayout = new javax.swing.GroupLayout(contextMenuPdbStructureBackgroundPanel);
    contextMenuPdbStructureBackgroundPanel.setLayout(contextMenuPdbStructureBackgroundPanelLayout);
    contextMenuPdbStructureBackgroundPanelLayout.setHorizontalGroup(contextMenuPdbStructureBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 30, Short.MAX_VALUE));
    contextMenuPdbStructureBackgroundPanelLayout.setVerticalGroup(contextMenuPdbStructureBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 19, Short.MAX_VALUE));
    contextMenuPdbStructureBackgroundPanel.setBounds(420, 0, 30, 19);
    pdbStructureLayeredPane.add(contextMenuPdbStructureBackgroundPanel, javax.swing.JLayeredPane.POPUP_LAYER);
    javax.swing.GroupLayout pdbStructureJPanelLayout = new javax.swing.GroupLayout(pdbStructureJPanel);
    pdbStructureJPanel.setLayout(pdbStructureJPanelLayout);
    pdbStructureJPanelLayout.setHorizontalGroup(pdbStructureJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(pdbStructureLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 466, Short.MAX_VALUE));
    pdbStructureJPanelLayout.setVerticalGroup(pdbStructureJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(pdbStructureLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 486, Short.MAX_VALUE));
    proteinsJPanel.setOpaque(false);
    proteinsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Proteins"));
    proteinsPanel.setOpaque(false);
    proteinScrollPane.setOpaque(false);
    proteinTable.setModel(new ProteinTableModel());
    proteinTable.setOpaque(false);
    proteinTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    proteinTable.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseClicked(java.awt.event.MouseEvent evt) {
            proteinTableMouseClicked(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            proteinTableMouseExited(evt);
        }

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            proteinTableMouseReleased(evt);
        }
    });
    proteinTable.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {

        public void mouseMoved(java.awt.event.MouseEvent evt) {
            proteinTableMouseMoved(evt);
        }
    });
    proteinTable.addKeyListener(new java.awt.event.KeyAdapter() {

        public void keyReleased(java.awt.event.KeyEvent evt) {
            proteinTableKeyReleased(evt);
        }
    });
    proteinScrollPane.setViewportView(proteinTable);
    javax.swing.GroupLayout proteinsPanelLayout = new javax.swing.GroupLayout(proteinsPanel);
    proteinsPanel.setLayout(proteinsPanelLayout);
    proteinsPanelLayout.setHorizontalGroup(proteinsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 938, Short.MAX_VALUE).addGroup(proteinsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(proteinsPanelLayout.createSequentialGroup().addContainerGap().addComponent(proteinScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 918, Short.MAX_VALUE).addContainerGap())));
    proteinsPanelLayout.setVerticalGroup(proteinsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 243, Short.MAX_VALUE).addGroup(proteinsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(proteinsPanelLayout.createSequentialGroup().addContainerGap().addComponent(proteinScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE).addContainerGap())));
    proteinsPanel.setBounds(0, 0, 950, 270);
    proteinsLayeredPane.add(proteinsPanel, javax.swing.JLayeredPane.DEFAULT_LAYER);
    // NOI18N
    proteinsHelpJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame_grey.png")));
    proteinsHelpJButton.setToolTipText("Help");
    proteinsHelpJButton.setBorder(null);
    proteinsHelpJButton.setBorderPainted(false);
    proteinsHelpJButton.setContentAreaFilled(false);
    // NOI18N
    proteinsHelpJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame.png")));
    proteinsHelpJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            proteinsHelpJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            proteinsHelpJButtonMouseExited(evt);
        }
    });
    proteinsHelpJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            proteinsHelpJButtonActionPerformed(evt);
        }
    });
    proteinsHelpJButton.setBounds(930, 0, 10, 19);
    proteinsLayeredPane.add(proteinsHelpJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    // NOI18N
    exportProteinsJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportProteinsJButton.setToolTipText("Copy to File");
    exportProteinsJButton.setBorder(null);
    exportProteinsJButton.setBorderPainted(false);
    exportProteinsJButton.setContentAreaFilled(false);
    // NOI18N
    exportProteinsJButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportProteinsJButton.setEnabled(false);
    // NOI18N
    exportProteinsJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame.png")));
    exportProteinsJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            exportProteinsJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            exportProteinsJButtonMouseExited(evt);
        }
    });
    exportProteinsJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exportProteinsJButtonActionPerformed(evt);
        }
    });
    exportProteinsJButton.setBounds(920, 0, 10, 19);
    proteinsLayeredPane.add(exportProteinsJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    contextMenuProteinsBackgroundPanel.setBackground(new java.awt.Color(255, 255, 255));
    javax.swing.GroupLayout contextMenuProteinsBackgroundPanelLayout = new javax.swing.GroupLayout(contextMenuProteinsBackgroundPanel);
    contextMenuProteinsBackgroundPanel.setLayout(contextMenuProteinsBackgroundPanelLayout);
    contextMenuProteinsBackgroundPanelLayout.setHorizontalGroup(contextMenuProteinsBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 30, Short.MAX_VALUE));
    contextMenuProteinsBackgroundPanelLayout.setVerticalGroup(contextMenuProteinsBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 19, Short.MAX_VALUE));
    contextMenuProteinsBackgroundPanel.setBounds(920, 0, 30, 19);
    proteinsLayeredPane.add(contextMenuProteinsBackgroundPanel, javax.swing.JLayeredPane.POPUP_LAYER);
    javax.swing.GroupLayout proteinsJPanelLayout = new javax.swing.GroupLayout(proteinsJPanel);
    proteinsJPanel.setLayout(proteinsJPanelLayout);
    proteinsJPanelLayout.setHorizontalGroup(proteinsJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(proteinsLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 957, Short.MAX_VALUE));
    proteinsJPanelLayout.setVerticalGroup(proteinsJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(proteinsLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 273, Short.MAX_VALUE));
    peptidesJPanel.setOpaque(false);
    peptidesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Peptides"));
    peptidesPanel.setOpaque(false);
    peptideScrollPane.setOpaque(false);
    peptideTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {}, new String[] { " ", "  ", "PI", "Sequence", "Start", "PDB", "" }) {

        Class[] types = new Class[] { java.lang.Integer.class, java.lang.Boolean.class, java.lang.Integer.class, java.lang.String.class, java.lang.Integer.class, java.lang.Boolean.class, java.lang.Boolean.class };

        boolean[] canEdit = new boolean[] { false, true, false, false, false, false, false };

        public Class getColumnClass(int columnIndex) {
            return types[columnIndex];
        }

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
        }
    });
    peptideTable.setOpaque(false);
    peptideTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    peptideTable.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseExited(java.awt.event.MouseEvent evt) {
            peptideTableMouseExited(evt);
        }

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            peptideTableMouseReleased(evt);
        }
    });
    peptideTable.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {

        public void mouseMoved(java.awt.event.MouseEvent evt) {
            peptideTableMouseMoved(evt);
        }
    });
    peptideTable.addKeyListener(new java.awt.event.KeyAdapter() {

        public void keyReleased(java.awt.event.KeyEvent evt) {
            peptideTableKeyReleased(evt);
        }
    });
    peptideScrollPane.setViewportView(peptideTable);
    javax.swing.GroupLayout peptidesPanelLayout = new javax.swing.GroupLayout(peptidesPanel);
    peptidesPanel.setLayout(peptidesPanelLayout);
    peptidesPanelLayout.setHorizontalGroup(peptidesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 468, Short.MAX_VALUE).addGroup(peptidesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(peptidesPanelLayout.createSequentialGroup().addContainerGap().addComponent(peptideScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 448, Short.MAX_VALUE).addContainerGap())));
    peptidesPanelLayout.setVerticalGroup(peptidesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 133, Short.MAX_VALUE).addGroup(peptidesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(peptidesPanelLayout.createSequentialGroup().addContainerGap().addComponent(peptideScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE).addContainerGap())));
    peptidesPanel.setBounds(0, 0, 480, 160);
    peptidesLayeredPane.add(peptidesPanel, javax.swing.JLayeredPane.DEFAULT_LAYER);
    // NOI18N
    peptidesHelpJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame_grey.png")));
    peptidesHelpJButton.setToolTipText("Help");
    peptidesHelpJButton.setBorder(null);
    peptidesHelpJButton.setBorderPainted(false);
    peptidesHelpJButton.setContentAreaFilled(false);
    // NOI18N
    peptidesHelpJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame.png")));
    peptidesHelpJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            peptidesHelpJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            peptidesHelpJButtonMouseExited(evt);
        }
    });
    peptidesHelpJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            peptidesHelpJButtonActionPerformed(evt);
        }
    });
    peptidesHelpJButton.setBounds(460, 0, 10, 19);
    peptidesLayeredPane.add(peptidesHelpJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    // NOI18N
    exportPeptidesJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportPeptidesJButton.setToolTipText("Copy to File");
    exportPeptidesJButton.setBorder(null);
    exportPeptidesJButton.setBorderPainted(false);
    exportPeptidesJButton.setContentAreaFilled(false);
    // NOI18N
    exportPeptidesJButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportPeptidesJButton.setEnabled(false);
    // NOI18N
    exportPeptidesJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame.png")));
    exportPeptidesJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            exportPeptidesJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            exportPeptidesJButtonMouseExited(evt);
        }
    });
    exportPeptidesJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exportPeptidesJButtonActionPerformed(evt);
        }
    });
    exportPeptidesJButton.setBounds(450, 0, 10, 19);
    peptidesLayeredPane.add(exportPeptidesJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    contextMenuPeptidesBackgroundPanel.setBackground(new java.awt.Color(255, 255, 255));
    javax.swing.GroupLayout contextMenuPeptidesBackgroundPanelLayout = new javax.swing.GroupLayout(contextMenuPeptidesBackgroundPanel);
    contextMenuPeptidesBackgroundPanel.setLayout(contextMenuPeptidesBackgroundPanelLayout);
    contextMenuPeptidesBackgroundPanelLayout.setHorizontalGroup(contextMenuPeptidesBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 30, Short.MAX_VALUE));
    contextMenuPeptidesBackgroundPanelLayout.setVerticalGroup(contextMenuPeptidesBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 19, Short.MAX_VALUE));
    contextMenuPeptidesBackgroundPanel.setBounds(440, 0, 30, 19);
    peptidesLayeredPane.add(contextMenuPeptidesBackgroundPanel, javax.swing.JLayeredPane.POPUP_LAYER);
    javax.swing.GroupLayout peptidesJPanelLayout = new javax.swing.GroupLayout(peptidesJPanel);
    peptidesJPanel.setLayout(peptidesJPanelLayout);
    peptidesJPanelLayout.setHorizontalGroup(peptidesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(peptidesLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 485, Short.MAX_VALUE));
    peptidesJPanelLayout.setVerticalGroup(peptidesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(peptidesLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE));
    pdbMatchesJPanel.setOpaque(false);
    pdbMatchesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("PDB Matches"));
    pdbMatchesPanel.setOpaque(false);
    pdbJScrollPane.setOpaque(false);
    pdbMatchesJTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {}, new String[] { " ", "PDB", "Title", "Type", "Chains" }) {

        Class[] types = new Class[] { java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class };

        boolean[] canEdit = new boolean[] { false, false, false, false, false };

        public Class getColumnClass(int columnIndex) {
            return types[columnIndex];
        }

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
        }
    });
    pdbMatchesJTable.setOpaque(false);
    pdbMatchesJTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    pdbMatchesJTable.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseExited(java.awt.event.MouseEvent evt) {
            pdbMatchesJTableMouseExited(evt);
        }

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            pdbMatchesJTableMouseReleased(evt);
        }
    });
    pdbMatchesJTable.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {

        public void mouseMoved(java.awt.event.MouseEvent evt) {
            pdbMatchesJTableMouseMoved(evt);
        }
    });
    pdbMatchesJTable.addKeyListener(new java.awt.event.KeyAdapter() {

        public void keyReleased(java.awt.event.KeyEvent evt) {
            pdbMatchesJTableKeyReleased(evt);
        }
    });
    pdbJScrollPane.setViewportView(pdbMatchesJTable);
    javax.swing.GroupLayout pdbMatchesPanelLayout = new javax.swing.GroupLayout(pdbMatchesPanel);
    pdbMatchesPanel.setLayout(pdbMatchesPanelLayout);
    pdbMatchesPanelLayout.setHorizontalGroup(pdbMatchesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 468, Short.MAX_VALUE).addGroup(pdbMatchesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(pdbMatchesPanelLayout.createSequentialGroup().addGap(8, 8, 8).addComponent(pdbJScrollPane).addGap(8, 8, 8))));
    pdbMatchesPanelLayout.setVerticalGroup(pdbMatchesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 123, Short.MAX_VALUE).addGroup(pdbMatchesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(pdbMatchesPanelLayout.createSequentialGroup().addContainerGap().addComponent(pdbJScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 101, Short.MAX_VALUE).addContainerGap())));
    pdbMatchesPanel.setBounds(0, 0, 480, 150);
    pdbMatchesLayeredPane.add(pdbMatchesPanel, javax.swing.JLayeredPane.DEFAULT_LAYER);
    // NOI18N
    pdbMatchesHelpJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame_grey.png")));
    pdbMatchesHelpJButton.setToolTipText("Help");
    pdbMatchesHelpJButton.setBorder(null);
    pdbMatchesHelpJButton.setBorderPainted(false);
    pdbMatchesHelpJButton.setContentAreaFilled(false);
    // NOI18N
    pdbMatchesHelpJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame.png")));
    pdbMatchesHelpJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            pdbMatchesHelpJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            pdbMatchesHelpJButtonMouseExited(evt);
        }
    });
    pdbMatchesHelpJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            pdbMatchesHelpJButtonActionPerformed(evt);
        }
    });
    pdbMatchesHelpJButton.setBounds(460, 0, 10, 19);
    pdbMatchesLayeredPane.add(pdbMatchesHelpJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    // NOI18N
    exportPdbMatchesJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportPdbMatchesJButton.setToolTipText("Copy to File");
    exportPdbMatchesJButton.setBorder(null);
    exportPdbMatchesJButton.setBorderPainted(false);
    exportPdbMatchesJButton.setContentAreaFilled(false);
    // NOI18N
    exportPdbMatchesJButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportPdbMatchesJButton.setEnabled(false);
    // NOI18N
    exportPdbMatchesJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame.png")));
    exportPdbMatchesJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            exportPdbMatchesJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            exportPdbMatchesJButtonMouseExited(evt);
        }
    });
    exportPdbMatchesJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exportPdbMatchesJButtonActionPerformed(evt);
        }
    });
    exportPdbMatchesJButton.setBounds(450, 0, 10, 19);
    pdbMatchesLayeredPane.add(exportPdbMatchesJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    contextMenuPdbMatchesBackgroundPanel.setBackground(new java.awt.Color(255, 255, 255));
    javax.swing.GroupLayout contextMenuPdbMatchesBackgroundPanelLayout = new javax.swing.GroupLayout(contextMenuPdbMatchesBackgroundPanel);
    contextMenuPdbMatchesBackgroundPanel.setLayout(contextMenuPdbMatchesBackgroundPanelLayout);
    contextMenuPdbMatchesBackgroundPanelLayout.setHorizontalGroup(contextMenuPdbMatchesBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 30, Short.MAX_VALUE));
    contextMenuPdbMatchesBackgroundPanelLayout.setVerticalGroup(contextMenuPdbMatchesBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 19, Short.MAX_VALUE));
    contextMenuPdbMatchesBackgroundPanel.setBounds(440, 0, 30, 19);
    pdbMatchesLayeredPane.add(contextMenuPdbMatchesBackgroundPanel, javax.swing.JLayeredPane.POPUP_LAYER);
    javax.swing.GroupLayout pdbMatchesJPanelLayout = new javax.swing.GroupLayout(pdbMatchesJPanel);
    pdbMatchesJPanel.setLayout(pdbMatchesJPanelLayout);
    pdbMatchesJPanelLayout.setHorizontalGroup(pdbMatchesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(pdbMatchesLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 485, Short.MAX_VALUE));
    pdbMatchesJPanelLayout.setVerticalGroup(pdbMatchesJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(pdbMatchesLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE));
    pdbChainsJPanel.setOpaque(false);
    pdbChainsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("PDB Chains"));
    pdbChainsPanel.setOpaque(false);
    pdbChainsJScrollPane.setOpaque(false);
    pdbChainsJTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {}, new String[] { " ", "Chain", "PDB-Protein", "Coverage" }) {

        Class[] types = new Class[] { java.lang.Integer.class, java.lang.String.class, java.lang.Object.class, java.lang.Double.class };

        boolean[] canEdit = new boolean[] { false, false, false, false };

        public Class getColumnClass(int columnIndex) {
            return types[columnIndex];
        }

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
        }
    });
    pdbChainsJTable.setOpaque(false);
    pdbChainsJTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    pdbChainsJTable.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            pdbChainsJTableMouseReleased(evt);
        }
    });
    pdbChainsJTable.addKeyListener(new java.awt.event.KeyAdapter() {

        public void keyReleased(java.awt.event.KeyEvent evt) {
            pdbChainsJTableKeyReleased(evt);
        }
    });
    pdbChainsJScrollPane.setViewportView(pdbChainsJTable);
    javax.swing.GroupLayout pdbChainsPanelLayout = new javax.swing.GroupLayout(pdbChainsPanel);
    pdbChainsPanel.setLayout(pdbChainsPanelLayout);
    pdbChainsPanelLayout.setHorizontalGroup(pdbChainsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 468, Short.MAX_VALUE).addGroup(pdbChainsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(pdbChainsPanelLayout.createSequentialGroup().addContainerGap().addComponent(pdbChainsJScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 448, Short.MAX_VALUE).addContainerGap())));
    pdbChainsPanelLayout.setVerticalGroup(pdbChainsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 133, Short.MAX_VALUE).addGroup(pdbChainsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(pdbChainsPanelLayout.createSequentialGroup().addContainerGap().addComponent(pdbChainsJScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE).addContainerGap())));
    pdbChainsPanel.setBounds(0, 0, 480, 160);
    pdbChainsLayeredPane.add(pdbChainsPanel, javax.swing.JLayeredPane.DEFAULT_LAYER);
    // NOI18N
    pdbChainHelpJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame_grey.png")));
    pdbChainHelpJButton.setToolTipText("Help");
    pdbChainHelpJButton.setBorder(null);
    pdbChainHelpJButton.setBorderPainted(false);
    pdbChainHelpJButton.setContentAreaFilled(false);
    // NOI18N
    pdbChainHelpJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame.png")));
    pdbChainHelpJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            pdbChainHelpJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            pdbChainHelpJButtonMouseExited(evt);
        }
    });
    pdbChainHelpJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            pdbChainHelpJButtonActionPerformed(evt);
        }
    });
    pdbChainHelpJButton.setBounds(460, 0, 10, 19);
    pdbChainsLayeredPane.add(pdbChainHelpJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    // NOI18N
    exportPdbChainsJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportPdbChainsJButton.setToolTipText("Copy to File");
    exportPdbChainsJButton.setBorder(null);
    exportPdbChainsJButton.setBorderPainted(false);
    exportPdbChainsJButton.setContentAreaFilled(false);
    // NOI18N
    exportPdbChainsJButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportPdbChainsJButton.setEnabled(false);
    // NOI18N
    exportPdbChainsJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame.png")));
    exportPdbChainsJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            exportPdbChainsJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            exportPdbChainsJButtonMouseExited(evt);
        }
    });
    exportPdbChainsJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exportPdbChainsJButtonActionPerformed(evt);
        }
    });
    exportPdbChainsJButton.setBounds(450, 0, 10, 19);
    pdbChainsLayeredPane.add(exportPdbChainsJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    contextMenuPdbChainsBackgroundPanel.setBackground(new java.awt.Color(255, 255, 255));
    javax.swing.GroupLayout contextMenuPdbChainsBackgroundPanelLayout = new javax.swing.GroupLayout(contextMenuPdbChainsBackgroundPanel);
    contextMenuPdbChainsBackgroundPanel.setLayout(contextMenuPdbChainsBackgroundPanelLayout);
    contextMenuPdbChainsBackgroundPanelLayout.setHorizontalGroup(contextMenuPdbChainsBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 30, Short.MAX_VALUE));
    contextMenuPdbChainsBackgroundPanelLayout.setVerticalGroup(contextMenuPdbChainsBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 19, Short.MAX_VALUE));
    contextMenuPdbChainsBackgroundPanel.setBounds(440, 0, 30, 19);
    pdbChainsLayeredPane.add(contextMenuPdbChainsBackgroundPanel, javax.swing.JLayeredPane.POPUP_LAYER);
    javax.swing.GroupLayout pdbChainsJPanelLayout = new javax.swing.GroupLayout(pdbChainsJPanel);
    pdbChainsJPanel.setLayout(pdbChainsJPanelLayout);
    pdbChainsJPanelLayout.setHorizontalGroup(pdbChainsJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(pdbChainsLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 485, Short.MAX_VALUE));
    pdbChainsJPanelLayout.setVerticalGroup(pdbChainsJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(pdbChainsLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE));
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(pdbMatchesJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(pdbChainsJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(peptidesJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(pdbStructureJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)).addComponent(proteinsJPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)).addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(proteinsJPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(pdbMatchesJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(pdbChainsJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(peptidesJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)).addComponent(pdbStructureJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)).addContainerGap()));
    pdbStructureJPanel.getAccessibleContext().setAccessibleName("Protein Details");
}
Also used : Color(java.awt.Color) JTableHeader(javax.swing.table.JTableHeader) MouseAdapter(java.awt.event.MouseAdapter) ProteinTableModel(eu.isas.peptideshaker.gui.tablemodels.ProteinTableModel) MouseEvent(java.awt.event.MouseEvent) DefaultTableModel(javax.swing.table.DefaultTableModel) XYDataPoint(no.uib.jsparklines.data.XYDataPoint) KeyEvent(java.awt.event.KeyEvent) MouseEvent(java.awt.event.MouseEvent) XYDataPoint(no.uib.jsparklines.data.XYDataPoint) javax.swing(javax.swing)

Example 100 with JTableHeader

use of javax.swing.table.JTableHeader in project peptide-shaker by compomics.

the class GOEAPanel method initComponents.

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
void initComponents() {
    selectTermsJPopupMenu = new javax.swing.JPopupMenu();
    selectAllMenuItem = new javax.swing.JMenuItem();
    deselectAllMenuItem = new javax.swing.JMenuItem();
    selectSignificantMenuItem = new javax.swing.JMenuItem();
    jSeparator1 = new javax.swing.JPopupMenu.Separator();
    statisticsMenuItem = new javax.swing.JMenuItem();
    significanceLevelButtonGroup = new javax.swing.ButtonGroup();
    mappingsTableLayeredPane = new javax.swing.JLayeredPane();
    mappingsPanel = new javax.swing.JPanel();
    proteinGoMappingsScrollPane = new javax.swing.JScrollPane();
    goMappingsTable = new JTable() {

        protected JTableHeader createDefaultTableHeader() {
            return new JTableHeader(columnModel) {

                public String getToolTipText(MouseEvent e) {
                    java.awt.Point p = e.getPoint();
                    int index = columnModel.getColumnIndexAtX(p.x);
                    int realIndex = columnModel.getColumn(index).getModelIndex();
                    String tip = (String) mappingsTableToolTips.get(realIndex);
                    return tip;
                }
            };
        }
    };
    significanceJLabel = new javax.swing.JLabel();
    fivePercentRadioButton = new javax.swing.JRadioButton();
    onePercentRadioButton = new javax.swing.JRadioButton();
    goProteinCountLabel = new javax.swing.JLabel();
    mappingsHelpJButton = new javax.swing.JButton();
    exportMappingsJButton = new javax.swing.JButton();
    contextMenuMappingsBackgroundPanel = new javax.swing.JPanel();
    plotLayeredPane = new javax.swing.JLayeredPane();
    plotPanel = new javax.swing.JPanel();
    goPlotsTabbedPane = new javax.swing.JTabbedPane();
    proteinsPanel = new javax.swing.JPanel();
    proteinsScrollPane = new javax.swing.JScrollPane();
    proteinTable = new JTable() {

        protected JTableHeader createDefaultTableHeader() {
            return new JTableHeader(columnModel) {

                public String getToolTipText(MouseEvent e) {
                    java.awt.Point p = e.getPoint();
                    int index = columnModel.getColumnIndexAtX(p.x);
                    int realIndex = columnModel.getColumn(index).getModelIndex();
                    String tip = (String) proteinTableToolTips.get(realIndex);
                    return tip;
                }
            };
        }
    };
    goFrequencyPlotPanel = new javax.swing.JPanel();
    goSignificancePlotPanel = new javax.swing.JPanel();
    plotHelpJButton = new javax.swing.JButton();
    exportPlotsJButton = new javax.swing.JButton();
    contextMenuPlotsBackgroundPanel = new javax.swing.JPanel();
    selectAllMenuItem.setText("Select All");
    selectAllMenuItem.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            selectAllMenuItemActionPerformed(evt);
        }
    });
    selectTermsJPopupMenu.add(selectAllMenuItem);
    deselectAllMenuItem.setText("Deselect All");
    deselectAllMenuItem.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            deselectAllMenuItemActionPerformed(evt);
        }
    });
    selectTermsJPopupMenu.add(deselectAllMenuItem);
    selectSignificantMenuItem.setText("Select Significant");
    selectSignificantMenuItem.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            selectSignificantMenuItemActionPerformed(evt);
        }
    });
    selectTermsJPopupMenu.add(selectSignificantMenuItem);
    selectTermsJPopupMenu.add(jSeparator1);
    statisticsMenuItem.setText("Statistics (beta)");
    statisticsMenuItem.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            statisticsMenuItemActionPerformed(evt);
        }
    });
    selectTermsJPopupMenu.add(statisticsMenuItem);
    setBackground(new java.awt.Color(255, 255, 255));
    addComponentListener(new java.awt.event.ComponentAdapter() {

        public void componentResized(java.awt.event.ComponentEvent evt) {
            formComponentResized(evt);
        }
    });
    mappingsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Gene Ontology Mappings"));
    mappingsPanel.setOpaque(false);
    proteinGoMappingsScrollPane.setOpaque(false);
    goMappingsTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {}, new String[] { "", "GO Accession", "GO Term", "GO Domain", "Frequency All (%)", "Frequency Dataset (%)", "Frequency (%)", "Log2 Diff", "p-value", "  " }) {

        Class[] types = new Class[] { java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Double.class, java.lang.Double.class, ValueAndBooleanDataPoint.class, java.lang.Object.class, java.lang.Double.class, java.lang.Boolean.class };

        boolean[] canEdit = new boolean[] { false, false, false, false, false, false, false, false, false, true };

        public Class getColumnClass(int columnIndex) {
            return types[columnIndex];
        }

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
        }
    });
    goMappingsTable.setOpaque(false);
    goMappingsTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    goMappingsTable.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            goMappingsTableMouseReleased(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            goMappingsTableMouseExited(evt);
        }
    });
    goMappingsTable.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {

        public void mouseMoved(java.awt.event.MouseEvent evt) {
            goMappingsTableMouseMoved(evt);
        }
    });
    goMappingsTable.addKeyListener(new java.awt.event.KeyAdapter() {

        public void keyReleased(java.awt.event.KeyEvent evt) {
            goMappingsTableKeyReleased(evt);
        }
    });
    proteinGoMappingsScrollPane.setViewportView(goMappingsTable);
    significanceJLabel.setText("Significance Level:");
    significanceLevelButtonGroup.add(fivePercentRadioButton);
    fivePercentRadioButton.setSelected(true);
    fivePercentRadioButton.setText("0.05");
    fivePercentRadioButton.setOpaque(false);
    fivePercentRadioButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            fivePercentRadioButtonActionPerformed(evt);
        }
    });
    significanceLevelButtonGroup.add(onePercentRadioButton);
    onePercentRadioButton.setText("0.01");
    onePercentRadioButton.setOpaque(false);
    onePercentRadioButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            onePercentRadioButtonActionPerformed(evt);
        }
    });
    goProteinCountLabel.setText("[GO Proteins: Ensembl: -, Project: -]");
    goProteinCountLabel.setToolTipText("Number of GO mapped proteins");
    javax.swing.GroupLayout mappingsPanelLayout = new javax.swing.GroupLayout(mappingsPanel);
    mappingsPanel.setLayout(mappingsPanelLayout);
    mappingsPanelLayout.setHorizontalGroup(mappingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mappingsPanelLayout.createSequentialGroup().addGroup(mappingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING).addGroup(mappingsPanelLayout.createSequentialGroup().addGap(10, 10, 10).addComponent(proteinGoMappingsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 988, Short.MAX_VALUE)).addGroup(mappingsPanelLayout.createSequentialGroup().addGap(20, 20, 20).addComponent(goProteinCountLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(significanceJLabel).addGap(18, 18, 18).addComponent(onePercentRadioButton).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(fivePercentRadioButton).addGap(13, 13, 13))).addContainerGap()));
    mappingsPanelLayout.setVerticalGroup(mappingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(mappingsPanelLayout.createSequentialGroup().addContainerGap().addComponent(proteinGoMappingsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE).addGap(12, 12, 12).addGroup(mappingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER).addComponent(significanceJLabel).addComponent(onePercentRadioButton).addComponent(fivePercentRadioButton).addComponent(goProteinCountLabel)).addContainerGap()));
    mappingsTableLayeredPane.add(mappingsPanel);
    mappingsPanel.setBounds(0, 0, 1020, 364);
    // NOI18N
    mappingsHelpJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame_grey.png")));
    mappingsHelpJButton.setToolTipText("Help");
    mappingsHelpJButton.setBorder(null);
    mappingsHelpJButton.setBorderPainted(false);
    mappingsHelpJButton.setContentAreaFilled(false);
    // NOI18N
    mappingsHelpJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame.png")));
    mappingsHelpJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            mappingsHelpJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            mappingsHelpJButtonMouseExited(evt);
        }
    });
    mappingsHelpJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            mappingsHelpJButtonActionPerformed(evt);
        }
    });
    mappingsTableLayeredPane.add(mappingsHelpJButton);
    mappingsHelpJButton.setBounds(990, 0, 10, 19);
    mappingsTableLayeredPane.setLayer(mappingsHelpJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    // NOI18N
    exportMappingsJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportMappingsJButton.setToolTipText("Copy to Clipboard");
    exportMappingsJButton.setBorder(null);
    exportMappingsJButton.setBorderPainted(false);
    exportMappingsJButton.setContentAreaFilled(false);
    // NOI18N
    exportMappingsJButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportMappingsJButton.setEnabled(false);
    // NOI18N
    exportMappingsJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame.png")));
    exportMappingsJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            exportMappingsJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            exportMappingsJButtonMouseExited(evt);
        }
    });
    exportMappingsJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exportMappingsJButtonActionPerformed(evt);
        }
    });
    mappingsTableLayeredPane.add(exportMappingsJButton);
    exportMappingsJButton.setBounds(980, 0, 10, 19);
    mappingsTableLayeredPane.setLayer(exportMappingsJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    contextMenuMappingsBackgroundPanel.setBackground(new java.awt.Color(255, 255, 255));
    javax.swing.GroupLayout contextMenuMappingsBackgroundPanelLayout = new javax.swing.GroupLayout(contextMenuMappingsBackgroundPanel);
    contextMenuMappingsBackgroundPanel.setLayout(contextMenuMappingsBackgroundPanelLayout);
    contextMenuMappingsBackgroundPanelLayout.setHorizontalGroup(contextMenuMappingsBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 30, Short.MAX_VALUE));
    contextMenuMappingsBackgroundPanelLayout.setVerticalGroup(contextMenuMappingsBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 19, Short.MAX_VALUE));
    mappingsTableLayeredPane.add(contextMenuMappingsBackgroundPanel);
    contextMenuMappingsBackgroundPanel.setBounds(980, 0, 30, 19);
    mappingsTableLayeredPane.setLayer(contextMenuMappingsBackgroundPanel, javax.swing.JLayeredPane.POPUP_LAYER);
    plotPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Gene Ontology Enrichment Analysis"));
    plotPanel.setOpaque(false);
    goPlotsTabbedPane.setTabPlacement(javax.swing.JTabbedPane.BOTTOM);
    goPlotsTabbedPane.addChangeListener(new javax.swing.event.ChangeListener() {

        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            goPlotsTabbedPaneStateChanged(evt);
        }
    });
    proteinsPanel.setOpaque(false);
    proteinsScrollPane.setOpaque(false);
    proteinTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {}, new String[] { " ", "Accession", "Description", "Coverage", "#Peptides", "#Spectra", "MS2 Quant.", "Confidence", "  " }) {

        Class[] types = new Class[] { java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.Object.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Double.class, java.lang.Double.class, java.lang.Boolean.class };

        boolean[] canEdit = new boolean[] { false, false, false, false, false, false, false, false, false };

        public Class getColumnClass(int columnIndex) {
            return types[columnIndex];
        }

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
        }
    });
    proteinTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    proteinTable.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            proteinTableMouseReleased(evt);
        }

        public void mouseClicked(java.awt.event.MouseEvent evt) {
            proteinTableMouseClicked(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            proteinTableMouseExited(evt);
        }
    });
    proteinTable.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {

        public void mouseMoved(java.awt.event.MouseEvent evt) {
            proteinTableMouseMoved(evt);
        }
    });
    proteinTable.addKeyListener(new java.awt.event.KeyAdapter() {

        public void keyReleased(java.awt.event.KeyEvent evt) {
            proteinTableKeyReleased(evt);
        }
    });
    proteinsScrollPane.setViewportView(proteinTable);
    javax.swing.GroupLayout proteinsPanelLayout = new javax.swing.GroupLayout(proteinsPanel);
    proteinsPanel.setLayout(proteinsPanelLayout);
    proteinsPanelLayout.setHorizontalGroup(proteinsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(proteinsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 982, Short.MAX_VALUE));
    proteinsPanelLayout.setVerticalGroup(proteinsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, proteinsPanelLayout.createSequentialGroup().addComponent(proteinsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE).addContainerGap()));
    goPlotsTabbedPane.addTab("Proteins", proteinsPanel);
    goFrequencyPlotPanel.setBackground(new java.awt.Color(255, 255, 255));
    goFrequencyPlotPanel.setLayout(new javax.swing.BoxLayout(goFrequencyPlotPanel, javax.swing.BoxLayout.LINE_AXIS));
    goPlotsTabbedPane.addTab("Frequency", goFrequencyPlotPanel);
    goSignificancePlotPanel.setBackground(new java.awt.Color(255, 255, 255));
    goSignificancePlotPanel.setLayout(new javax.swing.BoxLayout(goSignificancePlotPanel, javax.swing.BoxLayout.LINE_AXIS));
    goPlotsTabbedPane.addTab("Significance", goSignificancePlotPanel);
    goPlotsTabbedPane.setSelectedIndex(2);
    javax.swing.GroupLayout plotPanelLayout = new javax.swing.GroupLayout(plotPanel);
    plotPanel.setLayout(plotPanelLayout);
    plotPanelLayout.setHorizontalGroup(plotPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(plotPanelLayout.createSequentialGroup().addContainerGap().addComponent(goPlotsTabbedPane).addContainerGap()));
    plotPanelLayout.setVerticalGroup(plotPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, plotPanelLayout.createSequentialGroup().addContainerGap().addComponent(goPlotsTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 319, Short.MAX_VALUE).addContainerGap()));
    plotLayeredPane.add(plotPanel);
    plotPanel.setBounds(0, 0, 1019, 370);
    // NOI18N
    plotHelpJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame_grey.png")));
    plotHelpJButton.setToolTipText("Help");
    plotHelpJButton.setBorder(null);
    plotHelpJButton.setBorderPainted(false);
    plotHelpJButton.setContentAreaFilled(false);
    // NOI18N
    plotHelpJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/help_no_frame.png")));
    plotHelpJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            plotHelpJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            plotHelpJButtonMouseExited(evt);
        }
    });
    plotHelpJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            plotHelpJButtonActionPerformed(evt);
        }
    });
    plotLayeredPane.add(plotHelpJButton);
    plotHelpJButton.setBounds(990, 0, 10, 19);
    plotLayeredPane.setLayer(plotHelpJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    // NOI18N
    exportPlotsJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportPlotsJButton.setToolTipText("Export");
    exportPlotsJButton.setBorder(null);
    exportPlotsJButton.setBorderPainted(false);
    exportPlotsJButton.setContentAreaFilled(false);
    // NOI18N
    exportPlotsJButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame_grey.png")));
    exportPlotsJButton.setEnabled(false);
    // NOI18N
    exportPlotsJButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/export_no_frame.png")));
    exportPlotsJButton.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            exportPlotsJButtonMouseEntered(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            exportPlotsJButtonMouseExited(evt);
        }
    });
    exportPlotsJButton.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exportPlotsJButtonActionPerformed(evt);
        }
    });
    plotLayeredPane.add(exportPlotsJButton);
    exportPlotsJButton.setBounds(980, 0, 10, 19);
    plotLayeredPane.setLayer(exportPlotsJButton, javax.swing.JLayeredPane.POPUP_LAYER);
    contextMenuPlotsBackgroundPanel.setBackground(new java.awt.Color(255, 255, 255));
    javax.swing.GroupLayout contextMenuPlotsBackgroundPanelLayout = new javax.swing.GroupLayout(contextMenuPlotsBackgroundPanel);
    contextMenuPlotsBackgroundPanel.setLayout(contextMenuPlotsBackgroundPanelLayout);
    contextMenuPlotsBackgroundPanelLayout.setHorizontalGroup(contextMenuPlotsBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 30, Short.MAX_VALUE));
    contextMenuPlotsBackgroundPanelLayout.setVerticalGroup(contextMenuPlotsBackgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 19, Short.MAX_VALUE));
    plotLayeredPane.add(contextMenuPlotsBackgroundPanel);
    contextMenuPlotsBackgroundPanel.setBounds(980, 0, 30, 19);
    plotLayeredPane.setLayer(contextMenuPlotsBackgroundPanel, javax.swing.JLayeredPane.POPUP_LAYER);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING).addComponent(plotLayeredPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1019, Short.MAX_VALUE).addComponent(mappingsTableLayeredPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1019, Short.MAX_VALUE)).addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(mappingsTableLayeredPane, javax.swing.GroupLayout.PREFERRED_SIZE, 365, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(plotLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 372, Short.MAX_VALUE).addContainerGap()));
}
Also used : Color(java.awt.Color) JTableHeader(javax.swing.table.JTableHeader) MouseAdapter(java.awt.event.MouseAdapter) ValueAndBooleanDataPoint(no.uib.jsparklines.data.ValueAndBooleanDataPoint) DefaultTableModel(javax.swing.table.DefaultTableModel) ChartMouseEvent(org.jfree.chart.ChartMouseEvent) MouseEvent(java.awt.event.MouseEvent) ValueAndBooleanDataPoint(no.uib.jsparklines.data.ValueAndBooleanDataPoint) XYDataPoint(no.uib.jsparklines.data.XYDataPoint) ValueAndBooleanDataPoint(no.uib.jsparklines.data.ValueAndBooleanDataPoint) XYDataPoint(no.uib.jsparklines.data.XYDataPoint) MouseEvent(java.awt.event.MouseEvent) javax.swing(javax.swing)

Aggregations

JTableHeader (javax.swing.table.JTableHeader)251 TableColumn (javax.swing.table.TableColumn)63 MouseEvent (java.awt.event.MouseEvent)60 JTable (javax.swing.JTable)55 TableColumnModel (javax.swing.table.TableColumnModel)48 TableCellRenderer (javax.swing.table.TableCellRenderer)39 MouseAdapter (java.awt.event.MouseAdapter)36 Component (java.awt.Component)35 DefaultTableCellRenderer (javax.swing.table.DefaultTableCellRenderer)29 DefaultTableModel (javax.swing.table.DefaultTableModel)29 JScrollPane (javax.swing.JScrollPane)27 Color (java.awt.Color)25 JPanel (javax.swing.JPanel)25 Point (java.awt.Point)24 JLabel (javax.swing.JLabel)23 Dimension (java.awt.Dimension)22 BorderLayout (java.awt.BorderLayout)18 TableModel (javax.swing.table.TableModel)18 JComponent (javax.swing.JComponent)17 Font (java.awt.Font)15