org.tigris.scarab.util
Class OptionModel

java.lang.Object
  extended byorg.tigris.scarab.util.OptionModel

public class OptionModel
extends java.lang.Object

A model that provides for an application to present a list of possible options. Can be used along with a velocity macro to create option tags. #macro (option $optionModel) #end

Version:
$Id: OptionModel.java 7502 2003-03-28 00:02:24Z jon $
Author:
John D. McNally

Constructor Summary
OptionModel()
           
OptionModel(int value, java.lang.String name)
           
OptionModel(int value, java.lang.String name, boolean selected)
           
OptionModel(java.lang.String value, java.lang.String name)
           
OptionModel(java.lang.String value, java.lang.String name, boolean selected)
           
 
Method Summary
 java.lang.String getName()
          Get the name which is useful for ui.
 java.lang.String getValue()
          Get the value used by the application.
 boolean isSelected()
          Get the value of selected.
 void setName(java.lang.String v)
          Set the name which is useful for ui.
 void setSelected(boolean v)
          Set the value of selected.
 void setValue(java.lang.String v)
          Set the value used by the application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptionModel

public OptionModel()

OptionModel

public OptionModel(java.lang.String value,
                   java.lang.String name)

OptionModel

public OptionModel(int value,
                   java.lang.String name)

OptionModel

public OptionModel(int value,
                   java.lang.String name,
                   boolean selected)

OptionModel

public OptionModel(java.lang.String value,
                   java.lang.String name,
                   boolean selected)
Method Detail

getName

public java.lang.String getName()
Get the name which is useful for ui.

Returns:
value of name.

setName

public void setName(java.lang.String v)
Set the name which is useful for ui.

Parameters:
v - Value to assign to name.

getValue

public java.lang.String getValue()
Get the value used by the application.

Returns:
value of value.

setValue

public void setValue(java.lang.String v)
Set the value used by the application.

Parameters:
v - Value to assign to value.

isSelected

public boolean isSelected()
Get the value of selected.

Returns:
value of selected.

setSelected

public void setSelected(boolean v)
Set the value of selected.

Parameters:
v - Value to assign to selected.


Copyright © 2000-2004 Tigris.org. All Rights Reserved.