org.jhotdraw.app
Class AbstractApplicationModel
- java.lang.Object
-
- org.jhotdraw.beans.AbstractBean
-
- org.jhotdraw.app.AbstractApplicationModel
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, ApplicationModel
- Direct Known Subclasses:
- DefaultApplicationModel, EmptyApplicationModel
public abstract class AbstractApplicationModel extends AbstractBean implements ApplicationModel
This abstract class can be extended to implement anApplicationModel.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringCOPYRIGHT_PROPERTYstatic java.lang.StringNAME_PROPERTYstatic java.lang.StringVERSION_PROPERTYstatic java.lang.StringVIEW_CLASS_NAME_PROPERTYstatic java.lang.StringVIEW_CLASS_PROPERTY
-
Constructor Summary
Constructors Constructor and Description AbstractApplicationModel()Creates a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description URIChoosercreateExportChooser(Application a, View v)Returns createSaveChooser.URIChoosercreateImportChooser(Application a, View v)Returns createOpenChooser.URIChoosercreateOpenChooser(Application a, View v)Creates an open chooser.URIChoosercreateOpenDirectoryChooser(Application a, View v)Creates an open chooser for directories.URIChoosercreateSaveChooser(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.ViewcreateView()Creates a new view for the application.voiddestroyApplication(Application a)This method is empty.voiddestroyView(Application a, View p)This method is empty.java.lang.StringgetCopyright()Returns the copyright of the application.java.lang.StringgetName()Returns the name of the application.java.lang.StringgetVersion()Returns the version of the application.java.lang.ClassgetViewClass()voidinitApplication(Application a)This method is empty.voidinitView(Application a, View p)This method is empty.voidsetCopyright(java.lang.String newValue)voidsetName(java.lang.String newValue)voidsetVersion(java.lang.String newValue)voidsetViewClass(java.lang.Class newValue)Use this method only, if setViewClassName() does not suit you.voidsetViewClassName(java.lang.String newValue)Use this method for best application startup performance.-
Methods inherited from class org.jhotdraw.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, clone, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jhotdraw.app.ApplicationModel
createActionMap, getMenuBuilder
-
-
-
-
Field Detail
-
NAME_PROPERTY
public static final java.lang.String NAME_PROPERTY
- See Also:
- Constant Field Values
-
VERSION_PROPERTY
public static final java.lang.String VERSION_PROPERTY
- See Also:
- Constant Field Values
-
COPYRIGHT_PROPERTY
public static final java.lang.String COPYRIGHT_PROPERTY
- See Also:
- Constant Field Values
-
VIEW_CLASS_NAME_PROPERTY
public static final java.lang.String VIEW_CLASS_NAME_PROPERTY
- See Also:
- Constant Field Values
-
VIEW_CLASS_PROPERTY
public static final java.lang.String VIEW_CLASS_PROPERTY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractApplicationModel
public AbstractApplicationModel()
Creates a new instance.
-
-
Method Detail
-
setName
public void setName(java.lang.String newValue)
-
getName
public java.lang.String getName()
Description copied from interface:ApplicationModelReturns the name of the application.- Specified by:
getNamein interfaceApplicationModel
-
setVersion
public void setVersion(java.lang.String newValue)
-
getVersion
public java.lang.String getVersion()
Description copied from interface:ApplicationModelReturns the version of the application.- Specified by:
getVersionin interfaceApplicationModel
-
setCopyright
public void setCopyright(java.lang.String newValue)
-
getCopyright
public java.lang.String getCopyright()
Description copied from interface:ApplicationModelReturns the copyright of the application.- Specified by:
getCopyrightin interfaceApplicationModel
-
setViewClassName
public void setViewClassName(java.lang.String newValue)
Use this method for best application startup performance.
-
setViewClass
public void setViewClass(java.lang.Class newValue)
Use this method only, if setViewClassName() does not suit you.
-
getViewClass
public java.lang.Class getViewClass()
-
createView
public View createView()
Description copied from interface:ApplicationModelCreates a new view for the application.- Specified by:
createViewin interfaceApplicationModel
-
createToolBars
public abstract java.util.List<javax.swing.JToolBar> createToolBars(Application a, @Nullable View p)
Creates toolbars for the application.- Specified by:
createToolBarsin interfaceApplicationModel- Parameters:
a- Application.p- The view for which the toolbars need to be created, or null if the toolbars are shared by multiple views.
-
initView
public void initView(Application a, View p)
This method is empty.- Specified by:
initViewin interfaceApplicationModel
-
destroyView
public void destroyView(Application a, View p)
This method is empty.- Specified by:
destroyViewin interfaceApplicationModel
-
initApplication
public void initApplication(Application a)
This method is empty.- Specified by:
initApplicationin interfaceApplicationModel
-
destroyApplication
public void destroyApplication(Application a)
This method is empty.- Specified by:
destroyApplicationin interfaceApplicationModel
-
createOpenChooser
public URIChooser createOpenChooser(Application a, @Nullable View v)
Description copied from interface:ApplicationModelCreates an open chooser.- Specified by:
createOpenChooserin interfaceApplicationModel- Parameters:
a- Application.v- The view for which the chooser needs to be created, or null if the chooser is shared by multiple views.
-
createOpenDirectoryChooser
public URIChooser createOpenDirectoryChooser(Application a, @Nullable View v)
Description copied from interface:ApplicationModelCreates an open chooser for directories.- Specified by:
createOpenDirectoryChooserin interfaceApplicationModel- Parameters:
a- Application.v- The view for which the chooser needs to be created, or null if the chooser is shared by multiple views.
-
createSaveChooser
public URIChooser createSaveChooser(Application a, @Nullable View v)
Description copied from interface:ApplicationModelCreates a save chooser.- Specified by:
createSaveChooserin interfaceApplicationModel- Parameters:
a- Application.v- The view for which the chooser needs to be created, or null if the chooser is shared by multiple views.
-
createImportChooser
public URIChooser createImportChooser(Application a, @Nullable View v)
Returns createOpenChooser.- Specified by:
createImportChooserin interfaceApplicationModel- Parameters:
a- Application.v- The view for which the chooser needs to be created, or null if the chooser is shared by multiple views.
-
createExportChooser
public URIChooser createExportChooser(Application a, @Nullable View v)
Returns createSaveChooser.- Specified by:
createExportChooserin interfaceApplicationModel- Parameters:
a- Application.v- The view for which the chooser needs to be created, or null if the chooser is shared by multiple views.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG