|
JHotDraw 7rev733 | ||||||||
| 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.AbstractApplicationModel
public abstract class AbstractApplicationModel
This abstract class can be extended to implement an ApplicationModel.
| Field Summary | |
|---|---|
protected boolean |
allowMultipleViewsForURI
|
protected java.lang.String |
copyright
|
static java.lang.String |
COPYRIGHT_PROPERTY
|
protected java.lang.String |
name
|
static java.lang.String |
NAME_PROPERTY
|
protected boolean |
openLastURIOnLaunch
|
protected java.lang.String |
version
|
static java.lang.String |
VERSION_PROPERTY
|
static java.lang.String |
VIEW_CLASS_NAME_PROPERTY
|
static java.lang.String |
VIEW_CLASS_PROPERTY
|
protected java.lang.Class |
viewClass
|
protected java.lang.String |
viewClassName
|
| Fields inherited from class org.jhotdraw.beans.AbstractBean |
|---|
propertySupport |
| Constructor Summary | |
|---|---|
AbstractApplicationModel()
Creates a new instance. |
|
| Method Summary | |
|---|---|
URIChooser |
createExportChooser(Application a,
View v)
Returns createSaveChooser. |
URIChooser |
createImportChooser(Application a,
View v)
Returns createOpenChooser. |
URIChooser |
createOpenChooser(Application a,
View v)
Creates an open chooser. |
URIChooser |
createOpenDirectoryChooser(Application a,
View v)
Creates an open chooser for directories. |
URIChooser |
createSaveChooser(Application a,
View v)
Creates a save chooser. |
abstract java.util.List<javax.swing.JToolBar> |
createToolBars(Application a,
View p)
Creates toolbars for the application. |
View |
createView()
Creates a new view for the application. |
void |
destroyApplication(Application a)
This method is empty. |
void |
destroyView(Application a,
View p)
This method is empty. |
java.lang.String |
getCopyright()
Returns the copyright of the application. |
java.lang.String |
getName()
Returns the name of the application. |
java.lang.String |
getVersion()
Returns the version of the application. |
java.lang.Class |
getViewClass()
|
void |
initApplication(Application a)
This method is empty. |
void |
initView(Application a,
View p)
This method is empty. |
boolean |
isAllowMultipleViewsPerURI()
Returns true if the application may open multiple views for the same URI. |
boolean |
isOpenLastURIOnLaunch()
Returns true if the application should open the last opened URI on launch instead of opening an empty view. |
void |
setAllowMultipleViewsForURI(boolean allowMultipleViewsForURI)
Whether the application may open multiple views for the same URI. |
void |
setCopyright(java.lang.String newValue)
|
void |
setName(java.lang.String newValue)
|
void |
setOpenLastURIOnLaunch(boolean openLastURIOnLaunch)
Whether the application should open the last opened URI on launch. |
void |
setVersion(java.lang.String newValue)
|
void |
setViewClass(java.lang.Class newValue)
Use this method only, if setViewClassName() does not suit you. |
void |
setViewClassName(java.lang.String newValue)
Use this method for best application startup performance. |
| Methods inherited from class org.jhotdraw.beans.AbstractBean |
|---|
addPropertyChangeListener, addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, 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.ApplicationModel |
|---|
createActionMap, getMenuBuilder |
| Field Detail |
|---|
protected java.lang.String name
protected java.lang.String version
protected java.lang.String copyright
protected java.lang.Class viewClass
protected java.lang.String viewClassName
protected boolean allowMultipleViewsForURI
protected boolean openLastURIOnLaunch
public static final java.lang.String NAME_PROPERTY
public static final java.lang.String VERSION_PROPERTY
public static final java.lang.String COPYRIGHT_PROPERTY
public static final java.lang.String VIEW_CLASS_NAME_PROPERTY
public static final java.lang.String VIEW_CLASS_PROPERTY
| Constructor Detail |
|---|
public AbstractApplicationModel()
| Method Detail |
|---|
public void setName(java.lang.String newValue)
public java.lang.String getName()
ApplicationModel
getName in interface ApplicationModelpublic void setVersion(java.lang.String newValue)
public java.lang.String getVersion()
ApplicationModel
getVersion in interface ApplicationModelpublic void setCopyright(java.lang.String newValue)
public java.lang.String getCopyright()
ApplicationModel
getCopyright in interface ApplicationModelpublic void setViewClassName(java.lang.String newValue)
public void setViewClass(java.lang.Class newValue)
public java.lang.Class getViewClass()
public View createView()
ApplicationModel
createView in interface ApplicationModel
public abstract java.util.List<javax.swing.JToolBar> createToolBars(Application a,
@Nullable
View p)
createToolBars in interface ApplicationModela - Application.p - The view for which the toolbars need to be created, or null
if the toolbars are shared by multiple views.
public void initView(Application a,
View p)
initView in interface ApplicationModel
public void destroyView(Application a,
View p)
destroyView in interface ApplicationModelpublic void initApplication(Application a)
initApplication in interface ApplicationModelpublic void destroyApplication(Application a)
destroyApplication in interface ApplicationModel
public URIChooser createOpenChooser(Application a,
@Nullable
View v)
ApplicationModel
createOpenChooser in interface ApplicationModela - Application.v - The view for which the chooser needs to be created, or null
if the chooser is shared by multiple views.
public URIChooser createOpenDirectoryChooser(Application a,
@Nullable
View v)
ApplicationModel
createOpenDirectoryChooser in interface ApplicationModela - Application.v - The view for which the chooser needs to be created, or null
if the chooser is shared by multiple views.
public URIChooser createSaveChooser(Application a,
@Nullable
View v)
ApplicationModel
createSaveChooser in interface ApplicationModela - Application.v - The view for which the chooser needs to be created, or null
if the chooser is shared by multiple views.
public URIChooser createImportChooser(Application a,
@Nullable
View v)
createImportChooser in interface ApplicationModela - Application.v - The view for which the chooser needs to be created, or null
if the chooser is shared by multiple views.
public URIChooser createExportChooser(Application a,
@Nullable
View v)
createExportChooser in interface ApplicationModela - Application.v - The view for which the chooser needs to be created, or null
if the chooser is shared by multiple views.public boolean isOpenLastURIOnLaunch()
This method defines an API for the Open last URI on Launch feature.
See org.jhotdraw.app.
The default value is true.
isOpenLastURIOnLaunch in interface ApplicationModelpublic boolean isAllowMultipleViewsPerURI()
This method defines an API for the Allow multiple views for URI feature.
See org.jhotdraw.app.
The default value is true.
isAllowMultipleViewsPerURI in interface ApplicationModelpublic void setAllowMultipleViewsForURI(boolean allowMultipleViewsForURI)
The default value is true.
allowMultipleViewsForURI - public void setOpenLastURIOnLaunch(boolean openLastURIOnLaunch)
The default value is false.
openLastURIOnLaunch -
|
Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project. Some rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||