swt

Show TableViewer not in line, but in matrix order

I use the TableViewer to show informations in a table. The user can select one of the shown options by selecting one line of the table. I want to create a table in matrix form, in which the user can not only select the line. It should be possible to select every item of the table, like row 2 column 3. For every item selection an action ...

Why does my SWT Shell always comes up in the background?

When I start my SWT Application from Eclipse, the Shell always starts up in the background, with the IDE in front of it. I tried everything, like setting the focus, activating the shell, etc. Did someone else experience the same behaviour and maybe even solved it? ...

SWT: Nested Layouts with ScrolledComposite exceeds available space

Hi, I want to build a Master-Detail layout for one of my applications using SWT. Container, Content, Sidebar and Part1 are Composite instances. Scrolled is a ScrolledComposite The desired layout is something like: +--Container-------------------------------------+ |+--Content----------------------++--Sidebar----+| || ...

Inspect Swing/SWT app at runtime?

Is there any way to inspect (in a broad sense, to get any info) a SWT app without disassembling it (as it's packed as exe and I don't know how to extract it first ;) )? EDIT: turns out the app is a SWT one. ...

[BIRT 2.3.2 (StandAlone)]"Jumping" problem ?

Hi there, Here's the fact : I made a tiny app which consist of a table related to a bar chart (a birt one ... of course), when I modify my table values it automaticaly alter my chart (like Excel but less fancy) ... Anyway everything works fine ... BUT when I want to make my chart interactive in order to show tooltips (for example) I inf...

How do get a "nice" scale-widget in SWT under Gnome?

Hi, I would need a scale-widget in SWT that looks like the following example: http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/Scales.htm If I run this example under Ubuntu (Gnome) the scale looks like this: http:// book.javanb.com/swt-the-standard-widget-toolkit/ch10lev1sec2.html But actually I would prefer to have these steps besid...

How to display system icon for a file in SWT?

I want to display a file tree similarly to java2s.com 'Create a lazy file tree', but include the actual system icons - especially for folders. SWT does not seem to offer this (Program API does not support folders), so I came up with the following: public Image getImage(File file) { ImageIcon systemIcon = (ImageIcon) FileSystemView.g...

Does SWT distribute a JAR that works on any supported operating system?

The SWT project currently maintains one distributable for each supported operating system. For example: swt-3.4.2-win32-win32-x86.zip swt-3.4.2-gtk-linux-x86.zip swt-3.4.2-carbon-macosx.zip Is there a distributable that just Does the Right Thing, regardless of which operating system the application is running on? ...

Get Active Tab in SWT TabFolder

I apologize if this question is too basic, but I just can't figure out how to do this. I have a SWT TableFolder with two tabs, and I need to determine which of those two tabs are currently active, as it effects the behavior of another part of the program. Is this possible? Thank you in advance. ...

[SWT] Modifier Key state

Hi all, I have a tiny (rikiki) problem in SWT ... I am making a small class extending org.eclipse.swt.widgets.Composite and which is supposed to be nested in an RCP app ... In this small class I have widgets which are supposed to react to mouse or keyboard event BUT I need to use modifier keys (Shift/Ctrl/Alt/...) to alter my copone...

How to set height of SWT List in rows?

I have a class based on Composite that embeds an SWT List instance. Using the default settings, the list is five rows high on my WinXP system. Without relying on hard-coded pixel values or DPI settings and the like, how can I set the height of the list (and the surrounding composite) to a fixed number of rows, say 3, without any added in...

SWT composite - redraw problem

I have a composite element, that initially has a Label. Now I call dispose on the it (the label) and create another label in the same container (composite elm), but I don't see the new text. It brings me to question how do I enable redraw on the composite, so that the new label (or any other component I might create) will render in place...

Eclipse Plugin - Popup Menu Extension

Hi All, I am trying to add a new menu item to Eclipse's popupmenus. It really seemed straightforward enough in the examples and tutorials but the menu item itself is never visible. I expect this to work in all views and for basically anything that is a file. I am using Eclipse 3.4. This is the my plugin.xml configuration: <?xml version...

Change text on button in eclipse header on the fly

I'm creating a view in eclipse to display stack traces, and I want to have the view accessible from a button in the header. So I'm creating an extension using the plugin.xml framework, like this basically: <extension point="org.eclipse.ui.commands"> <command categoryId="com.commands.category" id="commands.tracing" ...

How best to use ViewerFilter on a TreeViewer?

I am applying a ViewerFilter to a tree of a few branches, but mostly leaves. The filter really applies to the leaves, using properties within the leaf. All branches are left untouched so that their leafs can appear. However I would like to filter out branches that contain no selected leafs, and I can see no mechanism within ViewerFilter...

SWT: System VirtualKeyBoard

I want to develop a System Virtual KeyBoard with SWT technology on the platform of powerpc under Ubuntu,and what the problem i meet is that how to make the Shell lose focus when initializing the Shell Window. ...

Swing versus SWT

What should I be looking at when choosing between SWT and Swing? I've had a little experience with both, but I'm interested in: layouts/layout managers; data binding; pre-built controls; ease of development. I will assume that they are both satisfactory in terms of GUI performance and of platform availability. ...

Prevent system tray icon from stealing focus when clicked

I am writing an application in Java that places an icon in the system tray (via SWT). When this icon is clicked, I wish to have it automatically type some keys (via the Robot class) into whatever text field is in focus at the time of clicking (could be in any window). Unfortunately, clicking the system tray icon steals the focus away fro...

JFace question: How do I select all items in a ListSelectionDialog?

I create a JFace ListSelectionDialog as follows. final ListSelectionDialog dialog = new ListSelectionDialog( PlatformUI.getWorkbench().getDisplay().getActiveShell(), List<SomeClass>, new ArrayContentProvider(), new LabelProvider(), ""); //$NON-NLS-1$ dialog.setTitle("Dialog Title"); //$NON-NLS...

globally disable enter/return key in a SWT dialog

I've created a dialog class filling some common widgets, like text, combo, and tree. It annoys to have the default behavior to dismiss this dialog (same as the default 'OK' button is pressed) when enter/return is pressed whichever widget I was in. To prevent this behavior, I have to add a traverse listener for each widget to filter the ...