home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 November
/
Chip_1998-11_cd.bin
/
tema
/
Cafe
/
jfc.bin
/
TableCellRenderer.java
< prev
next >
Wrap
Text File
|
1998-02-26
|
2KB
|
59 lines
/*
* @(#)TableCellRenderer.java 1.9 98/01/30
*
* Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the confidential and proprietary information of Sun
* Microsystems, Inc. ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with Sun.
*
* SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
* SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
* SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
* THIS SOFTWARE OR ITS DERIVATIVES.
*
*/
package com.sun.java.swing.table;
import java.awt.Component;
import com.sun.java.swing.*;
/**
* This interface defines the methods any object that would like to be
* a renderer for cell in a JTable.
*
* @version 1.9 01/30/98
* @author Alan Chung
*/
public interface TableCellRenderer {
/**
* This method is sent to the renderer by the drawing table to
* configure the renderer appropriately before drawing. Return
* the Component used for drawing.
*
* @param table the JTable that is asking the renderer to draw.
* This parameter can be null.
* @param value the value of the cell to be rendered. It is
* up to the specific renderer to interpret
* and draw the value. eg. if value is the
* String "true", it could be rendered as a
* string or it could be rendered as a check
* box that is checked. null is a valid value.
* @param isSelected true is the cell is to be renderer with
* selection highlighting
* @param row the row index of the cell being drawn. When
* drawing the header the rowIndex is -1.
* @param column the column index of the cell being drawn
*/
Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus,
int row, int column);
}