JGraphpad Pro
v6.0.5.0


com.jgraph.pad
Class JGraphpadFile

java.lang.Object
  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended bycom.jgraph.pad.JGraphpadFile
All Implemented Interfaces:
Cloneable, JGraphEditorFile, MutableTreeNode, Serializable, TreeNode
Direct Known Subclasses:
JGraphpadLibrary

public class JGraphpadFile
extends DefaultMutableTreeNode
implements JGraphEditorFile

Represents a file in the JGraphpad editor. A file may contain any number of children which are themselfes XML encodable.

See Also:
Serialized Form

Field Summary
protected  boolean isNew
          Specifies if the file has been saved since its creation.
protected  boolean modified
          Specifies if the file has been modified since the last save.
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
JGraphpadFile()
          Constructs a new file.
JGraphpadFile(String filename)
          Constructs a new file using the filename as the user object.
 
Method Summary
 String getFilename()
          Returns the filename.
 boolean isModified()
          Returns true if the file was modified since the last save.
 boolean isNew()
          Returns true if the file has never been saved since its creation.
 void setFilename(String filename)
          Sets the filename.
 void setModified(boolean modified)
          Sets the modified state.
 void setNew(boolean isNew)
          Sets the isNew state.
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.swing.tree.MutableTreeNode
insert, remove, remove, removeFromParent, setParent, setUserObject
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
 

Field Detail

modified

protected transient boolean modified
Specifies if the file has been modified since the last save.


isNew

protected transient boolean isNew
Specifies if the file has been saved since its creation.

Constructor Detail

JGraphpadFile

public JGraphpadFile()
Constructs a new file.


JGraphpadFile

public JGraphpadFile(String filename)
Constructs a new file using the filename as the user object.

Parameters:
filename - The user object of the parent object.
Method Detail

setNew

public void setNew(boolean isNew)
Description copied from interface: JGraphEditorFile
Sets the isNew state.

Specified by:
setNew in interface JGraphEditorFile
Parameters:
isNew - The isNew state to set.

isNew

public boolean isNew()
Description copied from interface: JGraphEditorFile
Returns true if the file has never been saved since its creation.

Specified by:
isNew in interface JGraphEditorFile
Returns:
Returns the isNew state.

setModified

public void setModified(boolean modified)
Description copied from interface: JGraphEditorFile
Sets the modified state.

Specified by:
setModified in interface JGraphEditorFile
Parameters:
modified - The modified state to set.

isModified

public boolean isModified()
Description copied from interface: JGraphEditorFile
Returns true if the file was modified since the last save.

Specified by:
isModified in interface JGraphEditorFile
Returns:
Returns the modified state.

setFilename

public void setFilename(String filename)
Description copied from interface: JGraphEditorFile
Sets the filename.

Specified by:
setFilename in interface JGraphEditorFile
Parameters:
filename - The filename to set.

getFilename

public String getFilename()
Description copied from interface: JGraphEditorFile
Returns the filename.

Specified by:
getFilename in interface JGraphEditorFile
Returns:
Returns the filename.

JGraphpad Pro
v6.0.5.0


Copyright (C) 2005 JGraph.com. All rights reserved.