Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Point


    }
  }
 
  public Point computeSize(int wHint, int hHint) {
    try {
      Point size = super.computeSize(wHint, hHint);
      return betterComputeSize(this, size, wHint, hHint);
    } catch (Throwable t) {
      Debug.out(t);
      return new Point(wHint == -1 ? 10 : wHint, hHint == -1 ? 10
          : hHint);
    }
  }
View Full Code Here


      Object ld = c.getLayoutData();
      if (ld instanceof FormData) {
        FormData fd = (FormData) ld;
        if (fd.width != 0 && fd.height != 0) {
          Rectangle trim = c.computeTrim (0, 0, fd.width, fd.height);
          return new Point(trim.width, trim.height);
        }
      }
      return new Point(1, 1);
    }
    if (size.x == 0 && size.y == 0) {
      return size;
    }
    if (minWidth > 0 && size.x < minWidth) {
View Full Code Here

      Object ld = c.getLayoutData();
      if (ld instanceof FormData) {
        FormData fd = (FormData) ld;
        if (fd.width != 0 && fd.height != 0) {
          Rectangle trim = c.computeTrim (0, 0, fd.width, fd.height);
          return new Point(trim.width, trim.height);
        }
      }
      return new Point(1, 1);
    }
    if (size.x == 0 && size.y == 0) {
      return size;
    }
    if (minWidth > 0 && size.x < minWidth) {
View Full Code Here

    Control[] controls = scrollChild.getChildren();
    for (int i = (initialMaxNumberOfPanels); i < controls.length; i++) {
      ((GridData) controls[i].getLayoutData()).exclude = true;
    }

    Point p = shell.computeSize(defaultShellWidth, SWT.DEFAULT);

    for (int i = 0; i < controls.length; i++) {
      ((GridData) controls[i].getLayoutData()).exclude = false;
    }
    formatLastPanel(null);
View Full Code Here

      /*
       * Resizing to fit the panel if there is only one
       */
      if (pReporters.length == 1) {
        Point p = shell.computeSize(defaultShellWidth, SWT.DEFAULT);
        if (shell.getSize().y != p.y) {
          p.x = shell.getSize().x;
          shell.setSize(p);
        }
      }
View Full Code Here

        // @see org.eclipse.swt.widgets.Text#computeSize(int, int, boolean)
        public Point computeSize(int wHint, int hHint, boolean changed) {
          // List widget, at least on Windows, forces the preferred height
         
          if ( hHint == 0 && !isVisible()){
          return( new Point( 0, 0 ));
        }
         
          Point pt = super.computeSize(wHint, hHint, changed);
         
          if (hHint == SWT.DEFAULT) {
            Object ld = getLayoutData();
            if (ld instanceof GridData) {
              if (((GridData)ld).grabExcessVerticalSpace) {
View Full Code Here

        // Text widget, at least on Windows, forces the preferred width
        // to the width of the text inside of it
        // Fix this by forcing to LayoutData's minWidth
        if ( hHint==0 && !isVisible()){
         
          return( new Point( 0, 0 ));
        }
        Point pt = super.computeSize(wHint, hHint, changed);
       
        if (wHint == SWT.DEFAULT) {
          Object ld = getLayoutData();
          if (ld instanceof GridData) {
            if (((GridData)ld).grabExcessHorizontalSpace) {
View Full Code Here

  }

  public Point getSize() {
    Rectangle bounds = super.getBounds();
    if(bounds == null)
      return new Point(0, 0);
    return new Point(bounds.width - (marginWidth * 2),
                     bounds.height - (marginHeight * 2));
  }
View Full Code Here

  public TableViewSWT<DiskManagerFileInfo> initYourTableView() {
    tv = new TableViewSWTImpl<DiskManagerFileInfo>(
        org.gudy.azureus2.plugins.disk.DiskManagerFileInfo.class,
        TableManager.TABLE_TORRENT_FILES, getPropertiesPrefix(), basicItems,
        "firstpiece", SWT.MULTI | SWT.FULL_SELECTION | SWT.VIRTUAL);
    tv.setRowDefaultIconSize(new Point(16, 16));
    if (allowTabViews) {
      tv.setEnableTabViews(true);
      tv.setCoreTabViews(new IView[] { new FileInfoView()
      });
    }
View Full Code Here

      }
    }
  });
 
 
  Point p = shell.computeSize( SWT.DEFAULT, SWT.DEFAULT );
 
  if ( p.x > 800 ){
   
    p.x = 800;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.graphics.Point

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.