mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
Eliminate use of jcalendar. Replaced DateEditor with non-editable
display for Options use.
This commit is contained in:
parent
3b999fd86e
commit
8377f8394b
7 changed files with 11 additions and 718 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue