Examples of HelpListener


Examples of org.eclipse.swt.events.HelpListener

        boolean expanded = viewer.getExpandedState(singleSelection);
        viewer.setExpandedState(singleSelection, !expanded);
      }
    });
    //Register help listener on the tree to use context sensitive help
    viewer.getControl().addHelpListener(new HelpListener() {
      public void helpRequested(HelpEvent event) {
        if (currentPage == null) { // no current page? open dialog's help
          openDialogHelp();
          return;
        }
View Full Code Here

Examples of org.eclipse.swt.events.HelpListener

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

Examples of org.eclipse.swt.events.HelpListener

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

Examples of org.eclipse.swt.events.HelpListener

  public void setHelp(IAction action, final Object[] contexts) {
    for (int i = 0; i < contexts.length; i++) {
      Assert.isTrue(contexts[i] instanceof String
          || contexts[i] instanceof IContext);
    }
    action.setHelpListener(new HelpListener() {
      public void helpRequested(HelpEvent event) {
        if (contexts != null && contexts.length > 0
            && getHelpUI() != null) {
          // determine the context
          IContext context = null;
View Full Code Here

Examples of org.eclipse.swt.events.HelpListener

   *            when F1 help is invoked
   * @deprecated context computers are no longer supported, clients should
   *             implement their own help listener
   */
  public void setHelp(IAction action, final IContextComputer computer) {
    action.setHelpListener(new HelpListener() {
      public void helpRequested(HelpEvent event) {
        Object[] helpContexts = computer.computeContexts(event);
        if (helpContexts != null && helpContexts.length > 0
            && getHelpUI() != null) {
          // determine the context
View Full Code Here

Examples of org.eclipse.swt.events.HelpListener

     */
  public HelpListener createHelpListener(ICommand command) {
    // TODO Need a help ID from the context
    // final String contextId = command.getHelpId();
    final String contextId = ""; //$NON-NLS-1$
    return new HelpListener() {
      public void helpRequested(HelpEvent event) {
        if (getHelpUI() != null) {
          IContext context = HelpSystem.getContext(contextId);
          if (context != null) {
            Point point = computePopUpLocation(event.widget
View Full Code Here

Examples of org.eclipse.swt.events.HelpListener

   *
   * @see org.eclipse.ui.help.IWorkbenchHelpSystem#setHelp(org.eclipse.jface.action.IAction,
   *      java.lang.String)
   */
  public void setHelp(final IAction action, final String contextId) {
    action.setHelpListener(new HelpListener() {
      public void helpRequested(HelpEvent event) {
        if (getHelpUI() != null) {
          IContext context = HelpSystem.getContext(contextId);
          if (context != null) {
            Point point = computePopUpLocation(event.widget
View Full Code Here

Examples of org.eclipse.swt.events.HelpListener

        boolean expanded = viewer.getExpandedState(singleSelection);
        viewer.setExpandedState(singleSelection, !expanded);
      }
    });
    //Register help listener on the tree to use context sensitive help
    viewer.getControl().addHelpListener(new HelpListener() {
      public void helpRequested(HelpEvent event) {
        // call perform help on the current page
        if (currentPage != null) {
          currentPage.performHelp();
        }
View Full Code Here

Examples of org.eclipse.swt.events.HelpListener

   * (non-Javadoc) Method declared on Window.
   */
  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();
        }
View Full Code Here

Examples of org.eclipse.swt.events.HelpListener

   * Installs the help listener.
   *
   * @since 2.1
   */
  private void installHelpListener() {
    super.setHelpListener(new HelpListener() {
      public void helpRequested(HelpEvent e) {
        HelpListener listener= null;
        if (fAction != null) {
          // if we have a handler, see if it has a help listener
          listener= fAction.getHelpListener();
          if (listener == null)
            // use our own help listener
            listener= fLocalHelpListener;
        }
        if (listener != null)
          // pass on the event
          listener.helpRequested(e);
      }
    });
  }
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.