swt

SWT components relayout after visibility set to false

♀尐吖头ヾ 提交于 2019-11-26 17:13:08
问题 Lets say if I have a GridLayout composite with column = 1. (Something like a vertical flow layout) I have added Label 1, Label 2, Label 3 to this composite, and they will appear accordingly. ---------- Label 1 | Label 2 | Label 3 | ---------- So is it possible that if I set the visibility of Label 2 to be false , can Label 3 move up to replace Label 2? And if Label 2 visibility is set back to true , Label 3 will move down? 回答1: A very simple solution could use GridData::exclude property. For

Android 干货技术,欢迎收藏

跟風遠走 提交于 2019-11-26 17:12:51
本文主要收集 Android 开发中常用的干货技术,此文不断更新中,欢迎收藏、投稿。 Android 四大组件与布局 1. Activity 使用详解 2. Service 使用详解 3. Broadcast 使用详解 4. ContentProvider 使用详解 5. 四大布局 使用详解 6. Resource 使用详解 Android 基本控件 View 1. Dialog 使用详解 2. ListView 使用详解 3. GridView 使用详解 4. Fragment 使用详解 5. PopWindow 使用详解 6. Notification 使用详解 7. TextView 使用详解 8. Button 使用详解 9. ImageView 使用详解 10. EditText 使用详解 Android 自定义控件View 1. 自定义仿 IPhone 开关控件 2. 自定义 仿 Settings itemClickView 3. 自定义 仿 Settings itemCheckView 4. 自定义 仿 SettingsItemToggleView 5.自定义 Button 选择器 6. 自定义EditText 样式 7.自定义 CheckBox 样式 Android 数据存储 1. Preference 使用详解 2. SharePerference 使用详解 3.

Java Desktop application: SWT vs. Swing [closed]

僤鯓⒐⒋嵵緔 提交于 2019-11-26 16:57:46
I'm a web developer at day and thinking about building my first real desktop application. The idea is to build a tool that automates a very repetitive task in a web application where no API is available. I know I want to use Java. I used it before for web stuff, know the syntax pretty well and want the application to be cross plattform as easy as possible. Where I'm not so sure is if I should use SWT or Swing. As my main audience uses Windows, I want to look it as native as possible there. Linux and Mac should work, but the looks are not so important here. So what are the arguments for and

Adding a remove button to a column in a table

拈花ヽ惹草 提交于 2019-11-26 16:45:40
问题 Is it possible to add a Remove button to a cell in a table? I have a table with 5 columns, I would like to add a 6th column. I want the 6th column to have a remove button in each row. Example Row: | 10002 | part | Metal | 001 | Yes | Remove | That way the user can remove any unwanted rows by just clicking the button. I have a markup column in the table and it is ComboBox . I created a class that extends EditingSupport . Would I need to make a another class extending EditingSupport , but

SWT 手机重启问题分析指南

£可爱£侵袭症+ 提交于 2019-11-26 16:43:15
极力推荐文章:欢迎收藏 Android 干货分享 阅读五分钟,每日十点,和您一起终身学习,这里是程序员Android 本篇文章主要介绍 Android 开发中的部分知识点,通过阅读本篇文章,您将收获以下内容: 一、SWT 手机重启问题简介 二、SWT 手机重启问题处理流程 三、SWT 手机重启问题的原因 四、SWT 手机重启问题分析流程 五、SWT 手机重启问题分析举例 六、Android O以上导 Log 注意事项 一、 SWT 手机重启问题简介 SWT(Software Watch Dog ) 主要用来监控 SystemServer 等 重要线程/Service 的运行情况。如果发现其阻塞超过 60s ,看门狗进程就会把系统重启,进而保证系统可以恢复到正常状态。 判断阻塞的方法 : 1.利用 Services 注册monitor 去Check 主要是: AMS 、 Foreground Thread 发送handler 到重要的Loop 线程来Check 是否阻塞。 主要是: Main Thread 、 UI Thread 、 IO Thread 、 Display Thread 、 WMS 、 Other Services 。 SWT 判断阻塞的方法 图文描述如下: 二、 SWT 手机重启问题处理流程 SWT 处理流程: 1.每半分钟check 一次system_server

Invalid Thread Access Error with Java SWT

空扰寡人 提交于 2019-11-26 16:25:44
I have a simple Java SWT app in Java so far but the weird thing is when I try to launch a messagebox/alert box upon listening to an event fired by one of my own classes, I get an error saying "Invalid thread access". My class event is fired and heard by the main class but it is when it has to show the MessageBox that the "Invalid thread access" error appear. I am trying to show the MessageBox in a function that consist of all the other codes that will create the SWT GUIs. This is how the function looks like: public void createContents() { Shell shell = new Shell(); //.....all the SWT GUI codes

Libraries for pretty charts in SWT? [closed]

筅森魡賤 提交于 2019-11-26 15:55:48
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I know the following libraries for drawing charts in an SWT/Eclipse RCP application: Eclipse BIRT Chart Engine (Links to an article on how to use it) JFreeChart Which other libraries are there for drawing pretty charts with SWT? Or charts in Java generally? After all, you can always display an image... 回答1: I have

Running SWT based, cross-platform jar properly on a Mac

蓝咒 提交于 2019-11-26 15:35:53
问题 I have been working on a SWT-based project which is intended to be deployed as Java Web Start, and thus be used on multiple platforms. So far I have managed to tackle the exporting problem that arises due to the system-specific libraries SWT depends on (see relevant thread). The resultant jar seems to work start fine on 32/64-bit linux and 64-bit windows, however execution fails on a Mac with the following output: $ java -jar dist/test.jar Adding { file:/Volumes/LaCie/ChiBE_Local/swt/swt

How to draw a tree representing a graph of connected nodes?

你说的曾经没有我的故事 提交于 2019-11-26 15:27:14
I want to display a tree in a Java GUI, but I dont know how. The tree represents a graph of connected nodes, like this: I should say that I have my own tree class: public class BinaryTree { private BinaryNode root; public BinaryTree( ) { root = null; } public BinaryTree( Object rootItem ) { root = new BinaryNode( rootItem, null, null ); } public BinaryTree( Object rootItem,BinaryNode a,BinaryNode b ) { root = new BinaryNode( rootItem, a, b ); } public int leavesCount(){ return BinaryNode.leavesCount(root); } public boolean equal(BinaryTree a,BinaryTree b){ return BinaryNode.equal(a.root, b

SWT No More Handles

浪尽此生 提交于 2019-11-26 12:04:05
问题 Windows XP has the limit 10000 user handles for each process and total 32000 for each desktop session. However, when I run 4 or 5 SWT process, each consuming no more than 2000 user handles, the SWT No More handles exception will always be threw. Does anyone know why? 回答1: If I understand you correctly, you are probably getting the following exception: org.eclipse.swt.SWTError: No more handles You may be creating resources (such as Font , Image or GC objects) that you aren't correctly