Eliminate use of jcalendar. Replaced DateEditor with non-editable

display for Options use.
This commit is contained in:
ghidra1 2019-06-13 15:36:26 -04:00
parent 3b999fd86e
commit 8377f8394b
7 changed files with 11 additions and 718 deletions

View file

@ -27,7 +27,7 @@ public class EditorState implements PropertyChangeListener {
private Object originalValue;
private Object currentValue;
private PropertyEditor editor;
private Set<PropertyChangeListener> listeners = new HashSet<PropertyChangeListener>();
private Set<PropertyChangeListener> listeners = new HashSet<>();
private Options options;
private String name;
@ -37,10 +37,12 @@ public class EditorState implements PropertyChangeListener {
this.currentValue = options.getObject(name, null);
this.originalValue = currentValue;
this.editor = options.getPropertyEditor(name);
editor.setValue(currentValue);
if (editor != null) {
editor.setValue(currentValue);
editor.removePropertyChangeListener(this); // don't repeatedly add editors
editor.addPropertyChangeListener(this);
editor.removePropertyChangeListener(this); // don't repeatedly add editors
editor.addPropertyChangeListener(this);
}
}
void addListener(PropertyChangeListener listener) {
@ -143,9 +145,8 @@ public class EditorState implements PropertyChangeListener {
}
editor.removePropertyChangeListener(this);
editor =
new ErrorPropertyEditor("Ghidra does not know how to use PropertyEditor: " +
editor.getClass().getName(), null);
editor = new ErrorPropertyEditor(
"Ghidra does not know how to use PropertyEditor: " + editor.getClass().getName(), null);
return editor.getCustomEditor();
}