Search in sources :

Example 1 with IntervalBoundValidator

use of org.gephi.ui.utils.IntervalBoundValidator 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());
        }
    });
}
Also used : ColumnTitleValidator(org.gephi.ui.utils.ColumnTitleValidator) ChangeEvent(javax.swing.event.ChangeEvent) ValidationGroup(org.netbeans.validation.api.ui.ValidationGroup) IntervalBoundValidator(org.gephi.ui.utils.IntervalBoundValidator) ChangeListener(javax.swing.event.ChangeListener) ValidationPanel(org.netbeans.validation.api.ui.ValidationPanel)

Example 2 with IntervalBoundValidator

use of org.gephi.ui.utils.IntervalBoundValidator 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());
        }
    });
}
Also used : ColumnTitleValidator(org.gephi.ui.utils.ColumnTitleValidator) ChangeEvent(javax.swing.event.ChangeEvent) ValidationGroup(org.netbeans.validation.api.ui.ValidationGroup) IntervalBoundValidator(org.gephi.ui.utils.IntervalBoundValidator) ChangeListener(javax.swing.event.ChangeListener) ValidationPanel(org.netbeans.validation.api.ui.ValidationPanel)

Aggregations

ChangeEvent (javax.swing.event.ChangeEvent)2 ChangeListener (javax.swing.event.ChangeListener)2 ColumnTitleValidator (org.gephi.ui.utils.ColumnTitleValidator)2 IntervalBoundValidator (org.gephi.ui.utils.IntervalBoundValidator)2 ValidationGroup (org.netbeans.validation.api.ui.ValidationGroup)2 ValidationPanel (org.netbeans.validation.api.ui.ValidationPanel)2