Package limelight.ui.text

Examples of limelight.ui.text.StyledText


    panel.setText("<my_style>some </my_style><my_other_style>text</my_other_style>", parent);
    panel.buildLines();

    List<StyledText> chunks = panel.getTextChunks();

    StyledText layout = chunks.get(0);
    assertEquals(5, layout.getText().length());
    assertSubString("name=Helvetica", layout.toString());
    assertSubString("style=bold", layout.toString());
    assertSubString("size=20", layout.toString());

    StyledText layout2 = chunks.get(1);
    assertEquals(5, layout.getText().length());
    assertSubString("family=Dialog", layout2.toString());
    assertSubString("name=Cuneiform", layout2.toString());
    assertSubString("style=italic", layout2.toString());
    assertSubString("size=19", layout2.toString());
  }
View Full Code Here


    panel.buildLines();

    List<StyledText> chunks = panel.getTextChunks();
    assertEquals(4, chunks.size());

    StyledText interlacedLayout = chunks.get(2);
    assertNoSubString("name=Cuneiform", interlacedLayout.toString());
    assertNoSubString("size=19", interlacedLayout.toString());
  }
View Full Code Here

    panel.buildLines();

    List<StyledText> chunks = panel.getTextChunks();
    assertEquals(4, chunks.size());

    StyledText interlacedLayout = chunks.get(2);
    assertNoSubString("name=Cuneiform", interlacedLayout.toString());
    assertNoSubString("size=19", interlacedLayout.toString());
  }
View Full Code Here

    String onlyLine = lines.get(0).toString();
    assertSubString("name=" + defaultFontFace, onlyLine);
    assertSubString("size=" + "25", onlyLine);
    assertSubString("style=" + defaultFontStyle, onlyLine);

    StyledText first = panel.getTextChunks().get(0);
    assertEquals(defaultTextColor, first.getColor());
  }
View Full Code Here

  {
    createStyles();
    panel.setText("text <my_other_style>here</my_other_style> man", parent);
    panel.buildLines();

    StyledText first = panel.getTextChunks().get(0);
    assertEquals(defaultTextColor, first.getColor());

    StyledText second = panel.getTextChunks().get(1);
    assertEquals(new Color(0x0000FF), second.getColor());

    StyledText third = panel.getTextChunks().get(2);
    assertEquals(defaultTextColor, third.getColor());
  }
View Full Code Here

TOP

Related Classes of limelight.ui.text.StyledText

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.