public class DefaultApplicationManager extends Object implements ApplicationManager
| Constructor and Description |
|---|
DefaultApplicationManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMenu(ActionInfo action,
String text) |
void |
addSelectableTool(ActionInfo action,
String toolBarName) |
void |
addTool(ActionInfo action,
String toolBarName) |
int |
confirmDialog(String message,
String title,
int optionType,
int messageType)
Show a JOptionPane confirm dialog.
|
Component |
createComponent(Class<? extends Component> theClass,
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.
|
Component |
createComponentWithParams(Class<? extends Component> theClass,
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.
|
TreeModel |
createProjectLayersTreeModel() |
AboutManager |
getAbout()
Utility method to obtain the AboutManager used in the application at this moment.
|
JComponent |
getActiveComponent(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(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(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.
|
String |
getArgument(String name)
Return the value of the argument passed in the command line by
the name indicated as the parameter.
|
String[] |
getArguments()
Return the arguments passed to the application in the command line
|
ColorTablesFactory |
getColorTablesFactory() |
IProjection |
getCRS(String code)
Obtain the projection associated by the code of projection
Passed as parameter.
|
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.
|
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.
|
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(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.
|
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.
|
List<WizardPanel> |
getWizardPanels() |
String |
inputDialog(String message,
String title)
Show a JOptionPane input dialog.
|
String |
inputDialog(String message,
String title,
int messageType,
String initialValue)
Show a JOptionPane input dialog.
|
void |
message(String message,
int message_type)
sets message in status bar
This method is thread safe.
|
void |
messageDialog(String message,
String[] messageArgs,
String title,
int messageType)
Create a message dialog with ok button.
|
void |
messageDialog(String message,
String title,
int messageType)
Create a message dialog with an ok button.
|
DataStore |
pepareOpenDataSource(DataStore store,
PrepareContext context) |
DataStoreParameters |
prepareOpenDataStoreParameters(DataStoreParameters storeParameters,
PrepareContext context) |
List<DataStoreParameters> |
prepareOpenDataStoreParameters(List<DataStoreParameters> storeParameters,
PrepareContext context) |
FLayer |
prepareOpenLayer(FLayer layer,
PrepareContextView context) |
void |
putInClipboard(String data)
Put the string value passed as parameter in the clipboard of
the system.
|
void |
refreshMenusAndToolBars() |
void |
registerAddTableWizard(String name,
String description,
Class<? extends WizardPanel> wpClass) |
void |
registerColorTablesFactory(ColorTablesFactory factory) |
void |
registerPrepareOpenDataStore(PrepareDataStore action) |
void |
registerPrepareOpenDataStoreParameters(PrepareDataStoreParameters action) |
void |
registerPrepareOpenLayer(PrepareLayer action) |
File[] |
showChooserDialog(String title,
int type,
int selectionMode,
boolean multiselection,
File initialPath,
FileFilter filter,
boolean fileHidingEnabled)
Creates and show a JFileChooser dialog.
|
void |
showDialog(Component contents,
String title)
Create a window with the contents and title specified as parameters
and show as a dialog windows of gvSIG.
|
File[] |
showOpenDirectoryDialog(String title,
File initialPath)
Creates and show a JFileChooser dialog for folder selection.
|
File[] |
showOpenFileDialog(String title,
File initialPath)
Creates and show a JFileChooser dialog for selection a file for open.
|
File[] |
showSaveFileDialog(String title,
File initialPath)
Creates and show a JFileChooser dialog for selection a file for save.
|
void |
showTextDialog(WindowManager.MODE mode,
String title,
String htmlText) |
void |
showTextDialog(WindowManager.MODE mode,
String title,
String htmlText,
HyperlinkListener hyperlinkListener) |
String |
translate(String message,
String... args) |
public DataStore pepareOpenDataSource(DataStore store, PrepareContext context) throws Exception
pepareOpenDataSource in interface ApplicationManagerExceptionpublic DataStoreParameters prepareOpenDataStoreParameters(DataStoreParameters storeParameters, PrepareContext context) throws Exception
prepareOpenDataStoreParameters in interface ApplicationManagerExceptionpublic List<DataStoreParameters> prepareOpenDataStoreParameters(List<DataStoreParameters> storeParameters, PrepareContext context) throws Exception
prepareOpenDataStoreParameters in interface ApplicationManagerExceptionpublic void registerPrepareOpenDataStore(PrepareDataStore action)
registerPrepareOpenDataStore in interface ApplicationManagerpublic void registerPrepareOpenDataStoreParameters(PrepareDataStoreParameters action)
registerPrepareOpenDataStoreParameters in interface ApplicationManagerpublic FLayer prepareOpenLayer(FLayer layer, PrepareContextView context) throws Exception
prepareOpenLayer in interface ApplicationManagerExceptionpublic void registerPrepareOpenLayer(PrepareLayer action)
registerPrepareOpenLayer in interface ApplicationManagerpublic void registerAddTableWizard(String name, String description, Class<? extends WizardPanel> wpClass)
registerAddTableWizard in interface ApplicationManagerpublic List<WizardPanel> getWizardPanels() throws Exception
getWizardPanels in interface ApplicationManagerExceptionpublic 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(String code)
ApplicationManagergetCRS in interface ApplicationManagercode - of the projection requestedpublic IconThemeManager getIconThemeManager()
ApplicationManagergetIconThemeManager in interface ApplicationManagerpublic String getArgument(String name)
ApplicationManager
application --name=value
getArgument in interface ApplicationManagername - of the requested argumentpublic String[] getArguments()
ApplicationManagergetArguments in interface ApplicationManagerpublic String getFromClipboard()
ApplicationManagergetFromClipboard in interface ApplicationManagerpublic void putInClipboard(String data)
ApplicationManagerputInClipboard in interface ApplicationManagerdata - to put in the clipboard.public Project getCurrentProject()
ApplicationManagergetCurrentProject in interface ApplicationManagerpublic PreferencesNode getPreferences(String node)
ApplicationManagergetPreferences in interface ApplicationManagerpublic PreferencesNode getPreferences()
ApplicationManagergetPreferences in interface ApplicationManagerpublic Version getVersion()
ApplicationManagergetVersion 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(String documentTypeName)
ApplicationManagergetActiveDocument in interface ApplicationManagerpublic Document getActiveDocument(Class<? extends Document> documentClass)
ApplicationManagergetActiveDocument in interface ApplicationManagerpublic JComponent getActiveComponent(Class<? extends Document> documentClass)
ApplicationManagergetActiveComponent in interface ApplicationManagerpublic IDocumentWindow getDocumentWindow(Document document)
ApplicationManagergetDocumentWindow in interface ApplicationManagerdocument - to search the windowpublic String getLocaleLanguage()
getLocaleLanguage in interface ApplicationManagerpublic void message(String message, int message_type)
ApplicationManagermessage in interface ApplicationManagermessage_type - One of: JOptionPane.ERROR_MESSAGE,
JOptionPane.WARNING_MESSAGE, JOptionPane.INFORMATION_MESSAGEpublic void messageDialog(String message, String title, int messageType)
ThreadSafeDialogsmessageDialog in interface ThreadSafeDialogsmessage - to present in the dialogtitle - title of the dialogmessageType - type of icon to use.JOptionPane.showMessageDialog(Component, Object, String, int)public void messageDialog(String message, String[] messageArgs, String title, int messageType)
ThreadSafeDialogsmessageDialog in interface ThreadSafeDialogsmessage - 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 int confirmDialog(String message, String title, int optionType, int messageType)
ThreadSafeDialogsconfirmDialog in interface ThreadSafeDialogsJOptionPane.showConfirmDialog(Component, Object, String, int, int)public String inputDialog(String message, String title, int messageType, String initialValue)
ThreadSafeDialogsinputDialog in interface ThreadSafeDialogsmessageType - 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 String inputDialog(String message, String title)
ThreadSafeDialogsinputDialog in interface ThreadSafeDialogsJOptionPane.showInputDialog(Component, Object, String, int)public void showDialog(Component contents, String title)
ThreadSafeDialogsshowDialog in interface ThreadSafeDialogspublic Component createComponent(Class<? extends Component> theClass, Object... parameters)
ThreadSafeDialogscreateComponent in interface ThreadSafeDialogstheClass - of component to be createdparameters - passed to the constructor of the componentpublic Component createComponentWithParams(Class<? extends Component> theClass, Object[] parameters)
ThreadSafeDialogscreateComponentWithParams in interface ThreadSafeDialogstheClass - of component to be createdparameters - passed to the constructor of the componentpublic File[] showChooserDialog(String title, int type, int selectionMode, boolean multiselection, File initialPath, FileFilter filter, boolean fileHidingEnabled)
ThreadSafeDialogsshowChooserDialog in interface ThreadSafeDialogstype - 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 File[] showOpenDirectoryDialog(String title, File initialPath)
ThreadSafeDialogsshowOpenDirectoryDialog in interface ThreadSafeDialogsThreadSafeDialogs.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)public File[] showOpenFileDialog(String title, File initialPath)
ThreadSafeDialogsThreadSafeDialogs.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean) call.showOpenFileDialog in interface ThreadSafeDialogsThreadSafeDialogs.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)public File[] showSaveFileDialog(String title, File initialPath)
ThreadSafeDialogsThreadSafeDialogs.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean) call.showSaveFileDialog in interface ThreadSafeDialogsThreadSafeDialogs.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)public String translate(String message, String... args)
translate in interface ApplicationManagerpublic Component getRootComponent()
getRootComponent in interface ApplicationManagerpublic void refreshMenusAndToolBars()
refreshMenusAndToolBars in interface ApplicationManagerpublic MainFrame getMainFrame()
getMainFrame in interface ApplicationManagerpublic void addMenu(ActionInfo action, String text)
addMenu in interface ApplicationManagerpublic void addTool(ActionInfo action, String toolBarName)
addTool in interface ApplicationManagerpublic void addSelectableTool(ActionInfo action, String toolBarName)
addSelectableTool in interface ApplicationManagerpublic void showTextDialog(WindowManager.MODE mode, String title, String htmlText)
showTextDialog in interface ApplicationManagerpublic void showTextDialog(WindowManager.MODE mode, String title, String htmlText, HyperlinkListener hyperlinkListener)
showTextDialog in interface ApplicationManagerpublic TreeModel createProjectLayersTreeModel()
createProjectLayersTreeModel in interface ApplicationManager