swt

Is there a better way to use sorting and filtering with ILazyTreeContentProvider

Apparently if using ILazyTree(TreePath)ContentProvider sorting and filtering is not supported by TreeViewers. So setting ViewerFilters or Sorters/Comparators to your TreeView won't do any good. Perhaps this is related to not knowing all elements, including those not visible at the moment. In support to this statement here is javadoc ex...

Styling a SWT label to be italic

How would I go about styling a SWT label created along the following lines so it is displayed italicised? Label label = formToolkit.createLabel(composite, "My label name"); ...

PNG image with transparency on SWT

I've got a Composite and would like to use a png file as background image. I can do that, the problem is when the image uses transparency it doesn't work and shows a white colour instead. Any thoughts on how to get this to work? Thanks! ...

SWT: How to “render” a Widget in the background / into an offscreenbuffer

Hello Experts, I would very much appreciate your advice and help: How can I render a SWT Widget/Component in the BACKGROUND (offscreenbuffer?) and get the “painted” pixels that were drawn by the Widget/Component to save them on the harddisk: What I currently have is: Display display = new Display(); Shell shell = new Shell(display)...

OSGI + SWT: How to split the View (GUI) in many bundles

I'm writing a graphic application, with java, swt and osgi. The bundle A holds the application main window. Depending on the selection of the user, a different user interface must be loaded. That is, the different GUI are in different bundles. So the main bundle A calls the bundle B to draw the new graphic interface. The bundle B contain...

How to remove "restore defaults" and "apply" button in custom RCP Preference Page

When creating a preference page in RCP, e.g. something like: public class MyPreferencePage extends org.eclipse.jface.preference.PreferencePage implements IWorkbenchPreferencePage how can I remove the "Restore default values" and "Apply" buttons which get added by default. Using this.getDefaultsButton().setVisible(false); this.getAp...

SWT version of: getOppositeComponent on focus change

In Swing you can get "the other Component involved in this focus change" from this: getOppositeComponent. There does not seem to be a similar call in SWT, does anyone have a workaround or fix for this? TIA ...

how do I specify a transparent background colour on a draw2d Figure?

I'm writing an eclipse plugin, and I'm layering some simple figures (i.e. view elements) together to create diagrams. A simple component looks like this The drum icon on the right is part of a tiny widget drawer. And the incomplete line underneath it is trying to represent multiplicity, but it's being blocked by the widget drawer. ...

swt tutorials or guides

Hi, I have some years experience with swing and feel comfortable that I understand the architecture. Now I need to get up to speed on SWT rather quickly. What would you recommend I study from online sources or books so I can get my head around the SWT architecture quickly ? I'm really starting from scratch. ...

Handling SWT Dialog boxes while running tests in headless mode using SWTBOT

I am running a Junit test case on my eclipse application that was built using SWT. I am doing GUI testing using SWTBot. So, here is my problem: editor.bot().button("Make Excel Template").click(); This code helps me generate a template in my application. Once done, it throws up a Modal Dialog with "OK" as a message. However, I can't get...

SWT Deployment as EXE

I've recently started learning SWT (on class #4, to be precise) due to business requirements, and previously I had been developing with Swing for 2 years. We deployed Swing applications as jars with resource dependencies. In SWT, what are the deployable forms and equivalents? I have questions but since my training is online, I'm on a c...

Editable SWT table

How to edit SWT table Values without Using Mouse Listeners? ...

Extended Combobox in SWT

I looking for Commbobox in which I can change Font property for some items. Example: First item: bold, font colour: red Second item: italic, font colour: dark Or: How to use org.eclipse.swt.custom.CCombo widget to do this? ...

SWT and blinking

I need the ability to have a blinking (red, maybe more colors) background for rows in a TableViewer/TreeViewer. What are the best options? There may be more than one row blinking, the blinking MUST be synchron and I need two blinking modes, fast and slow. ...

Adding a listener to the Shell for SWT.MouseUp doesn't work

Hi all, I attached a listener to the Shell on SWT.MouseUp and SWT.MouseDown events, but the handleEvent method never gets fired. I tried clicking at many places on the window, but it doesn't get even to the System.out.println(..) in the code below... Do you spot any error here? Thank you! //c is a Composite. final Listener l = new L...

Resizing a rectangle , from differnt origins.

Hi, I do have rectangle , which had information about topx ,topy , width and height. I want to scale this rectangle based on an origin other than top-left. Is there already existing algo to do that ? currently I work on Eclipse GEF & SWT . In GEF , the all Rectangle operations are assumed that top-left is where the drawing starts and ...

JFace TableViewer - Format cells depending on other cells

Hi, I have a JFace TableViewer. The values in one column should normally be unique, but there are cases where it makes sense that they are not (e.g. when a row was copied and not yet changed). However I want to alert the user of the duplicate values by highlighting the rows which contain duplicate values in that column. What's the best ...

Can't use JFace and SWT in eclipse without creating plugin

DISCLAIMER: this is the classic case of .NET GUI trying to work his way around JAVA stuff. PROBLEM DESCRIPTION: I am trying to build a very simple GUI with JFace and SWT - the code is straightforward (there's plenty tutorials), what it's not so straightforward is that I can't seem to get JFace and SWT to work outside a plugin project...

Eclipse: table column image transparent or not?

Once I start drawing my own images in an Eclipse table cell, highlighting that table cell results in a strange highlight color. See for yourself: While the transparency is actually preserved like in the first column, the highlight-blue isn't as blue as it should. Is this my fault or Eclipse's fault? Here's the code snippet: public ...

SWT TrayItem location

Hello! I use SWT + JFace and want to show my application window near the tray icon, like ToolTip. Is there a way to get the location of a TrayItem? ...