|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectides.api.core.Hub
public class Hub
The main hub of the program. Serves to get references to all objects of interest (such as settings, main window, loaded resources, etc.) Plugins are encouraged to make use of these services.
| Method Summary | |
|---|---|
static void |
addResouceBundle(java.util.ResourceBundle bundle)
Adds a string resource bundle to the set of bundles which are used to look up strings. |
static void |
displayAlert(java.lang.String message)
Displays a dialog box that shows an alert message to the user. |
static Cache |
getCache()
Provides access to the Cache maintained by IDES. |
static java.awt.Point |
getCenteredLocationForDialog(java.awt.Dimension d)
Suggests the position of the top-left corner for a dialog box with the given dimensions so that it is located in the center of the main window of the application. |
static CopyPasteManager |
getCopyPasteManager()
Provides access to the cut, copy and paste facility in IDES. |
static java.net.URL |
getIDESResource(java.lang.String name)
Gets a resource from the IDES JAR file (icons and such). |
static IOSubsytem |
getIOSubsystem()
Provides access to the IO subsystem of IDES. |
static LatexManager |
getLatexManager()
Provides access to the LaTeX rendering services in IDES. |
static java.net.URL |
getLocalResource(java.lang.Class<?> context,
java.lang.String name)
Gets a resource from the JAR file of a plugin (icons and such). |
static java.awt.Frame |
getMainWindow()
Gets the main window of IDES. |
static NoticeManager |
getNoticeManager()
Provides access to the notice posting services in IDES. |
static PersistentProperties |
getPersistentData()
Provides access to a list of settings which persist over sessions. |
static UndoManager |
getUndoManager()
Provides access to the Undo facility in IDES. |
static UserInterface |
getUserInterface()
Gets the main UI of IDES. |
static java.lang.String |
getUserTextAnnotation(DESModel model)
Retrieve the user-defined text annotation of the given model. |
static Workspace |
getWorkspace()
Gets the main workspace. |
static void |
openOptionsPane(java.lang.String title)
Request that the options dialog box opens up on the screen and shows the options for the OptionsPane with the given title. |
static void |
registerOptionsPane(OptionsPane pane)
Register an options pane with the options dialog box. |
static void |
setUserTextAnnotation(DESModel model,
java.lang.String text)
Set the user-defined text annotation of the given model. |
static void |
storePersistentData()
Stores the settings from the list of settings getPersistentData() into the file settings.ini. |
static java.lang.String |
string(java.lang.String key)
Gets from the resource bundle stringResource the string which
corresponds to the given key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String string(java.lang.String key)
stringResource the string which
corresponds to the given key. Should be used for any messages and strings
to appear in IDES (FIXME: save for the commmands which are managed by an
external library?).
key - lookup key for the string
stringResourcepublic static void addResouceBundle(java.util.ResourceBundle bundle)
bundle - the string resource bundle to be addedstringResource,
string(String)public static PersistentProperties getPersistentData()
public static void storePersistentData()
getPersistentData() into the file settings.ini. If
this fails, it shows a message box to the user.
public static java.awt.Frame getMainWindow()
public static UserInterface getUserInterface()
public static void registerOptionsPane(OptionsPane pane)
pane - the OptionsPane that will be registeredOptionsPane,
OptionsWindowpublic static void openOptionsPane(java.lang.String title)
OptionsPane with the given title.
title - the title of the OptionsPane to be
displayedOptionsPane,
OptionsWindowpublic static void displayAlert(java.lang.String message)
message - message to be displayedpublic static java.awt.Point getCenteredLocationForDialog(java.awt.Dimension d)
d - the dimension of the dialog box
public static Workspace getWorkspace()
public static java.net.URL getIDESResource(java.lang.String name)
name - the name of the resource
public static java.net.URL getLocalResource(java.lang.Class<?> context,
java.lang.String name)
context - the context for the local resource (e.g., a class from the
plugin)name - the name of the resource
public static Cache getCache()
Cache maintained by IDES.
Cache maintained by IDESpublic static LatexManager getLatexManager()
LatexManagerpublic static NoticeManager getNoticeManager()
NoticeManagerpublic static UndoManager getUndoManager()
UndoManagerpublic static IOSubsytem getIOSubsystem()
public static CopyPasteManager getCopyPasteManager()
CopyPasteManagerpublic static java.lang.String getUserTextAnnotation(DESModel model)
model - the model
public static void setUserTextAnnotation(DESModel model,
java.lang.String text)
model - the modeltext - the text of the annotation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||