Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Display.map()


    int index = list.getSelectionIndex ();
    if (index != -1) list.setTopIndex (index);
   
    Display display = getDisplay ();
    Rectangle listRect = list.getBounds ();
    Rectangle parentRect = display.map (getParent (), null, getBounds ());
    Point comboSize = getSize ();
    Rectangle displayRect = getMonitor ().getClientArea ();
    int width = Math.max(comboSize.x, listRect.width + 2);
    int height = listRect.height + 2;
    int x = parentRect.x;
View Full Code Here


        
          if (e.doit) {
            item.dispose();
            Display display = getDisplay();
            Point pt = display.getCursorLocation();
            pt = display.map(null, this, pt.x, pt.y);
            CTabItem nextItem = getItem(pt);
            if(nextItem != null) {
              if (nextItem.closeRect.contains(pt)) {
                if (nextItem.closeImageState != SELECTED && nextItem.closeImageState != HOT) {
                  nextItem.closeImageState = HOT;
View Full Code Here

            tree.showSelection();
        }

        Display display = getDisplay();
        Rectangle listRect = tree.getBounds();
        Rectangle parentRect = display.map(getParent(), null, getBounds());
        Point comboSize = getSize();
        Rectangle displayRect = getMonitor().getClientArea();
        int width = Math.max(comboSize.x, listRect.width + 2);
        int height = listRect.height + 2;
        int x = parentRect.x;
View Full Code Here

    list.setTopIndex(index);
  }

  Display display = getDisplay ();
  Rectangle listRect = list.getBounds ();
  Rectangle parentRect = display.map (getParent (), null, getBounds ());
  Point comboSize = getSize ();
  Rectangle displayRect = getMonitor ().getClientArea ();
  int width = Math.max (comboSize.x, listRect.width + 2);
  int height = listRect.height + 2;
  int x = parentRect.x;
View Full Code Here

      public Boolean run() {
        if (control instanceof Shell)
          return captureScreenshotInternal(fileName, control.getBounds());
        Display display = control.getDisplay();
        Rectangle bounds = control.getBounds();
        Rectangle mappedToDisplay = display.map(control.getParent(), null, bounds);

        return captureScreenshotInternal(fileName, mappedToDisplay);
      }
    });
  }
View Full Code Here

        }

        // calculate popup dimensions.
        Display display = getDisplay();
        Rectangle tableRect = table.getBounds();
        Rectangle parentRect = display.map(getParent(), null, getBounds());
        Point comboSize = getSize();
        Rectangle displayRect = getMonitor().getClientArea();

        int overallWidth = 0;
View Full Code Here

    } else if (clipboardLayer instanceof ObjectSelectionLayer && getCurrentLayer() instanceof ObjectGroup) {
      Display display = Display.getDefault();
      Point cursorLocation = null;
      if (display.getCursorControl() == mapView) {
        cursorLocation = display.getCursorLocation();
        cursorLocation = display.map(null, mapView, cursorLocation);
      }
      if (isSnapToGrid()) {
        cursorLocation = getSnappedVector(cursorLocation);
      }
      Rectangle selectionBounds = ((ObjectSelectionLayer) clipboardLayer).getPixelBounds();
View Full Code Here

  private void passOnEvent(Shell tip, Event event) {
    if (control != null && !control.isDisposed() && event != null && event.widget != control
        && event.type == SWT.MouseDown) {
      final Display display = control.getDisplay();
      Point newPt = display.map(tip, null, new Point(event.x, event.y));

      final Event newEvent = new Event();
      newEvent.button = event.button;
      newEvent.character = event.character;
      newEvent.count = event.count;
View Full Code Here

   
    int index = table.getSelectionIndex ();
    if (index != -1) table.setTopIndex (index);
    Display display = getDisplay ();
    Rectangle listRect = table.getBounds ();
    Rectangle parentRect = display.map (getParent (), null, getBounds ());
    Point comboSize = getSize ();
    Rectangle displayRect = getMonitor ().getClientArea ();
    int width = Math.max (comboSize.x, listRect.width + 2);
    int height = listRect.height + 2;
    int x = parentRect.x;
View Full Code Here

      public Boolean run() {
        if (control instanceof Shell)
          return captureScreenshotInternal(fileName, control.getBounds());
        Display display = control.getDisplay();
        Rectangle bounds = control.getBounds();
        Rectangle mappedToDisplay = display.map(control.getParent(), null, bounds);

        return captureScreenshotInternal(fileName, mappedToDisplay);
      }
    });
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.