datarecruittablemodel.java.svn-base
来自「通讯采集软件」· SVN-BASE 代码 · 共 54 行
SVN-BASE
54 行
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 + =
减小字号Ctrl + -
显示快捷键?