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 ApplicationManager
java.lang.Exception
public DataStoreParameters prepareOpenDataStoreParameters(DataStoreParameters storeParameters, PrepareContext context) throws java.lang.Exception
prepareOpenDataStoreParameters
in interface ApplicationManager
java.lang.Exception
public java.util.List<DataStoreParameters> prepareOpenDataStoreParameters(java.util.List<DataStoreParameters> storeParameters, PrepareContext context) throws java.lang.Exception
prepareOpenDataStoreParameters
in interface ApplicationManager
java.lang.Exception
public void registerPrepareOpenDataStore(PrepareDataStore action)
registerPrepareOpenDataStore
in interface ApplicationManager
public void registerPrepareOpenDataStoreParameters(PrepareDataStoreParameters action)
registerPrepareOpenDataStoreParameters
in interface ApplicationManager
public FLayer prepareOpenLayer(FLayer layer, PrepareContextView context) throws java.lang.Exception
prepareOpenLayer
in interface ApplicationManager
java.lang.Exception
public void registerPrepareOpenLayer(PrepareLayer action)
registerPrepareOpenLayer
in interface ApplicationManager
public void registerAddTableWizard(java.lang.String name, java.lang.String description, java.lang.Class<? extends WizardPanel> wpClass)
registerAddTableWizard
in interface ApplicationManager
public java.util.List<WizardPanel> getWizardPanels() throws java.lang.Exception
getWizardPanels
in interface ApplicationManager
java.lang.Exception
public DataManager getDataManager()
ApplicationManager
getDataManager
in interface ApplicationManager
public GeometryManager getGeometryManager()
ApplicationManager
getGeometryManager
in interface ApplicationManager
public PersistenceManager getPersistenceManager()
ApplicationManager
getPersistenceManager
in interface ApplicationManager
public DisposableManager getDisposableManager()
ApplicationManager
getDisposableManager
in interface ApplicationManager
public DynObjectManager getDynObjectManager()
ApplicationManager
getDynObjectManager
in interface ApplicationManager
public ExtensionPointManager getExtensionPointManager()
ApplicationManager
getExtensionPointManager
in interface ApplicationManager
public ProjectManager getProjectManager()
ApplicationManager
getProjectManager
in interface ApplicationManager
public MDIManager getUIManager()
ApplicationManager
getUIManager
in interface ApplicationManager
public MapContextManager getMapContextManager()
ApplicationManager
getMapContextManager
in interface ApplicationManager
public DataTypesManager getDataTypesManager()
getDataTypesManager
in interface ApplicationManager
public IProjection getCRS(java.lang.String code)
ApplicationManager
getCRS
in interface ApplicationManager
code
- of the projection requestedpublic IconThemeManager getIconThemeManager()
ApplicationManager
getIconThemeManager
in interface ApplicationManager
public Arguments getArguments()
ApplicationManager
getArguments
in interface ApplicationManager
public java.lang.String getFromClipboard()
ApplicationManager
getFromClipboard
in interface ApplicationManager
public void putInClipboard(java.lang.String data)
ApplicationManager
putInClipboard
in interface ApplicationManager
data
- to put in the clipboard.public Project getCurrentProject()
ApplicationManager
getCurrentProject
in interface ApplicationManager
public FLayer getCurrentLayer()
getCurrentLayer
in interface ApplicationManager
public PreferencesNode getPreferences(java.lang.String node)
ApplicationManager
getPreferences
in interface ApplicationManager
public PreferencesNode getPreferences()
ApplicationManager
getPreferences
in interface ApplicationManager
public Version getVersion()
ApplicationManager
getVersion
in interface ApplicationManager
public void close(boolean quietly)
ApplicationManager
close
in interface ApplicationManager
public AboutManager getAbout()
ApplicationManager
getAbout
in interface ApplicationManager
public ColorTablesFactory getColorTablesFactory()
getColorTablesFactory
in interface ApplicationManager
public void registerColorTablesFactory(ColorTablesFactory factory)
registerColorTablesFactory
in interface ApplicationManager
public IWindow getActiveWindow()
ApplicationManager
getActiveWindow
in interface ApplicationManager
public Document getActiveDocument()
ApplicationManager
getActiveDocument
in interface ApplicationManager
public Document getActiveDocument(java.lang.String documentTypeName)
ApplicationManager
getActiveDocument
in interface ApplicationManager
public Document getActiveDocument(java.lang.Class<? extends Document> documentClass)
ApplicationManager
getActiveDocument
in interface ApplicationManager
public IWindow getActiveWindow(java.lang.Class<? extends Document> documentClass)
getActiveWindow
in interface ApplicationManager
public javax.swing.JComponent getActiveComponent(java.lang.Class<? extends Document> documentClass)
ApplicationManager
getActiveComponent
in interface ApplicationManager
public IDocumentWindow getDocumentWindow(Document document)
ApplicationManager
getDocumentWindow
in interface ApplicationManager
document
- to search the windowpublic java.lang.String getLocaleLanguage()
getLocaleLanguage
in interface ApplicationManager
public void messageDialog(java.lang.String message, java.lang.String title, int messageType)
ThreadSafeDialogsManager
messageDialog
in interface ThreadSafeDialogsManager
message
- 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)
ThreadSafeDialogsManager
messageDialog
in interface ThreadSafeDialogsManager
message
- 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 ThreadSafeDialogs
messageDialog
in interface ThreadSafeDialogsManager
public int confirmDialog(java.lang.String message, java.lang.String title, int optionType, int messageType)
ThreadSafeDialogsManager
confirmDialog
in interface ThreadSafeDialogsManager
JOptionPane.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 ThreadSafeDialogs
confirmDialog
in interface ThreadSafeDialogsManager
public java.lang.String inputDialog(java.lang.String message, java.lang.String title, int messageType, java.lang.String initialValue)
ThreadSafeDialogsManager
inputDialog
in interface ThreadSafeDialogsManager
messageType
- 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)
ThreadSafeDialogsManager
inputDialog
in interface ThreadSafeDialogsManager
JOptionPane.showInputDialog(Component, Object, String, int)
public void showDialog(java.awt.Component contents, java.lang.String title)
ThreadSafeDialogs
showDialog
in interface ThreadSafeDialogs
public java.awt.Component createComponent(java.lang.Class<? extends java.awt.Component> theClass, java.lang.Object... parameters)
ThreadSafeDialogsManager
createComponent
in interface ThreadSafeDialogsManager
theClass
- 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)
ThreadSafeDialogsManager
createComponentWithParams
in interface ThreadSafeDialogsManager
theClass
- 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)
ThreadSafeDialogsManager
showChooserDialog
in interface ThreadSafeDialogsManager
type
- 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)
ThreadSafeDialogsManager
showChooserDialog
in interface ThreadSafeDialogsManager
type
- 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 ThreadSafeDialogsManager
public java.io.File[] showOpenDirectoryDialog(java.lang.String title, java.io.File initialPath)
ThreadSafeDialogsManager
showOpenDirectoryDialog
in interface ThreadSafeDialogsManager
ThreadSafeDialogsManager.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)
public java.io.File[] showOpenFileDialog(java.lang.String title, java.io.File initialPath)
ThreadSafeDialogsManager
ThreadSafeDialogsManager.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)
call.showOpenFileDialog
in interface ThreadSafeDialogsManager
ThreadSafeDialogsManager.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)
public java.io.File[] showSaveFileDialog(java.lang.String title, java.io.File initialPath)
ThreadSafeDialogsManager
ThreadSafeDialogsManager.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)
call.showSaveFileDialog
in interface ThreadSafeDialogsManager
ThreadSafeDialogsManager.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)
public void message(java.lang.String message, int message_type)
ThreadSafeDialogsManager
message
in interface ThreadSafeDialogsManager
message_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 ApplicationManager
public java.awt.Component getRootComponent()
getRootComponent
in interface ApplicationManager
public void refreshMenusAndToolBars()
refreshMenusAndToolBars
in interface ApplicationManager
public MainFrame getMainFrame()
getMainFrame
in interface ApplicationManager
public void addMenu(ActionInfo action, java.lang.String text)
addMenu
in interface ApplicationManager
public void addTool(ActionInfo action, java.lang.String toolBarName)
addTool
in interface ApplicationManager
public void addSelectableTool(ActionInfo action, java.lang.String toolBarName)
addSelectableTool
in interface ApplicationManager
public void showTextDialog(WindowManager.MODE mode, java.lang.String title, java.lang.String htmlText)
showTextDialog
in interface ApplicationManager
public void showTextDialog(WindowManager.MODE mode, java.lang.String title, java.lang.String htmlText, javax.swing.event.HyperlinkListener hyperlinkListener)
showTextDialog
in interface ApplicationManager
public javax.swing.tree.TreeModel createProjectLayersTreeModel()
createProjectLayersTreeModel
in interface ApplicationManager
public javax.swing.tree.TreeModel createProjectStoresTreeModel()
createProjectStoresTreeModel
in interface ApplicationManager
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface PropertiesSupport
public void setProperty(java.lang.String name, java.lang.Object value)
setProperty
in interface PropertiesSupport
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
getProperties
in interface PropertiesSupport
public void addPropertiesObserver(Observer o)
addPropertiesObserver
in interface ApplicationManager
public void deletePropertiesObserver(Observer o)
deletePropertiesObserver
in interface ApplicationManager
public void deletePropertiesObservers()
deletePropertiesObservers
in interface ApplicationManager
public void refreshDocument(FeatureStore store)
refreshDocument
in interface ApplicationManager
public void refreshDocument(DataStoreParameters params)
refreshDocument
in interface ApplicationManager
public 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)
ApplicationManager
makeTitle
in interface ApplicationManager