|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.unex.sextante.gui.core.SextanteGUI
public class SextanteGUI
This class centralizes most actions related to the SextanteGUI, containing methods to show dialogs and retrieve basic values used by GUI elements
Field Summary | |
---|---|
static int |
COMMANDLINE
|
static int |
HISTORY
|
Fields inherited from interface es.unex.sextante.gui.core.SettingsConstants |
---|
GRASS_FOLDER, GRASS_MAPSET_FOLDER, MODELS_FOLDER, MODIFY_NAMES, RESULTS_FOLDER, SHOW_ONLY_ACTIVE, USE_INTERNAL_NAMES, WPS_ACTIVATED, WPS_URL |
Constructor Summary | |
---|---|
SextanteGUI()
|
Method Summary | |
---|---|
static java.lang.String |
getConfigPath()
Returns the config folder |
static java.lang.String |
getGrassFolder()
Returns the path where grass is installed |
static java.lang.String |
getGrassMapsetFolder()
Returns the grass mapset folder |
static IGUIFactory |
getGUIFactory()
Returns the current GUIFactory |
static java.lang.String |
getHelpPath()
Returns the path to help files |
static IInputFactory |
getInputFactory()
Returns the current input factory @see IInputFactory. |
static int |
getLastCommandOrigin()
Returns the type of the last element from which a command-line command was executed |
static javax.swing.JDialog |
getLastCommandOriginParentDialog()
Gets the dialog from which the last command--line command was executed. |
static java.awt.Frame |
getMainFrame()
Returns the current main frame |
static java.lang.String |
getModelsFolder()
Returns the models folder. |
static boolean |
getModifyResultsNames()
Returns true if names of output layers should be modified to avoid conflictive characters (), [], - .. etc |
static OutputFactory |
getOutputFactory()
Returns the current OutputFactory |
static java.lang.String |
getOutputFolder()
Returns the default folder for output data. |
static java.lang.Runnable |
getPostProcessTask(GeoAlgorithm alg)
Returns the task to post-process the algorithm outputs, usually to add them to the GUI of the GIS app. |
static boolean |
getShowOnlyActiveAlgorithms()
Returns true if only active algorithms (those that can be executed with the current data objects) should be shown in the toolbox |
static boolean |
getUseInternalNames()
Returns whether output names should be substituted by internal output names, instead of using output descriptions |
static java.util.ArrayList<java.lang.String> |
getWpsURLs()
Returns a list of URLs with WPS processes |
static void |
initialize()
Initializes the needed configuration values for the GUI |
static boolean |
isWPSActivated()
returns true is the WPS client is enabled |
static java.lang.String |
modifyResultName(java.lang.String sName)
Modifies the passed string, so it can be used as a safe data object name (without special characters) |
static void |
saveSettings()
Saves current settings to the config file |
static boolean |
setGrassFolders(java.lang.String grassFolder,
java.lang.String grassMapsetFolder)
Sets the path where grass is installed and the grass location folder. |
static void |
setGUIFactory(IGUIFactory guiFactory)
sets a new GUI factory |
static void |
setHelpPath(java.lang.String sPath)
Sets the current path to help files |
static void |
setInputFactory(IInputFactory inputFactory)
Sets a new input factory as the current one |
static void |
setIsWPSActivated(boolean isWPSActivated)
Sets whether the WPS client is enabled or not |
static void |
setLastCommandOrigin(int iLast)
Sets the type of the last element from which a command-line command was executed. |
static void |
setLastCommandOriginParentDialog(javax.swing.JDialog parent)
Sets the dialog (if any) that contains the element from which the last command--line command was executed |
static void |
setMainFrame(java.awt.Frame frame)
Sets a new main frame. |
static void |
setModelsFolder(java.lang.String sModelsFolder)
Sets the models folder |
static void |
setModifyResultsNames(boolean bModify)
Sets whether names of output layers should be modified to avoid conflictive characters |
static void |
setOutputFactory(OutputFactory outputFactory)
sets a new output factory |
static void |
setOutputFolder(java.lang.String sOutputFolder)
Sets the default folder for output data. |
static void |
setPostProcessTaskFactory(IPostProcessTaskFactory factory)
Sets the current post process task factory |
static void |
setSettings(java.util.Map values)
Sets the whole set of settings. |
static void |
setShowOnlyActiveAlgorithms(boolean showOnlyActiveAlgorithms)
Sets whether only active algorithms (those that can be executed with the current data objects) should be shown in the toolbox |
static java.util.ArrayList<java.lang.String> |
setWpsURLs(java.util.ArrayList<java.lang.String> list)
Sets a new list of WPS URLs |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int HISTORY
public static final int COMMANDLINE
Constructor Detail |
---|
public SextanteGUI()
Method Detail |
---|
public static void setMainFrame(java.awt.Frame frame)
frame
- The main framepublic static java.awt.Frame getMainFrame()
public static IInputFactory getInputFactory()
public static void setInputFactory(IInputFactory inputFactory)
inputFactory
- the new input factorypublic static OutputFactory getOutputFactory()
public static void setOutputFactory(OutputFactory outputFactory)
outputFactory
- the new output factorypublic static IGUIFactory getGUIFactory()
public static void setGUIFactory(IGUIFactory guiFactory)
guiFactory
- the new GUI factorypublic static java.lang.Runnable getPostProcessTask(GeoAlgorithm alg)
alg
- the algorithm to postprocess. Since this task will mainly deal with output
results, the algorithm should have been previously executed, so it contains
non-null output values
public static void setPostProcessTaskFactory(IPostProcessTaskFactory factory)
factory
- the new post-process task factorypublic static void initialize()
public static java.lang.String getHelpPath()
public static void setHelpPath(java.lang.String sPath)
sPath
- the path to help filespublic static void setOutputFolder(java.lang.String sOutputFolder)
sOutputFolder
- the default folder for output data.public static java.lang.String getOutputFolder()
public static java.lang.String getModelsFolder()
public static void setModelsFolder(java.lang.String sModelsFolder)
sModelsFolder
- the new model folderpublic static java.util.ArrayList<java.lang.String> setWpsURLs(java.util.ArrayList<java.lang.String> list)
list
- the list of WPS URLs
public static java.util.ArrayList<java.lang.String> getWpsURLs()
public static void saveSettings()
public static java.lang.String getConfigPath()
public static int getLastCommandOrigin()
public static void setLastCommandOrigin(int iLast)
iLast
- one of the following constants:
SextanteGUI.HISTORY if the last component was the
history panel; SextanteGUI.COMMANDLINE if it was
the regular SEXTANTE consolepublic static javax.swing.JDialog getLastCommandOriginParentDialog()
public static void setLastCommandOriginParentDialog(javax.swing.JDialog parent)
parent
- the dialog (if any) that contains the element
from which the last command--line command was executedpublic static boolean isWPSActivated()
public static void setIsWPSActivated(boolean isWPSActivated)
isWPSActivated
- true if the WPS client is enabledpublic static boolean getShowOnlyActiveAlgorithms()
public static void setShowOnlyActiveAlgorithms(boolean showOnlyActiveAlgorithms)
showOnlyActiveAlgorithms
- must be true if only active
algorithms (those that can be executed with the current data
objects) should be shown in the toolboxpublic static boolean getModifyResultsNames()
public static void setModifyResultsNames(boolean bModify)
bModify
- true if names of output layers should be modified to
avoid conflictive characterspublic static void setSettings(java.util.Map values)
values
- the map with settings values.public static java.lang.String modifyResultName(java.lang.String sName)
sName
- the name to modify
public static java.lang.String getGrassFolder()
public static boolean setGrassFolders(java.lang.String grassFolder, java.lang.String grassMapsetFolder)
grassDescriptionFolder
- the path where grass is installed
public static java.lang.String getGrassMapsetFolder()
public static boolean getUseInternalNames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |