Package nextapp.echo2.app

Examples of nextapp.echo2.app.Font


        }
        Color foreground = (Color) windowPane.getRenderProperty(WindowPane.PROPERTY_FOREGROUND);
        if (foreground != null) {
            initElement.setAttribute("foreground", ColorRender.renderCssAttributeValue(foreground));
        }
        Font font = (Font) windowPane.getRenderProperty(WindowPane.PROPERTY_FONT);
        if (font != null) {
            CssStyle fontCssStyle = new CssStyle();
            FontRender.renderToStyle(fontCssStyle, font);
            initElement.setAttribute("font", fontCssStyle.renderInline());
        }

        // Positioning
        renderPixelProperty(windowPane, WindowPane.PROPERTY_POSITION_X, initElement, "position-x");
        renderPixelProperty(windowPane, WindowPane.PROPERTY_POSITION_Y, initElement, "position-y");
        renderPixelProperty(windowPane, WindowPane.PROPERTY_WIDTH, initElement, "width");
        renderPixelProperty(windowPane, WindowPane.PROPERTY_HEIGHT, initElement, "height");
        renderPixelProperty(windowPane, WindowPane.PROPERTY_MINIMUM_WIDTH, initElement, "minimum-width");
        renderPixelProperty(windowPane, WindowPane.PROPERTY_MINIMUM_HEIGHT, initElement, "minimum-height");
        renderPixelProperty(windowPane, WindowPane.PROPERTY_MAXIMUM_WIDTH, initElement, "maximum-width");
        renderPixelProperty(windowPane, WindowPane.PROPERTY_MAXIMUM_HEIGHT, initElement, "maximum-height");
       
        int fillImageRenderFlags = ((Boolean) windowPane.getRenderProperty(PROPERTY_IE_ALPHA_RENDER_BORDER,
                Boolean.FALSE)).booleanValue() ? FillImageRender.FLAG_ENABLE_IE_PNG_ALPHA_FILTER : 0;
   
        // Title-related
        if (windowPane.getRenderProperty(WindowPane.PROPERTY_ICON) != null) {
            initElement.setAttribute("icon", ImageTools.getUri(rc, this, windowPane, IMAGE_ID_ICON));
            Insets iconInsets = (Insets) windowPane.getRenderProperty(WindowPane.PROPERTY_ICON_INSETS);
            if (iconInsets != null) {
                initElement.setAttribute("icon-insets", InsetsRender.renderCssAttributeValue(iconInsets));
            }
        }
        String title = (String) windowPane.getRenderProperty(WindowPane.PROPERTY_TITLE);
        if (title != null) {
            initElement.setAttribute("title", title);
            Insets titleInsets = (Insets) windowPane.getRenderProperty(WindowPane.PROPERTY_TITLE_INSETS);
            Color titleForeground = (Color) windowPane.getRenderProperty(WindowPane.PROPERTY_TITLE_FOREGROUND);
            if (titleForeground != null) {
                initElement.setAttribute("title-foreground", ColorRender.renderCssAttributeValue(titleForeground));
            }
            if (titleInsets != null) {
                initElement.setAttribute("title-insets", InsetsRender.renderCssAttributeValue(titleInsets));
            }
            Font titleFont = (Font) windowPane.getRenderProperty(WindowPane.PROPERTY_TITLE_FONT);
            if (titleFont != null) {
                CssStyle fontCssStyle = new CssStyle();
                FontRender.renderToStyle(fontCssStyle, titleFont);
                initElement.setAttribute("title-font", fontCssStyle.renderInline());
            }
View Full Code Here


                });
            }
        });
        controlsColumn.addButton("Set Font", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                final Font font = StyleUtil.randomFont();
                apply(new Applicator() {
                    public void apply(Label label) {
                        label.setFont(font);
                    }
                });
View Full Code Here

        boolean renderEnabled = listComponent.isRenderEnabled();

        Border border;
        Color foreground, background;
        Font font;
        if (!renderEnabled) {
            // Retrieve disabled style information.
            background = (Color) listComponent.getRenderProperty(AbstractListComponent.PROPERTY_DISABLED_BACKGROUND);
            border = (Border) listComponent.getRenderProperty(AbstractListComponent.PROPERTY_DISABLED_BORDER);
            font = (Font) listComponent.getRenderProperty(AbstractListComponent.PROPERTY_DISABLED_FONT);
View Full Code Here

    protected JbsLangEntryHelper createTextField(JbsLanguage language) {
        return new JbsLangEntryTextField(language);
    }

    protected void initPanel() {
        Grid grdMain = new Grid(2);
        grdMain.setInsets(new nextapp.echo2.app.Insets(5, 5));
        grdMain.setColumnWidth(0, new JbsExtent(300));

        Iterator<JbsLangEntryHelper> it = this.getTextFields().iterator();
        while (it.hasNext()) {
            JbsLangEntryTextField txtField = (JbsLangEntryTextField) it.next();
            grdMain.add(new Label(txtField.getLanguage().getName()));
            grdMain.add(txtField);
        }

        this.getPnMain().add(grdMain);
    }
View Full Code Here

        this.setStyleName("Default");
        this.setMaximizable(false);
        this.setMinimizable(false);
        this.setResizable(false);
        this.setModal(true);
        ImageReference icon = getMessageIcon(messageType);
        Label iconLabel = new Label("");
        int iconHeight = 0;
        if (icon != null) {
            iconLabel.setIcon(icon);
            iconHeight = icon.getHeight().getValue();
        }


        // Split newlines into multiple labels
        if (message instanceof String) {
View Full Code Here

    protected JbsContentPane initPnButtons() {
        pnButtons = new JbsContentPane();
        Row mainRow = new Row();
        mainRow.setAlignment(new Alignment(Alignment.RIGHT, Alignment.DEFAULT));
        mainRow.setInsets(new Insets(new JbsExtent(5), new JbsExtent(5)));

        btnOK = new JbsButton(JbsL10N.getString("Generic.ok"));
        btnOK.setAlignmentHorizontal(Alignment.CENTER);
        btnOK.setWidth(new JbsExtent(80));
        btnOK.addActionListener(new ActionListener() {
View Full Code Here

        return new JbsLangEntryTextArea(language);
    }

    protected void initPanel() {
        Column colMain = new Column();
        colMain.setInsets(new Insets(5, 5));

        Iterator<JbsLangEntryHelper> it = this.getTextFields().iterator();
        while (it.hasNext()) {
            JbsLangEntryTextArea txtField = (JbsLangEntryTextArea) it.next();
            txtField.setWidth(new JbsExtent(400, JbsExtent.PX));
View Full Code Here

    private static final long serialVersionUID = -4933280397139021471L;
    //private Row rowMain;

    public JbsToolbar() {
        super();
        this.setInsets(new Insets(new JbsExtent(5),new JbsExtent(0)));
        /*
        rowMain = new Row();
        rowMain.setStyleName("ToolBar");
        this.add(rowMain);
         */
 
View Full Code Here

     * Adds a button to the toolbar
     * @param button
     */
    public void addButton(BtnToolbar button) {
        Column colButton = new Column();
        colButton.setInsets(new Insets(5));
        colButton.add(button);
        this.add(colButton);
    }
View Full Code Here

     * Adds a component to the Toolbar
     * @param comp
     */
    public void addComponent(Component comp) {
        Column colButton = new Column();
        colButton.setInsets(new Insets(5));
        colButton.add(comp);
        this.add(colButton);
    }
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.