swt

Delaying SWT Table Refresh

We have a ViewerFilter for a TableViewer that is a little slow, so to try to give the impression of awesomeness, we wanted to have the viewer wait 500 milliseconds before refreshing the window (otherwise, it was blocking after every key stroke). Not having any clue what I was doing, I tried creating a class that would check if System.cu...

Design Palette for SWT

Is there a way to replicate the design palette from the Eclipse Visual Editor in an SWT application? Here is a screen capture of the widget. http://bit.ly/b6lUZh. ...

ClassLoader on virtual machine

I have source code: private Image getImage(String path, ClassLoader loader) { InputStream image = null; try { image = loader.getResourceAsStream(path); return new Image(PlatformUI.getWorkbench().getDisplay(), image); } finally { if (image != null) { try { image.close(); ...

setFocus() always false...

I'm working on a Eclipse RCP Application. In a class which extends MultiPageEditorPart, i'm trying to set the focus to a text field. But the setFocus Method always returns false. What am i doing wrong? The MultiPageEditor has various pages and inside these pages, there are Composite - classes. These classes contain the text field. H...

Use Tab-key on a multiline text filed in swt?

How do I prevent a multi-line text field from "stealing" tab-key presses? I mean: I'd like to use TAB to cycle between the elements of a window, but when I enter the multiline text, TAB becomes a "normal" key, and simply inserts tabulators into the text I'm typing. How do I handle this? Should I write some custom listener, or can I cha...

Unable to view visualcomponent in a JPanel(SWT) with JMF

I am trying to write a small app to play videos using JMF 2.1.1e in Netbeans 6.8, I have cross-posted it at Sun Java Forums and Netbeans Users forum (link can't be added since I am a new user). The code is as follows, package demo; import java.io.File; import java.net.MalformedURLException; import java.net.URL; import java.util.logging...

Eclipse style help system (SWT?)

I am writing a custom app that requires a help system. The app is written in SWT. Is there anyway I can generate eclipse style help with SWT? I.e when you press F1 in the Eclipse editor you get a new window on the side. As an aside, I would also like to be able to provide an editor for this help documentation. ...

Adding SWT MenuItem(s) to Plug-In

I have developed a standalone SWT app. Now I am trying to migrate it to the RCP Plug-In framework. I need to hook up the SWT menus that I created in the standalone app to the RCP model. I have SWT MenuItem(s) that I would like to place in the RCP menu's. However these menus use JFace IWorkbenchAction, IAction etc. I would rather n...

ScrolledForm does only show one bar and never both

i have created a View which contains 1 ScrolledForm only. All Children Composites of this ScrolledForm are instantiated with GridLayout and the depest children are created with a FormLayout. mForm = toolkit.createScrolledForm(this); mForm.setExpandHorizontal(true); mForm.setExpandVertical(true); mForm.set...

SWT: How to redisplay new contents of a CTabItem

I have a CTabFolder with one of its CTabItems which may change its contents on a given user action. But I don't know how to force the display once the contents have changed. I get the tab item blank; if I resize the window suddenly everything appears. I'm not posting the code because I did some wrapping in Scala, but this is basically w...

Redrawing control behind composite with SWT.NO_BACKGROUND

Hello Experts Original goal: I have a TreeMenu that i use to display my Menu. In this tree, a user can select different items. I would like to disable the tree, so that a user cannot select a new item after choosing the first. The catch is, we cannot use setEnabled, because we are not allowed to use the greyed out look. The look/color...

Is there a styleguide for developing SWT applications?

I'm not a proficient GUI developer, and I have no talent for design. Is there a comprehensive style guide for developing SWT applications? I'm especially interested in standards for developing layouts, what margins and spacing between controls to use, font sizes and stuff like that. ...

Two Eclipse UI Form sections that grab excess vertical space and fold properly?

I'm trying to create an Eclipse Form that has three foldable sections, one fixed size and two others that should grab all the remaining vertical space in the editor window so, that when one of the bottom sections is folded, the other one would fill all the available space. I have read the forms article, tried many variations of grabExce...

What is the recommended way for SWT Views (ViewPart) which receive a external event to update a GUI element?

My View is derived from ViewPart, but I have a listener on it which receives Events from non-GUI threads. If something is supposed to happen on within the GUI thread, it has to go through asyncExec(). So far so good. The thing is, the GUI elements are created in createPartControl(), so they can't be final. At the moment I just put th...

How to create a Hello World SWT application in eclipse?

I am trying to follow instructions in Eclipse to create my first Hello World SWT application. I have problems on the first step. In the instructions the following is written: Open your Web browser to http://eclipse.org/downloads/, navigate to the Eclipse Platform project section, select the latest release build, and find the ...

Confusion over Eclipse SWT ViewPart and its Toolbars?

I followed roughly the recipe in this blog entry http://eclipsercptutorials.blogspot.com/2009/05/add-toolbar-to-view-in-eclipse-rcp.html Which looks like that the image appears left to the minimize/maximize icons The thing is, if I don't assign an image to the action, then the item doesn't appear in the header, but in a separate to...

Why my SWT application does not work?

I am trying to create a Hello World SWT application using Eclipse. I follow all instructions and in the end my program does not work. This is my code: import gnu.gcj.xlib.Display; import org.eclipse.swt.widgets.Shell; public class HelloWorldSWT { /** * @param args */ public static void main(String[] args) { ...

How can I run Java applications?

I created a Hello World SWT application using Eclipse and I was able to run it from Eclipse (everything works fine). But I wonder how other peoples (users) will run this kind of application. Should they install Eclipse, import my project and run it? It sounds strange. ...

What should I choose SWT or Swing to program GUI in Java?

I need to create a GUI application in Java. I just realized that I have different optional ways to go (SWT and Swing are among them). I have already found out that there is a lot of discussions about what way is better and I do not want to go to deep into these discussions (I am a newbie). I do not care about all aspects of the dilemma...

select all (CTRL+A) option not present in java SWT Text box/Text area

im using java SWT application. i cant select all text in a text box or text area by CTRL+A. is there any way to achieve it? ...