public class GroupManager
extends java.lang.Object
Constructor and Description |
---|
GroupManager() |
Modifier and Type | Method and Description |
---|---|
void |
addNewGroupFromUser(GroupOfPlayers groupOfPlayers)
The user has clicked OK in the add new group dialog.
|
void |
editGroupFromUser(GroupOfPlayers groupOfPlayers) |
boolean |
filter(Player player)
Should this player be filtered?
|
GroupOfPlayers |
getGroupOfPlayers(int groupId) |
GroupOfPlayers |
getGroupOfPlayers(java.lang.String groupName)
Get the GroupOfPlayers with this name
|
java.util.LinkedList<GroupPopupSubmenu.PopupGroup> |
getGroupsForPlayer(GroupPopupSubmenu groupPopupSubmenu,
int playerId) |
java.lang.String |
getGroupsSelectedString()
Get the String that is displayed at the top of the PlayerListPane
|
void |
initDefaultGroups() |
boolean |
isInGroup(java.lang.String groupName,
int playerId)
Is this playerId in this group?
|
void |
populatePane() |
void |
popupMenuItemSelected(java.lang.String groupName,
java.lang.String playerName)
Handle an event from the popup menu
|
void |
save() |
void |
setDatabase(Database database)
Set the reference to the database.
|
void |
setGroupSelectPane(GroupSelectPane groupSelectPane) |
void |
setPlayerListPane(PlayerListPane playerListPane) |
void |
updateGroupOfPlayers(int id,
java.lang.String groupName,
boolean active)
Tag the active status for this GroupOfPlayers
|
public void initDefaultGroups()
public void setGroupSelectPane(GroupSelectPane groupSelectPane)
public void setPlayerListPane(PlayerListPane playerListPane)
public void setDatabase(Database database)
database
- the database to setpublic void save()
public void populatePane()
public void updateGroupOfPlayers(int id, java.lang.String groupName, boolean active)
id
- groupName
- active
- public GroupOfPlayers getGroupOfPlayers(java.lang.String groupName)
groupName
- The name to search forpublic GroupOfPlayers getGroupOfPlayers(int groupId)
public void addNewGroupFromUser(GroupOfPlayers groupOfPlayers)
groupOfPlayers
- The new GroupOfPlayers created by the user.public void editGroupFromUser(GroupOfPlayers groupOfPlayers)
public void popupMenuItemSelected(java.lang.String groupName, java.lang.String playerName)
groupName
- playerName
- public boolean isInGroup(java.lang.String groupName, int playerId)
groupName
- The name of the group to checkplayerId
- The id of the player in questionpublic java.util.LinkedList<GroupPopupSubmenu.PopupGroup> getGroupsForPlayer(GroupPopupSubmenu groupPopupSubmenu, int playerId)
public boolean filter(Player player)
player
- The Player to testpublic java.lang.String getGroupsSelectedString()