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;
}
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("");
}
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));
}
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;
}
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());
}
Aggregations