本文整理汇总了Java中org.jfree.chart.plot.XYPlot.getDomainAxisCount方法的典型用法代码示例。如果您正苦于以下问题:Java XYPlot.getDomainAxisCount方法的具体用法?Java XYPlot.getDomainAxisCount怎么用?Java XYPlot.getDomainAxisCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.plot.XYPlot
的用法示例。
在下文中一共展示了XYPlot.getDomainAxisCount方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolveXAxis
import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
@Override
public Collection<String> resolveXAxis(int axisIndex) {
Plot p = chart.getPlot();
Collection<String> names = new LinkedList<>();
if (p instanceof XYPlot) {
XYPlot plot = (XYPlot) p;
for (int i = 0; i < plot.getDomainAxisCount(); i++) {
ValueAxis domain = plot.getDomainAxis(i);
names.add(domain.getLabel());
}
}
return names;
}
示例2: shrinkSelectionOnDomain
import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
/**
* Decreases the length of the domain axis, centered about the given coordinate on the screen.
* The length of the domain axis is reduced by the value of {@link #getZoomInFactor()}.
*
* @param x
* the x coordinate (in screen coordinates).
* @param y
* the y-coordinate (in screen coordinates).
*/
public void shrinkSelectionOnDomain(double x, double y, MouseEvent selectionEvent) {
Plot p = this.chart.getPlot();
if (p instanceof XYPlot) {
XYPlot plot = (XYPlot) p;
Selection selectionObject = new Selection();
for (int i = 0; i < plot.getDomainAxisCount(); i++) {
ValueAxis domain = plot.getDomainAxis(i);
double zoomFactor = getZoomInFactor();
shrinkSelectionXAxis(x, y, selectionObject, domain, i, zoomFactor);
}
informSelectionListener(selectionObject, selectionEvent);
}
}
示例3: enlargeSelectionOnDomain
import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
/**
* Increases the length of the domain axis, centered about the given coordinate on the screen.
* The length of the domain axis is increased by the value of {@link #getZoomOutFactor()}.
*
* @param x
* the x coordinate (in screen coordinates).
* @param y
* the y-coordinate (in screen coordinates).
*/
public void enlargeSelectionOnDomain(double x, double y, MouseEvent selectionEvent) {
Plot p = this.chart.getPlot();
if (p instanceof XYPlot) {
XYPlot plot = (XYPlot) p;
Selection selectionObject = new Selection();
for (int i = 0; i < plot.getDomainAxisCount(); i++) {
ValueAxis domain = plot.getDomainAxis(i);
double zoomFactor = getZoomOutFactor();
shrinkSelectionXAxis(x, y, selectionObject, domain, i, zoomFactor);
}
informSelectionListener(selectionObject, selectionEvent);
}
}
示例4: selectCompleteDomainBounds
import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
/**
* Restores the auto-range calculation on the domain axis.
*/
public void selectCompleteDomainBounds() {
Plot plot = this.chart.getPlot();
if (plot instanceof Zoomable) {
Zoomable z = (Zoomable) plot;
// here we tweak the notify flag on the plot so that only
// one notification happens even though we update multiple
// axes...
boolean savedNotify = plot.isNotify();
plot.setNotify(false);
// we need to guard against this.zoomPoint being null
Point2D zp = this.zoomPoint != null ? this.zoomPoint : new Point();
z.zoomDomainAxes(0.0, this.info.getPlotInfo(), zp);
plot.setNotify(savedNotify);
if (plot instanceof XYPlot) {
XYPlot xyPlot = (XYPlot) plot;
Selection selectionObject = new Selection();
for (int i = 0; i < xyPlot.getDomainAxisCount(); i++) {
ValueAxis domain = xyPlot.getDomainAxis(i);
Range axisRange = new Range(domain.getLowerBound(), domain.getUpperBound());
for (String axisName : axisNameResolver.resolveXAxis(i)) {
selectionObject.addDelimiter(axisName, axisRange);
}
}
informSelectionListener(selectionObject, null);
}
}
}