Swt 小结(二)

Dialog(Shell parent, int style)

style的风格如下
SWT.APPLICATION_MODAL : 阻塞应用程序中的其他窗口的输入.
 
SWT.PRIMARY_MODAL : 阻止父类窗口的输入, 其他的窗口不阻塞
 
SWT.SYSTEM_MODAL : 阻止所有的应用程序, 知道dialog处理完毕.
 
SWT.NONE : Modeless (the default).


ApplicationWindow

// 传入一个指定的parentShell
public ApplicationWindow(Shell parentShell)

IStatusts

IStatus Severity Codes

IStatus.CANCEL : Indicates that this status represents a cancellation
IStatus.ERROR : Indicates that this status represents an error
IStatus.INFO : Indicates that this status represents information
IStatus.OK : Indicates that this status represents an OK state
IStatus.WARNING : Indicates that this status represents a warning


public Status(int severity, String pluginId, int code, String message, Throwable exception)

// 注意 多个status时候, 他的severity为 最大的那个
public MultiStatus(String pluginId, int code, IStatus[] newChildren, String message, Throwable exception)


Action (就是抽象的一个动作, 点击menu, toolbar, 快捷键都触发同样的事情


Menu, MenuItem

Menu Styles Style  Description
SWT.BAR : 主菜单栏
 
SWT.DROP_DOWN : 在一个菜单下弹出下拉菜单 public Menu(Menu parentMenu): 默认设置为下拉菜单
 
SWT.POP_UP : 创建弹出菜单 Menu(Control parent) : 默认将菜单设置为parent的弹出菜单。
 
SWT.NO_RADIO_GROUP : 创建菜单, 但是不支持 单选按钮组.


MenuItem Styles Style Description
 
SWT.CHECK : Creates a menu item that can be toggled on and off.
 
SWT.CASCADE : 代表这个menu Item 还有子菜单条目.
 
SWT.PUSH : 菜单条目可以被点击.
 
SWT.RADIO : Creates one item within a group that can be toggled on and off.
 
SWT.SEPARATOR : Creates a separator item.


IPreferenceStore : 存储配置文件的值.

// 向prestore增加监听器, 监听prestore的变化
// 当prestore.setValue(key, value) 时候, 会触发监听器.
preStore.addPropertyChangeListener(this);


ModalContext : 用于长时间的操作, 在单独的线程中执行.

ImageDescriptor : 用于创建图片
JFaceResources:
ColorRegistry: put(String symbolicName, RGB colorData) : 会触发监听器的变化.
FontRegistry:
ImagaeRegistry:

Geometry: 提供了一系列的几何学函数.

ListenerList : 管理一系列监听器

StringConverter : 一系列 的 int/long/float <-> string 的转换
    removeWhiteSpaces(String value) : 移除 String 的 所有空格

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值