本文整理汇总了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);
}
}
}
示例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();
}
}
示例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");
}
}
}
}
示例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();
}
}
示例5: windowLostFocus
import java.awt.event.WindowEvent; //导入方法依赖的package包/类
@Override
public void windowLostFocus(WindowEvent e) {
if (contentWindow != null && e.getOppositeWindow() == null) {
shutdown();
}
}
示例6: windowLostFocus
import java.awt.event.WindowEvent; //导入方法依赖的package包/类
public void windowLostFocus(WindowEvent e) {
if (contentWindow != null && e.getOppositeWindow() == null) {
shutdown();
}
}
示例7: windowLostFocus
import java.awt.event.WindowEvent; //导入方法依赖的package包/类
@Override
public void windowLostFocus(WindowEvent e) {
if (actionsWindow != null && e.getOppositeWindow() == null) {
shutdown();
}
}