|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanger.app.Listener
danger.ui.View
danger.ui.Container
danger.ui.Window
danger.ui.DialogWindow
danger.helpers.AddToContactsHelper
public final class AddToContactsHelper
Dialog to permit the user to quickly add an entry to the address book.
| Field Summary | |
|---|---|
static int |
INCLUDE_ALL
Specifies that all fields should be included. |
static int |
INCLUDE_COMPANY
Specifies that the company field should be included. |
static int |
INCLUDE_FIRSTNAME
Specifies that the first name field should be included. |
static int |
INCLUDE_IM
Specifies that the IM name field should be included. |
static int |
INCLUDE_LASTNAME
Specifies that the last name field should be included. |
static int |
INCLUDE_MAIL
Specifies that the email address field should be included. |
static int |
INCLUDE_MIDDLENAME
Specifies that the middle name field should be included. |
static int |
INCLUDE_MULTI_GALLERY_ICON_PICKER
Specifies that the MultiGallery Icon Picker should be included. |
static int |
INCLUDE_NICKNAME
Specifies that the nickname field should be included. |
static int |
INCLUDE_PHONE
Specifies that the phone number field should be included. |
static int |
INCLUDE_PHONE_LABEL
Specifies that the phone label should be included. |
static int |
INCLUDE_RINGTONE_PICKER
Specifies that the Ringtone Picker should be included. |
| Fields inherited from class danger.ui.Window |
|---|
NO_FULL_SCREEN_MARQUEE, SHOW_FULL_SCREEN_MARQUEE, STATE_AUTO_HIDE_IF_IDLE, STATE_DROP_ORPHANED_EVENTS, STATE_FULLSCREEN, STATE_UNUSED1 |
| Fields inherited from interface danger.text.span.TextWatcherSpan |
|---|
TEXT_WATCHER_SPAN_TYPE |
| Method Summary | |
|---|---|
void |
afterTextChanged(Spanned text)
Called after the text of the buffer has changed. |
boolean |
eventWidgetUp(int widget,
Event event)
Handle the release of a device widget |
static AddToContactsHelper |
newContactHelper(int includedFields,
int inNumContacts)
Create a dialog with the specified fields. |
static AddToContactsHelper |
newEmailInterface(int inNumContacts)
Create a dialog with fields for name, company, and email address. |
static AddToContactsHelper |
newIMInterface(int inNumContacts)
Create a dialog with fields for name, company, and IM name. |
static AddToContactsHelper |
newPhoneInterface(int inNumContacts)
Create a dialog with fields for name, company, and phone number. |
protected void |
onShow()
This method is called when this view is shown, via the method View.show(). |
boolean |
receiveEvent(Event e)
Entry point for event processing. |
void |
setCompany(int inIndex,
String inCompany)
Set the company of the specified contact. |
void |
setEmail(int inIndex,
String inEmail)
Set the email address of the specified contact. |
void |
setFavoriteIcon(int galleryID,
int index)
|
void |
setFirstName(int inIndex,
String inFirstName)
Set the first name of the specified contact. |
void |
setIM(int inIndex,
String inIM)
Set the IM name of the specified contact. |
void |
setIMService(String inIMService)
Set the IM service of the specified contact. |
void |
setLastName(int inIndex,
String inLastName)
Set the last name of the specified contact. |
void |
setMiddleName(int inIndex,
String inMiddleName)
Set the middle name of the specified contact. |
void |
setName(int inIndex,
String inName)
Set the name of the specified contact. |
void |
setNickname(int inIndex,
String inNickname)
Set the nickname of the specified contact. |
void |
setOnAddEvent(Event e)
Specify an event to send when a contact is added. |
void |
setPhone(int inIndex,
String inPhone)
Set the phone number of the specified contact. |
void |
setPhoneLabel(int inIndex,
String inPhoneLabel)
Set the phone label of the specified contact. |
void |
setRingTonePickerID(int ringToneID)
|
void |
textChanged(Spanned text,
int offset,
int before,
int after)
Called when the text of the buffer has changed. |
void |
textWillChange(Spanned text,
int offset,
int len)
Called when the text of the buffer is about to change. |
| Methods inherited from class danger.app.Listener |
|---|
cancelEvents, childEventPump, childEventPumpDone, eventProblem, isDispatchingThread, sendEvent, sendEvent, sendEvent, sendEvent, sendEvent, sendLowPriorityEvent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INCLUDE_FIRSTNAME
Specifies that the first name field should be included.
To be used with newContactHelper(int, int).
public static final int INCLUDE_MIDDLENAME
Specifies that the middle name field should be included.
To be used with newContactHelper(int, int).
public static final int INCLUDE_LASTNAME
Specifies that the last name field should be included.
To be used with newContactHelper(int, int).
public static final int INCLUDE_NICKNAME
Specifies that the nickname field should be included.
To be used with newContactHelper(int, int).
public static final int INCLUDE_COMPANY
Specifies that the company field should be included.
To be used with newContactHelper(int, int).
public static final int INCLUDE_PHONE
Specifies that the phone number field should be included.
To be used with newContactHelper(int, int).
public static final int INCLUDE_MAIL
Specifies that the email address field should be included.
To be used with newContactHelper(int, int).
public static final int INCLUDE_IM
Specifies that the IM name field should be included.
To be used with newContactHelper(int, int).
public static final int INCLUDE_MULTI_GALLERY_ICON_PICKER
Specifies that the MultiGallery Icon Picker should be included.
public static final int INCLUDE_RINGTONE_PICKER
Specifies that the Ringtone Picker should be included.
public static final int INCLUDE_PHONE_LABEL
Specifies that the phone label should be included.
public static final int INCLUDE_ALL
Specifies that all fields should be included.
To be used with newContactHelper(int, int).
| Method Detail |
|---|
public static AddToContactsHelper newEmailInterface(int inNumContacts)
inNumContacts - the number of contacts to add
DialogWindow.show().public static AddToContactsHelper newPhoneInterface(int inNumContacts)
inNumContacts - the number of contacts to add
DialogWindow.show().public static AddToContactsHelper newIMInterface(int inNumContacts)
inNumContacts - the number of contacts to add
DialogWindow.show().
public static AddToContactsHelper newContactHelper(int includedFields,
int inNumContacts)
includedFields - some combination of the following fields:
INCLUDE_FIRSTNAME, INCLUDE_MIDDLENAME,
INCLUDE_LASTNAME, INCLUDE_NICKNAME,
INCLUDE_COMPANY, INCLUDE_PHONE,
INCLUDE_MAIL, INCLUDE_IM. Alternatively, this
may be INCLUDE_ALL.inNumContacts - the number of contacts to add
DialogWindow.show().
public void textWillChange(Spanned text,
int offset,
int len)
TextWatcherSpan
textWillChange in interface TextWatcherSpantext - the buffer where the change will be madeoffset - the point where the change will beginlen - the number of existing characters that will be affected
(0 if this is an insertion)
public void textChanged(Spanned text,
int offset,
int before,
int after)
TextWatcherSpan
textChanged in interface TextWatcherSpantext - the buffer where the change was madeoffset - the point where the change beganbefore - the number of characters that were affected
(0 if this was an insertion)after - the number of characters that replaced
the previous set of characters (0 if this is was a deletion)public void afterTextChanged(Spanned text)
TextWatcherSpan
afterTextChanged in interface TextWatcherSpantext - the buffer where the change was madeprotected void onShow()
ViewView.show(). It is called as the very last thing done by that method, and
it is only ever called if the view was not already visible.
Overriding this method is the recommended way to get special
behavior when a view gets shown.
The implementation in this class does nothing.
onShow in class Viewpublic void setOnAddEvent(Event e)
The event is sent when the user selects the "Add" button.
e - the event to send
public final void setName(int inIndex,
String inName)
You can use this to pre-populate the name fields.
inIndex - the index of the contact to change. The first index
is 0.inName - the new name. The name can be of the form
Last, First or First Last.
public final void setFirstName(int inIndex,
String inFirstName)
inIndex - the index of the contact to change. The first index
is 0.inFirstName - the first name of the contact
public final void setMiddleName(int inIndex,
String inMiddleName)
inIndex - the index of the contact to change. The first index
is 0.inMiddleName - the middle name of the contact
public final void setLastName(int inIndex,
String inLastName)
inIndex - the index of the contact to change. The first index
is 0.inLastName - the last name of the contact
public final void setNickname(int inIndex,
String inNickname)
inIndex - the index of the contact to change. The first index
is 0.inNickname - the nickname of the contact
public final void setCompany(int inIndex,
String inCompany)
inIndex - the index of the contact to change. The first index
is 0.inCompany - the company of the contact
public final void setEmail(int inIndex,
String inEmail)
inIndex - the index of the contact to change. The first index
is 0.inEmail - the email address of the contact
public final void setPhone(int inIndex,
String inPhone)
inIndex - the index of the contact to change. The first index
is 0.inPhone - the phone number of the contact
public final void setPhoneLabel(int inIndex,
String inPhoneLabel)
inIndex - the index of the contact to change. The first index
is 0.inPhoneLabel - the phone label of the contact
public final void setIM(int inIndex,
String inIM)
inIndex - the index of the contact to change. The first index
is 0.inIM - the IM name of the contactpublic final void setIMService(String inIMService)
inIMService - the IM service of the contactpublic final boolean receiveEvent(Event e)
ListenerDispatcher when it reads an Event in its queue
that is targetted at this instance. This base class implementation
handles event methods as specified by the eventMethod
keyword in .rsrc files. If you override this method, be sure to
call super.receiveEvent.
receiveEvent in class DialogWindowe - non-null; the event to process
true) or not (false) this
method actually handled the event to completion
public boolean eventWidgetUp(int widget,
Event event)
Container
eventWidgetUp in class DialogWindowwidget - the widget that went down
public void setRingTonePickerID(int ringToneID)
public void setFavoriteIcon(int galleryID,
int index)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||