本文整理匯總了Java中org.jfree.chart.axis.CategoryAxis.setPlot方法的典型用法代碼示例。如果您正苦於以下問題:Java CategoryAxis.setPlot方法的具體用法?Java CategoryAxis.setPlot怎麽用?Java CategoryAxis.setPlot使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jfree.chart.axis.CategoryAxis
的用法示例。
在下文中一共展示了CategoryAxis.setPlot方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setDomainAxis
import org.jfree.chart.axis.CategoryAxis; //導入方法依賴的package包/類
/**
* Sets a domain axis.
*
* @param index the axis index.
* @param axis the axis.
*/
public void setDomainAxis(int index, CategoryAxis axis) {
CategoryAxis existing = (CategoryAxis) this.domainAxes.get(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: setDomainAxis
import org.jfree.chart.axis.CategoryAxis; //導入方法依賴的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 (<code>null</code> permitted).
* @param notify notify listeners?
*/
public void setDomainAxis(int index, CategoryAxis axis, boolean notify) {
CategoryAxis existing = (CategoryAxis) this.domainAxes.get(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));
}
}
示例3: readObject
import org.jfree.chart.axis.CategoryAxis; //導入方法依賴的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);
}
}
for (int i = 0; i < this.rangeAxes.size(); i++) {
ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(i);
if (yAxis != null) {
yAxis.setPlot(this);
}
}
this.foregroundRangeMarkers = new HashMap();
this.backgroundRangeMarkers = new HashMap();
Marker baseline = new ValueMarker(
0.0,
new Color(0.8f, 0.8f, 0.8f, 0.5f), new BasicStroke(1.0f),
new Color(0.85f, 0.85f, 0.95f, 0.5f), new BasicStroke(1.0f),
0.6f
);
addRangeMarker(baseline, Layer.BACKGROUND);
}
示例4: readObject
import org.jfree.chart.axis.CategoryAxis; //導入方法依賴的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);
}
}
}