Package org.apache.myfaces.tobago.layout

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


           }
         }
      }
      prepareRendererAll(facesContext, component);
      if (component instanceof LayoutContainer) {
        LayoutContainer layoutContainer = (LayoutContainer) component;
        Measure width = layoutContainer.getCurrentWidth();
        Measure height = layoutContainer.getCurrentHeight();
        Measure oldWidth = layoutContainer.getWidth();
        Measure oldHeight = layoutContainer.getHeight();
        layoutContainer.setWidth(width);
        layoutContainer.setHeight(height);
        new LayoutContext(layoutContainer).layout();
        layoutContainer.setWidth(oldWidth);
        layoutContainer.setHeight(oldHeight);
      }
      encodeAll(facesContext, component);
    } catch (IOException e) {
      throw new FacesException(e);
    }
View Full Code Here


    // find *
    if (orientation == Orientation.HORIZONTAL && !horizontalAuto
        || orientation == Orientation.VERTICAL && !verticalAuto) {

      final FacesContext facesContext = FacesContext.getCurrentInstance();
      final LayoutContainer container = getLayoutContainer();
      final AbstractUISheet sheet = (AbstractUISheet) container;

      if (orientation == Orientation.HORIZONTAL) {

        ensureColumnWidthList(facesContext, sheet);
View Full Code Here

        factorList.add(((RelativeLayoutToken) head.getToken()).getFactor());
      }
    }
    if (!factorList.isEmpty()) {
      // find rest
      LayoutContainer container = getLayoutContainer();
      Measure available = LayoutUtils.getCurrentSize(orientation, container);
      if (available != null) {
        for (BankHead head : heads) {
          available = available.subtractNotNegative(head.getCurrent());
        }
View Full Code Here

           }
         }
      }
      prepareRendererAll(facesContext, component);
      if (component instanceof LayoutContainer) {
        LayoutContainer layoutContainer = (LayoutContainer) component;
        Measure width = layoutContainer.getCurrentWidth();
        Measure height = layoutContainer.getCurrentHeight();
        Measure oldWidth = layoutContainer.getWidth();
        Measure oldHeight = layoutContainer.getHeight();
        layoutContainer.setWidth(width);
        layoutContainer.setHeight(height);
        new LayoutContext(layoutContainer).layout();
        layoutContainer.setWidth(oldWidth);
        layoutContainer.setHeight(oldHeight);
      }
      encodeAll(facesContext, component);
    } catch (IOException e) {
      throw new FacesException(e);
    }
View Full Code Here

    // find *
    if (orientation == Orientation.HORIZONTAL && !horizontalAuto
        || orientation == Orientation.VERTICAL && !verticalAuto) {

      final FacesContext facesContext = FacesContext.getCurrentInstance();
      final LayoutContainer container = getLayoutContainer();
      final AbstractUISheet sheet = (AbstractUISheet) container;

      if (orientation == Orientation.HORIZONTAL) {

        ensureColumnWidthList(facesContext, sheet);
View Full Code Here

    // find *
    if (orientation == Orientation.HORIZONTAL && !horizontalAuto
        || orientation == Orientation.VERTICAL && !verticalAuto) {
      // find rest
      LayoutContainer container = getLayoutContainer();
      Measure available = LayoutUtils.getCurrentSize(orientation, container);
      if (available != null) {
        for (LayoutComponent component : getLayoutContainer().getComponents()) {
          LayoutUtils.setCurrentSize(orientation, component, available);
        }
View Full Code Here

    } else {
      LOG.warn("Layout Constraints inside of a non LayoutBase component!");
    }

    if (parent instanceof LayoutContainer) {
      LayoutContainer container = (LayoutContainer) parent;

      if (borderLeft != null) {
        if (borderLeft.isLiteral()) {
          container.setBorderLeft(Measure.parse(borderLeft.getValue()));
        } else {
          parent.setValueBinding(Attributes.BORDER_LEFT,
              faceletContext.getFacesContext().getApplication().createValueBinding(borderLeft.getValue()));
        }
      }

      if (borderRight != null) {
        if (borderRight.isLiteral()) {
          container.setBorderRight(Measure.parse(borderRight.getValue()));
        } else {
          parent.setValueBinding(Attributes.BORDER_RIGHT,
              faceletContext.getFacesContext().getApplication().createValueBinding(borderRight.getValue()));
        }
      }

      if (borderTop != null) {
        if (borderTop.isLiteral()) {
          container.setBorderTop(Measure.parse(borderTop.getValue()));
        } else {
          parent.setValueBinding(Attributes.BORDER_TOP,
              faceletContext.getFacesContext().getApplication().createValueBinding(borderTop.getValue()));
        }
      }

      if (borderBottom != null) {
        if (borderBottom.isLiteral()) {
          container.setBorderBottom(Measure.parse(borderBottom.getValue()));
        } else {
          parent.setValueBinding(Attributes.BORDER_BOTTOM,
              faceletContext.getFacesContext().getApplication().createValueBinding(borderBottom.getValue()));
        }
      }

      if (paddingLeft != null) {
        if (paddingLeft.isLiteral()) {
          container.setPaddingLeft(Measure.parse(paddingLeft.getValue()));
        } else {
          parent.setValueBinding(Attributes.PADDING_LEFT,
              faceletContext.getFacesContext().getApplication().createValueBinding(paddingLeft.getValue()));
        }
      }

      if (paddingRight != null) {
        if (paddingRight.isLiteral()) {
          container.setPaddingRight(Measure.parse(paddingRight.getValue()));
        } else {
          parent.setValueBinding(Attributes.PADDING_RIGHT,
              faceletContext.getFacesContext().getApplication().createValueBinding(paddingRight.getValue()));
        }
      }

      if (paddingTop != null) {
        if (paddingTop.isLiteral()) {
          container.setPaddingTop(Measure.parse(paddingTop.getValue()));
        } else {
          parent.setValueBinding(Attributes.PADDING_TOP,
              faceletContext.getFacesContext().getApplication().createValueBinding(paddingTop.getValue()));
        }
      }

      if (paddingBottom != null) {
        if (paddingBottom.isLiteral()) {
          container.setPaddingBottom(Measure.parse(paddingBottom.getValue()));
        } else {
          parent.setValueBinding(Attributes.PADDING_BOTTOM,
              faceletContext.getFacesContext().getApplication().createValueBinding(paddingBottom.getValue()));
        }
      }
View Full Code Here

    // find *
    if (orientation == Orientation.HORIZONTAL && !horizontalAuto
        || orientation == Orientation.VERTICAL && !verticalAuto) {

      final FacesContext facesContext = FacesContext.getCurrentInstance();
      final LayoutContainer container = getLayoutContainer();
      final AbstractUISheet sheet = (AbstractUISheet) container;

      if (orientation == Orientation.HORIZONTAL) {

        ensureColumnWidthList(facesContext, sheet);
View Full Code Here

        factorList.add(((RelativeLayoutToken) head.getToken()).getFactor());
      }
    }
    if (!factorList.isEmpty()) {
      // find rest
      LayoutContainer container = getLayoutContainer();
      Measure available = LayoutUtils.getCurrentSize(orientation, container);
      if (available != null) {
        for (BankHead head : heads) {
          available = available.subtractNotNegative(head.getCurrent());
        }
View Full Code Here

        factorList.add(((RelativeLayoutToken) head.getToken()).getFactor());
      }
    }
    if (!factorList.isEmpty()) {
      // find rest
      LayoutContainer container = getLayoutContainer();
      Measure available = LayoutUtils.getCurrentSize(orientation, container);
      if (available != null) {
        for (BankHead head : heads) {
          available = available.subtractNotNegative(head.getCurrent());
        }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.tobago.layout.LayoutContainer

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.