swt

细说Java GUI:AWT,SWT,Swing

吃可爱长大的小学妹 提交于 2020-03-01 03:09:21
历史 Internet上有许多围绕这一争论的故事。你可能已经听说过它们中的大多数了,其中之一有助于让你理清头绪,让我们就从这里开始,Amy Fowler是Swing阵营的一个倡导者。 回到上个世纪90年代,曾几何时有3家庞大的Smalltalk公司——IBM、Parc-Place和 Digitalk。在90年代初期3家公司的市场份额大致相等,生活是美好的。Parc-Place采用仿窗口部件(emulated widgets)的设计(即Swing的设计),IBM和Digitalk则采用原生窗口部件(native widgets)。后来IBM压倒了另外两家,因此他们打算合并成一家,假设叫做Parc-Place Digitalk。随后当他们试图将他们的产品融合到一个叫做Jigsaw的计划中时爆发了一场大战,计划由于政治原因失败了(开发人员实际上已经能让它运转起来),就因为原生和仿造两派的死战。 Amy赢得了精神上的胜利,不过IBM赢得了他们所有的生意,因为这两家公司在一整年里除了吵架什么都没做。当尘埃落定之后PPD(Parc-Place Digitalk当时已改名为Objectshare,跟Windscale改名为Sellafield的原因相同——让人们淡忘之前发生的灾难)的股票价格从60美元掉到了低于1美元1股。他们因为伪报收入被NASDAQ摘牌,从此消失。 当时,AWT已经出现了

ocr 连接开源项目

泄露秘密 提交于 2020-02-27 02:32:39
https://github.com/Raymondhhh90/idcardocr:web部署,第二代居民身份证信息识别,速度略慢,待优化 https://github.com/wzb19960208/idCardRecognition身份证识别 https://github.com/rmtheis/android-ocr基于Tesseract的身份证识别 https://github.com/developer79433/passport_mrz_detector_cpp护照识别 https://github.com/evilgix/Evil: 银行卡、身份证、门牌号光学识别 https://github.com/YCG09/chinese_ocr:基于Tensorflow和Keras实现端到端的不定长中文字符检测和识别 说明:样本有300万张 https://github.com/AstarLight/CPS-OCR-Engine:3755个(一级字库)的印刷体汉字识别 https://github.com/senlinuc/caffe_ocr:CNN+BLSTM+CTC的识别架构 https://github.com/simplezhli/Tesseract-OCR-Scanner:基于Tesseract-OCR实现自动扫描识别手机号 车牌识别 https://github

SWT Shell with round corners

戏子无情 提交于 2020-02-24 09:07:40
问题 I have been trying to create a SWT Shell with rounded corners with no success. Google does not help much on this area, and I have been trying to set a Region on the shell, but I cannot find a way to make a region that is a round rectangle. If somebody could point me on the right direction would be awesome. Thanks 回答1: I believe the only way is to manually build your rounded Region , then set it to the shell (or any SWT control anyway). It is not that hard in the end... 4 circles and 2

org.eclipse.swt.widgets.Button click from code

杀马特。学长 韩版系。学妹 提交于 2020-02-21 10:09:37
问题 I am trying to click Button from code. I am tying to do the following: class MyMouseAdapter extends MouseAdapter { public void mouseDown(MouseEvent evt) { System.out.println("Working!!!!"); } } Button button = new Button(); button.addMouseListener(new MyMouseAdapter()); now I want to run the mouseDown method from code could you tell me how to do it? Thank you. 回答1: You can do this: button.notifyListeners( SWT.MouseDown, null ); Where null is an Event . Remember that this is the Event received

org.eclipse.swt.widgets.Button click from code

懵懂的女人 提交于 2020-02-21 10:08:28
问题 I am trying to click Button from code. I am tying to do the following: class MyMouseAdapter extends MouseAdapter { public void mouseDown(MouseEvent evt) { System.out.println("Working!!!!"); } } Button button = new Button(); button.addMouseListener(new MyMouseAdapter()); now I want to run the mouseDown method from code could you tell me how to do it? Thank you. 回答1: You can do this: button.notifyListeners( SWT.MouseDown, null ); Where null is an Event . Remember that this is the Event received

SWT - OS agnostic way to get monospaced font

丶灬走出姿态 提交于 2020-02-09 06:54:45
问题 Is there a way in SWT to get a monospaced font simply, that works across various operating systems? For example. this works on Linux, but not Windows: Font mono = new Font(parent.getDisplay(), "Mono", 10, SWT.NONE); or do I need to have a method that tries loading varying fonts (Consolas, Terminal, Monaco, Mono) until one isn't null? Alternatively I could specify it in a properties file on startup. I tried getting the system font from Display, but that wasn't monospaced. 回答1: According to the

SWT - OS agnostic way to get monospaced font

删除回忆录丶 提交于 2020-02-09 06:54:31
问题 Is there a way in SWT to get a monospaced font simply, that works across various operating systems? For example. this works on Linux, but not Windows: Font mono = new Font(parent.getDisplay(), "Mono", 10, SWT.NONE); or do I need to have a method that tries loading varying fonts (Consolas, Terminal, Monaco, Mono) until one isn't null? Alternatively I could specify it in a properties file on startup. I tried getting the system font from Display, but that wasn't monospaced. 回答1: According to the

How to draw rotated text inside of a GC

喜夏-厌秋 提交于 2020-02-06 07:29:45
问题 I doing some 2D drawing in a SWT GUI. For that I have a GC Object. How can I draw rotatet text inside of an SWT Canvas? 回答1: This should do it: Transform tr = new Transform(display); tr.rotate(-90); gc.setTransform(tr); gc.drawText("Text", x, y); 来源: https://stackoverflow.com/questions/12618023/how-to-draw-rotated-text-inside-of-a-gc

Accessing the current processes handles

偶尔善良 提交于 2020-02-04 07:02:09
问题 In our RCP 4 application we have had SWT exceptions thrown caused by there being no more handles available. This could be caused by a resource leak or by other 3rd party applications running. We are unable to reproduce this in development so we would like to log any information that could possibly help us fix this in the future. We would like to get information about the handles. E.g. Total handles and what they are used for such as images, fonts, and composites. I've been looking this up and

Accessing the current processes handles

大兔子大兔子 提交于 2020-02-04 07:01:26
问题 In our RCP 4 application we have had SWT exceptions thrown caused by there being no more handles available. This could be caused by a resource leak or by other 3rd party applications running. We are unable to reproduce this in development so we would like to log any information that could possibly help us fix this in the future. We would like to get information about the handles. E.g. Total handles and what they are used for such as images, fonts, and composites. I've been looking this up and