The Source for Java Technology Collaboration


JDNC Frequently Asked Questions

General Questions

What is JDNC, and what is its status?

JDNC (JDesktop Network Components) is intended as an easy-to-use, get-up-and-go toolkit that extends SwingX and integrates other SwingLabs projects.

A number of the current projects under SwingLabs--like SwingX and Databinding, were originally part of JDNC. In late 2004, it was decided that these projects should be split out from JDNC and be developed on their own. This was more or less how SwingLabs itself was born--as these projects were refactored, SwingLabs became the umbrella for all the projects, and existing Swing-based project on java.net got pulled into the fold.

After the refactoring, JDNC was left with two major chunks of code--the so-called "JN" components, which generally extend SwingX components with a simpler API, and JDNC Markup, a way to persist forms to XML, and load them from XML. Given the size of the team, and the growing demands of getting SwingX, Databinding and other projects ready for production, development on JDNC and JDNC Markup was put on hold. Both of these are still in CVS and are compiled against the whole codebase, but development and releases are ON HOLD until after the 1.0 release of SwingX and Databinding (fall 2005).

Components

I want to conditionally set the background color of a complete row on the basis of a value in one cell how do I do that?

A ConditionalHighlighter? is what's meant to be implemented for such a requirement. A code snippet:


Highlighter highlighter = new ConditionalHighlighter(BACKGROUND3, null, 0, -1) {

     protected boolean test(ComponentAdapter adapter) {
         // getValueAt() requires column in view coordinates. So convert.
         int     testColumnV = adapter.modelToView(testColumn);
         if (testColumnV < 0) {
             return false; // column is not being displayed
         }
         Object  value = adapter.getFilteredValueAt(adapter.row, testColumnV);

         return testValue(value);
     }

     private boolean testValue(Object value) {
         if (value == null) {
             return false;
         }
         else {
             Integer bugID = new Integer(value.toString());
             return bugID.intValue() > 4500000;
         }
     }

};
table.setHighlighters(new HighlighterPipeline(new Highlighter[] {highlighter }));

You can c&p this into the TableFormDemo? (in jdnc_api/src/demo) in the table initialization method initializeTable to see it working.

See: http://www.javadesktop.org/forums/thread.jspa?messageID=58475

Does JDNC have a component for web browsing? PDF rendering? xyz?

There is some work going on this issue, check out: http://www.javadesktop.org/forums/thread.jspa?messageID=56326

Topic SwingLabsJdncFaq . { Edit | Ref-By | Printable | Diffs r6 < r5 < r4 < r3 < r2 | More }
 XML java.net RSS

Revision r6 - 15 May 2006 - 11:53:04 - Main.blaise
Parents: WebHome > SwingLabs > SwingLabsJdnc
Javadesktop.SwingLabsJdncFaq moved from Javadesktop.JDNCFaq on 10 Sep 2005 - 13:46 by Main.pdoubleya - put it back