Package org.geoforge.guillcogc.popupmenu

Source Code of org.geoforge.guillcogc.popupmenu.GfrPmuCtlCtrFolderSetLyrWmsAbs

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.geoforge.guillcogc.popupmenu;

import java.awt.event.ActionListener;
import javax.swing.JPopupMenu;
import org.geoforge.guillc.menuitem.GfrMimTrsAlrIdSetLloVar;
import org.geoforge.guillc.menuitem.GfrMimTrsAlrAbs;
import org.geoforge.guillc.menuitem.GfrMimTrsAlrAbs;
import org.geoforge.guillc.popupmenu.GfrPmuCtlCtrFolderSet;
import org.geoforge.guillc.tree.GfrTreAbs;
import org.geoforge.guillcogc.enumeration.GfrEnuValuesKindObjectOgc;
import org.geoforge.guillcogc.menuitem.GfrMimTrsAlrIdUrlLgdLyrFolder;
import org.geoforge.java.awt.container.GfrUtilContainer;

/**
*
* @author robert
*/
abstract public class GfrPmuCtlCtrFolderSetLyrWmsAbs extends GfrPmuCtlCtrFolderSet
{
   protected GfrMimTrsAlrAbs _mimDisplayYes = null;
   protected GfrMimTrsAlrAbs _mimDisplayNo = null;
  
   private GfrMimTrsAlrAbs _mimSettings_ = null;
   private GfrMimTrsAlrAbs _mimOnlineUrlLegend_ = null;
  
   protected GfrPmuCtlCtrFolderSetLyrWmsAbs(
           GfrTreAbs tree,
           ActionListener alrControllerSpcPrj,
           String strUniqueId,
           String strIdParent,
           String strValueKindTargetWindow)
   {
        super(tree);
       
        this._mimSettings_ = new GfrMimTrsAlrIdSetLloVar(
                alrControllerSpcPrj,
                strUniqueId,
                strIdParent,
                strValueKindTargetWindow,
                GfrEnuValuesKindObjectOgc.VALUE_LLO_WMS_LYR_FOLDER.name());
       
        this._mimOnlineUrlLegend_ = new GfrMimTrsAlrIdUrlLgdLyrFolder(strUniqueId);
   }
  
   public void setEnabledDisplay(boolean bln)
    {
        this._mimDisplayYes.setEnabled(bln);
        this._mimDisplayNo.setEnabled(! bln);
    }
   
    public void setVisibleDisplay(boolean bln)
    {
        this._mimDisplayYes.setVisible(bln);
        this._mimDisplayNo.setVisible(bln);
    }
  
   @Override
    public boolean init()
    {
        if (! super.init())
            return false;
       
        if (! this._mimDisplayYes.init())
            return false;
       
        if (! this._mimDisplayNo.init())
            return false;
       
        if (! this._mimSettings_.init())
            return false;
       
        if (! this._mimOnlineUrlLegend_.init())
            return false;

         int intPos = 0;
     
      if (super._menPlugins != null)
      {
          intPos = GfrUtilContainer.s_getPosition(this, super._menPlugins);
          intPos += 2;
      }
     
      else
      {
          intPos = GfrUtilContainer.s_getPosition(this, super._mimFolderAllCollapse);
          intPos += 2;
      }
       
        super.add(this._mimDisplayNo, intPos++);
        super.add(this._mimDisplayYes, intPos++);
        super.add(this._mimSettings_, intPos++);
        super.add(this._mimOnlineUrlLegend_, intPos++);
       
        /*
         * for now, always visible
         *
         * !!!!!!!!!!!!!!!! ImgLgd
         */
        //this._mimDisplayNo.setEnabled(false);

        return true;
    }
   
    @Override
    public void destroy()
    {
        super.destroy();
       
        if (this._mimDisplayYes != null)
        {
            this._mimDisplayYes.destroy();
            this._mimDisplayYes = null;
        }
       
        if (this._mimDisplayNo != null)
        {
            this._mimDisplayNo.destroy();
            this._mimDisplayNo = null;
        }

        if (this._mimSettings_ != null)
        {
            this._mimSettings_.destroy();
            this._mimSettings_ = null;
        }
       
        if (this._mimOnlineUrlLegend_ != null)
        {
            this._mimOnlineUrlLegend_.destroy();
            this._mimOnlineUrlLegend_ = null;
        }
    }

    @Override
    public void loadTransient() throws Exception
    {
        super.loadTransient();
       
        this._mimDisplayYes.loadTransient();
        this._mimDisplayNo.loadTransient();
        this._mimSettings_.loadTransient();
        this._mimOnlineUrlLegend_.loadTransient();
    }   
   
    @Override
    public void releaseTransient() throws Exception
    {
        super.releaseTransient();
     
        this._mimDisplayYes.releaseTransient();
        this._mimDisplayNo.releaseTransient();
        this._mimSettings_.releaseTransient();
        this._mimOnlineUrlLegend_.releaseTransient();
    }
}
TOP

Related Classes of org.geoforge.guillcogc.popupmenu.GfrPmuCtlCtrFolderSetLyrWmsAbs

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.