本文整理汇总了Java中org.jfree.chart.axis.ValueTick.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java ValueTick.getValue方法的具体用法?Java ValueTick.getValue怎么用?Java ValueTick.getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.axis.ValueTick
的用法示例。
在下文中一共展示了ValueTick.getValue方法的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: 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);
}
}
}
示例4: 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);
}
}
}
示例5: drawRangeGridlines
import org.jfree.chart.axis.ValueTick; //导入方法依赖的package包/类
/**
* Draws the gridlines for the plot's primary range axis, if they are
* visible.
*
* @param g2 the graphics device.
* @param area the data area.
* @param ticks the ticks.
*/
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area,
List ticks) {
// draw the range grid lines, if any...
if (isRangeGridlinesVisible()) {
Stroke gridStroke = getRangeGridlineStroke();
Paint gridPaint = getRangeGridlinePaint();
ValueAxis axis = getRangeAxis();
if (axis != null) {
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
if (tick.getValue() != 0.0
|| !isRangeZeroBaselineVisible()) {
getRenderer().drawRangeLine(g2, this, getRangeAxis(),
area, tick.getValue(), gridPaint, gridStroke);
}
}
}
}
}
示例6: 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) {
// draw the domain tick bands, if any...
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);
}
}
}
示例7: 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) {
// draw the range tick bands, if any...
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);
}
}
}
示例8: drawRangeGridlines
import org.jfree.chart.axis.ValueTick; //导入方法依赖的package包/类
/**
* Draws the gridlines for the plot's primary range axis, if they are
* visible.
*
* @param g2 the graphics device.
* @param area the data area.
* @param ticks the ticks.
*/
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area,
List ticks) {
// no renderer, no gridlines...
if (getRenderer() == null) {
return;
}
// draw the range grid lines, if any...
if (isRangeGridlinesVisible()) {
Stroke gridStroke = getRangeGridlineStroke();
Paint gridPaint = getRangeGridlinePaint();
ValueAxis axis = getRangeAxis();
if (axis != null) {
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
if (tick.getValue() != 0.0
|| !isRangeZeroBaselineVisible()) {
getRenderer().drawRangeLine(g2, this, getRangeAxis(),
area, tick.getValue(), gridPaint, gridStroke);
}
}
}
}
}
示例9: drawRangeGridlines
import org.jfree.chart.axis.ValueTick; //导入方法依赖的package包/类
/**
* Draws the gridlines for the plot's primary range axis, if they are
* visible.
*
* @param g2 the graphics device.
* @param area the data area.
* @param ticks the ticks.
*
* @see #drawDomainGridlines(Graphics2D, Rectangle2D, List)
*/
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area,
List ticks) {
// no renderer, no gridlines...
if (getRenderer() == null) {
return;
}
// draw the range grid lines, if any...
if (isRangeGridlinesVisible() || isRangeMinorGridlinesVisible()) {
Stroke gridStroke = null;
Paint gridPaint = null;
ValueAxis axis = getRangeAxis();
if (axis != null) {
Iterator iterator = ticks.iterator();
boolean paintLine;
while (iterator.hasNext()) {
paintLine = false;
ValueTick tick = (ValueTick) iterator.next();
if ((tick.getTickType() == TickType.MINOR)
&& isRangeMinorGridlinesVisible()) {
gridStroke = getRangeMinorGridlineStroke();
gridPaint = getRangeMinorGridlinePaint();
paintLine = true;
} else if ((tick.getTickType() == TickType.MAJOR)
&& isRangeGridlinesVisible()) {
gridStroke = getRangeGridlineStroke();
gridPaint = getRangeGridlinePaint();
paintLine = true;
}
if ((tick.getValue() != 0.0
|| !isRangeZeroBaselineVisible()) && paintLine) {
getRenderer().drawRangeLine(g2, this, getRangeAxis(),
area, tick.getValue(), gridPaint, gridStroke);
}
}
}
}
}
示例10: drawGridBandsVertical
import org.jfree.chart.axis.ValueTick; //导入方法依赖的package包/类
/**
* Draws the grid bands for the axis when it is at the top or bottom of the plot.
*
* @param g2
* the graphics device.
* @param drawArea
* the area within which the chart should be drawn.
* @param plotArea
* the area within which the plot should be drawn (a subset of the drawArea).
* @param firstGridBandIsDark
* True: the first grid band takes the color of <CODE>gridBandPaint<CODE>. False: the
* second grid band takes the color of <CODE>gridBandPaint<CODE>.
* @param ticks
* a list of ticks.
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
protected void drawGridBandsVertical(Graphics2D g2, Rectangle2D drawArea, Rectangle2D plotArea,
boolean firstGridBandIsDark, List ticks) {
double xx = plotArea.getX();
double yy1, yy2;
// gets the outline stroke width of the plot
double outlineStrokeWidth;
Stroke outlineStroke = getPlot().getOutlineStroke();
if (outlineStroke != null && outlineStroke instanceof BasicStroke) {
outlineStrokeWidth = ((BasicStroke) outlineStroke).getLineWidth();
} else {
outlineStrokeWidth = 1d;
}
Rectangle2D band;
for (ValueTick tick : (List<ValueTick>) ticks) {
int weightIndex = (int) tick.getValue();
yy1 = valueToJava2D(tick.getValue() + 0.5d, plotArea, RectangleEdge.LEFT);
yy2 = valueToJava2D(tick.getValue() - 0.5d, plotArea, RectangleEdge.LEFT);
g2.setColor(PlotterAdapter.getWeightColor(this.weights[weightIndex], this.maxWeight));
band = new Rectangle2D.Double(xx + outlineStrokeWidth, yy1, plotArea.getMaxX() - xx - outlineStrokeWidth,
yy2 - yy1);
g2.fill(band);
}
g2.setPaintMode();
}
示例11: drawGridBandsHorizontal
import org.jfree.chart.axis.ValueTick; //导入方法依赖的package包/类
/**
* Draws the grid bands for the axis when it is at the top or bottom of the plot.
*
* @param g2
* the graphics device.
* @param plotArea
* the area within which the chart should be drawn.
* @param dataArea
* the area within which the plot should be drawn (a subset of the drawArea).
* @param firstGridBandIsDark
* True: the first grid band takes the color of <CODE>gridBandPaint<CODE>. False: the
* second grid band takes the color of <CODE>gridBandPaint<CODE>.
* @param ticks
* the ticks.
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
protected void drawGridBandsHorizontal(Graphics2D g2, Rectangle2D plotArea, Rectangle2D dataArea,
boolean firstGridBandIsDark, List ticks) {
double yy = dataArea.getY();
double xx1, xx2;
// gets the outline stroke width of the plot
double outlineStrokeWidth;
if (getPlot().getOutlineStroke() != null) {
outlineStrokeWidth = ((BasicStroke) getPlot().getOutlineStroke()).getLineWidth();
} else {
outlineStrokeWidth = 1d;
}
Rectangle2D band;
for (ValueTick tick : (List<ValueTick>) ticks) {
int weightIndex = (int) tick.getValue();
xx1 = valueToJava2D(tick.getValue() - 0.5d, dataArea, RectangleEdge.BOTTOM);
xx2 = valueToJava2D(tick.getValue() + 0.5d, dataArea, RectangleEdge.BOTTOM);
g2.setColor(PlotterAdapter.getWeightColor(this.weights[weightIndex], this.maxWeight));
band = new Rectangle2D.Double(xx1, yy + outlineStrokeWidth, xx2 - xx1,
dataArea.getMaxY() - yy - outlineStrokeWidth);
g2.fill(band);
}
g2.setPaintMode();
}
示例12: drawRangeGridlines
import org.jfree.chart.axis.ValueTick; //导入方法依赖的package包/类
/**
* Draws the gridlines for the plot's primary range axis, if they are
* visible.
*
* @param g2 the graphics device.
* @param area the data area.
* @param ticks the ticks.
*
* @see #drawDomainGridlines(Graphics2D, Rectangle2D, List)
*/
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area,
List ticks) {
// no renderer, no gridlines...
if (getRenderer() == null) {
return;
}
// draw the range grid lines, if any...
if (isRangeGridlinesVisible()) {
Stroke gridStroke = getRangeGridlineStroke();
Paint gridPaint = getRangeGridlinePaint();
ValueAxis axis = getRangeAxis();
if (axis != null) {
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
if (tick.getValue() != 0.0
|| !isRangeZeroBaselineVisible()) {
getRenderer().drawRangeLine(g2, this, getRangeAxis(),
area, tick.getValue(), gridPaint, gridStroke);
}
}
}
}
}
示例13: drawRangeGridlines
import org.jfree.chart.axis.ValueTick; //导入方法依赖的package包/类
/**
* Draws the range gridlines for the plot, if they are visible.
*
* @param g2 the graphics device ({@code null} not permitted).
* @param dataArea the area inside the axes ({@code null} not permitted).
* @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() && !isRangeMinorGridlinesVisible()) {
return;
}
// no axis, no gridlines...
ValueAxis axis = getRangeAxis();
if (axis == null) {
return;
}
// no renderer, no gridlines...
CategoryItemRenderer r = getRenderer();
if (r == null) {
return;
}
Stroke gridStroke = null;
Paint gridPaint = null;
boolean paintLine;
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
paintLine = false;
ValueTick tick = (ValueTick) iterator.next();
if ((tick.getTickType() == TickType.MINOR)
&& isRangeMinorGridlinesVisible()) {
gridStroke = getRangeMinorGridlineStroke();
gridPaint = getRangeMinorGridlinePaint();
paintLine = true;
}
else if ((tick.getTickType() == TickType.MAJOR)
&& isRangeGridlinesVisible()) {
gridStroke = getRangeGridlineStroke();
gridPaint = getRangeGridlinePaint();
paintLine = true;
}
if (((tick.getValue() != 0.0)
|| !isRangeZeroBaselineVisible()) && paintLine) {
// the method we want isn't in the CategoryItemRenderer
// interface...
if (r instanceof AbstractCategoryItemRenderer) {
AbstractCategoryItemRenderer aci
= (AbstractCategoryItemRenderer) r;
aci.drawRangeLine(g2, this, axis, dataArea,
tick.getValue(), gridPaint, gridStroke);
}
else {
// we'll have to use the method in the interface, but
// this doesn't have the paint and stroke settings...
r.drawRangeGridline(g2, this, axis, dataArea,
tick.getValue());
}
}
}
}
示例14: drawRangeGridlines
import org.jfree.chart.axis.ValueTick; //导入方法依赖的package包/类
/**
* Draws the range gridlines for the plot, if they are visible.
*
* @param g2 the graphics device ({@code null} not permitted).
* @param dataArea the area inside the axes ({@code null} not permitted).
* @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() && !isRangeMinorGridlinesVisible()) {
return;
}
// no axis, no gridlines...
ValueAxis axis = getRangeAxis();
if (axis == null) {
return;
}
// no renderer, no gridlines...
CategoryItemRenderer r = getRenderer();
if (r == null) {
return;
}
Stroke gridStroke = null;
Paint gridPaint = null;
boolean paintLine;
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
paintLine = false;
ValueTick tick = (ValueTick) iterator.next();
if ((tick.getTickType() == TickType.MINOR)
&& isRangeMinorGridlinesVisible()) {
gridStroke = getRangeMinorGridlineStroke();
gridPaint = getRangeMinorGridlinePaint();
paintLine = true;
}
else if ((tick.getTickType() == TickType.MAJOR)
&& isRangeGridlinesVisible()) {
gridStroke = getRangeGridlineStroke();
gridPaint = getRangeGridlinePaint();
paintLine = true;
}
if (((tick.getValue() != 0.0)
|| !isRangeZeroBaselineVisible()) && paintLine) {
r .drawRangeLine(g2, this, axis, dataArea,
tick.getValue(), gridPaint, gridStroke);
}
}
}
示例15: drawRangeGridlines
import org.jfree.chart.axis.ValueTick; //导入方法依赖的package包/类
/**
* Draws the gridlines for the plot's primary range axis, if they are
* visible.
*
* @param g2 the graphics device.
* @param area the data area.
* @param ticks the ticks.
*
* @see #drawDomainGridlines(Graphics2D, Rectangle2D, List)
*/
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area,
List ticks) {
// no renderer, no gridlines...
if (getRenderer() == null) {
return;
}
// draw the range grid lines, if any...
if (isRangeGridlinesVisible() || isRangeMinorGridlinesVisible()) {
Stroke gridStroke = null;
Paint gridPaint = null;
ValueAxis axis = getRangeAxis();
if (axis != null) {
Iterator iterator = ticks.iterator();
boolean paintLine = false;
while (iterator.hasNext()) {
paintLine = false;
ValueTick tick = (ValueTick) iterator.next();
if ((tick.getTickType() == TickType.MINOR)
&& isRangeMinorGridlinesVisible()) {
gridStroke = getRangeMinorGridlineStroke();
gridPaint = getRangeMinorGridlinePaint();
paintLine = true;
}
else if ((tick.getTickType() == TickType.MAJOR)
&& isRangeGridlinesVisible()) {
gridStroke = getRangeGridlineStroke();
gridPaint = getRangeGridlinePaint();
paintLine = true;
}
if ((tick.getValue() != 0.0
|| !isRangeZeroBaselineVisible()) && paintLine) {
getRenderer().drawRangeLine(g2, this, getRangeAxis(),
area, tick.getValue(), gridPaint, gridStroke);
}
}
}
}
}