当前位置: 首页>>代码示例>>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;未经允许,请勿转载。