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. CSS 最核心的四个概念(摘录)

    本文将讲述 CSS 中最核心的几个概念,包括:盒模型.position.float等.这些是 CSS 的基础,也是最常用的几个属性,它们之间看似独立却又相辅相成.为了掌握它们,有必要写出来探讨一下,如 ...

  2. 【poj 3461】Oulipo(字符串--KMP)

    题意:求子串在文本串中出现了多少次. 解法:使用KMP的next[ ]和tend[ ]数组计数. #include<cstdio> #include<cstdlib> #inc ...

  3. Ajax基本知识

    1.创建xhr对象 var xmlhttp; if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari x ...

  4. Q:解决每天第一次打开MSCRM系统展示慢的问题

    问题:第天第一次打开系统时,需要加载很长时间,基本为1分多钟,而第二次打开只需5秒. 解决方案:利用IIS中的Session. 一.打开IIS,选择打开服务器功能中“Session State”. 二 ...

  5. Oracle LPAD/RPAD函数在处理中文时的注意事项

    首先看下Oracle官方对函数的定义: The RPAD function returns an expression, right-padded to a specified length with ...

  6. 适配iPhone6和iPhone6 Plus

    先对比所有市面上的iPhone设备,然后分析如何适配新的设备,   iPhone4,iPhone4s 分辨率960*640  长宽比1.5iPhone5,iPhone5s  分辨率1136*640   ...

  7. DDMS无法查看data/data目录?

    今天andorid 学习用真机来尝试用Android SQLite数据库时,从DDMS的FileExplore查看数据库文件时会发现里面是空的什么也没有,之前用的一直都是模拟器,现如今用真机 捣鼓了小 ...

  8. 【读书笔记】iOS-装箱

    通常将一个基本类型的数据包装成对象叫做装箱,从对象中提取基本类型的数据叫做取消装箱.有些语言有自动装箱功能,它可以自动包装基本基础类型的数据,也可以自动从包装后的对象中提取基础数据.Objective ...

  9. DKNightVersion 的实现 --- 如何为 iOS 应用添加夜间模式

    在很多重阅读或者需要在夜间观看的软件其实都会把夜间模式当做一个 App 所需要具备的特性. 而如何在不改变原有的架构, 甚至不改变原有的代码的基础上, 就能为应用优雅地添加夜间模式就成为一个在很多应用 ...

  10. 网站的SEO

    提高网站SEO排名的策略除了要有高质量的内容,还有几种方案可以使用 1.关键词的设定 合适的关键词可以提升搜索引擎中的排名 ①最重要的是html中的title标签,这也是一个页面的最重要的概括,所以尽 ...