19 package org.sleuthkit.autopsy.centralrepository.optionspanel;
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_Central_Repository_Options",
37 iconBase =
"org/sleuthkit/autopsy/centralrepository/images/options-icon.png",
39 keywords =
"#OptionsCategory_Keywords_Central_Repository_Options",
40 keywordsCategory =
"CentralRepository")
44 private final PropertyChangeSupport
pcs =
new PropertyChangeSupport(
this);
86 if (pcs.getPropertyChangeListeners().length == 0) {
87 pcs.addPropertyChangeListener(l);
105 panel.addPropertyChangeListener((PropertyChangeEvent evt) -> {
106 if (evt.getPropertyName().equals(OptionsPanelController.PROP_CHANGED)) {
114 @Messages({
"EamOptionsController.moduleErr=Error processing value changes.",
115 "EamOptionsController.moduleErr.msg=Value change processing failed."})
121 pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED,
false,
true);
122 }
catch (Exception ex) {
123 LOGGER.log(Level.SEVERE,
"Error processing property change", ex);
124 MessageNotifyUtil.Notify.show(
125 Bundle.EamOptionsController_moduleErr(),
126 Bundle.EamOptionsController_moduleErr_msg(),
127 MessageNotifyUtil.MessageType.ERROR);
132 pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
133 }
catch (Exception e) {
134 LOGGER.log(Level.SEVERE,
"Error processing property change validation.", e);
135 MessageNotifyUtil.Notify.show(
136 Bundle.EamOptionsController_moduleErr(),
137 Bundle.EamOptionsController_moduleErr_msg(),
138 MessageNotifyUtil.MessageType.ERROR);
final PropertyChangeSupport pcs
static final Logger LOGGER
JComponent getComponent(Lookup masterLookup)
GlobalSettingsPanel getPanel()
synchronized static Logger getLogger(String name)
GlobalSettingsPanel panel
void removePropertyChangeListener(PropertyChangeListener l)
void addPropertyChangeListener(PropertyChangeListener l)