Package com.eclipsesource.tabris.passepartout.internal.instruction

Examples of com.eclipsesource.tabris.passepartout.internal.instruction.ColumnsInstruction


public class ColumnsInstructionTest {

  @Test( expected = IllegalArgumentException.class )
  public void testFailsWithNegativeColumns() {
    new ColumnsInstruction( -1 );
  }
View Full Code Here


  @Test
  public void testDefaultRuleObtainsOneColumn() {
    FluidGridData data = new FluidGridData();

    Rule rule = data.getRules().get( 0 );
    ColumnsInstruction instruction = ( ColumnsInstruction )rule.getInstructions().get( 0 );
    assertEquals( 1, instruction.getColumns() );
  }
View Full Code Here

  @Test
  public void testComputesBoundsWithoutColumnInstrutions() {
    Layouter layouter = new Layouter( createEnvironment( new Bounds( 0, 0, 600, 200 ) ), createConfig() );
    ArrayList<Instruction> instructions = new ArrayList<Instruction>();
    instructions.add( new ColumnsInstruction( 2 ) );

    Bounds bounds = layouter.computeBounds( new Bounds( 0, 0, 100, 100 ), instructions );

    assertEquals( new Bounds( 0, 0, 300, 100 ), bounds );
  }
View Full Code Here

   * </p>
   *
   * @param columns the columns to use. Must be >= 0.
   */
  public static Instruction columns( int columns ) {
    return new ColumnsInstruction( columns );
  }
View Full Code Here

TOP

Related Classes of com.eclipsesource.tabris.passepartout.internal.instruction.ColumnsInstruction

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.