fixes #21
Switched from Ant to Maven. Usage: - Install Maven 3.x - Enter directory with pom.xml - Type mvn compile - Enjoy!
This commit is contained in:
@@ -14,12 +14,12 @@ public class EvAInfo {
|
||||
// public static final String fullVersion = "2.043"; // moved to EvA2.props!
|
||||
public static final String url = "http://www.cogsys.cs.uni-tuebingen.de/software/EvA2";
|
||||
|
||||
public static final String propertyFile = "resources/EvA2.props";
|
||||
public static final String propertyFile = "META-INF/EvA2.props";
|
||||
public static final String LGPLFile = "lgpl-3.0.txt";
|
||||
public static final String GPLFile= "gpl-3.0.txt";
|
||||
public static final String iconLocation = "resources/images/icon4.gif";
|
||||
public static final String iconLocation = "images/icon4.gif";
|
||||
|
||||
public static final String splashLocation = "resources/images/EvASplashScreen.png";
|
||||
public static final String splashLocation = "images/EvASplashScreen.png";
|
||||
public static final String infoTitle = productName+" Information";
|
||||
public static final String copyrightYear = "2010-2012";
|
||||
|
||||
|
@@ -1,33 +0,0 @@
|
||||
package eva2.client;
|
||||
|
||||
import eva2.gui.ExtAction;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.event.WindowListener;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: streiche
|
||||
* Date: 12.05.2003
|
||||
* Time: 18:28:54
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class AppExitAction extends ExtAction implements WindowListener{
|
||||
public AppExitAction(String s, String toolTip, javax.swing.KeyStroke key) {
|
||||
super(s, toolTip, key);
|
||||
}
|
||||
private void exit(){
|
||||
System.exit(1);
|
||||
}
|
||||
public void actionPerformed(ActionEvent e) { exit(); }
|
||||
public void windowOpened(WindowEvent e) { }
|
||||
public void windowClosed(WindowEvent e) { }
|
||||
public void windowIconified(WindowEvent e) { }
|
||||
public void windowDeiconified(WindowEvent e) { }
|
||||
public void windowActivated(WindowEvent e) { }
|
||||
public void windowDeactivated(WindowEvent e) { }
|
||||
public void windowClosing(WindowEvent e) { exit(); }
|
||||
}
|
@@ -44,7 +44,7 @@ import javax.swing.border.TitledBorder;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class EvAClient implements RemoteStateListener {
|
||||
public class EvAClient extends JFrame implements RemoteStateListener {
|
||||
|
||||
/**
|
||||
* Generated serial version identifier.
|
||||
@@ -54,7 +54,7 @@ public class EvAClient implements RemoteStateListener {
|
||||
private boolean clientInited = false;
|
||||
private JExtDesktopPaneToolBar desktopToolBar;
|
||||
private JDesktopPane desktopPane;
|
||||
private JFrame mainFrame;
|
||||
//private JFrame mainFrame;
|
||||
private JPanel configurationPane;
|
||||
private JSplitPane horizontalSplit;
|
||||
private Runnable initRnbl = null;
|
||||
@@ -333,33 +333,6 @@ public class EvAClient implements RemoteStateListener {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a window listener to the EvA2 JFrame instance.
|
||||
*
|
||||
* @param l
|
||||
*/
|
||||
public void addWindowListener(WindowListener l) {
|
||||
if (mainFrame != null) {
|
||||
mainFrame.addWindowListener(l);
|
||||
} else {
|
||||
System.err.println("Error, no JFrame existent in "
|
||||
+ this.getClass().getSimpleName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a window listener to the EvA2 JFrame instance.
|
||||
*
|
||||
* @param l
|
||||
*/
|
||||
public void removeWindowListener(WindowListener l) {
|
||||
if (mainFrame != null) {
|
||||
mainFrame.removeWindowListener(l);
|
||||
} else {
|
||||
System.err.println("Error, no JFrame existent in "
|
||||
+ this.getClass().getSimpleName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set UI Font for all controls.
|
||||
@@ -406,9 +379,9 @@ public class EvAClient implements RemoteStateListener {
|
||||
}
|
||||
|
||||
/* Create main frame with GridBagLayout */
|
||||
mainFrame = new JFrame(EvAInfo.productName);
|
||||
mainFrame.setLayout(new GridBagLayout());
|
||||
mainFrame.setMinimumSize(new Dimension(800, 600));
|
||||
setTitle(EvAInfo.productName);
|
||||
setLayout(new GridBagLayout());
|
||||
setMinimumSize(new Dimension(800, 600));
|
||||
|
||||
/* Creates the desktopPane for Plot/Text Output */
|
||||
desktopPane = new JExtDesktopPane();
|
||||
@@ -432,7 +405,7 @@ public class EvAClient implements RemoteStateListener {
|
||||
BasicResourceLoader loader = BasicResourceLoader.instance();
|
||||
byte[] bytes = loader.getBytesFromResourceLocation(EvAInfo.iconLocation, true);
|
||||
// TODO: use setIconImages (for better support of multiple icons when changing programs etc.)
|
||||
mainFrame.setIconImage(Toolkit.getDefaultToolkit().createImage(bytes));
|
||||
setIconImage(Toolkit.getDefaultToolkit().createImage(bytes));
|
||||
|
||||
try {
|
||||
Thread.sleep(200);
|
||||
@@ -451,7 +424,7 @@ public class EvAClient implements RemoteStateListener {
|
||||
}
|
||||
createActions();
|
||||
|
||||
mainFrame.setSize(800, 600);
|
||||
setSize(800, 600);
|
||||
|
||||
/* Create a new ConfigurationPanel (left side) */
|
||||
configurationPane = new JPanel(new GridBagLayout());
|
||||
@@ -464,7 +437,7 @@ public class EvAClient implements RemoteStateListener {
|
||||
gbConstraints.fill = GridBagConstraints.VERTICAL;
|
||||
gbConstraints.gridwidth = GridBagConstraints.RELATIVE;
|
||||
gbConstraints.gridheight = GridBagConstraints.RELATIVE;
|
||||
mainFrame.add(configurationPane, gbConstraints);
|
||||
add(configurationPane, gbConstraints);
|
||||
|
||||
/* SplitPane for desktopPanel and loggingPanel */
|
||||
horizontalSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true);
|
||||
@@ -482,7 +455,7 @@ public class EvAClient implements RemoteStateListener {
|
||||
gbConstraints.fill = GridBagConstraints.BOTH;
|
||||
gbConstraints.gridwidth = GridBagConstraints.REMAINDER;
|
||||
gbConstraints.gridheight = GridBagConstraints.RELATIVE;
|
||||
mainFrame.add(horizontalSplit, gbConstraints);
|
||||
add(horizontalSplit, gbConstraints);
|
||||
|
||||
/* StatusBar of the main frame */
|
||||
statusBar = new JPanel(new FlowLayout(FlowLayout.RIGHT));
|
||||
@@ -500,9 +473,9 @@ public class EvAClient implements RemoteStateListener {
|
||||
gbConstraints.weighty = 0.0;
|
||||
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
|
||||
gbConstraints.anchor = GridBagConstraints.PAGE_END;
|
||||
mainFrame.add(statusBar, gbConstraints);
|
||||
add(statusBar, gbConstraints);
|
||||
|
||||
mainFrame.setVisible(true);
|
||||
setVisible(true);
|
||||
}
|
||||
if (useDefaultModule != null) {
|
||||
/*
|
||||
@@ -517,11 +490,18 @@ public class EvAClient implements RemoteStateListener {
|
||||
|
||||
if (withGUI) {
|
||||
buildMenu();
|
||||
mainFrame.addWindowListener(new WindowAdapter() {
|
||||
addWindowListener(new WindowAdapter() {
|
||||
|
||||
@Override
|
||||
public void windowClosing(final WindowEvent event) {
|
||||
EvAClient.this.close();
|
||||
int result = JOptionPane.showConfirmDialog(
|
||||
EvAClient.this,
|
||||
"Do you really want to exit EvA2?",
|
||||
"Exit Application",
|
||||
JOptionPane.YES_NO_OPTION);
|
||||
if (result == JOptionPane.YES_OPTION) {
|
||||
EvAClient.this.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -542,13 +522,13 @@ public class EvAClient implements RemoteStateListener {
|
||||
configurationPane.setVisible(true);
|
||||
}
|
||||
|
||||
if (!(mainFrame.isVisible())) {
|
||||
if (!(this.isVisible())) {
|
||||
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
mainFrame.setLocation((int) ((screenSize.width - mainFrame.getWidth()) / 2), (int) ((screenSize.height - mainFrame.getHeight()) / 2.5));
|
||||
mainFrame.pack();
|
||||
mainFrame.setSize(screenSize);
|
||||
mainFrame.setVisible(true);
|
||||
mainFrame.setVisible(true);
|
||||
this.setLocation((int) ((screenSize.width - this.getWidth()) / 2), (int) ((screenSize.height - this.getHeight()) / 2.5));
|
||||
this.pack();
|
||||
this.setSize(screenSize);
|
||||
this.setVisible(true);
|
||||
this.setVisible(true);
|
||||
}
|
||||
|
||||
// if this message is omitted, the stupid scroll pane runs to
|
||||
@@ -819,7 +799,7 @@ public class EvAClient implements RemoteStateListener {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent event) {
|
||||
// ToDo
|
||||
String helpHS = "resources/EvA2Help/EvA2Help.hs";
|
||||
String helpHS = "EvA2Help/EvA2Help.hs";
|
||||
ClassLoader cl = EvAClient.class.getClassLoader();
|
||||
JHelpContentViewer helpPane;
|
||||
try {
|
||||
@@ -846,7 +826,7 @@ public class EvAClient implements RemoteStateListener {
|
||||
*/
|
||||
private void buildMenu() {
|
||||
menuBar = new JMenuBar();
|
||||
mainFrame.setJMenuBar(menuBar);
|
||||
setJMenuBar(menuBar);
|
||||
menuModule = new JExtMenu("&Module");
|
||||
menuModule.add(actModuleLoad);
|
||||
|
||||
@@ -907,7 +887,7 @@ public class EvAClient implements RemoteStateListener {
|
||||
if (selectedModule == null) { // show a dialog and ask for a module
|
||||
String[] moduleNameList = comAdapter.getModuleNameList();
|
||||
if (moduleNameList == null) {
|
||||
JOptionPane.showMessageDialog(mainFrame, "No modules available on " + comAdapter.getHostName(), EvAInfo.infoTitle, 1);
|
||||
JOptionPane.showMessageDialog(this, "No modules available on " + comAdapter.getHostName(), EvAInfo.infoTitle, 1);
|
||||
} else {
|
||||
String lastModule = null;
|
||||
|
||||
@@ -923,7 +903,7 @@ public class EvAClient implements RemoteStateListener {
|
||||
LOGGER.log(Level.INFO, "Defaulting to module: {0}", lastModule);
|
||||
}
|
||||
|
||||
selectedModule = (String) JOptionPane.showInputDialog(mainFrame,
|
||||
selectedModule = (String) JOptionPane.showInputDialog(this,
|
||||
"Which module do you want \n to load on host: " + comAdapter.getHostName() + " ?",
|
||||
"Load optimization module on host",
|
||||
JOptionPane.QUESTION_MESSAGE,
|
||||
@@ -1058,7 +1038,7 @@ public class EvAClient implements RemoteStateListener {
|
||||
gbConstraints.gridwidth = 2;
|
||||
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
|
||||
gbConstraints.anchor = GridBagConstraints.PAGE_START;
|
||||
mainFrame.add(frameMaker.getToolBar(), gbConstraints);
|
||||
add(frameMaker.getToolBar(), gbConstraints);
|
||||
|
||||
GridBagConstraints gbConstraints2 = new GridBagConstraints();
|
||||
gbConstraints2.gridx = 0;
|
||||
@@ -1119,7 +1099,7 @@ public class EvAClient implements RemoteStateListener {
|
||||
if (hostNames == null || hostNames.length == 0) {
|
||||
showNoHostFoundDialog();
|
||||
} else {
|
||||
String hostName = (String) JOptionPane.showInputDialog(mainFrame,
|
||||
String hostName = (String) JOptionPane.showInputDialog(this,
|
||||
"Which active host do you want to connect to?", "Host", JOptionPane.QUESTION_MESSAGE, null,
|
||||
hostNames, comAdapter.getHostName());
|
||||
if (hostName != null) {
|
||||
@@ -1138,12 +1118,12 @@ public class EvAClient implements RemoteStateListener {
|
||||
}
|
||||
|
||||
private void showPleaseWaitDialog() {
|
||||
JOptionPane.showMessageDialog(configurationPane, "Please wait one moment.", EvAInfo.infoTitle, 1);
|
||||
JOptionPane.showMessageDialog(this, "Please wait one moment.", EvAInfo.infoTitle, 1);
|
||||
}
|
||||
|
||||
private void showAboutDialog() {
|
||||
AboutDialog aboutDialog = new AboutDialog(mainFrame);
|
||||
aboutDialog.setLocationRelativeTo(mainFrame);
|
||||
AboutDialog aboutDialog = new AboutDialog(this);
|
||||
aboutDialog.setLocationRelativeTo(this);
|
||||
aboutDialog.setVisible(true);
|
||||
aboutDialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
|
||||
}
|
||||
@@ -1156,7 +1136,7 @@ public class EvAClient implements RemoteStateListener {
|
||||
}
|
||||
|
||||
private void showNoHostFoundDialog() {
|
||||
JOptionPane.showMessageDialog(mainFrame, "No host with running EVASERVER found. Please start one or \nadd the correct address to the properties list.", EvAInfo.infoTitle, 1);
|
||||
JOptionPane.showMessageDialog(this, "No host with running EVASERVER found. Please start one or \nadd the correct address to the properties list.", EvAInfo.infoTitle, 1);
|
||||
}
|
||||
|
||||
private void selectAvailableHostToKill(String[] HostNames) {
|
||||
@@ -1164,7 +1144,7 @@ public class EvAClient implements RemoteStateListener {
|
||||
showNoHostFoundDialog();
|
||||
return;
|
||||
}
|
||||
String HostName = (String) JOptionPane.showInputDialog(mainFrame,
|
||||
String HostName = (String) JOptionPane.showInputDialog(this,
|
||||
"Which server do you want to be killed ?", "Host", JOptionPane.QUESTION_MESSAGE, null,
|
||||
HostNames, comAdapter.getHostName());
|
||||
if (HostName == null) {
|
||||
|
@@ -71,7 +71,7 @@ public class EvAModuleButtonPanelMaker implements RemoteStateListener, Serializa
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
runButton = ToolBoxGui.createIconifiedButton("resources/images/Play24.gif", "Start", true);
|
||||
runButton = ToolBoxGui.createIconifiedButton("images/Play24.gif", "Start", true);
|
||||
runButton.setToolTipText("Start the current optimization run.");
|
||||
|
||||
runButton.addActionListener(new ActionListener() {
|
||||
@@ -87,7 +87,7 @@ public class EvAModuleButtonPanelMaker implements RemoteStateListener, Serializa
|
||||
|
||||
toolBar.add(runButton);
|
||||
|
||||
stopButton = ToolBoxGui.createIconifiedButton("resources/images/Stop24.gif", "Stop", true);
|
||||
stopButton = ToolBoxGui.createIconifiedButton("images/Stop24.gif", "Stop", true);
|
||||
stopButton.setToolTipText("Stop the current optimization run.");
|
||||
//stopButton.setBorderPainted(false);
|
||||
stopButton.addActionListener(new ActionListener() {
|
||||
@@ -106,7 +106,7 @@ public class EvAModuleButtonPanelMaker implements RemoteStateListener, Serializa
|
||||
stopButton.setEnabled(runningState);
|
||||
toolBar.add(stopButton);
|
||||
|
||||
postProcessButton = ToolBoxGui.createIconifiedButton("resources/images/History24.gif", "Post Process", true);
|
||||
postProcessButton = ToolBoxGui.createIconifiedButton("images/History24.gif", "Post Process", true);
|
||||
postProcessButton.setToolTipText("Start post processing according to available parameters.");
|
||||
//postProcessButton.setBorderPainted(false);
|
||||
postProcessButton.addActionListener(new ActionListener() {
|
||||
@@ -125,7 +125,7 @@ public class EvAModuleButtonPanelMaker implements RemoteStateListener, Serializa
|
||||
postProcessButton.setEnabled(runningState && moduleAdapter.hasPostProcessing());
|
||||
toolBar.add(postProcessButton);
|
||||
|
||||
scheduleButton = ToolBoxGui.createIconifiedButton("resources/images/Server24.gif", "Schedule", true);
|
||||
scheduleButton = ToolBoxGui.createIconifiedButton("images/Server24.gif", "Schedule", true);
|
||||
scheduleButton.setToolTipText("Schedule the currently configured optimization as a job.");
|
||||
//scheduleButton.setBorderPainted(false);
|
||||
scheduleButton.addActionListener(new ActionListener() {
|
||||
|
@@ -104,7 +104,7 @@ public class GOEPanel extends JPanel implements ItemListener {
|
||||
propChangeSupport.firePropertyChange("", backupObject, genericObjectEditor.getValue());
|
||||
}
|
||||
});
|
||||
openButton = makeIconButton("resources/images/Open16.gif", "Open");
|
||||
openButton = makeIconButton("images/Open16.gif", "Open");
|
||||
openButton.setToolTipText("Load a configured object");
|
||||
openButton.setEnabled(true);
|
||||
openButton.addActionListener(new ActionListener() {
|
||||
@@ -123,7 +123,7 @@ public class GOEPanel extends JPanel implements ItemListener {
|
||||
}
|
||||
});
|
||||
|
||||
saveButton = makeIconButton("resources/images/Save16.gif", "Save");
|
||||
saveButton = makeIconButton("images/Save16.gif", "Save");
|
||||
saveButton.setToolTipText("Save the current configured object");
|
||||
saveButton.setEnabled(true);
|
||||
saveButton.addActionListener(new ActionListener() {
|
||||
|
@@ -174,7 +174,7 @@ public class GenericOptimizationObjectivesEditor extends JPanel implements Prope
|
||||
gbc.fill = GridBagConstraints.REMAINDER;
|
||||
gbc.gridx = 1;
|
||||
gbc.weightx = 1;
|
||||
bytes = loader.getBytesFromResourceLocation("resources/images/Sub24.gif", true);
|
||||
bytes = loader.getBytesFromResourceLocation("images/Sub24.gif", true);
|
||||
this.m_Delete[i] = new JButton("", new ImageIcon(Toolkit.getDefaultToolkit().createImage(bytes)));
|
||||
this.m_Delete[i].addActionListener(deleteTarget);
|
||||
this.m_TargetList.add(this.m_Delete[i], gbc);
|
||||
|
@@ -198,7 +198,7 @@ public class GenericOptimizationObjectivesWithParamEditor extends JPanel impleme
|
||||
gbc.fill = GridBagConstraints.REMAINDER;
|
||||
gbc.gridx = 2;
|
||||
gbc.weightx = 1;
|
||||
bytes = loader.getBytesFromResourceLocation("resources/images/Sub24.gif", true);
|
||||
bytes = loader.getBytesFromResourceLocation("images/Sub24.gif", true);
|
||||
this.m_Delete[i] = new JButton("", new ImageIcon(Toolkit.getDefaultToolkit().createImage(bytes)));
|
||||
this.m_Delete[i].addActionListener(deleteTarget);
|
||||
this.m_TargetList.add(this.m_Delete[i], gbc);
|
||||
|
@@ -71,27 +71,27 @@ public class GenericRemoteServersEditor extends JPanel implements PropertyEditor
|
||||
this.m_ParameterPanel.add(this.m_Password, gbc);
|
||||
|
||||
JButton tmpB;
|
||||
tmpB = makeButtonWith("resources/images/Add24.gif", "add");
|
||||
tmpB = makeButtonWith("images/Add24.gif", "add");
|
||||
tmpB.addActionListener(addServer);
|
||||
setGBC(gbc, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, 1, 0, 1, 1);
|
||||
this.m_ParameterPanel.add(tmpB, gbc);
|
||||
tmpB = makeButtonWith("resources/images/Export24.gif", "Load");
|
||||
tmpB = makeButtonWith("images/Export24.gif", "Load");
|
||||
tmpB.addActionListener(loadServers);
|
||||
setGBC(gbc, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, 1, 1, 1, 1);
|
||||
this.m_ParameterPanel.add(tmpB, gbc);
|
||||
tmpB = makeButtonWith("resources/images/Import24.gif", "Save");
|
||||
tmpB = makeButtonWith("images/Import24.gif", "Save");
|
||||
tmpB.addActionListener(saveServers);
|
||||
setGBC(gbc, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, 1, 2, 1, 1);
|
||||
this.m_ParameterPanel.add(tmpB, gbc);
|
||||
tmpB = makeButtonWith("resources/images/Refresh24.gif", "Update Status");
|
||||
tmpB = makeButtonWith("images/Refresh24.gif", "Update Status");
|
||||
tmpB.addActionListener(updateServers);
|
||||
setGBC(gbc, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, 1, 3, 1, 1);
|
||||
this.m_ParameterPanel.add(tmpB, gbc);
|
||||
tmpB = makeButtonWith("resources/images/Play24.gif", "Start Server");
|
||||
tmpB = makeButtonWith("images/Play24.gif", "Start Server");
|
||||
tmpB.addActionListener(startServers);
|
||||
setGBC(gbc, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, 1, 4, 1, 1);
|
||||
this.m_ParameterPanel.add(tmpB, gbc);
|
||||
tmpB = makeButtonWith("resources/images/Stop24.gif", "Stop Server");
|
||||
tmpB = makeButtonWith("images/Stop24.gif", "Stop Server");
|
||||
tmpB.addActionListener(killServers);
|
||||
setGBC(gbc, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, 1, 5, 1, 1);
|
||||
this.m_ParameterPanel.add(tmpB, gbc);
|
||||
@@ -168,7 +168,7 @@ public class GenericRemoteServersEditor extends JPanel implements PropertyEditor
|
||||
this.m_ServerList.add(this.m_CPUs[i], gbc);
|
||||
// The delete button
|
||||
setGBC(gbc, GridBagConstraints.WEST, GridBagConstraints.REMAINDER, 3, 10);
|
||||
bytes = BasicResourceLoader.instance().getBytesFromResourceLocation("resources/images/Sub24.gif", true);
|
||||
bytes = BasicResourceLoader.instance().getBytesFromResourceLocation("images/Sub24.gif", true);
|
||||
this.m_Delete[i] = new JButton("", new ImageIcon(Toolkit.getDefaultToolkit().createImage(bytes)));
|
||||
this.m_Delete[i].addActionListener(deleteServer);
|
||||
this.m_ServerList.add(this.m_Delete[i], gbc);
|
||||
|
@@ -52,12 +52,12 @@ public class HtmlDemo {
|
||||
}
|
||||
|
||||
public boolean resourceExists() {
|
||||
URL url = ClassLoader.getSystemResource("resources/"+m_name);
|
||||
URL url = ClassLoader.getSystemResource("html/"+m_name);
|
||||
return (url != null);
|
||||
}
|
||||
|
||||
public static boolean resourceExists(String mname) {
|
||||
URL url = ClassLoader.getSystemResource("resources/"+mname);
|
||||
URL url = ClassLoader.getSystemResource("html/"+mname);
|
||||
return (url != null);
|
||||
}
|
||||
/**
|
||||
@@ -66,12 +66,12 @@ public class HtmlDemo {
|
||||
public void show() {
|
||||
try {
|
||||
URL url = null;
|
||||
url = this.getClass().getClassLoader().getSystemResource("resources/"+m_name);
|
||||
url = this.getClass().getClassLoader().getSystemResource("html/"+m_name);
|
||||
|
||||
try {
|
||||
m_html = new JEditorPane(url);
|
||||
} catch (java.io.IOException ioe) {
|
||||
url = this.getClass().getClassLoader().getSystemResource("resources/Default.html");
|
||||
url = this.getClass().getClassLoader().getSystemResource("html/Default.html");
|
||||
m_html = new JEditorPane(url);
|
||||
}
|
||||
//m_html = new JEditorPane(htmlDescription);
|
||||
|
@@ -27,7 +27,7 @@ public class JExtDesktopPaneToolBar extends JToolBar {
|
||||
setFloatable(false);
|
||||
|
||||
/* Add Buttons to tile the desktopPane */
|
||||
JButton verticalButton = ToolBoxGui.createIconifiedButton("resources/images/TileVertical16.png", "Tile vertically", false);
|
||||
JButton verticalButton = ToolBoxGui.createIconifiedButton("images/TileVertical16.png", "Tile vertically", false);
|
||||
verticalButton.addActionListener(new ActionListener() {
|
||||
|
||||
@Override
|
||||
@@ -38,7 +38,7 @@ public class JExtDesktopPaneToolBar extends JToolBar {
|
||||
});
|
||||
add(verticalButton);
|
||||
|
||||
JButton horizontalButton = ToolBoxGui.createIconifiedButton("resources/images/TileHorizontal16.png", "Tile horizontally", false);
|
||||
JButton horizontalButton = ToolBoxGui.createIconifiedButton("images/TileHorizontal16.png", "Tile horizontally", false);
|
||||
horizontalButton.addActionListener(new ActionListener() {
|
||||
|
||||
@Override
|
||||
@@ -49,7 +49,7 @@ public class JExtDesktopPaneToolBar extends JToolBar {
|
||||
});
|
||||
add(horizontalButton);
|
||||
|
||||
JButton cascadeButton = ToolBoxGui.createIconifiedButton("resources/images/Cascade16.png", "Cascade windows", false);
|
||||
JButton cascadeButton = ToolBoxGui.createIconifiedButton("images/Cascade16.png", "Cascade windows", false);
|
||||
cascadeButton.addActionListener(new ActionListener() {
|
||||
|
||||
@Override
|
||||
|
@@ -55,7 +55,7 @@ public class MOCCOChooseMOStrategy extends MOCCOPhase implements InterfaceProces
|
||||
gbc.fill = GridBagConstraints.BOTH;
|
||||
gbc.weightx = 100;
|
||||
tmpB = new JButton();
|
||||
bytes = loader.getBytesFromResourceLocation("resources/MOCCO/MOCCO_MOEA.gif", true);
|
||||
bytes = loader.getBytesFromResourceLocation("images/MOCCO/MOCCO_MOEA.gif", true);
|
||||
tmpB.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().createImage(bytes)));
|
||||
tmpB.setBackground(Color.WHITE);
|
||||
gbc.gridy = 0;
|
||||
@@ -73,7 +73,7 @@ public class MOCCOChooseMOStrategy extends MOCCOPhase implements InterfaceProces
|
||||
" objectives."), gbc);
|
||||
|
||||
tmpB = new JButton();
|
||||
bytes = loader.getBytesFromResourceLocation("resources/MOCCO/MOCCO_GDF.gif", true);
|
||||
bytes = loader.getBytesFromResourceLocation("images/MOCCO/MOCCO_GDF.gif", true);
|
||||
tmpB.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().createImage(bytes)));
|
||||
tmpB.setBackground(Color.WHITE);
|
||||
gbc.gridy = 1;
|
||||
@@ -89,7 +89,7 @@ public class MOCCOChooseMOStrategy extends MOCCOPhase implements InterfaceProces
|
||||
this.m_Mocco.m_JPanelParameters.add(tmpP, BorderLayout.CENTER);
|
||||
|
||||
tmpB = new JButton();
|
||||
bytes = loader.getBytesFromResourceLocation("resources/MOCCO/MOCCO_STEP.gif", true);
|
||||
bytes = loader.getBytesFromResourceLocation("images/MOCCO/MOCCO_STEP.gif", true);
|
||||
tmpB.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().createImage(bytes)));
|
||||
tmpB.setBackground(Color.WHITE);
|
||||
gbc.gridy = 2;
|
||||
@@ -106,7 +106,7 @@ public class MOCCOChooseMOStrategy extends MOCCOPhase implements InterfaceProces
|
||||
" into a single objectives. The individual weights are also to be given by the DM."), gbc);
|
||||
|
||||
tmpB = new JButton();
|
||||
bytes = loader.getBytesFromResourceLocation("resources/MOCCO/MOCCO_REFP.gif", true);
|
||||
bytes = loader.getBytesFromResourceLocation("images/MOCCO/MOCCO_REFP.gif", true);
|
||||
tmpB.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().createImage(bytes)));
|
||||
tmpB.setBackground(Color.WHITE);
|
||||
gbc.gridy = 3;
|
||||
@@ -123,7 +123,7 @@ public class MOCCOChooseMOStrategy extends MOCCOPhase implements InterfaceProces
|
||||
" same time."), gbc);
|
||||
|
||||
tmpB = new JButton();
|
||||
bytes = loader.getBytesFromResourceLocation("resources/MOCCO/MOCCO_TBCH.gif", true);
|
||||
bytes = loader.getBytesFromResourceLocation("images/MOCCO/MOCCO_TBCH.gif", true);
|
||||
tmpB.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().createImage(bytes)));
|
||||
tmpB.setBackground(Color.WHITE);
|
||||
gbc.gridy = 4;
|
||||
|
@@ -201,7 +201,7 @@ public class PropertyCrossoverMixerEditor extends JPanel implements PropertyEdit
|
||||
gbc.fill = GridBagConstraints.REMAINDER;
|
||||
gbc.gridx = 2;
|
||||
gbc.weightx = 1;
|
||||
bytes = loader.getBytesFromResourceLocation("resources/images/Sub24.gif", true);
|
||||
bytes = loader.getBytesFromResourceLocation("images/Sub24.gif", true);
|
||||
this.m_Delete[i] = new JButton("", new ImageIcon(Toolkit.getDefaultToolkit().createImage(bytes)));
|
||||
this.m_Delete[i].addActionListener(deleteTarget);
|
||||
this.m_TargetList.add(this.m_Delete[i], gbc);
|
||||
|
@@ -176,7 +176,7 @@ public class PropertyMutationMixerEditor extends JPanel implements PropertyEdito
|
||||
gbc.fill = GridBagConstraints.REMAINDER;
|
||||
gbc.gridx = 2;
|
||||
gbc.weightx = 1;
|
||||
bytes = loader.getBytesFromResourceLocation("resources/images/Sub24.gif", true);
|
||||
bytes = loader.getBytesFromResourceLocation("images/Sub24.gif", true);
|
||||
this.m_Delete[i] = new JButton("", new ImageIcon(Toolkit.getDefaultToolkit().createImage(bytes)));
|
||||
this.m_Delete[i].addActionListener(deleteTarget);
|
||||
this.m_TargetList.add(this.m_Delete[i], gbc);
|
||||
|
@@ -20,7 +20,7 @@ import eva2.server.go.tools.FileTools;
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
public class MetricD1ApproxParetoFront implements eva2.server.go.operators.paretofrontmetrics.InterfaceParetoFrontMetric, java.io.Serializable {
|
||||
private PropertyFilePath m_InputFilePath = PropertyFilePath.getFilePathFromResource("resources/MOPReference/T1_250.txt");
|
||||
private PropertyFilePath m_InputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt");
|
||||
private String[] m_Titles;
|
||||
private double[][] m_Reference;
|
||||
|
||||
|
@@ -23,7 +23,7 @@ public class MetricD1TrueParetoFront implements eva2.server.go.operators.paretof
|
||||
|
||||
// private String base = System.getProperty("user.dir");
|
||||
// private String FS = System.getProperty("file.separator");
|
||||
private PropertyFilePath m_InputFilePath = PropertyFilePath.getFilePathFromResource("resources/MOPReference/T1_250.txt");
|
||||
private PropertyFilePath m_InputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt");
|
||||
private String[] m_Titles;
|
||||
private double[][] m_Reference;
|
||||
|
||||
|
@@ -20,7 +20,7 @@ import java.util.ArrayList;
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
public class MetricErrorRatio implements eva2.server.go.operators.paretofrontmetrics.InterfaceParetoFrontMetric, java.io.Serializable {
|
||||
private PropertyFilePath m_InputFilePath = PropertyFilePath.getFilePathFromResource("resources/MOPReference/T1_250.txt");
|
||||
private PropertyFilePath m_InputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt");
|
||||
private double m_Epsilon = 0.0001;
|
||||
private String[] m_Titles;
|
||||
private double[][] m_Reference;
|
||||
|
@@ -19,7 +19,7 @@ import eva2.server.go.tools.FileTools;
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
public class MetricMaximumParetoFrontError implements eva2.server.go.operators.paretofrontmetrics.InterfaceParetoFrontMetric, java.io.Serializable {
|
||||
private PropertyFilePath m_InputFilePath = PropertyFilePath.getFilePathFromResource("resources/MOPReference/T1_250.txt");
|
||||
private PropertyFilePath m_InputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt");
|
||||
private String[] m_Titles;
|
||||
private double[][] m_Reference;
|
||||
|
||||
|
@@ -21,7 +21,7 @@ import eva2.server.go.tools.FileTools;
|
||||
*/
|
||||
public class MetricSWithReference implements InterfaceParetoFrontMetric, java.io.Serializable {
|
||||
private double[][] m_ObjectiveSpaceRange;
|
||||
private PropertyFilePath m_InputFilePath = PropertyFilePath.getFilePathFromResource("resources/MOPReference/T1_250.txt");
|
||||
private PropertyFilePath m_InputFilePath = PropertyFilePath.getFilePathFromResource("MOPReference/T1_250.txt");
|
||||
private String[] m_Titles;
|
||||
private double[][] m_Reference;
|
||||
private double m_ReferenceSMetric = -1;
|
||||
|
@@ -197,7 +197,7 @@ public class TF1Problem extends AbstractMultiObjectiveOptimizationProblem implem
|
||||
int points = 500;
|
||||
String base = System.getProperty("user.dir");
|
||||
String FS = System.getProperty("file.separator");
|
||||
PropertyFilePath fileOutPath = PropertyFilePath.getFilePathFromResource("resources/MOPReference"+FS+"T1_"+points+".txt");
|
||||
PropertyFilePath fileOutPath = PropertyFilePath.getFilePathFromResource("MOPReference"+FS+"T1_"+points+".txt");
|
||||
BufferedWriter writer = null;
|
||||
try {
|
||||
writer = new BufferedWriter(new FileWriter(fileOutPath.getCompleteFilePath()));
|
||||
|
@@ -649,7 +649,7 @@ public class BasicResourceLoader implements ResourceLoader
|
||||
if (slInd != -1) planBResName = resourceName.substring(slInd + 1);
|
||||
else planBResName = resourceName;
|
||||
Properties userProps = new Properties();
|
||||
File propFile = new File(File.separatorChar + "resources" + File.separatorChar + planBResName);
|
||||
File propFile = new File(File.separatorChar + planBResName);
|
||||
if (propFile.exists()) {
|
||||
try {
|
||||
userProps.load(new FileInputStream(propFile));
|
||||
|
@@ -409,7 +409,7 @@ public class ReflectPackage {
|
||||
System.out.println("1: " + cld.getResource("/eva2/server"));
|
||||
System.out.println("2: " + cld.getResource("eva2/server"));
|
||||
// BasicResourceLoader rld = BasicResourceLoader.instance();
|
||||
// byte[] b = rld.getBytesFromResourceLocation("resources/images/Sub24.gif");
|
||||
// byte[] b = rld.getBytesFromResourceLocation("images/Sub24.gif");
|
||||
// System.out.println((b == null) ? "null" : b.toString());
|
||||
// b = rld.getBytesFromResourceLocation("src/eva2/client/EvAClient.java");
|
||||
// System.out.println((b == null) ? "null" : b.toString());
|
||||
|
Reference in New Issue
Block a user