uk.ac.essex.common.gui.impl
Class ApplicationFileImpl

java.lang.Object
  extended by uk.ac.essex.common.gui.impl.ApplicationFileImpl
All Implemented Interfaces:
ApplicationFile

public abstract class ApplicationFileImpl
extends java.lang.Object
implements ApplicationFile

This class represents an Application File. This files represent objects that can be opened in an application.
Date: Apr 13, 2002


Field Summary
protected  java.lang.Object data
           
protected static java.lang.String DEFAULT_NAME
           
protected  java.io.File file
           
protected  boolean isModified
           
 
Constructor Summary
  ApplicationFileImpl()
           
protected ApplicationFileImpl(java.io.File file)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.Object getData()
          Get the object that contains the data for this file
 java.io.File getFile()
          Get the java.io.File that this object is bound too
 java.lang.String getName()
           
 boolean hasFile()
          Has this object been bound to a java.io.File
 boolean isModified()
          Is this file modified, ie/ it needs saving.
 void setData(java.lang.Object data)
           
 void setFile(java.io.File file)
          Set the java.io.File that this object is bound too
 void setModified(boolean modified)
          Sets the modifed flag on this file
 void setName(java.lang.String name)
           
 void setUseFullPathForName(boolean useFullPath)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NAME

protected static final transient java.lang.String DEFAULT_NAME
See Also:
Constant Field Values

file

protected transient java.io.File file

data

protected java.lang.Object data

isModified

protected boolean isModified
Constructor Detail

ApplicationFileImpl

public ApplicationFileImpl()

ApplicationFileImpl

protected ApplicationFileImpl(java.io.File file)
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object
Parameters:
o - - The object to test for equality
Returns:
true if o is an ApplicationFile and both the file and data fields are equal.

getFile

public java.io.File getFile()
Description copied from interface: ApplicationFile
Get the java.io.File that this object is bound too

Specified by:
getFile in interface ApplicationFile
Returns:
the java.io.File that this object is bound too

setFile

public void setFile(java.io.File file)
Description copied from interface: ApplicationFile
Set the java.io.File that this object is bound too

Specified by:
setFile in interface ApplicationFile
Parameters:
file - - the java.io.File that this object is bound too

hasFile

public boolean hasFile()
Has this object been bound to a java.io.File

Specified by:
hasFile in interface ApplicationFile
Returns:

setUseFullPathForName

public void setUseFullPathForName(boolean useFullPath)
Specified by:
setUseFullPathForName in interface ApplicationFile
Parameters:
useFullPath - - true to use the files full path for this files name

getName

public java.lang.String getName()
Specified by:
getName in interface ApplicationFile
Returns:

getData

public java.lang.Object getData()
Get the object that contains the data for this file

Specified by:
getData in interface ApplicationFile
Returns:

setData

public void setData(java.lang.Object data)
Specified by:
setData in interface ApplicationFile
Parameters:
data -

isModified

public boolean isModified()
Description copied from interface: ApplicationFile
Is this file modified, ie/ it needs saving.

Specified by:
isModified in interface ApplicationFile
Returns:
boolean - true if this is modified, false otherwise

setModified

public void setModified(boolean modified)
Description copied from interface: ApplicationFile
Sets the modifed flag on this file

Specified by:
setModified in interface ApplicationFile

setName

public void setName(java.lang.String name)