summaryrefslogtreecommitdiff
path: root/src/JavaGUI2
diff options
context:
space:
mode:
authorhdaniels <unknown>2005-06-23 10:52:38 +0000
committerhdaniels <unknown>2005-06-23 10:52:38 +0000
commit82a8acca71e31b0a5cdf8bdbfbfbc36e28da6788 (patch)
tree78fb1af353586277085d7491e47d4dde00ef1e5f /src/JavaGUI2
parentc9b5a36e03b6ca60bd905ca10e308da78fac3a25 (diff)
added an application icon for gfeditor. But the icon itself is worth improvement
Diffstat (limited to 'src/JavaGUI2')
-rw-r--r--src/JavaGUI2/de/uka/ilkd/key/ocl/gf/GFEditor2.java21
-rw-r--r--src/JavaGUI2/gf-logo-64.gifbin0 -> 1513 bytes
2 files changed, 16 insertions, 5 deletions
diff --git a/src/JavaGUI2/de/uka/ilkd/key/ocl/gf/GFEditor2.java b/src/JavaGUI2/de/uka/ilkd/key/ocl/gf/GFEditor2.java
index 634f2c08b..a43165d5f 100644
--- a/src/JavaGUI2/de/uka/ilkd/key/ocl/gf/GFEditor2.java
+++ b/src/JavaGUI2/de/uka/ilkd/key/ocl/gf/GFEditor2.java
@@ -466,7 +466,14 @@ KeyListener, FocusListener {
public GFEditor2(String gfcmd, boolean isHtml, URL baseURL) {
this.callback = null;
this.commandPath = gfcmd;
- initializeGUI(baseURL, isHtml);
+ Image icon = null;
+ try {
+ final URL iconURL = ClassLoader.getSystemResource("gf-logo-64.gif");
+ icon = Toolkit.getDefaultToolkit().getImage(iconURL);
+ } catch (NullPointerException npe) {
+ logger.info("gf-logo-64.gif could not be found.\n" + npe.getLocalizedMessage());
+ }
+ initializeGUI(baseURL, isHtml, icon);
initializeGF(gfcmd, null);
//readAndDisplay();
}
@@ -488,7 +495,7 @@ KeyListener, FocusListener {
Utils.tickProgress(pm, 5220, "Loading grammars");
initializeGF(gfcmd, pm);
Utils.tickProgress(pm, 9350, "Initializing GUI");
- initializeGUI(null, true);
+ initializeGUI(null, true, null);
// send correct term (syntax tree)
//The initial GF constraint has until now always been
@@ -561,16 +568,20 @@ KeyListener, FocusListener {
/**
* reliefs the constructor from setting up the GUI stuff
* @param baseURL the base URL for relative links in the HTML view
- * @param showHtml TODO
+ * @param showHtml if the linearization area for HTML should be active
+ * instead of the pure text version
+ * @param icon The icon in the title bar of the main window.
+ * For KeY-usage, no icon is given and the Swing default is chosen
+ * instead.
*/
- private void initializeGUI(URL baseURL, boolean showHtml) {
+ private void initializeGUI(URL baseURL, boolean showHtml, Image icon) {
this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
this.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
endProgram();
}
});
-
+ setIconImage(icon);
this.readDialog = new ReadDialog(this);
//Add listener to components that can bring up popup menus.
diff --git a/src/JavaGUI2/gf-logo-64.gif b/src/JavaGUI2/gf-logo-64.gif
new file mode 100644
index 000000000..041cca41e
--- /dev/null
+++ b/src/JavaGUI2/gf-logo-64.gif
Binary files differ