本文整理匯總了Java中org.jfree.chart.axis.ValueAxis.addChangeListener方法的典型用法代碼示例。如果您正苦於以下問題:Java ValueAxis.addChangeListener方法的具體用法?Java ValueAxis.addChangeListener怎麽用?Java ValueAxis.addChangeListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jfree.chart.axis.ValueAxis
的用法示例。
在下文中一共展示了ValueAxis.addChangeListener方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setDomainAxis
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Sets a domain axis and sends a {@link PlotChangeEvent} to all registered listeners.
*
* @param index the axis index.
* @param axis the axis.
*/
public void setDomainAxis(int index, ValueAxis axis) {
ValueAxis existing = getDomainAxis(index);
if (existing != null) {
existing.removeChangeListener(this);
}
if (axis != null) {
axis.setPlot(this);
}
this.domainAxes.set(index, axis);
if (axis != null) {
axis.configure();
axis.addChangeListener(this);
}
notifyListeners(new PlotChangeEvent(this));
}
示例2: setRangeAxis
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Sets the range axis for the plot and sends a {@link PlotChangeEvent} to all registered
* listeners.
*
* @param axis the axis (<code>null</code> permitted).
*
*/
public void setRangeAxis(ValueAxis axis) {
if (axis != null) {
axis.setPlot(this);
}
// plot is likely registered as a listener with the existing axis...
ValueAxis existing = getRangeAxis();
if (existing != null) {
existing.removeChangeListener(this);
}
this.rangeAxes.set(0, axis);
if (axis != null) {
axis.configure();
axis.addChangeListener(this);
}
notifyListeners(new PlotChangeEvent(this));
}
示例3: setRangeAxis
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Sets the range axis for the plot.
* <P>
* An exception is thrown if the new axis and the plot are not mutually compatible.
*
* @param axis the new axis.
*/
public void setRangeAxis(ValueAxis axis) {
if (axis != null) {
axis.setPlot(this);
axis.addChangeListener(this);
}
// plot is likely registered as a listener with the existing axis...
if (this.rangeAxis != null) {
this.rangeAxis.removeChangeListener(this);
}
this.rangeAxis = axis;
}
示例4: setDomainAxis
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Sets the domain axis for the plot (this must be compatible with the plot
* type or an exception is thrown).
*
* @param axis The new axis.
*/
public void setDomainAxis(ValueAxis axis) {
if (isCompatibleDomainAxis(axis)) {
if (axis != null) {
axis.setPlot(this);
axis.addChangeListener(this);
}
// plot is likely registered as a listener with the existing axis...
if (this.domainAxis != null) {
this.domainAxis.removeChangeListener(this);
}
this.domainAxis = axis;
notifyListeners(new PlotChangeEvent(this));
}
}
示例5: setRangeAxis
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Sets the range axis for the plot.
* <P>
* An exception is thrown if the new axis and the plot are not mutually
* compatible.
*
* @param axis The new axis (null permitted).
*/
public void setRangeAxis(ValueAxis axis) {
if (axis != null) {
axis.setPlot(this);
axis.addChangeListener(this);
}
// plot is likely registered as a listener with the existing axis...
if (this.rangeAxis != null) {
this.rangeAxis.removeChangeListener(this);
}
this.rangeAxis = axis;
notifyListeners(new PlotChangeEvent(this));
}
示例6: setRangeAxis
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Sets a range axis.
*
* @param index the axis index.
* @param axis the axis.
*/
public void setRangeAxis(int index, ValueAxis axis) {
ValueAxis existing = (ValueAxis) this.rangeAxes.get(index);
if (existing != null) {
existing.removeChangeListener(this);
}
if (axis != null) {
axis.setPlot(this);
}
this.rangeAxes.set(index, axis);
if (axis != null) {
axis.configure();
axis.addChangeListener(this);
}
notifyListeners(new PlotChangeEvent(this));
}
示例7: setDomainAxis
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Sets a domain axis and, if requested, sends a {@link PlotChangeEvent} to
* all registered listeners.
*
* @param index the axis index.
* @param axis the axis.
* @param notify notify listeners?
*
* @see #getDomainAxis(int)
*/
public void setDomainAxis(int index, ValueAxis axis, boolean notify) {
ValueAxis existing = getDomainAxis(index);
if (existing != null) {
existing.removeChangeListener(this);
}
if (axis != null) {
axis.setPlot(this);
}
this.domainAxes.set(index, axis);
if (axis != null) {
axis.configure();
axis.addChangeListener(this);
}
if (notify) {
notifyListeners(new PlotChangeEvent(this));
}
}
示例8: setRangeAxis
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Sets the range axis for the plot and sends a {@link PlotChangeEvent} to
* all registered listeners.
*
* @param axis the axis (<code>null</code> permitted).
*
* @see #getRangeAxis()
* @see #setRangeAxis(int, ValueAxis)
*/
public void setRangeAxis(ValueAxis axis) {
if (axis != null) {
axis.setPlot(this);
}
// plot is likely registered as a listener with the existing axis...
ValueAxis existing = getRangeAxis();
if (existing != null) {
existing.removeChangeListener(this);
}
this.rangeAxes.set(0, axis);
if (axis != null) {
axis.configure();
axis.addChangeListener(this);
}
notifyListeners(new PlotChangeEvent(this));
}
示例9: setRangeAxis
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Sets the range axis for the plot.
*
* @param axis the new axis.
*/
public void setRangeAxis(ValueAxis axis) {
if (axis != null) {
axis.setPlot(this);
axis.addChangeListener(this);
}
// plot is likely registered as a listener with the existing axis...
if (this.rangeAxis != null) {
this.rangeAxis.removeChangeListener(this);
}
this.rangeAxis = axis;
}
示例10: setRangeAxis
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Sets a range axis and, if requested, sends a {@link PlotChangeEvent} to
* all registered listeners.
*
* @param index the axis index.
* @param axis the axis.
* @param notify notify listeners?
*/
public void setRangeAxis(int index, ValueAxis axis, boolean notify) {
ValueAxis existing = (ValueAxis) this.rangeAxes.get(index);
if (existing != null) {
existing.removeChangeListener(this);
}
if (axis != null) {
axis.setPlot(this);
}
this.rangeAxes.set(index, axis);
if (axis != null) {
axis.configure();
axis.addChangeListener(this);
}
if (notify) {
notifyListeners(new PlotChangeEvent(this));
}
}
示例11: FastScatterPlot
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Creates a new fast scatter plot.
* <P>
* The data is an array of x, y values: data[0][i] = x, data[1][i] = y.
*
* @param data the data.
* @param domainAxis the domain (x) axis.
* @param rangeAxis the range (y) axis.
*/
public FastScatterPlot(float[][] data, ValueAxis domainAxis, ValueAxis rangeAxis) {
super();
this.data = data;
this.xDataRange = calculateXDataRange(data);
this.yDataRange = calculateYDataRange(data);
this.domainAxis = domainAxis;
if (domainAxis != null) {
domainAxis.setPlot(this);
domainAxis.addChangeListener(this);
}
this.rangeAxis = rangeAxis;
if (rangeAxis != null) {
rangeAxis.setPlot(this);
rangeAxis.addChangeListener(this);
}
this.paint = Color.red;
this.domainGridlinesVisible = true;
this.domainGridlinePaint = FastScatterPlot.DEFAULT_GRIDLINE_PAINT;
this.domainGridlineStroke = FastScatterPlot.DEFAULT_GRIDLINE_STROKE;
this.rangeGridlinesVisible = true;
this.rangeGridlinePaint = FastScatterPlot.DEFAULT_GRIDLINE_PAINT;
this.rangeGridlineStroke = FastScatterPlot.DEFAULT_GRIDLINE_STROKE;
}
示例12: ContourPlot
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Constructs a contour plot with the specified axes (other attributes take default values).
*
* @param dataset The dataset.
* @param domainAxis The domain axis.
* @param rangeAxis The range axis.
* @param colorBar The z-axis axis.
*/
public ContourPlot(ContourDataset dataset,
ValueAxis domainAxis, ValueAxis rangeAxis, ColorBar colorBar) {
super();
this.dataset = dataset;
if (dataset != null) {
dataset.addChangeListener(this);
}
this.domainAxis = domainAxis;
if (domainAxis != null) {
domainAxis.setPlot(this);
domainAxis.addChangeListener(this);
}
this.rangeAxis = rangeAxis;
if (rangeAxis != null) {
rangeAxis.setPlot(this);
rangeAxis.addChangeListener(this);
}
this.colorBar = colorBar;
if (colorBar != null) {
colorBar.getAxis().setPlot(this);
colorBar.getAxis().addChangeListener(this);
colorBar.configure(this);
}
this.colorBarLocation = RectangleEdge.LEFT;
this.toolTipGenerator = new StandardContourToolTipGenerator();
}
示例13: ContourPlot
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Constructs a contour plot with the specified axes (other attributes take
* default values).
*
* @param dataset The dataset.
* @param domainAxis The domain axis.
* @param rangeAxis The range axis.
* @param colorBar The z-axis axis.
*/
public ContourPlot(ContourDataset dataset,
ValueAxis domainAxis, ValueAxis rangeAxis,
ColorBar colorBar) {
super();
this.dataset = dataset;
if (dataset != null) {
dataset.addChangeListener(this);
}
this.domainAxis = domainAxis;
if (domainAxis != null) {
domainAxis.setPlot(this);
domainAxis.addChangeListener(this);
}
this.rangeAxis = rangeAxis;
if (rangeAxis != null) {
rangeAxis.setPlot(this);
rangeAxis.addChangeListener(this);
}
this.colorBar = colorBar;
if (colorBar != null) {
colorBar.getAxis().setPlot(this);
colorBar.getAxis().addChangeListener(this);
colorBar.configure(this);
}
this.colorBarLocation = RectangleEdge.LEFT;
this.toolTipGenerator = new StandardContourToolTipGenerator();
}
示例14: readObject
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Provides serialization support.
*
* @param stream the input stream.
*
* @throws IOException if there is an I/O error.
* @throws ClassNotFoundException if there is a classpath problem.
*/
private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException {
stream.defaultReadObject();
this.domainGridlineStroke = SerialUtilities.readStroke(stream);
this.domainGridlinePaint = SerialUtilities.readPaint(stream);
this.rangeGridlineStroke = SerialUtilities.readStroke(stream);
this.rangeGridlinePaint = SerialUtilities.readPaint(stream);
this.rangeCrosshairStroke = SerialUtilities.readStroke(stream);
this.rangeCrosshairPaint = SerialUtilities.readPaint(stream);
for (int i = 0; i < this.domainAxes.size(); i++) {
CategoryAxis xAxis = (CategoryAxis) this.domainAxes.get(i);
if (xAxis != null) {
xAxis.setPlot(this);
xAxis.addChangeListener(this);
}
}
for (int i = 0; i < this.rangeAxes.size(); i++) {
ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(i);
if (yAxis != null) {
yAxis.setPlot(this);
yAxis.addChangeListener(this);
}
}
int datasetCount = this.datasets.size();
for (int i = 0; i < datasetCount; i++) {
Dataset dataset = (Dataset) this.datasets.get(i);
if (dataset != null) {
dataset.addChangeListener(this);
}
}
int rendererCount = this.renderers.size();
for (int i = 0; i < rendererCount; i++) {
CategoryItemRenderer renderer
= (CategoryItemRenderer) this.renderers.get(i);
if (renderer != null) {
renderer.addChangeListener(this);
}
}
}