本文整理汇总了Java中org.jfree.chart.plot.DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE属性的典型用法代码示例。如果您正苦于以下问题:Java DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE属性的具体用法?Java DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE怎么用?Java DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.jfree.chart.plot.DefaultDrawingSupplier
的用法示例。
在下文中一共展示了DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setChartTheme
public static void setChartTheme() {
StandardChartTheme chartTheme = new StandardChartTheme("CN");
chartTheme.setExtraLargeFont(FONT);
chartTheme.setRegularFont(FONT);
chartTheme.setLargeFont(FONT);
chartTheme.setSmallFont(FONT);
chartTheme.setTitlePaint(new Color(51, 51, 51));
chartTheme.setSubtitlePaint(new Color(85, 85, 85));
chartTheme.setLegendBackgroundPaint(Color.WHITE);
chartTheme.setLegendItemPaint(Color.BLACK);//
chartTheme.setChartBackgroundPaint(Color.WHITE);
Paint[] OUTLINE_PAINT_SEQUENCE = new Paint[]{Color.WHITE};
DefaultDrawingSupplier drawingSupplier = new DefaultDrawingSupplier(CHART_COLORS, CHART_COLORS, OUTLINE_PAINT_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE, DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE);
chartTheme.setDrawingSupplier(drawingSupplier);
chartTheme.setPlotBackgroundPaint(Color.WHITE);
chartTheme.setPlotOutlinePaint(Color.WHITE);
chartTheme.setLabelLinkPaint(new Color(8, 55, 114));
chartTheme.setLabelLinkStyle(PieLabelLinkStyle.CUBIC_CURVE);
chartTheme.setAxisOffset(new RectangleInsets(5, 12, 5, 12));
chartTheme.setDomainGridlinePaint(new Color(192, 208, 224));
chartTheme.setRangeGridlinePaint(new Color(192, 192, 192));
chartTheme.setBaselinePaint(Color.WHITE);
chartTheme.setCrosshairPaint(Color.BLUE);
chartTheme.setAxisLabelPaint(new Color(51, 51, 51));
chartTheme.setTickLabelPaint(new Color(67, 67, 72));
chartTheme.setBarPainter(new StandardBarPainter());
chartTheme.setXYBarPainter(new StandardXYBarPainter());
chartTheme.setItemLabelPaint(Color.black);
chartTheme.setThermometerPaint(Color.white);
ChartFactory.setChartTheme(chartTheme);
}
示例2: getOutlineStrokeSequence
protected Stroke[] getOutlineStrokeSequence(PlotSettings plotSettings)
{
List<Stroke> outlineStrokeSequenceList = getChartThemeSettings().getPlotSettings().getSeriesOutlineStrokeSequence();
Stroke[] outlineStrokeSequence = null;
if (outlineStrokeSequenceList != null && !outlineStrokeSequenceList.isEmpty())
{
outlineStrokeSequence = outlineStrokeSequenceList.toArray(new Stroke[outlineStrokeSequenceList.size()]);
}
else
{
outlineStrokeSequence = DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE;
}
return outlineStrokeSequence;
}
示例3: drawingSupplier
private static DrawingSupplier drawingSupplier() {
Stroke[] strokes = new Stroke[] { stroke(), stroke(5,5),
stroke(20,5,5,5), stroke(10,10), stroke(20,5,5,5,5,5)};
return new DefaultDrawingSupplier(
DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
strokes,
DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE);
}
示例4: plainDrawingSupplier
public static DrawingSupplier plainDrawingSupplier(Color c)
{
Paint black[] = new Paint[1];
black[0] = c;
return new DefaultDrawingSupplier(
black,
DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE
);
}
示例5: setPlotDrawingDefaults
protected void setPlotDrawingDefaults(Plot p, JRChartPlot jrPlot)
{
@SuppressWarnings("unchecked")
List<Paint> defaultSeriesColors = (List<Paint>)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.SERIES_COLORS);
Paint[] defaultPlotOutlinePaintSequence =
getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_OUTLINE_PAINT_SEQUENCE) != null ?
(Paint[])getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_OUTLINE_PAINT_SEQUENCE) :
DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE;
Stroke[] defaultPlotStrokeSequence =
getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_STROKE_SEQUENCE) != null ?
(Stroke[])getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_STROKE_SEQUENCE) :
DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE;
Stroke[] defaultPlotOutlineStrokeSequence =
getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_OUTLINE_STROKE_SEQUENCE) != null ?
(Stroke[])getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_OUTLINE_STROKE_SEQUENCE) :
DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE;
Shape[] defaultPlotShapeSequence =
getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_SHAPE_SEQUENCE) != null ?
(Shape[])getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_SHAPE_SEQUENCE) :
DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE;
// Set color series
Paint[] colors = null;
SortedSet<JRSeriesColor> seriesColors = jrPlot.getSeriesColors();
Paint[] colorSequence = null;
if (seriesColors != null && seriesColors.size() > 0)
{
int seriesColorsSize = seriesColors.size();
colors = new Paint[DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE.length + seriesColorsSize];
JRSeriesColor[] jrColorSequence = new JRSeriesColor[seriesColorsSize];
seriesColors.toArray(jrColorSequence);
colorSequence = new Paint[seriesColorsSize];
for (int i = 0; i < seriesColorsSize; i++)
{
colorSequence[i] = jrColorSequence[i].getColor();
}
populateSeriesColors(colors, colorSequence);
}
else if (defaultSeriesColors != null && defaultSeriesColors.size() > 0)
{
colors = new Paint[DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE.length + defaultSeriesColors.size()];
colorSequence = new Paint[defaultSeriesColors.size()];
defaultSeriesColors.toArray(colorSequence);
populateSeriesColors(colors, colorSequence);
}
else
{
colors = DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE;
}
p.setDrawingSupplier(new DefaultDrawingSupplier(
colors,
defaultPlotOutlinePaintSequence,
defaultPlotStrokeSequence,
defaultPlotOutlineStrokeSequence,
defaultPlotShapeSequence
)
);
}
示例6: createDrawingSupplier
public static DrawingSupplier createDrawingSupplier()
{
//Our paint sequence (the default contains very light yellow, which is not legible
Paint[] paintSequence = new Paint[] {
new Color(0xFF, 0x55, 0x55),
new Color(0x55, 0x55, 0xFF),
new Color(0x55, 0xFF, 0x55),
new Color(0xFF, 0x55, 0xFF),
new Color(0x55, 0xFF, 0xFF),
Color.pink,
Color.gray,
ChartColor.DARK_RED,
ChartColor.DARK_BLUE,
ChartColor.DARK_GREEN,
ChartColor.DARK_YELLOW,
ChartColor.DARK_MAGENTA,
ChartColor.DARK_CYAN,
Color.darkGray,
ChartColor.LIGHT_RED,
ChartColor.LIGHT_BLUE,
ChartColor.LIGHT_GREEN,
ChartColor.LIGHT_YELLOW,
ChartColor.LIGHT_MAGENTA,
ChartColor.LIGHT_CYAN,
Color.lightGray,
ChartColor.VERY_DARK_RED,
ChartColor.VERY_DARK_BLUE,
ChartColor.VERY_DARK_GREEN,
ChartColor.VERY_DARK_YELLOW,
ChartColor.VERY_DARK_MAGENTA,
ChartColor.VERY_DARK_CYAN,
ChartColor.VERY_LIGHT_RED,
ChartColor.VERY_LIGHT_BLUE,
ChartColor.VERY_LIGHT_GREEN,
ChartColor.VERY_LIGHT_YELLOW,
ChartColor.VERY_LIGHT_MAGENTA,
ChartColor.VERY_LIGHT_CYAN
};
//Replace the drawing supplier with a supplier with all defaults, but a different paint sequence
return new DefaultDrawingSupplier(paintSequence,
DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE);
}
示例7: init
public void init(){
CLEAR_BUTTON = false;
LEGEND_SWITCH= false;
//DefaultDrawingSupplier supplier = new DefaultDrawingSupplier();
DrawingSupplier supplier = new DefaultDrawingSupplier(
DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE
);
//series_shapes = supplier.createStandardSeriesShapes();
//color_mainGroup = supplier.getNextPaint(); //moved to EM
for (int i=0; i<10; i++){
//color_kernels[i] = supplier.getNextPaint();
//series_strokes[i] = supplier.getNextStroke();
series_shapes[i] = supplier.getNextShape();
}
series_strokes[0] =new BasicStroke(1.0f, BasicStroke.CAP_SQUARE,
BasicStroke.JOIN_BEVEL);
series_strokes[1] =new BasicStroke(2.0f, BasicStroke.CAP_SQUARE,
BasicStroke.JOIN_BEVEL);
series_strokes[2] =new BasicStroke(3.0f, BasicStroke.CAP_SQUARE,
BasicStroke.JOIN_BEVEL);
series_strokes[3] = new BasicStroke(
1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
1.0f, new float[] {10.0f, 6.0f}, 0.0f
);
series_strokes[4] = new BasicStroke(
2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
1.0f, new float[] {10.0f, 6.0f}, 0.0f
);
series_strokes[5] = new BasicStroke(
3.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
1.0f, new float[] {10.0f, 6.0f}, 0.0f
);
series_strokes[6]= new BasicStroke(
1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
1.0f, new float[] {6.0f, 6.0f}, 0.0f
);
series_strokes[7]= new BasicStroke(
2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
1.0f, new float[] {6.0f, 6.0f}, 0.0f
);
series_strokes[8]= new BasicStroke(
3.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
1.0f, new float[] {6.0f, 6.0f}, 0.0f
);
series_strokes[9]= new BasicStroke(
2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
1.0f, new float[] {2.0f, 6.0f}, 0.0f
);
controlPanel = new JPanel();
modelAllSelected = TOGETHER;
num_series=1;
mEMexperiment = new MixtureEMExperiment[num_series];
mEMexperiment[0] = new MixtureEMExperiment();
resultsTables= new CustomJTable[num_series];
resultsTables[0] = mEMexperiment[0].getResultsTable();
initControlPanel();
//initResutlsTable();
SHOW_STATUS_TEXTAREA = false;
super.init();
indLabel = new JLabel("X");
depLabel = new JLabel("Y");
mEMexperiment[0].resetSize();
packControlArea();
}
示例8: createLegend
protected JFreeChart createLegend(CategoryDataset dataset) {
JFreeChart chart = ChartFactory.createLineChart(
chartTitle, // chart title
domainLabel, // domain axis label
rangeLabel, // range axis label
dataset, // data
PlotOrientation.VERTICAL, // orientation
true, // include legend
true, // tooltips
false // urls
);
chart.setBackgroundPaint(Color.white);
Shape[] shapes = new Shape[3];
int[] xpoints;
int[] ypoints;
// right-pointing triangle
xpoints = new int[] {-3, 3, -3};
ypoints = new int[] {-3, 0, 3};
shapes[0] = new Polygon(xpoints, ypoints, 3);
// vertical rectangle
shapes[1] = new Rectangle2D.Double(-2, -3, 3, 6);
// left-pointing triangle
xpoints = new int[] {-3, 3, 3};
ypoints = new int[] {0, -3, 3};
shapes[2] = new Polygon(xpoints, ypoints, 3);
DrawingSupplier supplier = new DefaultDrawingSupplier(
DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
shapes
);
CategoryPlot plot = chart.getCategoryPlot();
plot.setOrientation(PlotOrientation.HORIZONTAL);
plot.setBackgroundPaint(Color.lightGray);
plot.setDomainGridlinePaint(Color.white);
plot.setRangeGridlinePaint(Color.white);
plot.setDrawingSupplier(supplier);
// set the stroke for each series...
plot.getRenderer().setSeriesStroke(
0,
new BasicStroke(
2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
1.0f, new float[] {10.0f, 6.0f}, 0.0f
)
);
plot.getRenderer().setSeriesStroke(
1,
new BasicStroke(
2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
1.0f, new float[] {6.0f, 6.0f}, 0.0f
)
);
plot.getRenderer().setSeriesStroke(
2,
new BasicStroke(
2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
1.0f, new float[] {2.0f, 6.0f}, 0.0f
)
);
// customise the renderer...
LineAndShapeRenderer renderer
= (LineAndShapeRenderer) plot.getRenderer();
renderer.setBaseShapesVisible(true);
renderer.setBaseItemLabelsVisible(true);
renderer.setBaseItemLabelGenerator(
new StandardCategoryItemLabelGenerator()
);
renderer.setLegendItemLabelGenerator(new SOCRCategorySeriesLabelGenerator());
return chart;
}