com.redcarton.photonotes
Class PhotoNote

java.lang.Object
  extended bycom.redcarton.photonotes.PhotoNote

public class PhotoNote
extends java.lang.Object

Version:
1.0 2005-04-14
Author:
Dominique Bischof

Constructor Summary
PhotoNote()
           
 
Method Summary
 boolean canWrite()
          Checks whether the note's file location can be written to.
 boolean delete()
          Deletes the note file.
 boolean exists()
          Checks whether the note exists in a file or not.
 java.lang.String getText()
          Returns the note's text.
 boolean setFile(java.io.File file)
          Sets the file that contains the note.
 boolean setText(java.lang.String text)
          Sets the note's text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhotoNote

public PhotoNote()
Method Detail

getText

public java.lang.String getText()
Returns the note's text.

Returns:
The note text

canWrite

public boolean canWrite()
Checks whether the note's file location can be written to.

Returns:
true if the file location can be written to, false if it cannot

exists

public boolean exists()
Checks whether the note exists in a file or not.

Returns:
true if the note exists, false if it does not

delete

public boolean delete()
Deletes the note file.

Returns:
true if the note was successfully deleted, false if it is not

setFile

public boolean setFile(java.io.File file)
Sets the file that contains the note.

Parameters:
file - The file to set
Returns:
true if the file was successfully set, false if it is not

setText

public boolean setText(java.lang.String text)
Sets the note's text.

Parameters:
text - The text to set
Returns:
true if the text was successfully set, false if it is not