|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.binding.beans.Model
com.jgoodies.skeleton.model.MainModel
public final class MainModel
Provides bound bean properties for the project, navigation tree, navigation tree selection, selection type. Refers to the presentation settings and a submodel for the dynamic help.
NavigationModel
,
UISettingsModel
,
DynamicHelpModel
,
Serialized FormField Summary | |
---|---|
static String |
ACTION_CLOSE_HELP_VIEW
|
static String |
ACTION_EXIT
|
static String |
ACTION_NEW_PROJECT
|
static String |
ACTION_OPEN_ABOUT_DIALOG
|
static String |
ACTION_OPEN_HELP_CONTENTS
|
static String |
ACTION_OPEN_PAGE_SETUP
|
static String |
ACTION_OPEN_PREFERENCES
|
static String |
ACTION_OPEN_PRINT_DIALOG
|
static String |
ACTION_OPEN_PROJECT
|
static String |
ACTION_OPEN_TIP_OF_THE_DAY
|
static String |
ACTION_PRINT
|
static String |
ACTION_SAVE
|
static String |
ACTION_SAVE_AS
|
static String |
PROPERTYNAME_PROJECT
|
Constructor Summary | |
---|---|
MainModel()
Constructs a MainModel that has no project set, no selection and no tree model. |
Method Summary | |
---|---|
boolean |
applicationExitAllowed(EventObject event)
Checks and answers whether we accept a close request. |
void |
applicationExiting()
Stores this model's state if the application is closing. |
void |
checkForOpenTipOfTheDayDialog()
Checks if we shall show a tip of the day: asks the TipOfTheDayDialog whether it is enabled, and the SetupManager, if we are not running for the first time. |
void |
closeHelpView(ActionEvent e)
|
void |
exit(ActionEvent e)
|
EditorModel |
getEditorModel()
Returns the editor submodel. |
DynamicHelpModel |
getHelpModel()
Returns the submodel that provides bound properties for the help tree model, selection, help page and help visibility. |
NavigationModel |
getNavigationModel()
Returns the navigation submodel. |
Project |
getProject()
Returns the current project. |
UISettingsModel |
getUiSettingsModel()
Returns the UI related settings. |
boolean |
hasProject()
Checks and answers if a project is loaded. |
boolean |
isProjectFilePathValid()
Checks and answers whether the project's file path is valid. |
void |
newProject()
Creates a new project and sets it in the main model. |
void |
openAboutDialog(ActionEvent e)
Opens the about dialog. |
void |
openHelpContents(ActionEvent e)
|
void |
openPageSetup(ActionEvent e)
|
void |
openPreferences(ActionEvent e)
Opens the preferences dialog. |
void |
openPrintDialog(ActionEvent e)
Opens a print dialog, then prints a project summary to the choosen printer. |
void |
openProject(ActionEvent e)
Opens a file chooser, loads a project from a file, and sets it in the main model. |
void |
openTipOfTheDay(ActionEvent e)
Opens the tip-of-the-day dialog. |
void |
print(ActionEvent e)
Prints a project summary. |
void |
restoreState()
Restores the application state from the user preferences. |
void |
save(ActionEvent e)
Saves the project to the current file. |
void |
saveAs(ActionEvent e)
Asks the user for a file name and saves the project to that file. |
void |
setProject(Project newProject)
Sets a new project. |
void |
storeState()
Stores the application state to the user preferences. |
Methods inherited from class com.jgoodies.binding.beans.Model |
---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
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
public static final String ACTION_NEW_PROJECT
public static final String ACTION_OPEN_PROJECT
public static final String ACTION_SAVE
public static final String ACTION_SAVE_AS
public static final String ACTION_OPEN_PAGE_SETUP
public static final String ACTION_PRINT
public static final String ACTION_OPEN_PRINT_DIALOG
public static final String ACTION_OPEN_PREFERENCES
public static final String ACTION_EXIT
public static final String ACTION_OPEN_TIP_OF_THE_DAY
public static final String ACTION_OPEN_HELP_CONTENTS
public static final String ACTION_OPEN_ABOUT_DIALOG
public static final String ACTION_CLOSE_HELP_VIEW
Constructor Detail |
---|
public MainModel()
Method Detail |
---|
public NavigationModel getNavigationModel()
public EditorModel getEditorModel()
public DynamicHelpModel getHelpModel()
public UISettingsModel getUiSettingsModel()
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 applicationExiting()
applicationExiting
in interface com.jgoodies.uif.application.ExitListener
public boolean applicationExitAllowed(EventObject event)
TODO: Warn if the edited object is invalid and offer to cancel the exit operation.
applicationExitAllowed
in interface com.jgoodies.uif.application.ExitListener
@Action public void newProject()
@Action public void openProject(ActionEvent e)
@Action public void save(ActionEvent e)
@Action public void saveAs(ActionEvent e)
@Action public void openPageSetup(ActionEvent e)
@Action public void print(ActionEvent e)
@Action public void openPrintDialog(ActionEvent e)
@Action public void openPreferences(ActionEvent e)
@Action public void exit(ActionEvent e)
public void checkForOpenTipOfTheDayDialog()
Opens the tip of the day dialog in the event dispatch thread.
@Action public void openTipOfTheDay(ActionEvent e)
e
- the ActionEvent in user interaction,
or null
if invoked at application startup@Action public void openHelpContents(ActionEvent e)
@Action public void openAboutDialog(ActionEvent e)
@Action public void closeHelpView(ActionEvent e)
public void restoreState()
public void storeState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |