swt

SWT/JFace or Eclipse RCP?

不羁岁月 提交于 2019-12-04 15:55:46
问题 Which are the reasons to choose the Eclipse Rich Client Platform as the base of my application, instead of just using SWT/JFace? 回答1: Eclipse RCP is not just a GUI (SWT/JFace), but an OSGi -based platform. So, you would choose the RCP framework in order to: have a better definition of your different modules manage their lifecycles, and versions compatibility isolate classloader issues. If your application is just one monolithic GUI font-end, RCP might be a bit overkill. 回答2: In additions to

Background color of widgets in JFace PopupDialog

巧了我就是萌 提交于 2019-12-04 15:53:17
I want to use the JFace PopupDialog as lightweight dialog for user input. But I have some problems with the background color of text widgets. As you can see below in 1 , a SWT.MULTI text widget has no background and border, a SWT.SINGLE text widget has no background. I tried to override the background color with: Text comment = new Text(composite, SWT.MULTI|SWT.BORDER); comment.setFocus(); comment.setBackground(new Color(Display.getDefault(), new RGB(000, 000, 000))); // method of PopupDialog applyBackgroundColor(new Color(Display.getDefault(), new RGB(000, 000, 000)), comment); Does anybody

Print using SWT Browser Widget

帅比萌擦擦* 提交于 2019-12-04 15:22:25
I want to print the contents of a SWT Browser Widget. but it prints the only the visible part of the browser not the full content of it. Please help. I've modified the SWT Browser snippet to selected code, and it work for me like a charm.. import org.eclipse.swt.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; import org.eclipse.swt.browser.*; public class BrowserPrintTest { public static void main(String [] args) { Display display = new Display(); final Shell shell = new Shell(display); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 3; shell.setLayout

Graph visualization libraries for SWT/AWT

拥有回忆 提交于 2019-12-04 14:51:33
问题 Is there a mature, solid open-source graph visualization library implementation for SWT or AWT (I am referring to sets of vertices connected with edges, not charts and diagrams)? Which one do you use/recommend? I saw Zest for SWT, but could not find a Maven repository for it. Thank you. 回答1: I recommend Prefuse: http://prefuse.org/ 回答2: Have a look at JUNG ( http://jung.sourceforge.net/ ) 回答3: If you don't want to use Zest (which I prefer), there is still Draw2D : Draw2D Also, there is a good

Embed SWT Composite into C# application

依然范特西╮ 提交于 2019-12-04 14:16:05
问题 I've got a Java application that uses SWT as its widget toolkit. I've also got a Windows C# application. I'd like a way to draw an SWT Composite into this C# application. I can think of two ways to do this: Handles: Since SWT is based on the native windowing toolkit, it seems like there should be a way to create a Composite in the C# application, pass the native pointer to the Java application, and then control the Composite from there. OLE: Since SWT can definitely consume OLE components,

SWT Table with variable row height: Working on Linux, but not Mac/Windows

烂漫一生 提交于 2019-12-04 13:27:44
问题 Problem: I need an SWT Table (JFace TableViewer) with variable row height. In fact, I solved this on my development machine (running Ubuntu 10.10). Unfortunately, this doesn't work on Windows nor on Mac. Initially, I thought I didn't use the libraries correctly. But by now I fear that what I want to do is simply not possible on Windows. I hope someone here convinces me otherwise. To reproduce: rather than providing my code here, I built a minimal program to reproduce the problem. I started

can I combine SWT GridLayout and FillLayout

泪湿孤枕 提交于 2019-12-04 12:50:27
问题 I have an RCP/SWT application in which I'm trying to construct a view out of existing composites. One is a FillLayout composite, the other uses GridLayout. I'd to like to end up with a view in which the GridLayout composite is lined up to the left of the FillLayout composite (think vertical banner) and is about 10 percent the width of the entire view, with the existing FillLayout composite comprising the other 90 percent. I'm not sure if it is possible in SWT to combine layouts, but I'm

How to talk to a Javascript function from SWT

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 12:09:53
问题 My HTML file has a javascript function xxx_return(), which will return a string value. Is there any way i can take this value from Java layer?. I am using SWT shell to display this html. Does SWT carry any feature to get the return values of a script function? edit: My code is something like below: package test.html.simulation; import org.eclipse.swt.SWT; import org.eclipse.swt.SWTException; import org.eclipse.swt.browser.Browser; import org.eclipse.swt.widgets.Display; import org.eclipse.swt

Java based Swing Browser should support JavaScript

本秂侑毒 提交于 2019-12-04 11:42:07
In my company, I am implementing a java based html browser. I found a lot of tools to generate complete browsers only in Swing which are looking like Mozilla. But I was not able to find a browser which supports JavaScript. The browser I will implement should execute JavaScript inside the HTML sides. Do you know of a tool that supports this? Or do you know of a parser which pairs the javascript to something I can use inside the html browser? I know that the eclipse plugins can handle javascript, but I can not use AWT in my project. Thanks for your help. I'd look at Lobo . It sounds like just

How do I add an icon as a classpath resource to an SWT window created with WindowBuilder?

荒凉一梦 提交于 2019-12-04 10:32:14
问题 I'm trying to add an external icon from an *.ico file to a window that I'm creating using the WindowBuilder design window. I can select the shell, which brings up an "image" properties field. That brings up the image chooser dialog box: How do I make my icon show up in this menu as a classpath resource? The image works if an absolute path is given, but I don't want to use that option in my application. Thanks! 回答1: To easily add an icon to my classpath, I found my desired icon, right clicked