corny.addressbook.gui.PeoplePicker.PeoplePickerPanel
Class PeoplePickerPanelHandler

java.lang.Object
  extended by corny.addressbook.gui.PeoplePicker.PeoplePickerPanel.PeoplePickerPanelHandler

public class PeoplePickerPanelHandler
extends java.lang.Object

Handler class for the PeoplePickerPanel class

Author:
Corny

Method Summary
 void addContact()
          Adds a new, empty Contact.
 void addGroup()
          Adds a new, empty Group without name.
 Contact[] getSelectedContacts()
          Returns all currently selected Contacts.
 int getSelectedContactsCount()
          Returns the count of the currently selected Contacts.
 void removeSelectedContacts()
          Removes the currently selected Contacts from the Address book.
 void removeSelectedGroups()
          Removes the currently selected Groups from the Address book.
 void revealSelectionInAddressBook()
          Opens Apple's Address Book interface and selects the first Contact of the current selection.
 void selectMe()
          Changes the current selection to select the "Me" Contact.
 void setEditingEnabled(boolean enable)
          Sets the editing capabilities of the PeoplePickerPanel on or off.
 void setLastNameFirst(boolean lastNameFirst)
          Specifies whether the name column of the ContactTable should display the last name first or not.
 boolean toggleContactInfo()
          Toggles the visibility of the ContactDisplayOverlay.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

selectMe

public void selectMe()
Changes the current selection to select the "Me" Contact. The GroupTable will select the "Everyone" Group. Does nothing no "Me" Contact exists.


toggleContactInfo

public boolean toggleContactInfo()
Toggles the visibility of the ContactDisplayOverlay.

Returns:
true, if the ContactDisplayOverlay is enabled now, false if the ContactDisplayOverlay is disabled now

setLastNameFirst

public void setLastNameFirst(boolean lastNameFirst)
Specifies whether the name column of the ContactTable should display the last name first or not. If the table is sorted by this column, the sort order modifies according to this property.

Parameters:
lastNameFirst - true to display the last name first, false to display the first name first

revealSelectionInAddressBook

public void revealSelectionInAddressBook()
Opens Apple's Address Book interface and selects the first Contact of the current selection.


getSelectedContactsCount

public int getSelectedContactsCount()
Returns the count of the currently selected Contacts.

Returns:
Contact selection count

getSelectedContacts

public final Contact[] getSelectedContacts()
Returns all currently selected Contacts.

Returns:
Contact selection

setEditingEnabled

public void setEditingEnabled(boolean enable)
Sets the editing capabilities of the PeoplePickerPanel on or off. If enabled, you can edit Group names and remove Groups or Contacts by pressing the Delete button.

Parameters:
enable - true to enable editing, false to disable editing

addGroup

public void addGroup()
Adds a new, empty Group without name. The Group will be selected and the table cell editor will be started.


addContact

public void addContact()
Adds a new, empty Contact. It will automatically be selected.


removeSelectedGroups

public void removeSelectedGroups()
Removes the currently selected Groups from the Address book.


removeSelectedContacts

public void removeSelectedContacts()
Removes the currently selected Contacts from the Address book.