Java 类org.eclipse.swt.events.HelpListener 实例源码

项目:PDFReporter-Studio    文件:HelpSystem.java   
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);
        }
    });
}
项目:gef-gwt    文件:Viewer.java   
/**
 * 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;
        }
    }
}
项目:gef-gwt    文件:RetargetAction.java   
/**
 * 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);
            }
        }
    });
}
项目:geoprism    文件:LocalizedWizardDialog.java   
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();
      }
    }
  });
}
项目:PDFReporter-Studio    文件:ComboButton.java   
@Override
public void removeHelpListener(HelpListener listener) {
    if (lastListener != null){
        super.removeHelpListener(lastListener);
        lastListener = null;
    }
}
项目:PDFReporter-Studio    文件:HelpProvider.java   
/**
 * 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;
}
项目:p2-installer    文件:WizardDialog.java   
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();
            }
        }
    });
}
项目:translationstudio8    文件:TSWizardDialog.java   
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();
            }
        }
    });
}
项目:gef-gwt    文件:WizardDialog.java   
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();
            }
        }
    });
}
项目:gef-gwt    文件:Viewer.java   
/**
 * 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;
        }
    }
}
项目:tmxeditor8    文件:TSWizardDialog.java   
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();
            }
        }
    });
}
项目:ccu-historian    文件:ChartComposite.java   
/**
     * 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);
        }
    }
项目:aya-lang    文件:ChartComposite.java   
/**
     * 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);
        }
    }
项目:jsbuild-eclipse    文件:OpenAndExpand.java   
public HelpListener getHelpListener() {
    return fOpenAction.getHelpListener();
}
项目:jsbuild-eclipse    文件:OpenAndExpand.java   
public void setHelpListener(HelpListener listener) {
    fOpenAction.setHelpListener(listener);
}
项目:EasyShell    文件:Action.java   
@Override
public HelpListener getHelpListener() {
    // TODO Auto-generated method stub
    return null;
}
项目:EasyShell    文件:Action.java   
@Override
public void setHelpListener(HelpListener listener) {
    // TODO Auto-generated method stub

}
项目:PDFReporter-Studio    文件:ComboButton.java   
/**
 * 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());
}
项目:Eclipse-Postfix-Code-Completion    文件:OpenAndExpand.java   
@Override
public HelpListener getHelpListener() {
    return fOpenAction.getHelpListener();
}
项目:Eclipse-Postfix-Code-Completion    文件:OpenAndExpand.java   
@Override
public void setHelpListener(HelpListener listener) {
    fOpenAction.setHelpListener(listener);
}
项目:Eclipse-Postfix-Code-Completion    文件:PackageViewerWrapper.java   
@Override
public void addHelpListener(HelpListener listener) {
    fViewer.addHelpListener(listener);
    fListenerList.add(listener);
}
项目:Eclipse-Postfix-Code-Completion    文件:PackageViewerWrapper.java   
@Override
public void removeHelpListener(HelpListener listener) {
    fListenerList.remove(listener);
    fViewer.removeHelpListener(listener);
}
项目:ECG-Viewer    文件:ChartComposite.java   
/**
     * 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);
        }
    }
项目:astor    文件:ChartComposite.java   
/**
 * 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);
    }
}
项目:gef-gwt    文件:Action.java   
public HelpListener getHelpListener() {
    return helpListener;
}
项目:gef-gwt    文件:Action.java   
public void setHelpListener(HelpListener listener) {
    helpListener = listener;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:OpenAndExpand.java   
@Override
public HelpListener getHelpListener() {
    return fOpenAction.getHelpListener();
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:OpenAndExpand.java   
@Override
public void setHelpListener(HelpListener listener) {
    fOpenAction.setHelpListener(listener);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:PackageViewerWrapper.java   
@Override
public void addHelpListener(HelpListener listener) {
    fViewer.addHelpListener(listener);
    fListenerList.add(listener);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:PackageViewerWrapper.java   
@Override
public void removeHelpListener(HelpListener listener) {
    fListenerList.remove(listener);
    fViewer.removeHelpListener(listener);
}
项目:group-five    文件:ChartComposite.java   
/**
     * 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);
        }
    }
项目:e4macs    文件:KillRingListeners.java   
public HelpListener getHelpListener() {
    return action.getHelpListener();
}
项目:e4macs    文件:KillRingListeners.java   
public void setHelpListener(HelpListener listener) {
    action.setHelpListener(listener);
}
项目:Pydev    文件:ScriptConsoleViewerWrapper.java   
public void addHelpListener(HelpListener listener) {
    viewer.addHelpListener(listener);
}
项目:Pydev    文件:ScriptConsoleViewerWrapper.java   
public void removeHelpListener(HelpListener listener) {
    viewer.removeHelpListener(listener);
}
项目:buffer_bci    文件:ChartComposite.java   
/**
     * 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);
        }
    }
项目:proyecto-teoria-control-utn-frro    文件:ChartComposite.java   
/**
     * 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);
        }
    }
项目:Memetic-Algorithm-for-TSP    文件:ChartComposite.java   
/**
     * 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);
        }
    }
项目:elexis-3-base    文件:PhMRpActions.java   
@Override
public HelpListener getHelpListener() {
    // TODO Auto-generated method stub
    return null;
}
项目:elexis-3-base    文件:PhMRpActions.java   
@Override
public void setHelpListener(HelpListener listener) {
    // TODO Auto-generated method stub

}