🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #10244

Specialised Cell Rendering

#10244
From: Andy Torble
Date: Tue, 02 Nov 1999 00:00
51 lines
2718 bytes
--------------6B849C443F74DBF8913B13DB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi everyone,

Can anyone help with this frustrating little problem ......

I've got a JdbTable into which I load date tagged data.  I want to be
able to highlight any date more than x days ago by showing the cell
with a different background colour.  My cunning plan was to hook into
the rendering process and override getTableCellRendererComponent(...)
to test the value in the cell and set the background colour of the
renderer appropriately, but ..... JdbTable uses a Public Member class
DBCellRenderer  and I'm trying to define a class with public class
SpecialRenderer extends JdbTable.DBCellRenderer but the compiler
complains that it can't find DBCellRenderer in class JdbTable.

Am I attempting the impossible (I'll admit that I'm not too well up on
Inner Classes et al) or can someone suggest another way of achieving
the same result.

Thanks in advance.

Andy

--------------6B849C443F74DBF8913B13DB
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi everyone,
<p>Can anyone help with this frustrating little problem ......
<p>I've got a JdbTable into which I load date tagged data.&nbsp; I want
to be able to highlight any date more than x days ago by showing the cell
with a different background colour.&nbsp; My cunning plan was to hook into
the rendering process and override <tt>getTableCellRendererComponent(...)
</tt>to test the value in the cell and set the background colour of the
renderer appropriately, but ..... JdbTable uses a Public Member class DBCellRenderer&nbsp;
and I'm trying to define a class with <tt>public</tt> <tt>class SpecialRenderer
extends JdbTable.DBCellRenderer</tt> but the compiler complains that it
can't find DBCellRenderer in class JdbTable.
<p>Am I attempting the impossible (I'll admit that I'm not too well up
on Inner Classes et al) or can someone suggest another way of achieving
the same result.
<p>Thanks in advance.
<p>Andy</html>

--------------6B849C443F74DBF8913B13DB--
Technical Details
Message-ID: <381F34C7.A11E3D0C@dial.pipex.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,c3e8243d03a16664,start
X-Google-Attributes: gid111d45,public
From: Andy Torble <atorble@dial.pipex.com>
Subject: Specialised Cell Rendering
Date: 1999/11/02
Message-ID: <381F34C7.A11E3D0C@dial.pipex.com>
X-Deja-AN: 543615132
X-Accept-Language: en
Content-Type: multipart/alternative; boundary="------------6B849C443F74DBF8913B13DB"
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing