Package org.gvsig.app.imp
Class DefaultApplicationManager
java.lang.Object
org.gvsig.app.imp.DefaultApplicationManager
- All Implemented Interfaces:
org.gvsig.andami.ui.mdiFrame.ThreadSafeDialogs,ApplicationManager,org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager,org.gvsig.tools.util.GetItemByKey<String,,Object> org.gvsig.tools.util.PropertiesSupport
- Author:
- jmvivo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddPropertiesObserver(org.gvsig.tools.observer.Observer o) voidaddSelectableTool(org.gvsig.andami.actioninfo.ActionInfo action, String toolBarName) voidvoidclose(boolean quietly) Close the application.intconfirmDialog(String message, String title, int optionType, int messageType) intconfirmDialog(String message, String title, int optionType, int messageType, String msgid) createComponent(Class<? extends Component> theClass, Object... parameters) createComponentWithParams(Class<? extends Component> theClass, Object[] parameters) voiddeletePropertiesObserver(org.gvsig.tools.observer.Observer o) voidorg.gvsig.about.AboutManagergetAbout()Utility method to obtain the AboutManager used in the application at this moment.getActiveComponent(Class<? extends Document> documentClass) Returns the JComponent associated to the active document for the specified type of document.Returns the active document of the application or null if there is no active document.getActiveDocument(Class<? extends Document> documentClass) Returns the active document of the application that is of the requested type or null if there is no active document or the active document is not of the requested type.getActiveDocument(String documentTypeName) Returns the active document of the application that is of the requested type or null if there is no active document or the active document is not of the requested type.org.gvsig.andami.ui.mdiManager.IWindowReturn the active window, IWindow, in the application.org.gvsig.andami.ui.mdiManager.IWindowgetActiveWindow(Class<? extends Document> documentClass) org.gvsig.andami.ArgumentsReturn the arguments passed to the application in the command lineorg.gvsig.gui.ColorTablesFactoryorg.gvsig.crs.projection.lib.ProjectionObtain the projection associated by the code of projection Passed as parameter.org.gvsig.fmap.mapcontext.layers.FLayerReturn the project that is loaded and in use in the application.org.gvsig.fmap.dal.DataManagerUtility method to obtain the DataManager used in the application at this moment.org.gvsig.tools.dataTypes.DataTypesManagerorg.gvsig.tools.dispose.DisposableManagerUtility method to obtain the DisposableManager used in the application at this moment.getDocumentWindow(Document document) Returns the window associated with the document passed as parameter or null if there is no window associated with the document.org.gvsig.tools.dynobject.DynObjectManagerUtility method to obtain the DynObjectManager used in the application at this moment.org.gvsig.tools.extensionpoint.ExtensionPointManagerUtility method to obtain the ExtensionPointManager used in the application at this moment.Get the value of the system clipboard as a string.org.gvsig.fmap.geom.GeometryManagerUtility method to obtain the GeometryManager used in the application at this moment.org.gvsig.tools.swing.icontheme.IconThemeManagerUtility method to obtain the IconThemeManager used in the application at this moment.org.gvsig.andami.ui.mdiFrame.MainFrameorg.gvsig.fmap.mapcontext.MapContextManagerUtility method to obtain the MapContextManager used in the application at this moment.org.gvsig.tools.persistence.PersistenceManagerUtility method to obtain the PersistenceManager used in the application at this moment.Return the root of the nodes of preferences in the application.getPreferences(String node) Search and return the node of preferences required as nodeName.Utility method to obtain the ProjectManager used in the application at this moment.getProperty(String name) org.gvsig.andami.ui.mdiManager.MDIManagerUtility method to obtain the UIManager used in the application at this moment.Return the version of the application.inputDialog(String message, String title) inputDialog(String message, String title, int messageType, String initialValue) Utility method to create uniforms window names.voidvoidmessageDialog(String message, String[] messageArgs, String title, int messageType) voidmessageDialog(String message, String[] messageArgs, String title, int messageType, String msgid) voidmessageDialog(String message, String title, int messageType) org.gvsig.fmap.dal.DataStorepepareOpenDataSource(org.gvsig.fmap.dal.DataStore store, PrepareContext context) List<org.gvsig.fmap.dal.DataStoreParameters> prepareOpenDataStoreParameters(List<org.gvsig.fmap.dal.DataStoreParameters> storeParameters, PrepareContext context) org.gvsig.fmap.dal.DataStoreParametersprepareOpenDataStoreParameters(org.gvsig.fmap.dal.DataStoreParameters storeParameters, PrepareContext context) org.gvsig.fmap.mapcontext.layers.FLayerprepareOpenLayer(org.gvsig.fmap.mapcontext.layers.FLayer layer, PrepareContextView context) voidputInClipboard(String data) Put the string value passed as parameter in the clipboard of the system.voidrefreshDocument(org.gvsig.fmap.dal.DataStoreParameters params) voidrefreshDocument(org.gvsig.fmap.dal.feature.FeatureStore store) voidvoidregisterAddTableWizard(String name, String description, Class<? extends WizardPanel> wpClass) voidregisterColorTablesFactory(org.gvsig.gui.ColorTablesFactory factory) voidvoidvoidregisterPrepareOpenLayer(PrepareLayer action) voidsetProperty(String name, Object value) File[]showChooserDialog(String title, int type, int selectionMode, boolean multiselection, File initialPath, FileFilter filter, boolean fileHidingEnabled) showChooserDialog(String title, int type, int selectionMode, boolean multiselection, File initialPath, FileFilter filter, boolean fileHidingEnabled, boolean askCharset) File[]showChooserDialog(String title, int type, int selectionMode, boolean multiselection, File initialPath, FileFilter filter, boolean fileHidingEnabled, JComponent accesory) voidshowDialog(Component contents, String title) File[]showOpenDirectoryDialog(String title, File initialPath) File[]showOpenFileDialog(String title, File initialPath) File[]showSaveFileDialog(String title, File initialPath) voidshowTextDialog(org.gvsig.tools.swing.api.windowmanager.WindowManager.MODE mode, String title, String htmlText) voidshowTextDialog(org.gvsig.tools.swing.api.windowmanager.WindowManager.MODE mode, String title, String htmlText, HyperlinkListener hyperlinkListener)
-
Constructor Details
-
DefaultApplicationManager
public DefaultApplicationManager()
-
-
Method Details
-
pepareOpenDataSource
public org.gvsig.fmap.dal.DataStore pepareOpenDataSource(org.gvsig.fmap.dal.DataStore store, PrepareContext context) throws Exception - Specified by:
pepareOpenDataSourcein interfaceApplicationManager- Throws:
Exception
-
prepareOpenDataStoreParameters
public org.gvsig.fmap.dal.DataStoreParameters prepareOpenDataStoreParameters(org.gvsig.fmap.dal.DataStoreParameters storeParameters, PrepareContext context) throws Exception - Specified by:
prepareOpenDataStoreParametersin interfaceApplicationManager- Throws:
Exception
-
prepareOpenDataStoreParameters
public List<org.gvsig.fmap.dal.DataStoreParameters> prepareOpenDataStoreParameters(List<org.gvsig.fmap.dal.DataStoreParameters> storeParameters, PrepareContext context) throws Exception - Specified by:
prepareOpenDataStoreParametersin interfaceApplicationManager- Throws:
Exception
-
registerPrepareOpenDataStore
- Specified by:
registerPrepareOpenDataStorein interfaceApplicationManager
-
registerPrepareOpenDataStoreParameters
- Specified by:
registerPrepareOpenDataStoreParametersin interfaceApplicationManager
-
prepareOpenLayer
public org.gvsig.fmap.mapcontext.layers.FLayer prepareOpenLayer(org.gvsig.fmap.mapcontext.layers.FLayer layer, PrepareContextView context) throws Exception - Specified by:
prepareOpenLayerin interfaceApplicationManager- Throws:
Exception
-
registerPrepareOpenLayer
- Specified by:
registerPrepareOpenLayerin interfaceApplicationManager
-
registerAddTableWizard
public void registerAddTableWizard(String name, String description, Class<? extends WizardPanel> wpClass) - Specified by:
registerAddTableWizardin interfaceApplicationManager
-
getWizardPanels
- Specified by:
getWizardPanelsin interfaceApplicationManager- Throws:
Exception
-
getDataManager
public org.gvsig.fmap.dal.DataManager getDataManager()Description copied from interface:ApplicationManagerUtility method to obtain the DataManager used in the application at this moment.- Specified by:
getDataManagerin interfaceApplicationManager- Returns:
- the DataManager
-
getGeometryManager
public org.gvsig.fmap.geom.GeometryManager getGeometryManager()Description copied from interface:ApplicationManagerUtility method to obtain the GeometryManager used in the application at this moment.- Specified by:
getGeometryManagerin interfaceApplicationManager- Returns:
- the GeometryManager
-
getPersistenceManager
public org.gvsig.tools.persistence.PersistenceManager getPersistenceManager()Description copied from interface:ApplicationManagerUtility method to obtain the PersistenceManager used in the application at this moment.- Specified by:
getPersistenceManagerin interfaceApplicationManager- Returns:
- the PersistenceManager
-
getDisposableManager
public org.gvsig.tools.dispose.DisposableManager getDisposableManager()Description copied from interface:ApplicationManagerUtility method to obtain the DisposableManager used in the application at this moment.- Specified by:
getDisposableManagerin interfaceApplicationManager- Returns:
- the DisposableManager
-
getDynObjectManager
public org.gvsig.tools.dynobject.DynObjectManager getDynObjectManager()Description copied from interface:ApplicationManagerUtility method to obtain the DynObjectManager used in the application at this moment.- Specified by:
getDynObjectManagerin interfaceApplicationManager- Returns:
- the DynObjectManager
-
getExtensionPointManager
public org.gvsig.tools.extensionpoint.ExtensionPointManager getExtensionPointManager()Description copied from interface:ApplicationManagerUtility method to obtain the ExtensionPointManager used in the application at this moment.- Specified by:
getExtensionPointManagerin interfaceApplicationManager- Returns:
- the ExtensionPointManager
-
getProjectManager
Description copied from interface:ApplicationManagerUtility method to obtain the ProjectManager used in the application at this moment.- Specified by:
getProjectManagerin interfaceApplicationManager- Returns:
- the ProjectManager
-
getUIManager
public org.gvsig.andami.ui.mdiManager.MDIManager getUIManager()Description copied from interface:ApplicationManagerUtility method to obtain the UIManager used in the application at this moment.- Specified by:
getUIManagerin interfaceApplicationManager- Returns:
- the UIManager
-
getMapContextManager
public org.gvsig.fmap.mapcontext.MapContextManager getMapContextManager()Description copied from interface:ApplicationManagerUtility method to obtain the MapContextManager used in the application at this moment.- Specified by:
getMapContextManagerin interfaceApplicationManager- Returns:
- the MapContextManager
-
getDataTypesManager
public org.gvsig.tools.dataTypes.DataTypesManager getDataTypesManager()- Specified by:
getDataTypesManagerin interfaceApplicationManager
-
getCRS
Description copied from interface:ApplicationManagerObtain the projection associated by the code of projection Passed as parameter. If passed code of projection it not a valid projection code null is returned.- Specified by:
getCRSin interfaceApplicationManager- Parameters:
code- of the projection requested- Returns:
- the requested projection or null
-
getIconThemeManager
public org.gvsig.tools.swing.icontheme.IconThemeManager getIconThemeManager()Description copied from interface:ApplicationManagerUtility method to obtain the IconThemeManager used in the application at this moment.- Specified by:
getIconThemeManagerin interfaceApplicationManager- Returns:
- the IconThemeManager
-
getArguments
public org.gvsig.andami.Arguments getArguments()Description copied from interface:ApplicationManagerReturn the arguments passed to the application in the command line- Specified by:
getArgumentsin interfaceApplicationManager- Returns:
- arguments
-
getFromClipboard
Description copied from interface:ApplicationManagerGet the value of the system clipboard as a string.- Specified by:
getFromClipboardin interfaceApplicationManager- Returns:
- the clipboard value
-
putInClipboard
Description copied from interface:ApplicationManagerPut the string value passed as parameter in the clipboard of the system.- Specified by:
putInClipboardin interfaceApplicationManager- Parameters:
data- to put in the clipboard.
-
getCurrentProject
Description copied from interface:ApplicationManagerReturn the project that is loaded and in use in the application.- Specified by:
getCurrentProjectin interfaceApplicationManager- Returns:
- the project
-
getCurrentLayer
public org.gvsig.fmap.mapcontext.layers.FLayer getCurrentLayer()- Specified by:
getCurrentLayerin interfaceApplicationManager
-
getPreferences
Description copied from interface:ApplicationManagerSearch and return the node of preferences required as nodeName.- Specified by:
getPreferencesin interfaceApplicationManager- Parameters:
node- , name of the node to return- Returns:
- the preferences node requested
-
getPreferences
Description copied from interface:ApplicationManagerReturn the root of the nodes of preferences in the application.- Specified by:
getPreferencesin interfaceApplicationManager- Returns:
- the root of preferences.
-
getVersion
Description copied from interface:ApplicationManagerReturn the version of the application.- Specified by:
getVersionin interfaceApplicationManager- Returns:
- the version
-
close
public void close(boolean quietly) Description copied from interface:ApplicationManagerClose the application.- Specified by:
closein interfaceApplicationManager- Parameters:
quietly-
-
getAbout
public org.gvsig.about.AboutManager getAbout()Description copied from interface:ApplicationManagerUtility method to obtain the AboutManager used in the application at this moment.- Specified by:
getAboutin interfaceApplicationManager- Returns:
- the AboutManager
-
getColorTablesFactory
public org.gvsig.gui.ColorTablesFactory getColorTablesFactory()- Specified by:
getColorTablesFactoryin interfaceApplicationManager
-
registerColorTablesFactory
public void registerColorTablesFactory(org.gvsig.gui.ColorTablesFactory factory) - Specified by:
registerColorTablesFactoryin interfaceApplicationManager
-
getActiveWindow
public org.gvsig.andami.ui.mdiManager.IWindow getActiveWindow()Description copied from interface:ApplicationManagerReturn the active window, IWindow, in the application.- Specified by:
getActiveWindowin interfaceApplicationManager- Returns:
- the active window
-
getActiveDocument
Description copied from interface:ApplicationManagerReturns the active document of the application or null if there is no active document.- Specified by:
getActiveDocumentin interfaceApplicationManager- Returns:
- the active document
-
getActiveDocument
Description copied from interface:ApplicationManagerReturns the active document of the application that is of the requested type or null if there is no active document or the active document is not of the requested type.- Specified by:
getActiveDocumentin interfaceApplicationManager- Parameters:
documentTypeName- , type name of the document requested.- Returns:
- the active document
-
getActiveDocument
Description copied from interface:ApplicationManagerReturns the active document of the application that is of the requested type or null if there is no active document or the active document is not of the requested type.- Specified by:
getActiveDocumentin interfaceApplicationManager- Parameters:
documentClass- , class of the document requested.- Returns:
- the active document
-
getActiveWindow
public org.gvsig.andami.ui.mdiManager.IWindow getActiveWindow(Class<? extends Document> documentClass) - Specified by:
getActiveWindowin interfaceApplicationManager
-
getActiveComponent
Description copied from interface:ApplicationManagerReturns the JComponent associated to the active document for the specified type of document. If not is active the specified type of document return null.- Specified by:
getActiveComponentin interfaceApplicationManager- Parameters:
documentClass-- Returns:
- the component associated to the active document of type documentClass
-
getDocumentWindow
Description copied from interface:ApplicationManagerReturns the window associated with the document passed as parameter or null if there is no window associated with the document.- Specified by:
getDocumentWindowin interfaceApplicationManager- Parameters:
document- to search the window- Returns:
- window associated to the document
-
getLocaleLanguage
- Specified by:
getLocaleLanguagein interfaceApplicationManager
-
messageDialog
- Specified by:
messageDialogin interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
messageDialog
- Specified by:
messageDialogin interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
messageDialog
public void messageDialog(String message, String[] messageArgs, String title, int messageType, String msgid) - Specified by:
messageDialogin interfaceorg.gvsig.andami.ui.mdiFrame.ThreadSafeDialogs- Specified by:
messageDialogin interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
confirmDialog
- Specified by:
confirmDialogin interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
confirmDialog
public int confirmDialog(String message, String title, int optionType, int messageType, String msgid) - Specified by:
confirmDialogin interfaceorg.gvsig.andami.ui.mdiFrame.ThreadSafeDialogs- Specified by:
confirmDialogin interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
inputDialog
- Specified by:
inputDialogin interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
inputDialog
- Specified by:
inputDialogin interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
showDialog
- Specified by:
showDialogin interfaceorg.gvsig.andami.ui.mdiFrame.ThreadSafeDialogs
-
createComponent
- Specified by:
createComponentin interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
createComponentWithParams
public Component createComponentWithParams(Class<? extends Component> theClass, Object[] parameters) - Specified by:
createComponentWithParamsin interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
showChooserDialog
public File[] showChooserDialog(String title, int type, int selectionMode, boolean multiselection, File initialPath, FileFilter filter, boolean fileHidingEnabled) - Specified by:
showChooserDialogin interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
showChooserDialog
public org.apache.commons.lang3.tuple.ImmutablePair<File[],Charset> showChooserDialog(String title, int type, int selectionMode, boolean multiselection, File initialPath, FileFilter filter, boolean fileHidingEnabled, boolean askCharset) - Specified by:
showChooserDialogin interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
showChooserDialog
public File[] showChooserDialog(String title, int type, int selectionMode, boolean multiselection, File initialPath, FileFilter filter, boolean fileHidingEnabled, JComponent accesory) - Specified by:
showChooserDialogin interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
showOpenDirectoryDialog
- Specified by:
showOpenDirectoryDialogin interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
showOpenFileDialog
- Specified by:
showOpenFileDialogin interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
showSaveFileDialog
- Specified by:
showSaveFileDialogin interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
message
- Specified by:
messagein interfaceorg.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager
-
translate
- Specified by:
translatein interfaceApplicationManager
-
getRootComponent
- Specified by:
getRootComponentin interfaceApplicationManager
-
refreshMenusAndToolBars
public void refreshMenusAndToolBars()- Specified by:
refreshMenusAndToolBarsin interfaceApplicationManager
-
getMainFrame
public org.gvsig.andami.ui.mdiFrame.MainFrame getMainFrame()- Specified by:
getMainFramein interfaceApplicationManager
-
addMenu
- Specified by:
addMenuin interfaceApplicationManager
-
addTool
- Specified by:
addToolin interfaceApplicationManager
-
addSelectableTool
- Specified by:
addSelectableToolin interfaceApplicationManager
-
showTextDialog
public void showTextDialog(org.gvsig.tools.swing.api.windowmanager.WindowManager.MODE mode, String title, String htmlText) - Specified by:
showTextDialogin interfaceApplicationManager
-
showTextDialog
public void showTextDialog(org.gvsig.tools.swing.api.windowmanager.WindowManager.MODE mode, String title, String htmlText, HyperlinkListener hyperlinkListener) - Specified by:
showTextDialogin interfaceApplicationManager
-
createProjectLayersTreeModel
- Specified by:
createProjectLayersTreeModelin interfaceApplicationManager
-
createProjectStoresTreeModel
- Specified by:
createProjectStoresTreeModelin interfaceApplicationManager
-
getProperty
- Specified by:
getPropertyin interfaceorg.gvsig.tools.util.PropertiesSupport
-
setProperty
- Specified by:
setPropertyin interfaceorg.gvsig.tools.util.PropertiesSupport
-
getProperties
- Specified by:
getPropertiesin interfaceorg.gvsig.tools.util.PropertiesSupport
-
addPropertiesObserver
public void addPropertiesObserver(org.gvsig.tools.observer.Observer o) - Specified by:
addPropertiesObserverin interfaceApplicationManager
-
deletePropertiesObserver
public void deletePropertiesObserver(org.gvsig.tools.observer.Observer o) - Specified by:
deletePropertiesObserverin interfaceApplicationManager
-
deletePropertiesObservers
public void deletePropertiesObservers()- Specified by:
deletePropertiesObserversin interfaceApplicationManager
-
refreshDocument
public void refreshDocument(org.gvsig.fmap.dal.feature.FeatureStore store) - Specified by:
refreshDocumentin interfaceApplicationManager
-
refreshDocument
public void refreshDocument(org.gvsig.fmap.dal.DataStoreParameters params) - Specified by:
refreshDocumentin interfaceApplicationManager
-
get
-
makeTitle
Description copied from interface:ApplicationManagerUtility method to create uniforms window names.- Specified by:
makeTitlein interfaceApplicationManager- Parameters:
base-docname-docname2-- Returns:
-