本文整理汇总了Java中org.jfree.chart.renderer.xy.XYItemRendererState类的典型用法代码示例。如果您正苦于以下问题:Java XYItemRendererState类的具体用法?Java XYItemRendererState怎么用?Java XYItemRendererState使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XYItemRendererState类属于org.jfree.chart.renderer.xy包,在下文中一共展示了XYItemRendererState类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawItem
import org.jfree.chart.renderer.xy.XYItemRendererState; //导入依赖的package包/类
public void drawItem(Graphics2D g2,
XYItemRendererState state,
Rectangle2D dataArea,
PlotRenderingInfo info,
XYPlot plot,
ValueAxis domainAxis,
ValueAxis rangeAxis,
XYDataset dataset,
int seriesIndex,
int itemIndex,
CrosshairState crosshairState,
int pass) {
PhetHistogramSeries series = ((PhetHistogramDataset)dataset).getSeries( seriesIndex );
if ( series.getNumberOfObservations() == 0 ) {
return;
}
super.drawItem( g2, state, dataArea, info, plot, domainAxis, rangeAxis, dataset, seriesIndex, itemIndex, crosshairState, pass );
}
示例2: drawItem
import org.jfree.chart.renderer.xy.XYItemRendererState; //导入依赖的package包/类
@Override
public void drawItem(Graphics2D g2,
XYItemRendererState state,
Rectangle2D dataArea,
PlotRenderingInfo info,
XYPlot plot,
ValueAxis domainAxis,
ValueAxis rangeAxis,
XYDataset dataset,
int series,
int item,
CrosshairState crosshairState,
int pass) {
setSeriesShape(series, shape, false);
setSeriesStroke(series, stroke, false);
if (seriesPaint != null && series < seriesPaint.length) {
setSeriesPaint(series, seriesPaint[series], false);
}
super.drawItem(g2, state, dataArea, info, plot,
domainAxis, rangeAxis, dataset, series, item,
crosshairState, pass);
}
示例3: drawFunctions
import org.jfree.chart.renderer.xy.XYItemRendererState; //导入依赖的package包/类
public void drawFunctions(Graphics2D g2,
XYItemRendererState state,
Rectangle2D dataArea,
XYPlot plot,
ValueAxis domainAxis,
ValueAxis rangeAxis,
XYDataset dataset,
CrosshairState crosshairState) {
if (fillMode == ExcitationFillMode.MIN_MAX) {
fillMinMax(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset);
} else if (fillMode == ExcitationFillMode.MIN_MAX_EXC) {
fillMinMaxExc(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset);
}
super.drawFunctions(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, crosshairState);
}
示例4: fillMinMaxExc
import org.jfree.chart.renderer.xy.XYItemRendererState; //导入依赖的package包/类
public void fillMinMaxExc(Graphics2D g2,
XYItemRendererState state,
Rectangle2D dataArea,
XYPlot plot,
ValueAxis domainAxis,
ValueAxis rangeAxis,
XYDataset dataset) {
if (dataset.getSeriesCount() < 3)
return;
if (maxFillPaint != null) {
fillSeries(2, maxFillPaint, g2, state, dataArea, plot, domainAxis, rangeAxis, dataset);
}
if (excFillPaint != null) {
fillSeries(0, excFillPaint, g2, state, dataArea, plot, domainAxis, rangeAxis, dataset);
}
if (minFillPaint != null) {
fillSeries(1, minFillPaint, g2, state, dataArea, plot, domainAxis, rangeAxis, dataset);
}
}
示例5: drawDashedLine
import org.jfree.chart.renderer.xy.XYItemRendererState; //导入依赖的package包/类
private void drawDashedLine(
Graphics2D g2,
XYItemRendererState state,
Rectangle2D dataArea,
PlotRenderingInfo info,
XYPlot plot,
ValueAxis domainAxis,
ValueAxis rangeAxis,
XYDataset dataset,
int series,
int item )
{
// Axis (model) coordinates
final double minPosition = domainAxis.getLowerBound();
final double maxPosition = domainAxis.getUpperBound();
final double E0 = dataset.getYValue( series, item ); // the average total energy
// Java2D (screen) coordinates
RectangleEdge domainAxisLocation = plot.getDomainAxisEdge();
RectangleEdge rangeAxisLocation = plot.getRangeAxisEdge();
final double minX = domainAxis.valueToJava2D( minPosition, dataArea, domainAxisLocation );
final double maxX = domainAxis.valueToJava2D( maxPosition, dataArea, domainAxisLocation );
final double averageY = rangeAxis.valueToJava2D( E0, dataArea, rangeAxisLocation );
g2.setPaint( getSeriesPaint( series ) );
g2.setStroke( QTConstants.TOTAL_ENERGY_DASHED_STROKE );
_path.reset();
_path.moveTo( (float)minX, (float)averageY );
_path.lineTo( (float)maxX, (float)averageY );
g2.draw( _path );
}
示例6: drawItem
import org.jfree.chart.renderer.xy.XYItemRendererState; //导入依赖的package包/类
/**
* Draws a horizontal line at each energy value.
*/
public void drawItem( Graphics2D g2,
XYItemRendererState state,
Rectangle2D dataArea,
PlotRenderingInfo info,
XYPlot plot,
ValueAxis domainAxis,
ValueAxis rangeAxis,
XYDataset dataset,
int series,
int item,
CrosshairState crosshairState,
int pass ) {
if ( !getItemVisible( series, item ) ) {
return;
}
// Model coordinates to draw a horizontal line at the specified energy...
final double minPosition = domainAxis.getLowerBound();
final double maxPosition = domainAxis.getUpperBound();
final double energy = dataset.getYValue( series, item );
// Translate the points to screen coordinates...
RectangleEdge xAxisLocation = plot.getDomainAxisEdge();
RectangleEdge yAxisLocation = plot.getRangeAxisEdge();
final double minX = domainAxis.valueToJava2D( minPosition, dataArea, xAxisLocation );
final double maxX = domainAxis.valueToJava2D( maxPosition, dataArea, xAxisLocation );
final double y = rangeAxis.valueToJava2D( energy, dataArea, yAxisLocation );
// Draw the line...
g2.setPaint( getSeriesPaint( series ) );
g2.setStroke( getSeriesStroke( series ) );
_path.reset();
_path.moveTo( (float)minX, (float)y );
_path.lineTo( (float)maxX, (float)y );
g2.draw( _path );
}
示例7: drawItem
import org.jfree.chart.renderer.xy.XYItemRendererState; //导入依赖的package包/类
@Override
public void drawItem( Graphics2D arg0, XYItemRendererState arg1, Rectangle2D arg2, PlotRenderingInfo arg3, XYPlot arg4, ValueAxis arg5, ValueAxis arg6,
XYDataset arg7, int arg8, int arg9, CrosshairState arg10, int arg11 ) {
if (itemIndex == null || itemIndex == arg9) {
super.drawItem( arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11 );
}
}
示例8: drawItem
import org.jfree.chart.renderer.xy.XYItemRendererState; //导入依赖的package包/类
public void drawItem(Graphics2D g2, XYItemRendererState state,
Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot,
ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset,
int series, int item, CrosshairState crosshairState, int pass) {
if (isTransparent)
g2.setComposite(alphaComp);
super.drawItem(g2, state, dataArea, info, plot, domainAxis, rangeAxis,
dataset, series, item, crosshairState, pass);
}
示例9: drawItem
import org.jfree.chart.renderer.xy.XYItemRendererState; //导入依赖的package包/类
public void drawItem(Graphics2D g2, XYItemRendererState state,
Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot,
ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset,
int series, int item, CrosshairState crosshairState, int pass) {
g2.setComposite(makeComposite(transparency));
super.drawItem(g2, state, dataArea, info, plot, domainAxis, rangeAxis,
dataset, series, item, crosshairState, pass);
}
示例10: drawPrimaryLineAsPath
import org.jfree.chart.renderer.xy.XYItemRendererState; //导入依赖的package包/类
protected void drawPrimaryLineAsPath(XYItemRendererState state,
Graphics2D g2, XYPlot plot, XYDataset dataset, int pass,
int series, int item, ValueAxis domainAxis, ValueAxis rangeAxis,
Rectangle2D dataArea) {
g2.setComposite(makeComposite(transparency));
super.drawPrimaryLineAsPath(state, g2, plot, dataset, pass, series,
item, domainAxis, rangeAxis, dataArea);
}
示例11: drawItem
import org.jfree.chart.renderer.xy.XYItemRendererState; //导入依赖的package包/类
@Override
public void drawItem(final Graphics2D g2, final XYItemRendererState state,
final Rectangle2D dataArea, final PlotRenderingInfo info,
final XYPlot plot, final ValueAxis domainAxis,
final ValueAxis rangeAxis, final XYDataset dataSet,
final int series, final int item,
final CrosshairState crosshairState, final int pass) {
g2.setComposite(makeComposite(OPACITY));
super.drawItem(g2, state, dataArea, info, plot, domainAxis, rangeAxis,
dataSet, series, item, crosshairState, pass);
}
示例12: drawItem
import org.jfree.chart.renderer.xy.XYItemRendererState; //导入依赖的package包/类
public void drawItem(Graphics2D g2, XYItemRendererState state,
Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot,
ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset,
int series, int item, CrosshairState crosshairState, int pass) {
if (series > 0) {
g2.setComposite(alphaComp);
} else if (series == 0) {
g2.setComposite(alphaCompOriginal);
}
super.drawItem(g2, state, dataArea, info, plot, domainAxis, rangeAxis,
dataset, series, item, crosshairState, pass);
}
示例13: initialise
import org.jfree.chart.renderer.xy.XYItemRendererState; //导入依赖的package包/类
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
XYPlot plot, XYDataset dataset, PlotRenderingInfo info) {
// Set transparency
g2.setComposite(alpha);
return super.initialise(g2, dataArea, plot, dataset, info);
}
示例14: drawItem
import org.jfree.chart.renderer.xy.XYItemRendererState; //导入依赖的package包/类
public void drawItem(java.awt.Graphics2D g2, XYItemRendererState state,
java.awt.geom.Rectangle2D dataArea, PlotRenderingInfo info,
XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis,
XYDataset dataset, int series, int item,
CrosshairState crosshairState, int pass) {
if (series == 0)
g2.setComposite(pointAlpha);
else
g2.setComposite(selectionAlpha);
super.drawItem(g2, state, dataArea, info, plot, domainAxis, rangeAxis,
dataset, series, item, crosshairState, pass);
}
示例15: drawItem
import org.jfree.chart.renderer.xy.XYItemRendererState; //导入依赖的package包/类
@Override
public void drawItem(Graphics2D g2,
XYItemRendererState state,
Rectangle2D dataArea,
PlotRenderingInfo info,
XYPlot plot,
ValueAxis domainAxis,
ValueAxis rangeAxis,
XYDataset dataset,
int series,
int item,
CrosshairState crosshairState,
int pass) {
// setSeriesShape(series, new DefaultCaret(), false);
//Enter, Exit
double y = dataset.getYValue(series, item);
int side = ((TradeDataset) dataset).get(item).getSide().sign;
if (Double.isNaN(y) || y <= 0) {
setSeriesPaint(series, null, false);
setSeriesStroke(series, null, false);
setSeriesShape(series, null, false);
} else {
setSeriesPaint(series,
side * (series == 0 ? 1 : -1) > 0 ? Main.longColor : Main.shortColor,
false);
setSeriesStroke(series, Main.defaultStoke, false);
setSeriesShape(series, series == 0 ? Main.enterShape : Main.exitShape, false);
}
super.drawItem(g2, state, dataArea, info, plot,
domainAxis, rangeAxis, dataset, series, item,
crosshairState, pass);
}