Package org.geoforge.guillc.toolbar

Source Code of org.geoforge.guillc.toolbar.GfrTbrHlpSubDspRunSecPrnTloJfcChartLgrStepAbs

/*
*  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.guillc.toolbar;

import java.awt.event.ActionListener;
import java.awt.event.MouseListener;
import org.geoforge.guillc.button.GfrBcnJhpOflPartLarge;
import org.geoforge.guillc.button.GfrBcnJhpOflOthXSmall;
import org.geoforge.guillc.button.GfrBcnJhpOflOthXXSmall;
import org.geoforge.guillc.togglebutton.GfrTbnAbs;
import org.geoforge.guillc.togglebutton.GfrTbnLabelsValuesLogsFixJfcChart;
import org.geoforge.guillc.togglebutton.GfrTbnLegendsMrksJfcChart;
import org.geoforge.guillc.togglebutton.GfrTbnStepRenderingJfcChart;
import org.geoforge.awt.image.GfrFactoryIconAbs;

/*
*
* NOT THE RIGHT PLACE !!!!!!!!!!!!!!!!!!! specialized gtc
*/

/**
*
* @author bantchao
*
* email: bantchao_AT_gmail.com ... please remove "_AT_" from the above string
* to get the right email address
*
*/
abstract public class GfrTbrHlpSubDspRunSecPrnTloJfcChartLgrStepAbs extends GfrTbrHlpSubDspRunSecPrnTloJfcChartLgrAbs
{
   protected GfrTbnAbs _tbnStepRendering = null;
  
   private GfrTbnAbs _tbnLegendsMrks_ = null;
   private GfrTbnAbs _tbnLabelsValuesLogsFix_ = null;
  
   protected GfrTbrHlpSubDspRunSecPrnTloJfcChartLgrStepAbs(
           ActionListener alrParentComponent,
           MouseListener mlrEffectsBorder,
           int intLocationThis,
           int intSizeIcons,
           String strKeyHelp) throws Exception
   {

      super(
              alrParentComponent,
              mlrEffectsBorder,
              intLocationThis,
              intSizeIcons);

      if (strKeyHelp!=null && strKeyHelp.length()>0)
      {
         if (intSizeIcons == GfrFactoryIconAbs.INT_SIZE_XXSMALL)
            super._btnHelpPartThisFrame = new GfrBcnJhpOflOthXXSmall(mlrEffectsBorder, strKeyHelp);
         else if (intSizeIcons == GfrFactoryIconAbs.INT_SIZE_XSMALL)
            super._btnHelpPartThisFrame = new GfrBcnJhpOflOthXSmall(mlrEffectsBorder, strKeyHelp);
         else if (intSizeIcons == GfrFactoryIconAbs.INT_SIZE_LARGE)
            super._btnHelpPartThisFrame = new GfrBcnJhpOflPartLarge(mlrEffectsBorder, strKeyHelp);
         else
         {
            throw new Exception("Uncaught intSizeIcons: " + intSizeIcons);
         }
      }
     
      this._tbnStepRendering = new GfrTbnStepRenderingJfcChart(intSizeIcons);
      this._tbnLegendsMrks_ = new GfrTbnLegendsMrksJfcChart(intSizeIcons);
      this._tbnLabelsValuesLogsFix_ = new GfrTbnLabelsValuesLogsFixJfcChart(intSizeIcons);
     
      this._tbnStepRendering.addActionListener(alrParentComponent);
      this._tbnLegendsMrks_.addActionListener(alrParentComponent);
      this._tbnLabelsValuesLogsFix_.addActionListener(alrParentComponent);
   }
  
  
   @Override
   public boolean init()
   {
      if (!super.init())
         return false;
     
     
      if (!this._tbnStepRendering.init())
         return false;
     
      if (!this._tbnLegendsMrks_.init())
         return false;
     
      if (!this._tbnLabelsValuesLogsFix_.init())
         return false;
     
      int intCount = super.getComponentIndex(super._tbnCrossOnMouseOver);
      intCount ++;
     
      // ---
      super.add(this._tbnLegendsMrks_, intCount++);
      super.add(this._tbnLabelsValuesLogsFix_, intCount++);
      super.add(this._tbnStepRendering, intCount++);
     
      return true;
   }
  
  
   @Override
   public void destroy()
   {
      super.destroy();

      if (this._tbnStepRendering != null)
      {
         this._tbnStepRendering.destroy();
         this._tbnStepRendering = null;
      }
     
      if (this._tbnLegendsMrks_ != null)
      {
         this._tbnLegendsMrks_.destroy();
         this._tbnLegendsMrks_ = null;
      }
     
      if (this._tbnLabelsValuesLogsFix_ != null)
      {
         this._tbnLabelsValuesLogsFix_.destroy();
         this._tbnLabelsValuesLogsFix_ = null;
      }
   }
}
TOP

Related Classes of org.geoforge.guillc.toolbar.GfrTbrHlpSubDspRunSecPrnTloJfcChartLgrStepAbs

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.