swt

Why does the table viewer's horizontal scrolling disappears once the wizard page is brought back to its normal size post expansion?

喜夏-厌秋 提交于 2020-03-25 18:20:59
问题 I have a table viewer displayed on a wizard page. The first time the page is displayed, as seen both horizontal and vertical scroll bars are present as yellow highlighted shown in below image- The horizontal scroll bar disappears once the wizard page is expanded in both directions and then brought back to its normal size. As seen below, only the vertical scroll bar is there, but the horizontal scroll bar is lost. How can I bring back the horizontal scroll bar? The code snippet to simulate the

Why does the table viewer's horizontal scrolling disappears once the wizard page is brought back to its normal size post expansion?

好久不见. 提交于 2020-03-25 18:20:50
问题 I have a table viewer displayed on a wizard page. The first time the page is displayed, as seen both horizontal and vertical scroll bars are present as yellow highlighted shown in below image- The horizontal scroll bar disappears once the wizard page is expanded in both directions and then brought back to its normal size. As seen below, only the vertical scroll bar is there, but the horizontal scroll bar is lost. How can I bring back the horizontal scroll bar? The code snippet to simulate the

Could not load SWT library on Windows 32-bit

故事扮演 提交于 2020-03-21 11:52:08
问题 I am almost done with one Java project that I have been developing on Linux. Now I need to build and test it on Windows. So I have installed Eclipse on Windows XP 32-bit, and imported my project. All dependencies of project are in jar files in lib folder, and on Linux everything works well, but on Windows XP I get following error: Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: no swt-pi-gtk-4234 in java.library.path no swt-pi-gtk in java

eclipse SWT Designer 插件详解

大兔子大兔子 提交于 2020-03-16 14:16:42
某厂面试归来,发现自己落伍了!>>> 今天本来想用swing做个小软件,就搜了下eclipse插件,果然有。 先下swt zip包,地址: http://www.eclipse.org/windowbuilder/download.php 1、选择自己eclipse对应的版本,eclipse版本查看:help→about eclipse。 2、然后help→install new software。选中1中下载的zip包,然后傻瓜式地一直下一步。完了eclipse progress进度条会显示安装中... 如图: 3. 安装好后直接new一个swt project,然后src里new一个JFrame如图: 最后如图,可视化SWT设计界面,右键点击框图可以添加事件等: 来源: oschina 链接: https://my.oschina.net/u/2400412/blog/520580

issue drawing aligned text using TextFlow and FlowPage

我的未来我决定 提交于 2020-03-06 04:51:21
问题 i'm drawing a multiline text label using a FlowPage object that contains a TextFlow object. the code of my label class is: class TransitionLabel extends FlowPage { private TextFlow content; public TransitionLabel() { setForegroundColor(ColorConstants.white); setHorizontalAligment(PositionConstants.CENTER); content = new TextFlow(); content.setOpaque(true); content.setText(""); add(content); } public void setText(String content) { this.content.setText(content); revalidate(); repaint(); }

How to update controls on a wizard page?

不打扰是莪最后的温柔 提交于 2020-03-05 00:27:45
问题 I have a wizard consisting of 2 wizard pages. @Override public void addPages() { super.addPages(); addPage(firstPage); addPage(secondPage); } I see that the createControl method of both the pages gets called immediately when the wizard is shown. The first wizard page has a text field. I want to display the same text value on the second page entered by the user on the first page when he navigates from first page to the send page. How can I achieve this? How can I update the controls? 回答1: This

How to avoid widgets being added while moving back and on then clicking Next?

主宰稳场 提交于 2020-03-04 17:39:10
问题 I have created a Wizard. it has 3 pages- @Override public void addPages() { super.addPages(); addPage(firstPage); addPage(secondPage); addPage(thirdPage); } For the first page, I have a simple label with a input field to collect user entered value- @Override public void createControl(Composite parent) { Composite page = new Composite(parent, SWT.NONE); setControl(page); setPageComplete(false); // page.setLayout(new GridLayout(2, false)); GridLayout gridLayout = new GridLayout(); gridLayout

How to avoid widgets being added while moving back and on then clicking Next?

為{幸葍}努か 提交于 2020-03-04 17:37:09
问题 I have created a Wizard. it has 3 pages- @Override public void addPages() { super.addPages(); addPage(firstPage); addPage(secondPage); addPage(thirdPage); } For the first page, I have a simple label with a input field to collect user entered value- @Override public void createControl(Composite parent) { Composite page = new Composite(parent, SWT.NONE); setControl(page); setPageComplete(false); // page.setLayout(new GridLayout(2, false)); GridLayout gridLayout = new GridLayout(); gridLayout

SWT内嵌浏览器Browser对象使用JQuery等Web插件

▼魔方 西西 提交于 2020-03-01 21:19:47
前言 我们知道web 的UI界面真得很漂亮,而且开源社区有很多插件可以用,所以要开发出漂亮的页面也很容易。那么,我们使用SWT/JFace进行桌面软件的开发时,也想要实现一些像JQuery EasyUI等等漂亮的表格,可以说是非常难。但是,SWT Browser 是 Eclipse SWT 的标准部件,它提供了把 HTML 整合到 Java 平台的能力。该部件植入了平台流行的 HTML 渲染引擎:在 Microsoft Windows 平台上是 IE,在 Linux 平台上是 Mozilla,在 Apple Mac 平台上是 Safari。但在实现的过程中还是有很多很坑的,笔者在网上搜了很多资料,都太简略,没什么干货。所以,只能自己摸索。废话不多说,我们直接干吧! 一. 创建简单的浏览器 import org.eclipse.swt.*; import org.eclipse.swt.browser.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class SimpleBrowser { public static void main(String [] args) { Display display = new Display(); final Shell shell =