Package org.geoforge.guillcogcecl.toolbar

Source Code of org.geoforge.guillcogcecl.toolbar.GfrTbrHlpSubCtrTreCatLblPrjEclManWwdEarthAbs

/*
*  Copyright (C) 2011-2014 GeoForge Project
*
*  This program 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 3 of the License, or
*  (at your option) any later version.
*
*  This program 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 program.  If not, see <http://www.gnu.org/licenses/>.
*/
package org.geoforge.guillcogcecl.toolbar;

import java.awt.event.ActionListener;
import java.awt.event.MouseListener;
import org.geoforge.guillc.button.BtnTransientToPopPrsExpAbs;
import org.geoforge.guillc.button.BtnTransientToPopPrsImpAbs;
import org.geoforge.guillcogcecl.button.GfrBtnTrsExpObjCatEcl;
import org.geoforge.guillcogcecl.button.GfrBtnTrsImpObjCatEcl;
import org.geoforge.guillcogcecl.button.BtnTransientToPopPrsNewEnabledObjCatEclMan;
import org.geoforge.java.awt.container.GfrUtilContainer;

/**
*
* @author bantchao
*
* email: bantchao_AT_gmail.com
* ... please remove "_AT_" from the above string to get the right email address
*
*/
abstract public class GfrTbrHlpSubCtrTreCatLblPrjEclManWwdEarthAbs extends GfrTbrHlpSubCtrTreCatLblPrjEclAbs
{  
   private BtnTransientToPopPrsImpAbs _btnImportObject_ = null;
   private BtnTransientToPopPrsExpAbs _btnExportObject_ = null;
  
   protected GfrTbrHlpSubCtrTreCatLblPrjEclManWwdEarthAbs(
           ActionListener alrParentComponent,
           MouseListener mlrEffectsBorder) throws Exception
   {
      super(mlrEffectsBorder, alrParentComponent, "_esh_man_ctr_");

     
      super._btnNewObject = new BtnTransientToPopPrsNewEnabledObjCatEclMan();
     
      this._btnImportObject_ = new GfrBtnTrsImpObjCatEcl();
      this._btnExportObject_ = new GfrBtnTrsExpObjCatEcl();
   }
  
   @Override
    public boolean init()
    {
        if (! super.init())
            return false;
       
        if (! this._btnImportObject_.init())
           return false;
       
        if (! this._btnExportObject_.init())
           return false;
       

        int intPos;
       
        if (super._btnPlugins != null)
        {
            intPos = GfrUtilContainer.s_getPosition(this, super._btnPlugins);
            intPos++;
            intPos++;
        }
       
        else
        {
            intPos = GfrUtilContainer.s_getPosition(this, super._btnAllCollapse);
            intPos++;
            intPos++;
        }
       
       
       
        super.add(this._btnImportObject_, intPos++);
        super.add(this._btnExportObject_, intPos++);
       

        return true;
    }
  
   @Override
    public void openSpaceAny(ActionListener alrControllerSpcPrj) throws Exception
    {
       super.openSpaceAny(alrControllerSpcPrj);
       
        this._btnImportObject_.open(alrControllerSpcPrj);
        this._btnExportObject_.open(alrControllerSpcPrj);
    }
  
   @Override
    public void destroy()
    {
        super.destroy();
       
       
        if (this._btnImportObject_ != null)
        {
            this._btnImportObject_.destroy();
            this._btnImportObject_ = null;
        }
       
        if (this._btnExportObject_ != null)
        {
            this._btnExportObject_.destroy();
            this._btnExportObject_ = null;
        }
    }
   
    @Override
    public void loadTransient() throws Exception
    {
       super.loadTransient();
      
        this._btnImportObject_.loadTransient();
        this._btnExportObject_.loadTransient();
    }

    @Override
    public void releaseTransient() throws Exception
    {
       super.releaseTransient();
       
       this._btnImportObject_.releaseTransient();
       this._btnExportObject_.releaseTransient();
    }
   
   @Override
    public void closeSpace() throws Exception
    {
       super.closeSpace();
      
        if (this._btnImportObject_ != null)
          this._btnImportObject_.close();
       
        if (this._btnExportObject_ != null)
          this._btnExportObject_.close();
    }
 
}
TOP

Related Classes of org.geoforge.guillcogcecl.toolbar.GfrTbrHlpSubCtrTreCatLblPrjEclManWwdEarthAbs

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.