Search in sources :

Example 1 with KeyStrokeValidatingDirectoryFieldEditor

use of eu.esdihumboldt.hale.ui.util.io.KeyStrokeValidatingDirectoryFieldEditor in project hale by halestudio.

the class ArchiveProjectImportSelectLocationPage method createContent.

@Override
protected void createContent(Composite page) {
    directoryField = new KeyStrokeValidatingDirectoryFieldEditor("Import location", "Select directory", page);
    directoryField.setEmptyStringAllowed(false);
    directoryField.setPropertyChangeListener(new IPropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent event) {
            if (event.getProperty().equals(FieldEditor.IS_VALID)) {
                updateState();
            } else if (event.getProperty().equals(FieldEditor.VALUE)) {
                updateState();
            }
        }
    });
}
Also used : IPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) PropertyChangeEvent(org.eclipse.jface.util.PropertyChangeEvent) KeyStrokeValidatingDirectoryFieldEditor(eu.esdihumboldt.hale.ui.util.io.KeyStrokeValidatingDirectoryFieldEditor)

Aggregations

KeyStrokeValidatingDirectoryFieldEditor (eu.esdihumboldt.hale.ui.util.io.KeyStrokeValidatingDirectoryFieldEditor)1 IPropertyChangeListener (org.eclipse.jface.util.IPropertyChangeListener)1 PropertyChangeEvent (org.eclipse.jface.util.PropertyChangeEvent)1