SearchSortTableRenderer.java :  » J2EE » WiSerFramework » de » ug2t » unifiedGui » cellRenderer » implementations » table » Java Open Source

Java Open Source » J2EE » WiSerFramework 
WiSerFramework » de » ug2t » unifiedGui » cellRenderer » implementations » table » SearchSortTableRenderer.java
// @@
// @@
/*
 * Wi.Ser Framework
 *
 * LGPL Version: 1.8.1, 20-September-2007  
 * Copyright (C) 2005-2006 Dirk von der Weiden <dvdw@imail.de>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library located in LGPL.txt in the 
 * license directory; if not, write to the 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA  02111-1307, USA.
 * 
 * If this agreement does not cover your requirements, please contact us
 * via email to get detailed information about the commercial license 
 * or our service offerings!
 *
 */
// @@

package de.ug2t.unifiedGui.cellRenderer.implementations.table;

import de.ug2t.kernel.*;
import de.ug2t.unifiedGui.*;
import de.ug2t.unifiedGui.cellRenderer.*;
import de.ug2t.unifiedGui.interfaces.*;

public class SearchSortTableRenderer extends AUnTableItemRenderer
{
  public Object pcmf_getRenderWidget(Object xToRender, int xRow, int xCol, IUnTable xTable)
  {
    if (xRow == 0)
    {
      UnApplicationFactory l_fact = new UnApplicationFactory("", xTable.pcmf_getAppl().pcmf_getComponentFactory(), false);
      l_fact.pcmf_useNonStaticHandler(true);
      
      try
      {
        UnComponent l_cnode = null;

        KeRegisteredObject.pcmf_unRegister("RgTableTitle");
        KeRegisteredObject.pcmf_register("RgTableTitle", xToRender.toString());
        KeRegisteredObject.pcmf_unRegister("RgTableCol");
        KeRegisteredObject.pcmf_register("RgTableCol", new Integer (xCol));
        
        l_cnode = (UnComponent) l_fact.pcmf_produceWidgetsFromFile(xTable.pcmf_getAppl().pcmf_getApplType(), "xml_gui_fragments/tableHeader.xml", xTable
            .pcmf_getAppl());
        
        l_cnode.pcmf_setAdditionalInfo(xTable);
        KeRegisteredObject.pcmf_reRegister("RgTableRendererInit", "TRUE");
        
        if (!((IUnComponent) xTable).pcmf_hasCtxMenu())
        {
          IUnContextMenu l_node = (IUnContextMenu) l_fact.pcmf_produceWidgetsFromFile(xTable.pcmf_getAppl().pcmf_getApplType(), "xml_gui_fragments/tableCtxMenu.xml", xTable
              .pcmf_getAppl());
          xTable.pcmf_getUnComponent().pcmf_addNode("CTX", l_node.pcmf_getUnComponent());
          l_node.pcmf_commitMenu();
          
        }
        
        return (l_cnode);
      }
      catch (Exception e)
      {
        KeLog.pcmf_logException("csc", this, e);
      }
    }

    return xToRender;
  }

}

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.