Go to the documentation of this file.
19package org.sleuthkit.autopsy.texttranslation;
21import java.beans.PropertyChangeListener;
22import java.beans.PropertyChangeSupport;
23import javax.swing.JComponent;
24import org.netbeans.spi.options.OptionsPanelController;
25import org.openide.util.HelpCtx;
26import org.openide.util.Lookup;
27import org.openide.util.NbBundle;
28import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
29import java.util.logging.Level;
30import org.sleuthkit.autopsy.coreutils.Logger;
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);
synchronized static Logger getLogger(String name)
JComponent getComponent(Lookup masterLookup)
void removePropertyChangeListener(PropertyChangeListener l)
TranslationOptionsPanel panel
final PropertyChangeSupport pcs
void addPropertyChangeListener(PropertyChangeListener l)
static final Logger logger
TranslationOptionsPanel getPanel()
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.