net.sourceforge.jpalm.mobiledb.field.definition
Class CheckboxDefinition

java.lang.Object
  extended by net.sourceforge.jpalm.mobiledb.field.definition.CheckboxDefinition
All Implemented Interfaces:
Definition

public class CheckboxDefinition
extends java.lang.Object
implements Definition

A checkbox field in a MobileDB record.

Use Checkbox with this field.


Constructor Summary
CheckboxDefinition()
          Creates a new checkbox that defaults to false (unchecked).
CheckboxDefinition(boolean defaultToTrue)
          Creates a new checkbox.
CheckboxDefinition(java.lang.String indicator)
          Creates a new checkbox from the string representation for this type.
 
Method Summary
 java.lang.String getIndicator()
          Gets the string representation for this definition.
 java.lang.String getRegex()
          Gets the regular expression for this definition.
 boolean isDefaultToTrue()
          Gets the defaultToTrue property.
 void setDefaultToTrue(boolean defaultToTrue)
          Sets the defaultToTrue property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckboxDefinition

public CheckboxDefinition()
Creates a new checkbox that defaults to false (unchecked).


CheckboxDefinition

public CheckboxDefinition(boolean defaultToTrue)
Creates a new checkbox.

Parameters:
defaultToTrue - true if the checkbox should default to true (checked); false otherwise

CheckboxDefinition

public CheckboxDefinition(java.lang.String indicator)
Creates a new checkbox from the string representation for this type.

Parameters:
indicator - the string representation
Method Detail

getIndicator

public java.lang.String getIndicator()
Description copied from interface: Definition
Gets the string representation for this definition.

Specified by:
getIndicator in interface Definition
Returns:
the string representation

getRegex

public java.lang.String getRegex()
Description copied from interface: Definition
Gets the regular expression for this definition. The regular expression is compared to a field and if the field matches the expression then that field is of this definition.

Specified by:
getRegex in interface Definition
Returns:
the regular expression for this definition

isDefaultToTrue

public boolean isDefaultToTrue()
Gets the defaultToTrue property.

Returns:
true if the checkbox should default to true (checked); false otherwise

setDefaultToTrue

public void setDefaultToTrue(boolean defaultToTrue)
Sets the defaultToTrue property.

Parameters:
defaultToTrue - true if the checkbox should default to true (checked); false otherwise