swt

Questions on Nebula NatTable sorting and filtering

喜欢而已 提交于 2019-12-25 09:02:44
问题 I have been using Nebula NatTable for quite sometime in my project and is familiar with the basics. I Have 2 questions on sorting and filtering. There are separate examples given for sorting and filtering filter example, sort example . My question is , can I include both these features in one instance of NatTable? Can I remove the filterheader control after the NatTable instance is created? If yes, how can that be done ? 回答1: Yes and there are several examples showing that. Some of them are

How to disable overlay scrollbars programmatically (Ubuntu Java)

蓝咒 提交于 2019-12-25 08:33:28
问题 Trying to port to Ubuntu my SWT application that works fine in Windows , I have encountered an issue with overlay scrollbars . When I run the application from under Eclipse , everything is OK, scrollbars look and behave normally. But when I pack the application into a JAR and execute this JAR , the scrollbars in the application will become "overlay scrollbars" and look like thin orange strips, and the scrollbar events, that I need to handle, are supposed to have some strange field values, so

Why cant I open 32bit Outlook on a 64bit System using a JAR when it worked in Eclipse…?

六眼飞鱼酱① 提交于 2019-12-25 08:09:02
问题 The Java app I am developing is an internal tool for others to use to help our daily activities. When the tool is used (on a JButton press which calls the code below) I want it to open a new Outlook EMail for the user to see/edit. At first I was developing this app in a 64 bit Eclipse and could not get SWT to open Outlook despite all my research. After I had some issues running 64bit versus 32bit SWT, I had the idea to check Outlook, and sure enough the company using is 32 bit. I loaded up a

SWT on different systems

删除回忆录丶 提交于 2019-12-25 07:28:22
问题 I used Java and SWT's Browser . I prepare two system versions of application, first for OSX second for Windows. Both systems are 64bit SWT need different libraries for different systems so in Maven I declared both <profile> <id>windows-deploy</id> <dependencies> <dependency> <groupId>org.eclipse.swt</groupId> <artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId> <version>4.6.1</version> </dependency> </dependencies> </profile> <profile> <id>osx-deploy</id> <dependencies> <dependency>

Correct way do preserve shell aspect ratio in SWT

a 夏天 提交于 2019-12-25 07:24:34
问题 I've been trying to find a way to force a shell to resize preserving a certain aspect ratio. This is the only way I've come up with: shell.addControlListener(new ControlListener() { @Override public void controlMoved(ControlEvent e) {} @Override public void controlResized(ControlEvent e) { final Rectangle window = mShell.getClientArea(); if (aspectRatio <= 1) { window.width = (int) (window.height * aspectRatio); } else { window.height = (int) (window.width / aspectRatio); } shell.setSize

SWT - Use Text or StyledText as output for a Process

我只是一个虾纸丫 提交于 2019-12-25 06:54:59
问题 I have a class that extends OutputStream and is used to make the output of said OutputStream into a Text or StyledText. The class works great, however it introduces a problem. I am working on an SWT application that includes a fake console. I'm not using it to run sytem commands, but rather a few different Minecraft servers that I use for slightly different development environments/purposes. From what I've read about ProcessBuilder, inheritIO() is supposed to make the resulting Process' IO

Writing Junits test class for a DoubleClickListener

独自空忆成欢 提交于 2019-12-25 06:33:30
问题 I need to write a Junit test class for my DoubleClickImplementation class. Here is the code : DoubleClickImplementation.java public class DoubleClickImplementation implements IDoubleClickListener { private TreeViewer treeViewer; public DoubleClickImplementation(TreeViewer viewer) { this.treeViewer = viewer; } /** * Expands and Collapses the tree items. * * @param event * */ @Override public void doubleClick(DoubleClickEvent event) { IStructuredSelection selection = (IStructuredSelection)

Layout setting for a jface Table

大城市里の小女人 提交于 2019-12-25 05:31:58
问题 I created a CheckboxTableViewer to show a list of stuff as shown in figure below. The problem are the scrollbars of the table are not working as it should. May be I am missing some layout parameters for the table? And here is the code: public class TableViewerClass { CheckboxTableViewer tableViewer; private GridData gridData; private List<String> checkListNames = new ArrayList<String>(); public TableViewerClass(Shell parent){ checkListNames.add("Function Trace 1"); checkListNames.add(

How to hide SWT Browser or run in headless mode?

核能气质少年 提交于 2019-12-25 05:14:40
问题 I took the rendered page from the SWT Browser and exported it to an image. My problem is that I am not able to get it to export properly when the shell is not visible. How can I go about hiding the browser and have the image export properly? I have tried setting shell.Visible() to false but that messes up the image export. This is how I export the image (not sure if this is necessary to the question): GC source = new GC (shell); Image image = new Image(display, browser.getClientArea());

Eclipse Kepler RCP CoolBar Actions CSS

只愿长相守 提交于 2019-12-25 04:55:16
问题 Similar to this question's screenshot, my RCP App has those annoying spaces between actions on the coolbar. My guess is that it's because I'm using deprecated extensions in the plugin.xml (i.e. viewActions actionSet s). For now, I don't want to begin changing all those action implementations to comply with the new rules (mostly because there are A LOT of those actions). Question : Can I somehow apply CSS styling to that CoolBar so that extra spaces are grabbed by the actions? The road so far