Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.CLabel.addMouseListener()


      linkLabel.setCursor(display.getSystemCursor(SWT.CURSOR_HAND));
      linkLabel.setForeground(Colors.blue);
      gridData = new GridData(GridData.FILL_HORIZONTAL);
      gridData.horizontalSpan = 1;
      linkLabel.setLayoutData(gridData);
      linkLabel.addMouseListener(new MouseAdapter() {
        public void mouseDoubleClick(MouseEvent arg0) {
          Utils.launch((String) ((CLabel) arg0.widget).getData());
        }
        public void mouseDown(MouseEvent arg0) {
          Utils.launch((String) ((CLabel) arg0.widget).getData());
View Full Code Here


    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);
View Full Code Here

    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);
View Full Code Here

      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);
    environment_tab.setControl(content);
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")
                , Localizer._("newwindow.error_open_url",path));
View Full Code Here

    link.setFont(skin.getLabelFont());
    link.setForeground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_BLUE));
    link.setCursor(new Cursor(SWTThread.getDisplay(),SWT.CURSOR_HAND));
    link.setText(JMConstants.JMULE_FORUMS);
    link.setData(JMConstants.JMULE_FORUMS);
    link.addMouseListener(link_listener);
   
    Composite controls_composite = new Composite(content,SWT.NONE);
    grid_data = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_END);
    grid_data.grabExcessHorizontalSpace = true;
    grid_data.grabExcessVerticalSpace = true;
View Full Code Here

    closeButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
    closeButton.setBackground(titleCircle.getBackground());
    closeButton.setImage(fCloseImageNormal);
    closeButton.setCursor(getShell().getDisplay().getSystemCursor(SWT.CURSOR_HAND));
    closeButton.addMouseTrackListener(fMouseTrackListner);
    closeButton.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseUp(MouseEvent e) {
        close();
      }
View Full Code Here

        doClose();
      }
    };

    itemLabel.addMouseListener(mouseListener);
    imageLabel.addMouseListener(mouseListener);

    /* Offer Label to mark item sticky */
    final CLabel markStickyLabel = new CLabel(fInnerContentCircle, SWT.NONE);
    markStickyLabel.setImage(item.supportsSticky() ? fItemNonStickyIcon : fItemNonStickyDisabledIcon);
    markStickyLabel.setBackground(fInnerContentCircle.getBackground());
View Full Code Here

    markStickyLabel.setImage(item.supportsSticky() ? fItemNonStickyIcon : fItemNonStickyDisabledIcon);
    markStickyLabel.setBackground(fInnerContentCircle.getBackground());
    markStickyLabel.setEnabled(item.supportsSticky());
    markStickyLabel.addMouseTrackListener(fMouseTrackListner);
    markStickyLabel.setCursor(fShell.getDisplay().getSystemCursor(SWT.CURSOR_HAND));
    markStickyLabel.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseDown(MouseEvent e) {
        boolean newStateSticky = !item.isSticky();

        /* Update Background Color */
 
View Full Code Here

    final CLabel closeButton = new CLabel(titleCircle, SWT.NO_FOCUS);
    closeButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
    closeButton.setImage(fCloseImageNormal);
    closeButton.setCursor(fShell.getDisplay().getSystemCursor(SWT.CURSOR_HAND));
    closeButton.addMouseTrackListener(fMouseTrackListner);
    closeButton.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseUp(MouseEvent e) {
        doClose();
      }
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.