swt

SWT: Multiline Table header / Multiline TabItem text

I migrate application from Swing to SWT and cannot find out how to make table headers in SWT multiline and also TabItems to have multiline text. In Swing it was not problem but in SWT no way. For table header i found that on linux it is working but i need it for windows. I tried \n and <br> but nothing. ...

SWT cursor object on Linux

I've been testing out code like this here ( http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/Cursorcreateacolorcursorfromanimagefile.htm ) to see if I can make custom cursors on SWT with Linux. Instead of replacing the cursor, the default cursor becomes invisible and I don't see anything. Is this not supported on Linux? I don't have a W...

SWT_AWT bridge - SWT in Swing problem

I wanted to embed brower into Frame.I wrote public class MyBrowser{ public static void main(String[] args) { final Display display = Display.getDefault(); Frame frm = new Frame("MyBrowser"); Canvas embedded = new Canvas(); frm.add(embedded, BorderLayout.CENTER); frm.pack(); fi...

How to update a view from code in an Eclipse RCP app.

I have a View class (extends ViewPart) that contains a ScrolledForm created from a FormToolkit. When certain events happen in other views in the app I want to change the form in this view and have it update in real time to the user. I have property change support support added now and the following method in the View public void p...

Eclipse MenuManager: get ImageDescriptor of Image?

Hi folks! I cannot get this to work so I thought it might be a wise idea posting over here... I have a context menu in SWT (actually its an Eclipse plugin). It's a cascaded menu, so it expands as soon as you hover over a certain entry... My problem is, that I want to attach a small icon to the menu but I struggle with that! Code: ...

Loading thumbnails on a canvas takes too long, with swt

Hi I have an application that loads all the images of a folder in a canvas, vertically. Like thumbnails. These folders have usually more than 20 images, around 1mb sometimes even 2. I created a class called Index, that extend canvas. I managed to load all the images and resize them to the proper size (the original size is around 1280x1...

Java embedded browser with resources in memory

We have a Java desktop app with an embedded browser, now using XULRunner (Firefox engine) on SWT. This browser's API allows us to load webs specifying an URI or its HTML content. What we need is to load HTML webpages including resources but being everything in memory. The best solution would be to provide a listener used when the engine ...

SWT StyledText - How To Indent/Un-Indent Selected Text With Tab Or Shift+Tab Keys

Using the Eclipse SWT StyledText widget, how can you indent/un-indent a selected block of text with the tab or shift+tab keys? ...

How to import a SSL certificate file with SWT Browser

Hello, With SWT Browser, is there any way to import a SSL certificate file into Java and make it work with SWT Browser? With Firefox, you can import it by Edit-Preferences-Advanced-Encryption-View Certificates-Import command, but since Mozilla doesn't share profile with each other, we are not able to reuse that. Is there any way? A...

[SWT] How to create a slide-out panel?

Hi, I'm about to create a java GUI app using SWT. A rough mockup: The dark box is a button, and i want that clicking it should slide out the sliding panel from under the sidebar. How do I do that in SWT? Thanks, Harhsath ...

[SWT] Vertically expandable Composite

Hi, I'm building an SWT UI, and it has a window (Shell) with three Composites stacked one below the other. I want that: all to expand to the maximum possible width (width of the window) the first and third Composites have a height of 100px each the third composite expand to a height of height_of_parent - 200px - any_margins_or_padding...

grouping radio buttons in Java

I am a newbie to java programming.With using SWT library,I try to make a GUI sample. My problem is: I wanna group some buttons by using "group.add(button);" method. Button cb3 = new Button(c3, SWT.RADIO); cb3.setSize(20, 20); cb3.setLocation(110, 3); ButtonGroup radios = new ButtonGroup(); radios.add(cb3); But I get this e...

Where to start if I want to create a custom combo with popup tree viewer

The normal SWT combo can only show a popup list when you click the triangle button. For some reason, I want to orgnize the selectable items in tree instead of list. It turns out I've to customize the combo to realize this. Can anyone tell me where should I begin with? ...

SWT Composite maximum size

I have a ScrolledComposite, the contents of which are being truncated. I have Googled and am aware that it is a known issue on Windows. The only suggested workaround I can find is to use the canvas.scroll functionality: http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet48.java?view=mar...

Specify order/location of swt widgets in a composite object?

I would like to create all my widgets before inserting them into my swt Composite parent. But as I understand the parent is always specified in the constructor when a child is created: Composite container = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); container.setLayout(layout); layout.numColumns = 3; layout.v...

SWT Composite needs pack() in 3.6.1

My wizard isn't rendering correctly in Eclipse 3.6.1. It's leading me to wonder: when does one have to use Composite.pack()? Some SWT examples have it, and some don't. How my wizard pages renders depends on the target platform. If I run my plugins in 3.5.2, they render correctly as soon as I open them. But in 3.6.1, their contents areas...

GEF EditPartViewer selection

I'm experimenting a strange issue developing Drag and Drop with GEF. If I start a drag operation of a not yet selected element in a org.eclipse.gef.ui.parts.TreeViewer the selected element got from EditPartViewer.getSelectedEditPart() is different from the one obtained via the SWT Tree control (Tree.getSelection()). This appens only wh...

is it possible to have vertical SWT controls?

I would like to have some of the controls in an app - Buttons and Labels - vertically oriented - . However i could not find a possibilty to do this. Even the non-public setOrientation method tackles only the left-to-right orientation. Is it possible without implementing a custom Button or deriving from Canvas? ...

FilteredTree (JFace): custom filter that shows all children

Hi, I'm currently using a FilteredTree with a PatternFilter to display data in a Tree. My problem is that it only shows the elements matching the pattern and hides their children (except they also match the pattern). Example: Tree: A -B --1 --2 -C --1 --2 Pattern "B" gives me: A -B But I need: A -B --1 --2 I tried a few t...

Detect Window Builder

Hi, I am using Google Window Builder Pro for SWT and we use a lot of custom components here. The components rely on being used within our framework, but this makes them unusable in Window Builder (exeptions are thrown when used outside of our framework, like, in Window Builder). How do I detect that Window Builder is using our componen...