use of org.netbeans.validation.api.ui.ValidationPanel in project gephi by gephi.
the class ConvertColumnToDynamicTimestampsUI method buildValidationPanel.
private void buildValidationPanel() {
validationPanel = new ValidationPanel();
validationPanel.setInnerComponent(this);
ValidationGroup group = validationPanel.getValidationGroup();
group.add(titleTextField, new ColumnTitleValidator(table));
group.add(timestampText, new IntervalBoundValidator());
validationPanel.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
dialogControls.setOkButtonEnabled(!validationPanel.isProblem());
}
});
}
use of org.netbeans.validation.api.ui.ValidationPanel in project gephi by gephi.
the class ConvertColumnToDynamicUI method buildValidationPanel.
private void buildValidationPanel() {
validationPanel = new ValidationPanel();
validationPanel.setInnerComponent(this);
ValidationGroup group = validationPanel.getValidationGroup();
group.add(titleTextField, new ColumnTitleValidator(table));
group.add(intervalStartText, new IntervalBoundValidator());
group.add(intervalEndText, new IntervalBoundValidator(intervalStartText));
validationPanel.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
dialogControls.setOkButtonEnabled(!validationPanel.isProblem());
}
});
}
use of org.netbeans.validation.api.ui.ValidationPanel in project gephi by gephi.
the class EqualStringPanel method createValidationPanel.
public static ValidationPanel createValidationPanel(final EqualStringPanel innerPanel) {
final ValidationPanel validationPanel = new ValidationPanel();
validationPanel.setInnerComponent(innerPanel);
ValidationGroup group = validationPanel.getValidationGroup();
validationPanel.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
innerPanel.okButton.setEnabled(!validationPanel.isProblem());
}
});
//Node field
group.add(innerPanel.textField, new RegexValidator(innerPanel));
return validationPanel;
}
use of org.netbeans.validation.api.ui.ValidationPanel in project gephi by gephi.
the class CustomBoundsDialog method createValidationPanel.
public static ValidationPanel createValidationPanel(CustomBoundsDialog panel) {
ValidationPanel validationPanel = new ValidationPanel();
validationPanel.setInnerComponent(panel);
ValidationGroup group = validationPanel.getValidationGroup();
panel.createValidation(group, validationPanel);
return validationPanel;
}
use of org.netbeans.validation.api.ui.ValidationPanel in project gephi by gephi.
the class ScreenshotMaker method configure.
public void configure() {
ScreenshotSettingsPanel panel = new ScreenshotSettingsPanel();
panel.setup(this);
ValidationPanel validationPanel = ScreenshotSettingsPanel.createValidationPanel(panel);
if (validationPanel.showOkCancelDialog(NbBundle.getMessage(ScreenshotMaker.class, "ScreenshotMaker.configure.title"))) {
panel.unsetup(this);
}
// DialogDescriptor dd = new DialogDescriptor(validationPanel, NbBundle.getMessage(ScreenshotMaker.class, "ScreenshotMaker.configure.title"));
// Object result = DialogDisplayer.getDefault().notify(dd);
// if (result == NotifyDescriptor.OK_OPTION) {
// panel.unsetup(this);
// }
}
Aggregations