gov.virginia.dcjs.gui.field
Class CheckBoxField

java.lang.Object
  extended bygov.virginia.dcjs.gui.field.DisplayField
      extended bygov.virginia.dcjs.gui.field.CheckBoxField
All Implemented Interfaces:
FieldInterface

public class CheckBoxField
extends DisplayField


Field Summary
 int TYPE
           
 
Constructor Summary
CheckBoxField()
           
CheckBoxField(javax.swing.JCheckBox field)
           
 
Method Summary
 int getCapacity()
          Obtain the database capacity of the field * @return Database capacity, in characters, for the field
 java.lang.String getContent()
          Obtain the wrapped field's content in a String format * @return String representation of the wrapped field's contents
 javax.swing.JComponent getField()
          Obtain the JCheckBox as a component * @return Field being wrapped
 int getType()
          Obtain the current type constant of the field * @return FieldType constant of the field
 int getWidth()
          Obtain the current width of the field * @return Width in characters of the field
 boolean isContentEditable()
          Determine whether or not the contents of this field can be modified * by the user.
 boolean isContentValid()
          Obtain from the wrapper class whether or not the class it * wraps contains contents in keeping within the object's context * @return True when the containing class has acceptable content
 void loadText(java.lang.String text)
          Add the specified text to the field in a manner consistent * with the field's data context.
 void setContent(java.lang.String content)
          Translate the String provided into content suitable to the * wrapped class * @param content What the field is to display
 void setContentEditable(boolean edit)
          Provide whether or not the contents of this field can be modified * by the user.
 void setField(javax.swing.JComponent field)
          Provide the JCheckBox to be wrapped * @param field JCheckBox this object is to wrap
 void setText(java.lang.String name)
          Allow the label-less checkbox initially constructed to get a label * @param name Label for this checkbox
 void setWidth(int width)
          Provide the width of the field * @param width Width in characters of the field
 java.lang.String toString()
           
 
Methods inherited from class gov.virginia.dcjs.gui.field.DisplayField
setCapacity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public final int TYPE
See Also:
Constant Field Values
Constructor Detail

CheckBoxField

public CheckBoxField()

CheckBoxField

public CheckBoxField(javax.swing.JCheckBox field)
Method Detail

isContentValid

public boolean isContentValid()
Obtain from the wrapper class whether or not the class it * wraps contains contents in keeping within the object's context * @return True when the containing class has acceptable content


getContent

public java.lang.String getContent()
Obtain the wrapped field's content in a String format * @return String representation of the wrapped field's contents

Specified by:
getContent in class DisplayField

setContent

public void setContent(java.lang.String content)
Translate the String provided into content suitable to the * wrapped class * @param content What the field is to display

Specified by:
setContent in class DisplayField

getField

public javax.swing.JComponent getField()
Obtain the JCheckBox as a component * @return Field being wrapped

Specified by:
getField in class DisplayField

setField

public void setField(javax.swing.JComponent field)
Provide the JCheckBox to be wrapped * @param field JCheckBox this object is to wrap

Specified by:
setField in class DisplayField

getType

public int getType()
Obtain the current type constant of the field * @return FieldType constant of the field

Specified by:
getType in class DisplayField

getWidth

public int getWidth()
Obtain the current width of the field * @return Width in characters of the field

Specified by:
getWidth in class DisplayField

setWidth

public void setWidth(int width)
Provide the width of the field * @param width Width in characters of the field

Specified by:
setWidth in class DisplayField

getCapacity

public int getCapacity()
Obtain the database capacity of the field * @return Database capacity, in characters, for the field

Overrides:
getCapacity in class DisplayField

isContentEditable

public boolean isContentEditable()
Determine whether or not the contents of this field can be modified * by the user. * @return True if the user can modify the field contents

Specified by:
isContentEditable in class DisplayField

setContentEditable

public void setContentEditable(boolean edit)
Provide whether or not the contents of this field can be modified * by the user. * @param edit True if the user can modify the field contents

Specified by:
setContentEditable in class DisplayField

setText

public void setText(java.lang.String name)
Allow the label-less checkbox initially constructed to get a label * @param name Label for this checkbox


loadText

public void loadText(java.lang.String text)
Add the specified text to the field in a manner consistent * with the field's data context. * @param text Contents to add to field


toString

public java.lang.String toString()