Search in sources :

Example 76 with GroupLayout

use of javax.swing.GroupLayout in project cytoscape-impl by cytoscape.

the class RadialGradientEditor method getOtherOptionsPnl.

@Override
protected JPanel getOtherOptionsPnl() {
    final JPanel p = super.getOtherOptionsPnl();
    p.setVisible(true);
    final GroupLayout layout = new GroupLayout(p);
    p.setLayout(layout);
    layout.setAutoCreateContainerGaps(false);
    layout.setAutoCreateGaps(true);
    layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING, false).addComponent(centerLbl).addComponent(getPointPicker(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE));
    layout.setVerticalGroup(layout.createSequentialGroup().addComponent(centerLbl).addComponent(getPointPicker(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE));
    return p;
}
Also used : JPanel(javax.swing.JPanel) GroupLayout(javax.swing.GroupLayout)

Example 77 with GroupLayout

use of javax.swing.GroupLayout in project tetrad by cmu-phil.

the class DualListPanel method initComponents.

private void initComponents() {
    GridBagConstraints gridBagConstraints;
    sourceList = new JList<>();
    selectedList = new JList<>();
    unselectedScrollPane = new JScrollPane(sourceList);
    selectedScrollPane = new JScrollPane(selectedList);
    buttonParentPanel = new JPanel();
    buttonPanel = new JPanel();
    moveToselector = new JButton();
    moveToSource = new JButton();
    setOpaque(false);
    unselectedScrollPane.setBorder(BorderFactory.createTitledBorder("Unselected"));
    unselectedScrollPane.setViewportView(sourceList);
    selectedScrollPane.setBorder(BorderFactory.createTitledBorder("Selected"));
    selectedScrollPane.setViewportView(selectedList);
    buttonParentPanel.setOpaque(false);
    buttonParentPanel.setLayout(new GridBagLayout());
    buttonPanel.setOpaque(false);
    moveToselector.setText(">");
    moveToselector.setMaximumSize(new Dimension(64, 25));
    moveToselector.setMinimumSize(new Dimension(64, 25));
    moveToselector.setPreferredSize(new Dimension(64, 25));
    moveToSource.setText("<");
    moveToSource.setMaximumSize(new Dimension(64, 25));
    moveToSource.setMinimumSize(new Dimension(64, 25));
    moveToSource.setPreferredSize(new Dimension(64, 25));
    GroupLayout buttonPanelLayout = new GroupLayout(buttonPanel);
    buttonPanel.setLayout(buttonPanelLayout);
    buttonPanelLayout.setHorizontalGroup(buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(buttonPanelLayout.createSequentialGroup().addContainerGap().addGroup(buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(moveToselector, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addComponent(moveToSource, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addContainerGap()));
    buttonPanelLayout.setVerticalGroup(buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(buttonPanelLayout.createSequentialGroup().addContainerGap().addComponent(moveToselector, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(moveToSource, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addContainerGap()));
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    buttonParentPanel.add(buttonPanel, gridBagConstraints);
    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(unselectedScrollPane, GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(buttonParentPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(selectedScrollPane, GroupLayout.DEFAULT_SIZE, 144, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(unselectedScrollPane).addComponent(buttonParentPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(selectedScrollPane, GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE));
    unselectedScrollPane.getAccessibleContext().setAccessibleName("Unselected");
    unselectedScrollPane.getAccessibleContext().setAccessibleDescription("");
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) GridBagLayout(java.awt.GridBagLayout) JButton(javax.swing.JButton) GroupLayout(javax.swing.GroupLayout) Dimension(java.awt.Dimension)

Example 78 with GroupLayout

use of javax.swing.GroupLayout in project tetrad by cmu-phil.

the class PaddingPanel method initComponents.

private void initComponents() {
    layeredPane.setLayer(innerComponent, JLayeredPane.DEFAULT_LAYER);
    GroupLayout layeredPaneLayout = new GroupLayout(layeredPane);
    layeredPane.setLayout(layeredPaneLayout);
    layeredPaneLayout.setHorizontalGroup(layeredPaneLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layeredPaneLayout.createSequentialGroup().addContainerGap().addComponent(innerComponent, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addContainerGap()));
    layeredPaneLayout.setVerticalGroup(layeredPaneLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layeredPaneLayout.createSequentialGroup().addContainerGap().addComponent(innerComponent, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addContainerGap()));
    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(layeredPane, GroupLayout.Alignment.TRAILING));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(layeredPane, GroupLayout.Alignment.TRAILING));
}
Also used : GroupLayout(javax.swing.GroupLayout)

Example 79 with GroupLayout

use of javax.swing.GroupLayout in project blue by kunstmusik.

the class AddEffectEditorDialog method getNamePanel.

private Component getNamePanel() {
    JPanel panel = new JPanel();
    JLabel label = new JLabel("Name:");
    GroupLayout layout = new GroupLayout(panel);
    panel.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(label).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(nameText).addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(label).addComponent(nameText))));
    return panel;
}
Also used : JPanel(javax.swing.JPanel) GroupLayout(javax.swing.GroupLayout) JLabel(javax.swing.JLabel)

Example 80 with GroupLayout

use of javax.swing.GroupLayout in project com.revolsys.open by revolsys.

the class GroupLayouts method makeColumns.

public static void makeColumns(final Container container, final boolean containerGaps) {
    final GroupLayout groupLayout = getLayout(container, containerGaps);
    makeColumns(container, groupLayout, container.getComponentCount());
}
Also used : GroupLayout(javax.swing.GroupLayout)

Aggregations

GroupLayout (javax.swing.GroupLayout)194 JPanel (javax.swing.JPanel)132 JLabel (javax.swing.JLabel)79 JButton (javax.swing.JButton)53 ActionEvent (java.awt.event.ActionEvent)42 JScrollPane (javax.swing.JScrollPane)39 ActionListener (java.awt.event.ActionListener)23 JTextField (javax.swing.JTextField)22 Dimension (java.awt.Dimension)21 AbstractAction (javax.swing.AbstractAction)20 JSeparator (javax.swing.JSeparator)15 JCheckBox (javax.swing.JCheckBox)14 ParallelGroup (javax.swing.GroupLayout.ParallelGroup)11 SequentialGroup (javax.swing.GroupLayout.SequentialGroup)11 JComboBox (javax.swing.JComboBox)10 JTable (javax.swing.JTable)10 Color (java.awt.Color)9 Font (java.awt.Font)9 PropertyChangeListener (java.beans.PropertyChangeListener)8 AfterInjection (org.baderlab.csplugins.enrichmentmap.AfterInjection)8