Package org.apache.isis.viewer.dnd.viewer.drawing

Examples of org.apache.isis.viewer.dnd.viewer.drawing.DummyText


                return new NullColor();
            }

            @Override
            public Text getText(final String name) {
                return new DummyText();
            }

            @Override
            public void init() {
            }
View Full Code Here


public class TextUtilsTest extends TestCase {

    public void testDrawingTextTruncated() {
        /* Word boundaries at 4, 11, 16, 21, 24 & 34 */
        final String title = "test string that will be truncated";
        final Text style = new DummyText();

        assertEquals("test string that will be truncated", TextUtils.limitText(title, style, 340));

        assertEquals("test string that will be...", TextUtils.limitText(title, style, 339));

View Full Code Here

        assertEquals("tes...", TextUtils.limitText(title, style, 60));
    }

    public void testDrawingTextTruncatedBeforeCommasEtc() {
        final String title = "test string, that? is truncated";
        final Text style = new DummyText();

        assertEquals("test string, that...", TextUtils.limitText(title, style, 210));

        assertEquals("test string...", TextUtils.limitText(title, style, 199));
    }
View Full Code Here

        assertEquals("test string...", TextUtils.limitText(title, style, 199));
    }

    public void testNoSpace() {
        final String title = "test string, that? is truncated";
        final Text style = new DummyText();

        assertEquals("...", TextUtils.limitText(title, style, 5));
    }
View Full Code Here

    public void setUp() throws Exception {
       
        TestToolkit.createInstance();

        view = new DummyView();
        final Text style = new DummyText();
        titleText = new TitleText(view, style, Toolkit.getColor(ColorsAndFonts.COLOR_BLACK)) {
            @Override
            protected String title() {
                return title;
            }
View Full Code Here

    protected void setUp() throws Exception {
        IsisContext.setConfiguration(new TestProxyConfiguration());
        TestToolkit.createInstance();

        view = new DummyView();
        final Text style = new DummyText();
        titleText = new TitleText(view, style, Toolkit.getColor(ColorsAndFonts.COLOR_BLACK)) {
            @Override
            protected String title() {
                return title;
            }
View Full Code Here

    protected void setUp() throws Exception {
        IsisContext.setConfiguration(new TestProxyConfiguration());
        TestToolkit.createInstance();

        view = new DummyView();
        final Text style = new DummyText();
        titleText = new TitleText(view, style, Toolkit.getColor(ColorsAndFonts.COLOR_BLACK)) {
            @Override
            protected String title() {
                return title;
            }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.dnd.viewer.drawing.DummyText

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.