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

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


            ((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
              }
View Full Code Here


          }

          if (token instanceof AutoLayoutToken || token instanceof RelativeLayoutToken) {
            if ((component.isRendered() || isRigid())) {
              if (origin.getSpan(orientation) == 1) {
                intervalList.add(new Interval(component, orientation));
              } else {
                if (LOG.isDebugEnabled()) {
                  LOG.debug("Components with span > 1 will be ignored in 'auto' layout rows/columns.");
                }
              }
View Full Code Here

        ((LayoutContainer) component).getLayoutManager().preProcessing(orientation);
      }

      if (orientation == Orientation.HORIZONTAL && horizontalAuto
          || orientation == Orientation.VERTICAL && verticalAuto) {
        intervals.add(new Interval(component, orientation));
      }
    }

/*
    if (intervals.size() >= 1) {
View Full Code Here

          ((LayoutContainer) component).getLayoutManager().preProcessing(orientation);
        }

        if (orientation == Orientation.HORIZONTAL && horizontalAuto
            || orientation == Orientation.VERTICAL && verticalAuto) {
          intervals.add(new Interval(component, orientation));
        }
      }
    }

    if (intervals.size() >= 1) {
View Full Code Here

            ((LayoutContainer) component).getLayoutManager().preProcessing(orientation);
          }

          if (token instanceof AutoLayoutToken || token instanceof RelativeLayoutToken) {
            if (origin.getSpan(orientation) == 1 && component.isRendered()) {
              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();
View Full Code Here

          }

          if (token instanceof AutoLayoutToken || token instanceof RelativeLayoutToken) {
            if ((component.isRendered() || isRigid())) {
              if (origin.getSpan(orientation) == 1) {
                intervalList.add(new Interval(component, orientation));
              } else {
                if (LOG.isDebugEnabled()) {
                  LOG.debug("Components with span > 1 will be ignored in 'auto' layout rows/columns.");
                }
              }
View Full Code Here

   * f=100
   */
  @Test
  public void test1Fixed() {
    final IntervalList list = new IntervalList();
    list.add(new Interval(null, null, null, px(100)));
    list.evaluate();
    Assert.assertEquals(px(100), list.getCurrent());
    Assert.assertEquals(px(100), list.getMinimum());
  }
View Full Code Here

   * f=300
   */
  @Test
  public void test3Fixed() {
    final IntervalList list = new IntervalList();
    list.add(new Interval(null, null, null, px(100)));
    list.add(new Interval(null, null, null, px(200)));
    list.add(new Interval(null, null, null, px(300)));
    list.evaluate();
    Assert.assertEquals(px(300), list.getCurrent());
    Assert.assertEquals(px(300), list.getMinimum());
  }
View Full Code Here

   * 10/100/1000
   */
  @Test
  public void test1MinPrefMax() {
    final IntervalList list = new IntervalList();
    list.add(new Interval(px(10), px(100), px(1000), null));
    list.evaluate();
    Assert.assertEquals(px(100), list.getCurrent());
    Assert.assertEquals(px(10), list.getMinimum());
  }
View Full Code Here

   * 30/300/3000
   */
  @Test
  public void test3MinPrefMax() {
    final IntervalList list = new IntervalList();
    list.add(new Interval(px(10), px(100), px(1000), null));
    list.add(new Interval(px(20), px(200), px(2000), null));
    list.add(new Interval(px(30), px(300), px(3000), null));
    list.evaluate();
    Assert.assertEquals(px(300), list.getCurrent());
    Assert.assertEquals(px(30), list.getMinimum());
  }
View Full Code Here

TOP

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

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.