java.awt.Window.removeWindowListener()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(181)

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

Window.removeWindowListener介绍

[英]Removes the specified window listener so that it no longer receives window events from this window. If l is null, no exception is thrown and no action is performed.
[中]删除指定的窗口侦听器,使其不再从此窗口接收窗口事件。如果l为null,则不会引发异常,也不会执行任何操作。

代码示例

代码示例来源:origin: bobbylight/RSyntaxTextArea

private void uninstallAndHide() {
  Window parent = (Window)getParent();
  parent.removeWindowFocusListener(this);
  parent.removeWindowListener(this);
  parent.removeComponentListener(this);
  removeWindowFocusListener(this);
  setVisible(false);
  dispose();
}

代码示例来源:origin: bobbylight/RSyntaxTextArea

private void uninstallAndHide() {
  Window parent = (Window)getParent();
  parent.removeWindowFocusListener(this);
  parent.removeWindowListener(this);
  parent.removeComponentListener(this);
  removeWindowFocusListener(this);
  setVisible(false);
  dispose();
}

代码示例来源:origin: xyz.cofe/gui.swing

@Override
public void close() throws IOException {
  if(cmpt!=null && l!=null ){
    cmpt.removeWindowListener(l);
    cmpt = null;
    l = null;
  }
}};

代码示例来源:origin: xyz.cofe/gui.swing

@Override
public void close() throws IOException {
  if(cmpt!=null && l!=null ){
    cmpt.removeWindowListener(l);
    cmpt = null;
    l = null;
  }
}};

代码示例来源:origin: triplea-game/triplea

private void detachWindowListener() {
 if (window != null) {
  window.removeWindowListener(windowDeactivationObserver);
 }
}

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

public final boolean removeClosingListener() {
  synchronized(closingListenerLock) {
    if(null != listenTo) {
      listenTo.removeWindowListener(windowClosingAdapter);
      listenTo = null;
      return true;
    }
  }
  return false;
}

代码示例来源:origin: khuxtable/seaglass

public void ancestorRemoved(AncestorEvent event) {
  Window window = weakReference.get() == null ? null : SwingUtilities.getWindowAncestor(weakReference.get());
  if (window != null) {
    window.removeWindowListener(windowListener);
  }
}

代码示例来源:origin: net.java.dev.jna/jna-platform

@Override
  public void windowClosed(WindowEvent e) {
    e.getWindow().removeWindowListener(this);
  }
});

代码示例来源:origin: net.java.dev.jna/platform

public void windowOpened(WindowEvent e) {
  e.getWindow().removeWindowListener(this);
  action.run();
}
public void windowClosed(WindowEvent e) {

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf

/** Uninstalls the necessary listeners. */
private void uninstallListeners() {
  if (window != null) {
    window.removeWindowListener(windowListener);
    window.removePropertyChangeListener(propertyChangeListener);
  }
}

代码示例来源:origin: net.java.dev.jna/jna-platform

@Override
public void windowOpened(WindowEvent e) {
  e.getWindow().removeWindowListener(this);
  action.run();
}
@Override

代码示例来源:origin: net.sf.tinylaf/tinylaf

public void windowClosed(WindowEvent e) {
    Window w = e.getWindow();
    
    w.removeWindowListener(activationListener);
    DIALOGS.remove(w);
    if(DEBUG_DIALOGS) System.out.println("windowClosed - " + DIALOGS.size() + " dialogs");
  }
};

代码示例来源:origin: net.sf.tinylaf/tinylaf

/**
 * Uninstalls the necessary listeners.
 */
private void uninstallListeners() {
  if(window != null) {
    window.removeWindowListener(windowListener);
    window.removePropertyChangeListener(propertyChangeListener);
    window.removeComponentListener(windowMoveListener);
  }
}

代码示例来源:origin: net.java.dev.jna/platform

public void removeNotify() {
  Toolkit.getDefaultToolkit().removeAWTEventListener(listener);
  Window w = SwingUtilities.getWindowAncestor(this);
  w.removeComponentListener(listener);
  w.removeWindowListener(listener);
  super.removeNotify();
}

代码示例来源:origin: org.netbeans.api/org-openide-explorer

public void removeNotify() {
  // #57560: properties should always save changes
  Container top = getTopLevelAncestor();
  if (top instanceof Window && parentListener != null) {
    ((Window) top).removeWindowListener(parentListener);
    parentListener = null;
  }
  super.removeNotify();
}

代码示例来源:origin: com.jidesoft/jide-oss

@Override
  public void windowDeactivated(WindowEvent e) {
    stopDragging();
    if (e.getWindow() != null) {
      e.getWindow().removeWindowListener(_windowDeactivatedListener);
    }
  }
};

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

/**
 * Overriden to unregister on the window
 */
protected void uninstallListeners() {
 m_Window.removePropertyChangeListener(propertyChangeListener);
 if (m_Window instanceof Window.FrameWindow && m_WindowListener != null) {
  ((Window.FrameWindow)m_Window).getMainFrame().removeWindowListener(
   m_WindowListener);
 }
}

代码示例来源:origin: net.java.dev.jna/jna-platform

@Override
public void removeNotify() {
  Toolkit.getDefaultToolkit().removeAWTEventListener(listener);
  Window w = SwingUtilities.getWindowAncestor(this);
  w.removeComponentListener(listener);
  w.removeWindowListener(listener);
  super.removeNotify();
}

代码示例来源:origin: abbot/abbot

public void windowClosed(WindowEvent e) {
  e.getWindow().removeWindowListener(this);
  e.getWindow().removeComponentListener(this);
  
  // Remove self when we tidy up
  watchers.remove(e.getWindow());
}
public void componentResized(ComponentEvent e) { }

代码示例来源:origin: com.fifesoft/rsyntaxtextarea

private void uninstallAndHide() {
  Window parent = (Window)getParent();
  parent.removeWindowFocusListener(this);
  parent.removeWindowListener(this);
  parent.removeComponentListener(this);
  removeWindowFocusListener(this);
  setVisible(false);
  dispose();
}

相关文章

Window类方法