org.jickr
Class Note

java.lang.Object
  extended by org.jickr.Note

public class Note
extends java.lang.Object

All the infomation about a Note attached to a Photo at Flickr. Notes in Flickr are areas of a photo associated with text.

Coordinates for the points returned are in pixels, based on the 500px image size shown on individual photo pages.

See Also:
Photo.getNotes()

Method Summary
 void delete()
          Delete this note.
 boolean equals(java.lang.Object o)
          Check if this Note is equal to the object supplied.
 java.awt.Rectangle getArea()
          Get the area covered by the note.
 User getAuthor()
          Get the Author of this note.
 int getHeight()
          Get the height of the note.
 java.lang.String getID()
          Get the unique identifier for this note.
 java.lang.String getText()
          Get the text of the note.
 int getWidth()
          Get the width of the note.
 int getX()
          Get the X origin point for the note.
 int getY()
          Get the Y origin point for the note.
 int hashCode()
          Return the HashCode of this Note, based on ID.
 void update(java.awt.Rectangle area, java.lang.String text)
          Modify the content and area of a Note.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getID

public java.lang.String getID()
Get the unique identifier for this note.

Returns:
The ID for this note.

getAuthor

public User getAuthor()
Get the Author of this note.

Returns:
The user who authored the note.

getX

public int getX()
Get the X origin point for the note.

Returns:
The X coordinate of the note.

getY

public int getY()
Get the Y origin point for the note.

Returns:
The Y coordinate of the note.

getWidth

public int getWidth()
Get the width of the note.

Returns:
The width of the note.

getHeight

public int getHeight()
Get the height of the note.

Returns:
The Height of the note.

getArea

public java.awt.Rectangle getArea()
Get the area covered by the note. Coordinates for the area are in pixels, based on the 500px image size shown on individual photo pages.

Returns:
A Rectangle representing the area covered by the note.

getText

public java.lang.String getText()
Get the text of the note.

Returns:
The text associated with this note.

update

public void update(java.awt.Rectangle area,
                   java.lang.String text)
            throws FlickrException

Modify the content and area of a Note. Coordinates for the area are in pixels, based on the 500px image size shown on individual photo pages.

Requires authentication with WRITE permission.

Parameters:
area - Rectangle describing the area covered by the note. Must not be null.
text - Text of the note. Must not be null.
Throws:
FlickrException - on any error.

delete

public void delete()
            throws FlickrException

Delete this note. Further method calls on this object are invalid after this call.

Requires authentication with WRITE privleges.

Throws:
FlickrException - on any error.

equals

public boolean equals(java.lang.Object o)
Check if this Note is equal to the object supplied. Uses id for comparison.

Overrides:
equals in class java.lang.Object
Parameters:
o - Object to compare.
Returns:
If the object to equal to this object.

hashCode

public int hashCode()
Return the HashCode of this Note, based on ID.

Overrides:
hashCode in class java.lang.Object
Returns:
int value representing a fairly unique hashcode.