Package com.extjs.gxt.ui.client.widget.table

Examples of com.extjs.gxt.ui.client.widget.table.TableItem


    table.removeAll();
  }

  @Override
  protected void update(M model) {
    TableItem item = (TableItem) findItem(model);
    if (item != null) {
      setModel(item, model);
      updateItemStyles(item);
      updateItemValues(item);
    }
View Full Code Here


      setSelection(store.getAt(0));
    }
  }

  protected TableItem createItem(M model) {
    TableItem item = new TableItem(new Object[table.getColumnCount()]);
    setModel(item, model);
    updateItemValues(item);
    updateItemStyles(item);
    return item;
  }
View Full Code Here

    }
  }

  @Override
  protected void onRemove(StoreEvent se) {
    TableItem item = (TableItem) findItem((M) se.model);
    if (item != null) {
      table.remove(item);
    }
  }
View Full Code Here

        return idx1 < idx2 ? -1 : 1;
      }
    });
    int rows = table.getItemCount();
    for (int i = 0; i < rows; i++) {
      TableItem item = table.getItem(i);
      table.getView().getDataEl().dom.appendChild(item.getElement());
    }
  }
View Full Code Here

  @Override
  protected void setSelectionFromProvider(List<M> selection) {
    List<TableItem> sel = new ArrayList<TableItem>();
    for (M m : selection) {
      TableItem item = (TableItem) findItem(m);
      if (item != null) {
        sel.add(item);
      }
    }
    table.setSelectedItems(sel);
View Full Code Here

    WPaloAdminServiceProvider.getInstance().getUsers(wb.getUser().getSessionId(),
        new Callback<XUser[]>(constants.loadingAllUsersFailed()) {
          public void onSuccess(XUser[] users) {
            for (XUser user : users) {
              boolean check = userIDs.contains(user.getId());
              TableItem item = new TableItem(new Object[] {
                  check, user.getLogin() });
              item.setData(MEMBER_DATA, user);
              membersTable.add(item);
            }
          }
        });
    // }
View Full Code Here

                if (p.equals("R")) rightName = constants.read();
                else if (p.equals("W")) rightName = constants.write();
                else if (p.equals("D")) rightName = constants.delete();
                else if (p.equals("C")) rightName = constants.create();
                else if (p.equals("G")) rightName = constants.grant();
                TableItem item = new TableItem(new Object[] {
                    check, role.getName(),
                    rightName, translateDescription(role.getDescription()) });
                item.setData(ROLE_DATA, role);
                rolesTable.add(item);
              }
            }
          });
    }
View Full Code Here

            int index = 0;
            for (XAccount account : accounts) {
              XConnection connection = account.getConnection();
              String type = connection.getConnectionType() ==
                XConnection.TYPE_HTTP ? "Palo" : "XMLA";
              accountTable.insert(new TableItem(new Object[] {
                  account.getLogin(), connection.getName(),
                  connection.getHost(), connection.getService(),
                  type}), index++);
            }
          }
View Full Code Here

                else if (p.equals("W")) rightName = constants.write();
                else if (p.equals("D")) rightName = constants.delete();
                else if (p.equals("C")) rightName = constants.create();
                else if (p.equals("G")) rightName = constants.grant();               
                String desc = translateDescription(role.getDescription());
                TableItem item = new TableItem(new Object[] {
                    check, role.getName(), rightName,
                    desc });
                item.setData(ROLE_DATA, role);
                rolesTable.add(item);
              }
            }
          });
    }
View Full Code Here

    rightsTable.add(createTableItem(constants.grant(), "G"));

    rightsTable.addTableListener(new TableListener() {
        public void tableCellClick(TableEvent te) {
          if (te.cellIndex == 0) {
            TableItem item = rightsTable.getItem(te.rowIndex);
            boolean state = false;
            if (item.getValue(0) instanceof Radio) {
              state = ((Radio) item.getValue(0)).getValue();
            }
            if (state) {
              for (int i = 0; i < rightsTable.getItemCount(); i++) {
                if (i == te.rowIndex) {
                  continue;
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.widget.table.TableItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.