Search in sources :

Example 1 with Multiple4NumberValidator

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;
}
Also used : Multiple4NumberValidator(org.gephi.lib.validation.Multiple4NumberValidator) ValidationGroup(org.netbeans.validation.api.ui.ValidationGroup) ValidationPanel(org.netbeans.validation.api.ui.ValidationPanel)

Aggregations

Multiple4NumberValidator (org.gephi.lib.validation.Multiple4NumberValidator)1 ValidationGroup (org.netbeans.validation.api.ui.ValidationGroup)1 ValidationPanel (org.netbeans.validation.api.ui.ValidationPanel)1