zoukankan      html  css  js  c++  java
  • eclipse tableviewer 编辑功能

    1. LabelProvider:
    isLableProperty要return true
    或者就extends jface.viewer的LabelProvider

    2.在tableViewer上加Cell Modifier
    CusCellModifier cellModifier = new CusCellModifier(tableViewer);
            tableViewer.setCellModifier(cellModifier);
            tableViewer.setCellEditors(new CellEditor[] {
                new ComboBoxCellEditor(table, new String[0]) });

            cellModifier.stickCellEditors();

    tableViewer.setColumnProperties(getColumnProperties());

    3.CusCellModifier

    public class CusCellModifier
        implements ICellModifier
    {
        public void stickCellEditors()
        {
            comboBoxCellEditor = (ComboBoxCellEditor)getCellEditorForProperty("AAA");
            comboBoxCellEditor.setItems(getItemsForFieldCombo());
            setVisibleItemCount("AAA");
        }
    }
  • 相关阅读:
    什么是透视图?
    Eclipse 视图
    Eclipse 菜单
    Eclipse 窗口说明
    Eclipse 修改字符集
    Eclipse 安装(Oxygen版本)
    Eclipse 教程
    jQuery 教程
    就表单验证说用户体验
    需要配置执行path?no
  • 原文地址:https://www.cnblogs.com/huqingyu/p/1230937.html
Copyright © 2011-2022 走看看