當前位置: 首頁>>代碼示例>>Java>>正文


Java WindowEvent.getSource方法代碼示例

本文整理匯總了Java中java.awt.event.WindowEvent.getSource方法的典型用法代碼示例。如果您正苦於以下問題:Java WindowEvent.getSource方法的具體用法?Java WindowEvent.getSource怎麽用?Java WindowEvent.getSource使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.awt.event.WindowEvent的用法示例。


在下文中一共展示了WindowEvent.getSource方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: windowOpened

import java.awt.event.WindowEvent; //導入方法依賴的package包/類
@Override
public final void windowOpened(WindowEvent e) {
    dlg = (JDialog) e.getSource();
    if (!isDispatchThread) {
        createTask();
    }
    RunOffEDTImpl.CancellableFutureTask f;
    synchronized(this) {
         f = future;
    }
    //Runnable could theoretically complete before we have set the
    //handle, allowing
    //the callee to see a CancellableFutureTask with task == null.
    //So we block launch until the task has been assigned, which is now
    waitForTaskAssignment.countDown();
    grayOutMainWindow();
    f.task.schedule(0);
    startLatch.countDown();
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:20,代碼來源:AbstractWindowRunner.java

示例2: windowOpened

import java.awt.event.WindowEvent; //導入方法依賴的package包/類
public void windowOpened(WindowEvent e) {
    shown = true;
    synchronized(this) {
        notifyAll();
        if (e.getSource() instanceof JFrame) {
            ((JFrame) e.getSource()).removeWindowListener(this);
        } else {
            ((JDialog) e.getSource()).removeWindowListener(this);
        }
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:12,代碼來源:ExtTestCase.java

示例3: checkForParentWindowEvent

import java.awt.event.WindowEvent; //導入方法依賴的package包/類
private boolean checkForParentWindowEvent(WindowEvent e) {
	if (e.getSource()==getParent()) {
		uninstallAndHide();
		return true;
	}
	return false;
}
 
開發者ID:Thecarisma,項目名稱:powertext,代碼行數:8,代碼來源:ClipboardHistoryPopup.java

示例4: windowClosing

import java.awt.event.WindowEvent; //導入方法依賴的package包/類
public void windowClosing(WindowEvent we) {
    done = true;
    Window w = (Window)we.getSource();
    if (setNullOnDispose) {
        w.getGraphicsConfiguration().getDevice().setFullScreenWindow(null);
    }
    w.dispose();
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:9,代碼來源:MultimonFullscreenTest.java

示例5: windowClosed

import java.awt.event.WindowEvent; //導入方法依賴的package包/類
@Override
public void windowClosed(WindowEvent event) {
	Frame frame = (Frame) event.getSource();
	Project proj = frame.getProject();

	if (frame == proj.getFrame()) {
		projectRemoved(proj, frame, this);
	}
	if (openProjects.isEmpty() && !MacCompatibility.isSwingUsingScreenMenuBar()) {
		ProjectActions.doQuit();
	}
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:13,代碼來源:Projects.java

示例6: windowClosing

import java.awt.event.WindowEvent; //導入方法依賴的package包/類
@Override
public void windowClosing(WindowEvent event) {
	Frame frame = (Frame) event.getSource();
	if ((frame.getExtendedState() & java.awt.Frame.ICONIFIED) == 0) {
		mostRecentFrame = frame;
		try {
			frameLocations.put(frame, frame.getLocationOnScreen());
		} catch (Throwable t) {
		}
	}
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:12,代碼來源:Projects.java

示例7: windowOpened

import java.awt.event.WindowEvent; //導入方法依賴的package包/類
@Override
public void windowOpened(WindowEvent event) {
	Frame frame = (Frame) event.getSource();
	Project proj = frame.getProject();

	if (frame == proj.getFrame() && !openProjects.contains(proj)) {
		openProjects.add(proj);
		propertySupport.firePropertyChange(projectListProperty, null, null);
	}
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:11,代碼來源:Projects.java

示例8: windowClosing

import java.awt.event.WindowEvent; //導入方法依賴的package包/類
@Override
public void windowClosing(WindowEvent e) {
    if(e.getSource() == console) {
        hideConsole();
    }
}
 
開發者ID:Panzer1119,項目名稱:JAddOn,代碼行數:7,代碼來源:JLogger.java

示例9: windowClosing

import java.awt.event.WindowEvent; //導入方法依賴的package包/類
@Override
public void windowClosing(WindowEvent e) {
    if(e.getSource() == this) {
        close();
    }
}
 
開發者ID:Panzer1119,項目名稱:JAddOn,代碼行數:7,代碼來源:WizardSaveAs.java

示例10: windowLostFocus

import java.awt.event.WindowEvent; //導入方法依賴的package包/類
@Override
public void windowLostFocus(WindowEvent e) {
	if (e.getSource()==ClipboardHistoryPopup.this) {
		uninstallAndHide();
	}
}
 
開發者ID:Thecarisma,項目名稱:powertext,代碼行數:7,代碼來源:ClipboardHistoryPopup.java

示例11: windowActivated

import java.awt.event.WindowEvent; //導入方法依賴的package包/類
@Override
public void windowActivated(WindowEvent event) {
	mostRecentFrame = (Frame) event.getSource();
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:5,代碼來源:Projects.java


注:本文中的java.awt.event.WindowEvent.getSource方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。