⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 datarecruittablemodel.java.svn-base

📁 通讯采集软件
💻 SVN-BASE
字号:
package collector.gui.model;

import javax.swing.table.*;

public class DataRecruitTableModel
    extends DefaultTableModel {

  /** Creates a new instance of DataRecruitTableModel */
  public static final int Terminal_Type = 1;
  public static final int Meter_Type = 2;
  private int m_type;
  public DataRecruitTableModel(int type) {
    super(
        new Object[][] {}
        ,
        new String[] {
        new String("序号"),
        new String("名称"),
        new String("任务类型"),
        new String("起始时间"),
        new String("终止时间")});
    if (type == this.Terminal_Type) {
      this.addColumn("所选通道");
    }
    //pzy 20060927
    if (type == this.Meter_Type) {
      this.addColumn("所选通道");
    }
    //pzy 20060927
    this.m_type = type;
  }

  boolean[] Term_canEdit = new boolean[] {
      false, false, true, true, true, true
  };

  boolean[] Meter_canEdit = new boolean[] {
      false, false, true, true, true
  };

  public boolean isCellEditable(int rowIndex, int columnIndex) {
    if (m_type == this.Terminal_Type) {
      return Term_canEdit[columnIndex];
    }
    else {
      //pzy 20060927
      //return Meter_canEdit[columnIndex];
      return Term_canEdit[columnIndex];
      //pzy 20060927
    }
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -