|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GroupView
Groups are collections of contacts from a contact list.
The groups are very similar to the contact list; however, while the contact list
contains all the contact manager's contacts, groups only represent a subset of
the contacts contained in the contact manager's contact list.
Therefore, while a contact always belongs to a unique contact list, it may belong
to one or more groups, or none.
While contacts are assigned a unique identifier by their contact list,
the very same unique identifier is used to identify them in all the groups
they may belong to.
Each group belongs to a unique group list.
In addition to the methods inherited from ContactsListView
, the
GroupView
class provides methods to retrieve and set a group name.
Because of the different ownership rules described above between the contacts list
and the groups, the semantics of methods inherited from ContactsListView
slightly differ.
These differences are listed below:
addContact()
method can only operate on ContactView
instances
in the SELECTED state, that represent contacts already in the contact list. A reference to
the contact is added to the group.addContact()
method removes a contact from the group. The contact remains
in its contact list.
A GroupView
instance may successively represent multiple groups
throughout its lifetime.
It is good practice, for an application that needs to manipulate
groups, to create one GroupView
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 GroupView
instance in these states is
given below:
GroupsListView.getGroup()
GroupsListView.nextGroup()
release()
Method Summary | |
---|---|
void |
deselect()
If this instance is in SELECTED state, the selected group is deselected. |
void |
getGroupName(byte[] name,
short nameOffset,
short maxNameLength)
Gets the group name. |
void |
setGroupName(byte[] name,
short nameOffset,
short nameLength)
Sets the group name. |
Methods inherited from interface uicc.contactmanager.ContactsListView |
---|
addContact, createContactViewInstance, getNumberOfContacts, hasMoreContacts, removeContact, selectContact, selectNextContact, startEnumeration, startEnumeration |
Method Detail |
---|
void setGroupName(byte[] name, short nameOffset, short nameLength)
name
- name of the group to setnameOffset
- offset in name buffernameLength
- length of name buffervoid getGroupName(byte[] name, short nameOffset, short maxNameLength)
name
- buffer to store the name intonameOffset
- offset in name buffermaxNameLength
- maximum length of name buffer
ArrayIndexOutOfBoundException
- if nameOffset+the length of the group name > maxNameLengthvoid deselect()
If this instance is in SELECTED state, the selected group is deselected.
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 |