new float[] {1.0f, 1.0f}, // Dash pattern
0.0f); // Dash phase
// Setup legend an plotting colors
XYItemRenderer renderer = plot.getRenderer();
renderer.setBaseToolTipGenerator(null);
int numseries = renderer.getPlot().getSeriesCount();
int i = 0;
for (i = 0; i < numseries; i += 4) {
renderer.setSeriesPaint((i + 0), Color.BLACK);
renderer.setSeriesPaint((i + 1), Color.BLUE);
renderer.setSeriesPaint((i + 2), Color.RED);
renderer.setSeriesPaint((i + 3), Color.MAGENTA);
}
// Turn on and off traces (real, imag, etc)
updateTraceVisibility();
// Modify values for specific themes:
switch (this.currentDisplayTheme) {
case PALOALTO:
plot.setBackgroundPaint(Color.BLACK);
xaxis.setAxisLinePaint(Color.WHITE);
xaxis.setTickMarkPaint(Color.WHITE);
xaxis.setTickLabelPaint(Color.WHITE);
xaxis.setLabelPaint(Color.WHITE);
yaxis.setAxisLinePaint(Color.WHITE);
yaxis.setTickMarkPaint(Color.white);
yaxis.setTickLabelPaint(Color.WHITE);
yaxis.setLabelPaint(Color.WHITE);
// Turn off the y-labels. Keep visible (otherwise the zooming
// is disabled) but make the font black and very small:
yaxis.setMinorTickCount(0);
yaxis.setTickLabelPaint(Color.BLACK);
Font yfont = yaxis.getTickLabelFont();
yaxis.setTickLabelFont(new Font(yfont.getName(), yfont.getStyle(), 6) );
this.jFreeChart.setBackgroundPaint(Color.BLACK);
for (i = 0; i < numseries; i += 4) {
renderer.setSeriesPaint((i + 0), Color.CYAN);
renderer.setSeriesPaint((i + 1), Color.MAGENTA);
renderer.setSeriesPaint((i + 2), Color.CYAN);
renderer.setSeriesPaint((i + 3), Color.MAGENTA);
}
// Markers
pointMarker.setPaint(Color.red);
regionMarker.setPaint(Color.black);
regionMarkerLow.setPaint(Color.red);
regionMarkerHigh.setPaint(Color.red);
break;
case ERLANGEN:
plot.setBackgroundPaint(Color.BLACK);
xaxis.setAxisLinePaint(Color.WHITE);
xaxis.setTickMarkPaint(Color.WHITE);
xaxis.setTickLabelPaint(Color.WHITE);
xaxis.setLabelPaint(Color.WHITE);
yaxis.setAxisLinePaint(Color.WHITE);
yaxis.setTickMarkPaint(Color.white);
yaxis.setTickLabelPaint(Color.WHITE);
yaxis.setLabelPaint(Color.WHITE);
this.jFreeChart.setBackgroundPaint(Color.BLACK);
for (i = 0; i < numseries; i += 4) {
renderer.setSeriesPaint((i + 0), Color.WHITE);
renderer.setSeriesPaint((i + 1), Color.WHITE);
renderer.setSeriesPaint((i + 2), Color.WHITE);
renderer.setSeriesPaint((i + 3), Color.WHITE);
}
// Markers
pointMarker.setPaint(Color.yellow);
regionMarker.setPaint(Color.black);