corny.addressbook.gui.GroupTable
Class GroupTableHandler

java.lang.Object
  extended by corny.addressbook.gui.GroupTable.GroupTableHandler

public class GroupTableHandler
extends java.lang.Object

Handler class for the GroupTable class.

Author:
Corny

Method Summary
 void addGroup()
          Adds a new, empty Group without name.
 void addGroup(Group g, boolean selectNewGroup)
          Adds a Group to the table
 void fetchGroups(boolean restoreSelection)
          Replaces the content of the table with the Groups of the NativeAddressBook
 Group getSelectedGroup()
           
 Group[] getSelectedGroups()
           
 void removeSelectedGroups()
          Removes the currently selected Groups from the Address Book.
 void selectGroup(Group groupSelection)
          Selects the given Group in the table.
 void setEditingEnabled(boolean editing)
          Specifies whether the Table can be edited or not.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSelectedGroup

public Group getSelectedGroup()
Returns:
First selected Group

getSelectedGroups

public Group[] getSelectedGroups()
Returns:
All selected Groups

fetchGroups

public void fetchGroups(boolean restoreSelection)
Replaces the content of the table with the Groups of the NativeAddressBook

Parameters:
restoreSelection - true to restore the Group selection after replacing the content

selectGroup

public void selectGroup(Group groupSelection)
Selects the given Group in the table. Selects the "Everyone" Group if the given Group does not exist in the view.

Parameters:
groupSelection - Group to select

addGroup

public void addGroup(Group g,
                     boolean selectNewGroup)
Adds a Group to the table

Parameters:
g - New Group
selectNewGroup - true to select the new Group

addGroup

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


removeSelectedGroups

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


setEditingEnabled

public void setEditingEnabled(boolean editing)
Specifies whether the Table can be edited or not.

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