* misc. UI
This commit is contained in:
parent
9f6d01c7be
commit
9e5bdf7773
|
@ -5,6 +5,7 @@ import static net.sourceforge.tuned.ui.TunedUtilities.*;
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Dialog.ModalExclusionType;
|
import java.awt.Dialog.ModalExclusionType;
|
||||||
|
import java.awt.Image;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.awt.event.WindowAdapter;
|
import java.awt.event.WindowAdapter;
|
||||||
|
@ -16,6 +17,8 @@ import java.io.PrintStream;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.security.AccessController;
|
import java.security.AccessController;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import javax.script.ScriptException;
|
import javax.script.ScriptException;
|
||||||
|
@ -86,6 +89,7 @@ public class GroovyPad extends JFrame {
|
||||||
console.hook();
|
console.hook();
|
||||||
|
|
||||||
shell = createScriptShell();
|
shell = createScriptShell();
|
||||||
|
editor.requestFocusInWindow();
|
||||||
|
|
||||||
setModalExclusionType(ModalExclusionType.TOOLKIT_EXCLUDE);
|
setModalExclusionType(ModalExclusionType.TOOLKIT_EXCLUDE);
|
||||||
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||||
|
@ -312,10 +316,17 @@ public class GroovyPad extends JFrame {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
|
GroovyPad pad = new GroovyPad();
|
||||||
|
|
||||||
|
List<Image> images = new ArrayList<Image>(3);
|
||||||
|
for (String i : new String[] { "window.icon.large", "window.icon.medium", "window.icon.small" }) {
|
||||||
|
images.add(ResourceManager.getImage(i));
|
||||||
|
}
|
||||||
|
pad.setIconImages(images);
|
||||||
|
|
||||||
// ignore analytics in developer mode
|
// ignore analytics in developer mode
|
||||||
Analytics.setEnabled(false);
|
Analytics.setEnabled(false);
|
||||||
|
|
||||||
GroovyPad pad = new GroovyPad();
|
|
||||||
pad.setDefaultCloseOperation(EXIT_ON_CLOSE);
|
pad.setDefaultCloseOperation(EXIT_ON_CLOSE);
|
||||||
pad.setVisible(true);
|
pad.setVisible(true);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
Loading…
Reference in New Issue