Search in sources :

Example 71 with JSeparator

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

the class MicroscopeMeasurementPanel method createPSFPanel.

private JPanel createPSFPanel() {
    JPanel panel = new JPanel(new GridBagLayout());
    JLabel label = new JLabel("Point Spread Function");
    Font boldFont = label.getFont().deriveFont(Font.BOLD);
    label.setHorizontalAlignment(JLabel.CENTER);
    label.setFont(boldFont);
    JPanel p = new JPanel();
    p.setBackground(ItemBackgroundColor);
    p.add(label);
    int gridy = 0;
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = gridy;
    gbc.gridwidth = GridBagConstraints.REMAINDER;
    gbc.weightx = 1.0;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.anchor = GridBagConstraints.FIRST_LINE_START;
    panel.add(p, gbc);
    gridy++;
    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = gridy;
    gbc.weightx = 1.0;
    gbc.gridwidth = GridBagConstraints.REMAINDER;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.anchor = GridBagConstraints.LINE_START;
    panel.add(new JSeparator(), gbc);
    gridy++;
    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = gridy;
    gbc.insets = new Insets(0, 4, 2, 4);
    gbc.anchor = GridBagConstraints.LINE_START;
    panel.add(rdbtnZprojection, gbc);
    gridy++;
    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = gridy;
    gbc.insets = new Insets(0, 4, 2, 4);
    gbc.anchor = GridBagConstraints.LINE_START;
    panel.add(radioButtonGaussian, gbc);
    gaussianPsfPanel = createGaussianPsfPanel();
    gbc = new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridy = gridy;
    gbc.weightx = 1.0;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.gridwidth = GridBagConstraints.REMAINDER;
    gbc.insets = new Insets(0, 4, 2, 4);
    gbc.anchor = GridBagConstraints.LINE_START;
    panel.add(gaussianPsfPanel, gbc);
    gridy++;
    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = gridy;
    gbc.insets = new Insets(0, 4, 4, 4);
    gbc.anchor = GridBagConstraints.LINE_START;
    panel.add(rdbtnExperimental, gbc);
    experimentalPsfPanel = new JPanel(new GridLayout(1, 2, 10, 0));
    experimentalPsfPanel.add(pointSpreadFunctionsComboBox);
    experimentalPsfPanel.add(importPsfButton);
    gbc = new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridy = gridy;
    gbc.weightx = 1.0;
    gbc.gridwidth = GridBagConstraints.REMAINDER;
    gbc.insets = new Insets(0, 4, 4, 4);
    gbc.anchor = GridBagConstraints.LINE_START;
    panel.add(experimentalPsfPanel, gbc);
    panel.setBorder(GuiConstants.TAB_PANEL_BORDER);
    return panel;
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) GridLayout(java.awt.GridLayout) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) JLabel(javax.swing.JLabel) Font(java.awt.Font) JSeparator(javax.swing.JSeparator)

Example 72 with JSeparator

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

the class ExpandingAccountTablePanel method initComponents.

private void initComponents() {
    accountPane = new ExpandingAccountTablePane();
    JPanel toolPanel = new JPanel();
    JToolBar toolBar = new JToolBar();
    setLayout(new BorderLayout());
    toolPanel.setLayout(new BorderLayout());
    toolBar.setFloatable(false);
    toolBar.setRollover(true);
    newButton = new RollOverButton(rb.getString("Button.New"), IconUtils.getIcon("/jgnash/resource/document-new.png"));
    newButton.setToolTipText(rb.getString("ToolTip.NewAccount"));
    toolBar.add(newButton);
    modifyButton = new RollOverButton(rb.getString("Button.Modify"), IconUtils.getIcon("/jgnash/resource/document-properties.png"));
    modifyButton.setToolTipText(rb.getString("ToolTip.ModifyAccount"));
    toolBar.add(modifyButton);
    reconcileButton = new RollOverButton(rb.getString("Button.Reconcile"), IconUtils.getIcon("/jgnash/resource/view-refresh.png"));
    reconcileButton.setToolTipText(rb.getString("ToolTip.ReconcileAccount"));
    toolBar.add(reconcileButton);
    deleteButton = new RollOverButton(rb.getString("Button.Delete"), IconUtils.getIcon("/jgnash/resource/edit-delete.png"));
    deleteButton.setToolTipText(rb.getString("ToolTip.DeleteAccount"));
    toolBar.add(deleteButton);
    filterButton = new RollOverButton(rb.getString("Button.Filter"), IconUtils.getIcon("/jgnash/resource/preferences-system.png"));
    filterButton.setToolTipText(rb.getString("ToolTip.FilterAccount"));
    toolBar.add(filterButton);
    zoomButton = new RollOverButton(rb.getString("Button.Zoom"), IconUtils.getIcon("/jgnash/resource/edit-find.png"));
    toolBar.add(zoomButton);
    toolPanel.add(toolBar, BorderLayout.NORTH);
    toolPanel.add(new JSeparator(), BorderLayout.CENTER);
    add(toolPanel, BorderLayout.NORTH);
    accountPane.setBorder(new EmptyBorder(new Insets(0, 0, 0, 0)));
    accountPane.setMinimumSize(new Dimension(200, 100));
    accountPane.setAutoscrolls(true);
    add(accountPane, BorderLayout.CENTER);
}
Also used : JPanel(javax.swing.JPanel) RollOverButton(jgnash.ui.components.RollOverButton) Insets(java.awt.Insets) BorderLayout(java.awt.BorderLayout) JToolBar(javax.swing.JToolBar) Dimension(java.awt.Dimension) EmptyBorder(javax.swing.border.EmptyBorder) JSeparator(javax.swing.JSeparator)

Example 73 with JSeparator

use of javax.swing.JSeparator in project gephi by gephi.

the class SplineControlPanel method buildDebugControls.

private Component buildDebugControls() {
    JPanel debugPanel = new JPanel(new GridBagLayout());
    debugPanel.add(Box.createHorizontalStrut(150), new GridBagConstraints(0, linesCount++, 2, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    //        button = addButton(debugPanel, "Create");
    //        button.addActionListener(new ActionListener() {
    //            public void actionPerformed(ActionEvent e) {
    //                JFileChooser chooser = new JFileChooser(".");
    //                int choice = chooser.showSaveDialog(SplineControlPanel.this);
    //                if (choice == JFileChooser.CANCEL_OPTION) {
    //                    return;
    //                }
    //                File file = chooser.getSelectedFile();
    //                try {
    //                    OutputStream out = new FileOutputStream(file);
    //                    display.saveAsTemplate(out);
    //                    out.close();
    //                } catch (FileNotFoundException e1) {
    //                } catch (IOException e1) {
    //                }
    //            }
    //        });
    addSeparator(debugPanel, NbBundle.getMessage(SplineEditor.class, "splineEditor_templates"));
    debugPanel.add(createTemplates(), new GridBagConstraints(0, linesCount++, 2, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    addEmptySpace(debugPanel, 6);
    JButton closeButton = addButton(debugPanel, NbBundle.getMessage(SplineEditor.class, "splineEditor_close"));
    closeButton.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent arg0) {
            editor.dispose();
        }
    });
    addEmptySpace(debugPanel, 6);
    debugPanel.add(Box.createVerticalGlue(), new GridBagConstraints(0, linesCount++, 2, 1, 1.0, 1.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    JPanel wrapper = new JPanel(new BorderLayout());
    wrapper.add(new JSeparator(JSeparator.VERTICAL), BorderLayout.WEST);
    wrapper.add(debugPanel);
    wrapper.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 6));
    return wrapper;
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) ActionListener(java.awt.event.ActionListener) BorderLayout(java.awt.BorderLayout) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) JSeparator(javax.swing.JSeparator)

Example 74 with JSeparator

use of javax.swing.JSeparator in project gephi by gephi.

the class SplineControlPanel method addSeparator.

private void addSeparator(JPanel panel, String label) {
    JPanel innerPanel = new JPanel(new GridBagLayout());
    innerPanel.add(new JLabel(label), new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    innerPanel.add(new JSeparator(), new GridBagConstraints(1, 0, 1, 1, 0.9, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(0, 6, 0, 6), 0, 0));
    panel.add(innerPanel, new GridBagConstraints(0, linesCount++, 2, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 6, 0), 0, 0));
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) JLabel(javax.swing.JLabel) JSeparator(javax.swing.JSeparator)

Example 75 with JSeparator

use of javax.swing.JSeparator in project libgdx by libgdx.

the class SettingsDialog method uiLayout.

private void uiLayout() {
    content = new JPanel(new GridBagLayout());
    content.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
    bottomPanel = new JPanel(new GridBagLayout());
    buttonPanel = new JPanel(new GridBagLayout());
    buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    buttonOK = new SetupButton("Save");
    buttonCancel = new SetupButton("Cancel");
    buttonPanel.add(buttonOK, new GridBagConstraints(0, 0, 1, 1, 0, 0, CENTER, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    buttonPanel.add(buttonCancel, new GridBagConstraints(1, 0, 1, 1, 0, 0, CENTER, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    contentPane.add(content, new GridBagConstraints(0, 0, 1, 1, 1, 1, NORTH, BOTH, new Insets(0, 0, 0, 0), 0, 0));
    JLabel settings = new JLabel("Settings");
    JLabel description = new JLabel("Description");
    settings.setForeground(new Color(255, 255, 255));
    description.setForeground(new Color(255, 255, 255));
    settings.setHorizontalAlignment(JLabel.CENTER);
    description.setHorizontalAlignment(JLabel.CENTER);
    content.add(settings, new GridBagConstraints(0, 0, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    content.add(description, new GridBagConstraints(3, 0, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    JLabel mavenLabel = new JLabel("Maven Mirror Url");
    JLabel mavenDesc = new JLabel("Replaces Maven Central with this repository");
    mavenTextField = new JTextField(15);
    mavenTextField.setMinimumSize(mavenTextField.getPreferredSize());
    mavenLabel.setForeground(new Color(170, 170, 170));
    mavenDesc.setForeground(new Color(170, 170, 170));
    JLabel ideaLabel = new JLabel("IDEA");
    JLabel ideaDesc = new JLabel("Generates Intellij IDEA project files");
    ideaBox = new SetupCheckBox();
    ideaLabel.setForeground(new Color(170, 170, 170));
    ideaDesc.setForeground(new Color(170, 170, 170));
    ideaBox.setBackground(new Color(36, 36, 36));
    JLabel eclipseLabel = new JLabel("Eclipse");
    JLabel eclipseDesc = new JLabel("Generates Eclipse project files");
    eclipseBox = new SetupCheckBox();
    eclipseLabel.setForeground(new Color(170, 170, 170));
    eclipseDesc.setForeground(new Color(170, 170, 170));
    eclipseBox.setBackground(new Color(36, 36, 36));
    JLabel offlineLabel = new JLabel("Offline Mode");
    JLabel offlineDesc = new JLabel("Don't force download dependencies");
    offlineBox = new SetupCheckBox();
    offlineLabel.setForeground(new Color(170, 170, 170));
    offlineDesc.setForeground(new Color(170, 170, 170));
    offlineBox.setBackground(new Color(36, 36, 36));
    JSeparator separator = new JSeparator();
    separator.setForeground(new Color(85, 85, 85));
    separator.setBackground(new Color(85, 85, 85));
    content.add(separator, new GridBagConstraints(0, 1, 4, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    content.add(mavenLabel, new GridBagConstraints(0, 2, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    content.add(mavenTextField, new GridBagConstraints(1, 2, 2, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
    content.add(mavenDesc, new GridBagConstraints(3, 2, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
    content.add(ideaLabel, new GridBagConstraints(0, 3, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    content.add(ideaBox, new GridBagConstraints(1, 3, 2, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
    content.add(ideaDesc, new GridBagConstraints(3, 3, 2, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
    content.add(eclipseLabel, new GridBagConstraints(0, 4, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    content.add(eclipseBox, new GridBagConstraints(1, 4, 2, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
    content.add(eclipseDesc, new GridBagConstraints(3, 4, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
    content.add(offlineLabel, new GridBagConstraints(0, 5, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    content.add(offlineBox, new GridBagConstraints(1, 5, 2, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
    content.add(offlineDesc, new GridBagConstraints(3, 5, 1, 1, 1, 1, NORTH, HORIZONTAL, new Insets(0, 15, 0, 0), 0, 0));
    String text = "<p style=\"font-size:10\">Click for more info on using Gradle without IDE integration</p>";
    linkText = new JLabel("<html>" + text + "</html>");
    bottomPanel.add(linkText, new GridBagConstraints(0, 0, 1, 1, 1, 1, WEST, NONE, new Insets(0, 10, 0, 0), 0, 0));
    bottomPanel.add(buttonPanel, new GridBagConstraints(3, 0, 1, 1, 1, 1, SOUTHEAST, NONE, new Insets(0, 0, 0, 0), 0, 0));
    contentPane.add(bottomPanel, new GridBagConstraints(0, 1, 4, 1, 1, 1, SOUTH, HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) SetupButton(com.badlogic.gdx.setup.GdxSetupUI.SetupButton) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) Color(java.awt.Color) SetupCheckBox(com.badlogic.gdx.setup.GdxSetupUI.SetupCheckBox) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField) JSeparator(javax.swing.JSeparator)

Aggregations

JSeparator (javax.swing.JSeparator)147 JPanel (javax.swing.JPanel)74 JLabel (javax.swing.JLabel)65 ActionEvent (java.awt.event.ActionEvent)44 BoxLayout (javax.swing.BoxLayout)44 JButton (javax.swing.JButton)44 JMenuItem (javax.swing.JMenuItem)38 JMenu (javax.swing.JMenu)32 GridBagConstraints (java.awt.GridBagConstraints)31 Insets (java.awt.Insets)30 ActionListener (java.awt.event.ActionListener)30 Dimension (java.awt.Dimension)24 FlowLayout (java.awt.FlowLayout)24 JScrollPane (javax.swing.JScrollPane)24 GridBagLayout (java.awt.GridBagLayout)22 JPopupMenu (javax.swing.JPopupMenu)19 BorderLayout (java.awt.BorderLayout)16 JTextField (javax.swing.JTextField)16 JCheckBox (javax.swing.JCheckBox)13 AbstractAction (javax.swing.AbstractAction)12