es.unex.sextante.gui.core
Interface IGUIFactory

All Known Implementing Classes:
DefaultGUIFactory

public interface IGUIFactory

a GUI factory implements method to show SEXTANTE elements, adapted to the particular framework being used, and the graphical characteristics of the application SEXTANTE is running onto.

Author:
volaya

Field Summary
static int CANCEL
           
static int OK
           
 
Method Summary
 java.util.ArrayList<java.lang.String> getCoordinatesList()
          Returns the list of predefined coordinates to be used as input for algorithms that require coordinate pairs.
 void showAdditionalResultsDialog(java.util.ArrayList components)
          Shows the additional results dialog, only if there is at least one additional result
 int showAlgorithmDialog(GeoAlgorithm alg, javax.swing.JDialog parent, java.util.ArrayList<DateAndCommand> command)
          Shows the dialog for the specified algorithm
 int showAlgorithmDialogForModeler(GeoAlgorithm algorithm, java.lang.String sName, java.lang.String sDescription, ModelAlgorithm modelAlgorithm, java.util.HashMap dataObjects, javax.swing.JDialog parent)
          Shows the dialog to add the selected algorithm to a model using the graphical modeler
 void showBatchProcessingDialog(GeoAlgorithm alg, javax.swing.JDialog parent)
          Shows the batch processing dialog for the specified algorithm
 void showBatchProcessingFromGISDialog(GeoAlgorithm alg, javax.swing.JDialog parent)
          Shows the batch processing dialog using data from the GIS interface (not from files)for the specified algorithm
 void showCommandLineDialog()
          Shows the command-line dialog
 void showDataExplorer()
          Shows the data-explorer dialog
 void showGenericInfoDialog(java.awt.Component component, java.lang.String text)
          Shows a simple dialog with the specified component as its only content
 void showHelpDialog(GeoAlgorithm algorithm)
          Shows the help manager dialog, selecting the specified algorithm as the current help item
 void showHelpDialog(java.lang.String sFile)
          Shows the help manager dialog, selecting as the current help item that with the associated filename equal to the specified filename.
 void showHelpEditionDialog(GeoAlgorithm alg)
          Shows the help editing dialog for the specified algorithm
 void showHistoryDialog()
          Shows the history dialog
 void showModelerDialog()
          Shows the modeler dialog
 void showModelerDialog(ModelAlgorithm alg)
          Opens a model and shows the modeler dialog.
 void showSettingsDialog(ToolboxPanel panel, javax.swing.JDialog parent)
          Show the settings dialog
 void showToolBoxDialog()
          Shows the SEXTANTE toolbox
 void updateHistory()
          If the history is visible, it updates its content.
 void updateToolbox()
          If the toolbox is visible, it updates its list of algorithms
 

Field Detail

OK

static final int OK
See Also:
Constant Field Values

CANCEL

static final int CANCEL
See Also:
Constant Field Values
Method Detail

showToolBoxDialog

void showToolBoxDialog()
Shows the SEXTANTE toolbox


showAlgorithmDialog

int showAlgorithmDialog(GeoAlgorithm alg,
                        javax.swing.JDialog parent,
                        java.util.ArrayList<DateAndCommand> command)
Shows the dialog for the specified algorithm

Parameters:
alg - a GeoAlgorithm
parent - the parent dialog (usually the toolbox). If null, the main frame is used
command - a list of previous commands to use instead of al the ones available in the history. If null, all commands from the history are used
Returns:
GUIFactory.OK if the user accepted the execution of the algorithm. GUIFactory.CANCEL if he canceled or the dialog was not shown due to lack of input data

showAlgorithmDialogForModeler

int showAlgorithmDialogForModeler(GeoAlgorithm algorithm,
                                  java.lang.String sName,
                                  java.lang.String sDescription,
                                  ModelAlgorithm modelAlgorithm,
                                  java.util.HashMap dataObjects,
                                  javax.swing.JDialog parent)
Shows the dialog to add the selected algorithm to a model using the graphical modeler

Parameters:
algorithm - a GeoAlgorithm
sName - the name of the algorithm
sDescription - the description of the algorithm
modelAlgorithm - the model to add the algorithm to
dataObjects - the set of data objects currently in the model
parent - the parent dialog
Returns:
GUIFactory.OK if the user accepted the addition of the algorithm. GUIFactory.CANCEL if he canceled or the dialog was not shown due to lack of input data

showSettingsDialog

void showSettingsDialog(ToolboxPanel panel,
                        javax.swing.JDialog parent)
Show the settings dialog

Parameters:
panel - The toolbox panel
parent - the parent dialog from which this method was invoked

showModelerDialog

void showModelerDialog()
Shows the modeler dialog


showModelerDialog

void showModelerDialog(ModelAlgorithm alg)
Opens a model and shows the modeler dialog.

Parameters:
alg - the model. it will be reopened from its filename, that meaning that it must have been saved before opening. If it has not been save and its filename is null, the dialog will open with no model.

showHelpEditionDialog

void showHelpEditionDialog(GeoAlgorithm alg)
Shows the help editing dialog for the specified algorithm

Parameters:
alg - the algorithm

showHelpDialog

void showHelpDialog(GeoAlgorithm algorithm)
Shows the help manager dialog, selecting the specified algorithm as the current help item

Parameters:
algorithm - the algorithm to select as the current help item

showHelpDialog

void showHelpDialog(java.lang.String sFile)
Shows the help manager dialog, selecting as the current help item that with the associated filename equal to the specified filename. Use this to show help files associated with general concepts, not algorithms

Parameters:
sFile - the help filename

showAdditionalResultsDialog

void showAdditionalResultsDialog(java.util.ArrayList components)
Shows the additional results dialog, only if there is at least one additional result

Parameters:
components - a list of components representing additional

showDataExplorer

void showDataExplorer()
Shows the data-explorer dialog


showHistoryDialog

void showHistoryDialog()
Shows the history dialog


showCommandLineDialog

void showCommandLineDialog()
Shows the command-line dialog


showGenericInfoDialog

void showGenericInfoDialog(java.awt.Component component,
                           java.lang.String text)
Shows a simple dialog with the specified component as its only content

Parameters:
component - the component to add to the dialog
text - the title of the dialog

showBatchProcessingDialog

void showBatchProcessingDialog(GeoAlgorithm alg,
                               javax.swing.JDialog parent)
Shows the batch processing dialog for the specified algorithm

Parameters:
alg - The algorithm
parent - the parent dialog (usually the toolbox)

showBatchProcessingFromGISDialog

void showBatchProcessingFromGISDialog(GeoAlgorithm alg,
                                      javax.swing.JDialog parent)
Shows the batch processing dialog using data from the GIS interface (not from files)for the specified algorithm

Parameters:
alg - The algorithm
parent - the parent dialog (usually the toolbox)

updateToolbox

void updateToolbox()
If the toolbox is visible, it updates its list of algorithms


updateHistory

void updateHistory()
If the history is visible, it updates its content. This should be called from the history component itself when an algorithm is executed from it, to update it with the results of that algorithm.


getCoordinatesList

java.util.ArrayList<java.lang.String> getCoordinatesList()
Returns the list of predefined coordinates to be used as input for algorithms that require coordinate pairs. Coordinates must be stored in the list as strings with comma-separated values (x and y)