Search in sources :

Example 16 with JSortTable

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

the class ParameterMappingPanel method getScrollPaneTable.

/**
 * Return the ScrollPaneTable property value.
 * @return cbit.vcell.messaging.admin.sorttable.JSortTable
 */
private JSortTable getScrollPaneTable() {
    if (parameterMappingTable == null) {
        try {
            parameterMappingTable = new JSortTable();
            parameterMappingTable.setName("ScrollPaneTable");
            parameterMappingTableModel = new ParameterMappingTableModel(parameterMappingTable);
            parameterMappingTable.setScrollTableActionManager(new InternalScrollTableActionManager(parameterMappingTable));
            parameterMappingTable.setModel(parameterMappingTableModel);
        } catch (java.lang.Throwable ivjExc) {
            handleException(ivjExc);
        }
    }
    return parameterMappingTable;
}
Also used : JSortTable(org.vcell.util.gui.sorttable.JSortTable)

Example 17 with JSortTable

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

the class BioModelEditorPathwayDiagramPanel method initialize.

private void initialize() {
    JToolBar layoutToolBar = createToolBar(SwingConstants.HORIZONTAL);
    sourceTextArea = new JTextArea();
    graphPane = new GraphPane();
    pathwayGraphModel = new PathwayGraphModel();
    pathwayGraphModel.addPropertyChangeListener(eventHandler);
    graphPane.setGraphModel(pathwayGraphModel);
    graphPane.addMouseListener(eventHandler);
    graphCartoonTool = new PathwayGraphTool();
    graphCartoonTool.setGraphPane(graphPane);
    graphTabPanel = new JPanel(new BorderLayout());
    graphScrollPane = new JScrollPane(graphPane);
    graphScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    graphScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
    graphTabPanel.add(graphScrollPane, BorderLayout.CENTER);
    viewPortStabilizer = new ViewPortStabilizer(graphScrollPane);
    graphTabPanel.add(layoutToolBar, BorderLayout.NORTH);
    sourceTabPanel = new JPanel(new BorderLayout());
    sourceTabPanel.add(new JScrollPane(sourceTextArea), BorderLayout.CENTER);
    treeTabPanel.add(new JScrollPane(biopaxTree), BorderLayout.CENTER);
    pathwayModelTable = new JSortTable();
    pathwayModelTable.getSelectionModel().addListSelectionListener(eventHandler);
    pathwayModelTableModel = new PathwayModelTableModel(pathwayModelTable);
    pathwayModelTable.setModel(pathwayModelTableModel);
    searchTextField = new JTextField();
    searchTextField.putClientProperty("JTextField.variant", "search");
    searchTextField.getDocument().addDocumentListener(eventHandler);
    groupButton = new JButton("Group", new DownArrowIcon());
    groupButton.setHorizontalTextPosition(SwingConstants.LEFT);
    groupButton.addActionListener(eventHandler);
    deleteButton = new JButton("Delete");
    deleteButton.addActionListener(eventHandler);
    physiologyLinkButton = new JButton("Physiology Links", new DownArrowIcon());
    physiologyLinkButton.setHorizontalTextPosition(SwingConstants.LEFT);
    physiologyLinkButton.addActionListener(eventHandler);
    JPanel bottomPanel = new JPanel();
    bottomPanel.setLayout(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.insets = new Insets(4, 4, 4, 4);
    gbc.fill = GridBagConstraints.HORIZONTAL;
    bottomPanel.add(groupButton, gbc);
    gbc = new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridy = 0;
    gbc.insets = new Insets(4, 4, 4, 4);
    gbc.fill = GridBagConstraints.HORIZONTAL;
    bottomPanel.add(deleteButton, gbc);
    gbc = new GridBagConstraints();
    gbc.gridx = 2;
    gbc.gridy = 0;
    gbc.insets = new Insets(4, 4, 4, 4);
    gbc.fill = GridBagConstraints.HORIZONTAL;
    bottomPanel.add(physiologyLinkButton, gbc);
    gbc = new GridBagConstraints();
    gbc.gridx = 3;
    gbc.gridy = 0;
    gbc.insets = new Insets(4, 20, 4, 4);
    bottomPanel.add(new JLabel("Search "), gbc);
    gbc = new GridBagConstraints();
    gbc.gridx = 4;
    gbc.gridy = 0;
    gbc.weightx = 1.0;
    gbc.insets = new Insets(4, 4, 4, 4);
    gbc.fill = GridBagConstraints.HORIZONTAL;
    bottomPanel.add(searchTextField, gbc);
    tabbedPane = new JTabbedPaneEnhanced();
    pathwayPanelTabs[PathwayPanelTabID.pathway_diagram.ordinal()] = new PathwayPanelTab(PathwayPanelTabID.pathway_diagram, graphTabPanel, VCellIcons.diagramIcon);
    pathwayPanelTabs[PathwayPanelTabID.pathway_objects.ordinal()] = new PathwayPanelTab(PathwayPanelTabID.pathway_objects, pathwayModelTable.getEnclosingScrollPane(), VCellIcons.tableIcon);
    pathwayPanelTabs[PathwayPanelTabID.biopax_summary.ordinal()] = new PathwayPanelTab(PathwayPanelTabID.biopax_summary, sourceTabPanel, VCellIcons.textNotesIcon);
    pathwayPanelTabs[PathwayPanelTabID.biopax_tree.ordinal()] = new PathwayPanelTab(PathwayPanelTabID.biopax_tree, treeTabPanel, VCellIcons.tableIcon);
    tabbedPane.addChangeListener(eventHandler);
    tabbedPane.addChangeListener(eventHandler);
    for (PathwayPanelTab tab : pathwayPanelTabs) {
        tab.getComponent().setBorder(GuiConstants.TAB_PANEL_BORDER);
        tabbedPane.addTab(tab.getName(), tab.getIcon(), tab.getComponent());
    }
    setLayout(new BorderLayout());
    add(tabbedPane, BorderLayout.CENTER);
    add(bottomPanel, BorderLayout.SOUTH);
    pathwayModelTable.getColumnModel().getColumn(PathwayModelTableModel.COLUMN_ENTITY).setCellRenderer(new DefaultScrollTableCellRenderer() {

        @Override
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
            super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
            // }
            return this;
        }
    });
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) JTextArea(javax.swing.JTextArea) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) JButton(javax.swing.JButton) JTextField(javax.swing.JTextField) GraphPane(cbit.gui.graph.gui.GraphPane) JTabbedPaneEnhanced(org.vcell.util.gui.JTabbedPaneEnhanced) BorderLayout(java.awt.BorderLayout) PathwayGraphModel(cbit.vcell.client.desktop.biomodel.pathway.shapes.PathwayGraphModel) Component(java.awt.Component) JComponent(javax.swing.JComponent) JScrollPane(javax.swing.JScrollPane) ViewPortStabilizer(org.vcell.util.gui.ViewPortStabilizer) JLabel(javax.swing.JLabel) JToolBar(javax.swing.JToolBar) JSortTable(org.vcell.util.gui.sorttable.JSortTable) JTable(javax.swing.JTable) DownArrowIcon(org.vcell.util.gui.DownArrowIcon) DefaultScrollTableCellRenderer(org.vcell.util.gui.DefaultScrollTableCellRenderer) GroupObject(org.vcell.pathway.GroupObject) RelationshipObject(org.vcell.relationship.RelationshipObject) BioModelEntityObject(cbit.vcell.model.BioModelEntityObject) BioPaxObject(org.vcell.pathway.BioPaxObject) PathwayGraphTool(cbit.vcell.client.desktop.biomodel.pathway.PathwayGraphTool)

Example 18 with JSortTable

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

the class ServerManageConsole method getConfigTable.

/**
 * Return the ServiceStatusTable property value.
 * @return cbit.vcell.messaging.admin.sorttable.JSortTable
 */
private JSortTable getConfigTable() {
    if (ivjConfigTable == null) {
        try {
            ivjConfigTable = new JSortTable();
            ivjConfigTable.setModel(new ServiceStatusTableModel());
            ivjConfigTable.disableUneditableForeground();
        } catch (java.lang.Throwable ivjExc) {
            handleException(ivjExc);
        }
    }
    return ivjConfigTable;
}
Also used : JSortTable(org.vcell.util.gui.sorttable.JSortTable)

Example 19 with JSortTable

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

the class OutputFunctionsPanel method getFnScrollPaneTable.

private JSortTable getFnScrollPaneTable() {
    if (outputFnsScrollPaneTable == null) {
        try {
            outputFnsScrollPaneTable = new JSortTable();
            outputFnsScrollPaneTable.setName("ScrollPaneTable");
        } catch (java.lang.Throwable e) {
            e.printStackTrace(System.out);
        }
    }
    return outputFnsScrollPaneTable;
}
Also used : JSortTable(org.vcell.util.gui.sorttable.JSortTable)

Example 20 with JSortTable

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

the class EventPanel method getEventTargetsScrollPaneTable.

private JSortTable getEventTargetsScrollPaneTable() {
    if (eventTargetsScrollPaneTable == null) {
        try {
            eventTargetsScrollPaneTable = new JSortTable();
            eventTargetsScrollPaneTable.setName("ScrollPaneTable");
        } catch (java.lang.Throwable e) {
            e.printStackTrace(System.out);
        }
    }
    return eventTargetsScrollPaneTable;
}
Also used : 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