Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Cursor


        }
      }
    });

    final Cursor handCursor = new Cursor(comp.getDisplay(), SWT.CURSOR_HAND);
    styled_text.addListener(SWT.MouseMove, new Listener() {
      Cursor curCursor = null;

      public void handleEvent(Event event) {
        if (links.size() == 0) {
          return;
        }
        boolean onLink = false;
        try {
          int ofs = styled_text.getOffsetAtLocation(new Point(event.x, event.y));
          for (int i = 0; i < links.size(); i++) {
            linkInfo linkInfo = (linkInfo)links.get(i);
            if (ofs >= linkInfo.ofsStart && ofs <= linkInfo.ofsEnd) {
              onLink = true;
              break;
            }
          }
        } catch (Exception e) {

        }

        try {
          Cursor cursor = onLink ? handCursor : null;
          if (curCursor != cursor) {
            styled_text.setCursor(cursor);
            curCursor = cursor;
          }
        } catch (Exception e) {
View Full Code Here


      SWTSkinObject soParent = (SWTSkinObject) parent.getData("SkinObject");

      String skinRef = getSkinRef();
      if (skinRef != null) {
        Shell shell = parent.getShell();
        Cursor cursor = shell.getCursor();
        try {
          shell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT));

//          SWTSkinObjectContainer soContents = (SWTSkinObjectContainer) skin.createSkinObject(
//              "MdiContents." + uniqueNumber++, "mdi.content.item",
View Full Code Here

  private void setActiveTab(final SWTSkinObjectTab newTab, final boolean evenIfSame) {
    Utils.execSWTThread(new AERunnable() {
      public void runSupport() {
        Shell shell = skin.getShell();
        Cursor cursor = shell.getCursor();
        try {
          shell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
          swtSetActiveTab(newTab, evenIfSame);
        } finally {
          shell.setCursor(cursor);
View Full Code Here

    }       
       
    label = new Label(rootPanel,SWT.NULL);
    label.setText(MessageText.getString("ipCheckerWizard.service.url"));

    Cursor handCursor = new Cursor(rootPanel.getDisplay(), SWT.CURSOR_HAND);
   
    this.serviceUrl = new Label(rootPanel,SWT.NULL);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    serviceUrl.setLayoutData(gridData);
    serviceUrl.setForeground(Colors.blue);
View Full Code Here

    label.setFont(skin.getDefaultFont());
    label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    label.setText(upload_session.getED2KLink().getAsString());
    label.setToolTipText(_._("uploadinfowindow.tab.general.label.ed2k_link.tooltip"));
    label.setForeground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_BLUE));
    label.setCursor(new Cursor(SWTThread.getDisplay(),SWT.CURSOR_HAND));
    label.addListener(SWT.MouseUp, new Listener() {
      public void handleEvent(Event arg0) {
        Utils.setClipBoardText(upload_session.getED2KLink().getAsString());
      }
    });
View Full Code Here

    label.setFont(skin.getDefaultFont());
    label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    label.setText(shared_file.getED2KLink().getAsString());
    label.setToolTipText(_._("sharedfilepropertieswindow.label.ed2k_link.tooltip"));
    label.setForeground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_BLUE));
    label.setCursor(new Cursor(SWTThread.getDisplay(),SWT.CURSOR_HAND));
    label.addListener(SWT.MouseUp, new Listener() {
      public void handleEvent(Event arg0) {
        Utils.setClipBoardText(shared_file.getED2KLink().getAsString());
      }
    });
View Full Code Here

    label.setFont(skin.getDefaultFont());
    label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    label.setText(search_result.getAsED2KLink().getAsString());
    label.setToolTipText(_._("searchpropertieswindow.label.ed2k_link.tooltip"));
    label.setForeground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_BLUE));
    label.setCursor(new Cursor(SWTThread.getDisplay(),SWT.CURSOR_HAND));
    label.addListener(SWT.MouseUp, new Listener() {
      public void handleEvent(Event arg0) {
        Utils.setClipBoardText(search_result.getAsED2KLink().getAsString());
      }
    });
View Full Code Here

    link = new CLabel(links_container,SWT.NONE);
    link.setFont(link_font);
    link.setText(JMConstants.JMULE_WEB_SITE);
    link.setData(JMConstants.JMULE_WEB_SITE);
    link.setForeground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_BLUE));
    link.setCursor(new Cursor(SWTThread.getDisplay(),SWT.CURSOR_HAND));
    link.addMouseListener(link_listener);

    link = new CLabel(links_container,SWT.NONE);
    link.setText(_._("aboutwindow.tab.general.label.forum") + " : ");
   
    link = new CLabel(links_container,SWT.NONE);
    link.setFont(link_font);
    link.setText(JMConstants.JMULE_FORUMS);
    link.setData(JMConstants.JMULE_FORUMS);
    link.setForeground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_BLUE));
    link.setCursor(new Cursor(SWTThread.getDisplay(),SWT.CURSOR_HAND));
    link.addMouseListener(link_listener);
   
    if (JMConstants.IS_NIGHTLY_BUILD) {
      CTabItem nightly_build = new CTabItem(tab_list,SWT.NONE);
      content = new Composite(tab_list,SWT.NONE);
      nightly_build.setControl(content);
      nightly_build.setText(_._("aboutwindow.tab.nightly_build"));
      layout = new GridLayout(1,false);
      layout.marginHeight = 10;
      layout.marginWidth  = 10;
      content.setLayout(layout);
     
      final Label image = new Label(content,SWT.NONE);
      image.setImage(SWTImageRepository.getImage("bomb.png"));
      layout_data = new GridData();
      layout_data.grabExcessHorizontalSpace = true;
      layout_data.horizontalAlignment = GridData.CENTER;
      image.setLayoutData(layout_data);
     
      Label nightly_build_label = new Label(content,SWT.NONE);
      nightly_build_label.setForeground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_RED));
      layout_data = new GridData(GridData.FILL_HORIZONTAL);
      layout_data.horizontalAlignment = GridData.CENTER;
      nightly_build_label.setLayoutData(layout_data);
      nightly_build_label.setText(_._("aboutwindow.tab.nightly_build.label.nightly_buld_str1"));
     
      Label nightly_build_label2 = new Label(content,SWT.NONE);
      nightly_build_label2.setForeground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_RED));
      layout_data = new GridData(GridData.FILL_HORIZONTAL );
      layout_data.horizontalAlignment = GridData.CENTER;
      nightly_build_label2.setLayoutData(layout_data);
      nightly_build_label2.setText(_._("aboutwindow.tab.nightly_build.label.nightly_buld_str2")+" "+_._("aboutwindow.tab.general.label.forum"));
     
      CLabel forum_link = new CLabel(content,SWT.NONE);
      layout_data = new GridData(GridData.FILL_HORIZONTAL );
      layout_data.horizontalAlignment = GridData.CENTER;
      forum_link.setLayoutData(layout_data);
      forum_link.setFont(link_font);
      forum_link.setText(JMConstants.JMULE_FORUMS);
      forum_link.setData(JMConstants.JMULE_FORUMS);
      forum_link.setForeground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_BLUE));
      forum_link.setCursor(new Cursor(SWTThread.getDisplay(),SWT.CURSOR_HAND));
      forum_link.addMouseListener(link_listener);
    }
   
    CTabItem environment_tab = new CTabItem(tab_list,SWT.NONE);
    content = new Composite(tab_list,SWT.NONE);
View Full Code Here

    label.setText(download_session.getED2KLink().getAsString());
    label.setToolTipText(_
        ._("downloadinfowindow.tab.general.label.ed2k_link.tooltip"));
    label.setForeground(SWTThread.getDisplay().getSystemColor(
        SWT.COLOR_BLUE));
    label.setCursor(new Cursor(SWTThread.getDisplay(), SWT.CURSOR_HAND));
    label.addListener(SWT.MouseUp, new Listener() {
      public void handleEvent(Event arg0) {
        Utils.setClipBoardText(download_session.getED2KLink()
            .getAsString());
      }
View Full Code Here

   
    CLabel learn_more_link = new CLabel(shell,SWT.NONE);
    learn_more_link.setText(_._("newwindow.label.about_ed2k_links"));
    learn_more_link.setData(JMConstants.ABOUT_ED2K_LINKS);
    learn_more_link.setForeground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_BLUE));
    learn_more_link.setCursor(new Cursor(SWTThread.getDisplay(),SWT.CURSOR_HAND));
    learn_more_link.addMouseListener(new MouseAdapter() { 
        public void mouseDoubleClick(MouseEvent arg0) {
          String path = (String) ((CLabel) arg0.widget).getData();
          if (!Utils.launchProgram(path))
            Utils.showWarningMessage(shell, _._("newwindow.error_open_url.title")
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.