|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.application.ApplicationFrame
com.tensegrity.skeleton.swing.SwingApplicationFrame
The Swing based ApplicationFrame implementation.
| Nested Class Summary | |
class |
SwingApplicationFrame.NavigatorUpdater
The NavigatorUpdater is an Observer which updates
the Navigator of an ApplicationFrame. |
| Field Summary | |
javax.swing.JButton |
floatbutton
Button to make the frame of the applet version floating. |
Frame |
floatframe
The frame to which the applet will be embedded. |
protected Frame |
frame
When being in application(non-applet-) mode, this instance represents the outer JFrame instance. |
MDIComponent |
mdiComponent
This applications mdiComponent (tabbed style). |
protected javax.swing.JPanel |
mdiPanel
The swing container for the MDIComponent |
protected ToolBar[] |
toolBars
This applications ToolBar. |
| Fields inherited from class com.tensegrity.application.ApplicationFrame |
application, EAST, NORTH, NORTHEAST, NORTHWEST, SOUTH, SOUTHEAST, SOUTHWEST, TYPE_CLONED_DOCUMENT, TYPE_LOADED_DOCUMENT, TYPE_NEW_DOCUMENT, UNDEFINED, WEST |
| Constructor Summary | |
SwingApplicationFrame(Frame frame,
SwingApplet applet)
Creates SwingApplicationFrame based on the given target
frame (ExtendedJFrame) and applet
(SwingApplet). |
|
SwingApplicationFrame(GraphApplication application,
Frame frame,
SwingApplet applet)
Creates SwingApplicationFrame based on the given target
frame (ExtendedJFrame) and applet
(SwingApplet). |
|
| Method Summary | |
void |
applyEvList()
Applies the currently language pack to all the previously stored components by invoking uiItemEvList's apply
method and subsequently invoking it on all contained components of this
application rootpane. |
void |
applyLookAndFeel()
This method is useful to apply the change of a LookAndFeel at runtime. |
void |
configureDocumentView(Document document,
int documenttype)
Configures the view of a document. |
void |
configureEmptyDocument(Document document)
Configures a newly created document. |
void |
configureNewDocument(Document document)
This method performs post-creation configuration of the passed document. |
DockMDIComponent |
createDockMDIComponent(java.util.List initialdocuments,
MenuTool menuTool,
Command closeDocumentCommand,
UIManager uimanager)
Hook to create a DockMDIComponent
subclass. |
boolean |
exit()
Cleanup method that is called when the application will be closed to free all resources from the application frame and store all contained documents, etc. |
Applet |
getApplet()
|
protected java.awt.Image |
getApplicationIconImage()
Returns null. |
AttributeEditorContainer |
getAttributeEditorContainer()
Returns either the AttributeEditorContainer or null
if no such Container is used by this Application. |
Container |
getCustomContainer()
Returns a custom not yet specified type of Container. |
DocumentDropContext |
getDocumentDropContext()
Returns the Document drop context to be used when files are dropped into the frame. |
javax.swing.JComponent |
getDomainSelectorComponent()
Returns the component that will be used as domain selector component in the layout tools container |
javax.swing.JButton |
getFloatButton()
Returns the button used to trigger the float of the applet. |
javax.swing.JFrame |
getFloatFrame()
Returns the FloatFrame. |
Frame |
getFrame()
Returns either the awt.Frame of this ApplicationFrame or null if this ApplicationFrame is running as Applet. |
SwingFrameLayoutController |
getFrameLayoutController()
Returns the instance. |
GraphDocumentReader |
getGraphDocumentReader()
Returns the GraphDocumentReader to use for reading documents |
GraphDocumentWriter |
getGraphDocumentWriter()
Returns the GraphDocumentWriter to use for writing documents |
JPopupMenuSourceWithUpdateUI |
getGraphPanelPopupMenuSource()
Returns a popup menu instance for this application's graph panels. |
protected LaunchTask[] |
getLauncherTasks()
Returns all the launchertasks to be executed while starting the applicationframe. |
int |
getLayoutConstraint(Container container)
Returns the default constraints for the SwingApplicationFrame. |
LayoutToolsContainer |
getLayoutToolsContainer()
Returns the LayoutToolsContainer of this Application
or null if no such Container is used. |
MDIComponent |
getMDIComponent()
Returns the central component for this application frame. |
java.awt.Container |
getMdiComponentContainer()
Returns a Container which uses a BorderLayout
as the LayoutManager. |
MenuBar |
getMenuBar()
Returns the MenuBar of this ApplicationFrame. |
MenuTool |
getMenuTool()
Returns the Menu Tool of this swing application frame. |
NavigatorContainer |
getNavigatorContainer()
Returns the NavigatorContainer of this Application
or null if no such Container is used. |
OutlinerContainer |
getOutlinerContainer()
Returns the OutlinerContainer of this Application
or null if no such Container is used. |
PreferenceHelper |
getPreferenceHelper()
Returns the preference helper of this application. |
RepositoryContainer |
getRepositoryContainer()
Returns the RepositoryContainer of this Application
or null if no such Container is used. |
javax.swing.JRootPane |
getRootPane()
Gets the Jrootpane we live in. |
protected java.awt.Color |
getSplashBackground()
Returns the background color of the splash screen |
protected java.awt.Color |
getSplashForeground()
Returns the foreground color for the splash screen |
protected java.awt.Color |
getSplashRectColor()
This method returns an instance of Color which is used by the SplashScreen to color the progress bar. |
protected java.awt.Image |
getSplashScreenImage()
Returns null. |
protected java.awt.Insets |
getSplashWindowInsets()
Returns the insets dividing the splash window contents from the border. |
StatusBar |
getStatusBar()
Returns The StatusBar of the ApplicationFrame. |
ToolBar[] |
getToolBars()
Returns the list of toolbars. |
void |
init()
Initializes the ApplicationFrame. |
protected void |
initServices()
Utility method called from the constructor of this SwingApplicationFrame. |
void |
installEvList()
Creates a new UIItemEvaluationList |
protected boolean |
isSplashGradientEnabled()
Return true, to enable the drawing of a vertical gradient in the
progress bar of the splash screen. |
protected void |
launchTasks()
Retrieves all the launcher tasks for this application and starts them. |
Document |
newDocument()
Sublcasses may override it to specify the creation of new documents. |
Document |
openDocument(java.io.File file)
This method is responsible to load a document from a specified file location. |
Document |
openDocument(java.io.InputStream is,
java.lang.String name)
This method is responsible to load a document from a specified input stream. |
protected void |
postLaunch()
This method will be invoked right after the last launch task has been executed. |
void |
saveDocument(Document document,
java.io.File file)
This method is responsible to save a given document to a specified file location. |
void |
saveDocument(Document document,
java.io.OutputStream os)
This method is responsible to save a given document to a specified output stream. |
void |
savePreferences()
Saves the currently stored Preferences of this application. |
protected void |
setApplicationIcon()
The method setApplicationIcon sets the image icon at the internal Swing frame instance. |
void |
setFloatFrame(Frame floatframe)
Sets the Frame, which is used, when this application enters the floating mode. |
void |
setGraphPanelPopupMenuSource(JPopupMenuSourceWithUpdateUI graphPanelPopupMenuSource)
Sets the JPopupMenuSourceWithUpdateUI for this application. |
void |
setPreferenceHelper(PreferenceHelper helper)
Sets the preference helper of this application. |
void |
setRepository(RepositoryContainer container)
Allows to explicitly set the RepositoryContainer. |
boolean |
showSplashScreen()
Returns true, if the splash screen should be shown. |
java.lang.String |
toString()
|
void |
updateSplashStatus()
Updates the status text in the application launcher |
void |
updateStatus(java.lang.Object caller,
java.lang.Object obj)
Sends out an update call to all connected to the toolbars. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Frame frame
protected ToolBar[] toolBars
public MDIComponent mdiComponent
protected javax.swing.JPanel mdiPanel
public javax.swing.JButton floatbutton
public Frame floatframe
| Constructor Detail |
public SwingApplicationFrame(Frame frame,
SwingApplet applet)
SwingApplicationFrame based on the given target
frame (ExtendedJFrame) and applet
(SwingApplet).
frame - the instance of ExtendedJFrame to place
this application into.applet - an instance of SwingApplet to use as applet
reference and container.
public SwingApplicationFrame(GraphApplication application,
Frame frame,
SwingApplet applet)
SwingApplicationFrame based on the given target
frame (ExtendedJFrame) and applet
(SwingApplet).
application - The application this frame belongs toframe - the instance of ExtendedJFrame to place
this application into.applet - an instance of SwingApplet to use as applet
reference and container.| Method Detail |
public void init()
init in class ApplicationFramepublic AttributeEditorContainer getAttributeEditorContainer()
ApplicationFrameAttributeEditorContainer or null
if no such Container is used by this Application.
getAttributeEditorContainer in class ApplicationFrameAttributeEditorContainer of this Application
or null.public NavigatorContainer getNavigatorContainer()
ApplicationFrameNavigatorContainer of this Application
or null if no such Container is used.
getNavigatorContainer in class ApplicationFrameNavigatorContainer of this Application
or null.public OutlinerContainer getOutlinerContainer()
ApplicationFrameOutlinerContainer of this Application
or null if no such Container is used.
getOutlinerContainer in class ApplicationFrameOutlinerContainer of this Application or
null.public LayoutToolsContainer getLayoutToolsContainer()
ApplicationFrameLayoutToolsContainer of this Application
or null if no such Container is used.
getLayoutToolsContainer in class ApplicationFrameLayoutToolsContainer of this Application
or null.public SwingFrameLayoutController getFrameLayoutController()
SwingFrameLayoutController instance.
SwingFrameLayoutController instanceSwingFrameLayoutControllerpublic RepositoryContainer getRepositoryContainer()
ApplicationFrameRepositoryContainer of this Application
or null if no such Container is used.
getRepositoryContainer in class ApplicationFrameRepositoryContainer of this Application
or null.public void setRepository(RepositoryContainer container)
RepositoryContainer. Useful,
because we have a separate LaunchTask for this container.
container - the RepositoryContainer to set.public Container getCustomContainer()
ApplicationFrame
getCustomContainer in class ApplicationFramepublic Frame getFrame()
ApplicationFramenull if this ApplicationFrame is running as Applet.
getFrame in class ApplicationFramenull.public Applet getApplet()
getApplet in class ApplicationFrameApplication.getApplet()public javax.swing.JButton getFloatButton()
null.public javax.swing.JFrame getFloatFrame()
null.public void setFloatFrame(Frame floatframe)
floatframe - The FloatFrame to setpublic int getLayoutConstraint(Container container)
getLayoutConstraint in class ApplicationFramecontainer - A container to retrieve the layout constraint for.
ApplicationFrame.getLayoutConstraint(com.tensegrity.gui.container.Container)public Document newDocument()
newDocument in class ApplicationFrameDocument.public void configureEmptyDocument(Document document)
ApplicationFrame
configureEmptyDocument in class ApplicationFramedocument - The document to configure
public void configureDocumentView(Document document,
int documenttype)
ApplicationFrame
configureDocumentView in class ApplicationFramedocument - The document to configuredocumenttype - A constant describing the source of this document,
one of these constants:
ApplicationFrame.TYPE_NEW_DOCUMENT
ApplicationFrame.TYPE_CLONED_DOCUMENT
ApplicationFrame.TYPE_LOADED_DOCUMENTpublic void configureNewDocument(Document document)
SwingGraphPanel is
initialized as follow:
getGraphPanelPopupMenuSource().
SwingGraphPanel.setAutoScale(boolean)
is set to false.
VisualGraphView.enableUndoRedo()
ApplicationFrame.installKeyboardCommands(VisualGraphView)
configureNewDocument in class ApplicationFramedocument - The document to configure.ApplicationFrame.configureNewDocument(com.tensegrity.gui.document.Document),
NewDocumentCommand,
OpenCommand,
CloneDocumentCommand
public Document openDocument(java.io.InputStream is,
java.lang.String name)
ApplicationFrame
openDocument in class ApplicationFrameis - the input stream to load the document from.name - the name for the loaded document
public GraphDocumentReader getGraphDocumentReader()
getGraphDocumentReader in class ApplicationFramepublic GraphDocumentWriter getGraphDocumentWriter()
getGraphDocumentWriter in class ApplicationFramepublic Document openDocument(java.io.File file)
ApplicationFrameApplicationFrame.openDocument(InputStream, String).
openDocument in class ApplicationFramefile - the location to load the document from.
public void saveDocument(Document document,
java.io.OutputStream os)
ApplicationFrame
saveDocument in class ApplicationFramedocument - the document to save.os - the OutputStream to save the document to.
public void saveDocument(Document document,
java.io.File file)
ApplicationFrameApplicationFrame.saveDocument(Document, OutputStream).
saveDocument in class ApplicationFramedocument - the document to save.file - the location to save the document to.public MenuBar getMenuBar()
ApplicationFrame
getMenuBar in class ApplicationFramepublic JPopupMenuSourceWithUpdateUI getGraphPanelPopupMenuSource()
ApplicationFrame
getGraphPanelPopupMenuSource in class ApplicationFrameApplicationFrame.getGraphPanelPopupMenuSource()public void setGraphPanelPopupMenuSource(JPopupMenuSourceWithUpdateUI graphPanelPopupMenuSource)
JPopupMenuSourceWithUpdateUI for this application.
setGraphPanelPopupMenuSource in class ApplicationFramegraphPanelPopupMenuSource - public StatusBar getStatusBar()
ApplicationFrame
getStatusBar in class ApplicationFramepublic boolean exit()
ApplicationFrame
exit in class ApplicationFramepublic MDIComponent getMDIComponent()
MDIComponent
of this application is built from all available tool containers and menus.
An update listener is added to keep the CompositeNavigator (if there is any)
up-to-date, the OutlinerContainer is connected to the
MDIComponent and the ToolBar objects
are registered as a DocumentListener as well.
getMDIComponent in class ApplicationFrameMDIComponent.ApplicationFrame.getMDIComponent()public ToolBar[] getToolBars()
0 of the internal ToolBar[].
getToolBars in class ApplicationFrameToolBar instances used within this
ApplicationFrame.ApplicationFrame.getToolBars()
public void updateStatus(java.lang.Object caller,
java.lang.Object obj)
updateStatus in class ApplicationFramecaller - The caller of this method.obj - an optional parameter to pass an object along. This could be
the updated item for example.ApplicationFrame.updateStatus(Object, Object)public javax.swing.JRootPane getRootPane()
public void applyEvList()
uiItemEvList's apply
method and subsequently invoking it on all contained components of this
application rootpane.
public void installEvList()
Evaluable.installEvList()protected final void launchTasks()
getLauncherTasks()protected java.awt.Color getSplashRectColor()
protected java.awt.Color getSplashBackground()
protected java.awt.Insets getSplashWindowInsets()
protected java.awt.Color getSplashForeground()
protected boolean isSplashGradientEnabled()
true, to enable the drawing of a vertical gradient in the
progress bar of the splash screen.
true, to enable the drawing of a vertical gradient in the
progress bar of the splash screen.public void updateSplashStatus()
public java.awt.Container getMdiComponentContainer()
Container which uses a BorderLayout
as the LayoutManager.
Container which uses a BorderLayout
as the LayoutManager.protected LaunchTask[] getLauncherTasks()
protected final void setApplicationIcon()
protected java.awt.Image getApplicationIconImage()
null. Subclasses may override this method to specify
their own icon. If this method is not specified by a subclass, the frame
will use the java standard icon.
null.protected java.awt.Image getSplashScreenImage()
null. Subclasses may override this method to specify
a custom splashscreen image. If no such image is specified the default
Tensegrity Splash will be used.
null.public boolean showSplashScreen()
true, if the splash screen should be shown.
true, if the splash screen should be shown.protected void postLaunch()
protected void initServices()
public void savePreferences()
ApplicationFrame.getPreferences() returns null.
savePreferences in class ApplicationFramepublic MenuTool getMenuTool()
public void applyLookAndFeel()
LookAndFeel at runtime. This method will also
update the PreferenceDialog, if its visible (and available).
LookAndFeelCommandpublic javax.swing.JComponent getDomainSelectorComponent()
public java.lang.String toString()
public DockMDIComponent createDockMDIComponent(java.util.List initialdocuments,
MenuTool menuTool,
Command closeDocumentCommand,
UIManager uimanager)
DockMDIComponent
subclass.
initialdocuments - list of initial-document.menuTool - menutool reference.closeDocumentCommand - close document command.uimanager - the ui-manager to use.
public DocumentDropContext getDocumentDropContext()
ApplicationFrame
getDocumentDropContext in class ApplicationFramepublic PreferenceHelper getPreferenceHelper()
public void setPreferenceHelper(PreferenceHelper helper)
helper - the PreferenceHelper to set.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||