public class DefaultApplicationManager extends java.lang.Object implements ApplicationManager
| Constructor and Description |
|---|
DefaultApplicationManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMenu(ActionInfo action,
java.lang.String text) |
void |
addPropertiesObserver(Observer o) |
void |
addSelectableTool(ActionInfo action,
java.lang.String toolBarName) |
void |
addTool(ActionInfo action,
java.lang.String toolBarName) |
void |
close(boolean quietly)
Close the application.
|
int |
confirmDialog(java.lang.String message,
java.lang.String title,
int optionType,
int messageType)
Show a JOptionPane confirm dialog.
|
int |
confirmDialog(java.lang.String message,
java.lang.String title,
int optionType,
int messageType,
java.lang.String msgid) |
java.awt.Component |
createComponent(java.lang.Class<? extends java.awt.Component> theClass,
java.lang.Object... parameters)
Creates an return a new instance of the component specified
This method ensure that the component is created in the event dispatch thread of swing.
|
java.awt.Component |
createComponentWithParams(java.lang.Class<? extends java.awt.Component> theClass,
java.lang.Object[] parameters)
Creates an return a new instance of the component specified
This method ensure that the component is created in the event dispatch thread of swing.
|
javax.swing.tree.TreeModel |
createProjectLayersTreeModel() |
javax.swing.tree.TreeModel |
createProjectStoresTreeModel() |
void |
deletePropertiesObserver(Observer o) |
void |
deletePropertiesObservers() |
java.lang.Object |
get(java.lang.String key) |
AboutManager |
getAbout()
Utility method to obtain the AboutManager used in the application at this moment.
|
javax.swing.JComponent |
getActiveComponent(java.lang.Class<? extends Document> documentClass)
Returns the JComponent associated to the active document for the
specified type of document.
|
Document |
getActiveDocument()
Returns the active document of the application or null
if there is no active document.
|
Document |
getActiveDocument(java.lang.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.
|
Document |
getActiveDocument(java.lang.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.
|
IWindow |
getActiveWindow()
Return the active window, IWindow, in the application.
|
IWindow |
getActiveWindow(java.lang.Class<? extends Document> documentClass) |
Arguments |
getArguments()
Return the arguments passed to the application in the command line
|
ColorTablesFactory |
getColorTablesFactory() |
IProjection |
getCRS(java.lang.String code)
Obtain the projection associated by the code of projection
Passed as parameter.
|
FLayer |
getCurrentLayer() |
Project |
getCurrentProject()
Return the project that is loaded and in use in the application.
|
DataManager |
getDataManager()
Utility method to obtain the DataManager used in the application at this moment.
|
DataTypesManager |
getDataTypesManager() |
DisposableManager |
getDisposableManager()
Utility method to obtain the DisposableManager used in the application at this moment.
|
IDocumentWindow |
getDocumentWindow(Document document)
Returns the window associated with the document passed as
parameter or null if there is no window associated with
the document.
|
DynObjectManager |
getDynObjectManager()
Utility method to obtain the DynObjectManager used in the application at this moment.
|
ExtensionPointManager |
getExtensionPointManager()
Utility method to obtain the ExtensionPointManager used in the application at this moment.
|
java.lang.String |
getFromClipboard()
Get the value of the system clipboard as a string.
|
GeometryManager |
getGeometryManager()
Utility method to obtain the GeometryManager used in the application at this moment.
|
IconThemeManager |
getIconThemeManager()
Utility method to obtain the IconThemeManager used in the application at this moment.
|
java.lang.String |
getLocaleLanguage() |
MainFrame |
getMainFrame() |
MapContextManager |
getMapContextManager()
Utility method to obtain the MapContextManager used in the application at this moment.
|
PersistenceManager |
getPersistenceManager()
Utility method to obtain the PersistenceManager used in the application at this moment.
|
PreferencesNode |
getPreferences()
Return the root of the nodes of preferences in the application.
|
PreferencesNode |
getPreferences(java.lang.String node)
Search and return the node of preferences required as nodeName.
|
ProjectManager |
getProjectManager()
Utility method to obtain the ProjectManager used in the application at this moment.
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
java.lang.Object |
getProperty(java.lang.String name) |
java.awt.Component |
getRootComponent() |
MDIManager |
getUIManager()
Utility method to obtain the UIManager used in the application at this moment.
|
Version |
getVersion()
Return the version of the application.
|
java.util.List<WizardPanel> |
getWizardPanels() |
java.lang.String |
inputDialog(java.lang.String message,
java.lang.String title)
Show a JOptionPane input dialog.
|
java.lang.String |
inputDialog(java.lang.String message,
java.lang.String title,
int messageType,
java.lang.String initialValue)
Show a JOptionPane input dialog.
|
java.lang.String |
makeTitle(java.lang.String base,
java.lang.String docname,
java.lang.String docname2)
Utility method to create uniforms window names.
|
void |
message(java.lang.String message,
int message_type)
Show a non intrusibe message to the user.
|
void |
messageDialog(java.lang.String message,
java.lang.String[] messageArgs,
java.lang.String title,
int messageType)
Create a message dialog with ok button.
|
void |
messageDialog(java.lang.String message,
java.lang.String[] messageArgs,
java.lang.String title,
int messageType,
java.lang.String msgid) |
void |
messageDialog(java.lang.String message,
java.lang.String title,
int messageType)
Create a message dialog with an ok button.
|
DataStore |
pepareOpenDataSource(DataStore store,
PrepareContext context) |
DataStoreParameters |
prepareOpenDataStoreParameters(DataStoreParameters storeParameters,
PrepareContext context) |
java.util.List<DataStoreParameters> |
prepareOpenDataStoreParameters(java.util.List<DataStoreParameters> storeParameters,
PrepareContext context) |
FLayer |
prepareOpenLayer(FLayer layer,
PrepareContextView context) |
void |
putInClipboard(java.lang.String data)
Put the string value passed as parameter in the clipboard of
the system.
|
void |
refreshDocument(DataStoreParameters params) |
void |
refreshDocument(FeatureStore store) |
void |
refreshMenusAndToolBars() |
void |
registerAddTableWizard(java.lang.String name,
java.lang.String description,
java.lang.Class<? extends WizardPanel> wpClass) |
void |
registerColorTablesFactory(ColorTablesFactory factory) |
void |
registerPrepareOpenDataStore(PrepareDataStore action) |
void |
registerPrepareOpenDataStoreParameters(PrepareDataStoreParameters action) |
void |
registerPrepareOpenLayer(PrepareLayer action) |
void |
setProperty(java.lang.String name,
java.lang.Object value) |
java.io.File[] |
showChooserDialog(java.lang.String title,
int type,
int selectionMode,
boolean multiselection,
java.io.File initialPath,
javax.swing.filechooser.FileFilter filter,
boolean fileHidingEnabled)
Creates and show a JFileChooser dialog.
|
<any> |
showChooserDialog(java.lang.String title,
int type,
int selectionMode,
boolean multiselection,
java.io.File initialPath,
javax.swing.filechooser.FileFilter filter,
boolean fileHidingEnabled,
boolean askCharset)
Creates and show a JFileChooser dialog.This method return an array whit the selected files.
|
java.io.File[] |
showChooserDialog(java.lang.String title,
int type,
int selectionMode,
boolean multiselection,
java.io.File initialPath,
javax.swing.filechooser.FileFilter filter,
boolean fileHidingEnabled,
javax.swing.JComponent accesory) |
void |
showDialog(java.awt.Component contents,
java.lang.String title)
Create a window with the contents and title specified as parameters
and show as a dialog windows of gvSIG.
|
java.io.File[] |
showOpenDirectoryDialog(java.lang.String title,
java.io.File initialPath)
Creates and show a JFileChooser dialog for folder selection.
|
java.io.File[] |
showOpenFileDialog(java.lang.String title,
java.io.File initialPath)
Creates and show a JFileChooser dialog for selection a file for open.
|
java.io.File[] |
showSaveFileDialog(java.lang.String title,
java.io.File initialPath)
Creates and show a JFileChooser dialog for selection a file for save.
|
void |
showTextDialog(WindowManager.MODE mode,
java.lang.String title,
java.lang.String htmlText) |
void |
showTextDialog(WindowManager.MODE mode,
java.lang.String title,
java.lang.String htmlText,
javax.swing.event.HyperlinkListener hyperlinkListener) |
java.lang.String |
translate(java.lang.String message,
java.lang.String... args) |
public DataStore pepareOpenDataSource(DataStore store, PrepareContext context) throws java.lang.Exception
pepareOpenDataSource in interface ApplicationManagerjava.lang.Exceptionpublic DataStoreParameters prepareOpenDataStoreParameters(DataStoreParameters storeParameters, PrepareContext context) throws java.lang.Exception
prepareOpenDataStoreParameters in interface ApplicationManagerjava.lang.Exceptionpublic java.util.List<DataStoreParameters> prepareOpenDataStoreParameters(java.util.List<DataStoreParameters> storeParameters, PrepareContext context) throws java.lang.Exception
prepareOpenDataStoreParameters in interface ApplicationManagerjava.lang.Exceptionpublic void registerPrepareOpenDataStore(PrepareDataStore action)
registerPrepareOpenDataStore in interface ApplicationManagerpublic void registerPrepareOpenDataStoreParameters(PrepareDataStoreParameters action)
registerPrepareOpenDataStoreParameters in interface ApplicationManagerpublic FLayer prepareOpenLayer(FLayer layer, PrepareContextView context) throws java.lang.Exception
prepareOpenLayer in interface ApplicationManagerjava.lang.Exceptionpublic void registerPrepareOpenLayer(PrepareLayer action)
registerPrepareOpenLayer in interface ApplicationManagerpublic void registerAddTableWizard(java.lang.String name,
java.lang.String description,
java.lang.Class<? extends WizardPanel> wpClass)
registerAddTableWizard in interface ApplicationManagerpublic java.util.List<WizardPanel> getWizardPanels() throws java.lang.Exception
getWizardPanels in interface ApplicationManagerjava.lang.Exceptionpublic DataManager getDataManager()
ApplicationManagergetDataManager in interface ApplicationManagerpublic GeometryManager getGeometryManager()
ApplicationManagergetGeometryManager in interface ApplicationManagerpublic PersistenceManager getPersistenceManager()
ApplicationManagergetPersistenceManager in interface ApplicationManagerpublic DisposableManager getDisposableManager()
ApplicationManagergetDisposableManager in interface ApplicationManagerpublic DynObjectManager getDynObjectManager()
ApplicationManagergetDynObjectManager in interface ApplicationManagerpublic ExtensionPointManager getExtensionPointManager()
ApplicationManagergetExtensionPointManager in interface ApplicationManagerpublic ProjectManager getProjectManager()
ApplicationManagergetProjectManager in interface ApplicationManagerpublic MDIManager getUIManager()
ApplicationManagergetUIManager in interface ApplicationManagerpublic MapContextManager getMapContextManager()
ApplicationManagergetMapContextManager in interface ApplicationManagerpublic DataTypesManager getDataTypesManager()
getDataTypesManager in interface ApplicationManagerpublic IProjection getCRS(java.lang.String code)
ApplicationManagergetCRS in interface ApplicationManagercode - of the projection requestedpublic IconThemeManager getIconThemeManager()
ApplicationManagergetIconThemeManager in interface ApplicationManagerpublic Arguments getArguments()
ApplicationManagergetArguments in interface ApplicationManagerpublic java.lang.String getFromClipboard()
ApplicationManagergetFromClipboard in interface ApplicationManagerpublic void putInClipboard(java.lang.String data)
ApplicationManagerputInClipboard in interface ApplicationManagerdata - to put in the clipboard.public Project getCurrentProject()
ApplicationManagergetCurrentProject in interface ApplicationManagerpublic FLayer getCurrentLayer()
getCurrentLayer in interface ApplicationManagerpublic PreferencesNode getPreferences(java.lang.String node)
ApplicationManagergetPreferences in interface ApplicationManagerpublic PreferencesNode getPreferences()
ApplicationManagergetPreferences in interface ApplicationManagerpublic Version getVersion()
ApplicationManagergetVersion in interface ApplicationManagerpublic void close(boolean quietly)
ApplicationManagerclose in interface ApplicationManagerpublic AboutManager getAbout()
ApplicationManagergetAbout in interface ApplicationManagerpublic ColorTablesFactory getColorTablesFactory()
getColorTablesFactory in interface ApplicationManagerpublic void registerColorTablesFactory(ColorTablesFactory factory)
registerColorTablesFactory in interface ApplicationManagerpublic IWindow getActiveWindow()
ApplicationManagergetActiveWindow in interface ApplicationManagerpublic Document getActiveDocument()
ApplicationManagergetActiveDocument in interface ApplicationManagerpublic Document getActiveDocument(java.lang.String documentTypeName)
ApplicationManagergetActiveDocument in interface ApplicationManagerpublic Document getActiveDocument(java.lang.Class<? extends Document> documentClass)
ApplicationManagergetActiveDocument in interface ApplicationManagerpublic IWindow getActiveWindow(java.lang.Class<? extends Document> documentClass)
getActiveWindow in interface ApplicationManagerpublic javax.swing.JComponent getActiveComponent(java.lang.Class<? extends Document> documentClass)
ApplicationManagergetActiveComponent in interface ApplicationManagerpublic IDocumentWindow getDocumentWindow(Document document)
ApplicationManagergetDocumentWindow in interface ApplicationManagerdocument - to search the windowpublic java.lang.String getLocaleLanguage()
getLocaleLanguage in interface ApplicationManagerpublic void messageDialog(java.lang.String message,
java.lang.String title,
int messageType)
ThreadSafeDialogsManagermessageDialog in interface ThreadSafeDialogsManagermessage - to present in the dialogtitle - title of the dialogmessageType - type of icon to use.JOptionPane.showMessageDialog(Component, Object, String, int)public void messageDialog(java.lang.String message,
java.lang.String[] messageArgs,
java.lang.String title,
int messageType)
ThreadSafeDialogsManagermessageDialog in interface ThreadSafeDialogsManagermessage - to present in the dialogmessageArgs - string array of arguments used to format the messagetitle - title of the dialogmessageType - type of icon to use.JOptionPane.showMessageDialog(Component, Object, String, int)public void messageDialog(java.lang.String message,
java.lang.String[] messageArgs,
java.lang.String title,
int messageType,
java.lang.String msgid)
messageDialog in interface ThreadSafeDialogsmessageDialog in interface ThreadSafeDialogsManagerpublic int confirmDialog(java.lang.String message,
java.lang.String title,
int optionType,
int messageType)
ThreadSafeDialogsManagerconfirmDialog in interface ThreadSafeDialogsManagerJOptionPane.showConfirmDialog(Component, Object, String, int, int)public int confirmDialog(java.lang.String message,
java.lang.String title,
int optionType,
int messageType,
java.lang.String msgid)
confirmDialog in interface ThreadSafeDialogsconfirmDialog in interface ThreadSafeDialogsManagerpublic java.lang.String inputDialog(java.lang.String message,
java.lang.String title,
int messageType,
java.lang.String initialValue)
ThreadSafeDialogsManagerinputDialog in interface ThreadSafeDialogsManagermessageType - an integer designating the kind of message this is;
primarily used to determine the icon from the pluggable
Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE,
WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGEJOptionPane.showInputDialog(Component, Object, String, int)public java.lang.String inputDialog(java.lang.String message,
java.lang.String title)
ThreadSafeDialogsManagerinputDialog in interface ThreadSafeDialogsManagerJOptionPane.showInputDialog(Component, Object, String, int)public void showDialog(java.awt.Component contents,
java.lang.String title)
ThreadSafeDialogsshowDialog in interface ThreadSafeDialogspublic java.awt.Component createComponent(java.lang.Class<? extends java.awt.Component> theClass,
java.lang.Object... parameters)
ThreadSafeDialogsManagercreateComponent in interface ThreadSafeDialogsManagertheClass - of component to be createdparameters - passed to the constructor of the componentpublic java.awt.Component createComponentWithParams(java.lang.Class<? extends java.awt.Component> theClass,
java.lang.Object[] parameters)
ThreadSafeDialogsManagercreateComponentWithParams in interface ThreadSafeDialogsManagertheClass - of component to be createdparameters - passed to the constructor of the componentpublic java.io.File[] showChooserDialog(java.lang.String title,
int type,
int selectionMode,
boolean multiselection,
java.io.File initialPath,
javax.swing.filechooser.FileFilter filter,
boolean fileHidingEnabled)
ThreadSafeDialogsManagershowChooserDialog in interface ThreadSafeDialogsManagertype - of the dialog, JFileChooser.SAVE_DIALOG or JFileChooser.OPEN_DIALOGselectionMode - of the dialog, values are: JFileChooser.FILES_ONLY, JFileChooser.DIRECTORIES_ONLY, JFileChooser.FILES_AND_DIRECTORIESfilter - used to filter the files show in the dialog.public <any> showChooserDialog(java.lang.String title,
int type,
int selectionMode,
boolean multiselection,
java.io.File initialPath,
javax.swing.filechooser.FileFilter filter,
boolean fileHidingEnabled,
boolean askCharset)
ThreadSafeDialogsManagershowChooserDialog in interface ThreadSafeDialogsManagertype - of the dialog, JFileChooser.SAVE_DIALOG or JFileChooser.OPEN_DIALOGselectionMode - of the dialog, values are: JFileChooser.FILES_ONLY, JFileChooser.DIRECTORIES_ONLY, JFileChooser.FILES_AND_DIRECTORIESfilter - used to filter the files show in the dialog.public java.io.File[] showChooserDialog(java.lang.String title,
int type,
int selectionMode,
boolean multiselection,
java.io.File initialPath,
javax.swing.filechooser.FileFilter filter,
boolean fileHidingEnabled,
javax.swing.JComponent accesory)
showChooserDialog in interface ThreadSafeDialogsManagerpublic java.io.File[] showOpenDirectoryDialog(java.lang.String title,
java.io.File initialPath)
ThreadSafeDialogsManagershowOpenDirectoryDialog in interface ThreadSafeDialogsManagerThreadSafeDialogsManager.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)public java.io.File[] showOpenFileDialog(java.lang.String title,
java.io.File initialPath)
ThreadSafeDialogsManagerThreadSafeDialogsManager.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean) call.showOpenFileDialog in interface ThreadSafeDialogsManagerThreadSafeDialogsManager.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)public java.io.File[] showSaveFileDialog(java.lang.String title,
java.io.File initialPath)
ThreadSafeDialogsManagerThreadSafeDialogsManager.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean) call.showSaveFileDialog in interface ThreadSafeDialogsManagerThreadSafeDialogsManager.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)public void message(java.lang.String message,
int message_type)
ThreadSafeDialogsManagermessage in interface ThreadSafeDialogsManagermessage_type - One of: JOptionPane.ERROR_MESSAGE,
JOptionPane.WARNING_MESSAGE, JOptionPane.INFORMATION_MESSAGEpublic java.lang.String translate(java.lang.String message,
java.lang.String... args)
translate in interface ApplicationManagerpublic java.awt.Component getRootComponent()
getRootComponent in interface ApplicationManagerpublic void refreshMenusAndToolBars()
refreshMenusAndToolBars in interface ApplicationManagerpublic MainFrame getMainFrame()
getMainFrame in interface ApplicationManagerpublic void addMenu(ActionInfo action, java.lang.String text)
addMenu in interface ApplicationManagerpublic void addTool(ActionInfo action, java.lang.String toolBarName)
addTool in interface ApplicationManagerpublic void addSelectableTool(ActionInfo action, java.lang.String toolBarName)
addSelectableTool in interface ApplicationManagerpublic void showTextDialog(WindowManager.MODE mode, java.lang.String title, java.lang.String htmlText)
showTextDialog in interface ApplicationManagerpublic void showTextDialog(WindowManager.MODE mode, java.lang.String title, java.lang.String htmlText, javax.swing.event.HyperlinkListener hyperlinkListener)
showTextDialog in interface ApplicationManagerpublic javax.swing.tree.TreeModel createProjectLayersTreeModel()
createProjectLayersTreeModel in interface ApplicationManagerpublic javax.swing.tree.TreeModel createProjectStoresTreeModel()
createProjectStoresTreeModel in interface ApplicationManagerpublic java.lang.Object getProperty(java.lang.String name)
getProperty in interface PropertiesSupportpublic void setProperty(java.lang.String name,
java.lang.Object value)
setProperty in interface PropertiesSupportpublic java.util.Map<java.lang.String,java.lang.Object> getProperties()
getProperties in interface PropertiesSupportpublic void addPropertiesObserver(Observer o)
addPropertiesObserver in interface ApplicationManagerpublic void deletePropertiesObserver(Observer o)
deletePropertiesObserver in interface ApplicationManagerpublic void deletePropertiesObservers()
deletePropertiesObservers in interface ApplicationManagerpublic void refreshDocument(FeatureStore store)
refreshDocument in interface ApplicationManagerpublic void refreshDocument(DataStoreParameters params)
refreshDocument in interface ApplicationManagerpublic java.lang.Object get(java.lang.String key)
get in interface GetItemByKey<java.lang.String,java.lang.Object>public java.lang.String makeTitle(java.lang.String base,
java.lang.String docname,
java.lang.String docname2)
ApplicationManagermakeTitle in interface ApplicationManager