swt

Java - change focus on key press

I am writing a Java Application for Data Entry using Eclipse and SWT. Naturally it has a great many Text objects. What I would like to happen is that when user enters something into one field focus automatically changes to the next field. Thanks in advance ...

SWT Image concatenation or tiling / mosaic

I have an Eclipse RCP application that displays a lot (10k+) of small images next to each other, like a film strip. For each image, I am using a SWT Image object. This uses an excessive amount of memory and resources. I am looking for a more efficient way. I thought of taking all of these images and concatenating them by creating an ...

How do you build an SWT application with Maven

I trying to learn swt, and I use maven for all my builds and eclipse for my IDE. When getting the swt jars out of the maven repository, I get: Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3034 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709) at java.lang.Runtime.loadLib...

What are some SWT datagrids/tables?

I need to be able to display some data in Eclipse in a grid/table control... I need things like paging, multiple column sorting, column choosing, etc. There is an SWT Table and the Nebula project has a grid in alpha. Does what I need exist? 3rd party maybe? Doesn't have to be free, we can pay for the functionality. ...

Find composite location on screen

I am implementing a on screen keyboard in Java for SWT and AWT. One important thing is to move the keyboard to a position where the selected text field can show and is not lying behind the on screen keyboard. For AWT i can detect the position of the current selected component with Component owner = KeyboardFocusManager.getCurrentKeyboa...

Java based Swing Browser should support JavaScript

In my company, I am implementing a java based html browser. I found a lot of tools to generate complete browsers only in Swing which are looking like Mozilla. But I was not able to find a browser which supports JavaScript. The browser I will implement should execute JavaScript inside the HTML sides. Do you know of a tool that supports t...

Why does Table.getItem(Point) always return the item from column zero?

I've implemented a class to give me a more flexible tooptip for the org.eclipse.swt.widgets.Table class. As I'm sure you all know, by default you get one tooltip for the whole table - and not individual tips for each cell. My object creates a number of listeners to implement it's own location sensitive tooltip, however, when I call Tabl...

SWT Notification animated box (a.k.a toaster) needed

In a Java project (SWT desktop app), I want to inform the user about events through animated notification box (actually, it's not required to be animated). Something like MSN or any other IM client. There is JToaster for Swing, but I wonder if there isn't any other implementation based on SWT. Thanks! ...

Simple SWT question, how to have text fields fill 100% horizontally

If I have a text field with SWT, how can I get the field to fill to 100% or some specified width. For example, this text field will only reach for so much horizontally. public class Tmp { public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); GridLayout gridLay...

Slow operations in the Model-View-Presenter pattern

How do you handle slow operations in the Model-View-Presenter (or MVC or M-V-VM or whatever variant you are using)? When you have a slow operation in WinForms or SWT/JFace or whatever desktop framework you are using, you have to run it on a background thread to avoid completely locking up the application. Where do you handle this? I ca...

SWT OleClientSite: How to load XML file in Excel?

I have an Excel file in OfficeML format, MyData.xls. Since I upgraded to Office 2007 from Office 2003 I get a warning message saying that the file content does not match the file extension. It seems that OfficeML now must have the extension 'xml'. In my application I use OleClientSite to display the file in an OleFrame object. If I chan...

How to hilight a section of a TableView cell as part of the filtering process?

The backstory: I am applying a filter to a TableView. It's a simple 'find the rows with this string' filter. The requirement: I wish to hilight instances of the search term where they occur. Thus far I can see no means of doing this. ITableColorProvider let's me apply colours to entire cells, but not to a fraction of it. Clues most w...

How can I get my basic SWT application to exit properly in Mac OS X 10.5.6?

I have the following SWT test code: public static void main(String[] args) { shell = new Shell(); shell.setText(APP_NAME + " " + APP_VERSION); shell.addShellListener(new ShellListener() { public void shellActivated(ShellEvent event) { } public void shellClosed(ShellEvent event) { exit(); } public void shellDeactivated(...

Layout problems by FieldEditorPreferencePage

Hello, I have following problems with layout settings in the FieldEditorPreferencePage. My code is something like that: public void createFieldEditors () { Group pv = new group(getfieldEditorParent(), SWT.SHADOW_OUT); Group of = new group(getfieldEditorParent(), SWT.SHADOW_OUT); pv.setText(“pv”); of.setText(“of”...

How can I specify an Eclipse .classpath entry for specific O/S platform?

I am working on an SWT project as part of a team. We are constantly breaking each others build environment because Eclipses .classpath file is checked into version control and we include different SWT libraries for our machines. Depending on who committed last, the .classpath entry can be: <classpathentry kind="lib" path="lib/swt/swt-...

Custom widget shapes in SWT

I'm trying to work out how to make SWT widgets (e.g. Label, Frame) be some shape other than rectangular. I've made a custom shaped main window using the setRegion() method. Now I would like the widgets in the window to follow the same shape. I've tried using the setRegion() method on the widgets themselves (they inherit it) but nothing ...

Is it possible to use SWT from Jython?

The SWT-Gui looks very nice. Is there an easy way to use it in Jython ? ...

Qt Jambi vs SWT for cross-platform GUI development

I'm currently involved in a project developing applications primarily for Linux (Fedora 10). However, it might be the case later on that we will have to port these applications to Mac OS X and Windows and we don't want to be caught out by choosing the wrong GUI toolkit.* For a variety of legacy reasons we are locked into using Java. We ...

SWT Link Text with >

I am trying to create a SWT Link with the text so it looks like the following <this is the link> where the text this is the link is the actual link. I can get close with the following code: link.setText("<a><this is the link></a>"); However, I want just the text to be the link, and not include the < and >. I thought I could do it ...

How do I add a scrollable list of items to an SWT messagebox?

I want to pop up a messagebox in SWT with a potentially long list of items. Can I add a List widget, or should I make a new shell and populate it with a Label, List, and two Buttons? ...