use of org.netbeans.validation.api.ui.ValidationGroup in project gephi by gephi.
the class RandomGraphPanel method createValidationPanel.
public static ValidationPanel createValidationPanel(RandomGraphPanel innerPanel) {
ValidationPanel validationPanel = new ValidationPanel();
if (innerPanel == null) {
innerPanel = new RandomGraphPanel();
}
validationPanel.setInnerComponent(innerPanel);
ValidationGroup group = validationPanel.getValidationGroup();
//Node field
group.add(innerPanel.nodeField, Validators.REQUIRE_NON_EMPTY_STRING, new PositiveNumberValidator());
//Edge field
group.add(innerPanel.edgeField, Validators.REQUIRE_NON_EMPTY_STRING, new BetweenZeroAndOneValidator());
return validationPanel;
}
use of org.netbeans.validation.api.ui.ValidationGroup in project gephi by gephi.
the class UIExporterGMLPanel method createValidationPanel.
public static ValidationPanel createValidationPanel(UIExporterGMLPanel innerPanel) {
ValidationPanel validationPanel = new ValidationPanel();
validationPanel.setInnerComponent(innerPanel);
ValidationGroup group = validationPanel.getValidationGroup();
innerPanel.validate(group);
return validationPanel;
}
use of org.netbeans.validation.api.ui.ValidationGroup in project gephi-plugins-bootcamp by gephi.
the class EqualValuesMergeStrategyUI method getSettingsPanel.
@Override
public JPanel getSettingsPanel() {
//Create a validation panel:
ValidationPanel validationPanel = new ValidationPanel();
validationPanel.setInnerComponent(this);
ValidationGroup group = validationPanel.getValidationGroup();
//ColumnTitleValidator is in UI utils module
group.add(titleTextField, new ColumnTitleValidator(table));
return validationPanel;
}
use of org.netbeans.validation.api.ui.ValidationGroup in project gephi by gephi.
the class DynamicSettingsPanel method createCounpoundPanel.
public static JPanel createCounpoundPanel(DynamicSettingsPanel dynamicPanel, JPanel innerPanel) {
JPanel result = new JPanel();
java.awt.GridBagConstraints gridBagConstraints;
result.setLayout(new java.awt.GridBagLayout());
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
result.add(dynamicPanel, gridBagConstraints);
if (innerPanel != null) {
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
result.add(innerPanel, gridBagConstraints);
}
//Validation
ValidationPanel validationPanel = new ValidationPanel();
validationPanel.setInnerComponent(result);
ValidationGroup group = validationPanel.getValidationGroup();
dynamicPanel.createValidation(group);
return validationPanel;
}
use of org.netbeans.validation.api.ui.ValidationGroup in project gephi by gephi.
the class AvailableColumnsPanel method getValidationPanel.
public ValidationPanel getValidationPanel() {
ValidationPanel validationPanel = new ValidationPanel();
validationPanel.setInnerComponent(this);
ValidationGroup group = validationPanel.getValidationGroup();
group.add(validator = new AvailableColumnsValidator());
refreshAvailableColumnsControls();
return validationPanel;
}
Aggregations