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

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

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

Window.addWindowStateListener介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

System.out.println("system tray not supported");
addWindowStateListener(new WindowStateListener() {
  public void windowStateChanged(WindowEvent e) {
    if(e.getNewState()==ICONIFIED){

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

public static Closeable onWindowStateChanged( final Window component, final Reciver<WindowEvent> consumer ){
  if( component==null )throw new IllegalArgumentException( "component==null" );
  if( consumer==null )throw new IllegalArgumentException( "consumer==null" );
  
  final WindowStateListener ml = new WindowStateListener() {
    @Override
    public void windowStateChanged(WindowEvent e) {
      consumer.recive(e);
    }
  };
  
  component.addWindowStateListener(ml);
  
  Closeable cl = new Closeable() {
    Window cmpt = component;
    WindowStateListener l = ml;
    @Override
    public void close() throws IOException {
      if(cmpt!=null && l!=null ){
        cmpt.removeWindowStateListener(l);
        cmpt = null;
        l = null;
      }
    }};
  
  return cl;
}
//</editor-fold>

代码示例来源:origin: stackoverflow.com

w.addWindowStateListener(this);

代码示例来源:origin: org.xworker/xworker_core

public static void createWindowStateListeners(ActionContext actionContext){
  Thing self = (Thing) actionContext.get("self");
  Window parent = (Window) actionContext.get("parent");
  
  for(Thing child : self.getChilds()){
    WindowStateListener l = (WindowStateListener) child.doAction("create", actionContext);
    if(l != null){
      parent.addWindowStateListener(l);
    }
  }
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@Override
public void registerEvents() {
  super.registerEvents();
  if (mHandlee != null) {
    if (mHandlee instanceof Window) {
      ((Window) mHandlee).addWindowListener(this);
      ((Window) mHandlee).addWindowStateListener(this);
    }
    if (mHandlee instanceof JInternalFrame) {
      ((JInternalFrame) mHandlee).addInternalFrameListener(this);
      ((JInternalFrame) mHandlee).addPropertyChangeListener(this);
    }
  }
}

代码示例来源:origin: stackoverflow.com

frame.getContentPane().add(outerPanel, BorderLayout.CENTER);
frame.addWindowStateListener(new WindowStateListener() {
  @Override
  public void windowStateChanged(WindowEvent event) {

代码示例来源:origin: stackoverflow.com

frame.addWindowStateListener(new WindowAdapter() {
  @Override
  public void windowStateChanged(WindowEvent we) {

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-notifications

ownerWindow = SwingUtilities.getWindowAncestor(owner);
if( null != ownerWindow ) {
  ownerWindow.addWindowStateListener(windowListener);

代码示例来源:origin: stackoverflow.com

this.addWindowListener(this);
this.addWindowFocusListener(this);
this.addWindowStateListener(this);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setLocationRelativeTo(null);

代码示例来源:origin: stackoverflow.com

frame.addWindowStateListener(new WindowStateListener() {

代码示例来源:origin: stackoverflow.com

System.out.println("system tray not supported");
addWindowStateListener(new WindowStateListener() {
  public void windowStateChanged(WindowEvent e) {
    if (e.getNewState() == ICONIFIED) {

代码示例来源:origin: stackoverflow.com

frame.addWindowStateListener(h);
frame.addWindowListener(h);

代码示例来源:origin: stackoverflow.com

System.out.println("system tray not supported");
addWindowStateListener(new WindowStateListener() {
  public void windowStateChanged(WindowEvent e) {
    if(e.getNewState()==ICONIFIED){

代码示例来源:origin: stackoverflow.com

final IconizeWindowState state= new IconizeWindowState();
frame.addWindowStateListener(new WindowAdapter()

代码示例来源:origin: gurkenlabs/litiengine

private void initializeWinowEventListeners(Window window) {
 window.addWindowStateListener(e -> {
  if (e.getNewState() == Frame.ICONIFIED) {
   Game.renderLoop().setMaxFps(ICONIFIED_MAX_FPS);

相关文章

Window类方法