Examples of LayoutToken


Examples of org.apache.myfaces.tobago.component.LayoutToken

      if (!rowIsRendered(rows.get(i))) {
        continue;
      }
      height += getCellPadding(facesContext, layout,  first);
      first = false;
      LayoutToken token = layoutTokens.get(i);
      if (token instanceof PixelLayoutToken) {
        height += ((PixelLayoutToken) token).getPixel();
      } else if (token instanceof FixedLayoutToken) {
        height += getMaxHeight(facesContext, rows.get(i), false);
      } else if (token instanceof MinimumLayoutToken) {
View Full Code Here

Examples of org.apache.myfaces.tobago.component.LayoutToken

      if (!columnIsRendered(rows,  i)) {
        continue;
      }
      width += getCellPadding(facesContext, layout,  first);
      first = false;
      LayoutToken token = layoutTokens.get(i);
      if (token instanceof PixelLayoutToken) {
        width += ((PixelLayoutToken) token).getPixel();
      } else if (token instanceof FixedLayoutToken) {
        width += getMaxWidth(facesContext, rows, i, false);
      } else if (token instanceof MinimumLayoutToken) {
View Full Code Here

Examples of org.apache.myfaces.tobago.component.LayoutToken

  public void parseFixedSpace(LayoutInfo layoutInfo, UIGridLayout layout,
      LayoutTokens layoutTokens, boolean width, FacesContext facesContext) {

    //String[] tokens = layoutInfo.getLayoutTokens();
    for (int i = 0; i < layoutTokens.getSize(); i++) {
      LayoutToken token = layoutTokens.get(i);
      if (token instanceof FixedLayoutToken) {
        int max = 0;
        final List<UIGridLayout.Row> rows = layout.ensureRows();
        if (!rows.isEmpty()) {
          if (width) {
View Full Code Here

Examples of org.apache.myfaces.tobago.component.LayoutToken

  private void parseFixedSpace(LayoutInfo layoutInfo, UIGridLayout layout,
                               boolean width, FacesContext facesContext) {

    LayoutTokens tokens = layoutInfo.getLayoutTokens();
    for (int i = 0; i < tokens.getSize(); i++) {
      LayoutToken token = tokens.get(i);
      if (token instanceof FixedLayoutToken) {
        int max = 0;
        final List<UIGridLayout.Row> rows = layout.ensureRows();
        if (!rows.isEmpty()) {
          if (width) {
View Full Code Here

Examples of org.apache.myfaces.tobago.component.LayoutToken

      if (!rowIsRendered(rows.get(i))) {
        continue;
      }
      height += getCellPadding(facesContext, layout,  first);
      first = false;
      LayoutToken token = layoutTokens.get(i);
      if (token instanceof PixelLayoutToken) {
        height += ((PixelLayoutToken) token).getPixel();
      } else if (token instanceof FixedLayoutToken) {
        height += getMaxHeight(facesContext, rows.get(i), false);
      } else if (token instanceof MinimumLayoutToken) {
View Full Code Here

Examples of org.apache.myfaces.tobago.component.LayoutToken

      if (!columnIsRendered(rows,  i)) {
        continue;
      }
      width += getCellPadding(facesContext, layout,  first);
      first = false;
      LayoutToken token = layoutTokens.get(i);
      if (token instanceof PixelLayoutToken) {
        width += ((PixelLayoutToken) token).getPixel();
      } else if (token instanceof FixedLayoutToken) {
        width += getMaxWidth(facesContext, rows, i, false);
      } else if (token instanceof MinimumLayoutToken) {
View Full Code Here

Examples of org.apache.myfaces.tobago.component.LayoutToken

  public void parseFixedSpace(LayoutInfo layoutInfo, UIGridLayout layout,
      LayoutTokens layoutTokens, boolean width, FacesContext facesContext) {

    //String[] tokens = layoutInfo.getLayoutTokens();
    for (int i = 0; i < layoutTokens.getSize(); i++) {
      LayoutToken token = layoutTokens.get(i);
      if (token instanceof FixedLayoutToken) {
        int max = 0;
        final List<UIGridLayout.Row> rows = layout.ensureRows();
        if (!rows.isEmpty()) {
          if (width) {
View Full Code Here

Examples of org.apache.myfaces.tobago.component.LayoutToken

  private void parseFixedSpace(LayoutInfo layoutInfo, UIGridLayout layout,
                               boolean width, FacesContext facesContext) {

    LayoutTokens tokens = layoutInfo.getLayoutTokens();
    for (int i = 0; i < tokens.getSize(); i++) {
      LayoutToken token = tokens.get(i);
      if (token instanceof FixedLayoutToken) {
        int max = 0;
        final List<UIGridLayout.Row> rows = layout.ensureRows();
        if (!rows.isEmpty()) {
          if (width) {
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.LayoutToken

  }

  private void parseFixedWidth(LayoutInfo layoutInfo, List<UIColumn> renderedColumns, Measure columnSelectorWidth) {
    LayoutTokens tokens = layoutInfo.getLayoutTokens();
    for (int i = 0; i < tokens.getSize(); i++) {
      LayoutToken token = tokens.get(i);
      if (token instanceof AutoLayoutToken) {
        int width = 0;
        if (!renderedColumns.isEmpty()) {
          if (i < renderedColumns.size()) {
            UIColumn column = renderedColumns.get(i);
View Full Code Here

Examples of org.apache.myfaces.tobago.layout.LayoutToken

    // process auto tokens
    int i = 0;

    for (BankHead head : heads) {
      LayoutToken token = head.getToken();

      if (token instanceof PixelLayoutToken) {
        if (head.isRendered() || isRigid()) {
          heads[i].setCurrent(((PixelLayoutToken) token).getMeasure());
        } else {
          heads[i].setCurrent(Measure.ZERO);
        }
      }

      IntervalList intervalList = new IntervalList();
      for (int j = 0; j < heads2.length; j++) {
        Cell cell = grid.getCell(i, j, orientation);
        if (cell instanceof OriginCell) {
          OriginCell origin = (OriginCell) cell;
          LayoutComponent component = cell.getComponent();

          if (component instanceof LayoutContainer && (component.isRendered() || isRigid())) {
            ((LayoutContainer) component).getLayoutManager().preProcessing(orientation);
          }

          if (token instanceof AutoLayoutToken || token instanceof RelativeLayoutToken) {
            if (origin.getSpan(orientation) == 1 && (component.isRendered() || isRigid())) {
              intervalList.add(new Interval(component, orientation));
            } else {
              if (LOG.isDebugEnabled()) {
                LOG.debug("Components with span > 1 will be ignored in 'auto' layout rows/columns.");
                // todo: give this information to the developer
              }
            }
          }
        }
      }

      intervalList.evaluate();
      if (token instanceof AutoLayoutToken || token instanceof RelativeLayoutToken) {
        heads[i].setIntervalList(intervalList);
      }
      if (token instanceof AutoLayoutToken) {
        heads[i].setCurrent(intervalList.getCurrent());
      }
      i++;
    }

/*
    IntervalList relatives = new IntervalList();
    for (BankHead head : heads) {
      LayoutToken token = head.getToken();
      if (token instanceof RelativeLayoutToken) {
        final int factor = ((RelativeLayoutToken) token).getFactor();
        for (Interval interval : head.getIntervalList()) {
          relatives.add(new Interval(interval, factor));
        }
      }
    }
    relatives.evaluate();
*/

    // set the size if all sizes of the grid are set
    Measure sum = Measure.ZERO;
    for (BankHead head : heads) {
      Measure size = null;
      final LayoutToken token = head.getToken();
      if (token instanceof RelativeLayoutToken) {
//        final int factor = ((RelativeLayoutToken) token).getFactor();
//        size = relatives.getCurrent().multiply(factor);
      } else {
        size = head.getCurrent();
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.