Search in sources :

Example 96 with JSplitPane

use of javax.swing.JSplitPane in project qi4j-sdk by Qi4j.

the class StatePane method $$$setupUI$$$.

/**
     * Method generated by IntelliJ IDEA GUI Designer
     * >>> IMPORTANT!! <<<
     * DO NOT edit this method OR call it in your code!
     *
     */
private void $$$setupUI$$$() {
    contentPane = new JPanel();
    contentPane.setLayout(new BorderLayout(0, 0));
    splitPane = new JSplitPane();
    contentPane.add(splitPane, BorderLayout.CENTER);
    final JScrollPane scrollPane1 = new JScrollPane();
    splitPane.setLeftComponent(scrollPane1);
    methodList = new JList();
    scrollPane1.setViewportView(methodList);
    final JScrollPane scrollPane2 = new JScrollPane();
    splitPane.setRightComponent(scrollPane2);
    methodDetailTable = new JTable();
    scrollPane2.setViewportView(methodDetailTable);
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) JTable(javax.swing.JTable) JSplitPane(javax.swing.JSplitPane) JList(javax.swing.JList)

Example 97 with JSplitPane

use of javax.swing.JSplitPane in project jgnash by ccavanaugh.

the class MainRegisterPanel method layoutMainPanel.

private void layoutMainPanel() {
    final ResourceBundle rb = ResourceUtils.getBundle();
    JPanel toolPanel;
    toolPanel = new JPanel();
    registerPane = new JSplitPane();
    registerPane.setOneTouchExpandable(true);
    setLayout(new BorderLayout());
    toolPanel.setLayout(new BorderLayout());
    JToolBar toolBar = new JToolBar();
    toolBar.setFloatable(false);
    toolBar.setRollover(true);
    reconcileButton = new RollOverButton(rb.getString("Button.Reconcile"), IconUtils.getIcon("/jgnash/resource/view-refresh.png"));
    reconcileButton.setToolTipText(rb.getString("ToolTip.ReconcileAccount"));
    reconcileButton.addActionListener(this);
    toolBar.add(reconcileButton);
    filterButton = new RollOverButton(rb.getString("Button.Filter"), IconUtils.getIcon("/jgnash/resource/preferences-system.png"));
    filterButton.setToolTipText(rb.getString("ToolTip.FilterAccounts"));
    filterButton.addActionListener(this);
    toolBar.add(filterButton);
    columnsButton = new RollOverButton(rb.getString("Button.Columns"), IconUtils.getIcon("/jgnash/resource/stock_select-column.png"));
    columnsButton.setToolTipText(rb.getString("ToolTip.ColumnVis"));
    columnsButton.addActionListener(this);
    toolBar.add(columnsButton);
    resizeButton = new RollOverButton(rb.getString("Button.Resize"), IconUtils.getIcon("/jgnash/resource/stock_table-fit-width.png"));
    resizeButton.setToolTipText(rb.getString("ToolTip.ResizeColumns"));
    resizeButton.addActionListener(this);
    toolBar.add(resizeButton);
    zoomButton = new RollOverButton(rb.getString("Button.Zoom"), IconUtils.getIcon("/jgnash/resource/edit-find.png"));
    zoomButton.setToolTipText(rb.getString("ToolTip.ZoomRegister"));
    zoomButton.addActionListener(this);
    toolBar.add(zoomButton);
    printButton = new RollOverButton(rb.getString("Button.Print"), IconUtils.getIcon("/jgnash/resource/document-print.png"));
    printButton.setToolTipText(rb.getString("ToolTip.PrintRegRep"));
    printButton.addActionListener(this);
    toolBar.add(printButton);
    exportButton = new RollOverButton(rb.getString("Button.Export"), IconUtils.getIcon("/jgnash/resource/document-save-as.png"));
    exportButton.setToolTipText(rb.getString("ToolTip.ExportTransactions"));
    exportButton.addActionListener(this);
    toolBar.add(exportButton);
    toolPanel.add(toolBar, BorderLayout.NORTH);
    toolPanel.add(new JSeparator(), BorderLayout.CENTER);
    add(toolPanel, java.awt.BorderLayout.NORTH);
    registerPane.setDividerLocation(50);
    registerPane.setContinuousLayout(true);
    registerTree = new RegisterTree();
    registerTree.setBorder(new EmptyBorder(new Insets(0, 0, 2, 0)));
    registerTree.expand();
    registerPane.setLeftComponent(registerTree);
    registerPane.setRightComponent(new JPanel(null));
    add(registerPane, BorderLayout.CENTER);
    registerPane.setDividerLocation(prefs.getInt(DIVIDER, registerPane.getDividerLocation()));
    MessageBus.getInstance().registerListener(this, MessageChannel.ACCOUNT, MessageChannel.SYSTEM);
}
Also used : JPanel(javax.swing.JPanel) RollOverButton(jgnash.ui.components.RollOverButton) Insets(java.awt.Insets) BorderLayout(java.awt.BorderLayout) ResourceBundle(java.util.ResourceBundle) JToolBar(javax.swing.JToolBar) JSplitPane(javax.swing.JSplitPane) EmptyBorder(javax.swing.border.EmptyBorder) JSeparator(javax.swing.JSeparator)

Example 98 with JSplitPane

use of javax.swing.JSplitPane in project vcell by virtualcell.

the class FRAPStudyPanel method initialize.

/**
 * This method initializes this
 */
private void initialize() {
    this.setLayout(new BorderLayout());
    this.setSize(new Dimension(727, 607));
    this.setMinimumSize(new Dimension(640, 480));
    FRAPDataPanel fDataPanel = getFRAPDataPanel();
    JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, getLeftPanel(), fDataPanel);
    split.setDividerLocation(350);
    split.setDividerSize(2);
    this.add(split);
    iniConnection();
}
Also used : BorderLayout(java.awt.BorderLayout) Dimension(java.awt.Dimension) JSplitPane(javax.swing.JSplitPane)

Example 99 with JSplitPane

use of javax.swing.JSplitPane in project vcell by virtualcell.

the class FRAPStudyPanel method getLeftPanel.

/**
 * Left panel is to the left of the frapDataPanel(imagepanel).
 * It contains workFlowPanel and resultsDispalyPanel.
 */
private JPanel getLeftPanel() {
    if (leftPanel == null) {
        leftPanel = new JPanel(new BorderLayout());
        leftPanel.setBorder(new LineBorder(new Color(153, 186, 243), 2));
        JSplitPane split = new JSplitPane(JSplitPane.VERTICAL_SPLIT, getAnalysisProcedurePanel(), getAnalysisResultsPanel());
        split.setDividerLocation(112);
        split.setDividerSize(2);
        leftPanel.add(split);
    }
    return leftPanel;
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) LineBorder(javax.swing.border.LineBorder) Color(java.awt.Color) JSplitPane(javax.swing.JSplitPane)

Example 100 with JSplitPane

use of javax.swing.JSplitPane in project vcell by virtualcell.

the class BioPaxObjectPropertiesPanel method initialize.

private void initialize() {
    try {
        table = new ScrollTable();
        tableModel = new BioPaxObjectPropertiesTableModel(table);
        table.setModel(tableModel);
        details = new JTextPane();
        details.setContentType("text/html");
        details.setEditable(false);
        JScrollPane scrl = new JScrollPane(details);
        table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {

            @Override
            public void valueChanged(ListSelectionEvent e) {
                if (!e.getValueIsAdjusting()) {
                    BioPaxObjectProperty property = tableModel.getValueAt(table.getSelectedRow());
                    if (property != null) {
                        final String htmlStart = "<html><font face = \"Arial\"><font size =\"-2\">";
                        final String htmlEnd = "</font></font></html>";
                        if (!property.getDetails().isEmpty()) {
                            details.setText(htmlStart + property.getDetails() + htmlEnd);
                        } else if ((property.value != null) && !property.value.isEmpty()) {
                            String text = FormatDetails(property);
                            details.setText(htmlStart + text + htmlEnd);
                        } else {
                            details.setText(htmlStart + "row: " + table.getSelectedRow() + ", col: " + table.getSelectedColumn() + htmlEnd);
                        }
                    }
                }
            }
        });
        splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, table.getEnclosingScrollPane(), scrl);
        splitPane.setOneTouchExpandable(true);
        splitPane.setDividerLocation(150);
        // provide minimum sizes for the two components in the split pane
        Dimension minimumSize = new Dimension(100, 50);
        table.getEnclosingScrollPane().setMinimumSize(minimumSize);
        scrl.setMinimumSize(minimumSize);
        setLayout(new BorderLayout());
        // add(table.getEnclosingScrollPane(), BorderLayout.CENTER);
        // add(details, BorderLayout.CENTER);
        add(splitPane, BorderLayout.CENTER);
        setBackground(Color.white);
        table.addMouseListener(new MouseAdapter() {

            @Override
            public void mouseClicked(MouseEvent e) {
                if (e.getClickCount() == 2) {
                    // launch the browser when double click on hyperlinks
                    Point pt = e.getPoint();
                    int crow = table.rowAtPoint(pt);
                    int ccol = table.columnAtPoint(pt);
                    if (table.convertColumnIndexToModel(ccol) == BioPaxObjectPropertiesTableModel.Column_Value) {
                        BioPaxObjectProperty property = tableModel.getValueAt(crow);
                        BioPaxObject bioPaxObject = property.bioPaxObject;
                        if (bioPaxObject == null) {
                            BioModelEntityObject bioModelEntityObject = property.bioModelEntityObject;
                            if (bioModelEntityObject != null) {
                                if (bioModelEntityObject instanceof SpeciesContext) {
                                    selectionManager.followHyperlink(new ActiveView(null, DocumentEditorTreeFolderClass.REACTION_DIAGRAM_NODE, ActiveViewID.reaction_diagram), new Object[] { bioModelEntityObject });
                                } else if (bioModelEntityObject instanceof MolecularType) {
                                    selectionManager.followHyperlink(new ActiveView(null, DocumentEditorTreeFolderClass.MOLECULAR_TYPES_NODE, ActiveViewID.species_definitions), new Object[] { bioModelEntityObject });
                                }
                            } else if (((Entity) BioPaxObjectPropertiesPanel.this.bioPaxObject).getFormalNames() == null || ((Entity) BioPaxObjectPropertiesPanel.this.bioPaxObject).getFormalNames().size() == 0) {
                                lookupFormalName(crow);
                            }
                        } else if (bioPaxObject instanceof Xref) {
                            // if xRef, get url
                            String url = ((Xref) bioPaxObject).getURL();
                            DialogUtils.browserLauncher(BioPaxObjectPropertiesPanel.this, url, "Wrong URL.");
                        } else if (bioPaxObject instanceof SBEntity) {
                            // TODO: kineticLaw
                            SBEntity sbE = (SBEntity) bioPaxObject;
                            if (sbE.getID().contains("kineticLaw")) {
                                // String url = "http://sabio.h-its.org/sabioRestWebServices/kineticLaws/" + sbE.getID().substring(sbE.getID().indexOf("kineticLaw") + 10);
                                String url = "http://sabiork.h-its.org/kindatadirectiframe.jsp?kinlawid=" + sbE.getID().substring(sbE.getID().indexOf("kineticLaw") + 10);
                                DialogUtils.browserLauncher(BioPaxObjectPropertiesPanel.this, url, "Wrong URL.");
                            }
                        }
                    }
                }
            }
        });
        // --- end of addMouseListener()
        table.getColumnModel().getColumn(BioPaxObjectPropertiesTableModel.Column_Value).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);
                if (column == BioPaxObjectPropertiesTableModel.Column_Value) {
                    BioPaxObjectProperty property = tableModel.getValueAt(row);
                    BioPaxObject bpObject = property.bioPaxObject;
                    String text = property.value;
                    // colorize BLUE and add surround text with <html></html> tags
                    if (bpObject == null) {
                        BioModelEntityObject bioModelEntityObject = property.bioModelEntityObject;
                        if (bioModelEntityObject != null) {
                            if (!isSelected) {
                                setForeground(Color.blue);
                            }
                            setText("<html><u>" + text + "</u></html>");
                        }
                    } else {
                        if (bpObject instanceof Xref) {
                            String url = ((Xref) bpObject).getURL();
                            if (url != null) {
                                setToolTipText(url);
                                if (!isSelected) {
                                    setForeground(Color.blue);
                                }
                                setText("<html><u>" + text + "</u></html>");
                            }
                        } else if (bpObject instanceof SBEntity) {
                            String url = ((SBEntity) bpObject).getID();
                            if (url.contains("kineticLaw")) {
                                setToolTipText(url);
                                if (!isSelected) {
                                    setForeground(Color.blue);
                                }
                                if (url.contains("http")) {
                                    setText("<html><u>" + text + "</u></html>");
                                }
                            }
                        }
                    }
                }
                BioPaxObjectProperty property = tableModel.getValueAt(row);
                if (!property.tooltip.isEmpty()) {
                    setToolTipText(property.tooltip);
                }
                return this;
            }
        });
    // --- end of setCellRenderer()
    } catch (java.lang.Throwable ivjExc) {
        handleException(ivjExc);
    }
}
Also used : SBEntity(org.vcell.pathway.sbpax.SBEntity) PhysicalEntity(org.vcell.pathway.PhysicalEntity) Entity(org.vcell.pathway.Entity) ScrollTable(org.vcell.util.gui.ScrollTable) BioPaxObject(org.vcell.pathway.BioPaxObject) ListSelectionEvent(javax.swing.event.ListSelectionEvent) SpeciesContext(cbit.vcell.model.SpeciesContext) ActiveView(cbit.vcell.client.desktop.biomodel.SelectionManager.ActiveView) SBEntity(org.vcell.pathway.sbpax.SBEntity) JTextPane(javax.swing.JTextPane) Xref(org.vcell.pathway.Xref) UnificationXref(org.vcell.pathway.UnificationXref) RelationshipXref(org.vcell.pathway.RelationshipXref) PublicationXref(org.vcell.pathway.PublicationXref) BorderLayout(java.awt.BorderLayout) Component(java.awt.Component) JScrollPane(javax.swing.JScrollPane) MouseEvent(java.awt.event.MouseEvent) MouseAdapter(java.awt.event.MouseAdapter) Dimension(java.awt.Dimension) Point(java.awt.Point) BioModelEntityObject(cbit.vcell.model.BioModelEntityObject) Point(java.awt.Point) ListSelectionListener(javax.swing.event.ListSelectionListener) MolecularType(org.vcell.model.rbm.MolecularType) JTable(javax.swing.JTable) GroupObject(org.vcell.pathway.GroupObject) BioPaxObject(org.vcell.pathway.BioPaxObject) RelationshipObject(org.vcell.relationship.RelationshipObject) BioModelEntityObject(cbit.vcell.model.BioModelEntityObject) DefaultScrollTableCellRenderer(org.vcell.util.gui.DefaultScrollTableCellRenderer) JSplitPane(javax.swing.JSplitPane)

Aggregations

JSplitPane (javax.swing.JSplitPane)109 BorderLayout (java.awt.BorderLayout)69 JPanel (javax.swing.JPanel)64 JScrollPane (javax.swing.JScrollPane)54 Dimension (java.awt.Dimension)40 JLabel (javax.swing.JLabel)31 JButton (javax.swing.JButton)17 JTextArea (javax.swing.JTextArea)16 FlowLayout (java.awt.FlowLayout)15 Insets (java.awt.Insets)15 GridBagLayout (java.awt.GridBagLayout)14 GridBagConstraints (java.awt.GridBagConstraints)13 JTable (javax.swing.JTable)13 Container (java.awt.Container)10 GridLayout (java.awt.GridLayout)10 ArrayList (java.util.ArrayList)10 BoxLayout (javax.swing.BoxLayout)10 JComponent (javax.swing.JComponent)10 JTabbedPane (javax.swing.JTabbedPane)10 EmptyBorder (javax.swing.border.EmptyBorder)10