Package com.eclipsesource.tabris.passepartout.internal.unit

Examples of com.eclipsesource.tabris.passepartout.internal.unit.Percentage


    assertEquals( 10, pixel );
  }

  @Test( expected = IllegalArgumentException.class )
  public void testCalculatesPercentageFailsWithNegativePercent() {
    UnitUtil.percentageToPixel( new Percentage( BigDecimal.TEN ), -100 );
  }
View Full Code Here


    UnitUtil.emToPixel( new Em( BigDecimal.TEN ), -10 );
  }

  @Test( expected = IllegalArgumentException.class )
  public void testCalculatesEmFailsWithWrongUnit() {
    UnitUtil.emToPixel( new Percentage( BigDecimal.TEN ), 10 );
  }
View Full Code Here

   * </p>
   *
   * @param value the percentage value to use. Must be >= 0.
   */
  public static Unit percent( double value ) {
    return new Percentage( BigDecimal.valueOf( value ) );
  }
View Full Code Here

TOP

Related Classes of com.eclipsesource.tabris.passepartout.internal.unit.Percentage

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.