Examples of toDisplay()


Examples of org.eclipse.swt.widgets.Button.toDisplay()

                    calendar.setDate( date.getYear() + 1900,
                                      date.getMonth(),
                                      date.getDate() );

                    Point p2 = open.toDisplay( 0,
                                               0 );

                    int x = p2.x;
                    int y = p2.y + 20;
View Full Code Here

Examples of org.eclipse.swt.widgets.Canvas.toDisplay()

     
      public void mouseDown(MouseEvent e) {
        Point shellSize= fShell.getSize();
        final int shellX= shellSize.x;
        final int shellY= shellSize.y;
        Point mouseLoc= resizer.toDisplay(e.x, e.y);
        final int mouseX= mouseLoc.x;
        final int mouseY= mouseLoc.y;
        fResizeListener= new MouseMoveListener() {
          public void mouseMove(MouseEvent e2) {
            Point mouseLoc2= resizer.toDisplay(e2.x, e2.y);
View Full Code Here

Examples of org.eclipse.swt.widgets.Canvas.toDisplay()

        Point mouseLoc= resizer.toDisplay(e.x, e.y);
        final int mouseX= mouseLoc.x;
        final int mouseY= mouseLoc.y;
        fResizeListener= new MouseMoveListener() {
          public void mouseMove(MouseEvent e2) {
            Point mouseLoc2= resizer.toDisplay(e2.x, e2.y);
            int dx= mouseLoc2.x - mouseX;
            int dy= mouseLoc2.y - mouseY;
            setSize(shellX + dx, shellY + dy);
          }
        };
View Full Code Here

Examples of org.eclipse.swt.widgets.Composite.toDisplay()

    colorButton1.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        final Button button = (Button) event.widget;
        final Composite parent = button.getParent();
        Rectangle bounds = button.getBounds();
        Point point = parent.toDisplay(new Point(bounds.x, bounds.y));
        menu1.setLocation(point.x, point.y + bounds.height);
        menu1.setVisible(true);
      }
    });
View Full Code Here

Examples of org.eclipse.swt.widgets.Control.toDisplay()

            Control control= toolItem.getParent();
            Menu menu= getMenu(control);

            Rectangle bounds= toolItem.getBounds();
            Point topLeft= new Point(bounds.x, bounds.y + bounds.height);
            menu.setLocation(control.toDisplay(topLeft));
            menu.setVisible(true);
        }
    }

    /**
 
View Full Code Here

Examples of org.eclipse.swt.widgets.Control.toDisplay()

    private Rectangle getCaretRectangle(int offset) {
      Point location= fContentAssistSubjectControlAdapter.getLocationAtOffset(offset);
      Control subjectControl= fContentAssistSubjectControlAdapter.getControl();
      Point controlSize= subjectControl.getSize();
      constrainLocation(location, new Point(0, 0), new Rectangle(0, 0, controlSize.x, controlSize.y));
      location= subjectControl.toDisplay(location);
      Rectangle subjectRectangle= new Rectangle(location.x, location.y, 1, fContentAssistSubjectControlAdapter.getLineHeight());
      return subjectRectangle;
    }
   
    protected Point getStackedLocation(Shell shell, Shell parent) {
View Full Code Here

Examples of org.eclipse.swt.widgets.Control.toDisplay()

     * Returns the location of the given event, in display coordinates
     * @return
     */
    public static Point getEventLoc(Event event) {
        Control ctrl = (Control) event.widget;
        return ctrl.toDisplay(new Point(event.x, event.y));
    }

}
View Full Code Here

Examples of org.eclipse.swt.widgets.Control.toDisplay()

      fAllowMouseExit= true;

      Control subjectControl= getSubjectControl();
      // return a location that just overlaps the annotation on the bar
      if (anchor == AbstractInformationControlManager.ANCHOR_RIGHT)
        return subjectControl.toDisplay(subjectArea.x - 4, subjectArea.y - 2);
      else if (anchor == AbstractInformationControlManager.ANCHOR_LEFT)
        return subjectControl.toDisplay(subjectArea.x + subjectArea.width - controlSize.x + 4, subjectArea.y - 2);
    }

    fAllowMouseExit= false;
View Full Code Here

Examples of org.eclipse.swt.widgets.Control.toDisplay()

      Control subjectControl= getSubjectControl();
      // return a location that just overlaps the annotation on the bar
      if (anchor == AbstractInformationControlManager.ANCHOR_RIGHT)
        return subjectControl.toDisplay(subjectArea.x - 4, subjectArea.y - 2);
      else if (anchor == AbstractInformationControlManager.ANCHOR_LEFT)
        return subjectControl.toDisplay(subjectArea.x + subjectArea.width - controlSize.x + 4, subjectArea.y - 2);
    }

    fAllowMouseExit= false;
    return super.computeLocation(subjectArea, controlSize, anchor);
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.Control.toDisplay()

    private Rectangle getCaretRectangle(int offset) {
      Point location= fContentAssistSubjectControlAdapter.getLocationAtOffset(offset);
      Control subjectControl= fContentAssistSubjectControlAdapter.getControl();
      Point controlSize= subjectControl.getSize();
      constrainLocation(location, new Point(0, 0), new Rectangle(0, 0, controlSize.x, controlSize.y));
      location= subjectControl.toDisplay(location);
      Rectangle subjectRectangle= new Rectangle(location.x, location.y, 1, fContentAssistSubjectControlAdapter.getLineHeight());
      return subjectRectangle;
    }

    protected Point getStackedLocation(Shell shell, Shell parent) {
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.