Package com.sun.star.awt

Examples of com.sun.star.awt.Size


                {
                    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));
            }
            catch (com.sun.star.uno.Exception e)
View Full Code Here


            TextStyleHandler oTextStyleSupplier = new TextStyleHandler(xMSFDoc, xTextDocument);
            Helper.setUnoPropertyValue(xTextDocument, "ApplyFormDesignMode", Boolean.FALSE);
            oViewHandler.setViewSetting("ShowTableBoundaries", Boolean.FALSE);
            oViewHandler.setViewSetting("ShowOnlineLayout", Boolean.TRUE);
            xPropPageStyle = oTextStyleSupplier.getStyleByName("PageStyles", "Standard");
            Size aSize = oTextStyleHandler.changePageAlignment(xPropPageStyle, true);
            nPageWidth = aSize.Width;
            nPageHeight = aSize.Height;
        }
        catch (Exception e)
        {
View Full Code Here

            {
                int nTotalFieldCount = getMainFieldCount() + getSubFieldCount();
                nMainFormHeight = (int) (((double) getMainFieldCount() / (double) nTotalFieldCount) * ((double) (nFormHeight - SOFORMGAP) / 2));
            }
        }
        Size aMainFormSize = new Size(nFormWidth, nMainFormHeight);
        return aMainFormSize;
    }
View Full Code Here

    {
//      int nSubFormHeight = (int) ((double)nFormHeight/2) - SOFORMGAP;
//      int nSubFormFieldCount = this.oSubFormDBMetaData.FieldNames.length;
//      int totfieldcount = oMainFormDBMetaData.FieldNames.length + nSubFormFieldCount;
        int nMainFormHeight = ((ControlForm) oControlForms.get(0)).getActualFormHeight();
        Size aSubFormSize = new Size(nFormWidth, nFormHeight - nMainFormHeight - SOFORMGAP);
        return aSubFormSize;
    }
View Full Code Here

    private void adjustSubFormPosSize(Short _NBorderType)
    {
        ControlForm oMainControlForm = (ControlForm) oControlForms.get(0);
        ControlForm oSubControlForm = (ControlForm) oControlForms.get(1);
        oSubControlForm.setFormSize(new Size(nFormWidth, (int) nFormHeight - oMainControlForm.getFormSize().Height));
        if (oSubControlForm.curArrangement == FormWizard.SOGRID)
        {
            Point aPoint = oSubControlForm.oGridControl.getPosition();
            int idiffheight = oSubControlForm.getEntryPointY() - oMainControlForm.getActualFormHeight() - oMainControlForm.aStartPoint.Y - SOFORMGAP;
            oSubControlForm.setStartPoint(new Point(aPoint.X, (aPoint.Y - idiffheight)));
View Full Code Here

                if (curSubControlForm != null)
                {
                    adjustSubFormPosSize(_NBorderType);
                }
            }
            setFormSize(new Size(aFormSize.Width, getActualFormHeight()));
            unlockallControllers();
        }
View Full Code Here

            {
                xShape.setSize(aSize);
            }
            else
            {
                xShape.setSize(new Size(1000, 100));
            }
            Helper.setUnoPropertyValue(xShape, "AnchorType", TextContentAnchorType.AT_PARAGRAPH);
            xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, xShape);
            xControlShape = (XControlShape) UnoRuntime.queryInterface(XControlShape.class, xShape);
View Full Code Here

        }
    }

    public void initializeBasicControlValues()
    {
        Control oLabelControl = new Control(this, SOLABEL, new Point(), new Size());
        XDevice xDevice = (XDevice) UnoRuntime.queryInterface(XDevice.class, oLabelControl.xWindowPeer);
        iXPixelFactor = (int) (100000 / xDevice.getInfo().PixelPerMeterX);
        iYPixelFactor = (int) (100000 / xDevice.getInfo().PixelPerMeterY);

        nLabelHeight = (oLabelControl.getPreferredHeight("The quick brown fox...") + 1);
        Control oTextControl = new Control(this, SOTEXTBOX, new Point(), new Size());
        nDBRefHeight = (oTextControl.getPreferredHeight("The quick brown fox...") + 1);
        BasicLabelDiffHeight = (nDBRefHeight - nLabelHeight) / 2;
        xDrawPage.remove(oLabelControl.xShape);
        xDrawPage.remove(oTextControl.xShape);
    }
View Full Code Here

        oResource = _oResource;
//      xGroupShape = xShape;
        oDateControl = new DatabaseControl(oFormHandler, _xFormName, _curFieldName, DataType.DATE, aPoint);
        int nDBHeight = oDateControl.getControlHeight();
        nDateWidth = oDateControl.getPreferredWidth();
        oDateControl.setSize(new Size(nDateWidth, nDBHeight));
        Point aTimePoint = new Point(aPoint.X + 10 + nDateWidth, aPoint.Y);
        oTimeControl = new DatabaseControl(oFormHandler, _xFormName, _curFieldName, DataType.TIME, aTimePoint);
        nTimeWidth = oTimeControl.getPreferredWidth();
        oTimeControl.setSize(new Size(nTimeWidth, nDBHeight));
        nDBWidth = nDateWidth + nTimeWidth + 10;
        xShapes.add(oDateControl.xShape);
        xShapes.add(oTimeControl.xShape);
        xShapeGroup = _oFormHandler.xShapeGrouper.group(xShapes);
        xShapeGroup = (XShape) UnoRuntime.queryInterface(XShape.class, xShapeGroup);
View Full Code Here

    {
        try
        {
            int ndatewidth = (int) (nreldatewidth * (double) _aSize.Width);
            int ntimewidth = (int) (nreltimewidth * (double) _aSize.Width);
            oDateControl.xShape.setSize(new Size(ndatewidth, _aSize.Height));
            oTimeControl.xShape.setSize(new Size(ntimewidth, _aSize.Height));
        }
        catch (PropertyVetoException e)
        {
            e.printStackTrace(System.out);
        }
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.