Examples of HorizontalAlignmentConstant


Examples of com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant

        String cellClass = styles.cell() + " " + gridView.getStateStyles().cell();
        String cs = config.getCellStyle(cm.getColumn(i));
        if (cs != null) {
          cellClass += " " + cs;
        }
        HorizontalAlignmentConstant align = cm.getColumnAlignment(i);
        SafeStyles s = empty;
        if (align != null) {
          s = SafeStylesUtils.fromTrustedString("text-align:" + align.getTextAlignString() + ";");
        }
        trBuilder.append(tpls.td(i, cellClass, empty, cellInner, s, getRenderedValue(j, i)));
      }
      buf.append(tpls.tr("", trBuilder.toSafeHtml()));
    }
View Full Code Here

Examples of com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant

      if (columnStyles != null) {
        builder.append(columnStyles);
      }
    }

    HorizontalAlignmentConstant align = cm.getColumnAlignment(colIndex);
    if (align != null) {
      builder.append(SafeStylesUtils.fromTrustedString("text-align:" + align.getTextAlignString() + ";"));
    }
    return builder.toSafeStyles();
  }
View Full Code Here

Examples of com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant

      table.setWidget(row, col, group);

      cf.setStyleName(row, col, cellClass);

      HorizontalAlignmentConstant align = config.getHorizontalAlignment();
      cf.setHorizontalAlignment(row, col, align);

      int ncs = cs;
      if (cs > 1) {
        for (int i = col; i < (col + cs); i++) {
          if (cm.isHidden(i)) {
            ncs -= 1;
          }
        }
      }

      cf.setRowSpan(row, col, rs);
      cf.setColSpan(row, col, ncs);
    }

    for (int i = 0; i < cols; i++) {
      Head h = createNewHead(cm.getColumn(i));
      if (cm.isHidden(i)) {
        continue;
      }
      int rowspan = 1;
      if (rows > 1) {
        for (int j = rows - 2; j >= 0; j--) {
          if (!cm.hasGroup(j, i)) {
            rowspan += 1;
          }
        }
      }

      int row;
      if (rowspan > 1) {
        row = (rows - 1) - (rowspan - 1);
      } else {
        row = rows - 1;
      }

      h.row = row;

      if (rowspan > 1) {
        table.setWidget(row, i, h);
        table.getFlexCellFormatter().setRowSpan(row, i, rowspan);
      } else {
        table.setWidget(row, i, h);
      }
      ColumnConfig<M, ?> cc = cm.getColumn(i);
      String s = cc.getCellClassName() == null ? "" : " " + cc.getCellClassName();
      cf.setStyleName(row, i, cellClass + s);
      cf.getElement(row, i).setPropertyInt("gridColumnIndex", i);

      HorizontalAlignmentConstant align = cm.getColumnAlignment(i);
      if (align != null) {
        table.getCellFormatter().setHorizontalAlignment(row, i, align);
        if (align == HasHorizontalAlignment.ALIGN_RIGHT) {
          table.getCellFormatter().getElement(row, i).getFirstChildElement().getStyle().setPropertyPx("paddingRight",
              getRightAlignOffset());
View Full Code Here

Examples of com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant

      if (columnStyles != null) {
        builder.append(columnStyles);
      }
    }

    HorizontalAlignmentConstant align = cm.getColumnAlignment(colIndex);
    if (align != null) {
      builder.append(SafeStylesUtils.fromTrustedString("text-align:" + align.getTextAlignString() + ";"));
    }
    return builder.toSafeStyles();
  }
View Full Code Here

Examples of com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant

        } else {
          contents = template.div(cellBuilder.toSafeHtml());
        }

        // Build the cell.
        HorizontalAlignmentConstant hAlign = column.getHorizontalAlignment();
        VerticalAlignmentConstant vAlign = column.getVerticalAlignment();
        if (hAlign != null && vAlign != null) {
          trBuilder.append(template.tdBothAlign(tdClasses,
              hAlign.getTextAlignString(), vAlign.getVerticalAlignString(),
              contents));
        } else if (hAlign != null) {
          trBuilder.append(template.tdHorizontalAlign(tdClasses,
              hAlign.getTextAlignString(), contents));
        } else if (vAlign != null) {
          trBuilder.append(template.tdVerticalAlign(tdClasses,
              vAlign.getVerticalAlignString(), contents));
        } else {
          trBuilder.append(template.td(tdClasses, contents));
View Full Code Here

Examples of com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant

        retValue = this.base.getOffsetHeight();
        return retValue;
    }
   
    public HasHorizontalAlignment.HorizontalAlignmentConstant getHorizontalAlignment() {
        HorizontalAlignmentConstant retValue;
       
        retValue = this.base.getHorizontalAlignment();
        return retValue;
    }
View Full Code Here

Examples of com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant

        verticalPanel = new VerticalPanel();
        verticalPanel.setWidth("100%");
        verticalPanel.setSpacing(4);
        initWidget(verticalPanel);
       
        HorizontalAlignmentConstant hal = HasHorizontalAlignment.ALIGN_LEFT;
        HorizontalAlignmentConstant har = HasHorizontalAlignment.ALIGN_RIGHT;
       
        grid = new Grid(1, 2);
        verticalPanel.add(grid);
       
        DecoratorPanel dp = new DecoratorPanel();
View Full Code Here

Examples of com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant

        // Build the contents.
        SafeHtml contents = SafeHtmlUtils.EMPTY_SAFE_HTML;
        contents = template.div(cellBuilder.toSafeHtml());

        // Build the cell.
        HorizontalAlignmentConstant hAlign = column.getHorizontalAlignment();
        VerticalAlignmentConstant vAlign = column.getVerticalAlignment();
        if (hAlign != null && vAlign != null) {
          trBuilder.append(template.tdBothAlign(tdClasses, hAlign.getTextAlignString(), vAlign
              .getVerticalAlignString(), contents));
        } else if (hAlign != null) {
          trBuilder.append(template.tdHorizontalAlign(tdClasses, hAlign.getTextAlignString(),
              contents));
        } else if (vAlign != null) {
          trBuilder.append(template.tdVerticalAlign(tdClasses, vAlign.getVerticalAlignString(),
              contents));
        } else {
View Full Code Here

Examples of com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant

      table.setWidget(row, col, group);

      cf.setStyleName(row, col, cellClass);

      HorizontalAlignmentConstant align = config.getHorizontalAlignment();
      cf.setHorizontalAlignment(row, col, align);

      int ncs = cs;
      if (cs > 1) {
        for (int i = col; i < (col + cs); i++) {
          if (cm.isHidden(i)) {
            ncs -= 1;
          }
        }
      }

      cf.setRowSpan(row, col, rs);
      cf.setColSpan(row, col, ncs);
    }

    for (int i = 0; i < cols; i++) {
      Head h = createNewHead(cm.getColumn(i));
      if (cm.isHidden(i)) {
        continue;
      }
      int rowspan = 1;
      if (rows > 1) {
        for (int j = rows - 2; j >= 0; j--) {
          if (!cm.hasGroup(j, i)) {
            rowspan += 1;
          }
        }
      }

      int row;
      if (rowspan > 1) {
        row = (rows - 1) - (rowspan - 1);
      } else {
        row = rows - 1;
      }

      h.row = row;

      if (rowspan > 1) {
        table.setWidget(row, i, h);
        table.getFlexCellFormatter().setRowSpan(row, i, rowspan);
      } else {
        table.setWidget(row, i, h);
      }
      ColumnConfig<M, ?> cc = cm.getColumn(i);
      String s = cc.getColumnClassSuffix() == null ? "" : " x-grid-td-" + cc.getColumnClassSuffix();
      cf.setStyleName(row, i, cellClass + s);
      cf.getElement(row, i).setPropertyInt("gridColumnIndex", i);

      HorizontalAlignmentConstant align = cm.getColumnAlignment(i);
      if (align != null) {
        table.getCellFormatter().setHorizontalAlignment(row, i, align);
        if (align == HasHorizontalAlignment.ALIGN_RIGHT) {
          table.getCellFormatter().getElement(row, i).getFirstChildElement().getStyle().setPropertyPx("paddingRight",
              16);
View Full Code Here

Examples of com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant

        // Build the contents.
        SafeHtml contents = SafeHtmlUtils.EMPTY_SAFE_HTML;
        contents = template.div(cellBuilder.toSafeHtml());

        // Build the cell.
        HorizontalAlignmentConstant hAlign = column.getHorizontalAlignment();
        VerticalAlignmentConstant vAlign = column.getVerticalAlignment();
        if (hAlign != null && vAlign != null) {
          trBuilder.append(template.tdBothAlign(tdClasses, hAlign.getTextAlignString(), vAlign
              .getVerticalAlignString(), contents));
        } else if (hAlign != null) {
          trBuilder.append(template.tdHorizontalAlign(tdClasses, hAlign.getTextAlignString(),
              contents));
        } else if (vAlign != null) {
          trBuilder.append(template.tdVerticalAlign(tdClasses, vAlign.getVerticalAlignString(),
              contents));
        } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.