org.eclipse.swt.widgets.Shell.removeShellListener()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(9.6k)|赞(0)|评价(0)|浏览(86)

本文整理了Java中org.eclipse.swt.widgets.Shell.removeShellListener()方法的一些代码示例,展示了Shell.removeShellListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Shell.removeShellListener()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Shell
类名称:Shell
方法名:removeShellListener

Shell.removeShellListener介绍

[英]Removes the listener from the collection of listeners who will be notified when operations are performed on the receiver.
[中]将侦听器从侦听器集合中移除,当在接收器上执行操作时,将通知这些侦听器。

代码示例

代码示例来源:origin: org.eclipse/org.eclipse.ui.workbench.texteditor

/**
 * Sets the parent shell of this dialog to be the given shell.
 *
 * @param shell the new parent shell
 */
public void setParentShell(Shell shell) {
  if (shell != fParentShell) {
    if (fParentShell != null)
      fParentShell.removeShellListener(fActivationListener);
    fParentShell= shell;
    fParentShell.addShellListener(fActivationListener);
  }
  fActiveShell= shell;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench.texteditor

/**
 * Sets the parent shell of this dialog to be the given shell.
 *
 * @param shell the new parent shell
 */
@Override
public void setParentShell(Shell shell) {
  if (shell != fParentShell) {
    if (fParentShell != null)
      fParentShell.removeShellListener(fActivationListener);
    fParentShell= shell;
    fParentShell.addShellListener(fActivationListener);
  }
  fActiveShell= shell;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor

/**
 * Sets the parent shell of this dialog to be the given shell.
 *
 * @param shell the new parent shell
 */
@Override
public void setParentShell(Shell shell) {
  if (shell != fParentShell) {
    if (fParentShell != null)
      fParentShell.removeShellListener(fActivationListener);
    fParentShell= shell;
    fParentShell.addShellListener(fActivationListener);
  }
  fActiveShell= shell;
}

代码示例来源:origin: org.eclipse.e4.ui.css/swt

public void dispose() {
  super.dispose();
  
  if (!dynamicEnabled) return; 
  
  Shell shell = getShell();
  if (!shell.isDisposed()) {
    shell.removeShellListener(shellListener);
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.css.swt

@Override
public void dispose() {
  super.dispose();
  if (!dynamicEnabled) {
    return;
  }
  Shell shell = getShell();
  if (!shell.isDisposed()) {
    shell.removeShellListener(shellListener);
  }
}

代码示例来源:origin: org.eclipse/org.eclipse.jdt.debug.ui

public void shellActivated(ShellEvent e) {
  Shell shell = (Shell)e.getSource();
  shell.setText(MessageFormat.format(PropertyPageMessages.JavaBreakpointPage_10, new String[]{getName(getBreakpoint())})); 
  shell.removeShellListener(this);
}
public void shellClosed(ShellEvent e) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.ant.ui

@Override
  public void shellActivated(ShellEvent e) {
    if (!table.isDisposed()) {
      int tableWidth = table.getSize().x;
      if (tableWidth > 0) {
        int c1 = tableWidth / 3;
        column1.setWidth(c1);
        column2.setWidth(tableWidth - c1);
      }
      getShell().removeShellListener(this);
    }
  }
});

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Deactivates this tracker's restart function and enables the information control
 * manager. Does not have any effect if the tracker is still executing the start function (i.e.
 * computing the information to be presented.
 */
protected void deactivate() {
  if (fIsComputing)
    return;
  fIsInRestartMode= false;
  if (fSubjectControl != null && !fSubjectControl.isDisposed()) {
    fSubjectControl.getShell().removeShellListener(this);
  }
  if (fAreaControl != null && !fAreaControl.isDisposed()) {
    fAreaControl.removeMouseMoveListener(this);
  }
}

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.ui

/**
 * @see org.eclipse.ui.IPartListener#partClosed(IWorkbenchPart)
 */
public void partClosed(IWorkbenchPart part) {
  if (part == fPart)
    part.getSite().getPage().removePartListener(this);
  if (getShell() != null)
    getShell().removeShellListener(this);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Deactivates this tracker's restart function and enables the information control
 * manager. Does not have any effect if the tracker is still executing the start function (i.e.
 * computing the information to be presented.
 */
protected void deactivate() {
  if (fIsComputing)
    return;
  fIsInRestartMode= false;
  if (fSubjectControl != null && !fSubjectControl.isDisposed()) {
    fSubjectControl.getShell().removeShellListener(this);
  }
  if (fAreaControl != null && !fAreaControl.isDisposed()) {
    fAreaControl.removeMouseMoveListener(this);
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Stops this mouse tracker. Removes itself  as mouse track, mouse move, and
 * shell listener from the subject control.
 */
public void stop() {
  if (fSubjectControl != null && !fSubjectControl.isDisposed()) {
    fSubjectControl.removeMouseTrackListener(this);
    fSubjectControl.getShell().removeShellListener(this);
  }
  if (fAreaControl != null && !fAreaControl.isDisposed()) {
    fAreaControl.removeMouseMoveListener(this);
  }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Uninstalls this closer if previously installed.
 */
public void uninstall() {
  fContentAssistant= null;
  if (Helper2.okToUse(fShell))
    fShell.removeShellListener(this);
  fShell= null;
  if (Helper2.okToUse(fScrollbar))
    fScrollbar.removeSelectionListener(this);
  if (Helper2.okToUse(fTable))
    fTable.removeFocusListener(this);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Uninstalls this closer if previously installed.
 */
public void uninstall() {
  fContentAssistant= null;
  if (Helper2.okToUse(fShell))
    fShell.removeShellListener(this);
  fShell= null;
  if (Helper2.okToUse(fScrollbar))
    fScrollbar.removeSelectionListener(this);
  if (Helper2.okToUse(fTable))
    fTable.removeFocusListener(this);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Stops this mouse tracker. Removes itself  as mouse track, mouse move, and
 * shell listener from the subject control.
 */
public void stop() {
  if (fSubjectControl != null && !fSubjectControl.isDisposed()) {
    fSubjectControl.removeMouseTrackListener(this);
    fSubjectControl.getShell().removeShellListener(this);
  }
  if (fAreaControl != null && !fAreaControl.isDisposed()) {
    fAreaControl.removeMouseMoveListener(this);
  }
}

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

public void uninstall() {
  IWorkbenchPartSite site= fTextEditor.getSite();
  IWorkbenchWindow window= site.getWorkbenchWindow();
  window.getPartService().removePartListener(fPartListener);
  fPartListener= null;
  Shell shell= window.getShell();
  if (shell != null && !shell.isDisposed())
    shell.removeShellListener(fActivationListener);
  fActivationListener= null;
  JavaCore.removeElementChangedListener(fJavaElementChangedListener);
  fJavaElementChangedListener= null;
  IWorkspace workspace= JavaPlugin.getWorkspace();
  workspace.removeResourceChangeListener(fResourceChangeListener);
  fResourceChangeListener= null;
  
  JavaPlugin.getDefault().getCombinedPreferenceStore().removePropertyChangeListener(fPropertyChangeListener);
  fPropertyChangeListener= null;
  super.uninstall();
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public void uninstall() {
  IWorkbenchPartSite site= fTextEditor.getSite();
  IWorkbenchWindow window= site.getWorkbenchWindow();
  window.getPartService().removePartListener(fPartListener);
  fPartListener= null;
  Shell shell= window.getShell();
  if (shell != null && !shell.isDisposed())
    shell.removeShellListener(fActivationListener);
  fActivationListener= null;
  JavaCore.removeElementChangedListener(fJavaElementChangedListener);
  fJavaElementChangedListener= null;
  IWorkspace workspace= JavaPlugin.getWorkspace();
  workspace.removeResourceChangeListener(fResourceChangeListener);
  fResourceChangeListener= null;
  JavaPlugin.getDefault().getCombinedPreferenceStore().removePropertyChangeListener(fPropertyChangeListener);
  fPropertyChangeListener= null;
  super.uninstall();
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public void stop() {
  if (!fIsActive)
    return;
  fIsActive= false;
  if (fSubjectControl != null && !fSubjectControl.isDisposed()) {
    fSubjectControl.removeMouseListener(this);
    fSubjectControl.removeMouseMoveListener(this);
    fSubjectControl.removeMouseTrackListener(this);
    fSubjectControl.getShell().removeShellListener(this);
    fSubjectControl.removeControlListener(this);
    fSubjectControl.removeKeyListener(this);
  }
  if (fDisplay != null && !fDisplay.isDisposed() && fHasWheelFilter) {
    fDisplay.removeFilter(SWT.MouseHorizontalWheel, this);
    fDisplay.removeFilter(SWT.MouseVerticalWheel, this);
  }
  fHasWheelFilter= false;
  fDisplay= null;
}

代码示例来源:origin: org.eclipse/org.eclipse.jst.pagedesigner

public void dispose() {
  deletePreviewFiles();
  disconnectDesignPage();
  IWorkbenchWindow window = getSite().getWorkbenchWindow();
  window.getPartService().removePartListener(_partListener);
  window.getShell().removeShellListener(_partListener);
  getSite().getPage().removePartListener(_partListener);
  if (_textEditor != null) {
    _textEditor.removePropertyListener(this);
  }
  // moved to last when added window ... seems like
  // we'd be in danger of losing some data, like site,
  // or something.
  super.dispose();
  
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Uninstalls this closer if previously installed.
 */
public void uninstall() {
  fContentAssistant= null;
  if (Helper.okToUse(fShell))
    fShell.removeShellListener(this);
  fShell= null;
  if (Helper.okToUse(fScrollbar))
    fScrollbar.removeSelectionListener(this);
  if (Helper.okToUse(fTable))
    fTable.removeFocusListener(this);
  if (fDisplay != null && ! fDisplay.isDisposed()) {
    fDisplay.removeFilter(SWT.Activate, this);
    fDisplay.removeFilter(SWT.MouseVerticalWheel, this);
    fDisplay.removeFilter(SWT.Deactivate, this);
    fDisplay.removeFilter(SWT.MouseUp, this);
  }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
public void stop() {
  if (!fIsActive)
    return;
  fIsActive= false;
  if (fSubjectControl != null && !fSubjectControl.isDisposed()) {
    fSubjectControl.removeMouseListener(this);
    fSubjectControl.removeMouseMoveListener(this);
    fSubjectControl.removeMouseTrackListener(this);
    fSubjectControl.getShell().removeShellListener(this);
    fSubjectControl.removeControlListener(this);
    fSubjectControl.removeKeyListener(this);
  }
  if (fDisplay != null && !fDisplay.isDisposed() && fHasWheelFilter) {
    fDisplay.removeFilter(SWT.MouseHorizontalWheel, this);
    fDisplay.removeFilter(SWT.MouseVerticalWheel, this);
  }
  fHasWheelFilter= false;
  fDisplay= null;
}

相关文章

微信公众号

最新文章

更多

Shell类方法