JSCAPE MFT Server

com.jscape.util.reflection.types
Class ChoiceField

java.lang.Object
  extended by com.jscape.util.reflection.types.ChoiceField
All Implemented Interfaces:
FieldType

public final class ChoiceField
extends java.lang.Object
implements FieldType

Drop-down choice field component.


Constructor Summary
ChoiceField()
          Creates new instance with empty String options.
ChoiceField(boolean optional)
          Creates new instance with empty String options.
ChoiceField(java.lang.String[] variants)
          Creates new instance of String options.
ChoiceField(java.lang.String[] variants, boolean optional)
          Creates new instance of String options.
 
Method Summary
static ChoiceField createRangeChoice(int lowerBound, int upperBound)
          Creates new instance using integer range.
static ChoiceField createRangeChoice(int lowerBound, int upperBound, boolean optional)
          Creates new instance using integer range.
 java.lang.String[] getVariants()
          Gets all String options.
 boolean isOptional()
          Checks if field is optional.
 void setVariants(java.lang.String[] variants)
          Sets all String options
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChoiceField

public ChoiceField(java.lang.String[] variants,
                   boolean optional)
Creates new instance of String options.

Parameters:
variants - the string variants
optional - if field is optional

ChoiceField

public ChoiceField(java.lang.String[] variants)
Creates new instance of String options.

Parameters:
variants - the string variants

ChoiceField

public ChoiceField(boolean optional)
Creates new instance with empty String options.

Parameters:
optional - if field is optional

ChoiceField

public ChoiceField()
Creates new instance with empty String options.

Method Detail

createRangeChoice

public static ChoiceField createRangeChoice(int lowerBound,
                                            int upperBound)
Creates new instance using integer range.

Parameters:
lowerBound - the lower bound
upperBound - the upper bound
Returns:

createRangeChoice

public static ChoiceField createRangeChoice(int lowerBound,
                                            int upperBound,
                                            boolean optional)
Creates new instance using integer range.

Parameters:
lowerBound - the lower bound
upperBound - the upper bound
optional - if field is optional
Returns:

getVariants

public java.lang.String[] getVariants()
Gets all String options.

Returns:

setVariants

public void setVariants(java.lang.String[] variants)
Sets all String options

Parameters:
variants - the options

isOptional

public boolean isOptional()
Checks if field is optional.

Returns:
true if optional, false otherwise

JSCAPE MFT Server

Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved