- // protected Table createTable(Composite parent) {
- // // TODO use a more flexible API
- // Table table = new Table(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- // table.setLinesVisible(true);
- // table.setHeaderVisible(true);
- // TableColumn column = new TableColumn(table, SWT.LEFT, 0);
- // column.setText("Username");
- // column.setWidth(100);
- // column = new TableColumn(table, SWT.LEFT, 1);
- // column.setText("Displayed name");
- // column.setWidth(150);
- // column = new TableColumn(table, SWT.LEFT, 2);
- // column.setText("E-mail");
- // column.setWidth(100);
- // column = new TableColumn(table, SWT.LEFT, 3);
- // column.setText("First Name");
- // column.setWidth(100);
- // column = new TableColumn(table, SWT.LEFT, 4);
- // column.setText("Last Name");
- // column.setWidth(100);
- // column = new TableColumn(table, SWT.LEFT, 5);
- // column.setText("Status");
- // column.setWidth(50);
- // column = new TableColumn(table, SWT.LEFT, 6);
- // column.setText("Description");
- // column.setWidth(200);
- // return table;
- // }
-
- // private class UsersLabelProvider extends LabelProvider implements
- // ITableLabelProvider {
- // public String getColumnText(Object element, int columnIndex) {
- // try {
- // Node userHome = (Node) element;
- // Node userProfile = userHome.getNode(ARGEO_PROFILE);
- // switch (columnIndex) {
- // case 0:
- // String username = userHome.getProperty(ARGEO_USER_ID)
- // .getString();
- // if (username.equals(session.getUserID()))
- // return "[" + username + "]";
- // else
- // return username;
- // case 1:
- // return getProperty(userProfile, Property.JCR_TITLE);
- // case 2:
- // return getProperty(userProfile, ARGEO_PRIMARY_EMAIL);
- // case 3:
- // return getProperty(userProfile, ARGEO_FIRST_NAME);
- // case 4:
- // return getProperty(userProfile, ARGEO_LAST_NAME);
- // case 5:
- // return userProfile.getProperty(ARGEO_ENABLED).getBoolean() ? ""
- // : "disabled";
- // case 6:
- // return getProperty(userProfile, Property.JCR_DESCRIPTION);
- // default:
- // throw new ArgeoException("Unmanaged column " + columnIndex);
- // }
- // } catch (RepositoryException e) {
- // throw new ArgeoException("Cannot get text", e);
- // }
- // }
- //
- // public Image getColumnImage(Object element, int columnIndex) {
- // return null;
- // }
- //
- // }
-