added a table to the RolesPanel; the refactoring on which this is based follows as the next commit

Change-Id: Ie7509c7d3d66679128b472c21455b8a91e7a480e
This commit is contained in:
Axel Uhl
2017-12-12 14:52:34 +01:00
parent 0e764364b0
commit ab8379badc
@@ -1,7 +1,9 @@
package com.sap.sse.security.ui.client.component;
import com.google.gwt.user.cellview.client.CellTable;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.FlowPanel;
import com.sap.sse.gwt.client.celltable.FlushableSortedCellTableWithStylableHeaders;
import com.sap.sse.security.shared.Role;
import com.sap.sse.security.ui.client.UserManagementServiceAsync;
import com.sap.sse.security.ui.client.i18n.StringMessages;
@@ -18,11 +20,14 @@ import com.sap.sse.security.ui.client.i18n.StringMessages;
*/
public class RolesPanel extends FlowPanel {
private final Button addButton;
private final Button deleteButton;
private final Button removeButton;
private final Button refreshButton;
private final FlushableSortedCellTableWithStylableHeaders rolesTable;
private final FlushableSortedCellTableWithStylableHeaders<Role> rolesTable;
public RolesPanel(StringMessages stringMessages, UserManagementServiceAsync userManagementService) {
public RolesPanel(StringMessages stringMessages, UserManagementServiceAsync userManagementService, CellTable.Resources tableResources) {
this.addButton = new Button(stringMessages.add());
this.removeButton = new Button(stringMessages.remove());
this.refreshButton = new Button(stringMessages.refresh());
this.rolesTable = new FlushableSortedCellTableWithStylableHeaders<>(/* pageSize */ 50, tableResources);
}
}