本文整理汇总了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();
}
示例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);
}
}
}
示例3: checkForParentWindowEvent
import java.awt.event.WindowEvent; //导入方法依赖的package包/类
private boolean checkForParentWindowEvent(WindowEvent e) {
if (e.getSource()==getParent()) {
uninstallAndHide();
return true;
}
return false;
}
示例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();
}
示例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();
}
}
示例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) {
}
}
}
示例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);
}
}
示例8: windowClosing
import java.awt.event.WindowEvent; //导入方法依赖的package包/类
@Override
public void windowClosing(WindowEvent e) {
if(e.getSource() == console) {
hideConsole();
}
}
示例9: windowClosing
import java.awt.event.WindowEvent; //导入方法依赖的package包/类
@Override
public void windowClosing(WindowEvent e) {
if(e.getSource() == this) {
close();
}
}
示例10: windowLostFocus
import java.awt.event.WindowEvent; //导入方法依赖的package包/类
@Override
public void windowLostFocus(WindowEvent e) {
if (e.getSource()==ClipboardHistoryPopup.this) {
uninstallAndHide();
}
}
示例11: windowActivated
import java.awt.event.WindowEvent; //导入方法依赖的package包/类
@Override
public void windowActivated(WindowEvent event) {
mostRecentFrame = (Frame) event.getSource();
}