|
JHotDraw 7.5.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.AbstractApplicationModel
public abstract class AbstractApplicationModel
This abstract class can be extended to implement an ApplicationModel
.
Field Summary | |
---|---|
protected java.lang.String |
copyright
|
static java.lang.String |
COPYRIGHT_PROPERTY
|
protected java.lang.String |
name
|
static java.lang.String |
NAME_PROPERTY
|
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. |
abstract java.util.List<javax.swing.JMenu> |
createMenus(Application a,
View p)
Creates menus. |
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. |
void |
setCopyright(java.lang.String newValue)
|
void |
setName(java.lang.String newValue)
|
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 |
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
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 ApplicationModel
public void setVersion(java.lang.String newValue)
public java.lang.String getVersion()
ApplicationModel
getVersion
in interface ApplicationModel
public void setCopyright(java.lang.String newValue)
public java.lang.String getCopyright()
ApplicationModel
getCopyright
in interface ApplicationModel
public 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, View p)
createToolBars
in interface ApplicationModel
a
- Application.p
- The view for which the toolbars need to be created, or null
if the toolbars are shared by multiple views.public abstract java.util.List<javax.swing.JMenu> createMenus(Application a, View p)
ApplicationModel
Depending on the document interface of the application, this method may be invoked only once for the application, or for each opened view.
If this method creates a menu with the same title as a standard menu
created by Application
, the menu created by this method is used.
This method can create a standard menu from scratch, or call one of the
createMenu-methods in Application
and add additional items
to the menu.
createMenus
in interface ApplicationModel
a
- Application.p
- The view for which the toolbars need to be created, or null
if the menus 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 ApplicationModel
public void initApplication(Application a)
initApplication
in interface ApplicationModel
public void destroyApplication(Application a)
destroyApplication
in interface ApplicationModel
public URIChooser createOpenChooser(Application a, View v)
ApplicationModel
createOpenChooser
in interface ApplicationModel
a
- 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, View v)
ApplicationModel
createOpenDirectoryChooser
in interface ApplicationModel
a
- 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, View v)
ApplicationModel
createSaveChooser
in interface ApplicationModel
a
- 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, View v)
createImportChooser
in interface ApplicationModel
a
- 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, View v)
createExportChooser
in interface ApplicationModel
a
- Application.v
- The view for which the chooser needs to be created, or null
if the chooser is shared by multiple views.
|
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 |