本文整理汇总了Java中org.jfree.chart.axis.ValueTick类的典型用法代码示例。如果您正苦于以下问题:Java ValueTick类的具体用法?Java ValueTick怎么用?Java ValueTick使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ValueTick类属于org.jfree.chart.axis包,在下文中一共展示了ValueTick类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawDomainTickBands
import org.jfree.chart.axis.ValueTick; //导入依赖的package包/类
/**
* Draws the domain tick bands, if any.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param ticks the ticks.
*/
public void drawDomainTickBands(Graphics2D g2, Rectangle2D dataArea, List ticks) {
// draw the domain tick bands, if any...
Paint bandPaint = getDomainTickBandPaint();
if (bandPaint != null) {
boolean fillBand = false;
final ValueAxis xAxis = getDomainAxis();
double previous = xAxis.getLowerBound();
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
double current = tick.getValue();
if (fillBand) {
getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea, previous, current);
}
previous = current;
fillBand = !fillBand;
}
double end = xAxis.getUpperBound();
if (fillBand) {
getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea, previous, end);
}
}
}
示例2: drawRangeTickBands
import org.jfree.chart.axis.ValueTick; //导入依赖的package包/类
/**
* Draws the range tick bands, if any.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param ticks the ticks.
*/
public void drawRangeTickBands(Graphics2D g2, Rectangle2D dataArea, List ticks) {
// draw the range tick bands, if any...
Paint bandPaint = getRangeTickBandPaint();
if (bandPaint != null) {
boolean fillBand = false;
final ValueAxis axis = getRangeAxis();
double previous = axis.getLowerBound();
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
double current = tick.getValue();
if (fillBand) {
getRenderer().fillRangeGridBand(g2, this, axis, dataArea, previous, current);
}
previous = current;
fillBand = !fillBand;
}
double end = axis.getUpperBound();
if (fillBand) {
getRenderer().fillRangeGridBand(g2, this, axis, dataArea, previous, end);
}
}
}
示例3: drawDomainGridlines
import org.jfree.chart.axis.ValueTick; //导入依赖的package包/类
/**
* Draws the gridlines for the plot, if they are visible.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param ticks the ticks.
*/
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks) {
// no renderer, no gridlines...
if (getRenderer() == null) {
return;
}
// draw the domain grid lines, if any...
if (isDomainGridlinesVisible()) {
Stroke gridStroke = getDomainGridlineStroke();
Paint gridPaint = getDomainGridlinePaint();
if ((gridStroke != null) && (gridPaint != null)) {
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
getRenderer().drawDomainGridLine(
g2, this, getDomainAxis(), dataArea, tick.getValue()
);
}
}
}
}
示例4: drawRangeGridlines
import org.jfree.chart.axis.ValueTick; //导入依赖的package包/类
/**
* Draws the gridlines for the plot, if they are visible.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param ticks the ticks.
*/
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks) {
// draw the range grid lines, if any...
if (isRangeGridlinesVisible()) {
Stroke gridStroke = getRangeGridlineStroke();
Paint gridPaint = getRangeGridlinePaint();
if ((gridStroke != null) && (gridPaint != null)) {
ValueAxis axis = getRangeAxis();
if (axis != null) {
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
getRenderer().drawRangeGridLine(
g2, this, getRangeAxis(), dataArea, tick.getValue()
);
}
}
}
}
}
示例5: drawDomainGridlines
import org.jfree.chart.axis.ValueTick; //导入依赖的package包/类
/**
* Draws the gridlines for the plot, if they are visible.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param ticks the ticks.
*/
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks) {
// draw the domain grid lines, if any...
if (isDomainGridlinesVisible()) {
Stroke gridStroke = getDomainGridlineStroke();
Paint gridPaint = getDomainGridlinePaint();
if ((gridStroke != null) && (gridPaint != null)) {
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
double v = this.domainAxis.valueToJava2D(
tick.getValue(), dataArea, RectangleEdge.BOTTOM
);
Line2D line = new Line2D.Double(v, dataArea.getMinY(), v, dataArea.getMaxY());
g2.setPaint(gridPaint);
g2.setStroke(gridStroke);
g2.draw(line);
}
}
}
}
示例6: drawRangeGridlines
import org.jfree.chart.axis.ValueTick; //导入依赖的package包/类
/**
* Draws the gridlines for the plot, if they are visible.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param ticks the ticks.
*/
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks) {
// draw the range grid lines, if any...
if (isRangeGridlinesVisible()) {
Stroke gridStroke = getRangeGridlineStroke();
Paint gridPaint = getRangeGridlinePaint();
if ((gridStroke != null) && (gridPaint != null)) {
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
double v = this.rangeAxis.valueToJava2D(
tick.getValue(), dataArea, RectangleEdge.LEFT
);
Line2D line = new Line2D.Double(dataArea.getMinX(), v, dataArea.getMaxX(), v);
g2.setPaint(gridPaint);
g2.setStroke(gridStroke);
g2.draw(line);
}
}
}
}
示例7: drawRangeGridlines
import org.jfree.chart.axis.ValueTick; //导入依赖的package包/类
/**
* Draws the gridlines for the plot.
*
* @param g2 the graphics device.
* @param dataArea the area inside the axes.
* @param ticks the ticks.
*/
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks) {
// draw the range grid lines, if any...
if (isRangeGridlinesVisible()) {
Stroke gridStroke = getRangeGridlineStroke();
Paint gridPaint = getRangeGridlinePaint();
if ((gridStroke != null) && (gridPaint != null)) {
ValueAxis axis = getRangeAxis();
if (axis != null) {
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
CategoryItemRenderer renderer1 = getRenderer();
if (renderer1 != null) {
renderer1.drawRangeGridline(
g2, this, getRangeAxis(), dataArea, tick.getValue()
);
}
}
}
}
}
}
示例8: drawDomainGridlines
import org.jfree.chart.axis.ValueTick; //导入依赖的package包/类
/**
* Draws the gridlines for the plot, if they are visible.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param ticks the ticks.
*/
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
List ticks) {
// no renderer, no gridlines...
if (getRenderer() == null) {
return;
}
// draw the domain grid lines, if any...
if (isDomainGridlinesVisible()) {
Stroke gridStroke = getDomainGridlineStroke();
Paint gridPaint = getDomainGridlinePaint();
if ((gridStroke != null) && (gridPaint != null)) {
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
getRenderer().drawDomainGridLine(g2, this, getDomainAxis(),
dataArea, tick.getValue());
}
}
}
}
示例9: drawDomainGridlines
import org.jfree.chart.axis.ValueTick; //导入依赖的package包/类
/**
* Draws the gridlines for the plot, if they are visible.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param ticks the ticks.
*/
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
List ticks) {
// draw the domain grid lines, if the flag says they're visible...
if (isDomainGridlinesVisible()) {
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
double v = this.domainAxis.valueToJava2D(tick.getValue(),
dataArea, RectangleEdge.BOTTOM);
Line2D line = new Line2D.Double(v, dataArea.getMinY(), v,
dataArea.getMaxY());
g2.setPaint(getDomainGridlinePaint());
g2.setStroke(getDomainGridlineStroke());
g2.draw(line);
}
}
}
示例10: drawRangeGridlines
import org.jfree.chart.axis.ValueTick; //导入依赖的package包/类
/**
* Draws the gridlines for the plot, if they are visible.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param ticks the ticks.
*/
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea,
List ticks) {
// draw the range grid lines, if the flag says they're visible...
if (isRangeGridlinesVisible()) {
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
double v = this.rangeAxis.valueToJava2D(tick.getValue(),
dataArea, RectangleEdge.LEFT);
Line2D line = new Line2D.Double(dataArea.getMinX(), v,
dataArea.getMaxX(), v);
g2.setPaint(getRangeGridlinePaint());
g2.setStroke(getRangeGridlineStroke());
g2.draw(line);
}
}
}
示例11: drawRangeGridlines
import org.jfree.chart.axis.ValueTick; //导入依赖的package包/类
/**
* Draws the gridlines for the plot.
*
* @param g2 the graphics device.
* @param dataArea the area inside the axes.
* @param ticks the ticks.
*
* @see #drawDomainGridlines(Graphics2D, Rectangle2D)
*/
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea,
List ticks) {
// draw the range grid lines, if any...
if (isRangeGridlinesVisible()) {
Stroke gridStroke = getRangeGridlineStroke();
Paint gridPaint = getRangeGridlinePaint();
if ((gridStroke != null) && (gridPaint != null)) {
ValueAxis axis = getRangeAxis();
if (axis != null) {
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
CategoryItemRenderer renderer1 = getRenderer();
if (renderer1 != null) {
renderer1.drawRangeGridline(g2, this,
getRangeAxis(), dataArea, tick.getValue());
}
}
}
}
}
}
示例12: drawDomainTickBands
import org.jfree.chart.axis.ValueTick; //导入依赖的package包/类
/**
* Draws the domain tick bands, if any.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param ticks the ticks.
*
* @see #setDomainTickBandPaint(Paint)
*/
public void drawDomainTickBands(Graphics2D g2, Rectangle2D dataArea,
List ticks) {
Paint bandPaint = getDomainTickBandPaint();
if (bandPaint != null) {
boolean fillBand = false;
ValueAxis xAxis = getDomainAxis();
double previous = xAxis.getLowerBound();
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
double current = tick.getValue();
if (fillBand) {
getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,
previous, current);
}
previous = current;
fillBand = !fillBand;
}
double end = xAxis.getUpperBound();
if (fillBand) {
getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,
previous, end);
}
}
}
示例13: drawRangeTickBands
import org.jfree.chart.axis.ValueTick; //导入依赖的package包/类
/**
* Draws the range tick bands, if any.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param ticks the ticks.
*
* @see #setRangeTickBandPaint(Paint)
*/
public void drawRangeTickBands(Graphics2D g2, Rectangle2D dataArea,
List ticks) {
Paint bandPaint = getRangeTickBandPaint();
if (bandPaint != null) {
boolean fillBand = false;
ValueAxis axis = getRangeAxis();
double previous = axis.getLowerBound();
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
double current = tick.getValue();
if (fillBand) {
getRenderer().fillRangeGridBand(g2, this, axis, dataArea,
previous, current);
}
previous = current;
fillBand = !fillBand;
}
double end = axis.getUpperBound();
if (fillBand) {
getRenderer().fillRangeGridBand(g2, this, axis, dataArea,
previous, end);
}
}
}
示例14: drawDomainGridlines
import org.jfree.chart.axis.ValueTick; //导入依赖的package包/类
/**
* Draws the gridlines for the plot, if they are visible.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param ticks the ticks.
*/
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
List ticks) {
if (!isDomainGridlinesVisible()) {
return;
}
Object saved = g2.getRenderingHint(RenderingHints.KEY_STROKE_CONTROL);
g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
RenderingHints.VALUE_STROKE_NORMALIZE);
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
double v = this.domainAxis.valueToJava2D(tick.getValue(),
dataArea, RectangleEdge.BOTTOM);
Line2D line = new Line2D.Double(v, dataArea.getMinY(), v,
dataArea.getMaxY());
g2.setPaint(getDomainGridlinePaint());
g2.setStroke(getDomainGridlineStroke());
g2.draw(line);
}
g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, saved);
}
示例15: drawRangeGridlines
import org.jfree.chart.axis.ValueTick; //导入依赖的package包/类
/**
* Draws the gridlines for the plot, if they are visible.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param ticks the ticks.
*/
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea,
List ticks) {
if (!isRangeGridlinesVisible()) {
return;
}
Object saved = g2.getRenderingHint(RenderingHints.KEY_STROKE_CONTROL);
g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
RenderingHints.VALUE_STROKE_NORMALIZE);
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
double v = this.rangeAxis.valueToJava2D(tick.getValue(),
dataArea, RectangleEdge.LEFT);
Line2D line = new Line2D.Double(dataArea.getMinX(), v,
dataArea.getMaxX(), v);
g2.setPaint(getRangeGridlinePaint());
g2.setStroke(getRangeGridlineStroke());
g2.draw(line);
}
g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, saved);
}