Package org.geoforge.jfreechart.xyplot

Source Code of org.geoforge.jfreechart.xyplot.GfrXYPlotGridDepLgrStepLogsTloVarAbs

/*
*  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.jfreechart.xyplot;

import org.geoforge.jfreechart.axis.GfrAxsLgrRng;
import org.geoforge.jfreechart.axis.GfrAxsLinRng;
import org.geoforge.jfreechart.data.xy.GfrXYSeriesCollectionDstLogsTloVarAbs;
import org.geoforge.jfreechart.handler.IHandlerContainerVariableLog;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.renderer.xy.XYItemRenderer;
import org.jfree.data.xy.XYDataset;

/**
*
* @author bantchao
*/
abstract public class GfrXYPlotGridDepLgrStepLogsTloVarAbs extends GfrXYPlotGridDepLgrStepLogsTloAbs implements
        IHandlerContainerVariableLog
{  
  
   @Override
   public boolean addVariableLog(String strId) throws Exception
   {
        XYDataset dst = super.getDataset();
   
        if (((IHandlerContainerVariableLog) dst).addVariableLog(strId))
        {
            _update();
            return true;
        }
       
        return false;
   }

   @Override
   public boolean removeVariableLog(String strId) throws Exception
   {
        XYDataset dst = super.getDataset();
       
        if (((IHandlerContainerVariableLog) dst).removeVariableLog(strId))
        {
            _update();
            return true;
        }
       
        return false;
   }
  
   protected GfrXYPlotGridDepLgrStepLogsTloVarAbs(
           XYDataset dataset,
           ValueAxis domainAxis,
           GfrAxsLinRng rangeAxisLinear,
           GfrAxsLgrRng rangeAxisLogarithmic,
           XYItemRenderer renderer,
           String strIdTlo) throws Exception
   {
      super(dataset, domainAxis, rangeAxisLinear, rangeAxisLogarithmic, renderer, strIdTlo);
   }
  
   protected void _update() throws Exception
   {
       GfrXYSeriesCollectionDstLogsTloVarAbs serCollection = (GfrXYSeriesCollectionDstLogsTloVarAbs) super.getDataset();
       serCollection.updateValuesAbscissaHorizontalSegments();
      
       _updateRenderer();
   }
}
TOP

Related Classes of org.geoforge.jfreechart.xyplot.GfrXYPlotGridDepLgrStepLogsTloVarAbs

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.