|
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()
Application
configure()
should have been invoked before the application
is inited. Alternatively an application can be configured using setter
methods.
init
in interface Application
public void start()
Application
init()
must have been invoked before the application is started.
start
in interface Application
public final View createView()
Application
createView
in interface Application
public void setModel(ApplicationModel newValue)
Application
setModel
in interface Application
public ApplicationModel getModel()
Application
getModel
in interface Application
protected View basicCreateView()
public void setActiveView(View newValue)
newValue
- Active view, can be null.public View getActiveView()
getActiveView
in interface Application
public java.lang.String getName()
Application
getName
in interface Application
public java.lang.String getVersion()
Application
getVersion
in interface Application
public java.lang.String getCopyright()
Application
getCopyright
in interface Application
protected abstract void initViewActions(View p)
public void stop()
Application
init()
must have been invoked before the application is stopped.
stop
in interface Application
public void remove(View p)
Application
remove
in interface Application
public void add(View p)
Application
add
in interface Application
public void dispose(View p)
Application
dispose
in interface Application
public java.util.Collection<View> views()
Application
views
in interface Application
public boolean isEnabled()
Application
isEnabled
in interface Application
public void setEnabled(boolean newValue)
Application
setEnabled
in interface Application
public java.awt.Container createContainer()
public void launch(java.lang.String[] args)
Application
launch
in interface Application
protected void initLabels()
public void configure(java.lang.String[] args)
Application
configure
in interface Application
public java.util.List<java.io.File> recentFiles()
Application
recentFiles
in interface Application
public void clearRecentFiles()
Application
clearRecentFiles
in interface Application
public void addRecentFile(java.io.File file)
Application
addRecentFile
in interface Application
public void removePalette(java.awt.Window palette)
Application
removePalette
in interface Application
public void addPalette(java.awt.Window palette)
Application
addPalette
in interface Application
public void removeWindow(java.awt.Window window)
Application
removeWindow
in interface Application
public void addWindow(java.awt.Window window, View p)
Application
addWindow
in interface Application
window
- 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 |