19 package org.sleuthkit.autopsy.corecomponents;
21 import java.beans.PropertyChangeEvent;
22 import java.beans.PropertyChangeListener;
23 import java.beans.PropertyChangeSupport;
24 import javax.swing.JComponent;
25 import org.netbeans.spi.options.OptionsPanelController;
26 import org.openide.util.HelpCtx;
27 import org.openide.util.Lookup;
29 import java.util.logging.Level;
30 import org.openide.util.NbBundle.Messages;
36 @OptionsPanelController.TopLevelRegistration(categoryName =
"#OptionsCategory_Name_View",
37 iconBase =
"org/sleuthkit/autopsy/images/view-preferences-32.png",
39 keywords =
"#OptionsCategory_Keywords_View",
40 keywordsCategory =
"View")
44 private final PropertyChangeSupport
pcs =
new PropertyChangeSupport(
this);
86 if (pcs.getPropertyChangeListeners().length == 0) {
87 pcs.addPropertyChangeListener(l);
110 panel.addPropertyChangeListener((PropertyChangeEvent evt) -> {
111 if (evt.getPropertyName().equals(OptionsPanelController.PROP_CHANGED)) {
122 @Messages({
"ViewOptionsController.moduleErr=Error processing value changes.",
123 "ViewOptionsController.moduleErr.msg=Value change processing failed."})
129 pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED,
false,
true);
130 }
catch (Exception ex) {
131 logger.log(Level.SEVERE,
"Error processing property change", ex);
132 MessageNotifyUtil.Notify.show(
133 Bundle.ViewOptionsController_moduleErr(),
134 Bundle.ViewOptionsController_moduleErr_msg(),
135 MessageNotifyUtil.MessageType.ERROR);
140 pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
141 }
catch (Exception e) {
142 logger.log(Level.SEVERE,
"Error processing property change validation.", e);
143 MessageNotifyUtil.Notify.show(
144 Bundle.ViewOptionsController_moduleErr(),
145 Bundle.ViewOptionsController_moduleErr_msg(),
146 MessageNotifyUtil.MessageType.ERROR);
ViewPreferencesPanel panel
JComponent getComponent(Lookup masterLookup)
final PropertyChangeSupport pcs
void addPropertyChangeListener(PropertyChangeListener l)
ViewPreferencesPanel getPanel()
void removePropertyChangeListener(PropertyChangeListener l)
synchronized static Logger getLogger(String name)
static final Logger logger