当前位置: 首页>>代码示例>>Java>>正文


Java WindowEvent.getOppositeWindow方法代码示例

本文整理汇总了Java中java.awt.event.WindowEvent.getOppositeWindow方法的典型用法代码示例。如果您正苦于以下问题:Java WindowEvent.getOppositeWindow方法的具体用法?Java WindowEvent.getOppositeWindow怎么用?Java WindowEvent.getOppositeWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.awt.event.WindowEvent的用法示例。


在下文中一共展示了WindowEvent.getOppositeWindow方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: windowDeactivated

import java.awt.event.WindowEvent; //导入方法依赖的package包/类
@Override
public void windowDeactivated(WindowEvent e) {
    // proceed only if switching to external application
    if (e.getOppositeWindow() == null) {
        synchronized (rp) {
            if (task != null) {
                task.cancel();
            } else {
                task = rp.create(this);
            }
            LOG.fine("Window deactivated, preparing refresh task");
        }
        if (UILOG.isLoggable(Level.FINE)) {
            LogRecord r = new LogRecord(Level.FINE, "LOG_WINDOW_DEACTIVATED"); // NOI18N
            r.setResourceBundleName("org.netbeans.core.ui.warmup.Bundle"); // NOI18N
            r.setResourceBundle(NbBundle.getBundle(MenuWarmUpTask.class)); // NOI18N
            r.setLoggerName(UILOG.getName());
            UILOG.log(r);
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:MenuWarmUpTask.java

示例2: windowLostFocus

import java.awt.event.WindowEvent; //导入方法依赖的package包/类
public void windowLostFocus(WindowEvent e) {
    //remove the switcher when the main window is deactivated, 
    //e.g. user pressed Ctrl+Esc on MS Windows which opens the Start menu
    if (cancelOnFocusLost && e.getOppositeWindow() != popup) {
        cancelSwitching();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:KeyboardPopupSwitcher.java

示例3: windowActivated

import java.awt.event.WindowEvent; //导入方法依赖的package包/类
@Override
public void windowActivated(WindowEvent e) {
    // proceed only if switching from external application
    if (e.getOppositeWindow() == null) {
        synchronized (rp) {
            if (task != null) {
                LOG.fine("Scheduling task after activation");
                task.schedule(1500);
                task = null;
            } else {
                LOG.fine("Activation without prepared refresh task");
            }
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:MenuWarmUpTask.java

示例4: restoreFocus

import java.awt.event.WindowEvent; //导入方法依赖的package包/类
private void restoreFocus(WindowEvent we) {
    Window realOppositeWindow = this.realOppositeWindowWR.get();
    if (realOppositeWindow != null
        && restoreFocus(realOppositeWindow, null, false))
    {
        // do nothing, everything is done in restoreFocus()
    } else if (we.getOppositeWindow() != null &&
               restoreFocus(we.getOppositeWindow(), null, false))
    {
        // do nothing, everything is done in restoreFocus()
    } else {
        clearGlobalFocusOwnerPriv();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:DefaultKeyboardFocusManager.java

示例5: windowLostFocus

import java.awt.event.WindowEvent; //导入方法依赖的package包/类
@Override
public void windowLostFocus(WindowEvent e) {
    if (contentWindow != null && e.getOppositeWindow() == null) {
        shutdown();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:TooltipWindow.java

示例6: windowLostFocus

import java.awt.event.WindowEvent; //导入方法依赖的package包/类
public void windowLostFocus(WindowEvent e) {
    if (contentWindow != null && e.getOppositeWindow() == null) {
        shutdown();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:TooltipWindow.java

示例7: windowLostFocus

import java.awt.event.WindowEvent; //导入方法依赖的package包/类
@Override
public void windowLostFocus(WindowEvent e) {
    if (actionsWindow != null && e.getOppositeWindow() == null) {
        shutdown();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:DiffActionTooltipWindow.java


注:本文中的java.awt.event.WindowEvent.getOppositeWindow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。