Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* BioJava development code
*
* This code may be freely distributed and modified under the
* terms of the GNU Lesser General Public Licence. This should
* be distributed with the code. If you do not have a copy,
* see:
*
* http://www.gnu.org/copyleft/lesser.html
*
* Copyright for this code is held jointly by the individual
* authors. These should be listed in @author doc comments.
*
* For more information on the BioJava project and its aims,
* or to join the biojava-l mailing list, visit the home page
* at:
*
* http://www.biojava.org/
*
* Created on Mar 18, 2010
* Author: Andreas Prlic
*
*/
package org.biojava.nbio.structure.align.gui;
import org.biojava.nbio.structure.align.webstart.BrowserOpener;
import javax.swing.*;
import javax.swing.border.EtchedBorder;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Enumeration;
import java.util.Properties;
import java.util.StringTokenizer;
public class SystemInfo
{
Box vBox;
String msg;
/*
* This is a default list of system properties that we will use
* if the Security Manager doesn't let us extract the "real" list.
*/
public static final String defaultProperties =
""
+ "browser "
+ "file.separator "
+ "java.class.version "
+ "java.vendor "
+ "java.vendor.url "
+ "java.version "
+ "line.separator "
+ "os.arch "
+ "os.name "
+ "os.version "
+ "path.separator ";
public static final String hexPropertyNames =
" file.separator "
+ "line.separator "
+ "path.separator ";
public static final String urlPropertyNames =
" browser.vendor.url "
+ " java.class.path "
+ "java.home "
+ "user.dir "
+ "user.home "
+ "user.name ";
EtchedBorder border;
public SystemInfo()
{
border = new EtchedBorder();
msg = "";
try {
Properties props = System.getProperties();
/*
* Unfortunately, enumerating System.getProperties() returns
* them in an unsatisfactory order. To make the display
* esthetically pleasing, we'll extract the property names
* (i.e. the keys) into a vector, then sort the vector, then
* use the vector as an enumeration. props.size() is not
* trustworthy (bug in MRJ?)
*/
//border.setLabelText ("System Properties");
/*
* Count the actual size of the System property list.
*/
int size = 0;
Enumeration> enumo = props.propertyNames();
while (enumo.hasMoreElements()) {
++size;
enumo.nextElement();
}
String[] names = new String[size];
enumo = props.propertyNames();
for (int i = 0; enumo.hasMoreElements(); i++) {
names[i] = (String) enumo.nextElement();
}
if (size < 1) {
msg = "No System Properties";
}
else {
quickSort(names, 0, names.length - 1);
for (int i = 0; i < size; i++) {
addOneSystemProperty(names[i]);
}
}
}
catch (SecurityException e) {
// border.setLabelText ("Default Applet Properties");
StringTokenizer t = new StringTokenizer(defaultProperties, " ");
while (t.hasMoreElements()) {
addOneSystemProperty(t.nextToken());
}
}
catch (Exception e) {
append("Strange Exception getting system properties: " + e);
}
}
private void append(String txt){
msg += txt;
}
/**
* Stripped-down QuickSort.
* @param vector The vector of strings to sort
* @param startIndex The first element to sort
* @param endIndex The last element to sort
*
* example use:
*