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");
        }
    }
  • 相关阅读:
    java 输出质数
    各大OJ
    使用css让图片居中
    poj 1250 Tanning Salon
    Struts2 中整合DWR3实现文件上传
    C语言I博客作业02
    The first essay.
    tar命令
    wBox Demo
    缓存记录
  • 原文地址:https://www.cnblogs.com/huqingyu/p/1230937.html
Copyright © 2011-2022 走看看