swt

Problem with CommandFinder class...

and I'm not sure why... Hello Everbody! I'm trying to make my first steps with SWTBot. I'm trying to test an Eclipse RCP Application. In one test i'm trying to call a command to save a dirty editor. But an assertion after the call, tells me that the editor is still dirty. An the data in the dirty editor is not showing up in the databas...

How do I clear the background of an SWT ExpandBar?

The default background of an ExpandBar in SWT appears to be a gradient of whichever color the operating system is using. However, when I change the background of an ExpandBar in SWT, the controls switch to the Windows Classic style. Is there a way to set the background of the ExpandBar without reverting to the Windows Classic look? ...

Java web browser slow

org.eclipse.swt.browser.Browser I load the embedded browser into Java and have it load a page. It seems to load really slow... is this an issue with the page caching? What can I do to speed this up? ...

Problem using Retroguard to obfuscate swt application

I was trying to obfuscate SWT code using Retroguard, but after obfuscation, I can't start the jar it has created. Please advise. Thanks. C:\Documents and Settings\zzz\My Documents>java -jar retroguard.jar swt-orig.j ar C:\Documents and Settings\zzz\My Documents>java -jar out.jar Exception in thread "main" java.lang.UnsatisfiedLinkError...

What is the best way to manage application screens in SWT?

I'm creating a standalone SWT desktop application that has around 10 different screens (few wizards, help, forms, etc). Some elements on screen don't change at all (like header, background, etc) and there is a working area that changes depending on what is clicked, etc. What is the best way to manage application screens? Do I need to cr...

Remove items from SWT tables

This is more of an answer I'd like to share for the problem I was chasing for some time in RCP application using large SWT tables. The problem is the performance of SWT Table.remove(int start, int end) method. It gives really bad performance - about 50msec per 100 items on my Windows XP. But the real show stopper was on Vista and Window...

Create cross platform Java SWT Application

I have written a Java GUI using SWT. I package the application using an ANT script (fragment below). <jar destfile="./build/jars/swtgui.jar" filesetmanifest="mergewithoutmain"> <manifest> <attribute name="Main-Class" value="org.swtgui.MainGui" /> <attribute name="Class-Path" value="." /> </manifest> <fileset dir="./build/c...

Java SWT - dissolve (fade) from one image to the next.

I'm pretty new to Java and SWT, hoping to have one image dissolve into the next. I have one image now in a Label (relevant code): Device dev = shell.getDisplay(); try { Image photo = new Image(dev, "photo.jpg"); } catch(Exception e) { } Label label = new Label(shell, SWT.IMAGE_JPEG); label.setImage(photo); Now I'd like photo to ...

JFace: difference between ITreeContentProvider and ILazyTreeContentProvider

After reading JavaDoc for ILazyTreeContentProvider and Virtual Tables and Trees I am a bit confused. Do they really mean that with a simple ITreeContentProvider all elements have to be loaded when the tree is created? I expected that getChildren() would only be called when expanding an element (and hasChildren() to be called to determine...

How can i combine crystal reports and JAVA SWT?

I have to create reports from my application (java, swt). For reports i am using crystal reports, but i have problem, i can't find SWT code that enables me to open (create) and save report. I have found Swing code that enables me to do that, but i cant find SWT code. So can somebody explain me, or give me code, or tutorial that will hel...

Any complex example project for Java desktop-style GUI?

I'd like to see how the code is organized and how the various GUI design patterns are applied. Anything Java and in desktop gui style is fine: GWT, Swing, SWT. Thanks. ...

Image gets slightly erased on SWT/Windows

I have an Eclipse plugin which includes a view. The view has several icons in the toolbar. I'm experiencing a very strange problem: on Windows, in some occasions (after prolonged use), one of the icons gets slightly erased. This does not happen on other platforms. This looks like a memory leak or some other resource misuse, but I just ...

How to load font from InputStream in SWT?

I need to load font (.otf or .ttf) file from java Resource or InputStream in SWT. org.eclipse.swt.graphics.Device.loadFont(String path) allows me (example) to load font from font file path (and it works), but there is no corresponding method to load it from any other source. I was thinking of using java.awt.Font.createFont(int fontForm...

Problems With SWT on Mac

I've got a java project that uses an SWT UI and I'm having trouble deploying it on any Mac OS X computers. The program itself works perfectly on Windows when it is either run from within Eclipse or from a jar file. On Mac, the program also works fine in Eclipse, but when I try to run it from a jar file, I get the following error: 2010...

how to open jar selection dialog at the eclipse pulgin code...

Hi all. At Project > Properties > Java Build Path > Libraries tab you click Add Jars button, you will see the JAR Selection dialog. I like to open this JAR Selection dialog on my plugin code. How to open this? ...

SWT: cleaning up before application exit

What is the best way for an SWT application to clean up resources before application exit? I see two options: 1) Add a DisposeListener to main window (or better, to the Display). Will it get run if an uncaught exception happens? 2) Use a shutdown hook. Any problems to be aware of there which aren't mentioned in Design of the Shutdown H...

Swt.browser inside of Jpanel

How can I put a swt.browser inside of a Jpanel? ...

How do you update a JFace Viewer from inside a Job?

Caveat: I'm still struggling with proper MVC in Eclipse plugin development, so if you see anything here that is most likely causing me more pain that I should be enduring, please let me know. The question: I have a View with a JFace Tree Viewer and a Table (not a table viewer... that will be changed down the road). I have an action th...

swt.jar where is it?

Anyone know where I can download swt.jar? ...

swt gridlayout rowheight

I have a gridlayout. I have two rows. I want one row to take up 500 pixels. I want the other row to take up the rest of the space. How? ...