Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Cursor


      // Switch to a wait cursor.
      //
      Shell widgetShell = widget.getShell();
      try {
        Cursor waitCursor = display.getSystemCursor(SWT.CURSOR_WAIT);
        widgetShell.setCursor(waitCursor);

        // Try to find an existing loaded version of the module def.
        //
        ModuleDef moduleDef = loadModule(moduleName, logger);
        assert (moduleDef != null);

        // Create a sandbox for the module.
        //
        File shellDir = new File(outDir, GWT_SHELL_PATH + File.separator
            + moduleName);

        TypeOracle typeOracle = moduleDef.getTypeOracle(logger);
        ShellModuleSpaceHost host = doCreateShellModuleSpaceHost(logger,
            typeOracle, moduleDef, genDir, shellDir);
        return host;
      } finally {
        Cursor normalCursor = display.getSystemCursor(SWT.CURSOR_ARROW);
        widgetShell.setCursor(normalCursor);
      }
    }
View Full Code Here


    protected Cursor cursor = null;

    public void mouseMove(MouseEvent e) {
      if ((e.x > columnPosition - columnHitWidth) && (e.x < columnPosition + columnHitWidth)) {
        if (cursor == null) {
          cursor = new Cursor(fTree.getDisplay(), SWT.CURSOR_SIZEWE);
          fTree.setCursor(cursor);
        }
      }
      else {
        if (cursor != null) {
View Full Code Here

  {
    super(parent, checkStyle (style));
    this.resizableParent = resizableParent;
    this.display = getDisplay();

    cursorNWSE = new Cursor(getDisplay(), SWT.CURSOR_SIZENWSE);
    cursorNESW = new Cursor(getDisplay(), SWT.CURSOR_SIZENESW);
    cursorWE = new Cursor(getDisplay(), SWT.CURSOR_SIZEWE);
    cursorNS = new Cursor(getDisplay(), SWT.CURSOR_SIZENS);

    addListener(SWT.Dispose, new Listener()
    {
      public void handleEvent(Event e)
      {
View Full Code Here

  }
 
 
  private void updateCursor(int area)
  {
    Cursor c = null;
    switch(area)
    {
      case AREA_N:  case AREA_S:  c = cursorNS;   break;
      case AREA_W:  case AREA_E:  c = cursorWE;   break;
      case AREA_NW: case AREA_SE: c = cursorNWSE; break;
View Full Code Here

            case RIGHTDOWN:
                Extension.ReleaseCapture();
                Extension.SendMessage(shell.handle, Extension.WM_SYSCOMMAND, 0xF008, 0);
                break;
            case MOVE:
                control.setCursor(new Cursor(shell.getDisplay(),
                        SWT.CURSOR_ARROW));
                Extension.ReleaseCapture();
                Extension.SendMessage(shell.handle, Extension.WM_SYSCOMMAND, 0xF012, 0);
                break;
            }
View Full Code Here

    public void mouseEnter(MouseEvent e) {
        if(shell.getMaximized())return;
        switch (position) {
        case LEFT:
            control.setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZEE));
            break;
        case RIGHT:
            control.setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZEW));
            break;
        case UP:
            control.setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZEN));
            break;
        case DOWN:
            control.setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZES));
            break;
        case LEFTUP:
            control
                    .setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZENW));
            break;
        case RIGHTUP:
            control
                    .setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZENE));
            break;
        case LEFTDOWN:
            control
                    .setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZESW));
            break;
        case RIGHTDOWN:
            control
                    .setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZESE));
            break;
        case MOVE:
            control.setCursor(new Cursor(shell.getDisplay(),
                    SWT.CURSOR_SIZEALL));
            break;
        }
    }
View Full Code Here

            break;
        }
    }

    public void mouseExit(MouseEvent e) {
        control.setCursor(new Cursor(shell.getDisplay(),
                SWT.CURSOR_ARROW));
    }
View Full Code Here

    public void mouseHover(MouseEvent e) {
        if(shell.getMaximized())return;
        switch (position) {
        case LEFT:
            control.setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZEE));
            break;
        case RIGHT:
            control.setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZEW));
            break;
        case UP:
            control.setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZEN));
            break;
        case DOWN:
            control.setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZES));
            break;
        case LEFTUP:
            control
                    .setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZENW));
            break;
        case RIGHTUP:
            control
                    .setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZENE));
            break;
        case LEFTDOWN:
            control
                    .setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZESW));
            break;
        case RIGHTDOWN:
            control
                    .setCursor(new Cursor(shell.getDisplay(), SWT.CURSOR_SIZESE));
            break;
        case MOVE:
            control.setCursor(new Cursor(shell.getDisplay(),
                    SWT.CURSOR_SIZEALL));
            break;
        }
    }
View Full Code Here

    }

    public void mouseEnter(MouseEvent arg0) {
        switch (position) {
        case WindowResizeListener.LEFT:
            control.setCursor(new Cursor(Display.getDefault(),
                    SWT.CURSOR_SIZEE));
            break;
        case WindowResizeListener.RIGHT:
            control.setCursor(new Cursor(Display.getDefault(),
                    SWT.CURSOR_SIZEW));
            break;
        case WindowResizeListener.TOP:
            control.setCursor(new Cursor(Display.getDefault(),
                    SWT.CURSOR_SIZEN));
            break;
        case WindowResizeListener.DOWN:
            control.setCursor(new Cursor(Display.getDefault(),
                    SWT.CURSOR_SIZES));
            break;
        }
        control.addMouseListener(this);
    }
View Full Code Here

        }
        control.addMouseListener(this);
    }

    public void mouseExit(MouseEvent arg0) {
        control.setCursor(new Cursor(Display.getDefault(),
                SWT.CURSOR_ARROW));
        control.removeMouseListener(this);
    }
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.