Package com.google.gwt.cell.client

Examples of com.google.gwt.cell.client.TextCell


        queueTable.setSelectionModel(new SingleSelectionModel<Queue>());

        dataProvider = new ListDataProvider<Queue>();
        dataProvider.addDataDisplay(queueTable);

        com.google.gwt.user.cellview.client.Column<Queue, String> nameColumn = new com.google.gwt.user.cellview.client.Column<Queue, String>(new TextCell()) {
            @Override
            public String getValue(Queue object) {
                return object.getName();
            }
        };


        com.google.gwt.user.cellview.client.Column<Queue, String> protocolColumn = new com.google.gwt.user.cellview.client.Column<Queue, String>(new TextCell()) {
            @Override
            public String getValue(Queue object) {
                List<String> names = object.getEntries();
                StringBuilder builder = new StringBuilder();
                if (!names.isEmpty())
View Full Code Here


   {  
      list_ = list;
      key_ = key;
      headerLabel_ = headerLabel;
     
      column_ = new Column<T, String>(new TextCell()) {
         @Override
         public String getValue(T obj) {
            return obj.getAsString(key_);
         }
      };
View Full Code Here

        ListDataProvider<String> provider = new ListDataProvider<String>();
        for (int i = 0; i < 10; i++) {
          char c = (char) ('a' + i);
          provider.getList().add("" + c);
        }
        return new DefaultNodeInfo<String>(provider, new TextCell(), selectionModel, null);
      }
      throw new IllegalArgumentException("Unexpected value: " + value);
    }
View Full Code Here

  public String getModuleName() {
    return "com.google.gwt.user.cellview.CellView";
  }

  public void testGetVisibleItem() {
    AbstractHasData<String> display = createAbstractHasData(new TextCell());
    ListDataProvider<String> provider = new ListDataProvider<String>(
        createData(0, 13));
    provider.addDataDisplay(display);
    display.setVisibleRange(10, 10);
View Full Code Here

      // Expected.
    }
  }

  public void testGetVisibleItems() {
    AbstractHasData<String> display = createAbstractHasData(new TextCell());
    ListDataProvider<String> provider = new ListDataProvider<String>();
    provider.addDataDisplay(display);
    display.setVisibleRange(10, 3);

    // No items when no data is present.
View Full Code Here

  /**
   * Test that we don't get any errors when keyboard selection is disabled.
   */
  public void testKeyboardSelectionPolicyDisabled() {
    AbstractHasData<String> display = createAbstractHasData(new TextCell());
    display.setRowData(createData(0, 10));
    display.getPresenter().flush();
    display.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);

    assertNull(display.getKeyboardSelectedElement());
View Full Code Here

      if (result != null && result.getGroupCount() > 0) {
        return;
      }
    }

    AbstractHasData<String> display = createAbstractHasData(new TextCell());
    ListDataProvider<String> provider = new ListDataProvider<String>(
        createData(0, 10));
    provider.addDataDisplay(display);
    display.getPresenter().flush();
View Full Code Here

  public void testPushColumn() {
    ColumnSortList list = new ColumnSortList();
    assertEquals(0, list.size());

    // Push an item.
    Column<String, String> col0 = new IdentityColumn<String>(new TextCell());
    ColumnSortInfo item0 = list.push(col0);
    assertEquals(1, list.size());
    assertEquals(item0, list.get(0));
    assertEquals(col0, list.get(0).getColumn());
    assertTrue(list.get(0).isAscending());

    // Push the same item. Should change sort order.
    ColumnSortInfo item0desc = list.push(col0);
    assertEquals(1, list.size());
    assertEquals(item0desc, list.get(0));
    assertEquals(col0, list.get(0).getColumn());
    assertFalse(list.get(0).isAscending());

    // Push a second item.
    Column<String, String> col1 = new IdentityColumn<String>(new TextCell());
    list.push(col1);
    assertEquals(2, list.size());
    assertEquals(col1, list.get(0).getColumn());
    assertTrue(list.get(0).isAscending());
    assertEquals(col0, list.get(1).getColumn());
    assertFalse(list.get(1).isAscending());

    // Push a third item.
    Column<String, String> col2 = new IdentityColumn<String>(new TextCell());
    list.push(col2);
    assertEquals(3, list.size());
    assertEquals(col2, list.get(0).getColumn());
    assertTrue(list.get(0).isAscending());
    assertEquals(col1, list.get(1).getColumn());
View Full Code Here

  public void testPushColumnDescending() {
    ColumnSortList list = new ColumnSortList();
    assertEquals(0, list.size());

    // Push a column.
    Column<String, String> col0 = new IdentityColumn<String>(new TextCell());
    col0.setDefaultSortAscending(false);
    ColumnSortInfo item0 = list.push(col0);
    assertEquals(1, list.size());
    assertEquals(item0, list.get(0));
    assertEquals(col0, list.get(0).getColumn());
View Full Code Here

   * Create a {@link ColumnSortInfo} with a unique column and cell.
   *
   * @return a new {@link ColumnSortInfo}
   */
  private ColumnSortInfo createColumnSortInfo() {
    return new ColumnSortInfo(new IdentityColumn<String>(new TextCell()), true);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.cell.client.TextCell

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.