Package com.sun.star.awt

Examples of com.sun.star.awt.Size


        return tEnv;
    } // finish method getTestEnvironment

    public static XControlShape createGrid(XComponent oDoc, int height,
                                           int width, int x, int y) {
        Size size = new Size();
        Point position = new Point();
        XControlShape oCShape = null;
        XControlModel aControl = null;

        //get MSF
View Full Code Here


            if (xImage != null)
            {
                final XPropertySetInfo xInfo = xImage.getPropertySetInfo();
                if (xInfo.hasPropertyByName("Size100thMM"))
                {
                    Size imageSize = (Size) xImage.getPropertyValue("Size100thMM");
                    dim.setSize(imageSize.Width, imageSize.Height);
                    if (dim.height == 0 && dim.width == 0)
                    {
                        imageSize = (Size) xImage.getPropertyValue("SizePixel");
                        final int dpi = java.awt.Toolkit.getDefaultToolkit().getScreenResolution();
                        final double fac = 2540 / dpi;
                        dim.setSize(imageSize.Width * fac, imageSize.Height * fac);
                    }
                }
                else if (xInfo.hasPropertyByName("SizePixel"))
                {
                    final Size imageSize = (Size) xImage.getPropertyValue("SizePixel");
                    final int dpi = java.awt.Toolkit.getDefaultToolkit().getScreenResolution();
                    final double fac = 2540 / dpi;
                    dim.setSize(imageSize.Width * fac, imageSize.Height * fac);
                }
            }
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;
        sMsgEndAutopilot = oResource.getResText(UIConsts.RID_DB_COMMON + 33);
    } catch (Exception e) {
        e.printStackTrace(System.out);
View Full Code Here

            else{
                totfieldcount = getTotFieldCount();
                nMainFormHeight = (int) (((double) nMainFormFieldCount/(double) totfieldcount) * ((double)(nFormHeight-SOFORMGAP)/2));
            }
        }
        Size aMainFormSize = new Size(nFormWidth, nMainFormHeight);
        MainFormStandardHeight = nMainFormHeight;
        return aMainFormSize;
    }
View Full Code Here

    private Size getSubFormSize(){
//      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)));
            oSubControlForm.oGridControl.setPosition(oSubControlForm.aStartPoint);
View Full Code Here

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

      if (xImage != null)
      {
        final XPropertySetInfo xInfo = xImage.getPropertySetInfo();
        if (xInfo.hasPropertyByName("Size100thMM"))
        {
          Size imageSize = (Size) xImage.getPropertyValue("Size100thMM");
          dim.setSize(imageSize.Width, imageSize.Height);
          if (dim.height == 0 && dim.width == 0)
          {
            imageSize = (Size) xImage.getPropertyValue("SizePixel");
            final int dpi = java.awt.Toolkit.getDefaultToolkit().getScreenResolution();
            final double fac = 2540 / dpi;
            dim.setSize(imageSize.Width * fac, imageSize.Height * fac);
          }
        }
        else if (xInfo.hasPropertyByName("SizePixel"))
        {
          final Size imageSize = (Size) xImage.getPropertyValue("SizePixel");
          final int dpi = java.awt.Toolkit.getDefaultToolkit().getScreenResolution();
          final double fac = 2540 / dpi;
          dim.setSize(imageSize.Width * fac, imageSize.Height * fac);
        }
      }
View Full Code Here

     */
    public void _getSize() {
        requiredMethod("getBounds()");

        boolean result = true;
        Size size = oObj.getSize();

        result &= (size.Width == bounds.Width);
        result &= (size.Height == bounds.Height);

        tRes.tested("getSize()", result);
View Full Code Here

            tEnv.getObjRelation("XWindow.ControlShape");
        log.println("change object position and size...");

        if (ctrlShape != null) {
            try {
                Size sz = ctrlShape.getSize();
                sz.Height += 100;
                ctrlShape.setSize(sz);
                Point pos = ctrlShape.getPosition();
                pos.X += 100 ;
                ctrlShape.setPosition(pos);
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.