javax.swing.GroupLayout.SequentialGroup Java Examples
The following examples show how to use
javax.swing.GroupLayout.SequentialGroup.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StockpileDialog.java From jeveassets with GNU General Public License v2.0 | 6 votes |
private void updatePanels() { jFiltersPanel.removeAll(); GroupLayout groupLayout = new GroupLayout(jFiltersPanel); jFiltersPanel.setLayout(groupLayout); groupLayout.setAutoCreateGaps(true); groupLayout.setAutoCreateContainerGaps(false); ParallelGroup horizontalGroup = groupLayout.createParallelGroup(); SequentialGroup verticalGroup = groupLayout.createSequentialGroup(); for (LocationPanel locationPanel : locationPanels) { horizontalGroup.addComponent(locationPanel.getPanel()); verticalGroup.addComponent(locationPanel.getPanel()); } jFiltersPanel.setVisible(!locationPanels.isEmpty()); groupLayout.setHorizontalGroup(horizontalGroup); groupLayout.setVerticalGroup(verticalGroup); autoValidate(); this.getDialog().pack(); }
Example #2
Source File: StockpileDialog.java From jeveassets with GNU General Public License v2.0 | 5 votes |
private void doLayout() { autoValidate(); jFilters.removeAll(); GroupLayout layout = new GroupLayout(jFilters); jFilters.setLayout(layout); layout.setAutoCreateGaps(true); layout.setAutoCreateContainerGaps(false); ParallelGroup horizontalGroup = layout.createParallelGroup(); SequentialGroup verticalGroup = layout.createSequentialGroup(); for (FilterPanel ownerPanel : ownerPanels) { horizontalGroup.addComponent(ownerPanel.getPanel()); verticalGroup.addComponent(ownerPanel.getPanel()); } for (FilterPanel flagPanel : flagPanels) { horizontalGroup.addComponent(flagPanel.getPanel()); verticalGroup.addComponent(flagPanel.getPanel()); } for (FilterPanel containerPanel : containerPanels) { horizontalGroup.addComponent(containerPanel.getPanel()); verticalGroup.addComponent(containerPanel.getPanel()); } if (singletonPanel != null) { horizontalGroup.addComponent(singletonPanel.getPanel()); verticalGroup.addComponent(singletonPanel.getPanel()); } layout.setVerticalGroup(verticalGroup); layout.setHorizontalGroup(horizontalGroup); getDialog().pack(); }
Example #3
Source File: AttachmentsPanel.java From netbeans with Apache License 2.0 | 4 votes |
void setLayoutGroups(GroupLayout.ParallelGroup horizontalGroup, GroupLayout.SequentialGroup verticalGroup) { this.horizontalGroup = horizontalGroup; this.verticalGroup = verticalGroup; }
Example #4
Source File: CELabelsPanel.java From open-ig with GNU Lesser General Public License v3.0 | 4 votes |
/** * Update the controls of the detail panel. */ void updateDetails() { bottomPanel.removeAll(); GroupLayout gl = (GroupLayout)bottomPanel.getLayout(); ParallelGroup c1 = gl.createParallelGroup(); ParallelGroup c2 = gl.createParallelGroup(); SequentialGroup r1 = gl.createSequentialGroup(); c1.addComponent(keyLabel); c2.addComponent(keyField); r1.addGroup( gl.createParallelGroup(Alignment.BASELINE) .addComponent(keyLabel) .addComponent(keyField, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) ); textAreas.clear(); for (final String lang : context.dataManager().languages()) { JLabel lbl = new JLabel(lang); JTextArea ta = new JTextArea(); final CEValueBox<JTextArea> vta = CEValueBox.of("", ta); vta.validator = new Action1<JTextArea>() { @Override public void invoke(JTextArea value) { validateLabelField(vta); } }; textAreas.put(lang, vta); c1.addComponent(lbl); c2.addComponent(vta); r1.addGroup( gl.createParallelGroup(Alignment.BASELINE) .addComponent(lbl) .addComponent(vta, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) ); } gl.setHorizontalGroup( gl.createSequentialGroup() .addGroup(c1) .addGroup(c2) ); gl.setVerticalGroup( r1 ); }
Example #5
Source File: CEDefinitionPanel.java From open-ig with GNU Lesser General Public License v3.0 | 4 votes |
/** @return The referenced main data files panel. */ JPanel createReferencesPanel() { JPanel p = new JPanel(); GroupLayout gl = new GroupLayout(p); p.setLayout(gl); gl.setAutoCreateContainerGaps(true); gl.setAutoCreateGaps(true); SequentialGroup rows = gl.createSequentialGroup(); ParallelGroup col1 = gl.createParallelGroup(); ParallelGroup col2 = gl.createParallelGroup(); ParallelGroup col3 = gl.createParallelGroup(); for (String a : ELEMENT_NAMES) { JLabel indicator = new JLabel(); JLabel caption = new JLabel(get("definition.ref_" + a)); JTextField textField = new JTextField(); indicators.put(a, indicator); fields.put(a, textField); ParallelGroup pg = gl.createParallelGroup(Alignment.BASELINE); col1.addComponent(caption); col2.addComponent(textField); col3.addComponent(indicator, 20, 20, 20); pg.addComponent(caption); pg.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE); pg.addComponent(indicator, 20, 20, 20); rows.addGroup(pg); } gl.setHorizontalGroup( gl.createSequentialGroup() .addGroup(col1) .addGroup(col2) .addGroup(col3) ); gl.setVerticalGroup(rows); return p; }
Example #6
Source File: CEDefinitionPanel.java From open-ig with GNU Lesser General Public License v3.0 | 4 votes |
/** * @return the properties listing panel */ JPanel createPropertiesPanel() { JPanel p = new JPanel(); GroupLayout gl = new GroupLayout(p); p.setLayout(gl); gl.setAutoCreateContainerGaps(true); gl.setAutoCreateGaps(true); SequentialGroup rows = gl.createSequentialGroup(); ParallelGroup col1 = gl.createParallelGroup(); ParallelGroup col2 = gl.createParallelGroup(); ParallelGroup col3 = gl.createParallelGroup(); for (String a : PARAM_NAMES) { JLabel indicator = new JLabel(); JLabel caption = new JLabel(get("definition.refprop_" + a)); JTextField textField = new JTextField(10); textField.setHorizontalAlignment(JTextField.RIGHT); caption.setToolTipText(get("definition.refprop_" + a + ".tip")); textField.setToolTipText(get("definition.refprop_" + a + ".tip")); indicators.put(a, indicator); fields.put(a, textField); ParallelGroup pg = gl.createParallelGroup(Alignment.BASELINE); col1.addComponent(caption); col2.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE); col3.addComponent(indicator, 20, 20, 20); pg.addComponent(caption); pg.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE); pg.addComponent(indicator, 20, 20, 20); rows.addGroup(pg); } gl.setHorizontalGroup( gl.createSequentialGroup() .addGroup(col1) .addGroup(col2) .addGroup(col3) ); gl.setVerticalGroup(rows); return p; }