001//////////////////////////////////////////////////////////////////////////////// 002// checkstyle: Checks Java source code for adherence to a set of rules. 003// Copyright (C) 2001-2015 the original author or authors. 004// 005// This library is free software; you can redistribute it and/or 006// modify it under the terms of the GNU Lesser General Public 007// License as published by the Free Software Foundation; either 008// version 2.1 of the License, or (at your option) any later version. 009// 010// This library is distributed in the hope that it will be useful, 011// but WITHOUT ANY WARRANTY; without even the implied warranty of 012// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013// Lesser General Public License for more details. 014// 015// You should have received a copy of the GNU Lesser General Public 016// License along with this library; if not, write to the Free Software 017// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 018//////////////////////////////////////////////////////////////////////////////// 019 020package com.puppycrawl.tools.checkstyle.gui; 021 022import javax.swing.tree.TreeModel; 023 024/** 025 * TreeTableModel is the model used by a JTreeTable. It extends TreeModel 026 * to add methods for getting information about the set of columns each 027 * node in the TreeTableModel may have. Each column, like a column in 028 * a TableModel, has a name and a type associated with it. Each node in 029 * the TreeTableModel can return a value for each of the columns and 030 * set that value if isCellEditable() returns true. 031 * 032 * <a href= 033 * "http://docs.oracle.com/cd/E16162_01/apirefs.1112/e17493/oracle/ide/controls/TreeTableModel.html"> 034 * Original Source Location</a> 035 * 036 * @author Philip Milne 037 * @author Scott Violet 038 */ 039public interface TreeTableModel extends TreeModel { 040 /** 041 * @return the number of available column. 042 */ 043 int getColumnCount(); 044 045 /** 046 * @param column the column number 047 * @return the name for column number {@code column}. 048 */ 049 String getColumnName(int column); 050 051 /** 052 * @param column the column number 053 * @return the type for column number {@code column}. 054 */ 055 Class<?> getColumnClass(int column); 056 057 /** 058 * @param node the node 059 * @param column the column number 060 * @return the value to be displayed for node {@code node}, 061 * at column number {@code column}. 062 */ 063 Object getValueAt(Object node, int column); 064 065 /** 066 * Indicates whether the the value for node {@code node}, 067 * at column number {@code column} is editable. 068 * 069 * @param column the column number 070 * @return true if editable 071 */ 072 boolean isCellEditable(int column); 073}