• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java HelpListener类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.swt.events.HelpListener的典型用法代码示例。如果您正苦于以下问题:Java HelpListener类的具体用法?Java HelpListener怎么用?Java HelpListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



HelpListener类属于org.eclipse.swt.events包,在下文中一共展示了HelpListener类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setHelp

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
public static void setHelp(final Control control, String href) {
	if (href == null)
		return;
	control.setData(HELP_KEY, href);
	// ensure that the listener is only registered once
	final HelpListener listener = getInstance().getHelpListener();
	control.removeHelpListener(listener);
	control.addHelpListener(listener);
	control.addDisposeListener(new DisposeListener() {

		@Override
		public void widgetDisposed(DisposeEvent e) {
			control.removeHelpListener(listener);
		}
	});
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:17,代码来源:HelpSystem.java


示例2: addHelpListener

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
/**
 * Adds a listener for help requests in this viewer.
 * Has no effect if an identical listener is already registered.
 *
 * @param listener a help listener
 */
public void addHelpListener(HelpListener listener) {
    helpListeners.add(listener);
    if (!helpHooked) {
        Control control = getControl();
        if (control != null && !control.isDisposed()) {
            if (this.helpListener == null) {
                this.helpListener = new HelpListener() {
                    public void helpRequested(HelpEvent event) {
                        handleHelpRequest(event);
                    }
                };
            }
            control.addHelpListener(this.helpListener);
            helpHooked = true;
        }
    }
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:24,代码来源:Viewer.java


示例3: RetargetAction

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
/**
 * Constructs a RetargetAction with the given action id, text and style.
 * 
 * @param actionID
 *            the retargetable action id
 * @param text
 *            the action's text, or <code>null</code> if there is no text
 * @param style
 *            one of <code>AS_PUSH_BUTTON</code>, <code>AS_CHECK_BOX</code>,
 *            <code>AS_DROP_DOWN_MENU</code>, <code>AS_RADIO_BUTTON</code>,
 *            and <code>AS_UNSPECIFIED</code>
 * @since 3.0
 */
public RetargetAction(String actionID, String text, int style) {
	super(text, style);
	setId(actionID);
	setEnabled(false);
	super.setHelpListener(new HelpListener() {
		public void helpRequested(HelpEvent e) {
			HelpListener listener = null;
			if (handler != null) {
				// if we have a handler, see if it has a help listener
				listener = handler.getHelpListener();
				if (listener == null) {
					// use our own help listener
					listener = localHelpListener;
				}
			}
			if (listener != null) {
				// pass on the event
				listener.helpRequested(e);
			}
		}
	});
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:36,代码来源:RetargetAction.java


示例4: configureShell

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
protected void configureShell(Shell newShell)
{
  super.configureShell(newShell);
  // Register help listener on the shell
  newShell.addHelpListener(new HelpListener()
  {
    public void helpRequested(HelpEvent event)
    {
      // call perform help on the current page
      if (currentPage != null)
      {
        currentPage.performHelp();
      }
    }
  });
}
 
开发者ID:terraframe,项目名称:geoprism,代码行数:17,代码来源:LocalizedWizardDialog.java


示例5: removeHelpListener

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
@Override
public void removeHelpListener(HelpListener listener) {
	if (lastListener != null){
		super.removeHelpListener(lastListener);
		lastListener = null;
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:8,代码来源:ComboButton.java


示例6: setHelp

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
/**
 * Set the listener to the menu specified on the creation of the class, and the content 
 * of the help are linked using the uri passed as parameter
 * 
 * @param href the link to the help content
 * @return the created listener, or null is the menu is null
 */
public HelpListener setHelp(String href){
	if (openedMenu != null){
		HelpOpener handler = new HelpOpener(href);
		openedMenu.removeHelpListener(handler);
		openedMenu.addHelpListener(handler);
		return handler;
	}
	return null;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:17,代码来源:HelpProvider.java


示例7: configureShell

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
protected void configureShell(Shell newShell) {
	super.configureShell(newShell);
	// Register help listener on the shell
	newShell.addHelpListener(new HelpListener() {
		public void helpRequested(HelpEvent event) {
			// call perform help on the current page
			if (currentPage != null) {
				currentPage.performHelp();
			}
		}
	});
}
 
开发者ID:MentorEmbedded,项目名称:p2-installer,代码行数:13,代码来源:WizardDialog.java


示例8: removeHelpListener

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
/**
 * Removes the given help listener from this viewer.
 * Has no effect if an identical listener is not registered.
 *
 * @param listener a help listener
 */
public void removeHelpListener(HelpListener listener) {
    helpListeners.remove(listener);
    if (helpListeners.size() == 0) {
        Control control = getControl();
        if (control != null && !control.isDisposed()) {
            control.removeHelpListener(this.helpListener);
            helpHooked = false;
        }
    }
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:17,代码来源:Viewer.java


示例9: addSWTListener

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
/**
     * Hook an SWT listener on the canvas where the chart is drawn.
     * The purpose of this method is to allow some degree of customization.
     *
     * @param listener The SWT listener to attach to the canvas.
     */
    public void addSWTListener(EventListener listener) {
        if (listener instanceof ControlListener) {
            this.canvas.addControlListener((ControlListener) listener);
        }
        else if (listener instanceof DisposeListener) {
            this.canvas.addDisposeListener((DisposeListener) listener);
//      }
//      else if (listener instanceof DragDetectListener) {
//          this.canvas.addDragDetectListener((DragDetectListener) listener);
        }
        else if (listener instanceof FocusListener) {
            this.canvas.addFocusListener((FocusListener) listener);
        }
        else if (listener instanceof HelpListener) {
            this.canvas.addHelpListener((HelpListener) listener);
        }
        else if (listener instanceof KeyListener) {
            this.canvas.addKeyListener((KeyListener) listener);
//      }
//      else if (listener instanceof MenuDetectListener) {
//          this.canvas.addMenuDetectListener((MenuDetectListener) listener);
        }
        else if (listener instanceof MouseListener) {
            this.canvas.addMouseListener((MouseListener) listener);
        }
        else if (listener instanceof MouseMoveListener) {
            this.canvas.addMouseMoveListener((MouseMoveListener) listener);
        }
        else if (listener instanceof MouseTrackListener) {
            this.canvas.addMouseTrackListener((MouseTrackListener) listener);
//      } else if (listener instanceof MouseWheelListener) {
//          this.canvas.addMouseWheelListener((MouseWheelListener) listener);
        }
        else if (listener instanceof PaintListener) {
            this.canvas.addPaintListener((PaintListener) listener);
        }
        else if (listener instanceof TraverseListener) {
            this.canvas.addTraverseListener((TraverseListener) listener);
        }
    }
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:47,代码来源:ChartComposite.java


示例10: getHelpListener

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
public HelpListener getHelpListener() {
	return fOpenAction.getHelpListener();
}
 
开发者ID:angelozerr,项目名称:jsbuild-eclipse,代码行数:4,代码来源:OpenAndExpand.java


示例11: setHelpListener

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
public void setHelpListener(HelpListener listener) {
	fOpenAction.setHelpListener(listener);
}
 
开发者ID:angelozerr,项目名称:jsbuild-eclipse,代码行数:4,代码来源:OpenAndExpand.java


示例12: getHelpListener

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
@Override
public HelpListener getHelpListener() {
    // TODO Auto-generated method stub
    return null;
}
 
开发者ID:anb0s,项目名称:EasyShell,代码行数:6,代码来源:Action.java


示例13: setHelpListener

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
@Override
public void setHelpListener(HelpListener listener) {
    // TODO Auto-generated method stub

}
 
开发者ID:anb0s,项目名称:EasyShell,代码行数:6,代码来源:Action.java


示例14: addHelpListener

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
/**
 * Substitute the original listener with one adapted to this type of element. This help will open a 
 * browser window when used the key F1 on the element, the link is taken from the properties of this element
 */
@Override
public void addHelpListener(HelpListener listener) {
	HelpProvider contextHelp = new HelpProvider(menuProvider.getMenu());
	lastListener = contextHelp.setHelp(control.getData(HelpSystem.HELP_KEY).toString());
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:10,代码来源:ComboButton.java


示例15: getHelpListener

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
@Override
public HelpListener getHelpListener() {
	return fOpenAction.getHelpListener();
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:5,代码来源:OpenAndExpand.java


示例16: setHelpListener

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
@Override
public void setHelpListener(HelpListener listener) {
	fOpenAction.setHelpListener(listener);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:5,代码来源:OpenAndExpand.java


示例17: addHelpListener

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
@Override
public void addHelpListener(HelpListener listener) {
	fViewer.addHelpListener(listener);
	fListenerList.add(listener);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:6,代码来源:PackageViewerWrapper.java


示例18: removeHelpListener

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
@Override
public void removeHelpListener(HelpListener listener) {
	fListenerList.remove(listener);
	fViewer.removeHelpListener(listener);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:6,代码来源:PackageViewerWrapper.java


示例19: addSWTListener

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
/**
 * Hook an SWT listener on the canvas where the chart is drawn.
 * The purpose of this method is to allow some degree of customization.
 *
 * @param listener The SWT listener to attach to the canvas.
 */
public void addSWTListener(EventListener listener) {
    if (listener instanceof ControlListener) {
        this.canvas.addControlListener((ControlListener) listener);
    }
    else if (listener instanceof DisposeListener) {
        this.canvas.addDisposeListener((DisposeListener) listener);
    }
    else if (listener instanceof DragDetectListener) {
        this.canvas.addDragDetectListener((DragDetectListener) listener);
    }
    else if (listener instanceof FocusListener) {
        this.canvas.addFocusListener((FocusListener) listener);
    }
    else if (listener instanceof HelpListener) {
        this.canvas.addHelpListener((HelpListener) listener);
    }
    else if (listener instanceof KeyListener) {
        this.canvas.addKeyListener((KeyListener) listener);
    }
    else if (listener instanceof MenuDetectListener) {
        this.canvas.addMenuDetectListener((MenuDetectListener) listener);
    }
    else if (listener instanceof MouseListener) {
        this.canvas.addMouseListener((MouseListener) listener);
    }
    else if (listener instanceof MouseMoveListener) {
        this.canvas.addMouseMoveListener((MouseMoveListener) listener);
    }
    else if (listener instanceof MouseTrackListener) {
        this.canvas.addMouseTrackListener((MouseTrackListener) listener);
    }
    else if (listener instanceof MouseWheelListener) {
        this.canvas.addMouseWheelListener((MouseWheelListener) listener);
    }
    else if (listener instanceof PaintListener) {
        this.canvas.addPaintListener((PaintListener) listener);
    }
    else if (listener instanceof TraverseListener) {
        this.canvas.addTraverseListener((TraverseListener) listener);
    }
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:48,代码来源:ChartComposite.java


示例20: getHelpListener

import org.eclipse.swt.events.HelpListener; //导入依赖的package包/类
public HelpListener getHelpListener() {
	return helpListener;
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:4,代码来源:Action.java



注:本文中的org.eclipse.swt.events.HelpListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HexStringSplit类代码示例发布时间:2022-05-21
下一篇:
Java PGPSignatureGenerator类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap