Package com.sun.star.awt

Examples of com.sun.star.awt.FontDescriptor


            if (bshowFourButtons == true)
                btnremoveall = CurUnoDialog.insertButton("cmdRemoveAll" + sIncSuffix, SOCMDREMOVEALL, new ActionListenerImpl(),
                                            new String[] { "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" },
                                            new Object[] { new Integer(14), "HID:" + Integer.toString(_FirstHelpIndex++), "<<", cmdShiftButtonPosX, ShiftButtonPosY[a++], IStep, new Short(curtabindex++), CmdButtonWidth });

            FontDescriptor oFontDesc = new FontDescriptor();
            oFontDesc.Name = "StarSymbol";

            CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblSelFields" + sIncSuffix,
                                        new String[] { "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" },
                                        new Object[] { new Integer(8), slblSelFields, SelListBoxPosX, new Integer(CompPosY), IStep, new Short(curtabindex++), ListBoxWidth });
View Full Code Here


                btnremoveall = CurUnoDialog.insertButton("cmdRemoveAll" + sIncSuffix, SOCMDREMOVEALL, new ActionListenerImpl(),
                                            new String[] { "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" },
                                            new Object[] { new Integer(14), "HID:" + Integer.toString(_FirstHelpIndex+4), "<<", cmdShiftButtonPosX, ShiftButtonPosY[a++], IStep, new Short(curtabindex++), CmdButtonWidth });
            }

            FontDescriptor oFontDesc = new FontDescriptor();
            oFontDesc.Name = "StarSymbol";

            CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblSelFields" + sIncSuffix,
                                        new String[] { "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" },
                                        new Object[] { new Integer(8), slblSelFields, SelListBoxPosX, new Integer(CompPosY), IStep, new Short(curtabindex++), ListBoxWidth });
View Full Code Here

                            xFixedText.setCharWeight(fCharWeight);
                        }
                    }
                    else
                    {
                        final FontDescriptor aFD = _aSO.getFontDescriptor();
                        if (aFD != null)
                        {
                            xFixedText.setFontDescriptor(aFD);
                        }
                        nHeight = _aSO.getHeight(500);
View Full Code Here

                // #i86907# not documented right in idl description.
                xFormattedField.setDataField(_sFormattedfield);
                int nHeight = 500;
                if (_aSO != null)
                {
                    final FontDescriptor aFD = _aSO.getFontDescriptor();
                    if (aFD != null)
                    {
                        xFormattedField.setFontDescriptor(aFD);
                    }
                    nHeight = _aSO.getHeight(500);
View Full Code Here

        }
        for (int i=0;i<m_aGroupNames.length;i++)
        {
            final String sGroupName = m_aGroupNames[i];
            final SectionObject a = getDesignTemplate().getGroupLabel(i);
            final FontDescriptor aFD = a.getFontDescriptor();
            nWidth = Math.max(nWidth, getLabelWidth(sGroupName, aFD));
        }
       
        if (nWidth == 0)
        {
View Full Code Here

                if (_nCharHeight > 0.1f)
                {
                    m_aFixedTextHelper.setCharHeight(_nCharHeight);
                }

                final FontDescriptor xFont = m_aFixedTextHelper.getFontDescriptor();
                final Size aSize = getPreferredSize(_sLabel, xFont);
                nWidth = aSize.Width;
                // cache the found width
                m_aLabelWidthMap.put(sKey, new Integer(nWidth));
            }
View Full Code Here

                    new Object[] { new Integer(133),"HID:41220", new Integer(92), new Integer(37), IFieldFormatStep, new Short(curtabindex++), new Integer(62)});
        } catch (Exception e) {
            e.printStackTrace(System.out);
        }

        FontDescriptor oFontDesc = new FontDescriptor();
        oFontDesc.Name = "StarSymbol";

        btnShiftUp = CurUnoDialog.insertButton("btnShiftUp", "shiftFieldNameUp", this,
                                new String[] { "Enabled", "FontDescriptor", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" },
                                new Object[] { Boolean.FALSE, oFontDesc, new Integer(14), "HID:41221", String.valueOf((char) 8743), new Integer(158), new Integer(139), IFieldFormatStep, new Short(curtabindex++), new Integer(14)});

        btnShiftDown = CurUnoDialog.insertButton("btnShiftDown", "shiftFieldNameDown", this,
                                new String[] { "Enabled", "FontDescriptor", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" },
                                new Object[] { Boolean.FALSE, oFontDesc, new Integer(14), "HID:41222", String.valueOf((char) 8744), new Integer(158), new Integer(156), IFieldFormatStep, new Short(curtabindex++), new Integer(14) });
        oFontDesc = new FontDescriptor();
        oFontDesc.Weight = com.sun.star.awt.FontWeight.BOLD;
        oFontDesc.Height = (short) 13;
        btnminus = CurUnoDialog.insertButton("btnminus", "removeFieldName", this,
                                new String[] {"FontDescriptor", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" },
                                new Object[] {oFontDesc, new Integer(14), "HID:41223", "-", new Integer(118), new Integer(175), IFieldFormatStep, new Short(curtabindex++), new Integer(14) });
View Full Code Here

        return a;
    }

    public FontDescriptor getFontDescriptor()
    {
        FontDescriptor a = null;
        try
        {
            XFormattedField aField = (XFormattedField)getParent();
            a = aField.getFontDescriptor();
        }
View Full Code Here

        return a;
    }

    public FontDescriptor getFontDescriptor()
    {
        FontDescriptor a = null;
        try
        {
            XFixedText aLabel = (XFixedText)getParent();
            a= aLabel.getFontDescriptor();
        }
View Full Code Here

                        }
                    }
                    else
                    {
// TODO: there seems to be some problems with copy all properties from the design template to the current design
                        final FontDescriptor aFD = _aSO.getFontDescriptor();
                        if (aFD != null)
                        {
                            xFixedText.setFontDescriptor(aFD);
                            copyProperties(_aSO.getParent(), xFixedText);
                        }
View Full Code Here

TOP

Related Classes of com.sun.star.awt.FontDescriptor

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.