Another minor cleanup before tagging the release state.
This commit is contained in:
parent
a09166f20e
commit
defdbbbcdb
@ -35,6 +35,7 @@
|
||||
<property name="javadoc.directory" value="doc/api" />
|
||||
<property name="library.directory" value="lib" />
|
||||
<property name="debug.flag" value="true" />
|
||||
<property name="jar.name" value="EvA2Base.jar" />
|
||||
<property name="JE2Probs.directory" value="../JE2Probs" />
|
||||
<property name="JE2ESModel.directory" value="../JE2ESModel" />
|
||||
<property name="JE2Research.directory" value="../JE2Research" />
|
||||
@ -292,14 +293,20 @@
|
||||
<target name="binaryDist" depends="compile" description="Compiles the project and puts the whole stuff into a jar-file..">
|
||||
<property name="bin.dist.dir" value="${binary.distribution.directory}/eva-${DSTAMP}" />
|
||||
<mkdir dir="${bin.dist.dir}" />
|
||||
<mkdir dir="${bin.dist.dir}/${library.directory}" />
|
||||
<delete>
|
||||
<fileset dir="${bin.dist.dir}/${library.directory}" includes="*EvA2Base*jar" />
|
||||
<fileset dir="${bin.dist.dir}/" includes="${jar.name}" />
|
||||
</delete>
|
||||
|
||||
<jar jarfile="${bin.dist.dir}/${library.directory}/EvA2Base.jar" basedir="${build.directory}" >
|
||||
<jar jarfile="${bin.dist.dir}/${jar.name}" basedir="${build.directory}" >
|
||||
<manifest> <attribute name="Main-Class" value="eva2.client.EvAClient"/> </manifest>
|
||||
</jar>
|
||||
<copy todir="${distribution.directory}">
|
||||
<fileset dir="${bin.dist.dir}">
|
||||
<include name="${jar.name}" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!--
|
||||
<copy todir="${bin.dist.dir}/${library.directory}">
|
||||
<fileset dir="${library.directory}">
|
||||
<include name="**/**" />
|
||||
@ -307,7 +314,6 @@
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!--
|
||||
<copy todir="${bin.dist.dir}/ant">
|
||||
<fileset dir="ant">
|
||||
<include name="**/**" />
|
||||
@ -426,13 +432,13 @@
|
||||
</copy>-->
|
||||
|
||||
<tar tarfile="${distribution.directory}/eva2-src-${DSTAMP}.tar"
|
||||
basedir="${source.distribution.directory}" includes="**" excludes="*.tar*, *.zip"/>
|
||||
basedir="${src.dist.dir}" includes="**" excludes="*.tar*, *.zip"/>
|
||||
<gzip zipfile="${distribution.directory}/eva2-src-${DSTAMP}.tar.gz"
|
||||
src="${distribution.directory}/eva2-src-${DSTAMP}.tar" />
|
||||
<delete file="${distribution.directory}/eva2-src-${DSTAMP}.tar" />
|
||||
|
||||
<zip zipfile="${distribution.directory}/eva2-src-${DSTAMP}.zip">
|
||||
<zipfileset dir="${source.distribution.directory}">
|
||||
<zipfileset dir="${src.dist.dir}">
|
||||
<include name="**" />
|
||||
<exclude name="*.tar*, *.zip" />
|
||||
</zipfileset>
|
||||
|
22
src/eva2/EvAInfo.java
Normal file
22
src/eva2/EvAInfo.java
Normal file
@ -0,0 +1,22 @@
|
||||
package eva2;
|
||||
|
||||
/**
|
||||
* Main product and version information strings.
|
||||
*
|
||||
* @author mkron
|
||||
*
|
||||
*/
|
||||
public class EvAInfo {
|
||||
public static final String productName = "EvA 2";
|
||||
public static final String productLongName = "Evolutionary Algorithms Workbench 2";
|
||||
public static final String versionNum = new String ("2.021");
|
||||
public static final String url = "http://www.ra.cs.uni-tuebingen.de/software/EvA2";
|
||||
|
||||
public static final String propertyFile = "resources/EvA2.props";
|
||||
public static final String licenseFile = "lgpl-3.0.txt";
|
||||
public static final String iconLocation = "resources/images/icon4.gif";
|
||||
|
||||
public static final String splashLocation = "resources/images/splashScreen2.png";
|
||||
public static final String infoTitle = productName+" Information";
|
||||
|
||||
}
|
@ -2,8 +2,8 @@ package eva2.client;
|
||||
|
||||
/*
|
||||
* Title: EvA2
|
||||
* Description:
|
||||
* Copyright: Copyright (c) 2003
|
||||
* Description: The main client class of the EvA framework.
|
||||
* Copyright: Copyright (c) 2008
|
||||
* Company: University of Tuebingen, Computer Architecture
|
||||
* @author Holger Ulmer, Felix Streichert, Hannes Planatscher
|
||||
* @version: $Revision: 322 $
|
||||
@ -28,7 +28,6 @@ import java.net.URL;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
import javax.swing.ButtonGroup;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JFrame;
|
||||
@ -47,6 +46,9 @@ import javax.swing.UnsupportedLookAndFeelException;
|
||||
import javax.swing.event.MenuEvent;
|
||||
import javax.swing.event.MenuListener;
|
||||
|
||||
import wsi.ra.jproxy.RemoteStateListener;
|
||||
import wsi.ra.tool.BasicResourceLoader;
|
||||
import eva2.EvAInfo;
|
||||
import eva2.gui.ExtAction;
|
||||
import eva2.gui.HtmlDemo;
|
||||
import eva2.gui.JEFrame;
|
||||
@ -61,37 +63,18 @@ import eva2.tools.EVAHELP;
|
||||
import eva2.tools.ReflectPackage;
|
||||
import eva2.tools.Serializer;
|
||||
|
||||
import wsi.ra.jproxy.RemoteStateListener;
|
||||
import wsi.ra.tool.BasicResourceLoader;
|
||||
|
||||
/**
|
||||
/////////////////////////////////
|
||||
// -Xrunhprof:cpu=samples
|
||||
/////////////////////////////////////////////////
|
||||
/*==========================================================================*
|
||||
* CLASS DECLARATION
|
||||
*==========================================================================*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class EvAClient implements RemoteStateListener, Serializable {
|
||||
public static final String EVA_PROPERTY_FILE = "resources/EvA2.props";
|
||||
public static final String licenseFile = "lgpl-3.0.txt";
|
||||
private static Properties EVA_PROPERTIES;
|
||||
public static final String iconLocation = "resources/images/icon4.gif";
|
||||
private static final String splashLocation = "resources/images/splashScreen2.png";
|
||||
private static final String infoTitle = "EvA2 Information";
|
||||
final int splashScreenTime = 1500;
|
||||
private static Properties EVA_PROPERTIES;
|
||||
|
||||
public static boolean TRACE = false;
|
||||
private static String m_ProductName = "EvA 2";
|
||||
private static String m_ProductLongName = "Evolutionary Algorithms Workbench 2";
|
||||
// private int PREFERRED_WIDTH = 680;
|
||||
// private int PREFERRED_HEIGHT = 550;
|
||||
|
||||
public JEFrame m_Frame;
|
||||
|
||||
private EvAComAdapter m_ComAdapter;
|
||||
// private JExtDesktopPane m_Desktop;
|
||||
private transient JMenuBar m_barMenu;
|
||||
private transient JExtMenu m_mnuAbout;
|
||||
private transient JExtMenu m_mnuSelHosts;
|
||||
@ -152,9 +135,9 @@ public class EvAClient implements RemoteStateListener, Serializable {
|
||||
*/
|
||||
static {
|
||||
try {
|
||||
EVA_PROPERTIES = BasicResourceLoader.readProperties(EVA_PROPERTY_FILE);
|
||||
EVA_PROPERTIES = BasicResourceLoader.readProperties(EvAInfo.propertyFile);
|
||||
} catch (Exception ex) {
|
||||
System.err.println("Could not read the configuration file "+ EVA_PROPERTY_FILE);
|
||||
System.err.println("Could not read the configuration file "+ EvAInfo.propertyFile);
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -165,7 +148,7 @@ public class EvAClient implements RemoteStateListener, Serializable {
|
||||
*
|
||||
*/
|
||||
public EvAClient(final String hostName) {
|
||||
final SplashScreen fSplashScreen = new SplashScreen(splashLocation);
|
||||
final SplashScreen fSplashScreen = new SplashScreen(EvAInfo.splashLocation);
|
||||
|
||||
fSplashScreen.splash();
|
||||
|
||||
@ -203,13 +186,13 @@ public class EvAClient implements RemoteStateListener, Serializable {
|
||||
|
||||
m_Frame = new JEFrame();
|
||||
BasicResourceLoader loader = BasicResourceLoader.instance();
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(iconLocation);
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAInfo.iconLocation);
|
||||
try {
|
||||
m_Frame.setIconImage(Toolkit.getDefaultToolkit().createImage(bytes));
|
||||
} catch (java.lang.NullPointerException e) {
|
||||
System.out.println("Could not find EvA2 icon, please move resources folder to working directory!");
|
||||
}
|
||||
m_Frame.setTitle("EvA2 workbench");
|
||||
m_Frame.setTitle(EvAInfo.productName + " workbench");
|
||||
|
||||
try {
|
||||
Thread.sleep(200);
|
||||
@ -491,7 +474,7 @@ public class EvAClient implements RemoteStateListener, Serializable {
|
||||
}
|
||||
|
||||
public static String getProductName() {
|
||||
return m_ProductName;
|
||||
return EvAInfo.productName;
|
||||
}
|
||||
|
||||
protected void logMessage(String msg) {
|
||||
@ -527,7 +510,7 @@ public class EvAClient implements RemoteStateListener, Serializable {
|
||||
if (selectedModule == null) { // show a dialog and ask for a module
|
||||
String[] ModuleNameList = m_ComAdapter.getModuleNameList();
|
||||
if (ModuleNameList == null) {
|
||||
JOptionPane.showMessageDialog(m_Frame.getContentPane(), "No modules available on " + m_ComAdapter.getHostName(), infoTitle, 1);
|
||||
JOptionPane.showMessageDialog(m_Frame.getContentPane(), "No modules available on " + m_ComAdapter.getHostName(), EvAInfo.infoTitle, 1);
|
||||
} else {
|
||||
String LastModuleName = Serializer.loadString("lastmodule.ser");
|
||||
if (LastModuleName == null) LastModuleName = ModuleNameList[0];
|
||||
@ -660,28 +643,28 @@ public class EvAClient implements RemoteStateListener, Serializable {
|
||||
}
|
||||
|
||||
private void showPleaseWaitDialog() {
|
||||
JOptionPane.showMessageDialog(m_Frame.getContentPane(), "Please wait one moment.", infoTitle, 1);
|
||||
JOptionPane.showMessageDialog(m_Frame.getContentPane(), "Please wait one moment.", EvAInfo.infoTitle, 1);
|
||||
}
|
||||
|
||||
private void showAboutDialog() {
|
||||
JOptionPane.showMessageDialog
|
||||
(m_Frame,
|
||||
m_ProductName + " - " + m_ProductLongName +
|
||||
EvAInfo.productName + " - " + EvAInfo.productLongName +
|
||||
"\n University of Tuebingen\n Computer Architecture\n " +
|
||||
"M. Kronfeld, H. Planatscher, M. de Paly, F. Streichert & H. Ulmer\n " +
|
||||
// "H. Ulmer & F. Streichert & H. Planatscher & M. de Paly & M. Kronfeld\n" +
|
||||
"Prof. Dr. Andreas Zell \n (c) 2008 \n Version " + EvAServer.Version +
|
||||
"\n http://www.ra.cs.uni-tuebingen.de/software/EvA2", infoTitle, 1);
|
||||
"Prof. Dr. Andreas Zell \n (c) 2008 \n Version " + EvAInfo.versionNum +
|
||||
"\n " + EvAInfo.url, EvAInfo.infoTitle, 1);
|
||||
}
|
||||
|
||||
private void showLicense() {
|
||||
HtmlDemo temp = new HtmlDemo(licenseFile);
|
||||
HtmlDemo temp = new HtmlDemo(EvAInfo.licenseFile);
|
||||
temp.show();
|
||||
}
|
||||
|
||||
|
||||
private void showNoHostFoundDialog() {
|
||||
JOptionPane.showMessageDialog(m_Frame.getContentPane(), "No host with running EVASERVER found. Please start one or \nadd the correct address to the properties list.", infoTitle, 1);
|
||||
JOptionPane.showMessageDialog(m_Frame.getContentPane(), "No host with running EVASERVER found. Please start one or \nadd the correct address to the properties list.", EvAInfo.infoTitle, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -54,6 +54,7 @@ import javax.swing.JFileChooser;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import eva2.EvAInfo;
|
||||
import eva2.client.EvAClient;
|
||||
import eva2.tools.EVAHELP;
|
||||
import eva2.tools.ReflectPackage;
|
||||
@ -519,7 +520,7 @@ public class GenericObjectEditor implements PropertyEditor {
|
||||
}
|
||||
if (clsArr == null) {
|
||||
System.out.println("Warning: No configuration property found in: "
|
||||
+EvAClient.EVA_PROPERTY_FILE + " "+"for "+className);
|
||||
+EvAInfo.propertyFile + " "+"for "+className);
|
||||
classes.add(className);
|
||||
} else {
|
||||
for (Class<?> class1 : clsArr) {
|
||||
|
@ -29,6 +29,7 @@ import javax.swing.text.html.HTMLDocument;
|
||||
import javax.swing.text.html.HTMLFrameHyperlinkEvent;
|
||||
|
||||
import wsi.ra.tool.BasicResourceLoader;
|
||||
import eva2.EvAInfo;
|
||||
import eva2.client.EvAClient;
|
||||
/**
|
||||
*
|
||||
@ -93,7 +94,7 @@ public class HtmlDemo {
|
||||
}
|
||||
JFrame frame = new JFrame (m_name);
|
||||
BasicResourceLoader loader = BasicResourceLoader.instance();
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAClient.iconLocation);
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAInfo.iconLocation);
|
||||
try {
|
||||
frame.setIconImage(Toolkit.getDefaultToolkit().createImage(bytes));
|
||||
} catch (java.lang.NullPointerException e) {
|
||||
|
@ -13,21 +13,24 @@ package eva2.gui;
|
||||
* IMPORTS
|
||||
*==========================================================================*/
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.Toolkit;
|
||||
import java.io.Serializable;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.awt.print.* ;
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.*;
|
||||
import javax.swing.event.*;
|
||||
|
||||
import eva2.client.EvAClient;
|
||||
import eva2.gui.JModuleGeneralPanel;
|
||||
import eva2.gui.JParaPanel;
|
||||
import eva2.server.modules.ModuleAdapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JInternalFrame;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTabbedPane;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
|
||||
import wsi.ra.tool.BasicResourceLoader;
|
||||
import eva2.EvAInfo;
|
||||
import eva2.server.modules.ModuleAdapter;
|
||||
/*==========================================================================*
|
||||
* CLASS DECLARATION
|
||||
*==========================================================================*/
|
||||
@ -103,7 +106,7 @@ public class JTabbedModuleFrame implements Serializable {
|
||||
m_Frame = new JEFrame (m_AdapterName+" on "+m_Host);
|
||||
|
||||
BasicResourceLoader loader = BasicResourceLoader.instance();
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAClient.iconLocation);
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAInfo.iconLocation);
|
||||
try {
|
||||
m_Frame.setIconImage(Toolkit.getDefaultToolkit().createImage(bytes));
|
||||
} catch (java.lang.NullPointerException e) {
|
||||
|
@ -25,7 +25,6 @@ import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JMenuItem;
|
||||
@ -36,10 +35,8 @@ import javax.swing.JViewport;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
|
||||
import eva2.client.EvAClient;
|
||||
import eva2.tools.MultirunRefiner;
|
||||
|
||||
import wsi.ra.tool.BasicResourceLoader;
|
||||
import eva2.EvAInfo;
|
||||
/*==========================================================================*
|
||||
* CLASS DECLARATION
|
||||
*==========================================================================*/
|
||||
@ -107,7 +104,7 @@ Serializable {
|
||||
m_TextArea.setCaretPosition(0);
|
||||
|
||||
BasicResourceLoader loader = BasicResourceLoader.instance();
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAClient.iconLocation);
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAInfo.iconLocation);
|
||||
try {
|
||||
frame.setIconImage(Toolkit.getDefaultToolkit().createImage(bytes));
|
||||
} catch (java.lang.NullPointerException e) {
|
||||
|
@ -12,16 +12,25 @@ package eva2.gui;
|
||||
/*==========================================================================*
|
||||
* IMPORTS
|
||||
*==========================================================================*/
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Point;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.text.*;
|
||||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.*;
|
||||
|
||||
import eva2.client.EvAClient;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextArea;
|
||||
import javax.swing.JViewport;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
|
||||
import java.awt.event.*;
|
||||
import wsi.ra.tool.BasicResourceLoader;
|
||||
import eva2.EvAInfo;
|
||||
/*==========================================================================*
|
||||
* CLASS DECLARATION
|
||||
*==========================================================================*/
|
||||
@ -95,7 +104,7 @@ public class LogPanel extends JPanel {
|
||||
final JFrame frame = new JFrame("Log_Panel_Test");
|
||||
frame.getContentPane().setLayout(new BorderLayout());
|
||||
BasicResourceLoader loader = BasicResourceLoader.instance();
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAClient.iconLocation);
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAInfo.iconLocation);
|
||||
try {
|
||||
frame.setIconImage(Toolkit.getDefaultToolkit().createImage(bytes));
|
||||
} catch (java.lang.NullPointerException e) {
|
||||
|
@ -22,9 +22,6 @@ import java.awt.event.ActionListener;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.print.PageFormat;
|
||||
import java.awt.print.PrinterException;
|
||||
import java.awt.print.PrinterJob;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
@ -41,12 +38,13 @@ import javax.swing.JFrame;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import wsi.ra.chart2d.DPointSet;
|
||||
import wsi.ra.tool.BasicResourceLoader;
|
||||
|
||||
import com.sun.image.codec.jpeg.JPEGCodec;
|
||||
import com.sun.image.codec.jpeg.JPEGImageEncoder;
|
||||
|
||||
import eva2.client.EvAClient;
|
||||
import wsi.ra.chart2d.DPointSet;
|
||||
import wsi.ra.tool.BasicResourceLoader;
|
||||
import eva2.EvAInfo;
|
||||
/*==========================================================================*
|
||||
* CLASS DECLARATION
|
||||
*==========================================================================*/
|
||||
@ -106,7 +104,7 @@ public class Plot implements PlotInterface, Serializable {
|
||||
public void init() {
|
||||
m_Frame = new JEFrame("Plot: "+m_PlotName);
|
||||
BasicResourceLoader loader = BasicResourceLoader.instance();
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAClient.iconLocation);
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAInfo.iconLocation);
|
||||
try {
|
||||
m_Frame.setIconImage(Toolkit.getDefaultToolkit().createImage(bytes));
|
||||
} catch (java.lang.NullPointerException e) {
|
||||
|
@ -12,18 +12,16 @@ package eva2.gui;
|
||||
/*==========================================================================*
|
||||
* IMPORTS
|
||||
*==========================================================================*/
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
import java.awt.Toolkit;
|
||||
import java.beans.PropertyEditor;
|
||||
import javax.swing.JFrame;
|
||||
|
||||
import eva2.client.EvAClient;
|
||||
import eva2.tools.EVAHELP;
|
||||
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.BorderLayout;
|
||||
import java.beans.PropertyEditor;
|
||||
|
||||
import wsi.ra.tool.BasicResourceLoader;
|
||||
import eva2.EvAInfo;
|
||||
import eva2.tools.EVAHELP;
|
||||
/*==========================================================================*
|
||||
* CLASS DECLARATION
|
||||
*==========================================================================*/
|
||||
@ -39,7 +37,7 @@ public class PropertyDialog extends JEFrame {
|
||||
public PropertyDialog (PropertyEditor editor,String Title, int x, int y) {
|
||||
super(getFrameNameFromEditor(editor)); // that was the long class name !!
|
||||
BasicResourceLoader loader = BasicResourceLoader.instance();
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAClient.iconLocation);
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAInfo.iconLocation);
|
||||
try {
|
||||
setIconImage(Toolkit.getDefaultToolkit().createImage(bytes));
|
||||
} catch (java.lang.NullPointerException e) {
|
||||
|
@ -14,15 +14,18 @@ package eva2.gui;
|
||||
*==========================================================================*/
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.event.*;
|
||||
import java.awt.Toolkit;
|
||||
import java.beans.*;
|
||||
import javax.swing.*;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.beans.PropertyEditorManager;
|
||||
import java.beans.PropertyEditorSupport;
|
||||
|
||||
import eva2.client.EvAClient;
|
||||
import javax.swing.JFrame;
|
||||
|
||||
import wsi.ra.tool.BasicResourceLoader;
|
||||
import eva2.EvAInfo;
|
||||
import eva2.tools.SelectedTag;
|
||||
import eva2.tools.Tag;
|
||||
import wsi.ra.tool.BasicResourceLoader;
|
||||
/*==========================================================================*
|
||||
* CLASS DECLARATION
|
||||
*==========================================================================*/
|
||||
@ -123,7 +126,7 @@ public class TagEditor extends PropertyEditorSupport {
|
||||
PropertyValueSelector ps = new PropertyValueSelector(ce);
|
||||
JFrame f = new JFrame();
|
||||
BasicResourceLoader loader = BasicResourceLoader.instance();
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAClient.iconLocation);
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAInfo.iconLocation);
|
||||
try {
|
||||
f.setIconImage(Toolkit.getDefaultToolkit().createImage(bytes));
|
||||
} catch (java.lang.NullPointerException e) {
|
||||
|
@ -18,19 +18,12 @@ import java.io.InputStreamReader;
|
||||
import java.io.PrintStream;
|
||||
import java.net.InetAddress;
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// -Xrunhprof:cpu=times
|
||||
// -Djava.security.policy=server.policy
|
||||
///////////////////////////////////////////////////////////////
|
||||
/*==========================================================================*
|
||||
* CLASS DECLARATION
|
||||
*==========================================================================*/
|
||||
import eva2.EvAInfo;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class EvAServer {
|
||||
/* Main version string of the EvA2 application. Change for minor releases, please.*/
|
||||
public static final String Version = new String ("2.02");
|
||||
public static boolean TRACE = false;
|
||||
/* MainAdapterImp object. This is need for the first
|
||||
connection between the server and the client program. */
|
||||
@ -48,7 +41,7 @@ public class EvAServer {
|
||||
// m_InsideClient = insideClient;
|
||||
// m_Restart = Restart;
|
||||
System.out.println ("*******************************************************************************");
|
||||
System.out.println ("This is EvA Server Version: "+ Version+ " CommVersion: "+Version);
|
||||
System.out.println ("This is EvA Server Version: "+ EvAInfo.versionNum);
|
||||
//System.out.println ("Java Version: " + System.getProperty("java.version") );
|
||||
System.out.println ("*******************************************************************************");
|
||||
m_UserName = System.getProperty("user.name");
|
||||
|
@ -11,23 +11,9 @@ package eva2.server;
|
||||
/*==========================================================================*
|
||||
* IMPORTS
|
||||
*==========================================================================*/
|
||||
import java.net.InetAddress;
|
||||
import java.net.MalformedURLException;
|
||||
import java.rmi.Naming;
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.registry.Registry;
|
||||
|
||||
import eva2.client.EvAComAdapter;
|
||||
|
||||
import wsi.ra.jproxy.RMIProxyLocal;
|
||||
import wsi.ra.jproxy.RMIServer;
|
||||
///////////////////////////////////////////////////////////////
|
||||
//-Xrunhprof:cpu=times
|
||||
//-Djava.security.policy=server.policy
|
||||
///////////////////////////////////////////////////////////////
|
||||
/*==========================================================================*
|
||||
* CLASS DECLARATION
|
||||
*==========================================================================*/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -76,7 +76,7 @@ public class SelectBestIndividuals implements InterfaceSelection, java.io.Serial
|
||||
* crit
|
||||
* @param pop The population to select from
|
||||
* @param tabu The individuals that are to be ignored
|
||||
* @param crit The criterium
|
||||
* @param crit The criterion
|
||||
* @return Object the individual
|
||||
*/
|
||||
private Object getBestIndividualExcept(Population pop, ArrayList tabu, int crit) {
|
||||
|
@ -114,7 +114,7 @@ public class SelectEPTournaments implements InterfaceSelection, java.io.Serializ
|
||||
* crit
|
||||
* @param pop The population to select from
|
||||
* @param tabu The individuals that are to be ignored
|
||||
* @param crit The criterium
|
||||
* @param crit The criterion
|
||||
* @return Object the individual
|
||||
*/
|
||||
private Object getBestIndividualExcept(Population pop, ArrayList tabu, int crit) {
|
||||
|
@ -117,7 +117,7 @@ public class SelectTournament implements InterfaceSelection, java.io.Serializabl
|
||||
*/
|
||||
public String globalInfo() {
|
||||
return "The tournament selection compares the raw fitness of n individuals and takes the best." +
|
||||
"This is a single-objective method, it will select with respect to the first criterium in the multi-objective case.";
|
||||
"This is a single-objective method, it selects with respect to the first criterion in the multi-objective case.";
|
||||
}
|
||||
|
||||
/** You can choose the tournament size.
|
||||
|
@ -3,6 +3,7 @@ package eva2.server.go.strategies;
|
||||
import java.util.Vector;
|
||||
|
||||
import wsi.ra.math.RNG;
|
||||
import eva2.gui.GenericObjectEditor;
|
||||
import eva2.server.go.InterfacePopulationChangedEventListener;
|
||||
import eva2.server.go.individuals.AbstractEAIndividual;
|
||||
import eva2.server.go.individuals.InterfaceESIndividual;
|
||||
@ -13,7 +14,6 @@ import eva2.server.go.problems.AbstractOptimizationProblem;
|
||||
import eva2.server.go.problems.F1Problem;
|
||||
import eva2.server.go.problems.InterfaceOptimizationProblem;
|
||||
import eva2.tools.EVAERROR;
|
||||
import eva2.tools.Pair;
|
||||
import eva2.tools.SelectedTag;
|
||||
|
||||
/** Differential evolution implementing DE1 and DE2 following the paper of Storm and
|
||||
@ -81,6 +81,10 @@ public class DifferentialEvolution implements InterfaceOptimizer, java.io.Serial
|
||||
this.firePropertyChangedEvent("NextGenerationPerformed");
|
||||
}
|
||||
|
||||
public void hideHideable() {
|
||||
setDEType(getDEType());
|
||||
}
|
||||
|
||||
/** This method will init the optimizer with a given population
|
||||
* @param pop The initial population
|
||||
* @param reset If true the population is reset.
|
||||
@ -569,7 +573,7 @@ public class DifferentialEvolution implements InterfaceOptimizer, java.io.Serial
|
||||
return this.m_Mt;
|
||||
}
|
||||
public String mtTipText() {
|
||||
return "In case of trig. mutation DE, the TMO is applied wit probability Mt.";
|
||||
return "In case of trigonometric mutation DE, the TMO is applied with probability Mt.";
|
||||
}
|
||||
|
||||
/** This method allows you to choose the type of Differential Evolution.
|
||||
@ -577,6 +581,8 @@ public class DifferentialEvolution implements InterfaceOptimizer, java.io.Serial
|
||||
*/
|
||||
public void setDEType(SelectedTag s) {
|
||||
this.m_DEType = s;
|
||||
// show mt for trig. DE only
|
||||
GenericObjectEditor.setShowProperty(this.getClass(), "mt", s.getSelectedTagID()==3);
|
||||
}
|
||||
public SelectedTag getDEType() {
|
||||
return this.m_DEType;
|
||||
|
@ -1,6 +1,5 @@
|
||||
package eva2.server.go.strategies;
|
||||
|
||||
import eva2.gui.BeanInspector;
|
||||
import eva2.server.go.InterfacePopulationChangedEventListener;
|
||||
import eva2.server.go.individuals.AbstractEAIndividual;
|
||||
import eva2.server.go.operators.mutation.MutateESSuccessRule;
|
||||
|
@ -8,22 +8,13 @@ package wsi.ra.jproxy;
|
||||
* $Date: 2004/04/15 09:12:31 $
|
||||
* $Author: ulmerh $
|
||||
*/
|
||||
/*==========================================================================*
|
||||
* IMPORTS
|
||||
*==========================================================================*/
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.rmi.Naming;
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.registry.Registry;
|
||||
///////////////////////////////////////////////////////////////
|
||||
// -Xrunhprof:cpu=times
|
||||
// -Djava.security.policy=server.policy
|
||||
///////////////////////////////////////////////////////////////
|
||||
/*==========================================================================*
|
||||
* CLASS DECLARATION
|
||||
*==========================================================================*/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -583,8 +583,6 @@ public class BasicResourceLoader implements ResourceLoader
|
||||
*
|
||||
*/
|
||||
public static Properties readProperties(String resourceName) throws Exception {
|
||||
// if (TRACE)
|
||||
// System.out.println("EvAClient.readProperties of " + resourceName);
|
||||
Properties prop = new Properties();
|
||||
BasicResourceLoader loader = BasicResourceLoader.instance();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user