ntftable.java

来自「UCS (Ultra Corba Simulator) is one more 」· Java 代码 · 共 55 行

JAVA
55
字号
package com.corba.mnq.ntf;

import java.util.*;

public class NtfTable extends javax.swing.JTable 
{
    private NtfNode current;

    /**
     * constructor .
     */
    
    public NtfTable() 
    {
        super( new NtfTableModel());
        setShowGrid(true);
        setAutoCreateColumnsFromModel(false);
        setDoubleBuffered(true);
        setCellSelectionEnabled(false);
        setColumnSelectionAllowed(false);
    }

    /**
     * @return the context node that is the source for this table
     */
    public NtfNode currentSource() 
    {
        return current;
    }

    /**
     * set table data
     * @param newData Vector
     * @param currentSource
     */
    public void setData(Vector newData, NtfNode currentSource) 
    {
        current = currentSource;
        ((NtfTableModel)super.getModel()).setDataVector( newData );
    }

    /**
     * update table view
     */
    public void update() 
    {
        if( current != null )
            current.display();
    }
}




⌨️ 快捷键说明

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