01: /*
02: * $Id: JGraphEditorFile.java,v 1.1.1.1 2005/08/04 11:21:58 gaudenz Exp $
03: * Copyright (c) 2001-2005, Gaudenz Alder
04: *
05: * All rights reserved.
06: *
07: * See LICENSE file for license details. If you are unable to locate
08: * this file please contact info (at) jgraph (dot) com.
09: */
10: package com.jgraph.editor;
11:
12: import javax.swing.tree.MutableTreeNode;
13:
14: /**
15: * Defines the basic requirements for a file in a JGraph editor document model.
16: * A file contains an arbitrary set of children. The properties of document
17: * model elements shoudl be changed via the document model in order to update
18: * all attached listeners.
19: */
20: public interface JGraphEditorFile extends MutableTreeNode {
21:
22: /**
23: * Sets the modified state.
24: *
25: * @param modified
26: * The modified state to set.
27: */
28: public void setModified(boolean modified);
29:
30: /**
31: * Returns <code>true</code> if the file was modified since the last save.
32: *
33: * @return Returns the modified state.
34: */
35: public boolean isModified();
36:
37: /**
38: * Sets the isNew state.
39: *
40: * @param isNew
41: * The isNew state to set.
42: */
43: public void setNew(boolean isNew);
44:
45: /**
46: * Returns <code>true</code> if the file has never been saved since its
47: * creation.
48: *
49: * @return Returns the isNew state.
50: */
51: public boolean isNew();
52:
53: /**
54: * Sets the filename.
55: *
56: * @param filename
57: * The filename to set.
58: */
59: public void setFilename(String filename);
60:
61: /**
62: * Returns the filename.
63: *
64: * @return Returns the filename.
65: */
66: public String getFilename();
67:
68: }
|