Search in sources :

Example 1 with DownArrowIcon

use of org.vcell.util.gui.DownArrowIcon in project vcell by virtualcell.

the class BioModelEditorPathwayPanel method initialize.

private void initialize() {
    table = new JSortTable();
    tableModel = new PathwayTableModel(table);
    table.setModel(tableModel);
    table.disableUneditableForeground();
    importButton = new JButton("Import", new DownArrowIcon());
    importButton.setHorizontalTextPosition(SwingConstants.LEFT);
    importButton.setEnabled(false);
    importButton.addActionListener(eventHandler);
    table.getSelectionModel().addListSelectionListener(eventHandler);
    int gridy = 0;
    setLayout(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = gridy;
    gbc.weightx = 1.0;
    gbc.gridwidth = 6;
    gbc.fill = GridBagConstraints.BOTH;
    pathwayTitleLabel = new JLabel();
    pathwayTitleLabel.setFont(pathwayTitleLabel.getFont().deriveFont(Font.BOLD));
    pathwayTitleLabel.setHorizontalAlignment(JLabel.CENTER);
    add(pathwayTitleLabel, gbc);
    gridy++;
    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = gridy;
    gbc.weightx = 1.0;
    gbc.weighty = 1.0;
    gbc.gridwidth = 6;
    gbc.fill = GridBagConstraints.BOTH;
    add(table.getEnclosingScrollPane(), 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(15);
    textFieldSearch.addActionListener(eventHandler);
    textFieldSearch.getDocument().addDocumentListener(eventHandler);
    textFieldSearch.putClientProperty("JTextField.variant", "search");
    gbc = new java.awt.GridBagConstraints();
    gbc.weightx = 1.0;
    gbc.weighty = 0;
    gbc.gridx = 1;
    gbc.gridy = gridy;
    gbc.anchor = GridBagConstraints.LINE_START;
    gbc.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gbc.insets = new Insets(4, 4, 4, 4);
    add(textFieldSearch, gbc);
    gbc = new GridBagConstraints();
    gbc.gridx = 3;
    gbc.gridy = gridy;
    gbc.insets = new Insets(4, 20, 4, 4);
    gbc.anchor = GridBagConstraints.LINE_END;
    importButton.setPreferredSize(importButton.getPreferredSize());
    add(importButton, gbc);
}
Also used : GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) JSortTable(org.vcell.util.gui.sorttable.JSortTable) GridBagLayout(java.awt.GridBagLayout) JButton(javax.swing.JButton) DownArrowIcon(org.vcell.util.gui.DownArrowIcon) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField) GridBagConstraints(java.awt.GridBagConstraints)

Example 2 with DownArrowIcon

use of org.vcell.util.gui.DownArrowIcon in project vcell by virtualcell.

the class SpatialProcessDisplayPanel method initialize.

private void initialize() {
    setName("SpatialProcessDisplayPanel");
    setLayout(new GridBagLayout());
    int gridy = 0;
    GridBagConstraints 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);
    gbc = new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridy = gridy;
    gbc.weightx = 1.0;
    gbc.gridwidth = 2;
    gbc.anchor = GridBagConstraints.LINE_START;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.insets = new Insets(4, 4, 4, 4);
    add(textFieldSearch, gbc);
    gbc = new GridBagConstraints();
    gbc.gridx = 3;
    gbc.gridy = gridy;
    gbc.insets = new Insets(4, 50, 4, 4);
    gbc.anchor = GridBagConstraints.LINE_END;
    add(addNewButton, gbc);
    addNewButton.setIcon(new DownArrowIcon());
    addNewButton.setHorizontalTextPosition(SwingConstants.LEFT);
    addNewButton.addMouseListener(new MouseAdapter() {

        public void mousePressed(MouseEvent e) {
            JPopupMenu popup = new JPopupMenu();
            JMenuItem newPointLocationMenuItem = new JMenuItem(new AbstractAction("new Point Location") {

                public void actionPerformed(ActionEvent e) {
                    createNewPointLocation();
                }
            });
            JMenuItem newPointKinematicsMenuItem = new JMenuItem(new AbstractAction("new Point Kinematics") {

                public void actionPerformed(ActionEvent e) {
                    createNewPointKinematics();
                }
            });
            JMenuItem newSurfaceKinematicsMenuItem = new JMenuItem(new AbstractAction("new Surface Kinematics") {

                public void actionPerformed(ActionEvent e) {
                    createNewSurfaceKinematics();
                }
            });
            JMenuItem newVolumeKinematicsMenuItem = new JMenuItem(new AbstractAction("new Volume Kinematics") {

                public void actionPerformed(ActionEvent e) {
                    createNewVolumeKinematics();
                }
            });
            newPointLocationMenuItem.setIcon(VCellIcons.addIcon(VCellIcons.spatialPointIcon, VCellIcons.spatialLocationIcon));
            newPointKinematicsMenuItem.setIcon(VCellIcons.addIcon(VCellIcons.spatialPointIcon, VCellIcons.spatialKinematicsIcon));
            newSurfaceKinematicsMenuItem.setIcon(VCellIcons.addIcon(VCellIcons.spatialMembraneIcon, VCellIcons.spatialKinematicsIcon));
            newVolumeKinematicsMenuItem.setIcon(VCellIcons.addIcon(VCellIcons.spatialVolumeIcon, VCellIcons.spatialKinematicsIcon));
            popup.add(newPointLocationMenuItem);
            popup.add(newPointKinematicsMenuItem);
            popup.add(newSurfaceKinematicsMenuItem);
            popup.add(newVolumeKinematicsMenuItem);
            popup.show(addNewButton, 0, addNewButton.getHeight());
        }
    });
    // for now disable 'add' button
    // addNewButton.setEnabled(false);
    gbc = new GridBagConstraints();
    gbc.gridx = 4;
    gbc.insets = new Insets(4, 4, 4, 4);
    gbc.gridy = gridy;
    gbc.anchor = GridBagConstraints.LINE_END;
    add(deleteButton, gbc);
    gridy++;
    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.insets = new Insets(4, 4, 4, 4);
    gbc.gridy = gridy;
    gbc.weighty = 1.0;
    gbc.weightx = 1.0;
    gbc.gridwidth = 6;
    gbc.fill = GridBagConstraints.BOTH;
    add(table.getEnclosingScrollPane(), gbc);
}
Also used : GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) MouseEvent(java.awt.event.MouseEvent) GridBagLayout(java.awt.GridBagLayout) ActionEvent(java.awt.event.ActionEvent) DownArrowIcon(org.vcell.util.gui.DownArrowIcon) MouseAdapter(java.awt.event.MouseAdapter) JLabel(javax.swing.JLabel) JMenuItem(javax.swing.JMenuItem) AbstractAction(javax.swing.AbstractAction) JPopupMenu(javax.swing.JPopupMenu)

Example 3 with DownArrowIcon

use of org.vcell.util.gui.DownArrowIcon in project vcell by virtualcell.

the class SimulationListPanel method getMoreActionsButton.

private javax.swing.JButton getMoreActionsButton() {
    if (moreActionsButton == null) {
        try {
            moreActionsButton = new JButton("More Actions", new DownArrowIcon());
            moreActionsButton.setHorizontalTextPosition(SwingConstants.LEFT);
            moreActionsButton.setName("MoreActionsButton");
        } catch (java.lang.Throwable ivjExc) {
            handleException(ivjExc);
        }
    }
    return moreActionsButton;
}
Also used : JButton(javax.swing.JButton) DownArrowIcon(org.vcell.util.gui.DownArrowIcon)

Example 4 with DownArrowIcon

use of org.vcell.util.gui.DownArrowIcon in project vcell by virtualcell.

the class DataSymbolsPanel method initialize.

/**
 * Initialize the class.
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private void initialize() {
    try {
        setName("DataSymbolsPanel");
        addNewButton.setIcon(new DownArrowIcon());
        addNewButton.setHorizontalTextPosition(SwingConstants.LEFT);
        // setSize(456, 539);
        setLayout(new GridBagLayout());
        int gridy = 0;
        GridBagConstraints 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);
        gbc = new GridBagConstraints();
        gbc.gridx = 1;
        gbc.gridy = gridy;
        gbc.weightx = 1.0;
        gbc.gridwidth = 2;
        gbc.anchor = GridBagConstraints.LINE_START;
        gbc.fill = GridBagConstraints.HORIZONTAL;
        gbc.insets = new Insets(4, 4, 4, 4);
        add(textFieldSearch, gbc);
        gbc = new GridBagConstraints();
        gbc.gridx = 3;
        gbc.gridy = gridy;
        gbc.insets = new Insets(4, 50, 4, 4);
        gbc.anchor = GridBagConstraints.LINE_END;
        add(addNewButton, gbc);
        gbc = new GridBagConstraints();
        gbc.gridx = 4;
        gbc.insets = new Insets(4, 4, 4, 4);
        gbc.gridy = gridy;
        gbc.anchor = GridBagConstraints.LINE_END;
        add(deleteButton, gbc);
        gridy++;
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.insets = new Insets(4, 4, 4, 4);
        gbc.gridy = gridy;
        gbc.weighty = 1.0;
        gbc.weightx = 1.0;
        gbc.gridwidth = 6;
        gbc.fill = GridBagConstraints.BOTH;
        add(table.getEnclosingScrollPane(), gbc);
    } catch (java.lang.Throwable ivjExc) {
        handleException(ivjExc);
    }
}
Also used : GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) DownArrowIcon(org.vcell.util.gui.DownArrowIcon) JLabel(javax.swing.JLabel)

Example 5 with DownArrowIcon

use of org.vcell.util.gui.DownArrowIcon 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)

Aggregations

DownArrowIcon (org.vcell.util.gui.DownArrowIcon)14 JButton (javax.swing.JButton)11 GridBagConstraints (java.awt.GridBagConstraints)7 GridBagLayout (java.awt.GridBagLayout)6 Insets (java.awt.Insets)6 JLabel (javax.swing.JLabel)6 BioModelEntityObject (cbit.vcell.model.BioModelEntityObject)3 JPanel (javax.swing.JPanel)3 JTextField (javax.swing.JTextField)3 BioPaxObject (org.vcell.pathway.BioPaxObject)3 RelationshipObject (org.vcell.relationship.RelationshipObject)3 RbmObservable (cbit.vcell.model.RbmObservable)2 ReactionRule (cbit.vcell.model.ReactionRule)2 SpeciesContext (cbit.vcell.model.SpeciesContext)2 BorderLayout (java.awt.BorderLayout)2 ArrayList (java.util.ArrayList)2 JTable (javax.swing.JTable)2 DefaultScrollTableCellRenderer (org.vcell.util.gui.DefaultScrollTableCellRenderer)2 JTabbedPaneEnhanced (org.vcell.util.gui.JTabbedPaneEnhanced)2 ModelProcessEquation (cbit.gui.ModelProcessEquation)1