Package com.sun.star.awt

Examples of com.sun.star.awt.Size


                        Boolean.FALSE, INTEGER_14, "HID:" + (hid + 2), resources[RES_DESELECT], "btnNoImage", iButtonsX, new Integer(deselectY), new Short((short) com.sun.star.awt.PushButtonType.STANDARD_value), new Short((short) 4), INTEGER_50
                    });
        }

        il.setStep(new Short((short) 1));
        il.setPos(new Size(6, 22));
        il.helpURL = hid + 5;
        il.tabIndex = 1;
        il.create(this);

        /*lblContainer = insertLabel("lblContainer",
View Full Code Here


                        new Integer(207)
                    });

            int nypos = SOBASEIMAGEYPOSITION + 12 - 5 + _formindex * SOIMAGELISTHEIGHT;
            m_aButtonList = new ButtonList();
            m_aButtonList.setPos(new Size(107, nypos));
            m_aButtonList.setButtonSize(new Size(26 + 6, 26 + 5));
            m_aButtonList.setCols(4);
            m_aButtonList.setRows(1);
            m_aButtonList.setName( "ButtonList_" + formindex );
            m_aButtonList.setStep(Short.valueOf((short) FormWizard.SOCONTROL_PAGE));
            m_aButtonList.setShowButtons(false);      // shows a button line at ''wrong'' position like |<| 1..4/4 |>|
            m_aButtonList.setRenderer(new LayoutRenderer());
            m_aButtonList.setSelectionGap(new Size(2, 2));
            m_aButtonList.setGap(new Size(3, 3));
//            m_aButtonList.scaleImages = Boolean.FALSE;
            m_aButtonList.tabIndex = (int) curtabindex++;
            m_aButtonList.helpURL = 34453 + (formindex * 4);

            m_aButtonList.setListModel(model);
View Full Code Here

            {
                TimeStampControl oDBTimeStampControl = (TimeStampControl) curDBControl;
                nControlBaseWidth = oDBTimeStampControl.getSize().Width;
                if (this.isReducable(i) || WidthFactor > 0)
                {
                    oDBTimeStampControl.setSize(new Size(nControlBaseWidth + WidthFactor * CorrWidth, oDBTimeStampControl.getSize().Height));
                }
            }
            else
            {
                if (this.isReducable(i) || WidthFactor > 0)
                {
                    curDBControl.setSize(new Size(nControlBaseWidth + WidthFactor * CorrWidth, curDBControl.getSize().Height));
                }
            }
            iLocTCPosX = curDBControl.getPosition().X + curDBControl.getSize().Width + cHoriDistance;
            if (curLabelControl.getSize().Width > curDBControl.getSize().Width)
            {
View Full Code Here

            if (i == StartA)
            {
                nXTCPos = LabelControlList[i].getPosition().X;
                nXDBPos = nXTCPos + nMaxTCWidth + cHoriDistance;
            }
            LabelControlList[i].setSize(new Size(nMaxTCWidth, nTCHeight));
            resetDBShape(DBControlList[i], nXDBPos);
            checkOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, true);
        }
    }
View Full Code Here

            {
                LabelControlList[i].setPosition(new Point(nXTCPos, nYTCPos));
                if (icurArrangement != FormWizard.SOCOLUMNARLEFT)
                {
                    nTCWidth = LabelControlList[i].getPreferredWidth(FieldColumns[i].getFieldTitle());
                    LabelControlList[i].setSize(new Size(nTCWidth, nTCHeight));
                }
                else
                {
                    nTCWidth = LabelControlList[i].getSize().Width;
                }
            }
            else
            {
                Point aPoint = new Point(nXTCPos, nYTCPos);
                Size aSize = new Size(nTCWidth, nTCHeight);
                final String sFieldName = FieldColumns[i].getFieldName();
                this.LabelControlList[i] = new Control(oFormHandler, xFormName, FormHandler.SOLABEL, sFieldName, aPoint, aSize);
                if (bIsVeryFirstRun)
                {
                    if (icurArrangement == FormWizard.SOCOLUMNARTOP)
                    {
                        nYDBPos = nYTCPos + nTCHeight;
                    }
                }
                String sTitle = FieldColumns[i].getFieldTitle();
                nTCWidth = LabelControlList[i].getPreferredWidth(sTitle);
                }
            Control curLabelControl = LabelControlList[i];
            if (icurArrangement == FormWizard.SOCOLUMNARLEFT)
            {
                // Note This If Sequence must be called before retrieving the outer Points
                if (bIsFirstRun)
                {
                    nMaxTCWidth = nTCWidth;
                    bIsFirstRun = false;
                }
                else if (nTCWidth > nMaxTCWidth)
                {
                    nMaxTCWidth = nTCWidth;
                }
            }
            checkOuterPoints(nXTCPos, nTCWidth, nYTCPos, nTCHeight, false);
            if ((icurArrangement == FormWizard.SOCOLUMNARTOP) || (icurArrangement == FormWizard.SOTOPJUSTIFIED))
            {
                nXDBPos = nXTCPos;
                nYDBPos = nYTCPos + nTCHeight;
                curLabelControl.xPropertySet.setPropertyValue("Align", new Short((short) com.sun.star.awt.TextAlign.LEFT));
            }
            else
            {
                curLabelControl.xPropertySet.setPropertyValue("Align", new Short((short) _iAlign));
            }
            if (!bControlsareCreated)
            {
                curLabelControl.setSize(new Size(nTCWidth, nTCHeight));
            }
//      if (CurHelpText != ""){
//          oModel.HelpText = CurHelptext;
//      }
        }
View Full Code Here

            DatabaseControl aDBControl = DBControlList[i];
            nDBHeight = aDBControl.getControlHeight();
            nDBWidth = aDBControl.getControlWidth();
            if (nFieldType != DataType.TIMESTAMP)
            {
                aDBControl.setSize(new Size(nDBWidth, nDBHeight));
            }
            if (aDBControl.getControlType() == FormHandler.SOCHECKBOX)
            {
                nYDBPos = nYDBPos + /*(int)*/ ((oFormHandler.getControlReferenceHeight() - nDBHeight) / 2);
                aPoint = new Point(nXDBPos, nYDBPos);
View Full Code Here

        }
        il.setListModel(this);
        il.setRenderer(this);
        il.setRows(4);
        il.setCols(8);
        il.setImageSize(new Size(20, 20));
        il.setShowButtons(false);
        il.setRowSelect(true);
        il.scaleImages = Boolean.FALSE;

        showDeselectButton = true;
View Full Code Here

     * builds the layouts image list.
     */
    public void buildStepX()
    {
        ilLayouts = new ImageList();
        ilLayouts.setPos(new Size(97, 38));
        ilLayouts.setImageSize(new Size(34, 30));
        ilLayouts.setCols(5);
        ilLayouts.setRows(3);
        ilLayouts.setStep(new Short((short) 3));
        ilLayouts.setShowButtons(false);
        ilLayouts.setRenderer(new LayoutRenderer());
View Full Code Here

     * @param _aFont
     * @return width of given text in 1/100mm
     */
    Size getPreferredSize(String _sText, FontDescriptor _aFont)
    {
        Size aSizeMM_100TH = new Size(0, 0);
        try
        {
            // Object aControlContainer = getGlobalMSF().createInstance("com.sun.star.awt.UnoControlContainer");
            // XControlContainer xControlContainer = (XControlContainer)UnoRuntime.queryInterface(XControlContainer.class, aControlContainer);

            final Object aFixedTextModel = getGlobalMSF().createInstance("com.sun.star.awt.UnoControlFixedTextModel");
            final XControlModel xFixedTextModel = (XControlModel) UnoRuntime.queryInterface(XControlModel.class, aFixedTextModel);

            final PropertySetHelper aPropertySetHelper = new PropertySetHelper(xFixedTextModel);
//          aPropertySetHelper.showProperties();
            aPropertySetHelper.setPropertyValueDontThrow("FontDescriptor", _aFont);

            final Object aUnoCtrlFixedText = getGlobalMSF().createInstance("com.sun.star.awt.UnoControlFixedText");
//            XServiceInfo xServiceInfo2 = (XServiceInfo)UnoRuntime.queryInterface(XServiceInfo.class, aUnoCtrlFixedText);
//            String[] sServices2 = xServiceInfo2.getSupportedServiceNames();

            final XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, aUnoCtrlFixedText);
            xWindow.setVisible(false);

            final XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, aUnoCtrlFixedText);
            xControl.setModel(xFixedTextModel);

            final com.sun.star.awt.XFixedText xFixedText = (com.sun.star.awt.XFixedText) UnoRuntime.queryInterface(com.sun.star.awt.XFixedText.class, aUnoCtrlFixedText);
            xFixedText.setText(_sText);

            final XLayoutConstrains xLayoutConstraints = (XLayoutConstrains) UnoRuntime.queryInterface(XLayoutConstrains.class, aUnoCtrlFixedText);
            final Size aSizeInPixel = xLayoutConstraints.getPreferredSize();

            final XWindowPeer xPeerOfReportDefinition = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class, getReportDefinition().getCurrentController().getFrame().getComponentWindow());
            xControl.createPeer(null, xPeerOfReportDefinition);

            final XWindowPeer x = xControl.getPeer();
View Full Code Here

                    Object aClone = aComponent.createClone();
                    if (aClone != null)
                    {
                        String sName = aComponent.getName();
                        com.sun.star.awt.Point aPosition = aComponent.getPosition();
                        Size aSize = aComponent.getSize();

                        XShape aShape = (XShape) UnoRuntime.queryInterface(XShape.class, aClone);
                        String sShapeType = aShape.getShapeType();
                        com.sun.star.awt.Point aShapePoint = aShape.getPosition();
                        Size aShapeSize = aShape.getSize();

                        // normally 'createClone' will create a real clone of the component,
                        // but there seems some problems, we have to controll.
                        copyProperties(aComponent, aClone);
View Full Code Here

TOP

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

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.