Sydney

Class ListItem

Object
   |
   +--Widget
         |
         +--ListItem

class ListItem
extends Widget

Raises:

beforedragstart
whenever a draggable widget is about to be dragged. Listeners receive an instance of DragEvent. Setting the continueDrag property of the DragEvent to false will prevent the drag operation from starting. (See DragEvent.continueDrag.)
beforedragmove
whenever the user moves the mouse during a drag operation, but before the dragged-widget's position is updated. Listeners are passed an instance of DragEvent. Once this event has been raised, the dragged-widget's position is updated to match the widget property of the DragEvent that was passed to the beforedragmove listeners. Therefor, modifying the widget property will affect the new position of the dragged widget. Listeners can thus constrain the region inside which the dragged-widget can be dragged. (See DragEvent.widget.)
afterdragmove
whenever the user moves the mouse during a drag operation, but after the dragged-widget's position has been updated. Listeners are passed the same instance of DragEvent that was passed to the matching beforedragmove event. Modifying the members of the DragEvent during an afterdragmove event has no effect.
afterdragstop
whenever a drag operation terminates normally on a draggable widget (ie. the user 'dropped' the widget). Listeners are passed an instance of DragEvent. The mouse property of the DragEvent reflects the co-ordinates of the mouse at the time of the drop, and the widget property represents the co-ordinates of the dragged-widget at the time of the drop. (See DragEvent.mouse and DragEvent.widget.)
afterdragcancel
whenever a drag operation is cancelled by the user (probably by pressing the escape key). Listeners are passed an instance of DragEvent. In the case of an afterdragcancel event, the mouse property of the DragEvent reflects the co-ordinates that the mouse would have been at had it been a mouse event that caused the drag operation to be cancelled. Also, the widget property is the co-ordinates where the dragged-widget has been placed because of the cancellation. Together, this means that the same listener could be attached to both afterdragstop and afterdragcancel because the members of the DragEvent are consistent between the two events. (See DragEvent.mouse and DragEvent.widget.)
Defined in list.js


 
Fields inherited from class Widget
html, id, parent, layoutData, eventTable
 
Constructor Summary
ListItem (text, value)
           
 
Method Summary
 string getText()
           Returns this item's text.
 string getValue()
           Returns this item's value.
 void setText(text, setValueToo)
           Sets this item's text and, optionally, its value.
 void setValue(value)
           Sets this item's value.
 
Methods inherited from class Widget
installContextMenu, installDefaultContextMenu, uninstallContextMenu, isDraggable, setDraggable, addEventListener, blur, createEventTable, dispose, focus, getAbsoluteBottom, getAbsoluteLeft, getAbsoluteRight, getAbsoluteTop, getBottom, getBounds, getClientHeight, getClientWidth, getCorner, getHeight, getLeft, getPixelsPerEm, getRight, getToolTip, getTop, getWidth, isDisposed, isEnabled, layout, moveToAbsolute, moveTo, raiseEvent, registerEventType, removeEventListener, setAbsoluteBottom, setAbsoluteLeft, setAbsoluteRight, setAbsoluteTop, setBottom, setBounds, setEnabled, setHeight, setLeft, setRight, setToolTip, setTop, setWidth, setParent, toString
 

Constructor Detail

ListItem

function ListItem(text, value)
Method Detail

getText

string getText()

getValue

string getValue()

setText

void setText(text, setValueToo)

setValue

void setValue(value)

Sydney

SourceForge.net Logo