JClass 4.5.0 API
Documentation

com.klg.jclass.field
Interface JCFieldComponent

All Known Implementing Classes:
JCComboField, JCTextField, JCSpinField, JCLabelField

public interface JCFieldComponent

List of the public API's that make up a JClass Field bean


Field Summary
static int INVALID
           
static int UNDEREDIT
           
static int VALID
           
 
Method Summary
 void addValueListener(com.klg.jclass.util.value.JCValueListener listener)
          Adds a listener for changes to the value.
 void commitEdit()
          Commits the current field under edit.
 DataProperties getDataProperties()
          Returns the DataProperties which contains the validator, value model, and invalid proeprties.
 JCInvalidInfo getInvalidInfo()
          Return the Invalid properties.
 boolean getSelectOnEnter()
          Returns a flag indicating the selection status on entering the field.
 int getState()
          Returns the state of the component VALID, INVALID, or UNDER_EDIT
 JCValidator getValidator()
          Returns the validator currently in use.
 Object getValue()
          Returns the value for the text field
 com.klg.jclass.util.value.JCValueModel getValueModel()
          Returns the data model being used by the field.
 boolean isRequired()
          Return whether this is a required field or not
 void removeValueListener(com.klg.jclass.util.value.JCValueListener listener)
          Removes a listener for changes to the value.
 void setDataProperties(DataProperties dp)
          Sets the validator, value model, and invalid properties.
 void setInvalidInfo(JCInvalidInfo info)
          Set the Invalid properties.
 void setRequired(boolean required)
          Set whether this is a required field or not
 void setSelectOnEnter(boolean select)
          Sets the flag that determines whether of not the Text Component is automatically selected when the component gains focus.
 void setValidator(JCValidator validator)
          Sets the validator to use.
 void setValue(Object value)
           
 void setValueModel(com.klg.jclass.util.value.JCValueModel model)
          Sets the data model being used by the field.
 

Field Detail

VALID

public static final int VALID

UNDEREDIT

public static final int UNDEREDIT

INVALID

public static final int INVALID
Method Detail

getValue

public Object getValue()
Returns the value for the text field

setValue

public void setValue(Object value)

getValueModel

public com.klg.jclass.util.value.JCValueModel getValueModel()
Returns the data model being used by the field.
See Also:
JCValueModel

setValueModel

public void setValueModel(com.klg.jclass.util.value.JCValueModel model)
Sets the data model being used by the field.
See Also:
JCValueModel

getValidator

public JCValidator getValidator()
Returns the validator currently in use.
See Also:
JCValidator

setValidator

public void setValidator(JCValidator validator)
Sets the validator to use.
See Also:
JCValidator

getInvalidInfo

public JCInvalidInfo getInvalidInfo()
Return the Invalid properties. that is beepOnInvalid, invalidForeground, invalidBackground, defaultValue, and invalidPolicy

setInvalidInfo

public void setInvalidInfo(JCInvalidInfo info)
Set the Invalid properties. that is beepOnInvalid, invalidForeground, invalidBackground, defaultValue, and invalidPolicy

setDataProperties

public void setDataProperties(DataProperties dp)
Sets the validator, value model, and invalid properties. This method is convenient for setting the validator and value model simultaneously.
See Also:
JCValidator, JCValueModel, JCInvalidInfo

getDataProperties

public DataProperties getDataProperties()
Returns the DataProperties which contains the validator, value model, and invalid proeprties.
See Also:
JCValidator, JCValueModel, JCInvalidInfo

getState

public int getState()
Returns the state of the component VALID, INVALID, or UNDER_EDIT

getSelectOnEnter

public boolean getSelectOnEnter()
Returns a flag indicating the selection status on entering the field.
See Also:
setSelectOnEnter(boolean)

setSelectOnEnter

public void setSelectOnEnter(boolean select)
Sets the flag that determines whether of not the Text Component is automatically selected when the component gains focus. The default value for this is "false."

commitEdit

public void commitEdit()
Commits the current field under edit.

isRequired

public boolean isRequired()
Return whether this is a required field or not

setRequired

public void setRequired(boolean required)
Set whether this is a required field or not

addValueListener

public void addValueListener(com.klg.jclass.util.value.JCValueListener listener)
Adds a listener for changes to the value.

removeValueListener

public void removeValueListener(com.klg.jclass.util.value.JCValueListener listener)
Removes a listener for changes to the value.

Copyright© 1999-2000 KL Group Inc.
All rights reserved.