diff --git a/lib/jh.jar b/lib/jh.jar new file mode 100644 index 00000000..94e49c50 Binary files /dev/null and b/lib/jh.jar differ diff --git a/resources/EvA2Help/EvA2Help.hs b/resources/EvA2Help/EvA2Help.hs new file mode 100644 index 00000000..21a2211d --- /dev/null +++ b/resources/EvA2Help/EvA2Help.hs @@ -0,0 +1,2 @@ + +html_index_htmlEvA2 Helpjavax.help.TOCViewTOCtoc.xmljavax.help.SearchViewSearchJavaHelpSearch \ No newline at end of file diff --git a/resources/EvA2Help/EvA2Help.jhm b/resources/EvA2Help/EvA2Help.jhm new file mode 100644 index 00000000..29c08244 --- /dev/null +++ b/resources/EvA2Help/EvA2Help.jhm @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/resources/EvA2Help/JavaHelpSearch/DOCS b/resources/EvA2Help/JavaHelpSearch/DOCS new file mode 100644 index 00000000..c05187a4 --- /dev/null +++ b/resources/EvA2Help/JavaHelpSearch/DOCS @@ -0,0 +1 @@ +´´ \ No newline at end of file diff --git a/resources/EvA2Help/JavaHelpSearch/DOCS.TAB b/resources/EvA2Help/JavaHelpSearch/DOCS.TAB new file mode 100644 index 00000000..ff4ff73c --- /dev/null +++ b/resources/EvA2Help/JavaHelpSearch/DOCS.TAB @@ -0,0 +1 @@ +e˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ôjĒĒĒĒĒĒĒĒĒĒĒĒĒĒĒĒĒĒĒĒĒĒĒĒĒĒĒĒĒǘ \ No newline at end of file diff --git a/resources/EvA2Help/JavaHelpSearch/OFFSETS b/resources/EvA2Help/JavaHelpSearch/OFFSETS new file mode 100644 index 00000000..d8b5f0e0 --- /dev/null +++ b/resources/EvA2Help/JavaHelpSearch/OFFSETS @@ -0,0 +1 @@ +„ū`€2Öūū@ \ No newline at end of file diff --git a/resources/EvA2Help/JavaHelpSearch/POSITIONS b/resources/EvA2Help/JavaHelpSearch/POSITIONS new file mode 100644 index 00000000..05c1ffc8 Binary files /dev/null and b/resources/EvA2Help/JavaHelpSearch/POSITIONS differ diff --git a/resources/EvA2Help/JavaHelpSearch/SCHEMA b/resources/EvA2Help/JavaHelpSearch/SCHEMA new file mode 100644 index 00000000..3ebc48e6 --- /dev/null +++ b/resources/EvA2Help/JavaHelpSearch/SCHEMA @@ -0,0 +1,2 @@ +JavaSearch 1.0 +TMAP bs=2048 rt=0 fl=-1 id1=128 id2=1 diff --git a/resources/EvA2Help/JavaHelpSearch/TMAP b/resources/EvA2Help/JavaHelpSearch/TMAP new file mode 100644 index 00000000..34198653 Binary files /dev/null and b/resources/EvA2Help/JavaHelpSearch/TMAP differ diff --git a/resources/EvA2Help/html/ide-basics/keyboard-shortcuts/about-shortcuts.html b/resources/EvA2Help/html/ide-basics/keyboard-shortcuts/about-shortcuts.html new file mode 100644 index 00000000..e69de29b diff --git a/resources/EvA2Help/html/ide-basics/keyboard-shortcuts/menu-shortcuts.html b/resources/EvA2Help/html/ide-basics/keyboard-shortcuts/menu-shortcuts.html new file mode 100644 index 00000000..b478bb93 --- /dev/null +++ b/resources/EvA2Help/html/ide-basics/keyboard-shortcuts/menu-shortcuts.html @@ -0,0 +1,69 @@ + + + + +

Menu Shortcuts

+

There are keyboard shortcuts available to activate the following menu commands and other general commands:

+ + + +

Options menu

+ + + + + + + + + + + + + + + + +
KeysCommandAction
CTRL+PPreferencesOpens the preferences dialog
CTRL+QQuitExits the application
+ +

Windows menu

+ + + + + + + + + + + + + + + + + + + + + +
KeysCommandAction
CTRL+MCascade WindowsCascades the visible internal windows
CTRL+,Tile verticallyTile the visible internal windows vertically
CTRL+.Tile horizontallyTile the visible internal windows horizontally
+ +

Help menu

+ + + + + + + + + + + +
KeysCommandAction
F1HelpOpens the help contents
+ + diff --git a/resources/EvA2Help/html/ide-basics/keyboard-shortcuts/window-shortcuts.html b/resources/EvA2Help/html/ide-basics/keyboard-shortcuts/window-shortcuts.html new file mode 100644 index 00000000..e69de29b diff --git a/resources/EvA2Help/html/index.html b/resources/EvA2Help/html/index.html new file mode 100644 index 00000000..978acdec --- /dev/null +++ b/resources/EvA2Help/html/index.html @@ -0,0 +1,11 @@ + + + +

EvA2 Help

+

EvA2 (an Evolutionary Algorithms framework, revised version 2) is a comprehensive heuristic optimization framework with emphasis on Evolutionary Algorithms implemented in Java. It is a revised version of the JavaEvA optimization toolbox, which has been developed as a resumption of the former EvA software package. +EvA2 integrates several derivation free optimization methods, preferably population based, such as Evolution Strategies (ES), Genetic Algorithms (GA), Differential Evolution (DE), Particle Swarm Optimization (PSO), as well as classical techniques such as multi-start Hill Climbing or Simulated Annealing. Besides typical single-objective problems, multi-modal and multi-objective problem are handled directly by the EvA2 framework. Via the Java mechanism of Remote Method Invocation (RMI), the algorithms of EvA2 can be distributed over network nodes based on a client-server architecture.

+ +

EvA2 aims at two groups of users. Firstly, the end user who does not know much about the theory of Evolutionary Algorithms, but wants to use Evolutionary Algorithms to solve an application problem. Secondly, the scientific user who wants to investigate the performance of different optimization algorithms or wants to compare the effect of alternative or specialized evolutionary or heuristic operators. The latter usually knows more about evolutionary algorithms or heuristic optimization and is able to extend EvA2 by adding specific optimization strategies or solution representations.

+ +

EvA2 is being used as teaching aid in lecture tutorials, as a developing platform in student research projects and applied to numerous optimisation problems within active research and ongoing industrial cooperations.

+ diff --git a/resources/EvA2Help/toc.xml b/resources/EvA2Help/toc.xml new file mode 100644 index 00000000..94208d81 --- /dev/null +++ b/resources/EvA2Help/toc.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/eva2/client/EvAClient.java b/src/eva2/client/EvAClient.java index e205584e..f41075bd 100644 --- a/src/eva2/client/EvAClient.java +++ b/src/eva2/client/EvAClient.java @@ -36,6 +36,7 @@ import java.util.List; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; +import javax.help.*; import javax.swing.*; import javax.swing.border.TitledBorder; @@ -68,6 +69,7 @@ public class EvAClient implements RemoteStateListener { private transient JProgressBar progressBar; // Option + private ExtAction actPreferences; private ExtAction actQuit; // LogPanel @@ -84,7 +86,8 @@ public class EvAClient implements RemoteStateListener { private ExtAction actKillAllHosts; private ModuleAdapter currentModuleAdapter = null; - // About: + // Help: + private ExtAction actHelp; private ExtAction actAbout; private ExtAction actLicense; @@ -721,8 +724,7 @@ public class EvAClient implements RemoteStateListener { } }; - actAbout = new ExtAction("&About", "Product Information", - KeyStroke.getKeyStroke(KeyEvent.VK_A, Event.CTRL_MASK)) { + actAbout = new ExtAction("&About", "Product Information") { @Override public void actionPerformed(final ActionEvent event) { @@ -730,8 +732,7 @@ public class EvAClient implements RemoteStateListener { showAboutDialog(); } }; - actLicense = new ExtAction("&License", "View License", - KeyStroke.getKeyStroke(KeyEvent.VK_L, Event.CTRL_MASK)) { + actLicense = new ExtAction("&License", "View License") { @Override public void actionPerformed(final ActionEvent event) { @@ -802,6 +803,42 @@ public class EvAClient implements RemoteStateListener { EvAClient.this.close(); } }; + + actPreferences = new ExtAction("&Preferences", "Show preferences dialog", + KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.CTRL_MASK)) { + + @Override + public void actionPerformed(final ActionEvent event) { + // ToDo + } + }; + + actHelp = new ExtAction("&Help", "Show help contents", + KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)) { + + @Override + public void actionPerformed(final ActionEvent event) { + // ToDo + String helpHS = "resources/EvA2Help/EvA2Help.hs"; + ClassLoader cl = EvAClient.class.getClassLoader(); + JHelpContentViewer helpPane; + try { + URL hsURL = HelpSet.findHelpSet(cl, helpHS); + HelpSet helpSet = new HelpSet(null, hsURL); + // Trigger the help viewer: + helpPane = new JHelpContentViewer(helpSet); + JHelpNavigator helpNavigator = (JHelpNavigator) helpSet.getNavigatorView("TOC").createNavigator(helpPane.getModel()); + JEFrame helpFrame = new JEFrame("Help contents"); + JSplitPane helpSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, helpNavigator, helpPane); + helpFrame.add(helpSplit); + helpFrame.setVisible(true); + helpFrame.setMaximum(true); + } catch (Exception ee) { + // Say what the exception really is + LOGGER.log(Level.WARNING, "Could not open application help", ee); + } + } + }; } /** @@ -822,11 +859,15 @@ public class EvAClient implements RemoteStateListener { menuSelHosts.add(actKillAllHosts); menuHelp = new JExtMenu("&Help"); + menuHelp.add(actHelp); + menuHelp.addSeparator(); menuHelp.add(actAbout); menuHelp.add(actLicense); menuOptions = new JExtMenu("&Options"); + menuOptions.add(actPreferences); menuOptions.add(menuSelHosts); + menuOptions.addSeparator(); menuOptions.add(actQuit); // this is accessible if no default module is given if (showLoadModules) { @@ -1078,7 +1119,7 @@ public class EvAClient implements RemoteStateListener { if (hostNames == null || hostNames.length == 0) { showNoHostFoundDialog(); } else { - String hostName = (String) JOptionPane.showInputDialog(configurationPane, + String hostName = (String) JOptionPane.showInputDialog(mainFrame, "Which active host do you want to connect to?", "Host", JOptionPane.QUESTION_MESSAGE, null, hostNames, comAdapter.getHostName()); if (hostName != null) { @@ -1115,7 +1156,7 @@ public class EvAClient implements RemoteStateListener { } private void showNoHostFoundDialog() { - JOptionPane.showMessageDialog(configurationPane, "No host with running EVASERVER found. Please start one or \nadd the correct address to the properties list.", EvAInfo.infoTitle, 1); + JOptionPane.showMessageDialog(mainFrame, "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) { @@ -1123,7 +1164,7 @@ public class EvAClient implements RemoteStateListener { showNoHostFoundDialog(); return; } - String HostName = (String) JOptionPane.showInputDialog(configurationPane, + String HostName = (String) JOptionPane.showInputDialog(mainFrame, "Which server do you want to be killed ?", "Host", JOptionPane.QUESTION_MESSAGE, null, HostNames, comAdapter.getHostName()); if (HostName == null) { @@ -1131,7 +1172,6 @@ public class EvAClient implements RemoteStateListener { } LOGGER.info("Kill host process on = " + HostName); comAdapter.killServer(HostName); -// m_LogPanel.statusMessage(""); } private void selectAllAvailableHostToKill(String[] hostNames) { diff --git a/src/eva2/gui/JExtDesktopPane.java b/src/eva2/gui/JExtDesktopPane.java index 8ea2be3e..6ff84ff2 100644 --- a/src/eva2/gui/JExtDesktopPane.java +++ b/src/eva2/gui/JExtDesktopPane.java @@ -56,7 +56,8 @@ public class JExtDesktopPane extends JDesktopPane { } }; - windowMenu.add(actWindowTileVert = new ExtAction("Tile &Vertically", "Tiles all windows vertically") { + windowMenu.add(actWindowTileVert = new ExtAction("Tile &Vertically", "Tiles all windows vertically", + KeyStroke.getKeyStroke(KeyEvent.VK_COMMA, Event.CTRL_MASK)) { @Override public void actionPerformed(final ActionEvent event) { @@ -64,7 +65,8 @@ public class JExtDesktopPane extends JDesktopPane { } }); - windowMenu.add(actWindowTileHorz = new ExtAction("Tile &Horizontally", "Tiles all windows horizontically") { + windowMenu.add(actWindowTileHorz = new ExtAction("Tile &Horizontally", "Tiles all windows horizontically", + KeyStroke.getKeyStroke(KeyEvent.VK_PERIOD, Event.CTRL_MASK)) { @Override public void actionPerformed(final ActionEvent event) { @@ -72,7 +74,8 @@ public class JExtDesktopPane extends JDesktopPane { } }); - windowMenu.add(actWindowOverlap = new ExtAction("&Cascade Windows", "Cascades all visible windows") { + windowMenu.add(actWindowOverlap = new ExtAction("&Cascade Windows", "Cascades all visible windows", + KeyStroke.getKeyStroke(KeyEvent.VK_M, Event.CTRL_MASK)) { @Override public void actionPerformed(final ActionEvent event) {