Examples of appendSpaces()


Examples of com.puppetlabs.xtext.textflow.MeasuredTextFlow.appendSpaces()

    // default is 132 characters before a wrap and 0 wrap indent
    MeasuredTextFlow flow = this.getInjector().getInstance(TextFlow.class);
    Fixed stars = new CharSequences.Fixed('*', 22);
    for(int i = 0; i < 24; i++) {
      flow.appendText(stars);
      flow.appendSpaces(0);
    }
    assertEquals(4, flow.getHeight());
    assertEquals(132, flow.getWidth());

    flow = this.getInjector().getInstance(TextFlow.class);
View Full Code Here

Examples of com.puppetlabs.xtext.textflow.MeasuredTextFlow.appendSpaces()

    assertEquals(132, flow.getWidth());

    flow = this.getInjector().getInstance(TextFlow.class);
    for(int i = 0; i < 24; i++) {
      flow.appendText(stars);
      flow.appendSpaces(1);
    }
    assertEquals(5, flow.getHeight());
    assertEquals(115, flow.getWidth());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.