Package com.google.gwt.dom.builder.shared

Examples of com.google.gwt.dom.builder.shared.TableCellBuilder


         }
      }

      private void buildExpandColumn(RObjectEntry rowValue, TableRowBuilder row)
      {
         TableCellBuilder expandCol = row.startTD();
         expandCol.className(style_.expandCol());
         renderCell(expandCol, createContext(0), objectExpandColumn_, rowValue);
         expandCol.endTD();
      }
View Full Code Here


         expandCol.endTD();
      }

      private void buildNameColumn(RObjectEntry rowValue, TableRowBuilder row)
      {
         TableCellBuilder nameCol = row.startTD();
         String styleName = style_.nameCol();
         if (rowValue.getCategory() == Categories.Data &&
             host_.enableClickableObjects())
         {
            styleName += (" " + style_.clickableCol());
         }
         String size = rowValue.rObject.getSize() > 0 ?
                              ", " + rowValue.rObject.getSize() + " bytes" :
                              "";
         nameCol.className(styleName);
         nameCol.title(
                 rowValue.rObject.getName() +
                 " (" + rowValue.rObject.getType() + size + ")");
         renderCell(nameCol, createContext(1), objectNameColumn_, rowValue);
         nameCol.endTD();
      }
View Full Code Here

      private void buildDescriptionColumn(RObjectEntry rowValue,
                                          TableRowBuilder row)
      {
         // build the column containing the description of the object
         TableCellBuilder descCol = row.startTD();
         String title = rowValue.rObject.getValue();
         if ((!title.equals(RObjectEntry.NO_VALUE)) &&
             title != null)
         {
            if (rowValue.isPromise())
            {
               title += " (unevaluated promise)";
            }
            descCol.title(title);
         }
         String descriptionStyle = style_.valueCol();
         if (rowValue.isPromise())
         {
            descriptionStyle += (" " + style_.unevaluatedPromise());
         }
         else if (rowValue.getCategory() == RObjectEntry.Categories.Data &&
             host_.enableClickableObjects())
         {
            descriptionStyle += (" " +
                                 style_.dataFrameValueCol() + " " +
                                 style_.clickableCol());
         }
         if (rowValue.getCategory() == RObjectEntry.Categories.Data)
         {
            descriptionStyle += (" " +
                                ThemeStyles.INSTANCE.environmentDataFrameCol());
         }
         descCol.className(descriptionStyle);
         renderCell(descCol, createContext(2), objectDescriptionColumn_, rowValue);
         descCol.endTD();
      }
View Full Code Here

                  categoryTitle = "Values";
                  break;
            }
            TableRowBuilder leaderRow = startRow().className(
                    style_.categoryHeaderRow());
            TableCellBuilder objectHeader = leaderRow.startTD();
            objectHeader.colSpan(3)
                    .className(style_.categoryHeaderText())
                    .text(categoryTitle)
                    .endTD();
            leaderRow.endTR();
         }
View Full Code Here

         for (int idx = 0; idx < contents.length(); idx++)
         {
            TableRowBuilder detail = startRow().className(style_.detailRow());
            detail.startTD().endTD();
            TableCellBuilder objectDetail = detail.startTD();
            String content = contents.get(idx);
            // ignore the first two characters of output
            // ("$ value:" becomes "value:")
            content = content.substring(2, content.length()).trim();
            objectDetail.colSpan(2)
                    .title(content)
                    .text(content)
                    .endTD();
            detail.endTR();
         }
View Full Code Here

         // Render the "select all" checkbox header cell
         TableRowBuilder row = startRow();
        
         if (selectionEnabled())
         {
            TableCellBuilder selectAll = row.startTH();
            selectAll.className(style_.objectGridHeader() + " " +
                                style_.checkColumn());
            renderHeader(selectAll, new Cell.Context(0, 0, null), checkHeader_);
            selectAll.end();
         }
  
         // Render a header for each column
         for (int i = 0; i < columns_.size(); i++)
         {
            ObjectGridColumn col = columns_.get(i);
            TableCellBuilder cell = row.startTH();
            cell.className(style_.objectGridHeader());
            Cell.Context context = new Cell.Context(0, i, null);
            renderSortableHeader(cell, context, col.getHeader(),
                  i == host_.getSortColumn(),
                  host_.getAscendingSort());
            cell.endTH();
         }
         row.end();
         return true;
      }
View Full Code Here

         TableRowBuilder row = startRow();

         if (selectionEnabled())
         {
            TableCellBuilder check = row.startTD();
            check.className(style_.checkColumn());
            check.style().width(5, Unit.PCT);
            renderCell(check, createContext(0), checkColumn_, rowValue);
            check.endTD();
         }

         for (int i = 0; i < columns_.size(); i++)
         {
            ObjectGridColumn col = columns_.get(i);
            TableCellBuilder td = row.startTD();
            String className = style_.objectGridColumn();
            if (col.getType() == ObjectGridColumn.COLUMN_VALUE)
            {
               className += " " + style_.valueColumn();
               if (host_.enableClickableObjects() &&
                   rowValue.getCategory() == Categories.Data)
               {
                  className += " " + style_.dataFrameValueCol() +
                               " " +
                               ThemeStyles.INSTANCE.environmentDataFrameCol();
               }
               if (rowValue.isPromise())
               {
                  className += " " + environmentStyle_.unevaluatedPromise();
               }
               td.title(rowValue.getDisplayValue());
            }
            if (col.getType() == ObjectGridColumn.COLUMN_NAME)
            {
               td.title(rowValue.rObject.getName());
            }
            td.className(className);
            renderCell(td, createContext(i+1), col, rowValue);
            td.endTD();
         }
        
         row.end();
      }
View Full Code Here

         String library = pkg.getInPackratLibary() ?
               pkg.getSourceLibrary() : pkg.getLibrary();
         if (pkg.isFirstInLibrary())
         {
           TableRowBuilder row = startRow();
           TableCellBuilder cell = row.startTD();
           cell.colSpan(5).className(
                 PackagesCellTableResources.INSTANCE.cellTableStyle()
                 .libraryHeader());
           cell.title(library);
           cell.startH1().text(
                 PackageLibraryUtils.getLibraryDescription(session_, library))
                 .endH1();
           row.endTD();
          
           row.endTR();
View Full Code Here

          classesBuilder.append(sortedStyle);
        }
        appendExtraStyles(prevHeader, classesBuilder);

        // Render the header.
        TableCellBuilder th =
            tr.startTH().colSpan(prevColspan).className(classesBuilder.toString());
        enableColumnHandlers(th, column);
        if (prevHeader != null) {
          // Build the header.
          Context context = new Context(0, curColumn - prevColspan, prevHeader.getKey());
          renderSortableHeader(th, context, prevHeader, isSorted, isSortAscending);
        }
        th.endTH();

        // Reset the previous header.
        prevHeader = header;
        prevColspan = 1;
        classesBuilder = new StringBuilder(className);
        isSortable = false;
        isSorted = false;
      } else {
        // Increment the colspan if the headers == each other.
        prevColspan++;
      }

      // Update the sorted state.
      column = table.getColumn(curColumn);
      if (!isFooter && column.isSortable()) {
        isSortable = true;
        isSorted = (column == sortedColumn);
      }
    }

    // Append the last header.
    if (isSortable) {
      classesBuilder.append(sortableStyle);
    }
    if (isSorted) {
      classesBuilder.append(sortedStyle);
    }

    // The first and last columns could be the same column.
    classesBuilder.append(" ").append(
        isFooter ? style.lastColumnFooter() : style.lastColumnHeader());
    appendExtraStyles(prevHeader, classesBuilder);

    // Render the last header.
    TableCellBuilder th = tr.startTH().colSpan(prevColspan).className(classesBuilder.toString());
    enableColumnHandlers(th, column);
    if (prevHeader != null) {
      Context context = new Context(0, curColumn - prevColspan, prevHeader.getKey());
      renderSortableHeader(th, context, prevHeader, isSorted, isSortAscending);
    }
    th.endTH();

    // End the row.
    tr.endTR();

    return true;
View Full Code Here

TOP

Related Classes of com.google.gwt.dom.builder.shared.TableCellBuilder

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.