|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.application.DefaultGraphApplication
The class DefaultGraphApplication is a default implementation
of common functionality of a GraphApplication.
It is still abstract though. Subclasses have to provide the application title,
the resources and the implementations of some abstract methods introduced here.
| Field Summary | |
protected ApplicationFrame[] |
applicationFrames
applicationFrames: internal array of ApplicationFrames.
|
| Constructor Summary | |
DefaultGraphApplication(Applet applet)
Constructor |
|
| Method Summary | |
protected abstract ApplicationFrame[] |
createApplicationFrames()
This method creates the ApplicationFrames of the
application. |
Applet |
getApplet()
Returns the applet if this application runs in an applet context or null if this is a standalone application. |
ApplicationFrame |
getApplicationFrame()
Returns the active ApplicationFrame of this application. |
ApplicationFrame[] |
getApplicationFrames()
Returns all ApplicationFrames of this application. |
CommandRegistry |
getCommandRegistry()
Returns the CommandRegistry of this Application. |
LayoutController |
getDefaultLayoutController()
Returns this applications default layout controller. |
DragContext |
getDragContext()
Instance variable for the DragContext that is assigned to a
concrete instance of an ApplicationFrame |
java.util.Locale |
getLocale()
Returns the currently set Locale. |
PreferenceHelp |
getPreferenceHelp()
Returns a PreferenceHelp instance that can be used to
perform common tasks involving preferences. |
Preferences |
getPreferences()
Returns the Preferences instance used by this Application. |
RuleRegistry |
getRuleRegistry()
Returns this applications ruleregistry. |
java.util.List |
getUIManagerResources()
Returns a list with all resource bundles the UIManager should load at initialization time. |
protected abstract void |
initGraphicsEnvironment()
Implementations of this method should initialize the graphics environment. e.g. instances of TextOperations
and ImageOperations should be
registered here. |
protected void |
initLocale()
Initializes the locale of the application. |
void |
savePreferences()
Saves the currently stored Preferences of this application. |
void |
setPreferenceHelp(PreferenceHelp preferenceHelp)
Sets the PreferenceHelp instance that can be used to
perform common tasks involving preferences. |
void |
setPreferences(Preferences preferences)
Sets the Preferences instance used by this Application. |
void |
setRuleRegistry(RuleRegistry ruleRegistry)
Sets the applications ruleregistry. |
void |
showError(java.lang.String errormessage)
Asks the application to show an error message-box with the given text. |
boolean |
shutDown()
Invoked when the Application should be shut down.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.tensegrity.application.Application |
getDefaultPreferencesFileName, getDefaultPreferencesLoadClass, getKeyStrokeProvider, getPreferencesFileName, getTitle, getUIManager, launch |
| Field Detail |
protected ApplicationFrame[] applicationFrames
applicationFrames: internal array of ApplicationFrames.
Do not access this variable. It is only 'protected' for internal reasons.
| Constructor Detail |
public DefaultGraphApplication(Applet applet)
applet - The applet to use as context or null, if the application
should be launched as stand alone.| Method Detail |
public DragContext getDragContext()
GraphApplicationDragContext that is assigned to a
concrete instance of an ApplicationFrame
getDragContext in interface GraphApplicationDragContext.public RuleRegistry getRuleRegistry()
GraphApplication
getRuleRegistry in interface GraphApplicationpublic void setRuleRegistry(RuleRegistry ruleRegistry)
GraphApplication
setRuleRegistry in interface GraphApplicationruleRegistry - the rule registry of this applicationpublic LayoutController getDefaultLayoutController()
GraphApplication
getDefaultLayoutController in interface GraphApplicationpublic Preferences getPreferences()
ApplicationPreferences instance used by this Application.
getPreferences in interface ApplicationPreferences instance of this Application.public void setPreferences(Preferences preferences)
ApplicationPreferences instance used by this Application.
setPreferences in interface Applicationpreferences - the Preferences instance of this Application.public java.util.List getUIManagerResources()
Application
getUIManagerResources in interface Applicationpublic CommandRegistry getCommandRegistry()
ApplicationCommandRegistry of this Application.
getCommandRegistry in interface ApplicationCommandRegistry instance of this Application.public java.util.Locale getLocale()
ApplicationLocale.
getLocale in interface ApplicationLocale.public boolean shutDown()
ApplicationApplication should be shut down.
Returns false if the shut down should be canceled,
otherwise true.
Usually this method does not return at all and ends with a
System.exit(0) call.
shutDown in interface Applicationfalse if the shut down should be canceled.public void showError(java.lang.String errormessage)
Application
showError in interface Applicationerrormessage - the text to display as the error.public ApplicationFrame[] getApplicationFrames()
ApplicationApplicationFrames of this application.
getApplicationFrames in interface ApplicationApplicationFrames of this application.public ApplicationFrame getApplicationFrame()
ApplicationApplicationFrame of this application.
getApplicationFrame in interface ApplicationApplicationFrame of this application.public Applet getApplet()
Application
getApplet in interface Applicationpublic PreferenceHelp getPreferenceHelp()
ApplicationPreferenceHelp instance that can be used to
perform common tasks involving preferences.
getPreferenceHelp in interface ApplicationPreferenceHelp instance that can be used to
perform common tasks involving preferences.public void setPreferenceHelp(PreferenceHelp preferenceHelp)
ApplicationPreferenceHelp instance that can be used to
perform common tasks involving preferences.
setPreferenceHelp in interface ApplicationpreferenceHelp - the PreferenceHelp instance that can
be used to perform common tasks involving
preferences.public void savePreferences()
getPreferences() returns null.
savePreferences in interface Applicationprotected void initLocale()
protected abstract ApplicationFrame[] createApplicationFrames()
ApplicationFrames of the
application.
protected abstract void initGraphicsEnvironment()
TextOperations
and ImageOperations should be
registered here.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||