📄 testosx.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: testOSX.java
package org.gudy.azureus2.ui.swt.nico;
import org.eclipse.swt.events.ShellAdapter;
import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.widgets.*;
import org.gudy.azureus2.core3.util.Debug;
public class testOSX
{
private Display display;
private Shell mainWindow;
public testOSX()
{
display = new Display();
mainWindow = new Shell(display, 3280);
mainWindow.setText("Test OSX");
mainWindow.open();
mainWindow.addShellListener(new ShellAdapter() {
final testOSX this$0;
public void shellClosed(ShellEvent event)
{
if (getExitConfirmation())
dispose();
else
event.doit = false;
}
{
this$0 = testOSX.this;
super();
}
});
}
public void waitForClose()
{
do
{
if (mainWindow.isDisposed())
break;
try
{
if (!display.readAndDispatch())
display.sleep();
}
catch (Exception e)
{
Debug.printStackTrace(e);
}
} while (true);
display.dispose();
}
public static void main(String args[])
{
testOSX mw = new testOSX();
mw.waitForClose();
}
public void dispose()
{
if (mainWindow != null && !mainWindow.isDisposed())
mainWindow.dispose();
}
private boolean getExitConfirmation()
{
MessageBox mb = new MessageBox(mainWindow, 200);
mb.setText("Confirm");
mb.setMessage("Do you really want to exit?");
return mb.open() == 64;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -