Dashboard > Fluid > ... > Reorderer API - v0.3 > Layout Handler - v0.3
Layout Handler - v0.3
Added by Anastasia Cheetham, last edited by Anastasia Cheetham on Sep 16, 2008  (view change)
Labels: 
(None)


This documentation refers to the v0.3 released version of the Layout Handler code.

The Reorderer itself is designed to be ignorant of the specifics of the markup in which it is used.  In particular, it is ignorant of the spatial arrangement of the items it is to reorder. The knowledge that is needed to interpret the user's intention when, for example, he or she presses an arrow key, is encapsulated in a "LayoutHandler". The LayoutHandler is passed to the Reorderer constructor upon instantiation.
The Reorderer includes a number of LayoutHandlers that can be used as is, but clients of the Reorderer are free to create their own LayoutHandlers, provided they implement the following functions:

  • getItemAbove(item)
  • getItemBelow(item)
  • getRightSibling(item)
  • getLeftSibling(item)
  • moveItemUp(item)
  • moveItemDown(item)
  • moveItemRight(item)
  • moveItemLeft(item)
  • dropPosition(target, moving, x, y)
  • mouseMoveItem(item)

Currently, the Reorderer includes the following LayoutHandlers:

  • ListLayoutHandler - v0.3
  • GridLayoutHandler - v0.3
  • ModuleLayoutHandler - v0.3
    LayoutHandler APIs will Change
    While clients can implement their own layout handlers if necessary, we don't currently consider this to be a public API. We will be reworking the LayoutHandler API significantly, providing a simple moveItem() function that will provide an easy extension point for modifying the behaviour of the Reorderer.

Site running on a free Atlassian Confluence Open Source Project License granted to The FLUID Project. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5 Build:#805 Apr 26, 2007) - Bug/feature request - Contact Administrators