uk.ac.essex.common.gui
Class ApplicationFileImpl<T>

java.lang.Object
  extended by uk.ac.essex.common.gui.ApplicationFileImpl<T>
All Implemented Interfaces:
ApplicationFile<T>
Direct Known Subclasses:
ImageFile, OperationFile

public abstract class ApplicationFileImpl<T>
extends java.lang.Object
implements ApplicationFile<T>

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


Field Summary
protected  T data
           
protected static java.lang.String DEFAULT_NAME
           
protected  java.io.File file
           
protected  boolean isModified
           
protected  java.lang.String name
           
 
Constructor Summary
ApplicationFileImpl()
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 T 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(T 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 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

name

protected transient java.lang.String name

data

protected T data

isModified

protected boolean isModified
Constructor Detail

ApplicationFileImpl

public ApplicationFileImpl()
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<T>
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<T>
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<T>
Returns:

setUseFullPathForName

public void setUseFullPathForName(boolean useFullPath)
Specified by:
setUseFullPathForName in interface ApplicationFile<T>
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<T>
Returns:

getData

public T getData()
Get the object that contains the data for this file

Specified by:
getData in interface ApplicationFile<T>
Returns:

setData

public void setData(T data)
Specified by:
setData in interface ApplicationFile<T>
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<T>
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<T>