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

📄 ntftablemodel.java

📁 UCS (Ultra Corba Simulator) is one more powerful corba client/servant simulator tool than other simi
💻 JAVA
字号:
package com.corba.mnq.ntf;
/*
 *        Notification Service Manager
 *
 *   		Copyright (C) 2005-2006 .
 *			This is free software.
 */
import java.util.*;

public class NtfTableModel extends javax.swing.table.DefaultTableModel 
{
    /**
     * NSTableModel constructor.
     */
    public NtfTableModel() 
    {
		super();
		String [] colNames = {"Name", "Type", "Value"};
		super.setColumnIdentifiers(convertToVector(colNames));
    }

    /**
     * getColumnCount method comment.
     */
    public int getColumnCount() 
    {
    	return 3;
    }

    /**
     * always returns false to make this table non-editable
     * @return boolean
     * @param r int
     * @param c int
     */
    public boolean isCellEditable(int r, int c) 
    {
    	return false;
    }

    /**
     * 
     * @param data Vector
     */
    public void setDataVector(Vector newData) 
    {
        if (newData == null)
            throw new IllegalArgumentException("setDataVector() - Null parameter");
                
        // Add the new rows.
        dataVector = newData;
        
        // Make all the new rows the right length and generate a notification.
        newRowsAdded(new javax.swing.event.TableModelEvent(this, 0, getRowCount()-1,
                                                           javax.swing.event.TableModelEvent.ALL_COLUMNS, 
                                                           javax.swing.event.TableModelEvent.INSERT));
        //this.removeRow(getRowCount()-1);
    }
}




⌨️ 快捷键说明

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