|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.skeleton.domain.Model
com.jgoodies.skeleton.model.MainModel
public final class MainModel
References all application-level data or submodels and provides convenience accessors.
Field Summary | |
---|---|
static String |
PROPERTYNAME_PROJECT
|
Constructor Summary | |
---|---|
MainModel()
Constructs a MainModel that has no project set,
no selection and no tree model. |
Method Summary | |
---|---|
void |
aboutToExitApplication(Object eventSource)
Leaves the application if nobody vetos against the close request. |
EditorModel |
getEditorModel()
Returns the editor submodel. |
Action |
getExitAction()
|
NavigationModel |
getNavigationModel()
Returns the navigation submodel. |
Action |
getNewProjectAction()
|
Action |
getOpenAboutDialogAction()
|
Action |
getOpenPrintDialogAction()
|
Action |
getOpenProjectAction()
|
Action |
getPrintAction()
|
Project |
getProject()
Returns the current project. |
Action |
getSaveAction()
|
Action |
getSaveAsAction()
|
boolean |
hasProject()
Checks and answers if a project is loaded. |
boolean |
isProjectFilePathValid()
Checks and answers whether the project's file path is valid. |
void |
setDefaultParentFrame(Frame defaultParentFrame)
Sets a frame as the default parent for this controller's dialogs. |
void |
setProject(Project newProject)
Sets a new project. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTYNAME_PROJECT
Constructor Detail |
---|
public MainModel()
MainModel
that has no project set,
no selection and no tree model.
Method Detail |
---|
public NavigationModel getNavigationModel()
public EditorModel getEditorModel()
public Project getProject()
public void setProject(Project newProject)
newProject
- the project to set
NullPointerException
- if the new project is nullpublic boolean hasProject()
public boolean isProjectFilePathValid()
public void aboutToExitApplication(Object eventSource)
public void setDefaultParentFrame(Frame defaultParentFrame)
defaultParentFrame
- the default parentpublic Action getNewProjectAction()
public Action getOpenProjectAction()
public Action getSaveAction()
public Action getSaveAsAction()
public Action getPrintAction()
public Action getOpenPrintDialogAction()
public Action getExitAction()
public Action getOpenAboutDialogAction()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |