swt

How to implement a Google-chrome-like title bar for Java SWT application

I have inherited development of a Java/SWT application running on Windows only. One of the feature requests that I need to scope is a Google-chrome-type title bar in place of the SWT windows title bar. The application's tabs appear at the same level as the window control buttons. My understanding is that I will need to: write a Win...

Advanced SWT table widgets

There are a couple of "advanced" table/spreadsheet SWT widgets out there (Nattable, Nebula Grid), but none of them support really large datasets. Nattable is the one which comes closest, but it still has limitations in the datatypes it uses causing the number of rows in the table to become far to limited. I need to be able to represent ...

How to solve this missing update() on custom image to org.eclipse.swt.widgets.Group?

I have an interesting aspect to submit to your attention. I am pretty sure the solution to this will prove to be very easy, and yet... i am unable to find it. Here it is what i did : i've drawed a Group on top of a Shell, and i've used this code : String message = "My message"; Image img = ....//some image group.addListener(SWT.P...

SWT standalone scrollbar widget

Is there a way to create a "standalone" scrollbar in SWT? I would like to have a scrollbar which I have full control over myself and use it to control the contents of another widget in a way which isn't possible with the "built-in" scrollbars in the Table widget, for example. ...

Turning on anti-aliasing in SWT

I've called gc.setAntialias(SWT.ON); and it does nothing. According to that method, it should work. The Javadoc states: Sets the receiver's anti-aliasing value to the parameter, which must be one of SWT.DEFAULT, SWT.OFF or SWT.ON. It's not working for me, and I'm painting on a simple Canvas. ...

SWT Cross-Platform Enter Detection

Hi, I have a global filter (Display.addFilter) in SWT in which I want to detect Enter key. In Windows, pressing Enter generates SWT.CR in 'keyCode' part of KeyListener event. Is this assumption safe for all platforms, or should I check if keyCode == SWT.CR || keyCode == SWT.LF? Thanks. ...

GWT + OSX = SWT issues

I'm new to GWT development and I'm putting myself through the paces with Google's tutorial but I'm getting errors: java[10574:80f] [Java CocoaComponent compatibility mode]: Enabled 2009-11-06 15:27:38.769 java[10574:80f] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000 I checked my Java prefs and I ha...

Drawing into an Eclipse editor

I am trying to draw some shapes (boxed ans arrows) into, i.e., "over" the text in an eclipse editor. To get started, I wrote the following code: IWorkbenchPage activePage = Activator.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage(); final Shell shell2 = activePage.getActiveEditor().getSite().getShell(); ...

Adding item to Eclipse text viewer context menu

Hello. I am developing a plugin for eclipse. In this plugin I need to be able to add an item to the context menu in the text editor. So far I have been unsuccessful in this, does anyone know how to add this item. Also, how do I get a string with the text currently selected in the editor. Thank you so much. ...

Add an SWT widget to a swing JPanel

I understand that this may be impossible, but I would sure like to know if somebody has accomplished this, or have a work-around. I have an SWT Button and am wanting to overwrite an existing JPanel's contents with just the Button being present. My current strategy is to have the SWT Button as an initial null field and then set it throug...

swt GUI performance problem on linux.

We have a monitoring application built on swt and running on linux. we have few buttons and a dynamic part that changes as we click on these buttons. The problem is that if some ones click too rapidly the cpu could reach 100% and hanging forever. We observed this rapid cpu spikes only on Ubuntu Linux where as windows it runs without on i...

Populating huge table in SWT/JFace RCP application

How would you go about displaying huge amount of rows in SWT table? Huge is something above 20K rows, 20 columns. Don't ask me why I need to show that much data, it's not the point. The point is how to make it work as fast as possible so that end user won't get bored waiting. Each row displays an instance of some object, columns are its ...

How do I run the SWT Win32 extension example program locally?

I am looking into using the SWT Win32 Extension. I downloaded the extension jar files, and the example code. However, I couldn't find how to run the example. When I run the application with their jnlp file, it runs. When I looked into the file, I saw that they specify their main class as org.sf.feeling.swt.win32.extension.example.Exampl...

Rapid switch to Java for an experienced C++ developer

I'm am looking for online tutorials/books, which assume a solid knowledge of OOP/Design patterns concepts and stress on differences (both conceptional and syntactical) between C++ and Java thus allowing for a rapid development in the latter. Thank you very much in advance, appreciate your time. ...

Beautifying a SWT application on Mac

SWT is designed to be cross-platform, so it can run on a Mac. The problem is it commits the cardinal sin of Macland - it's UGLY. Toolbars don't look like Mac toolbars, status bars don't look like Mac status bars, etc. Does anyone have any experience in making an SWT application look more like a Mac application? For example, by making...

Mouse events on an SWT Scrollbar

Using standalone SWT Scrollbars is something of a hack (using this workaround), but it can be done. Here's a snippet: ScrolledComposite scrolledComposite = new ScrolledComposite( parent, SWT.V_SCROLL); ScrollBar scrollbar = scrolledComposite.getVerticalBar(); Shell tip = new Shell(UserInterface.getShell(), SWT.ON_TOP | SWT.NO_FO...

linkActivated is not called from IHyperlinkListener class on SLED11

Hello, I used the IHyperlinkListener class to implment links on a composite. The linkActivated() was called correctly when I did a mouse click on the Windows OS. However, when I did a mouse click on SLED11, linkActivated() is not called during the first time. I saw the composite got redrawn and re-positioned. The initial mouse down c...

Create a custom button with SWT

I would like to ask the same thing than this question but using SWT: Is there a way to make a Button with your own button graphic not just with an image inside the button? If not is another way to create a custom button in java? ...

add toolbar to section

Hello, I want to add a toolbar to a section in SWT. There is an example i saw in the PDE manifest editor. How can i add this toolbar or buttons? maybe i need to use a different control? Thank you, Ido ...

Lazy and Deferred TreeViewer questions

Hello Everyone, I have actually two questions but they are kind of related so here they go as one... How to ensure garbage collection of tree nodes that are not currently displayed using TreeViewer(SWT.VIRTUAL) and ILazeTreeContentProvider? If a node has 5000 children, once they are displayed by the viewer they are never let go, hence ...