use of org.gephi.lib.validation.BetweenZeroAndOneValidator 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;
}
Aggregations