net.codescore.ui.components.list
Class AbstractPicker<L,T>

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.zul.impl.XulElement
              extended by org.zkoss.zul.Box
                  extended by org.zkoss.zul.Hbox
                      extended by net.codescore.ui.components.list.AbstractPicker<L,T>
Type Parameters:
L - The List Item type
T - The target type
All Implemented Interfaces:
Serializable, Cloneable, Component, ComponentCtrl
Direct Known Subclasses:
CompetitonPicker, PersonPicker, SchoolPicker, TeamPicker

public abstract class AbstractPicker<L,T>
extends Hbox

Creates an HTML select control, using the AbstractDropDown class and an associated label. For an example implementation, see TeamPicker.

Author:
Adam Cornett
See Also:
AbstractDropDown, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
HtmlBasedComponent.ExtraCtrl
 
Field Summary
protected  AbstractDropDown<L,T> dropDown
           
private  Label fieldLabel
           
private  T obj
           
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Constructor Summary
AbstractPicker(String label, T o)
          Creates a new drop down for the target T
 
Method Summary
 void doRows(Rows rows)
          Layout in a grid, appends a row to the rows component.
protected abstract  void initDropDown(T obj)
          Setup the drop down.
 
Methods inherited from class org.zkoss.zul.Box
getAlign, getCaveAttrs, getChildInnerAttrs, getChildOuterAttrs, getHeights, getOrient, getOuterAttrs, getPack, getSpacing, getValign, getWidths, insertBefore, isHorizontal, isVertical, onChildRemoved, onDrawNewChild, setAlign, setHeights, setOrient, setPack, setSpacing, setValign, setWidths
 
Methods inherited from class org.zkoss.zul.impl.XulElement
getAction, getActionAttrs, getAllOnClickAttrs, getContext, getInnerAttrs, getPopup, getTooltip, setAction, setContext, setContext, setPopup, setPopup, setTooltip, setTooltip
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
focus, getAllOnClickAttrs, getDraggable, getDroppable, getHeight, getLeft, getRealSclass, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZIndex, newExtraCtrl, setClass, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZIndex
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addEventListener, addForward, addForward, addMoved, addSharedAnnotationMap, addSharedEventHandlerMap, appendAsapAttr, appendAsapAttr, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getCommand, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getExtraCtrl, getFellow, getFellowIfAny, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getMoldURI, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getPropagatee, getRoot, getSpaceOwner, getUuid, getVariable, invalidate, isAsapRequired, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onPageAttached, onPageDetached, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setPageBefore, setParent, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, smartUpdateDeferred, smartUpdateValues, toString, unsetVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fieldLabel

private final Label fieldLabel

obj

private final T obj

dropDown

protected AbstractDropDown<L,T> dropDown
Constructor Detail

AbstractPicker

public AbstractPicker(String label,
                      T o)
Creates a new drop down for the target T

Parameters:
label - The label text to be placed next to the drop down
o - the Target
Method Detail

doRows

public void doRows(Rows rows)
Layout in a grid, appends a row to the rows component.

Parameters:
rows - The rows element of the grid to which the new row is added to.

initDropDown

protected abstract void initDropDown(T obj)
Setup the drop down.

Parameters:
obj - The target object


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