Package org.eclipse.swt.widgets

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


    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

  private void showProposalsMenu() {
    Control control = getControl();
    Rectangle bounds = control.getBounds();
    bounds.y += bounds.height + 5;
    Point point = control.toDisplay( bounds.x, bounds.y );
    proposalsMenu.setLocation( point );
    proposalsMenu.setVisible( true );
  }

  private void doSearch( String query ) {
View Full Code Here

  private void showProposalsMenu() {
    Control control = getControl();
    Rectangle bounds = control.getBounds();
    bounds.y += bounds.height + 5;
    Point point = control.toDisplay( bounds.x, bounds.y );
    proposalsMenu.setLocation( point );
    proposalsMenu.setVisible( true );
  }

  private void doSearch( String query ) {
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.