Package org.apache.myfaces.tobago.internal.layout

Examples of org.apache.myfaces.tobago.internal.layout.FactorList


    final BankHead[] heads = grid.getBankHeads(orientation);
    final BankHead[] heads2 = grid.getBankHeads(orientation.other());

    // find *
    FactorList factorList = new FactorList();
    for (BankHead head : heads) {
      if (head.getToken() instanceof RelativeLayoutToken && head.isRendered()) {
        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());
        }
        available = available.subtractNotNegative(LayoutUtils.getBorderBegin(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getPaddingBegin(orientation, container));
        available = available.subtractNotNegative(getMarginBegin(orientation));
        available = available.subtractNotNegative(computeSpacing(orientation, 0, heads.length));
        available = available.subtractNotNegative(getMarginEnd(orientation));
        available = available.subtractNotNegative(LayoutUtils.getPaddingEnd(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getBorderEnd(orientation, container));

        if (grid.isOverflow(orientation.other())) {
          ClientProperties client = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
          final Measure scrollbar = orientation
              == Orientation.HORIZONTAL ? client.getVerticalScrollbarWeight() : client.getHorizontalScrollbarWeight();
          available = available.subtractNotNegative(scrollbar);
        }

        List<Measure> partition = factorList.partition(available);

        // write values back into the header
        int i = 0; // index of head
        int j = 0; // index of partition
        for (BankHead head : heads) {
View Full Code Here


    final BankHead[] heads = grid.getBankHeads(orientation);
    final BankHead[] heads2 = grid.getBankHeads(orientation.other());

    // find *
    FactorList factorList = new FactorList();
    for (BankHead head : heads) {
      if (head.getToken() instanceof RelativeLayoutToken && head.isRendered()) {
        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());
        }
        available = available.subtractNotNegative(LayoutUtils.getBorderBegin(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getPaddingBegin(orientation, container));
        available = available.subtractNotNegative(getMarginBegin(orientation));
        available = available.subtractNotNegative(computeSpacing(orientation, 0, heads.length));
        available = available.subtractNotNegative(getMarginEnd(orientation));
        available = available.subtractNotNegative(LayoutUtils.getPaddingEnd(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getBorderEnd(orientation, container));

        if (grid.isOverflow(orientation.other())) {
          ClientProperties client = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
          final Measure scrollbar = orientation
              == Orientation.HORIZONTAL ? client.getVerticalScrollbarWeight() : client.getHorizontalScrollbarWeight();
          available = available.subtractNotNegative(scrollbar);
        }

        List<Measure> partition = factorList.partition(available);

        // write values back into the header
        int i = 0; // index of head
        int j = 0; // index of partition
        for (BankHead head : heads) {
View Full Code Here

    final BankHead[] heads = grid.getBankHeads(orientation);
    final BankHead[] heads2 = grid.getBankHeads(orientation.other());

    // find *
    FactorList factorList = new FactorList();
    for (BankHead head : heads) {
      if (head.getToken() instanceof RelativeLayoutToken && head.isRendered()) {
        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());
        }
        available = available.subtractNotNegative(LayoutUtils.getBorderBegin(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getPaddingBegin(orientation, container));
        available = available.subtractNotNegative(getMarginBegin(orientation));
        available = available.subtractNotNegative(computeSpacing(orientation, 0, heads.length));
        available = available.subtractNotNegative(getMarginEnd(orientation));
        available = available.subtractNotNegative(LayoutUtils.getPaddingEnd(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getBorderEnd(orientation, container));

        if (grid.isOverflow(orientation.other())) {
          ClientProperties client = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
          final Measure scrollbar = orientation
              == Orientation.HORIZONTAL ? client.getVerticalScrollbarWeight() : client.getHorizontalScrollbarWeight();
          available = available.subtractNotNegative(scrollbar);
        }

        List<Measure> partition = factorList.partition(available);

        // write values back into the header
        int i = 0; // index of head
        int j = 0; // index of partition
        for (BankHead head : heads) {
View Full Code Here

    final BankHead[] heads = grid.getBankHeads(orientation);
    final BankHead[] heads2 = grid.getBankHeads(orientation.other());

    // find *
    FactorList factorList = new FactorList();
    for (BankHead head : heads) {
      if (head.getToken() instanceof RelativeLayoutToken && head.isRendered()) {
        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());
        }
        available = available.subtractNotNegative(LayoutUtils.getBorderBegin(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getPaddingBegin(orientation, container));
        available = available.subtractNotNegative(getMarginBegin(orientation));
        available = available.subtractNotNegative(computeSpacing(orientation, 0, heads.length));
        available = available.subtractNotNegative(getMarginEnd(orientation));
        available = available.subtractNotNegative(LayoutUtils.getPaddingEnd(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getBorderEnd(orientation, container));

        if (grid.isOverflow(orientation.other())) {
          ClientProperties client = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
          final Measure scrollbar = orientation
              == Orientation.HORIZONTAL ? client.getVerticalScrollbarWeight() : client.getHorizontalScrollbarWeight();
          available = available.subtractNotNegative(scrollbar);
        }

        List<Measure> partition = factorList.partition(available);

        // write values back into the header
        int i = 0; // index of head
        int j = 0; // index of partition
        for (BankHead head : heads) {
View Full Code Here

    final BankHead[] heads = grid.getBankHeads(orientation);
    final BankHead[] heads2 = grid.getBankHeads(orientation.other());

    // find *
    FactorList factorList = new FactorList();
    for (BankHead head : heads) {
      if (head.getToken() instanceof RelativeLayoutToken && head.isRendered()) {
        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());
        }
        available = available.subtractNotNegative(LayoutUtils.getBorderBegin(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getPaddingBegin(orientation, container));
        available = available.subtractNotNegative(getMarginBegin(orientation));
        available = available.subtractNotNegative(computeSpacing(orientation, 0, heads.length));
        available = available.subtractNotNegative(getMarginEnd(orientation));
        available = available.subtractNotNegative(LayoutUtils.getPaddingEnd(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getBorderEnd(orientation, container));

        if (grid.isOverflow(orientation.other())) {
          ClientProperties client = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
          final Measure scrollbar = orientation
              == Orientation.HORIZONTAL ? client.getVerticalScrollbarWeight() : client.getHorizontalScrollbarWeight();
          available = available.subtractNotNegative(scrollbar);
        }

        List<Measure> partition = factorList.partition(available);

        // write values back into the header
        int i = 0; // index of head
        int j = 0; // index of partition
        for (BankHead head : heads) {
View Full Code Here

    final BankHead[] heads = grid.getBankHeads(orientation);
    final BankHead[] heads2 = grid.getBankHeads(orientation.other());

    // find *
    final FactorList factorList = new FactorList();
    for (final BankHead head : heads) {
      if (head.getToken() instanceof RelativeLayoutToken && head.isRendered()) {
        factorList.add(((RelativeLayoutToken) head.getToken()).getFactor());
      }
    }
    if (!factorList.isEmpty()) {
      // find rest
      final LayoutContainer container = getLayoutContainer();
      Measure available = LayoutUtils.getCurrentSize(orientation, container);
      if (available != null) {
        for (final BankHead head : heads) {
          available = available.subtractNotNegative(head.getCurrent());
        }
        available = available.subtractNotNegative(LayoutUtils.getBorderBegin(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getPaddingBegin(orientation, container));
        available = available.subtractNotNegative(getMarginBegin(orientation));
        available = available.subtractNotNegative(computeSpacing(orientation, 0, heads.length));
        available = available.subtractNotNegative(getMarginEnd(orientation));
        available = available.subtractNotNegative(LayoutUtils.getPaddingEnd(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getBorderEnd(orientation, container));

        if (grid.isOverflow(orientation.other())) {
          final ClientProperties client = ClientProperties.getInstance(FacesContext.getCurrentInstance());
          final Measure scrollbar = orientation
              == Orientation.HORIZONTAL ? client.getVerticalScrollbarWeight() : client.getHorizontalScrollbarWeight();
          available = available.subtractNotNegative(scrollbar);
        }

        final List<Measure> partition = factorList.partition(available);

        // write values back into the header
        int i = 0; // index of head
        int j = 0; // index of partition
        for (final BankHead head : heads) {
View Full Code Here

    final BankHead[] heads = grid.getBankHeads(orientation);
    final BankHead[] heads2 = grid.getBankHeads(orientation.other());

    // find *
    FactorList factorList = new FactorList();
    for (BankHead head : heads) {
      if (head.getToken() instanceof RelativeLayoutToken && head.isRendered()) {
        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());
        }
        available = available.subtractNotNegative(LayoutUtils.getBorderBegin(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getPaddingBegin(orientation, container));
        available = available.subtractNotNegative(getMarginBegin(orientation));
        available = available.subtractNotNegative(computeSpacing(orientation, 0, heads.length));
        available = available.subtractNotNegative(getMarginEnd(orientation));
        available = available.subtractNotNegative(LayoutUtils.getPaddingEnd(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getBorderEnd(orientation, container));

        if (grid.isOverflow(orientation.other())) {
          ClientProperties client = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
          final Measure scrollbar = orientation
              == Orientation.HORIZONTAL ? client.getVerticalScrollbarWeight() : client.getHorizontalScrollbarWeight();
          available = available.subtractNotNegative(scrollbar);
        }

        List<Measure> partition = factorList.partition(available);

        // write values back into the header
        int i = 0; // index of head
        int j = 0; // index of partition
        for (BankHead head : heads) {
View Full Code Here

    final BankHead[] heads = grid.getBankHeads(orientation);
    final BankHead[] heads2 = grid.getBankHeads(orientation.other());

    // find *
    final FactorList factorList = new FactorList();
    for (final BankHead head : heads) {
      if (head.getToken() instanceof RelativeLayoutToken && head.isRendered()) {
        factorList.add(((RelativeLayoutToken) head.getToken()).getFactor());
      }
    }
    if (!factorList.isEmpty()) {
      // find rest
      final LayoutContainer container = getLayoutContainer();
      Measure available = LayoutUtils.getCurrentSize(orientation, container);
      if (available != null) {
        for (final BankHead head : heads) {
          available = available.subtractNotNegative(head.getCurrent());
        }
        available = available.subtractNotNegative(LayoutUtils.getBorderBegin(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getPaddingBegin(orientation, container));
        available = available.subtractNotNegative(getMarginBegin(orientation));
        available = available.subtractNotNegative(computeSpacing(orientation, 0, heads.length));
        available = available.subtractNotNegative(getMarginEnd(orientation));
        available = available.subtractNotNegative(LayoutUtils.getPaddingEnd(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getBorderEnd(orientation, container));

        if (grid.isOverflow(orientation.other())) {
          final ClientProperties client
              = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
          final Measure scrollbar = orientation
              == Orientation.HORIZONTAL ? client.getVerticalScrollbarWeight() : client.getHorizontalScrollbarWeight();
          available = available.subtractNotNegative(scrollbar);
        }

        final List<Measure> partition = factorList.partition(available);

        // write values back into the header
        int i = 0; // index of head
        int j = 0; // index of partition
        for (final BankHead head : heads) {
View Full Code Here

    final BankHead[] heads = grid.getBankHeads(orientation);
    final BankHead[] heads2 = grid.getBankHeads(orientation.other());

    // find *
    final FactorList factorList = new FactorList();
    for (final BankHead head : heads) {
      if (head.getToken() instanceof RelativeLayoutToken && head.isRendered()) {
        factorList.add(((RelativeLayoutToken) head.getToken()).getFactor());
      }
    }
    if (!factorList.isEmpty()) {
      // find rest
      final LayoutContainer container = getLayoutContainer();
      Measure available = LayoutUtils.getCurrentSize(orientation, container);
      if (available != null) {
        for (final BankHead head : heads) {
          available = available.subtractNotNegative(head.getCurrent());
        }
        available = available.subtractNotNegative(LayoutUtils.getBorderBegin(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getPaddingBegin(orientation, container));
        available = available.subtractNotNegative(getMarginBegin(orientation));
        available = available.subtractNotNegative(computeSpacing(orientation, 0, heads.length));
        available = available.subtractNotNegative(getMarginEnd(orientation));
        available = available.subtractNotNegative(LayoutUtils.getPaddingEnd(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getBorderEnd(orientation, container));

        if (grid.isOverflow(orientation.other())) {
          final ClientProperties client
              = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
          final Measure scrollbar = orientation
              == Orientation.HORIZONTAL ? client.getVerticalScrollbarWeight() : client.getHorizontalScrollbarWeight();
          available = available.subtractNotNegative(scrollbar);
        }

        final List<Measure> partition = factorList.partition(available);

        // write values back into the header
        int i = 0; // index of head
        int j = 0; // index of partition
        for (final BankHead head : heads) {
View Full Code Here

    final BankHead[] heads = grid.getBankHeads(orientation);
    final BankHead[] heads2 = grid.getBankHeads(orientation.other());

    // find *
    FactorList factorList = new FactorList();
    for (BankHead head : heads) {
      if (head.getToken() instanceof RelativeLayoutToken && head.isRendered()) {
        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());
        }
        available = available.subtractNotNegative(LayoutUtils.getBorderBegin(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getPaddingBegin(orientation, container));
        available = available.subtractNotNegative(getMarginBegin(orientation));
        available = available.subtractNotNegative(computeSpacing(orientation, 0, heads.length));
        available = available.subtractNotNegative(getMarginEnd(orientation));
        available = available.subtractNotNegative(LayoutUtils.getPaddingEnd(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getBorderEnd(orientation, container));

        List<Measure> partition = factorList.partition(available);

        // write values back into the header
        int i = 0; // index of head
        int j = 0; // index of partition
        for (BankHead head : heads) {
View Full Code Here

TOP

Related Classes of org.apache.myfaces.tobago.internal.layout.FactorList

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.