All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jrobin.graph.HRule Maven / Gradle / Ivy

Go to download

JRobin is a 100% pure Java alternative to RRDTool, with about exactly the same specifications. If you provide the same data to RRDTool and JRobin, you will get exactly the same results and graphs. All standard RRDTool operations are supported.

The newest version!
/*******************************************************************************
 * Copyright (c) 2001-2005 Sasa Markovic and Ciaran Treanor.
 * Copyright (c) 2011 The OpenNMS Group, Inc.
 *
 * 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.1 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; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *******************************************************************************/

package org.jrobin.graph;

import java.awt.*;

class HRule extends Rule {
	final double value;

	HRule(double value, Paint color, LegendText legend, float width) {
		super(color, legend, width);
		this.value = value;
	}

	void setLegendVisibility(double minval, double maxval, boolean forceLegend) {
		legend.enabled &= (forceLegend || (value >= minval && value <= maxval));
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy