|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FieldDescriptorView
A field descriptor describes a field that shall be present for all contacts in the contact manger.
All contacts shall have a field that corresponds to each field descriptor listed in the field descriptors list.
For each field descriptor, common properties are defined.
These properties shall be fulfilled by the corresponding field for all
contacts.
These properties are:
FieldView.ATTR_*
constants.
The FieldDescriptorView
class provides:
The FieldDescriptorsListView
class and the FieldDescriptorView
class should
be used at application installation in order to define the contacts structure.
A FieldDescriptorView
instance may successively represent multiple field descriptors
throughout its lifetime.
It is good practice, for an application that needs to manipulate
field descriptors, to create one FieldDescriptorView
instance at installation, that will
be re-used throughout the application's lifetime.
An instance is necessarily in one of the following states:
More detailed description of the behavior of a FieldDescriptorView
instance in these states
is given below:
FieldDescriptorList.getFieldDescriptor()
FieldDescriptorList.nextFieldDescriptor()
FieldDescriptorList.addFieldDescriptor()
release()
method called.
The FieldDescriptorView
instances are owned by the calling application.
Method Summary | |
---|---|
void |
deselect()
If the instance is SELECTED to a field descriptor, removes this bond. |
int |
getAttributes()
Returns the attributes that any related field must have, as defined by the setAttributes() method. |
int |
getFieldDescriptorIdentifier()
Returns the identifier of the field descriptor. |
int |
getFieldMaxSize()
Returns the maximum field size. |
short |
getLabel(byte[] label,
short labelOffset,
short maxLabelLength)
Gets the label of the field (text name of the field). |
short |
getType()
Returns the field type. |
void |
setAttributes(int attributes)
Sets the attributes that any related field must have. |
void |
setFieldMaxSize(int maximumSize)
Sets the maximum size of the field values. |
void |
setLabel(byte[] label,
short labelOffset,
short labelLength)
Sets the label of the field (text name of the field). |
void |
setType(short type)
Sets the field type. |
Method Detail |
---|
void setType(short type)
type
- field typeshort getType()
void setAttributes(int attributes)
Sets the attributes that any related field must have.
In any contact, the field related to this field descriptor must have at least the attributes defined by this method.
It may have additional attributes not defined here.
The attributes
argument is an integer, where each bit
represents an attribute. The attributes and their bit positions
are defined in FieldView.ATTR_*
constants.
attributes
- field attributesint getAttributes()
void setLabel(byte[] label, short labelOffset, short labelLength)
label
- field labellabelOffset
- offset in label bufferlabelLength
- length of labelshort getLabel(byte[] label, short labelOffset, short maxLabelLength)
label
- buffer to store label intolabelOffset
- offset in label buffermaxLabelLength
- maximum length of the label
void setFieldMaxSize(int maximumSize)
maximumSize
- the maximum field sizeint getFieldMaxSize()
int getFieldDescriptorIdentifier()
void deselect()
If the instance is SELECTED to a field descriptor, removes this bond.
After a successful call to this method, the instance is in DESELECTED state.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |