From 2b571f08d091dc062cedbb9816c29dcf0cbd4f12 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Thu, 22 May 2014 07:44:52 +0100 Subject: Final commit, will release later today. --- doc/jcgp/gui/GUI.html | 195 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 170 insertions(+), 25 deletions(-) (limited to 'doc/jcgp/gui/GUI.html') diff --git a/doc/jcgp/gui/GUI.html b/doc/jcgp/gui/GUI.html index 73bbe2a..c8274c9 100644 --- a/doc/jcgp/gui/GUI.html +++ b/doc/jcgp/gui/GUI.html @@ -2,9 +2,9 @@ - + GUI - + @@ -124,7 +124,17 @@ extends javafx.application.Application The user interface is divided into 3 main components: the node grid (PopulationPane), the control pane (SettingsPane) and the console (ConsolePane). Click on any of the links in - brackets to see more information about each interface component. + brackets to see more information about each interface component. +

+ This class also contains the instance of JCGP responsible for + running the experiments in GUI mode. JCGP's execution must be delegated + to a separate thread so that the GUI remains unblocked. This is done using + a JavaFX Service which calls nextGeneration() in a loop + until it is interrupted by the main JavaFX thread. +
+ This service also handles flushing the console in a thread safe way. This + is done by synchronizing the nextGeneration() and flush() + method calls on a lock object.
Author:
Eduardo Pedroni
@@ -164,43 +174,66 @@ extends javafx.application.Application static java.lang.String -BAD_SELECTION_COLOUR  +BAD_SELECTION_COLOUR +
A string containing the hexadecimal colour used for representing a bad selection.
+ static double -CONSOLE_MIN_HEIGHT  +CONSOLE_MIN_HEIGHT +
The minimum width of the console pane, to prevent it + from being resized beyond visibility.
+ static java.lang.String -GOOD_SELECTION_COLOUR  +GOOD_SELECTION_COLOUR +
A string containing the hexadecimal colour used for representing a good selection.
+ static java.lang.String -HARD_HIGHLIGHT_COLOUR  +HARD_HIGHLIGHT_COLOUR +
A string containing the hexadecimal colour used for representing a hard highlight.
+ static java.lang.String -MEDIUM_HIGHLIGHT_COLOUR  +MEDIUM_HIGHLIGHT_COLOUR +
A string containing the hexadecimal colour used for a medium highlight.
+ static java.lang.String -NEUTRAL_COLOUR  +NEUTRAL_COLOUR +
A string containing the hexadecimal colour used for representing neutrality.
+ static java.lang.String -NEUTRAL_SELECTION_COLOUR  +NEUTRAL_SELECTION_COLOUR +
A string containing the hexadecimal colour used for representing a neutral selection.
+ static double -RESIZE_MARGIN  +RESIZE_MARGIN +
The width or height of the area that can be clicked on + to drag-resize a pane.
+ static double -SETTINGS_MIN_WIDTH  +SETTINGS_MIN_WIDTH +
The minimum width of the settings pane, to prevent it + from being resized beyond visibility.
+ static java.lang.String -SOFT_HIGHLIGHT_COLOUR  +SOFT_HIGHLIGHT_COLOUR +
A string containing the hexadecimal colour used for a soft highlight.
+ @@ -522,6 +610,11 @@ extends javafx.application.Application
  • runPause

    public void runPause()
    +
    Run/pause method. + Run the experiment if it is paused, or pause it if it is running. +
    + This method is the callback used by the run/pause button. It + controls the jcgp service.
  • @@ -531,6 +624,11 @@ extends javafx.application.Application
  • step

    public void step()
    +
    Perform a single generation using nextGeneration(). +
    + On top of that, this method performs all of the housekeeping + that is normally done before and after running, such as + refreshing the chromosome panes.
  • @@ -540,6 +638,9 @@ extends javafx.application.Application
  • reset

    public void reset()
    +
    Reset button callback. If the parameters are valid, + this resets the entire experiment by calling reset() + on jcgp.
  • @@ -549,6 +650,8 @@ extends javafx.application.Application
  • reDraw

    public void reDraw()
    +
    Does a complete GUI refresh. + This is potentially lengthy, so use with care.
  • @@ -558,6 +661,7 @@ extends javafx.application.Application
  • updateFunctionSelector

    public void updateFunctionSelector()
    +
    Refresh the function selector, used when functions are enabled or disabled.
  • @@ -567,6 +671,10 @@ extends javafx.application.Application
  • isWorking

    public boolean isWorking()
    +
    +
    Returns:
    +
    true if jcgp is evolving.
    +
  • @@ -577,6 +685,13 @@ extends javafx.application.Application

    bringFunctionSelector

    public void bringFunctionSelector(javafx.scene.input.MouseEvent event,
                                       GUINode node)
    +
    Relocate the function selector to the right position + relative to the specified node and set it visible.
    +
    +
    Parameters:
    +
    event - the mouse event containing cursor coordinates.
    +
    node - the node whose function should be changed.
    +
    @@ -586,6 +701,10 @@ extends javafx.application.Application
  • getExperiment

    public JCGP getExperiment()
    +
    +
    Returns:
    +
    a reference to the JCGP experiment.
    +
  • @@ -595,6 +714,13 @@ extends javafx.application.Application
  • evaluateTestCase

    public void evaluateTestCase(TestCaseProblem.TestCase<java.lang.Object> testCase)
    +
    Starts the evaluation process with the given test case. + It does so by calling evaluateTestCase() on + the population pane.
    +
    +
    Parameters:
    +
    testCase - the test case to evaluate.
    +
  • @@ -604,6 +730,8 @@ extends javafx.application.Application
  • hideGeneValues

    public void hideGeneValues()
    +
    Hide all evaluated values. This should be called when + evaluations are no longer being performed.
  • @@ -613,6 +741,14 @@ extends javafx.application.Application
  • setEvaluating

    public void setEvaluating(boolean value)
    +
    Set the system into evaluation mode. + When in evaluation mode, the population pane + refreshes the node values whenever connection + changes happen.
    +
    +
    Parameters:
    +
    value - true if evaluations are happening, false otherwise.
    +
  • @@ -622,6 +758,10 @@ extends javafx.application.Application
  • getStage

    public javafx.stage.Stage getStage()
    +
    +
    Returns:
    +
    a reference to the GUI stage.
    +
  • @@ -631,6 +771,7 @@ extends javafx.application.Application
  • flushConsole

    public void flushConsole()
    +
    Writes all buffered content out to the GUI console.
  • @@ -640,6 +781,10 @@ extends javafx.application.Application
  • getChromosomeIndex

    public int getChromosomeIndex()
    +
    +
    Returns:
    +
    the index of the chromosome currently being looked at.
    +
  • -- cgit v1.2.3