org.apache.tapestry.contrib.palette
Class PaletteColumn

java.lang.Object
  extended by org.apache.tapestry.contrib.palette.PaletteColumn
All Implemented Interfaces:
IRender

public class PaletteColumn
extends Object
implements IRender

One of the two columns in a Palette component: the left column lists available options, the right column lists the selected columns.

Version:
$Id: PaletteColumn.java 243835 2004-03-09 20:17:21Z hlship $
Author:
Howard Lewis Ship

Constructor Summary
PaletteColumn(String name, int rows)
           
 
Method Summary
 void addOption(PaletteOption option)
           
 void render(IMarkupWriter writer, IRequestCycle cycle)
          Renders the <select> and <option> tags for this column.
 void sortByLabel()
          Sorts the options by the label visible to the user.
 void sortByValue()
          Sorts the options by value (the hidden value for the option that represents the object value).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaletteColumn

public PaletteColumn(String name,
                     int rows)
Parameters:
name - the name of the column (the name attribute of the <select>)
rows - the number of visible rows (the size attribute of the <select>)
Method Detail

addOption

public void addOption(PaletteOption option)

sortByValue

public void sortByValue()
Sorts the options by value (the hidden value for the option that represents the object value). This should be invoked before rendering this PaletteColumn.


sortByLabel

public void sortByLabel()
Sorts the options by the label visible to the user. This should be invoked before rendering this PaletteColumn.


render

public void render(IMarkupWriter writer,
                   IRequestCycle cycle)
Renders the <select> and <option> tags for this column.

Specified by:
render in interface IRender