當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。