本文整理了Java中javax.swing.JDialog.addWindowFocusListener()
方法的一些代码示例,展示了JDialog.addWindowFocusListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDialog.addWindowFocusListener()
方法的具体详情如下:
包路径:javax.swing.JDialog
类名称:JDialog
方法名:addWindowFocusListener
暂无
代码示例来源:origin: libgdx/libgdx
pane.selectInitialValue();
dialog.addWindowFocusListener(new WindowFocusListener() {
代码示例来源:origin: libgdx/libgdx
pane.selectInitialValue();
dialog.addWindowFocusListener(new WindowFocusListener() {
代码示例来源:origin: libgdx/libgdx
pane.selectInitialValue();
dialog.addWindowFocusListener(new WindowFocusListener() {
代码示例来源:origin: libgdx/libgdx
pane.selectInitialValue();
dialog.addWindowFocusListener(new WindowFocusListener() {
代码示例来源:origin: stackoverflow.com
dlg.addWindowFocusListener(new WindowAdapter() {
@Override
public void windowGainedFocus(WindowEvent e) {
代码示例来源:origin: stackoverflow.com
public static void main(String args[])
{
final JDialog bwin = new JDialog();
bwin.addWindowFocusListener(new WindowFocusListener()
{
@Override
public void windowLostFocus(WindowEvent e)
{
bwin.setVisible(false);
bwin.dispose();
}
@Override
public void windowGainedFocus(WindowEvent e)
{
}
});
bwin.setUndecorated(true);
JLabel label = new JLabel("About");
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
panel.add(label);
panel.setPreferredSize(new Dimension(200,200));
bwin.add(panel);
bwin.pack();
bwin.setVisible(true);
}
代码示例来源:origin: stackoverflow.com
dialog.addWindowFocusListener(adapter);
...
代码示例来源:origin: stackoverflow.com
JOptionPane op = new JOptionPane(pnl, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION);
JDialog dlg = op.createDialog("Login");
dlg.addWindowFocusListener(new WindowFocusListener() {
@Override
public void windowGainedFocus(WindowEvent e) {
代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-runtime
dialog.addWindowFocusListener(adapter);
dialog.addComponentListener(new ComponentAdapter() {
public void componentShown(ComponentEvent ce) {
代码示例来源:origin: zitmen/thunderstorm
private static JDialog constructFrame() {
final JDialog frame = new JDialog();
try {
frame.addWindowFocusListener(new WindowAdapter() {
@Override
public void windowLostFocus(WindowEvent e) {
代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-jglfw
dialog.addWindowFocusListener(new WindowFocusListener() {
public void windowLostFocus (WindowEvent arg0) {
代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-lwjgl
pane.selectInitialValue();
dialog.addWindowFocusListener(new WindowFocusListener() {
代码示例来源:origin: com.badlogicgames.gdx/gdx-backend-lwjgl
pane.selectInitialValue();
dialog.addWindowFocusListener(new WindowFocusListener() {
代码示例来源:origin: org.opentcs.thirdparty.dockingframes/docking-frames-core
dialog.addWindowFocusListener( listener );
selection.open( controller );
final Component base = selection.getComponent();
代码示例来源:origin: xyz.cofe/docking-frames-core
dialog.addWindowFocusListener( listener );
selection.open( controller );
final Component base = selection.getComponent();
代码示例来源:origin: com.jidesoft/jide-oss
dialog.addWindowFocusListener(adapter);
dialog.addComponentListener(new ComponentAdapter() {
public void componentShown(ComponentEvent ce) {
代码示例来源:origin: GoldenGnu/jeveassets
this.getDialog().addWindowFocusListener(listener);
代码示例来源:origin: GoldenGnu/jeveassets
public JDialogCentered(final Program program, final String title, final Window parent, final Image image) {
this.program = program;
this.parent = parent;
ListenerClass listener = new ListenerClass();
dialog = new JDialog(parent, JDialog.DEFAULT_MODALITY_TYPE);
dialog.setTitle(title);
dialog.setResizable(false);
dialog.addWindowListener(listener);
dialog.addWindowFocusListener(listener);
if (image != null) {
dialog.setIconImage(image);
}
jPanel = new JPanel();
layout = new GroupLayout(jPanel);
jPanel.setLayout(layout);
layout.setAutoCreateGaps(true);
layout.setAutoCreateContainerGaps(true);
dialog.add(jPanel);
dialog.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), DialogCenteredAction.CANCEL.name());
dialog.getRootPane().getActionMap().put(DialogCenteredAction.CANCEL.name(), new HideAction(DialogCenteredAction.CANCEL.name()));
dialog.getRootPane().getActionMap().put(DefaultEditorKit.insertBreakAction, new HideAction(DialogCenteredAction.OK.name()));
}
代码示例来源:origin: freeplane/freeplane
d.setModal(false);
d.pack();
d.addWindowFocusListener(new WindowFocusListener() {
public void windowLostFocus(WindowEvent e) {
代码示例来源:origin: Audiveris/audiveris
dialog.addWindowFocusListener(adapter);
dialog.addComponentListener(new ComponentAdapter()
内容来源于网络,如有侵权,请联系作者删除!