Implemented feature to remove logo.

This commit is contained in:
U-BASIS\dgrove 2017-12-08 16:14:54 -05:00
parent 42817363aa
commit 757da3ae62
3 changed files with 168 additions and 83 deletions

View File

@ -2,9 +2,11 @@
<Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<NonVisualComponents> <NonVisualComponents>
<Component class="javax.swing.ButtonGroup" name="buttonGroup1"> <Component class="javax.swing.ButtonGroup" name="fileSelectionButtonGroup">
</Component> </Component>
<Component class="javax.swing.ButtonGroup" name="buttonGroup3"> <Component class="javax.swing.ButtonGroup" name="displayTimesButtonGroup">
</Component>
<Component class="javax.swing.ButtonGroup" name="logoSourceButtonGroup">
</Component> </Component>
</NonVisualComponents> </NonVisualComponents>
<AuxValues> <AuxValues>
@ -22,10 +24,7 @@
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Component id="jScrollPane1" alignment="0" max="32767" attributes="0"/>
<Component id="jScrollPane1" max="32767" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
</Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
@ -69,7 +68,7 @@
<Component id="runtimePanel" min="-2" max="-2" attributes="0"/> <Component id="runtimePanel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="logoPanel" min="-2" max="-2" attributes="0"/> <Component id="logoPanel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -92,15 +91,14 @@
<Group type="102" alignment="1" attributes="0"> <Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="agencyLogoImageLabel" alignment="0" min="-2" max="-2" attributes="0"/> <Component id="specifyLogoRB" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0"> <Component id="defaultLogoRB" alignment="0" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
<Component id="agencyLogoPathField" min="-2" pref="259" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="browseLogosButton" min="-2" max="-2" attributes="0"/>
</Group>
</Group> </Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="agencyLogoPathField" min="-2" pref="259" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="browseLogosButton" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="agencyLogoPreview" min="-2" max="-2" attributes="0"/> <Component id="agencyLogoPreview" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/> <EmptySpace max="32767" attributes="0"/>
</Group> </Group>
@ -109,42 +107,32 @@
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0"> <Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0"> <EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
<Component id="agencyLogoPreview" alignment="1" min="-2" max="-2" attributes="0"/> <Component id="defaultLogoRB" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0"> <EmptySpace max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="3" attributes="0">
<Component id="agencyLogoImageLabel" min="-2" max="-2" attributes="0"/> <Component id="specifyLogoRB" alignment="3" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <Component id="agencyLogoPathField" alignment="3" max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0"> <Component id="browseLogosButton" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="agencyLogoPathField" alignment="3" max="32767" attributes="0"/>
<Component id="browseLogosButton" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group> </Group>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/> <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<Component id="agencyLogoPreview" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents> <SubComponents>
<Component class="javax.swing.JLabel" name="agencyLogoImageLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.agencyLogoImageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="agencyLogoPathField"> <Component class="javax.swing.JTextField" name="agencyLogoPathField">
<Properties> <Properties>
<Property name="editable" type="boolean" value="false"/>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="ff" green="ff" red="ff" type="rgb"/> <Color blue="ff" green="ff" red="ff" type="rgb"/>
</Property> </Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.agencyLogoPathField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.agencyLogoPathField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="focusable" type="boolean" value="false"/>
<Property name="requestFocusEnabled" type="boolean" value="false"/>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JButton" name="browseLogosButton"> <Component class="javax.swing.JButton" name="browseLogosButton">
@ -179,6 +167,32 @@
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JRadioButton" name="defaultLogoRB">
<Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="logoSourceButtonGroup"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.defaultLogoRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="defaultLogoRBActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JRadioButton" name="specifyLogoRB">
<Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="logoSourceButtonGroup"/>
</Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.specifyLogoRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="specifyLogoRBActionPerformed"/>
</Events>
</Component>
</SubComponents> </SubComponents>
</Container> </Container>
<Container class="javax.swing.JPanel" name="viewPanel"> <Container class="javax.swing.JPanel" name="viewPanel">
@ -276,7 +290,7 @@
<Component class="javax.swing.JRadioButton" name="useBestViewerRB"> <Component class="javax.swing.JRadioButton" name="useBestViewerRB">
<Properties> <Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="buttonGroup1"/> <ComponentRef name="fileSelectionButtonGroup"/>
</Property> </Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.useBestViewerRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.useBestViewerRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
@ -292,7 +306,7 @@
<Component class="javax.swing.JRadioButton" name="keepCurrentViewerRB"> <Component class="javax.swing.JRadioButton" name="keepCurrentViewerRB">
<Properties> <Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="buttonGroup1"/> <ComponentRef name="fileSelectionButtonGroup"/>
</Property> </Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.keepCurrentViewerRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.keepCurrentViewerRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
@ -369,7 +383,7 @@
<Component class="javax.swing.JRadioButton" name="useLocalTimeRB"> <Component class="javax.swing.JRadioButton" name="useLocalTimeRB">
<Properties> <Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="buttonGroup3"/> <ComponentRef name="displayTimesButtonGroup"/>
</Property> </Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.useLocalTimeRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.useLocalTimeRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
@ -382,7 +396,7 @@
<Component class="javax.swing.JRadioButton" name="useGMTTimeRB"> <Component class="javax.swing.JRadioButton" name="useGMTTimeRB">
<Properties> <Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="buttonGroup3"/> <ComponentRef name="displayTimesButtonGroup"/>
</Property> </Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.useGMTTimeRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AutopsyOptionsPanel.useGMTTimeRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>

View File

@ -76,9 +76,12 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
private static final long ONE_BILLION = 1000000000L; //used to roughly convert system memory from bytes to gigabytes private static final long ONE_BILLION = 1000000000L; //used to roughly convert system memory from bytes to gigabytes
private static final long MEGA_IN_GIGA = 1024; //used to convert memory settings saved as megabytes to gigabytes private static final long MEGA_IN_GIGA = 1024; //used to convert memory settings saved as megabytes to gigabytes
private static final int MIN_MEMORY_IN_GB = 2; //the enforced minimum memory in gigabytes private static final int MIN_MEMORY_IN_GB = 2; //the enforced minimum memory in gigabytes
private static final Logger logger = Logger.getLogger(AutopsyOptionsPanel.class.getName()); private static final Logger LOGGER = Logger.getLogger(AutopsyOptionsPanel.class.getName());
private String initialMemValue = Long.toString(Runtime.getRuntime().maxMemory() / ONE_BILLION); private String initialMemValue = Long.toString(Runtime.getRuntime().maxMemory() / ONE_BILLION);
/**
* Instantiate the Autopsy options panel.
*/
AutopsyOptionsPanel() { AutopsyOptionsPanel() {
initComponents(); initComponents();
fc = new JFileChooser(); fc = new JFileChooser();
@ -86,7 +89,7 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
fc.setMultiSelectionEnabled(false); fc.setMultiSelectionEnabled(false);
fc.setAcceptAllFileFilterUsed(false); fc.setAcceptAllFileFilterUsed(false);
fc.setFileFilter(new GeneralFilter(GeneralFilter.GRAPHIC_IMAGE_EXTS, GeneralFilter.GRAPHIC_IMG_DECR)); fc.setFileFilter(new GeneralFilter(GeneralFilter.GRAPHIC_IMAGE_EXTS, GeneralFilter.GRAPHIC_IMG_DECR));
if (!PlatformUtil.is64BitJVM() || Version.getBuildType() == Version.Type.DEVELOPMENT) { if (!PlatformUtil.is64BitJVM() || Version.getBuildType() == Version.Type.DEVELOPMENT) {
//32 bit JVM has a max heap size of 1.4 gb to 4 gb depending on OS //32 bit JVM has a max heap size of 1.4 gb to 4 gb depending on OS
//So disabling the setting of heap size when the JVM is not 64 bit //So disabling the setting of heap size when the JVM is not 64 bit
//Is the safest course of action //Is the safest course of action
@ -247,7 +250,7 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
try { try {
lines = Files.readAllLines(filePath, charset); lines = Files.readAllLines(filePath, charset);
} catch (IOException e) { } catch (IOException e) {
logger.log(Level.SEVERE, "Error reading config file contents. {}", configFile.getAbsolutePath()); LOGGER.log(Level.SEVERE, "Error reading config file contents. {}", configFile.getAbsolutePath());
} }
} }
return lines; return lines;
@ -273,6 +276,9 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
return new String[]{}; return new String[]{};
} }
/**
* Load the saved user preferences.
*/
void load() { void load() {
boolean keepPreferredViewer = UserPreferences.keepPreferredContentViewer(); boolean keepPreferredViewer = UserPreferences.keepPreferredContentViewer();
keepCurrentViewerRB.setSelected(keepPreferredViewer); keepCurrentViewerRB.setSelected(keepPreferredViewer);
@ -286,15 +292,20 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
useGMTTimeRB.setSelected(!useLocalTime); useGMTTimeRB.setSelected(!useLocalTime);
String path = ModuleSettings.getConfigSetting(ReportBranding.MODULE_NAME, ReportBranding.AGENCY_LOGO_PATH_PROP); String path = ModuleSettings.getConfigSetting(ReportBranding.MODULE_NAME, ReportBranding.AGENCY_LOGO_PATH_PROP);
try { try {
boolean useDefault = (path == null || path.isEmpty());
defaultLogoRB.setSelected(useDefault);
specifyLogoRB.setSelected(!useDefault);
agencyLogoPathField.setEnabled(!useDefault);
browseLogosButton.setEnabled(!useDefault);
updateAgencyLogo(path); updateAgencyLogo(path);
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Error loading image from previously saved agency logo path", ex); LOGGER.log(Level.WARNING, "Error loading image from previously saved agency logo path", ex);
} }
if (memField.isEnabled()) { if (memField.isEnabled()) {
try { try {
initialMemValue = Long.toString(getCurrentJvmMaxMemoryInGB()); initialMemValue = Long.toString(getCurrentJvmMaxMemoryInGB());
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.SEVERE, "Can't read current Jvm max memory setting from file", ex); LOGGER.log(Level.SEVERE, "Can't read current Jvm max memory setting from file", ex);
memField.setEnabled(false); memField.setEnabled(false);
} }
memField.setText(initialMemValue); memField.setText(initialMemValue);
@ -302,6 +313,13 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
isMemFieldValid(); //ensure the error message is up to date isMemFieldValid(); //ensure the error message is up to date
} }
/**
* Update the agency logo with the image specified by the path.
*
* @param path The path to the image.
*
* @throws IOException Thrown when there is a problem reading the file.
*/
private void updateAgencyLogo(String path) throws IOException { private void updateAgencyLogo(String path) throws IOException {
agencyLogoPathField.setText(path); agencyLogoPathField.setText(path);
ImageIcon agencyLogoIcon = new ImageIcon(); ImageIcon agencyLogoIcon = new ImageIcon();
@ -321,6 +339,9 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
agencyLogoPreview.repaint(); agencyLogoPreview.repaint();
} }
/**
* Store the current user preferences.
*/
void store() { void store() {
UserPreferences.setKeepPreferredContentViewer(keepCurrentViewerRB.isSelected()); UserPreferences.setKeepPreferredContentViewer(keepCurrentViewerRB.isSelected());
UserPreferences.setHideKnownFilesInDataSourcesTree(dataSourcesHideKnownCB.isSelected()); UserPreferences.setHideKnownFilesInDataSourcesTree(dataSourcesHideKnownCB.isSelected());
@ -333,16 +354,23 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
if (file.exists()) { if (file.exists()) {
ModuleSettings.setConfigSetting(ReportBranding.MODULE_NAME, ReportBranding.AGENCY_LOGO_PATH_PROP, agencyLogoPathField.getText()); ModuleSettings.setConfigSetting(ReportBranding.MODULE_NAME, ReportBranding.AGENCY_LOGO_PATH_PROP, agencyLogoPathField.getText());
} }
} else {
ModuleSettings.setConfigSetting(ReportBranding.MODULE_NAME, ReportBranding.AGENCY_LOGO_PATH_PROP, "");
} }
if (memField.isEnabled()) { //if the field could of been changed we need to try and save it if (memField.isEnabled()) { //if the field could of been changed we need to try and save it
try { try {
writeEtcConfFile(); writeEtcConfFile();
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "Unable to save config file to " + PlatformUtil.getUserDirectory() + "\\" + ETC_FOLDER_NAME, ex); LOGGER.log(Level.WARNING, "Unable to save config file to " + PlatformUtil.getUserDirectory() + "\\" + ETC_FOLDER_NAME, ex);
} }
} }
} }
/**
* Checks to see if the memory field value is valid.
*
* @return True if valid; false otherwise.
*/
boolean valid() { boolean valid() {
return isMemFieldValid(); return isMemFieldValid();
} }
@ -355,15 +383,17 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() { private void initComponents() {
buttonGroup1 = new javax.swing.ButtonGroup(); fileSelectionButtonGroup = new javax.swing.ButtonGroup();
buttonGroup3 = new javax.swing.ButtonGroup(); displayTimesButtonGroup = new javax.swing.ButtonGroup();
logoSourceButtonGroup = new javax.swing.ButtonGroup();
jScrollPane1 = new javax.swing.JScrollPane(); jScrollPane1 = new javax.swing.JScrollPane();
jPanel1 = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel();
logoPanel = new javax.swing.JPanel(); logoPanel = new javax.swing.JPanel();
agencyLogoImageLabel = new javax.swing.JLabel();
agencyLogoPathField = new javax.swing.JTextField(); agencyLogoPathField = new javax.swing.JTextField();
browseLogosButton = new javax.swing.JButton(); browseLogosButton = new javax.swing.JButton();
agencyLogoPreview = new javax.swing.JLabel(); agencyLogoPreview = new javax.swing.JLabel();
defaultLogoRB = new javax.swing.JRadioButton();
specifyLogoRB = new javax.swing.JRadioButton();
viewPanel = new javax.swing.JPanel(); viewPanel = new javax.swing.JPanel();
jLabelSelectFile = new javax.swing.JLabel(); jLabelSelectFile = new javax.swing.JLabel();
useBestViewerRB = new javax.swing.JRadioButton(); useBestViewerRB = new javax.swing.JRadioButton();
@ -391,13 +421,8 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
logoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.logoPanel.border.title"))); // NOI18N logoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.logoPanel.border.title"))); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(agencyLogoImageLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.agencyLogoImageLabel.text")); // NOI18N
agencyLogoPathField.setEditable(false);
agencyLogoPathField.setBackground(new java.awt.Color(255, 255, 255)); agencyLogoPathField.setBackground(new java.awt.Color(255, 255, 255));
agencyLogoPathField.setText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.agencyLogoPathField.text")); // NOI18N agencyLogoPathField.setText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.agencyLogoPathField.text")); // NOI18N
agencyLogoPathField.setFocusable(false);
agencyLogoPathField.setRequestFocusEnabled(false);
org.openide.awt.Mnemonics.setLocalizedText(browseLogosButton, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.browseLogosButton.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(browseLogosButton, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.browseLogosButton.text")); // NOI18N
browseLogosButton.addActionListener(new java.awt.event.ActionListener() { browseLogosButton.addActionListener(new java.awt.event.ActionListener() {
@ -413,6 +438,22 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
agencyLogoPreview.setMinimumSize(new java.awt.Dimension(64, 64)); agencyLogoPreview.setMinimumSize(new java.awt.Dimension(64, 64));
agencyLogoPreview.setPreferredSize(new java.awt.Dimension(64, 64)); agencyLogoPreview.setPreferredSize(new java.awt.Dimension(64, 64));
logoSourceButtonGroup.add(defaultLogoRB);
org.openide.awt.Mnemonics.setLocalizedText(defaultLogoRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.defaultLogoRB.text")); // NOI18N
defaultLogoRB.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
defaultLogoRBActionPerformed(evt);
}
});
logoSourceButtonGroup.add(specifyLogoRB);
org.openide.awt.Mnemonics.setLocalizedText(specifyLogoRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.specifyLogoRB.text")); // NOI18N
specifyLogoRB.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
specifyLogoRBActionPerformed(evt);
}
});
javax.swing.GroupLayout logoPanelLayout = new javax.swing.GroupLayout(logoPanel); javax.swing.GroupLayout logoPanelLayout = new javax.swing.GroupLayout(logoPanel);
logoPanel.setLayout(logoPanelLayout); logoPanel.setLayout(logoPanelLayout);
logoPanelLayout.setHorizontalGroup( logoPanelLayout.setHorizontalGroup(
@ -420,12 +461,12 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, logoPanelLayout.createSequentialGroup() .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, logoPanelLayout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(agencyLogoImageLabel) .addComponent(specifyLogoRB)
.addGroup(logoPanelLayout.createSequentialGroup() .addComponent(defaultLogoRB))
.addGap(10, 10, 10) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(agencyLogoPathField, javax.swing.GroupLayout.PREFERRED_SIZE, 259, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(agencyLogoPathField, javax.swing.GroupLayout.PREFERRED_SIZE, 259, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(browseLogosButton))) .addComponent(browseLogosButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(agencyLogoPreview, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(agencyLogoPreview, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
@ -433,23 +474,24 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
logoPanelLayout.setVerticalGroup( logoPanelLayout.setVerticalGroup(
logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(logoPanelLayout.createSequentialGroup() .addGroup(logoPanelLayout.createSequentialGroup()
.addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(6, 6, 6)
.addComponent(agencyLogoPreview, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(defaultLogoRB)
.addGroup(logoPanelLayout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addContainerGap() .addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(agencyLogoImageLabel) .addComponent(specifyLogoRB)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(agencyLogoPathField)
.addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(browseLogosButton))
.addComponent(agencyLogoPathField) .addGap(0, 0, Short.MAX_VALUE))
.addComponent(browseLogosButton)))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, logoPanelLayout.createSequentialGroup()
.addGap(0, 0, 0)) .addComponent(agencyLogoPreview, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
); );
viewPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.viewPanel.border.title"))); // NOI18N viewPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.viewPanel.border.title"))); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(jLabelSelectFile, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.jLabelSelectFile.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(jLabelSelectFile, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.jLabelSelectFile.text")); // NOI18N
buttonGroup1.add(useBestViewerRB); fileSelectionButtonGroup.add(useBestViewerRB);
org.openide.awt.Mnemonics.setLocalizedText(useBestViewerRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.useBestViewerRB.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(useBestViewerRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.useBestViewerRB.text")); // NOI18N
useBestViewerRB.setToolTipText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.useBestViewerRB.toolTipText")); // NOI18N useBestViewerRB.setToolTipText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.useBestViewerRB.toolTipText")); // NOI18N
useBestViewerRB.addActionListener(new java.awt.event.ActionListener() { useBestViewerRB.addActionListener(new java.awt.event.ActionListener() {
@ -458,7 +500,7 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
} }
}); });
buttonGroup1.add(keepCurrentViewerRB); fileSelectionButtonGroup.add(keepCurrentViewerRB);
org.openide.awt.Mnemonics.setLocalizedText(keepCurrentViewerRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.keepCurrentViewerRB.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(keepCurrentViewerRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.keepCurrentViewerRB.text")); // NOI18N
keepCurrentViewerRB.setToolTipText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.keepCurrentViewerRB.toolTipText")); // NOI18N keepCurrentViewerRB.setToolTipText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.keepCurrentViewerRB.toolTipText")); // NOI18N
keepCurrentViewerRB.addActionListener(new java.awt.event.ActionListener() { keepCurrentViewerRB.addActionListener(new java.awt.event.ActionListener() {
@ -501,7 +543,7 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
org.openide.awt.Mnemonics.setLocalizedText(jLabelTimeDisplay, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.jLabelTimeDisplay.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(jLabelTimeDisplay, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.jLabelTimeDisplay.text")); // NOI18N
buttonGroup3.add(useLocalTimeRB); displayTimesButtonGroup.add(useLocalTimeRB);
org.openide.awt.Mnemonics.setLocalizedText(useLocalTimeRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.useLocalTimeRB.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(useLocalTimeRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.useLocalTimeRB.text")); // NOI18N
useLocalTimeRB.addActionListener(new java.awt.event.ActionListener() { useLocalTimeRB.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
@ -509,7 +551,7 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
} }
}); });
buttonGroup3.add(useGMTTimeRB); displayTimesButtonGroup.add(useGMTTimeRB);
org.openide.awt.Mnemonics.setLocalizedText(useGMTTimeRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.useGMTTimeRB.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(useGMTTimeRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.useGMTTimeRB.text")); // NOI18N
useGMTTimeRB.addActionListener(new java.awt.event.ActionListener() { useGMTTimeRB.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
@ -665,7 +707,7 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
.addComponent(runtimePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(runtimePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(logoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(logoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0)) .addContainerGap())
); );
jScrollPane1.setViewportView(jPanel1); jScrollPane1.setViewportView(jPanel1);
@ -674,9 +716,7 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
this.setLayout(layout); this.setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addComponent(jScrollPane1)
.addComponent(jScrollPane1)
.addGap(0, 0, 0))
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@ -733,7 +773,7 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
try { try {
updateAgencyLogo(oldLogoPath); //restore previous setting if new one is invalid updateAgencyLogo(oldLogoPath); //restore previous setting if new one is invalid
} catch (IOException ex1) { } catch (IOException ex1) {
logger.log(Level.WARNING, "Error loading image from previously saved agency logo path", ex1); LOGGER.log(Level.WARNING, "Error loading image from previously saved agency logo path", ex1);
} }
} }
} }
@ -748,6 +788,34 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
}//GEN-LAST:event_memFieldKeyReleased }//GEN-LAST:event_memFieldKeyReleased
private void defaultLogoRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_defaultLogoRBActionPerformed
agencyLogoPathField.setEnabled(false);
browseLogosButton.setEnabled(false);
try {
updateAgencyLogo("");
} catch (IOException ex) {
// This should never happen since we're not reading from a file.
LOGGER.log(Level.SEVERE, "Unexpected error occurred while updating the agency logo.", ex);
}
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
}//GEN-LAST:event_defaultLogoRBActionPerformed
private void specifyLogoRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_specifyLogoRBActionPerformed
agencyLogoPathField.setEnabled(true);
browseLogosButton.setEnabled(true);
try {
if (agencyLogoPathField.getText().isEmpty()) {
String path = ModuleSettings.getConfigSetting(ReportBranding.MODULE_NAME, ReportBranding.AGENCY_LOGO_PATH_PROP);
if (path != null && !path.isEmpty()) {
updateAgencyLogo(path);
}
}
} catch (IOException ex) {
LOGGER.log(Level.WARNING, "Error loading image from previously saved agency logo path.", ex);
}
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
}//GEN-LAST:event_specifyLogoRBActionPerformed
/** /**
* Checks that if the mem field is enabled it has a valid value. * Checks that if the mem field is enabled it has a valid value.
* *
@ -786,14 +854,14 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
return true; return true;
} }
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel agencyLogoImageLabel;
private javax.swing.JTextField agencyLogoPathField; private javax.swing.JTextField agencyLogoPathField;
private javax.swing.JLabel agencyLogoPreview; private javax.swing.JLabel agencyLogoPreview;
private javax.swing.JButton browseLogosButton; private javax.swing.JButton browseLogosButton;
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.ButtonGroup buttonGroup3;
private javax.swing.JCheckBox dataSourcesHideKnownCB; private javax.swing.JCheckBox dataSourcesHideKnownCB;
private javax.swing.JCheckBox dataSourcesHideSlackCB; private javax.swing.JCheckBox dataSourcesHideSlackCB;
private javax.swing.JRadioButton defaultLogoRB;
private javax.swing.ButtonGroup displayTimesButtonGroup;
private javax.swing.ButtonGroup fileSelectionButtonGroup;
private javax.swing.JLabel invalidReasonLabel; private javax.swing.JLabel invalidReasonLabel;
private javax.swing.JLabel jLabelHideKnownFiles; private javax.swing.JLabel jLabelHideKnownFiles;
private javax.swing.JLabel jLabelHideSlackFiles; private javax.swing.JLabel jLabelHideSlackFiles;
@ -803,12 +871,14 @@ final class AutopsyOptionsPanel extends javax.swing.JPanel {
private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JRadioButton keepCurrentViewerRB; private javax.swing.JRadioButton keepCurrentViewerRB;
private javax.swing.JPanel logoPanel; private javax.swing.JPanel logoPanel;
private javax.swing.ButtonGroup logoSourceButtonGroup;
private javax.swing.JLabel maxMemoryLabel; private javax.swing.JLabel maxMemoryLabel;
private javax.swing.JLabel maxMemoryUnitsLabel; private javax.swing.JLabel maxMemoryUnitsLabel;
private javax.swing.JLabel maxMemoryUnitsLabel1; private javax.swing.JLabel maxMemoryUnitsLabel1;
private javax.swing.JTextField memField; private javax.swing.JTextField memField;
private javax.swing.JLabel restartNecessaryWarning; private javax.swing.JLabel restartNecessaryWarning;
private javax.swing.JPanel runtimePanel; private javax.swing.JPanel runtimePanel;
private javax.swing.JRadioButton specifyLogoRB;
private javax.swing.JLabel systemMemoryTotal; private javax.swing.JLabel systemMemoryTotal;
private javax.swing.JLabel totalMemoryLabel; private javax.swing.JLabel totalMemoryLabel;
private javax.swing.JRadioButton useBestViewerRB; private javax.swing.JRadioButton useBestViewerRB;

View File

@ -192,7 +192,6 @@ AutopsyOptionsPanel.jLabelHideSlackFiles.text=Hide slack files in the:
AutopsyOptionsPanel.dataSourcesHideSlackCB.text=Data Sources area (the directory hierarchy) AutopsyOptionsPanel.dataSourcesHideSlackCB.text=Data Sources area (the directory hierarchy)
AutopsyOptionsPanel.viewsHideSlackCB.text=Views area AutopsyOptionsPanel.viewsHideSlackCB.text=Views area
AutopsyOptionsPanel.agencyLogoImageLabel.toolTipText= AutopsyOptionsPanel.agencyLogoImageLabel.toolTipText=
AutopsyOptionsPanel.agencyLogoImageLabel.text=Image to use as the agency logo for HTML reports:
AutopsyOptionsPanel.browseLogosButton.text=Browse AutopsyOptionsPanel.browseLogosButton.text=Browse
AutopsyOptionsPanel.agencyLogoPathField.text= AutopsyOptionsPanel.agencyLogoPathField.text=
SortChooserDialog.label=remove SortChooserDialog.label=remove
@ -201,3 +200,5 @@ DataResultViewerThumbnail.sortButton.text=Sort
CriterionChooser.ascendingRadio.text=\u25b2 Ascending\n CriterionChooser.ascendingRadio.text=\u25b2 Ascending\n
CriterionChooser.removeButton.text=Remove CriterionChooser.removeButton.text=Remove
CriterionChooser.descendingRadio.text=\u25bc Descending CriterionChooser.descendingRadio.text=\u25bc Descending
AutopsyOptionsPanel.defaultLogoRB.text=Use default
AutopsyOptionsPanel.specifyLogoRB.text=Specify a logo