swt

MouseDown events are not delivered until MouseUp when a Drag Source is present

大城市里の小女人 提交于 2019-12-04 22:51:51
I have a mouse listener. It has some code to respond to mouseUp and mouseDown events. This works correctly. However, as soon as I add a DragSource, my mouseDown event is no longer delivered -- until I release the mouse button! This is trivial to reproduce - below is a simple program which contains a plain shell with just a mouse listener and a drag listener. When I run this (on a Mac), and I press and hold the mouse button, nothing happens - but as soon as I release the mouse button, I instantly see both the mouse down and mouse up events delivered. If I comment out the drag source, then the

Rename a treeViewer Node with SWT

笑着哭i 提交于 2019-12-04 21:41:46
I have a treeViewer on which I have to implement editing for renaming that should be able to be invoked in two ways: by the F2 key by a single mouse click if a node is selected. More ever as Windows allows folder rename. For this, I have used ICellModifier , but it has not given the expected result. By the following code, I have achieved point number 2 though it is creating a problem for opening the editor on a double click if a node is selected. The main concern is to allow the F2 key for renaming which is still pending. I have to use the same code that I have written in the following in a

Java SWT Refresh Multiple Shells From Button

爱⌒轻易说出口 提交于 2019-12-04 20:52:32
I am building an app that accesses a database and currently I have a SWT Shell that displays the main table. From this table users can open individual records and from inside the records form the user can open a second form that is of the same type but contains different data. If the record in either form is updated the update is reflected in the main form. My problem is I can't update the first record form that is opened. Is there a way to force an update or redraw for all open forms of a certain type or is there a way I can update multiple shell of the same type at the same time. The screen

How do I make it possible to resize a composite by dragging the corner

爱⌒轻易说出口 提交于 2019-12-04 19:03:14
I am working with SWT and I would like to be able to resize a composite by dragging the corner of it, the same way that you can resize a shell. I'm sure someone out there has implemented a good solution. Thanks. I think what you are looking for can be implemented with org.eclipse.swt.widgets.Tracker here is sample working code: public static void main(String[] args) { Display display = new Display(); final Shell shell = new Shell(display); shell.open(); final Composite b = new Composite(shell, SWT.NONE); b.setBounds(20, 20, 80, 80); b.setBackground(display.getSystemColor(SWT.COLOR_BLUE)); b

Tooltip in other colums with Java SWT?

陌路散爱 提交于 2019-12-04 18:45:11
I have a table with 4 columns. I try to integrate a ToolTip for all cells of the third column. With my Code the ToolTip only appears for the cells of the first column. This is my Code: protected void checkAction() throws Exception { System.out.println("Start Test"); //Erstellen einer neuen Shell final Shell shell = new Shell(); shell.setSize(280, 300); shell.setText("Testtabelle"); //Erstellen einer neuen Tabelle final Table table = new Table(shell, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION); table.setLinesVisible(true); table.setHeaderVisible(true); //Einlesen der Überschriften und Vergabe

Open eclipse juno with error “No more handles …” in Ubuntu 12.04

故事扮演 提交于 2019-12-04 17:49:41
问题 Starting today, every time I open up the eclipse, I got a message box with title "Problem Occured" pops up saying: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)] possible args: {0}, {1}, {2}, {3} No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)] Then I click "OK" and proceed to the workbench, I got another error saying An SWT error has occurred. You are recommended to exit the workbench. Subsequent errors may happen and exit the workbench without warning.

Build multiple architecture SWT application with Maven

我们两清 提交于 2019-12-04 17:48:33
问题 I've set up a Maven project for a SWT application. This application runs on several platforms (OS X, Windows 64-bit, Windows 32-bit, Linux 64-bit and Linux 32-bit) and I've set it up so that the platform is detected when Maven is run and the packaged application goes to different destination directories. Here are the relevant parts from pom.xml to achieve this: <profiles> <profile> <id>linux_x86_64</id> <activation> <os> <name>linux</name> <arch>amd64</arch> </os> </activation> <build>

SWT.WebKit doesn't load: No More Handles - [Safari must be installed to use a SWT.WEBKIT-style Browser]

送分小仙女□ 提交于 2019-12-04 17:25:43
I'm having trouble using SWT.WEBKIT as the Browser for a SWT-Based Java app, and I am now getting this stacktrace upon starting the application on a new machine: Exception in thread "main" org.eclipse.swt.SWTError: No more handles [Safari mus t be installed to use a SWT.WEBKIT-style Browser] at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.browser.WebKit.create(Unknown Source) at org.eclipse.swt.browser.Browser.<init>(Unknown Source) [...] Now, I did follow all the steps from the SWT FAQ on how to use Webkit; Safari is installed, the JVM is 32-Bit (just as Safari is, too), and

Java SWT TreeViewer with one column that needs to be StyledText

╄→гoц情女王★ 提交于 2019-12-04 16:56:43
I have a TreeViewer used in an eclipse plugin that uses a content provider and a label provider that implements all of ( ITableLabelProvider , IFontProvider , IColorProvider ). But I need one of the columns of the table it creates to hold "links" - underlined blue text that when clicked causes some popup to open. I guess what I want to do is cause that single column to hold styled text and not just text, and attach a listener to the items in that column of the tree, but I couldn't figure out how to do it. greg-449 Use a separate label provider for each column using TreeViewerColumn :

Show local HTML file with JavaScript in SWT Browser widget in RAP

拜拜、爱过 提交于 2019-12-04 16:45:00
For my RAP-project I need to show some charts. Because I haven't found any widget for this purpose, my plan was to use the browser widget, so I can use JavaScript-Plugins like Highcharts or Chartsjs. But I can't get it working. If I set an HTML-File in browser.setUrl, the browser widget don't show anything, not even simple HTML. The JavaScript-Console in Chrome says Not allowed to load local resource If I enter the HTML-Code with the setText method it shows the HTML, but JavaScript is not working, it don't load external JS-File like the jQuery-library. Can't this be done this way? Or where is