Examples of LayoutComponent


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

    // call manage sizes for all sub-layout-managers
    for (int i = 0; i < heads.length; i++) {
      for (int j = 0; j < heads2.length; j++) {
        Cell cell = grid.getCell(i, j, orientation);
        if (cell instanceof OriginCell) {
          LayoutComponent component = cell.getComponent();

          component.setDisplay(Display.BLOCK);

          // compute the position of the cell
          Measure position = Measure.ZERO;
          position = position.add(LayoutUtils.getPaddingBegin(orientation, getLayoutContainer()));
          position = position.add(getMarginBegin(orientation));
          for (int k = 0; k < i; k++) {
            if (heads[k] != null
                && heads[k].getCurrent() != null
                && heads[k].isRendered()
                && heads[k].getCurrent().greaterThan(Measure.ZERO)) {
              position = position.add(heads[k].getCurrent());
              position = position.add(getSpacing(orientation));
            }
          }
          if (orientation == Orientation.HORIZONTAL) {
            component.setLeft(position);
          } else {
            component.setTop(position);
          }

          // call sub layout manager
          if (component instanceof LayoutContainer) {
            ((LayoutContainer) component).getLayoutManager().postProcessing(orientation);
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.