Search in sources :

Example 21 with JSortTable

use of org.vcell.util.gui.sorttable.JSortTable in project vcell by virtualcell.

the class PhysiologyRelationshipPanel method initialize.

private void initialize() {
    try {
        setName("KineticsTypeTemplatePanel");
        setLayout(new GridBagLayout());
        table = new JSortTable();
        tableModel = new PhysiologyRelationshipTableModel(table);
        table.setModel(tableModel);
        table.disableUneditableForeground();
        int gridy = 0;
        GridBagConstraints gbc = new java.awt.GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = gridy;
        gbc.weightx = 1.0;
        gbc.weighty = 0.01;
        gbc.gridwidth = GridBagConstraints.REMAINDER;
        gbc.fill = GridBagConstraints.BOTH;
        gbc.insets = new Insets(4, 4, 4, 4);
        JLabel info = new JLabel("Edit pathway links by checking or unchecking the Link boxes.");
        add(info, gbc);
        gridy++;
        gbc = new java.awt.GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = gridy;
        gbc.weightx = 1.0;
        gbc.weighty = 1.0;
        gbc.gridwidth = GridBagConstraints.REMAINDER;
        gbc.fill = GridBagConstraints.BOTH;
        gbc.insets = new Insets(4, 4, 4, 4);
        table.setPreferredScrollableViewportSize(new Dimension(200, 200));
        add(table.getEnclosingScrollPane(), gbc);
        gbc = new java.awt.GridBagConstraints();
        gbc.gridx = 8;
        gbc.gridy = gridy;
        add(Box.createRigidArea(new Dimension(0, 75)), gbc);
        gridy++;
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = gridy;
        gbc.anchor = GridBagConstraints.LINE_END;
        gbc.insets = new Insets(4, 4, 4, 4);
        add(new JLabel("Search "), gbc);
        textFieldSearch = new JTextField(30);
        textFieldSearch.addActionListener(eventHandler);
        textFieldSearch.getDocument().addDocumentListener(eventHandler);
        gbc = new java.awt.GridBagConstraints();
        gbc.weightx = 1.0;
        gbc.gridx = 1;
        gbc.gridy = gridy;
        gbc.gridwidth = 3;
        gbc.anchor = GridBagConstraints.LINE_START;
        gbc.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gbc.insets = new Insets(4, 0, 4, 0);
        add(textFieldSearch, gbc);
        showLinkedEntityCheckBox = new JCheckBox("Show linked pathway entities only");
        showLinkedEntityCheckBox.setBackground(Color.white);
        showLinkedEntityCheckBox.addActionListener(eventHandler);
        gbc = new java.awt.GridBagConstraints();
        gbc.gridx = 4;
        gbc.gridy = gridy;
        gbc.anchor = GridBagConstraints.LINE_END;
        gbc.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gbc.insets = new Insets(4, 10, 4, 0);
        add(showLinkedEntityCheckBox, gbc);
        setBackground(Color.white);
    } catch (java.lang.Throwable ivjExc) {
        handleException(ivjExc);
    }
}
Also used : GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) JLabel(javax.swing.JLabel) Dimension(java.awt.Dimension) GridBagConstraints(java.awt.GridBagConstraints) JTextField(javax.swing.JTextField) JCheckBox(javax.swing.JCheckBox) JSortTable(org.vcell.util.gui.sorttable.JSortTable)

Aggregations

JSortTable (org.vcell.util.gui.sorttable.JSortTable)21 Dimension (java.awt.Dimension)4 GridBagConstraints (java.awt.GridBagConstraints)4 GridBagLayout (java.awt.GridBagLayout)4 Insets (java.awt.Insets)4 JLabel (javax.swing.JLabel)4 JTextField (javax.swing.JTextField)4 Comparator (java.util.Comparator)3 JScrollPane (javax.swing.JScrollPane)3 JTable (javax.swing.JTable)3 VCellSortTableModel (cbit.vcell.client.desktop.biomodel.VCellSortTableModel)2 Component (java.awt.Component)2 ActionEvent (java.awt.event.ActionEvent)2 ActionListener (java.awt.event.ActionListener)2 MouseAdapter (java.awt.event.MouseAdapter)2 MouseEvent (java.awt.event.MouseEvent)2 Vector (java.util.Vector)2 JMenuItem (javax.swing.JMenuItem)2 JPopupMenu (javax.swing.JPopupMenu)2 UserCancelException (org.vcell.util.UserCancelException)2