Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Cursor


                                    // Also, NOT using any of Display.syncExec,
                                    // Display.asyncExec and BusyIndicator,
                                    // but running the code "as is" with manual
                                    // setting of the cursor also did NOT work.
                                    // @todo This is odd. BusyIndicator is broken?
                                    final Cursor busyCursor =
                                            new Cursor(shell.getDisplay(),
                                                    SWT.CURSOR_WAIT);

                                    shell.setCursor(busyCursor);
                                    try {
                                        // we don't allow policy deletions to
View Full Code Here


  public static Cursor getCursor(int type)
    {
    String name = "CURSOR:" + type;
    if (resources.containsKey(name))
      return (Cursor) resources.get(name);
    Cursor cursor = new Cursor(Display.getDefault(), type);
    resources.put(name, cursor);
    return cursor;
    }
View Full Code Here

    } else {

      // colors the link blue
      // and enables CURSOR_HAND and highlighting

      Cursor cursor = new Cursor(display, SWT.CURSOR_HAND);
      link.setCursor(cursor);

      if (highlighted) {
        link.setForeground(Display.getDefault().getSystemColor(
            SWT.COLOR_BLUE));
View Full Code Here

    } else {

      // colors the link blue
      // and enables CURSOR_HAND and highlighting

      Cursor cursor = new Cursor(display, SWT.CURSOR_HAND);
      link.setCursor(cursor);

      if (highlighted) {
        link.setForeground(Display.getDefault().getSystemColor(
            SWT.COLOR_BLUE));
View Full Code Here

    StyledText text= viewer.getTextWidget();
    if (text == null || text.isDisposed())
      return;
    Display display= text.getDisplay();
    if (cursor == null)
      cursor= new Cursor(display, SWT.CURSOR_HAND);
    text.setCursor(cursor);
  }
View Full Code Here

    btnSearch = new Button(btnComposite, SWT.PUSH);
    btnSearch.setText("Search");
    btnSearch.setToolTipText( "Search" );
    btnSearch.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        shell.setCursor( new Cursor( shell.getDisplay(), SWT.CURSOR_WAIT ));
        sendSearch();
        clearFields();
      }
    });
View Full Code Here

          new PacketIDFilter(iq.getPacketID()), new TaskObserver()) {
        public void processPacket(final Packet packet) {

          final SearchIQ result = (SearchIQ) packet;
          shell.getDisplay().asyncExec(new Runnable() { public void run() {
            shell.setCursor( new Cursor( shell.getDisplay(), SWT.CURSOR_ARROW ));
            if(result==null)
            {
              MessageDialog.openError( shell, "Error" , "No response from server." );
              return;
            }
View Full Code Here

    gridData.verticalIndent = 5;
    styledTextHistory.setLayoutData(gridData);
    StyledTextHelper.setLeftMargin(styledTextHistory,5);
//    StyledTextHelper.setTopMargin(styledTextHistory,5);
//    StyledTextHelper.setRightMargin(styledTextHistory,5);
    final Cursor defaultCursor = new Cursor(topComposite.getDisplay(),SWT.CURSOR_ARROW);
    final Cursor handCursor = new Cursor(topComposite.getDisplay(),SWT.CURSOR_HAND);
    styledTextHistory.setCursor(defaultCursor);
    styledTextHistory.addMouseListener(new MouseListener() {
      public void mouseUp(MouseEvent e) {
      }
      public void mouseDown(MouseEvent e) {
View Full Code Here

   *            int The ID value for the cursor
   * @return Cursor The system cursor matching the specific ID
   */
  public static Cursor getCursor(int id) {
    Integer key = Integer.valueOf(id);
    Cursor cursor = m_idToCursorMap.get(key);
    if (cursor == null) {
      cursor = new Cursor(Display.getDefault(), id);
      m_idToCursorMap.put(key, cursor);
    }
    return cursor;
  }
View Full Code Here

   * @param reset
   */
  public void changeCaret(StructuredTextEditor textEditor, boolean reset) {
    if (reset) {
      StyledText text = textEditor.getTextViewer().getTextWidget();
      text.setCursor(new Cursor(null, SWT.CURSOR_IBEAM));
    }
  }
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.