[gui-dev] ResultPanel constructor

"M. Vernier" <[email protected]> Thu, 23 Sep 2004 19:14:40 +0200
Newsgroups gmane.network.gnutella.limewire.gui.devel
Message-ID <[email protected]>
Ok, I am puzzled with the code. I need the media type used in a search in
order to instantiate different types of columns (audio, video…) for the
results. 

The media type is accessible from “info”. 

The columns are instantiated in the constructor of ResultPanelModel and
ResultPanelModel itself is instantiated in the contructor of the super-class
of ResultPanel: AbstractTableMediator. 

I wanted to put SearchInformation as a parameter of the constructor of
AbstractTableMediator but AbstractTableMediator is supposed to be generic
and other panels inherit from it, not just ResultPanel.

How can I access info from ResultPanel::setupConstants?

 

    /**

     * Constructs a new ResultPanel for search results.

     *

     * @param guid the guid of the query.  Used to match results.

     * @param info the info of the search

     */

    ResultPanel(GUID guid, SearchInformation info) {

                super("SEARCH_TABLE");

                SEARCH_INFO = info;

                this.guid = guid;

                setupRealTable();

    }

_______________________________________________
gui-dev mailing list
[email protected]
http://www.limewire.org/mailman/listinfo/gui-dev