Webnote

Class Note

Object
   |
   +--Note

class Note


A class that acts as a wrapper to the actual html div that is a note. Rather than operating directly on the html object, use this class instead. TODO: attach these methods directly to the html objects.
Defined in webnote.js


Field Summary
 boolean editable
          Whether or not we can double click and edit a note
 string id
          The html id of the note
 workspace parent
          TODO: fix references to workspace with this.parent
 boolean selectable
          Whether or not is it possible to click on a note and select it
 Point size
          The height and width of the note
 
Constructor Summary
Note (<HtmlElement> note, <workspace> p, <string> text)
            Create a new note object.
 
Method Summary
 void destroy(<boolean> addToHistory)
           Destroy the note (user clicked on the X).
 void disable()
           Disable a note (can't be moved or edited).
 void enable()
           Enable a note (can be moved and edited).
 Point getCorrectedSize()
           Get the size of the note including border and padding.
 string getHTML()
           Convert the text of a note to html.
 Point getPosition()
           Get the coordinates of the upper left corner of the note.
 Point getSize()
           Get the size of the note according to the dom object (this varies on browser).
 void keyDown(ev)
           Note keyboard events.
 void miniMouseDown(ev)
           User clicked on one of the mini notes at the top of the page.
 void mouseDblClick()
           Double-click event on a note (try to toggle edit mode).
 Object mouseDown(ev)
           User clicked on a note.
 void mouseMove(ev)
           Moving the mouse while over a note (changes cursor).
 void mouseOut()
           Mouse leaves a note (restore original background color).
 void mouseOver()
           Mouse moves over a note (darken the background color).
 void mouseUp()
           User deselected a note (stopped dragging).
 void move(<Point> delta)
           Move the note relative to its current position.
 void select()
           When a note is selected from the mini note toolbar, we bring it to the front and flash the background.
 void sendToBack()
           Send a note to the back of the workspace.
 void setColor(<string> hex, <boolean> ignoreHistory)
           Set the color of a note.
 void setText(<string> str)
           Change the text of a note.
 string toXML()
           Generate the xml representing a note (used when we save notes).
 void updateSize()
           We keep track of the size of the note internally; this method updates that value.

Field Detail

editable

boolean editable

id

string id

parent

workspace parent

selectable

boolean selectable

size

Point size

Constructor Detail

Note

Note(<HtmlElement> note, <workspace> p, <string> text)

Method Detail

destroy

void destroy(<boolean> addToHistory)

disable

void disable()

enable

void enable()

getCorrectedSize

Point getCorrectedSize()

getHTML

string getHTML()

getPosition

Point getPosition()

getSize

Point getSize()

keyDown

void keyDown(ev)

miniMouseDown

void miniMouseDown(ev)

mouseDblClick

void mouseDblClick()

mouseDown

Object mouseDown(ev)

mouseMove

void mouseMove(ev)

mouseOut

void mouseOut()

mouseOver

void mouseOver()

mouseUp

void mouseUp()

move

void move(<Point> delta)

select

void select()

sendToBack

void sendToBack()

setColor

void setColor(<string> hex, <boolean> ignoreHistory)

setText

void setText(<string> str)

toXML

string toXML()

updateSize

void updateSize()

Webnote

Documentation generated by JSDoc on Tue May 24 23:13:22 2005