es.unex.sextante.gui.core
Class DefaultGUIFactory

java.lang.Object
  extended by es.unex.sextante.gui.core.DefaultGUIFactory
All Implemented Interfaces:
IGUIFactory

public class DefaultGUIFactory
extends java.lang.Object
implements IGUIFactory

A default GUIFactory which shows SEXTANTE elements as model swing dialogs

Author:
volaya

Field Summary
 
Fields inherited from interface es.unex.sextante.gui.core.IGUIFactory
CANCEL, OK
 
Constructor Summary
DefaultGUIFactory()
           
 
Method Summary
 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)
          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 showCommandLineDialog()
          Shows the command-line 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 updateToolbox()
          If the toolbox is visible, it updates its list of algorithms
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultGUIFactory

public DefaultGUIFactory()
Method Detail

showToolBoxDialog

public void showToolBoxDialog()
Description copied from interface: IGUIFactory
Shows the SEXTANTE toolbox

Specified by:
showToolBoxDialog in interface IGUIFactory

showAlgorithmDialog

public int showAlgorithmDialog(GeoAlgorithm alg,
                               javax.swing.JDialog parent)
Description copied from interface: IGUIFactory
Shows the dialog for the specified algorithm

Specified by:
showAlgorithmDialog in interface IGUIFactory
Parameters:
alg - a GeoAlgorithm
parent - the parent dialog (usually the toolbox)
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

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

Specified by:
showAlgorithmDialogForModeler in interface IGUIFactory
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

public void showSettingsDialog(ToolboxPanel panel,
                               javax.swing.JDialog parent)
Description copied from interface: IGUIFactory
Show the settings dialog

Specified by:
showSettingsDialog in interface IGUIFactory
Parameters:
panel - The toolbox panel
parent - the parent dialog from which this method was invoked

showModelerDialog

public void showModelerDialog()
Description copied from interface: IGUIFactory
Shows the modeler dialog

Specified by:
showModelerDialog in interface IGUIFactory

showModelerDialog

public void showModelerDialog(ModelAlgorithm alg)
Description copied from interface: IGUIFactory
Opens a model and shows the modeler dialog.

Specified by:
showModelerDialog in interface IGUIFactory
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

public void showHelpEditionDialog(GeoAlgorithm alg)
Description copied from interface: IGUIFactory
Shows the help editing dialog for the specified algorithm

Specified by:
showHelpEditionDialog in interface IGUIFactory
Parameters:
alg - the algorithm

showHelpDialog

public void showHelpDialog(GeoAlgorithm algorithm)
Description copied from interface: IGUIFactory
Shows the help manager dialog, selecting the specified algorithm as the current help item

Specified by:
showHelpDialog in interface IGUIFactory
Parameters:
algorithm - the algorithm to select as the current help item

showHelpDialog

public void showHelpDialog(java.lang.String sFile)
Description copied from interface: IGUIFactory
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

Specified by:
showHelpDialog in interface IGUIFactory
Parameters:
sFile - the help filename

showAdditionalResultsDialog

public void showAdditionalResultsDialog(java.util.ArrayList components)
Description copied from interface: IGUIFactory
Shows the additional results dialog, only if there is at least one additional result

Specified by:
showAdditionalResultsDialog in interface IGUIFactory
Parameters:
components - a list of components representing additional

showHistoryDialog

public void showHistoryDialog()
Description copied from interface: IGUIFactory
Shows the history dialog

Specified by:
showHistoryDialog in interface IGUIFactory

showCommandLineDialog

public void showCommandLineDialog()
Description copied from interface: IGUIFactory
Shows the command-line dialog

Specified by:
showCommandLineDialog in interface IGUIFactory

showGenericInfoDialog

public void showGenericInfoDialog(java.awt.Component component,
                                  java.lang.String text)
Description copied from interface: IGUIFactory
Shows a simple dialog with the specified component as its only content

Specified by:
showGenericInfoDialog in interface IGUIFactory
Parameters:
component - the component to add to the dialog
text - the title of the dialog

showBatchProcessingDialog

public void showBatchProcessingDialog(GeoAlgorithm alg,
                                      javax.swing.JDialog parent)
Description copied from interface: IGUIFactory
Shows the batch processing dialog for the specified algorithm

Specified by:
showBatchProcessingDialog in interface IGUIFactory
Parameters:
alg - The algorithm
parent - the parent dialog (usually the toolbox)

updateToolbox

public void updateToolbox()
Description copied from interface: IGUIFactory
If the toolbox is visible, it updates its list of algorithms

Specified by:
updateToolbox in interface IGUIFactory