Package nextapp.echo2.app

Examples of nextapp.echo2.app.Font


                new Extent(24, Extent.PT)), font);
    }
   
    public void testInlineTypeface() {
        Style style = styleSheet.getStyle(Component.class, "delta");
        Font font = (Font) style.getProperty(Component.PROPERTY_FONT);
        assertEquals(new Font(Font.VERDANA, Font.BOLD, new Extent(24, Extent.PT)), font);
    }
View Full Code Here


        infoColumn.setInsets(new Insets(20, 5));
        infoColumn.setCellSpacing(new Extent(10));
        splitPane.add(infoColumn);
       
        label = new Label("Please read the following before using the test application:");
        label.setFont(new Font(null, Font.BOLD, null));
        infoColumn.add(label);
       
        label = new Label("This application was built to interactively test components of Echo2 during development.  "
                + "It is also being (mis)used as a public demonstration of Echo2's capabilities. "
                + "Note that if this is a development version of Echo, then some "
View Full Code Here

       
        subjectFieldValueLabel = new Label();
        headerGrid.add(subjectFieldValueLabel);
       
        messageColumn = new Column();
        messageColumn.setFont(new Font(Font.MONOSPACE, Font.PLAIN, null));
        add(messageColumn);
    }
View Full Code Here

        style |= (((int) (Math.random() * 4)) == 0) ? Font.ITALIC : 0;
        style |= (((int) (Math.random() * 4)) == 0) ? Font.UNDERLINE : 0;
        style |= (((int) (Math.random() * 4)) == 0) ? Font.OVERLINE : 0;
        style |= (((int) (Math.random() * 4)) == 0) ? Font.LINE_THROUGH : 0;
       
        return new Font(typeface, style, size);
    }
View Full Code Here

        });
        controlRow.add(button);
       
        SplitPaneLayoutData splitPaneLayoutData;
        logPane = new ContentPane();
        logPane.setFont(new Font(Font.MONOSPACE, Font.PLAIN, new Extent(10)));
        logPane.setForeground(Color.GREEN);
        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setBackground(Color.BLACK);
        logPane.setLayoutData(splitPaneLayoutData);
        splitPane.add(logPane);
View Full Code Here

*
*/
public class FontRenderTest extends TestCase {

    public void testFontRender() {
        Font font = new Font(Font.VERDANA, Font.BOLD | Font.UNDERLINE, new Extent(12, Extent.PT));
        CssStyle cssStyle = new CssStyle();
        FontRender.renderToStyle(cssStyle, font);
        assertEquals("Verdana,Arial,Helvetica,Sans-Serif", cssStyle.getAttribute("font-family"));
        assertEquals("bold", cssStyle.getAttribute("font-weight"));
        assertEquals("underline", cssStyle.getAttribute("text-decoration"));
View Full Code Here

        boolean renderEnabled = textComponent.isRenderEnabled();

        Border border;
        Color foreground, background;
        Font font;
        FillImage backgroundImage;
        if (!renderEnabled) {
            // Retrieve disabled style information.
            background = (Color) textComponent.getRenderProperty(TextComponent.PROPERTY_DISABLED_BACKGROUND);
            backgroundImage = (FillImage) textComponent.getRenderProperty(TextComponent.PROPERTY_DISABLED_BACKGROUND_IMAGE);
View Full Code Here

        }
        Color foreground = (Color) splitPane.getRenderProperty(SplitPane.PROPERTY_FOREGROUND);
        if (foreground != null) {
            initElement.setAttribute("foreground", ColorRender.renderCssAttributeValue(foreground));
        }
        Font font = (Font) splitPane.getRenderProperty(SplitPane.PROPERTY_FONT);
        if (font != null) {
            CssStyle fontCssStyle = new CssStyle();
            FontRender.renderToStyle(fontCssStyle, font);
            initElement.setAttribute("font", fontCssStyle.renderInline());
        }
View Full Code Here

        Alignment alignment = combineAlignment((Alignment) button.getRenderProperty(AbstractButton.PROPERTY_TEXT_ALIGNMENT),
                (Alignment) button.getRenderProperty(AbstractButton.PROPERTY_ALIGNMENT));
        AlignmentRender.renderToStyle(textTdCssStyle, alignment, button);

        boolean renderEnabled = button.isRenderEnabled();
        Font font;
        if (renderEnabled) {
            font = (Font) button.getRenderProperty(AbstractButton.PROPERTY_FONT);
        } else {
            font = (Font) button.getRenderProperty(AbstractButton.PROPERTY_DISABLED_FONT);
            if (font == null) {
View Full Code Here

        boolean renderEnabled = button.isRenderEnabled();

        Border border;
        Color foreground, background;
        Font font = null;
        FillImage backgroundImage;
        if (!renderEnabled) {
            // Retrieve disabled style information.
            background = (Color) button.getRenderProperty(AbstractButton.PROPERTY_DISABLED_BACKGROUND);
            backgroundImage = (FillImage) button.getRenderProperty(AbstractButton.PROPERTY_DISABLED_BACKGROUND_IMAGE);
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.Font

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.