[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20040208: Displays for CompositeDataChoice



>From: "Paul Gifford" <address@hidden>
>Organization: independent
>Keywords: 200402090424.i194OFp1020301

Hi Paul-

>  I have CompositeDataChoices made up of DirectDataChoices.  These are
>displayed in tree fashion  in the Fields column in the Data selector as they
>should be.  When I click on a composite node (displayed as a folder), the
>Displays list if filled with every type of display possible.  How do I make
>that list empty?  Right now I'm passing null for the category list for the
>CompositeDataChoice constructor - I've tried lists with various items
>contained (and an empty list) but nothing worked.

A null DataCategory is the same as ANY.  I guess we need a NONE.  I'll
look into that.

What is the purpose of creating your CompositeData Choice?  If it's just
to group them all together, then you could use a DataCategory with the
first group being for display only.  This is what we do for the 
gridded data (i.e. 2D grids vs. 3D grids).

So, your code would look something like:

    List firstCategories = DataCategory.parseCategories("Group1;2D-GRID");
    List secondCategories = DataCategory.parseCategories("Group2;2D-GRID");
    DataChoice choice = null;
    for (int i = 0; i < numThings; i++) {
        if (thing[i] == firstType) {
           choice = new DirectDataChoice(this, name, name,
                                         description, firstCategories);
        } else {
           choice = new DirectDataChoice(this, name, name,
                                         description, secondCategories);
        }
        (do something with choice)
     }

or some such thing. ;-)  By default, parseCategories will make the first
category for display.

If this is not clear, let me know.

Don
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publically available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.