public GroupMembersTab(final IEditor editor) { super(constants.members()); this.editor = editor; setText(constants.members()); setIconStyle("icon-user"); setClosable(false); // create groups table List<TableColumn> columns = new ArrayList<TableColumn>(); TableColumn cbox = new CheckBoxTableColumn("mem_check"); columns.add(cbox); TableColumn col = new TableColumn("User", constants.user(), 200); col.setMinWidth(75); col.setMaxWidth(400); columns.add(col); TableColumnModel cm = new TableColumnModel(columns); membersTable = new Table(cm); membersTable.setSelectionMode(SelectionMode.SINGLE); membersTable.setHorizontalScroll(true); // disable to allow CheckBox widget! membersTable.setBulkRender(false); membersTable.setAutoHeight(true); membersTable.addTableListener( new TableListener() { public void tableCellClick(TableEvent te) { editor.markDirty(); } }); add(membersTable); }
GroupRolesTab(final IEditor editor) { super(constants.roles()); setText(constants.roles()); setIconStyle("icon-role2"); setClosable(false); // create roles table List<TableColumn> columns = new ArrayList<TableColumn>(); TableColumn cbox = new CheckBoxTableColumn("role_check"); columns.add(cbox); TableColumn col = new TableColumn("Role", constants.role(), 150); col.setMinWidth(75); col.setMaxWidth(300); columns.add(col); col = new TableColumn("Right", constants.right(), 100); col.setAlignment(HorizontalAlignment.LEFT); columns.add(col); col = new TableColumn("Description", constants.description(), 800); col.setMaxWidth(800); col.setAlignment(HorizontalAlignment.LEFT); columns.add(col); TableColumnModel cm = new TableColumnModel(columns); rolesTable = new Table(cm); rolesTable.setSelectionMode(SelectionMode.MULTI); rolesTable.setHorizontalScroll(true); rolesTable.setBulkRender(false); rolesTable.setAutoHeight(true); rolesTable.addTableListener( new TableListener() { public void tableCellClick(TableEvent te) { editor.markDirty(); } }); add(rolesTable); }