java.lang.Object
org.jhotdraw8.application.AbstractDisableable
org.jhotdraw8.application.AbstractActivity
org.jhotdraw8.application.AbstractFileBasedActivity
- All Implemented Interfaces:
Activity,FileBasedActivity,PropertyBean,Disableable
public abstract class AbstractFileBasedActivity
extends AbstractActivity
implements FileBasedActivity
AbstractFileBasedActivity.
- Author:
- Werner Randelshofer
-
Property Summary
PropertiesTypePropertyDescription@NonNull javafx.beans.property.ObjectProperty<javafx.scene.input.DataFormat> This property specifies the format that is used for storing the content in the file.@NonNull javafx.beans.property.BooleanPropertyThe modified property indicates that the content has been modified and needs to be saved to the file.This property is used to identify the file that is used for storing the content.Properties inherited from class org.jhotdraw8.application.AbstractActivity
actions, application, disambiguation, titleProperties inherited from class org.jhotdraw8.application.AbstractDisableable
disabledProperties inherited from interface org.jhotdraw8.application.Activity
actions, application, disambiguationProperties inherited from interface org.jhotdraw8.fxbase.control.Disableable
disabledProperties inherited from interface org.jhotdraw8.application.FileBasedActivity
title -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final javafx.beans.property.ObjectProperty<javafx.scene.input.DataFormat> protected final javafx.beans.property.BooleanPropertyprotected final javafx.beans.property.ObjectProperty<URI> Fields inherited from class org.jhotdraw8.application.AbstractActivity
application, properties, titleFields inherited from class org.jhotdraw8.application.AbstractDisableable
disabled, disablersFields inherited from interface org.jhotdraw8.application.Activity
APPLICATION_PROPERTY, DISAMBIGUATION_PROPERTY, TITLE_PROPERTYFields inherited from interface org.jhotdraw8.fxbase.control.Disableable
DISABLED_PROPERTYFields inherited from interface org.jhotdraw8.application.FileBasedActivity
DATA_FORMAT_PROPERTY, MODIFIED_PROPERTY, URI_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the modified property.@NonNull javafx.beans.property.ObjectProperty<javafx.scene.input.DataFormat> This property specifies the format that is used for storing the content in the file.voiddestroy()Destroys the activity.protected voidinitActions(@NonNull javafx.collections.ObservableMap<String, Action> map) protected voidprotected void@NonNull javafx.beans.property.BooleanPropertyThe modified property indicates that the content has been modified and needs to be saved to the file.This property is used to identify the file that is used for storing the content.Methods inherited from class org.jhotdraw8.application.AbstractActivity
actionsProperty, applicationProperty, disambiguationProperty, getProperties, init, initView, start, stop, titlePropertyMethods inherited from class org.jhotdraw8.application.AbstractDisableable
disabledProperty, disablersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.application.Activity
actionsProperty, applicationProperty, disambiguationProperty, getActions, getApplication, getDisambiguation, getNode, getTitle, init, setApplication, setDisambiguation, setTitle, start, stopMethods inherited from interface org.jhotdraw8.fxbase.control.Disableable
addDisabler, disabledProperty, disablers, isDisabled, removeDisablerMethods inherited from interface org.jhotdraw8.application.FileBasedActivity
clear, getDataFormat, getURI, isEmpty, isModified, print, read, read, setDataFormat, setURI, titleProperty, write, writeMethods inherited from interface org.jhotdraw8.fxbase.beans.PropertyBean
get, getNonNull, getProperties, getProperty, put, remove, set, setNonNull, valueAt
-
Property Details
-
modified
- Specified by:
modifiedPropertyin interfaceFileBasedActivity- Returns:
- the modified property
- See Also:
-
uri
- Specified by:
uriPropertyin interfaceFileBasedActivity- Returns:
- the resource
- See Also:
-
dataFormat
public @NonNull javafx.beans.property.ObjectProperty<javafx.scene.input.DataFormat> dataFormatProperty- Specified by:
dataFormatPropertyin interfaceFileBasedActivity- Returns:
- the data format of the content
- See Also:
-
-
Field Details
-
modified
protected final javafx.beans.property.BooleanProperty modified -
uri
-
dataFormat
protected final javafx.beans.property.ObjectProperty<javafx.scene.input.DataFormat> dataFormat
-
-
Constructor Details
-
AbstractFileBasedActivity
public AbstractFileBasedActivity()
-
-
Method Details
-
initTitle
protected void initTitle()- Specified by:
initTitlein classAbstractActivity
-
modifiedProperty
Description copied from interface:FileBasedActivityThe modified property indicates that the content has been modified and needs to be saved to the file.This property is set to true if a change in the content has been detected.
The property is only set to false by calling
FileBasedActivity.clearModified(). This is typically done by anActioninvoked by the user, or by an automatic save function managed by theApplication.- Specified by:
modifiedPropertyin interfaceFileBasedActivity- Returns:
- the
modifiedproperty
-
clearModified
public void clearModified()Description copied from interface:FileBasedActivityClears the modified property.- Specified by:
clearModifiedin interfaceFileBasedActivity- See Also:
-
markAsModified
protected void markAsModified() -
uriProperty
Description copied from interface:FileBasedActivityThis property is used to identify the file that is used for storing the content.This property is managed by the
Actions that load and save the content from/to the file.- Specified by:
uriPropertyin interfaceFileBasedActivity- Returns:
- the
uriproperty
-
dataFormatProperty
public @NonNull javafx.beans.property.ObjectProperty<javafx.scene.input.DataFormat> dataFormatProperty()Description copied from interface:FileBasedActivityThis property specifies the format that is used for storing the content in the file.This property is managed by
Actions. Typically by actions that load or save the content, and actions that manage file properties.- Specified by:
dataFormatPropertyin interfaceFileBasedActivity- Returns:
- the
dataFormatproperty
-
initActions
- Specified by:
initActionsin classAbstractActivity
-
destroy
public void destroy()Description copied from interface:ActivityDestroys the activity.See life-cycle in
Activity.- Specified by:
destroyin interfaceActivity- Overrides:
destroyin classAbstractActivity
-