swt

SWT Layout for absolute positioning with minimal-spanning composites

Hi, I'm writing a DND-editor where I can position elemtents (like buttons, images ...) freely via absolute positioning. Every element has a parent composite. These composites should span/grasp/embrace every element they contain. There can be two or more elements in the same composite and a composite can contain another composite. This i...

SWT applet: swt-win32-3650.dll already loaded in another classloader

I have multiple pages with java applet written with SWT. The problem is, applet loads only on first page, to load it on another page i need restart browser, otherwise i get following error: Exception in thread "Thread-27" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: no swt-win32-3650 in java.library.path ...

Java SWT: How to trigger ModifyListener through source code?

I have attached a ModifyListener to a Combo box and it works fine. But how do I trigger it through source code? Is there a better way than this?: int selected = myCombo.getSelectionIndex(); myCombo.select(selected + 1); myCombo.select(selected); ...

Java swt treeview popup menu

Hiho, currently I have a working popup menu which appears when I click on a treeview item. But I want to show different popups for different tree view entries. I don't get a idea how to do so... Here is my code for creating the menu: MenuManager menuMgr = new MenuManager("#PopupMenu"); menuMgr.setRemoveAllWhenShown(true); menuMgr....

JavaApplicationStub with SWT causing problems

I created an application in Eclipse that uses SWT for the GUI. I've attempted to deploy the application using the Eclipse deploy, but it seems that when I do that, LSUIElement is not respected, and I can't force the application to disappear from the dock. Nonwhistanding that issue, the application actually deploys ok and is runnable. I...

Swt file dialog too much files selected?

Hi there, the swt file dialog will give me an empty result array if I select too much files (approx. >2500files). The listing shows you how I use this dialog. If i select too many sound files, the syso will show 0. Debugging tells me, that the files array is empty in this case. Is there any way to get this work? FileDialog fileDialog =...

How to stop expanding an infinite SWT Tree upon pressing "*"

I have an SWT Tree in my application that contains an infinite data structure. Upon expanding an item, I generate its children. On Windows though, users can press "*", triggering an "expand all descendants" action, and my application hangs. There are two acceptable behaviors for me when the user presses "*": Expand all children of the...

MDI in SWT on Linux??!

I'd like to create an MDI application using SWT. I've done extensive searches and reach that the Decorations Object is the one responsable for trying supporting behavior. However, I've a Linux box, and the example provided here: http://java-gui.info/Apress-The.Definitive.Guide.to.SWT.and.JFace/8886final/LiB0070.html#ch08fig02 doesn't wo...

JavaApplicationStub with CFBundleDocumentTypes

I'm trying to use CFBundleDocumentTypes to associate a custom file extension with my application. As far as I can tell, this seems to "work" -- JavaApplicationStub launches my application when I double click the file. However, no callback is registered through the ApplicationListener events I setup in java. I used the code listed in ht...

Custom SWT controls and layouts

What custom controls and layouts for SWT/JFace do you use? Preferably, list one per answer. ...

Fading Indicator message in Java

How to/What is a good library, to create a fading indicator message in Java like that of Outlook when you get a message, or Ubuntu/Gnome when you've connected to a network? ...

Set Controls with arbitrary positions on CTabItem

Hi Guyz, I am new to SWT, and I need to set the controls positions arbitrary on CTabItem. I've used the following code, but it seems that it had no positioning effect, it just add the component to (0, 0) Label userName = new Label(folder, SWT.NONE); userName.setText("username"); userName.setBounds(10, 200, 200, 50); item.setControl(us...

How to draw a diary in swt

Hey, I am searching for a good mode to develop a application which shows 7 days and 24 hours (weekly view), knows somebody if there is a good tutorial? Or which layout would you use to design this? It should be possible to add events with a beginning and ending time... Thanks in advance Johannes ...

Java Swt Text (SWT.MULTI) append text without scroll

I have a Java SWT GUI with a multiline Text control. I want to append lines of text to the Text control without affecting the position of the cursor within the text box. In particular, the user should be able to scroll and select text at the top of the Text control while new text lines are appended to the bottom. Is this possible? ...

Changing the direction of a Combo box dropdown in SWT

Hi, I'm building an Eclipse plugin in SWT, and I have the following problem: one of my fields is a combo box, and in some cases it may have fairly long items as selection options. My plugin runs on the right side of the screen, so when you go to use the combo-box, the right side of the combo box is cut off. So, my question is: is there...

Faster: SWT or Java2D?

Which has faster graphics performance: SWT or Java2D? On MacOSX, Does SWT's graphics go through Quartz Extreme which in turn is rendered using hardware-accelerated OpenGL? I'm not referring to the native UI controls but asking about custom 2D graphics rendering like text, lines, curves and polygons. ...

Use SWT Browser Widget to Write Desktop Application

Hi I recently played around with the SWT browser widget (which is great). I am wondering if I could write a full desktop application with it (with java services behind - e.g. persistence) and what drawbacks I would have to consider. The advantage would be that people without java knowledge could work on the gui. Of course it depends on ...

why do we get AssertionFailedError?

I have the following piece of code: TableViewer tv = new TableViewer(attributeTable); tv.setContentProvider(new BOAttributeTableContentProvider()); tv.setLabelProvider(new BOAttributeTableLabelProvider()); where while setting the label provider i am getting AssertionFailedError. can anybody tell me what wrong i...

Is there a useable DateTime widget for SWT?

The Nebula CDateTime is nearly unusable for entering both date and time. Is there a sensible open source alternative? ...

replacing standard connection method in compiled SWT browser

Do you know how can I override method which connects to page and sends headers in SWT Browser ? ...