net.sf.colle.forms.test
Class TestForm.Color

java.lang.Object
  extended bynet.sf.colle.forms.test.TestForm.Color
Enclosing class:
TestForm

public static class TestForm.Color
extends Object

Define the inner color FormSet class. This class extends the FormSet base class to provide useful helper methods.


Constructor Summary
TestForm.Color(FormElement pxParent)
          Create a new color FormSet element.
 
Method Summary
 void clearSelected()
          Clears all currently selected values.
 FormSet getStructure()
          Returns the inner set/structure object.
 boolean isBlueSelected()
          Check weather the blue value is selected.
 boolean isGreenSelected()
          Check weather the green value is selected.
 boolean isIndigoSelected()
          Check weather the indigo value is selected.
 boolean isOrangeSelected()
          Check weather the orange value is selected.
 boolean isRedSelected()
          Check weather the red value is selected.
 boolean isVioletSelected()
          Check weather the violet value is selected.
 boolean isYellowSelected()
          Check weather the yellow value is selected.
 void setBlue(boolean pbValue)
          Sets the selected state of the blue value.
 void setGreen(boolean pbValue)
          Sets the selected state of the green value.
 void setIndigo(boolean pbValue)
          Sets the selected state of the indigo value.
 void setOrange(boolean pbValue)
          Sets the selected state of the orange value.
 void setRed(boolean pbValue)
          Sets the selected state of the red value.
 void setViolet(boolean pbValue)
          Sets the selected state of the violet value.
 void setYellow(boolean pbValue)
          Sets the selected state of the yellow value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestForm.Color

public TestForm.Color(FormElement pxParent)
Create a new color FormSet element.

Parameters:
pxParent - parent in the form element tree
Method Detail

clearSelected

public void clearSelected()
Clears all currently selected values. Note that even cfs:select-ones are backed by a FormSet object so you must call this method before setting new selected values.


isRedSelected

public boolean isRedSelected()
Check weather the red value is selected.

Returns:
true on selected

setRed

public void setRed(boolean pbValue)
Sets the selected state of the red value.

Parameters:
pbValue - FormSet value to be selected

isOrangeSelected

public boolean isOrangeSelected()
Check weather the orange value is selected.

Returns:
true on selected

setOrange

public void setOrange(boolean pbValue)
Sets the selected state of the orange value.

Parameters:
pbValue - FormSet value to be selected

isYellowSelected

public boolean isYellowSelected()
Check weather the yellow value is selected.

Returns:
true on selected

setYellow

public void setYellow(boolean pbValue)
Sets the selected state of the yellow value.

Parameters:
pbValue - FormSet value to be selected

isGreenSelected

public boolean isGreenSelected()
Check weather the green value is selected.

Returns:
true on selected

setGreen

public void setGreen(boolean pbValue)
Sets the selected state of the green value.

Parameters:
pbValue - FormSet value to be selected

isBlueSelected

public boolean isBlueSelected()
Check weather the blue value is selected.

Returns:
true on selected

setBlue

public void setBlue(boolean pbValue)
Sets the selected state of the blue value.

Parameters:
pbValue - FormSet value to be selected

isIndigoSelected

public boolean isIndigoSelected()
Check weather the indigo value is selected.

Returns:
true on selected

setIndigo

public void setIndigo(boolean pbValue)
Sets the selected state of the indigo value.

Parameters:
pbValue - FormSet value to be selected

isVioletSelected

public boolean isVioletSelected()
Check weather the violet value is selected.

Returns:
true on selected

setViolet

public void setViolet(boolean pbValue)
Sets the selected state of the violet value.

Parameters:
pbValue - FormSet value to be selected

getStructure

public FormSet getStructure()
Returns the inner set/structure object. Your set 'has-a' net.sf.colle.forms.FormSet object as opposed to 'is-a' (inheritance) set/structure object to minimize naming collisions. For instance it would be impossible to have a value called 'name' if this set was derived from net.sf.colle.forms.FormSet because of the setName() method.