19 package org.sleuthkit.autopsy.corecomponents;
21 import java.awt.Cursor;
22 import java.awt.Window;
24 import java.net.MalformedURLException;
26 import java.text.MessageFormat;
27 import java.util.Locale;
28 import java.util.logging.Level;
29 import java.util.logging.Logger;
30 import javax.swing.Icon;
31 import javax.swing.ImageIcon;
32 import javax.swing.JPanel;
33 import javax.swing.SwingUtilities;
34 import javax.swing.event.HyperlinkEvent;
35 import javax.swing.event.HyperlinkListener;
36 import org.netbeans.core.actions.HTMLViewAction;
37 import org.openide.awt.HtmlBrowser;
38 import org.openide.modules.Places;
39 import org.openide.util.NbBundle;
51 private URL
url = null;
59 about =
new ImageIcon(
new URL(
"nbdocs:/org/netbeans/core/startup/splash.gif"));
60 }
catch (MalformedURLException ex) {
61 Logger.log(Level.INFO,
"failed to load about window image", ex);
64 logoLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
66 "LBL_Description",
new Object[]{getProductVersionValue(), getJavaValue(), getVMValue(),
67 getOperatingSystemValue(), getEncodingValue(), getSystemLocaleValue(), getUserDirValue(), getSleuthKitVersionValue(), Version.getNetbeansBuild(), Version.getBuildType().toString()}));
87 jButton2 =
new javax.swing.JButton();
89 setBackground(
new java.awt.Color(255, 255, 255));
91 logoLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
93 logoLabel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
94 logoLabel.addMouseListener(
new java.awt.event.MouseAdapter() {
95 public void mouseClicked(java.awt.event.MouseEvent evt) {
106 copyright.addMouseListener(
new java.awt.event.MouseAdapter() {
107 public void mouseClicked(java.awt.event.MouseEvent evt) {
118 verboseLoggingButton.setText(NbBundle.getMessage(
this.getClass(),
"AboutWindowPanel.actVerboseLogging.text"));
120 public void actionPerformed(java.awt.event.ActionEvent evt) {
125 jButton2.setBackground(
new java.awt.Color(255, 255, 255));
127 jButton2.addActionListener(
new java.awt.event.ActionListener() {
128 public void actionPerformed(java.awt.event.ActionEvent evt) {
133 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
134 this.setLayout(layout);
135 layout.setHorizontalGroup(
136 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
137 .addGroup(layout.createSequentialGroup()
139 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
140 .addComponent(
jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 486, Short.MAX_VALUE)
141 .addComponent(
jScrollPane3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 486, Short.MAX_VALUE)
142 .addComponent(
logoLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 486, Short.MAX_VALUE)
143 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
144 .addGap(0, 0, Short.MAX_VALUE)
145 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
147 .addComponent(
jButton2, javax.swing.GroupLayout.Alignment.TRAILING))))
150 layout.setVerticalGroup(
151 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
152 .addGroup(layout.createSequentialGroup()
155 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
156 .addComponent(
jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
157 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
158 .addComponent(
jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)
159 .addGap(18, 18, Short.MAX_VALUE)
179 }
catch (MalformedURLException ex) {
202 NbBundle.getMessage(
this.getClass(),
"ProductInformationPanel.verbLoggingEnabled.text"));
206 Window w = SwingUtilities.getWindowAncestor(
this);
213 org.openide.awt.StatusDisplayer.getDefault().setStatusText(
214 NbBundle.getBundle(HTMLViewAction.class).getString(
"CTL_OpeningBrowser"));
215 HtmlBrowser.URLDisplayer.getDefault().showURL(url);
224 return MessageFormat.format(
225 NbBundle.getBundle(
"org.netbeans.core.startup.Bundle").getString(
"currentVersion"),
226 new Object[]{System.getProperty(
"netbeans.buildnumber")});
230 return NbBundle.getMessage(
AboutWindowPanel.class,
"Format_OperatingSystem_Value",
231 System.getProperty(
"os.name",
233 "ProductInformationPanel.propertyUnknown.text")),
234 System.getProperty(
"os.version",
236 "ProductInformationPanel.propertyUnknown.text")),
237 System.getProperty(
"os.arch",
239 "ProductInformationPanel.propertyUnknown.text")));
243 return System.getProperty(
"java.version",
245 "ProductInformationPanel.propertyUnknown.text"));
250 "ProductInformationPanel.getVMValue.text",
251 System.getProperty(
"java.vm.name",
253 "ProductInformationPanel.propertyUnknown.text")),
254 System.getProperty(
"java.vm.version",
""));
259 return Locale.getDefault().toString() + ((branding = NbBundle.getBranding()) == null ?
"" : (
" (" + branding +
")"));
263 return Places.getUserDirectory().getAbsolutePath();
267 return System.getProperty(
"file.encoding",
268 NbBundle.getMessage(
AboutWindowPanel.class,
"ProductInformationPanel.propertyUnknown.text"));
277 if (HyperlinkEvent.EventType.ENTERED == event.getEventType()) {
278 url =
event.getURL();
279 }
else if (HyperlinkEvent.EventType.EXITED == event.getEventType()) {
288 verboseLogging =
true;
javax.swing.JTextPane copyright
static String getVMValue()
void disableVerboseLoggingButton()
static String getProductVersionValue()
static String getJavaValue()
static String getOperatingSystemValue()
void logoLabelMouseClicked(java.awt.event.MouseEvent evt)
javax.swing.JTextPane description
static String getEncodingValue()
boolean verboseLoggingIsSet()
javax.swing.JScrollPane jScrollPane2
void hyperlinkUpdate(HyperlinkEvent event)
javax.swing.JButton jButton2
void activateVerboseLogging(java.awt.event.ActionEvent evt)
javax.swing.JLabel logoLabel
void copyrightMouseClicked(java.awt.event.MouseEvent evt)
javax.swing.JButton verboseLoggingButton
void jButton2ActionPerformed(java.awt.event.ActionEvent evt)
void startVerboseLogging()
static String getSleuthKitVersionValue()
javax.swing.JScrollPane jScrollPane3
static String getVersion()
static void startVerboseLogging(String logPath)
void setCopyright(String text)
static String getSystemLocaleValue()
static Logger getLogger(String name)