Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Rectangle


  {
    if (!initialized || pem == null || comp == null
        || pem.getPiecePicker() == null || pem.getDiskManager() == null
        || !comp.isVisible())
      return;
    Rectangle rect = pieceDistCanvas.getBounds();
    if (rect.height <= 0 || rect.width <= 0)
      return;
   
    PiecePicker picker = pem.getPiecePicker();
   
View Full Code Here


              try {
               
                int w = Integer.parseInt(strings[1]);
                int h = Integer.parseInt(strings[2]);

                Rectangle computeTrim = shell.computeTrim(0, 0, w, h);
                shell.setSize(computeTrim.width, computeTrim.height);
               
              } catch (Exception e) {
              }
            }
View Full Code Here

          size.y += toolTipShell.getBorderWidth() * 2 + (f.marginHeight * 2);
        } catch (NoSuchFieldError e) {
          /* Ignore for Pre 3.0 SWT.. */
        }
        Point pt = table.toDisplay(event.x, event.y);
        Rectangle displayRect;
        try {
          displayRect = table.getMonitor().getClientArea();
        } catch (NoSuchMethodError e) {
          displayRect = table.getDisplay().getClientArea();
        }
View Full Code Here

    //not be any smaller than 50 pixels.
    editor.horizontalAlignment = SWT.LEFT;
    editor.grabHorizontal = true;
    editor.minimumWidth = 50;

    Rectangle r = text.computeTrim(0, 0, 100, text.getLineHeight());
    editor.minimumHeight = r.height;


    // Open the text editor on the selected row.
    editor.setEditor (text, item);
View Full Code Here

    if (c.getChildren().length == 0 && (size.x == 64 || size.y == 64)) {
      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);
    }
View Full Code Here

    if (c.getChildren().length == 0 && (size.x == 64 || size.y == 64)) {
      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);
    }
View Full Code Here

    /*
     * Re-adjust scrollbar setting when the window resizes
     */
    scrollable.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent e) {
        Rectangle r = scrollable.getClientArea();
        scrollable.setMinSize(scrollChild.computeSize(r.width, SWT.DEFAULT));
      }
    });

    /*
 
View Full Code Here

   * re-layout the controls and window appropriately
   */
  public void isCollapsed(boolean value) {
    if (null != shell && false == shell.isDisposed()) {
      scrollable.setRedraw(false);
      Rectangle r = scrollable.getClientArea();
      scrollable.setMinSize(scrollChild.computeSize(r.width, SWT.DEFAULT));

      /*
       * Resizing to fit the panel if there is only one
       */
 
View Full Code Here

    /*
     * Re-adjust scrollbar setting when the window resizes
     */
    scrollable.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent e) {
        Rectangle r = scrollable.getClientArea();
        scrollable.setMinSize(main.computeSize(r.width, SWT.DEFAULT ));
      }
    });
     
      gridData = new GridData(GridData.FILL_BOTH);
View Full Code Here

  }

  // @see com.aelitis.azureus.ui.common.table.TableRowCore#redraw()
  public void redraw() {
    // this will call paintItem which may call refresh
    Rectangle bounds = getBounds();
    table.redraw(bounds.x, bounds.y, bounds.width, bounds.height, false);
  }
View Full Code Here

TOP

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

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.