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.
...
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...
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...
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...
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:
...
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...
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 ...
Using the Eclipse SWT StyledText widget, how can you indent/un-indent a selected block of text with the tab or shift+tab keys?
...
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...
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
...
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...
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...
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?
...
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...
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...
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...
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...
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?
...
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...
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...