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

📄 rowhandler.java

📁 具有不同语法高亮的编辑器实例
💻 JAVA
字号:
/*
 * 07/28/2005
 *
 * RowHandler.java - Handles the adding, removing, and modifying of rows in a
 * ModifiableTable.
 * Copyright (C) 2005 Robert Futrell
 * email@address.com
 * www.website.com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
package org.fife.ui.modifiabletable;


/**
 * A <code>RowHandler</code> is called whenever the user wants to add, modify,
 * or remove a row from a <code>ModifiableTable</code>.  It is responsible for
 * getting new data from the user, and has the power to veto a removal.
 *
 * @author Robert Futrell
 * @version 1.0
 */
public interface RowHandler {


/*****************************************************************************/


	/**
	 * Called when the user chooses to add or modify a row in the table.
	 *
	 * @param oldData The old values of the cells in this row.  If the user
	 *        is adding a new row, this value is <code>null</code>.
	 * @return The new values for the cells in this row.  If the user
	 *         cancels the add/modify operation, this method should return
	 *         <code>null</code>.
	 */
	public Object[] getNewRowInfo(Object[] oldData);


/*****************************************************************************/


	/**
	 * Called when the user chooses to remove a row in the table.  This method
	 * gives the program a chance to veto the removal, prompt the user to
	 * validate the removal, etc.
	 *
	 * @param row The row that might be removed.
	 * @return Whether the row should be removed.
	 */
	public boolean shouldRemoveRow(int row);


/*****************************************************************************/

}

⌨️ 快捷键说明

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