use of org.gephi.lib.validation.Multiple4NumberValidator in project gephi by gephi.
the class ScreenshotSettingsPanel method createValidationPanel.
public static ValidationPanel createValidationPanel(ScreenshotSettingsPanel innerPanel) {
ValidationPanel validationPanel = new ValidationPanel();
if (innerPanel == null) {
innerPanel = new ScreenshotSettingsPanel();
}
validationPanel.setInnerComponent(innerPanel);
ValidationGroup group = validationPanel.getValidationGroup();
//Node field
group.add(innerPanel.widthTextField, Validators.REQUIRE_NON_EMPTY_STRING, new Multiple4NumberValidator());
//Edge field
group.add(innerPanel.heightTextField, Validators.REQUIRE_NON_EMPTY_STRING, new Multiple4NumberValidator());
return validationPanel;
}
Aggregations