|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Document
A document is used as a wrapper around a model to provide the typical Save / Save As / Open / New / Save Changes? behaviour that a user usually expects to see with persistent documents.
AbstractDocument
,
FileDocument
Method Summary | |
---|---|
boolean |
checkSaveChanges()
If the document has been changed, check with the user whether the model should be saved and optionally save it. |
Component |
getClient()
The UI client of this document. |
Object |
getModel()
The model contained by the document. |
String |
getName()
The name of the document. |
String |
getType()
The type of document eg "Spreadsheet". |
boolean |
isChanged()
True if the model or other part of the document has changed since last saved. |
Object |
newModel()
Create a new, empty model and set it as the document's model. |
boolean |
open()
Open a new model from a persistent source such as a file. |
boolean |
save()
Save the model to its original location. |
boolean |
saveAs()
Save the model to a new, user selected, location. |
void |
setChanged(boolean newValue)
|
void |
setModel(Object newModel)
Set the model contained by the document. |
Methods inherited from interface dsto.dfc.util.PropertyEventSource |
---|
addPropertyChangeListener, removePropertyChangeListener |
Method Detail |
---|
Component getClient()
void setModel(Object newModel) throws IllegalArgumentException
IllegalArgumentException
- if the model is not of the
correct type.Object getModel()
String getName()
String getType()
boolean isChanged()
void setChanged(boolean newValue)
Object newModel()
boolean open()
save()
,
saveAs()
boolean save()
saveAs()
.
saveAs()
,
open()
boolean saveAs()
save()
,
open()
boolean checkSaveChanges()
save()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |