net.codescore.ui.components.dnd
Interface DnDColumn

All Superinterfaces:
Cloneable, Comparable<DnDColumn>, Component, Serializable
All Known Implementing Classes:
DnDVbox

public interface DnDColumn
extends Component, Comparable<DnDColumn>

A column is a vertical layout element that can hold an arbitrary number of DnDObjects.

Author:
Adam Cornett

Field Summary
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Method Summary
 void addWindow(DnDObject win)
          Adds a DnDObject to the end of this column
 void fixRowNums()
          Each DnDObject has a 'row number' which is an index of where the item is vertically in the column.
 int getColumnNumber()
          Returns the column index for this column.
 void onDrop(DropEvent event)
          This method handles the drop event for the column
 void reBuildList()
          Fixes the row numbers (fixRowNums()) and then redraws the column.
 void removeWindow(DnDObject win)
          Removed a DnDObject from this column
 void sortList()
          Sorts the internal column list according to the DnDObject's comparator
 
Methods inherited from interface org.zkoss.zk.ui.Component
addEventListener, addForward, addForward, appendChild, applyProperties, clone, containsVariable, detach, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getFellow, getFellowIfAny, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, onPageAttached, onPageDetached, redraw, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, response, setAttribute, setAttribute, setId, setMold, setPage, setPageBefore, setParent, setVariable, setVisible, smartUpdate, smartUpdateDeferred, smartUpdateValues, unsetVariable
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

addWindow

void addWindow(DnDObject win)
Adds a DnDObject to the end of this column

Parameters:
win - The object to be added

fixRowNums

void fixRowNums()
Each DnDObject has a 'row number' which is an index of where the item is vertically in the column. This method will iterate over each DnDObject in the column and ensure that its row number is one more than the previous element.


getColumnNumber

int getColumnNumber()
Returns the column index for this column.

Returns:
A 1 indexed number indicating the position from left to right of this column

onDrop

void onDrop(DropEvent event)
This method handles the drop event for the column

Parameters:
event - The event object passed from ZK

reBuildList

void reBuildList()
Fixes the row numbers (fixRowNums()) and then redraws the column.


removeWindow

void removeWindow(DnDObject win)
Removed a DnDObject from this column

Parameters:
win - The object to be removed

sortList

void sortList()
Sorts the internal column list according to the DnDObject's comparator



Copyright 2008 © Adam Cornett, Andrew Conner All Rights Reserved.