JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.field
Interface JCFieldComponent

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

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.
 com.klg.jclass.field.DataProperties getDataProperties()
          Returns the DataProperties which contains the validator, value model, and invalid proeprties.
 com.klg.jclass.field.JCInvalidInfo getInvalidInfo()
          Returns the Invalid properties.
 boolean getSelectOnEnter()
          Returns a flag indicating the selection status on entering the field.
 int getState()
          Returns the state of the component; one of VALID, INVALID, or UNDER_EDIT.
 com.klg.jclass.field.validate.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()
          Returns 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(com.klg.jclass.field.DataProperties dp)
          Sets the validator, value model, and invalid properties.
 void setInvalidInfo(com.klg.jclass.field.JCInvalidInfo info)
          Sets the Invalid properties.
 void setRequired(boolean required)
          Sets 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(com.klg.jclass.field.validate.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
See Also:
Constant Field Values

UNDEREDIT

public static final int UNDEREDIT
See Also:
Constant Field Values

INVALID

public static final int INVALID
See Also:
Constant Field Values
Method Detail

getValue

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

Returns:
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.

Returns:
data model 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.

Parameters:
model -
See Also:
JCValueModel

getValidator

public com.klg.jclass.field.validate.JCValidator getValidator()
Returns the validator currently in use.

Returns:
the validator currently in use
See Also:
JCValidator

setValidator

public void setValidator(com.klg.jclass.field.validate.JCValidator validator)
Sets the validator to use.

Parameters:
validator -
See Also:
JCValidator

getInvalidInfo

public com.klg.jclass.field.JCInvalidInfo getInvalidInfo()
Returns the Invalid properties. That is beepOnInvalid, invalidForeground, invalidBackground, defaultValue, and invalidPolicy.

Returns:
the Invalid properties

setInvalidInfo

public void setInvalidInfo(com.klg.jclass.field.JCInvalidInfo info)
Sets the Invalid properties. That is beepOnInvalid, invalidForeground, invalidBackground, defaultValue, and invalidPolicy.

Parameters:
info -

setDataProperties

public void setDataProperties(com.klg.jclass.field.DataProperties dp)
Sets the validator, value model, and invalid properties. This method is convenient for setting the validator and value model simultaneously.

Parameters:
dp -
See Also:
JCValidator, JCValueModel, JCInvalidInfo

getDataProperties

public com.klg.jclass.field.DataProperties getDataProperties()
Returns the DataProperties which contains the validator, value model, and invalid proeprties.

Returns:
the DataProperties
See Also:
JCValidator, JCValueModel, JCInvalidInfo

getState

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

Returns:
the state of hte component

getSelectOnEnter

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

Returns:
a flag indication the selection status
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.

Parameters:
select -

commitEdit

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


isRequired

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

Returns:
whether this is a required field

setRequired

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

Parameters:
required -

addValueListener

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

Parameters:
listener -

removeValueListener

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

Parameters:
listener -

Copyright © 2004 Quest Software Inc..
All rights reserved.