| ObjectRenderer |

    1   /*
    2    *  Copyright (c) 1998-2001, The University of Sheffield.
    3    *
    4    *  This file is part of GATE (see http://gate.ac.uk/), and is free
    5    *  software, licenced under the GNU Library General Public License,
    6    *  Version 2, June 1991 (in the distribution as file licence.html,
    7    *  and also available at http://gate.ac.uk/gate/licence.html).
    8    *
    9    *  Valentin Tablan 04/04/2001
    10   *
    11   *  $Id: ObjectRenderer.java,v 1.3 2001/10/16 18:23:21 valyt Exp $
    12   *
    13   */
    14
    15  package gate.gui;
    16
    17  import java.awt.Component;
    18  import javax.swing.table.*;
    19  import javax.swing.*;
    20  import javax.swing.border.*;
    21
    22  public class ObjectRenderer extends DefaultTableCellRenderer{
    23    public Component getTableCellRendererComponent(JTable table,
    24                                                     Object value,
    25                                                     boolean isSelected,
    26                                                     boolean hasFocus,
    27                                                     int row,
    28                                                     int column){
    29        //prepare the renderer
    30        super.getTableCellRendererComponent(table, value, isSelected, hasFocus,
    31                                            row, column);
    32
    33        if(table.isCellEditable(row, column))
    34          setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
    35        return this;
    36    }//public Component getTableCellRendererComponent
    37
    38      JPanel textButtonBox;
    39  }//class ObjectRenderer extends DefaultTableCellRenderer
    40

| ObjectRenderer |