19 package org.sleuthkit.autopsy.texttranslation;
21 import java.beans.PropertyChangeListener;
22 import java.beans.PropertyChangeSupport;
23 import javax.swing.JComponent;
24 import org.netbeans.spi.options.OptionsPanelController;
25 import org.openide.util.HelpCtx;
26 import org.openide.util.Lookup;
27 import org.openide.util.NbBundle;
29 import java.util.logging.Level;
35 @OptionsPanelController.TopLevelRegistration(categoryName =
"#OptionsCategory_Name_Machine_Translation",
36 iconBase =
"org/sleuthkit/autopsy/images/translate32.png",
38 keywords =
"#OptionsCategory_Keywords_Machine_Translation_Settings",
39 keywordsCategory =
"Machine Translation")
43 private final PropertyChangeSupport
pcs =
new PropertyChangeSupport(
this);
45 private TranslationOptionsPanel
panel;
85 if (pcs.getPropertyChangeListeners().length == 0) {
86 pcs.addPropertyChangeListener(l);
108 panel =
new TranslationOptionsPanel(
this);
121 pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED,
false,
true);
122 }
catch (Exception e) {
123 logger.log(Level.SEVERE,
"TranslationOptionsPanelController listener threw exception", e);
124 MessageNotifyUtil.Notify.show(
125 NbBundle.getMessage(
this.getClass(),
"TranslationOptionsPanelController.moduleErr"),
126 NbBundle.getMessage(
this.getClass(),
"TranslationOptionsPanelController.moduleErr.msg"),
127 MessageNotifyUtil.MessageType.ERROR);
132 pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
133 }
catch (Exception e) {
134 logger.log(Level.SEVERE,
"TranslationOptionsPanelController listener threw exception", e);
135 MessageNotifyUtil.Notify.show(
136 NbBundle.getMessage(
this.getClass(),
"TranslationOptionsPanelController.moduleErr"),
137 NbBundle.getMessage(
this.getClass(),
"TranslationOptionsPanelController.moduleErr.msg"),
138 MessageNotifyUtil.MessageType.ERROR);
void removePropertyChangeListener(PropertyChangeListener l)
TranslationOptionsPanel getPanel()
void addPropertyChangeListener(PropertyChangeListener l)
synchronized static Logger getLogger(String name)
JComponent getComponent(Lookup masterLookup)
TranslationOptionsPanel panel
final PropertyChangeSupport pcs
static final Logger logger