|
JHotDraw 7.0.9 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DocumentOrientedApplication
An DocumentOrientedApplication handles the lifecycle of Projects and provides windows to present them on screen. Depending on the document interface style used by the DocumentOrientedApplication, the DocumentOrientedApplication can handle multiple Projects at the same time, or only one.
Typical document interface styles are the Single Document Interface (SDI), the Multiple Document Interface (MDI) and the Mac OS X DocumentOrientedApplication Document Interface (OSX).
Typical usage of this class:
public class MyMainClass { public static void main(String[] args) { DocumentOrientedApplication application = new DefaultADIApplication(); DefaultApplicationModel model = new DefaultApplicationModel(); model.setName("MyAppliciation"); model.setVersion("1.0"); model.setCopyright("Copyright 2006 (c) Werner Randelshofer. All Rights Reserved."); model.setProjectClassName("org.jhotdraw.myapplication.MyProject"); application.setModel(model); application.launch(args); }
Method Summary | |
---|---|
void |
add(DocumentView v)
Adds a view to this application. |
void |
addPalette(java.awt.Window w)
Adds a palette window to the application. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a property change listener. |
void |
addRecentFile(java.io.File file)
Appends a file to the list of recent files. |
void |
clearRecentFiles()
Clears the list of recent files. |
DocumentView |
createView()
Creates a new view for this application. |
javax.swing.Action |
getAction(java.lang.Object key)
Gets the action with the specified key from the ActionMap of the application. |
java.awt.Component |
getComponent()
Returns the application component. |
DocumentView |
getCurrentView()
Returns the current view. |
java.util.Collection<DocumentView> |
getViews()
Returns a read only collection view of the getViews of this application. |
void |
hide(DocumentView v)
Hides a view. |
void |
initialize(java.lang.String[] args)
Initializes the application. |
boolean |
isEditorShared()
Returns true, if this application shares tools among multiple getViews. |
boolean |
isEnabled()
Returns the enabled state of the application. |
java.util.List<java.io.File> |
recentFiles()
Returns the recently opened files. |
void |
remove(DocumentView v)
Removes a view from this application and removes it from the users view. |
void |
removePalette(java.awt.Window w)
Removes a palette window from the application. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a property change listener. |
void |
setEnabled(boolean newValue)
Sets the enabled state of the application. |
void |
show(DocumentView v)
Shows a view. |
void |
shutdown()
Stops the application without saving any unsaved getViews. |
void |
startup()
Starts the application. |
Method Detail |
---|
void initialize(java.lang.String[] args)
configureAWT()
should have been invoked before the application
is inited. Alternatively an application can be configured using setter
methods.
void startup()
initialize()
must have been invoked before the application
is started.
void shutdown()
initialize()
must have been invoked before the application is stopped.
DocumentView createView()
void add(DocumentView v)
init
on the view.
Fires a "documentCount" property change event.
Invokes method setApplication(this) on the view object.
void remove(DocumentView v)
dispose
on the view.
Fires a "documentCount" property change event.
Invokes method setApplication(null) on the view object.
void show(DocumentView v)
start
on the view.
void hide(DocumentView v)
stop
on the view.
java.util.Collection<DocumentView> getViews()
DocumentView getCurrentView()
This is a bound property.
boolean isEnabled()
void setEnabled(boolean newValue)
void addPropertyChangeListener(java.beans.PropertyChangeListener l)
void removePropertyChangeListener(java.beans.PropertyChangeListener l)
boolean isEditorShared()
java.awt.Component getComponent()
java.util.List<java.io.File> recentFiles()
void addRecentFile(java.io.File file)
void clearRecentFiles()
void addPalette(java.awt.Window w)
void removePalette(java.awt.Window w)
javax.swing.Action getAction(java.lang.Object key)
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |