|
JHotDraw 7.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jhotdraw.beans.AbstractBean
org.jhotdraw.app.AbstractApplication
public abstract class AbstractApplication
AbstractApplication.
| Field Summary | |
|---|---|
protected ResourceBundleUtil |
labels
|
static java.lang.String |
VIEW_COUNT_PROPERTY
|
| Fields inherited from class org.jhotdraw.beans.AbstractBean |
|---|
propertySupport |
| Fields inherited from interface org.jhotdraw.app.Application |
|---|
ACTIVE_VIEW_PROPERTY |
| Constructor Summary | |
|---|---|
AbstractApplication()
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
add(View p)
Adds a view to this application. |
void |
addPalette(java.awt.Window palette)
Adds a palette window to the application. |
void |
addRecentFile(java.io.File file)
Appends a file to the list of recent files. |
void |
addWindow(java.awt.Window window,
View p)
Adds a (regular) window to the application. |
protected View |
basicCreateView()
|
void |
clearRecentFiles()
Clears the list of recent files. |
void |
configure(java.lang.String[] args)
Configures the application using the provided arguments array. |
java.awt.Container |
createContainer()
|
View |
createView()
Creates a new view for this application. |
void |
dispose(View p)
This is a convenience method for removing a view and disposing it. |
View |
getActiveView()
Gets the active view. |
java.lang.String |
getCopyright()
Returns the copyright of the application. |
ApplicationModel |
getModel()
Returns the application model. |
java.lang.String |
getName()
Returns the name of the application. |
java.lang.String |
getVersion()
Returns the version of the application. |
void |
init()
Initializes the application. |
protected void |
initLabels()
|
protected abstract void |
initViewActions(View p)
|
boolean |
isEnabled()
Returns the enabled state of the application. |
void |
launch(java.lang.String[] args)
Launches the application from the main method. |
java.util.List<java.io.File> |
recentFiles()
Returns the recently opened files. |
void |
remove(View p)
Removes a view from this application and removes it from the users view. |
void |
removePalette(java.awt.Window palette)
Removes a palette window from the application. |
void |
removeWindow(java.awt.Window window)
Removes a (regular) window from the application. |
void |
setActiveView(View newValue)
Sets the active view. |
void |
setEnabled(boolean newValue)
Sets the enabled state of the application. |
void |
setModel(ApplicationModel newValue)
Sets the application model. |
void |
start()
Starts the application. |
void |
stop()
Stops the application without saving any unsaved views. |
java.util.Collection<View> |
views()
Returns a read only collection view of the views of this application. |
| Methods inherited from class org.jhotdraw.beans.AbstractBean |
|---|
addPropertyChangeListener, addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jhotdraw.app.Application |
|---|
addPropertyChangeListener, getComponent, hide, isSharingToolsAmongViews, removePropertyChangeListener, show |
| Field Detail |
|---|
protected ResourceBundleUtil labels
public static final java.lang.String VIEW_COUNT_PROPERTY
| Constructor Detail |
|---|
public AbstractApplication()
| Method Detail |
|---|
public void init()
Applicationconfigure() should have been invoked before the application
is inited. Alternatively an application can be configured using setter
methods.
init in interface Applicationpublic void start()
Applicationinit() must have been invoked before the application is started.
start in interface Applicationpublic final View createView()
Application
createView in interface Applicationpublic void setModel(ApplicationModel newValue)
Application
setModel in interface Applicationpublic ApplicationModel getModel()
Application
getModel in interface Applicationprotected View basicCreateView()
public void setActiveView(View newValue)
newValue - Active view, can be null.public View getActiveView()
getActiveView in interface Applicationpublic java.lang.String getName()
Application
getName in interface Applicationpublic java.lang.String getVersion()
Application
getVersion in interface Applicationpublic java.lang.String getCopyright()
Application
getCopyright in interface Applicationprotected abstract void initViewActions(View p)
public void stop()
Applicationinit() must have been invoked before the application is stopped.
stop in interface Applicationpublic void remove(View p)
Application
remove in interface Applicationpublic void add(View p)
Application
add in interface Applicationpublic void dispose(View p)
Application
dispose in interface Applicationpublic java.util.Collection<View> views()
Application
views in interface Applicationpublic boolean isEnabled()
Application
isEnabled in interface Applicationpublic void setEnabled(boolean newValue)
Application
setEnabled in interface Applicationpublic java.awt.Container createContainer()
public void launch(java.lang.String[] args)
Application
launch in interface Applicationprotected void initLabels()
public void configure(java.lang.String[] args)
Application
configure in interface Applicationpublic java.util.List<java.io.File> recentFiles()
Application
recentFiles in interface Applicationpublic void clearRecentFiles()
Application
clearRecentFiles in interface Applicationpublic void addRecentFile(java.io.File file)
Application
addRecentFile in interface Applicationpublic void removePalette(java.awt.Window palette)
Application
removePalette in interface Applicationpublic void addPalette(java.awt.Window palette)
Application
addPalette in interface Applicationpublic void removeWindow(java.awt.Window window)
Application
removeWindow in interface Application
public void addWindow(java.awt.Window window,
View p)
Application
addWindow in interface Applicationwindow - The window.p - The View to which this window is associated, or null,
if the window is associated to the application.
|
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 | ||||||||