Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Cursor


   */
  private void handleMouseMove(MouseEvent event) {
    if (fTextViewer != null) {
      int[] lines= toLineNumbers(event.y);
      Position p= getAnnotationPosition(lines);
      Cursor cursor= (p != null ? fHitDetectionCursor : null);
      if (cursor != fLastCursor) {
        fCanvas.setCursor(cursor);
        fLastCursor= cursor;
      }
    }
View Full Code Here


    private void createEmployeeMessage() {
        Composite employeeComposite = new Composite(items, SWT.NONE);
        employeeComposite.setBackground(getDefaultBackgroundColor());
        employeeComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        employeeComposite.setCursor(new Cursor(getDisplay(), SWT.CURSOR_HAND));
       
        FormLayout formLayout = new FormLayout();
        formLayout.marginWidth = 5;
        formLayout.marginHeight = 5;
        employeeComposite.setLayout(formLayout);
View Full Code Here

   
    private void createAccountMessage() {
        Composite accountComposite = new Composite(items, SWT.NONE);
        accountComposite.setBackground(getDefaultBackgroundColor());
        accountComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        accountComposite.setCursor(new Cursor(getDisplay(), SWT.CURSOR_HAND));
       
        FormLayout formLayout = new FormLayout();
        formLayout.marginWidth = 5;
        formLayout.marginHeight = 5;
        accountComposite.setLayout(formLayout);
View Full Code Here

   
    private void createClassRomMessage() {
        Composite classRoomComposite = new Composite(items, SWT.NONE);
        classRoomComposite.setBackground(getDefaultBackgroundColor());
        classRoomComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        classRoomComposite.setCursor(new Cursor(getDisplay(), SWT.CURSOR_HAND));
       
        FormLayout formLayout = new FormLayout();
        formLayout.marginWidth = 5;
        formLayout.marginHeight = 5;
        classRoomComposite.setLayout(formLayout);
View Full Code Here

   
    private void createCourseMessage() {
        Composite courseComposite = new Composite(items, SWT.NONE);
        courseComposite.setBackground(getDefaultBackgroundColor());
        courseComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        courseComposite.setCursor(new Cursor(getDisplay(), SWT.CURSOR_HAND));
       
        FormLayout formLayout = new FormLayout();
        formLayout.marginWidth = 5;
        formLayout.marginHeight = 5;
        courseComposite.setLayout(formLayout);
View Full Code Here

          }
        }
      }
    });
   
    resizer.setCursor(new Cursor(resizer.getDisplay(), SWT.CURSOR_SIZESE));
    MouseAdapter resizeSupport= new MouseAdapter() {
      private MouseMoveListener fResizeListener;
     
      public void mouseDown(MouseEvent e) {
        Point shellSize= fShell.getSize();
View Full Code Here

    fParentRuler= parentRuler;
    fCachedTextViewer= parentRuler.getTextViewer();
    fCachedTextWidget= fCachedTextViewer.getTextWidget();

    fHitDetectionCursor= new Cursor(parentControl.getDisplay(), SWT.CURSOR_HAND);

    fCanvas= createCanvas(parentControl);

    fCanvas.addPaintListener(new PaintListener() {
      public void paintControl(PaintEvent event) {
View Full Code Here

   */
  private void handleMouseMove(MouseEvent event) {
    fParentRuler.setLocationOfLastMouseButtonActivity(event.x, event.y);
    if (fCachedTextViewer != null) {
      int line= toDocumentLineNumber(event.y);
      Cursor cursor= (hasAnnotation(line) ? fHitDetectionCursor : null);
      if (cursor != fLastCursor) {
        fCanvas.setCursor(cursor);
        fLastCursor= cursor;
      }
    }
View Full Code Here

            return;
        }

        final ImageData imageData = SWTImageUtil.convertToSWT(cursor.getImage()).get(0);

        final Cursor swtCursor = new Cursor(_control.getDisplay(), imageData, cursor.getHotspotX(), cursor
                .getHotspotY());

        _control.setCursor(swtCursor);
    }
View Full Code Here

            final Color white = display.getSystemColor(SWT.COLOR_WHITE);
            final Color black = display.getSystemColor(SWT.COLOR_BLACK);
            final PaletteData palette = new PaletteData(new RGB[] { white.getRGB(), black.getRGB() });
            final ImageData sourceData = new ImageData(16, 16, 1, palette);
            sourceData.transparentPixel = 0;
            _transparentCursor = new Cursor(display, sourceData, 0, 0);
        }
        return _transparentCursor;
    }
View Full Code Here

TOP

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

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.