public abstract class AbstractApplicationModel extends AbstractBean implements ApplicationModel
ApplicationModel
.Modifier and Type | Field and Description |
---|---|
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 |
propertySupport
Constructor and Description |
---|
AbstractApplicationModel()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
addPropertyChangeListener, addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createActionMap, getMenuBuilder
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
public AbstractApplicationModel()
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 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.