Commits

Roman Dawydkin committed 8734367

Window icon added.

Comments (0)

Files changed (2)

src/ru/ezsk/ldapshell/LdapWindow.java

 import org.eclipse.jface.action.Separator;
 import org.eclipse.jface.layout.GridLayoutFactory;
 import org.eclipse.jface.resource.FontRegistry;
+import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.window.ApplicationWindow;
+import org.eclipse.jface.window.Window;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.StyledText;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.TraverseEvent;
 import org.eclipse.swt.events.TraverseListener;
 import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.TabFolder;
 import org.eclipse.swt.widgets.TabItem;
 	}
 
 	public static void main(String[] args) throws Exception {
-		final Properties properties = LdapWindow.loadProperties();
-		final LdapDirectory directory = new LdapDirectory(properties);
-		final LdapWindow window = new LdapWindow(directory);
-		window.setBlockOnOpen(true);
-		window.open();
+		final Display display = new Display();
+		try {
+//			final ImageRegistry imageRegistry = new ImageRegistry(display);
+//			imageRegistry.
+			final Image windowImage = ImageDescriptor.createFromFile(
+					LdapWindow.class, "ldap.gif")
+					.createImage(display);
+			Window.setDefaultImage(windowImage);
+
+			final Properties properties = LdapWindow.loadProperties();
+			final LdapDirectory directory = new LdapDirectory(properties);
+			final LdapWindow window = new LdapWindow(directory);
+			window.setBlockOnOpen(true);
+			window.open();
+		} finally {
+			display.dispose();
+		}
 	}
 
 	// ================================================================== Fields

src/ru/ezsk/ldapshell/ldap.gif

Added
New image