1.自定义编辑器激活方式  

/**
     * Create a customized editor whose activation process is customized
     *
     * @param viewer
     *            the viewer the editor is created for
     * @param editorActivationStrategy
     *            activation strategy to control if an editor activated
     * @param feature
     *            bit mask controlling the editor
     *            <ul>
     *            <li>{@link ColumnViewerEditor#DEFAULT}</li>
     *            <li>{@link ColumnViewerEditor#TABBING_CYCLE_IN_ROW}</li>
     *            <li>{@link ColumnViewerEditor#TABBING_HORIZONTAL}</li>
     *            <li>{@link ColumnViewerEditor#TABBING_MOVE_TO_ROW_NEIGHBOR}</li>
     *            <li>{@link ColumnViewerEditor#TABBING_VERTICAL}</li>
     *            </ul>
     */
    public static void create(TableViewer viewer,
            ColumnViewerEditorActivationStrategy editorActivationStrategy,
            int feature) {

}

附例子:           

TableViewerEditor .create(viewer,
                            new DoubleClickColumnViewerEditorActivationStrategy(
                                    viewer), ColumnViewerEditor.DEFAULT);

/**
 * 双击编辑策略
 *
 * @author pang
 *
 */
public class DoubleClickColumnViewerEditorActivationStrategy extends
        ColumnViewerEditorActivationStrategy implements CommonUse {

public DoubleClickColumnViewerEditorActivationStrategy(TableViewer viewer) {
        super(viewer);
    }

/**
     * 設置編輯器觸發方式
     */
    @Override
    protected boolean isEditorActivationEvent(
            ColumnViewerEditorActivationEvent event) {

boolean singleSelect = ((IStructuredSelection) getViewer()
                .getSelection()).size() == 1;
        return singleSelect
                && (event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION
                        || event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC || event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL);
    }
}

TableViewer使用的更多相关文章

  1. 关于JFace中的TableViewer和TreeViewer中的

    TableViewer类 构造方法摘要: 方法摘要: 在做的这几个练习中,发现,getTable(),refresh(),remove(),setSelection()方法经常使用. TreeView ...

  2. 关于SWT中的表格(TableViewer类)

    JFace是SWT的扩展.它提供了一组功能强大的界面组件.其中包含表格,树,列表.对话框,向导对话框等. 表格是一种在软件系统中很常用的数据表现形式.特别是基于数据库的应用系统.表格更是不可缺少的界面 ...

  3. SWT的TreeViewer和TableViewer的交互

    左边是一个TreeViewer,右边是一个TableViewer.当点击左边的treeitem的时候,右边的tableViewer要将该item的子节点信息显示出来.就像这样: 左边的treeView ...

  4. JFace TableViewer性能改善 -- 使用VirtualTable

    前一篇提到了SWT中的table的通过使用virtual table性能得到很大的改善,那么如果既存的工程中使用的是TableViewer来创建的表,也能改成virtual table吗? 答案是肯定 ...

  5. swt TableViewer

    http://blog.163.com/bluefield_wild/blog/static/8182709520085612235336/ package list; import java.uti ...

  6. 获取TableViewer里面的所有TableViewerColumn

    private TableViewerColumn[] getTableViewerColumns(TableViewer tableViewer) { TableColumn[] columns = ...

  7. tableviewer自动调整列宽

    public void resizeTableColumn(TableColumn[] treeColumns) { for (TableColumn tc : treeColumns) tc.pac ...

  8. 转:Eclipse插件开发之TreeViewer

    http://www.tuicool.com/articles/e6fmE3R contentprovider在插件开发和RCP(Rich Client Platform)开发中常常被用到,譬如你要创 ...

  9. atitit。自定义uml MOF EMF体系eclipse emf 教程o7t

    atitit.自定义uml MOF EMF体系eclipse emf  教程o7t 1. 元对象机制(MOF,Meta-Object Facility)and  结构 1 2. 元模型图.模型图.对象 ...

随机推荐

  1. windbg学习进阶之——windbg字段名及其意义

    要使用windbg分析dump必须加载正确的符号,可以通过设置Symbols File Path为"D:/Symbols;SRV*D:/Symbols*http://msdl.microso ...

  2. 数组json格式的字符串 转 list<Bean>

    1.  字符串形式: [ { "userid": "admin", "name": "admin", "pas ...

  3. java注释指导手册

    译文出处: Toien Liu   原文出处:Dani Buiza 编者的话:注解是java的一个主要特性且每个java开发者都应该知道如何使用它. 我们已经在Java Code Geeks提供了丰富 ...

  4. Web前端小白入门指迷

    前注:这篇文章首发于我自己创办的服务于校园的技术分享 [西邮 Upper -- 004]Web前端小白入门指迷,写得很用心也就发在这里. 大前端之旅 大前端有很多种,Shell 前端,客户端前端,Ap ...

  5. 为什么不推崇复杂的ORM

    上一篇文章写完,回复的人很多,有的说的很中肯,有的貌似只是看到文章的标题就进来写评论的!还有人问为什么我要屏蔽掉[反对]按钮,因为谁写文章都是为了分享,都在说出自己的心得体会.不过由于大家遇到的项目, ...

  6. SQL数据库基础(八)

    连接查询:通过连接运算符可以实现多个表查询.连接是关系数据库模型的主要特点,也是它区别于其它类型数据库管理系统的一个标志. 常用的两个链接运算符: 1.join   on 2.union     在关 ...

  7. [iOS] 使用xib作为应用程序入口 with IDE

    [iOS] 使用xib作为应用程序入口 with IDE 在「使用xib做为应用程序入口 with Code」这篇文章中,介绍了如何透过写Code的方式,来使用xib做为应用程序的入口.但其实在Xco ...

  8. 自定义XML动态配置程序

    概述 1 在做程序开发时,我们往往要用到如下两个基本模块 1> 设置程序的基础参数,如分页的参数.邮件参数等: 2> 在基于表驱动开发时,即把一些判断的逻辑放在表数据中: 2 在这两个基本 ...

  9. TSQL生成Combguid

    Nhibernate实现combguid /// <summary> /// Generate a new <see cref="Guid"/> using ...

  10. mybatis hellworld

    用maven来进行搭建项目的~~   1. 搭建环境 pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" x ...