本文整理匯總了Java中org.jfree.chart.axis.ValueAxis.configure方法的典型用法代碼示例。如果您正苦於以下問題:Java ValueAxis.configure方法的具體用法?Java ValueAxis.configure怎麽用?Java ValueAxis.configure使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jfree.chart.axis.ValueAxis
的用法示例。
在下文中一共展示了ValueAxis.configure方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: clone
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Returns a clone of the plot.
*
* @return A clone.
*
* @throws CloneNotSupportedException this class will not throw this
* exception, but subclasses (if any) might.
*/
public Object clone() throws CloneNotSupportedException {
CombinedRangeCategoryPlot result
= (CombinedRangeCategoryPlot) super.clone();
result.subplots = (List) ObjectUtilities.deepClone(this.subplots);
for (Iterator it = result.subplots.iterator(); it.hasNext();) {
Plot child = (Plot) it.next();
child.setParent(result);
}
// after setting up all the subplots, the shared range axis may need
// reconfiguring
ValueAxis rangeAxis = result.getRangeAxis();
if (rangeAxis != null) {
rangeAxis.configure();
}
return result;
}
示例2: clone
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Returns a clone of the annotation.
*
* @return A clone.
*
* @throws CloneNotSupportedException this class will not throw this exception, but subclasses
* (if any) might.
*/
public Object clone() throws CloneNotSupportedException {
CombinedDomainXYPlot result = (CombinedDomainXYPlot) super.clone();
result.subplots = ObjectUtils.clone(this.subplots);
for (Iterator it = result.subplots.iterator(); it.hasNext();) {
Plot child = (Plot) it.next();
child.setParent(result);
}
// after setting up all the subplots, the shared domain axis may need reconfiguring
ValueAxis domainAxis = result.getDomainAxis();
if (domainAxis != null) {
domainAxis.configure();
}
return result;
}
示例3: 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));
}
示例4: add
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Adds a subplot and sends a {@link PlotChangeEvent} to all registered listeners.
*
* @param subplot the subplot (<code>null</code> not permitted).
* @param weight the weight (must be >= 1).
*/
public void add(CategoryPlot subplot, int weight) {
if (subplot == null) {
throw new IllegalArgumentException("Null 'subplot' argument.");
}
if (weight <= 0) {
throw new IllegalArgumentException("Require weight >= 1.");
}
// store the plot and its weight
subplot.setParent(this);
subplot.setWeight(weight);
subplot.setInsets(new Insets(0, 0, 0, 0));
subplot.setRangeAxis(null);
subplot.setOrientation(getOrientation());
subplot.addChangeListener(this);
this.subplots.add(subplot);
this.totalWeight += weight;
// configure the range axis...
ValueAxis axis = getRangeAxis();
if (axis != null) {
axis.configure();
}
notifyListeners(new PlotChangeEvent(this));
}
示例5: clone
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Returns a clone of the plot.
*
* @return A clone.
*
* @throws CloneNotSupportedException this class will not throw this exception, but subclasses
* (if any) might.
*/
public Object clone() throws CloneNotSupportedException {
CombinedRangeXYPlot result = (CombinedRangeXYPlot) super.clone();
result.subplots = ObjectUtils.clone(this.subplots);
for (Iterator it = result.subplots.iterator(); it.hasNext();) {
Plot child = (Plot) it.next();
child.setParent(result);
}
// after setting up all the subplots, the shared range axis may need reconfiguring
ValueAxis rangeAxis = result.getRangeAxis();
if (rangeAxis != null) {
rangeAxis.configure();
}
return result;
}
示例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: datasetChanged
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Receives notification of a change to the plot's dataset.
* <P>
* The range axis bounds will be recalculated if necessary.
*
* @param event information about the event (not used here).
*/
public void datasetChanged(DatasetChangeEvent event) {
int count = this.rangeAxes.size();
for (int axisIndex = 0; axisIndex < count; axisIndex++) {
ValueAxis yAxis = getRangeAxis(axisIndex);
if (yAxis != null) {
yAxis.configure();
}
}
if (getParent() != null) {
getParent().datasetChanged(event);
}
else {
PlotChangeEvent e = new PlotChangeEvent(this);
notifyListeners(e);
}
}
示例8: datasetChanged
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Receives notification of a change to the plot's dataset.
* <P>
* The range axis bounds will be recalculated if necessary.
*
* @param event information about the event (not used here).
*/
public void datasetChanged(DatasetChangeEvent event) {
int count = this.rangeAxes.size();
for (int axisIndex = 0; axisIndex < count; axisIndex++) {
ValueAxis yAxis = getRangeAxis(axisIndex);
if (yAxis != null) {
yAxis.configure();
}
}
if (getParent() != null) {
getParent().datasetChanged(event);
}
else {
PlotChangeEvent e = new PlotChangeEvent(this);
e.setType(ChartChangeEventType.DATASET_UPDATED);
notifyListeners(e);
}
}
示例9: clone
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Returns a clone of the annotation.
*
* @return A clone.
*
* @throws CloneNotSupportedException this class will not throw this
* exception, but subclasses (if any) might.
*/
public Object clone() throws CloneNotSupportedException {
CombinedDomainXYPlot result = (CombinedDomainXYPlot) super.clone();
result.subplots = (List) ObjectUtilities.deepClone(this.subplots);
for (Iterator it = result.subplots.iterator(); it.hasNext();) {
Plot child = (Plot) it.next();
child.setParent(result);
}
// after setting up all the subplots, the shared domain axis may need
// reconfiguring
ValueAxis domainAxis = result.getDomainAxis();
if (domainAxis != null) {
domainAxis.configure();
}
return result;
}
示例10: add
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Adds a subplot with the specified weight and sends a @link{PlotChangeEvent} to all
* registered listeners. The weight determines how much space is allocated to the
* subplot relative to all the other subplots.
* <P>
* The domain axis for the subplot will be set to <code>null</code>.
*
* @param subplot the subplot (<code>null</code> not permitted).
* @param weight the weight (must be >= 1).
*/
public void add(XYPlot subplot, int weight) {
if (subplot == null) {
throw new IllegalArgumentException("Null 'subplot' argument.");
}
if (weight <= 0) {
throw new IllegalArgumentException("Require weight >= 1.");
}
// store the plot and its weight
subplot.setParent(this);
subplot.setWeight(weight);
subplot.setInsets(new Insets(0, 0, 0, 0), false);
subplot.setDomainAxis(null);
subplot.addChangeListener(this);
this.subplots.add(subplot);
// keep track of total weights
this.totalWeight += weight;
ValueAxis axis = getDomainAxis();
if (axis != null) {
axis.configure();
}
notifyListeners(new PlotChangeEvent(this));
}
示例11: configureRangeAxes
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Configures the range axes.
*
* @see #configureDomainAxes()
*/
public void configureRangeAxes() {
for (int i = 0; i < this.rangeAxes.size(); i++) {
ValueAxis axis = (ValueAxis) this.rangeAxes.get(i);
if (axis != null) {
axis.configure();
}
}
}
示例12: 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();
// the range axis is deserialized before the subplots, so its value
// range is likely to be incorrect...
ValueAxis rangeAxis = getRangeAxis();
if (rangeAxis != null) {
rangeAxis.configure();
}
}
示例13: configureRangeAxes
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Configures the range axes.
*/
public void configureRangeAxes() {
for (int i = 0; i < this.rangeAxes.size(); i++) {
ValueAxis axis = (ValueAxis) this.rangeAxes.get(i);
if (axis != null) {
axis.configure();
}
}
}
示例14: remove
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Removes a subplot from the combined chart.
*
* @param subplot the subplot.
*/
public void remove(CategoryPlot subplot) {
if (subplot == null) {
throw new IllegalArgumentException(" Null 'subplot' argument.");
}
int position = -1;
int size = this.subplots.size();
int i = 0;
while (position == -1 && i < size) {
if (this.subplots.get(i) == subplot) {
position = i;
}
i++;
}
if (position != -1) {
subplot.setParent(null);
subplot.removeChangeListener(this);
this.totalWeight -= subplot.getWeight();
ValueAxis range = getRangeAxis();
if (range != null) {
range.configure();
}
ValueAxis range2 = getRangeAxis(1);
if (range2 != null) {
range2.configure();
}
notifyListeners(new PlotChangeEvent(this));
}
}
示例15: remove
import org.jfree.chart.axis.ValueAxis; //導入方法依賴的package包/類
/**
* Removes a subplot from the combined chart.
*
* @param subplot the subplot (<code>null</code> not permitted).
*/
public void remove(CategoryPlot subplot) {
if (subplot == null) {
throw new IllegalArgumentException(" Null 'subplot' argument.");
}
int position = -1;
int size = this.subplots.size();
int i = 0;
while (position == -1 && i < size) {
if (this.subplots.get(i) == subplot) {
position = i;
}
i++;
}
if (position != -1) {
this.subplots.remove(position);
subplot.setParent(null);
subplot.removeChangeListener(this);
this.totalWeight -= subplot.getWeight();
ValueAxis range = getRangeAxis();
if (range != null) {
range.configure();
}
ValueAxis range2 = getRangeAxis(1);
if (range2 != null) {
range2.configure();
}
notifyListeners(new PlotChangeEvent(this));
}
}