Added javadoc
This commit is contained in:
parent
5f0910635a
commit
3d987985ff
@ -11,6 +11,8 @@ import envoy.client.util.IconUtil;
|
||||
import envoy.data.User;
|
||||
|
||||
/**
|
||||
* Displays a user as a quickSelectControl which is used in the quickSelectList.
|
||||
*
|
||||
* @author Maximilian Käfer
|
||||
* @since Envoy Client v0.3-beta
|
||||
*/
|
||||
@ -18,6 +20,13 @@ public class QuickSelectControl extends VBox {
|
||||
|
||||
User user;
|
||||
|
||||
/**
|
||||
* Creates an instance of the {@link QuickSelectControl}.
|
||||
*
|
||||
* @param user the user whose data is used to create this instance.
|
||||
* @param tab the parent tab ({@link GroupCreationTab}).
|
||||
* @since Envoy Client v0.3-beta
|
||||
*/
|
||||
public QuickSelectControl(User user, GroupCreationTab tab) {
|
||||
this.user = user;
|
||||
setPadding(new Insets(1, 0, 0, 0));
|
||||
@ -75,5 +84,9 @@ public class QuickSelectControl extends VBox {
|
||||
getStyleClass().add("quick-select");
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the user whose data is used in this instance.
|
||||
* @since Envoy Client v0.3-beta
|
||||
*/
|
||||
public User getUser() { return user; }
|
||||
}
|
||||
|
@ -164,6 +164,12 @@ public class GroupCreationTab implements EventListener {
|
||||
return localDB.getChats().stream().map(Chat::getRecipient).filter(Group.class::isInstance).map(Contact::getName).anyMatch(newName::equals);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes an element from the quickSelectList.
|
||||
*
|
||||
* @param element the element to be removed.
|
||||
* @since Envoy Client v0.3-beta
|
||||
*/
|
||||
public void removeFromQuickSelection(QuickSelectControl element) {
|
||||
quickSelectList.getItems().remove(element);
|
||||
userList.getItems().add(element.getUser());
|
||||
|
Reference in New Issue
Block a user