The Artima Developer Community
Sponsored Link

Java Buzz Forum
JTable Cell Renderer Pipelines

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Scott Delap

Posts: 1154
Nickname: scottdelap
Registered: Sep, 2004

Client / Server application developer.
JTable Cell Renderer Pipelines Posted: Oct 18, 2004 11:16 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Scott Delap.
Original Post: JTable Cell Renderer Pipelines
Feed Title: ClientJava.com
Feed URL: http://www.clientjava.com/archives/wireless_mobile.rdf
Feed Description: Client/Desktop Related Java Development
Latest Java Buzz Posts
Latest Java Buzz Posts by Scott Delap
Latest Posts From ClientJava.com

Advertisement

I was doing research into JDNC for a project this week and came across their use of a HighlighterPipeline. I've worked on applications that have quite sophisticated cell renderers. In the past I've always had abstract or base classes that I've extended. JDNC seems to have a better option. Basically, rendering is broken up into a series of Highlighters. One might set the background color of odd rows to gray. Another might set negative values to have a foreground color of red. The rendering process is then executed as follows:

    1. A renderer is generated for a cell.
    2. If a pipeline exists it is applied to the renderer.
    3. Each highlighter in the pipeline is applied to the renderer in order.
    4. The renderer is used to paint the cell for the table.
The main issue I see with this pattern is order of operations. However, you are going to get that with any decorator type pattern.

I think it would also be worth while to create a larger decorator layer that included mouse and key input handlers. This would let you apply functionality to the table not just rendering.

JDesktop Network Components (JDNC)

HighlighterPipeline API
Highlighter API

Read: JTable Cell Renderer Pipelines

Topic: Emacs as a WS-BPEL Editor Previous Topic   Next Topic Topic: More on Debates

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use