Package org.eclipse.swt.widgets

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


  }
  private void popupDialog(){
    createPopup(calendar);
    popup.setCalendar(calendar);
    Display display = getDisplay ();
    Rectangle parentRect = display.map (getParent (), null, getBounds ());
    Point comboSize = getSize ();
    int x = parentRect.x;
    int y = parentRect.y + comboSize.y;
    popup.setLocation(new Point(x, y));
    if(popup.open()==Dialog.OK){
View Full Code Here


    new ImageFormatConverter().imageTypeOf(fileName.substring(fileName.lastIndexOf('.') + 1));
    return UIThreadRunnable.syncExec(new BoolResult() {
      public Boolean run() {
        Display display = control.getDisplay();
        Rectangle bounds = control.getBounds();
        Rectangle mappedToDisplay = display.map(control.getParent(), null, bounds);

        return captureScreenshotInternal(fileName, mappedToDisplay);
      }
    });
  }
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

      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

  }
 
  public void computeShowArea(TreeItem list) {
    Display display = list.getDisplay();
      popup.setBackground(list.getParent().getBackground());
    Rectangle parentRect = display.map (list.getParent(), null, list.getBounds ());
    Rectangle displayRect = list.getBounds();
   
    int x = parentRect.x+ displayRect.width + 3;
    int y = parentRect.y;//- comboSize.y;
    popup.setLocation(x, y);
View Full Code Here

  }

  public void computeShowArea(Text text) {
    Display display = text.getDisplay();
    popup.setBackground(ColorCache.getInstance().getColor(100, 100, 100));
    Rectangle parentRect = display.map (text.getParent(), null, text.getBounds ());
    Rectangle displayRect = text.getBounds();

    int x = parentRect.x + displayRect.width - popup.getSize().x - 25;
    int y = parentRect.y + displayRect.height - popup.getSize().y - 2 ;
    //+ text.getCaretLocation().y;//- comboSize.y;
View Full Code Here

    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

    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

            + " / "+  list.isFocusControl());
      }
    });
*/   
    Display display = text.getDisplay();
    Rectangle parentRect = display.map (text.getParent(), null, text.getBounds ());

    int x = parentRect.x + text.getCaretLocation().x+ 10;
    int y = parentRect.y + text.getCaretLocation().y + 15;
    popup.setLocation(x, y);
    popup.pack();
View Full Code Here

   
    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

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.