clarion.options
Class Option

java.lang.Object
  extended byclarion.options.Option

public class Option
extends java.lang.Object


Field Summary
protected  int choiceNum
          # of items in the option.
protected  int defaultChoice
          the default choice.
protected  OptionItem[] optItems
          option items.
protected  java.lang.String optLabel
          the option label.
protected  int userChoice
          user choice.
 
Constructor Summary
Option(java.lang.String optLabel, int choiceNum, int defaultChoice, int userChoice)
          constructor.
 
Method Summary
 java.lang.Object clone()
          methods from class Object
 int getChoiceNum()
          Returns the number of choices.
 int getDefaultChoice()
          Returns default choice.
 OptionItem getOptionItem(int choice)
          Returns a specific option item.
 java.lang.String getOptLabel()
          Returns the option label.
 int getUserChoice()
          Returns user's choice.
 void setChoiceNum(int num)
          Sets the number of choices.
 void setDefaultChoice(int choice)
          Sets the default choice.
 void setOptionItems(OptionItem[] items)
          Sets the option items.
 void setUserChoice(int choice)
          Sets the user choice.
 java.lang.String toString()
          methods from class Object
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

optLabel

protected java.lang.String optLabel
the option label.


choiceNum

protected int choiceNum
# of items in the option.


defaultChoice

protected int defaultChoice
the default choice.


userChoice

protected int userChoice
user choice.


optItems

protected OptionItem[] optItems
option items.

Constructor Detail

Option

public Option(java.lang.String optLabel,
              int choiceNum,
              int defaultChoice,
              int userChoice)
constructor.

Parameters:
optLabel - the option label.
defaultChoice - the default choice.
userChoice - the user's choice.
Method Detail

getOptLabel

public java.lang.String getOptLabel()
Returns the option label.

Returns:
the option label.

getChoiceNum

public int getChoiceNum()
Returns the number of choices.

Returns:
the number of choices.

getDefaultChoice

public int getDefaultChoice()
Returns default choice.

Returns:
default choice.

getUserChoice

public int getUserChoice()
Returns user's choice.

Returns:
user's choice.

getOptionItem

public OptionItem getOptionItem(int choice)
Returns a specific option item.

Parameters:
choice - the specific choice.
Returns:
a specific option item.

setChoiceNum

public void setChoiceNum(int num)
Sets the number of choices.

Parameters:
num - the number to set.

setDefaultChoice

public void setDefaultChoice(int choice)
Sets the default choice.

Parameters:
choice - the default choice to set.

setUserChoice

public void setUserChoice(int choice)
Sets the user choice.

Parameters:
choice - the user choice to set.

setOptionItems

public void setOptionItems(OptionItem[] items)
Sets the option items.

Parameters:
items - the option items to set.

toString

public java.lang.String toString()
methods from class Object


clone

public java.lang.Object clone()
methods from class Object