public VerticalPanel buildUsersListPanel() { DockPanel headerDockPanel = new DockPanel(); headerDockPanel.add(deleteUserBtn, DockPanel.EAST); VerticalPanel spacer = new VerticalPanel(); spacer.setWidth("2"); // $NON-NLS-1$ headerDockPanel.add(spacer, DockPanel.EAST); headerDockPanel.add(addUserBtn, DockPanel.EAST); Label label = new Label("Users"); // $NON-NLS-1$ headerDockPanel.add(label, DockPanel.WEST); headerDockPanel.setCellWidth(label, "100%"); // $NON-NLS-1$ VerticalPanel userListPanel = new VerticalPanel(); userListPanel.add(headerDockPanel); userListPanel.add(usersList); userListPanel.add(new Label(Messages.getString("filter"))); // $NON-NLS-1$ userListPanel.add(filterTextBox); userListPanel.setCellHeight(usersList, "100%"); // $NON-NLS-1$ userListPanel.setCellWidth(usersList, "100%"); // $NON-NLS-1$ userListPanel.setHeight("100%"); // $NON-NLS-1$ userListPanel.setWidth("100%"); // $NON-NLS-1$ usersList.setHeight("100%"); // $NON-NLS-1$ usersList.setWidth("100%"); // $NON-NLS-1$ filterTextBox.setWidth("100%"); // $NON-NLS-1$ deleteUserBtn.setEnabled(false); filterTextBox.addKeyboardListener(this); usersList.addChangeListener(this); addUserBtn.addClickListener(this); deleteUserBtn.addClickListener(this); return userListPanel; }
public VerticalPanel buildAssignedRolesPanel() { DockPanel headerDockPanel = new DockPanel(); VerticalPanel fieldsetPanel = new VerticalPanel(); Label label = new Label(Messages.getString("assignedRoles")); // $NON-NLS-1$ Label spacer = new Label(""); // $NON-NLS-1$ headerDockPanel.add(label, DockPanel.WEST); headerDockPanel.setCellWidth(label, "100%"); // $NON-NLS-1$ headerDockPanel.add(deleteRoleAssignmentBtn, DockPanel.EAST); VerticalPanel spacer2 = new VerticalPanel(); spacer2.setWidth("2"); // $NON-NLS-1$ headerDockPanel.add(spacer2, DockPanel.EAST); headerDockPanel.add(addRoleAssignmentBtn, DockPanel.EAST); headerDockPanel.add(spacer, DockPanel.WEST); headerDockPanel.setCellWidth(spacer, "100%"); // $NON-NLS-1$ DockPanel assignedRolesPanel = new DockPanel(); assignedRolesPanel.add(headerDockPanel, DockPanel.NORTH); assignedRolesPanel.add(assignedRolesList, DockPanel.CENTER); assignedRolesPanel.setCellHeight(assignedRolesList, "100%"); // $NON-NLS-1$ assignedRolesPanel.setCellWidth(assignedRolesList, "100%"); // $NON-NLS-1$ assignedRolesList.setHeight("100%"); // $NON-NLS-1$ assignedRolesList.setWidth("100%"); // $NON-NLS-1$ assignedRolesList.addChangeListener(this); deleteRoleAssignmentBtn.addClickListener(this); addRoleAssignmentBtn.addClickListener(this); fieldsetPanel.add(assignedRolesPanel); assignedRolesPanel.setWidth("100%"); // $NON-NLS-1$ assignedRolesPanel.setHeight("100%"); // $NON-NLS-1$ return fieldsetPanel; }