List of usage examples for org.jfree.chart.axis Axis setTickLabelPaint
public void setTickLabelPaint(Paint paint)
From source file:com.rapidminer.gui.new_plotter.engine.jfreechart.ChartAxisFactory.java
public static void formatAxis(PlotConfiguration plotConfiguration, Axis axis) { Color axisColor = plotConfiguration.getAxisLineColor(); if (axis != null) { axis.setAxisLinePaint(axisColor); axis.setAxisLineStroke(new BasicStroke(plotConfiguration.getAxisLineWidth())); axis.setLabelPaint(axisColor);//ww w .j av a 2 s. c o m axis.setTickLabelPaint(axisColor); } }
From source file:org.jreserve.dummy.plot.charts.AbstractChart.java
protected void formatAxisColors(Axis axis) { Color color = format.getForeColor(); axis.setAxisLinePaint(color);//w w w . j a va 2 s . co m axis.setTickMarkPaint(color); axis.setTickLabelPaint(color); axis.setLabelPaint(color); }
From source file:com.redhat.thermostat.byteman.chart.swing.SwingBarChart.java
private void colorAxis(Axis ax) { ax.setAxisLinePaint(toColor(cf.axisLinePaint)); ax.setTickMarkPaint(toColor(cf.tickMarkPaint)); ax.setTickLabelPaint(toColor(cf.tickLabelPaint)); }
From source file:org.openfaces.component.chart.impl.helpers.AxisUtil.java
public static void setupAxisPresentation(String label, Axis axis, FakeAxisStyle axisStyle) { StyleObjectModel model = axisStyle.getStyleObjectModel(); StyleBorderModel border = model.getBorder(); if (border != null) { if (border.getColor() != null) { axis.setAxisLinePaint(border.getColor()); }/* www .ja va 2 s . c om*/ if (!border.isNone()) { axis.setAxisLineVisible(true); axis.setAxisLineStroke(PropertiesConverter.toStroke(border)); axis.setTickMarkPaint(border.getColor()); axis.setTickMarksVisible(true); if (!axis.isTickMarksVisible()) axis.setTickMarksVisible(false); } if (border.getStyle().equalsIgnoreCase("none")) { axis.setAxisLineVisible(false); axis.setTickMarksVisible(false); if (axis.isTickMarksVisible()) axis.setTickMarksVisible(true); } } axis.setTickLabelsVisible(axisStyle.isTickLabelsVisible()); if (axisStyle.isLabelVisible() && label != null) { axis.setLabel(label); axis.setLabelPaint(model.getColor()); axis.setLabelFont(CSSUtil.getFont(model)); } if (axisStyle.isTickLabelsVisible()) { axis.setTickLabelsVisible(true); axis.setTickLabelPaint(model.getColor()); axis.setTickLabelFont(CSSUtil.getFont(model)); } else { axis.setTickLabelsVisible(false); } Double tickInterval = axisStyle.getTickInterval(); if (tickInterval != null && tickInterval != 0 && axis instanceof NumberAxis) { NumberAxis numberAxis = (NumberAxis) axis; if (tickInterval > 0) { NumberTickUnit tickUnit = new NumberTickUnit(tickInterval); numberAxis.setTickUnit(tickUnit); } else if (tickInterval == -1) { TickUnitSource tickUnits = NumberAxis.createIntegerTickUnits(); numberAxis.setStandardTickUnits(tickUnits); } else { throw new FacesException("tickInterval must be a positive number for a fixed tick interval, " + "or -1 for automatic integer tick selection: " + tickInterval); } numberAxis.setMinorTickMarksVisible(true); numberAxis.setMinorTickCount(2); numberAxis.setMinorTickMarkOutsideLength(3); numberAxis.setMinorTickMarkInsideLength(3); numberAxis.setTickMarkInsideLength(5); numberAxis.setTickMarkOutsideLength(5); } axis.setTickMarkInsideLength(axisStyle.getTickInsideLength()); axis.setTickMarkOutsideLength(axisStyle.getTickOutsideLength()); if (axisStyle.getMinorTicksVisible()) { axis.setMinorTickMarksVisible(true); if (axis instanceof ValueAxis) ((ValueAxis) axis).setMinorTickCount(axisStyle.getMinorTickCount() + 1); axis.setMinorTickMarkInsideLength(axisStyle.getMinorTickInsideLength()); axis.setMinorTickMarkOutsideLength(axisStyle.getMinorTickOutsideLength()); } else { axis.setMinorTickMarksVisible(false); } }
From source file:com.rcp.wbw.demo.editor.SWTAxisEditor.java
/** * Sets the properties of the specified axis to match * the properties defined on this panel. * /*from w ww . ja v a2s .c o m*/ * @param axis * the axis. */ public void setAxisProperties(Axis axis) { axis.setLabel(getLabel()); axis.setLabelFont(getLabelFont()); axis.setLabelPaint(getLabelPaint()); axis.setTickMarksVisible(this.showTickMarksCheckBox.getSelection()); axis.setTickLabelsVisible(this.showTickLabelsCheckBox.getSelection()); axis.setTickLabelFont(getTickLabelFont()); axis.setTickLabelPaint(getTickLabelPaint()); }
From source file:ch.zhaw.simulation.diagram.charteditor.DefaultAxisEditor.java
/** * Sets the properties of the specified axis to match the properties defined * on this panel./*from w w w .j a va 2 s .c om*/ * * @param axis * the axis. */ public void setAxisProperties(Axis axis) { axis.setLabel(getLabel()); axis.setLabelFont(getLabelFont()); axis.setLabelPaint(getLabelPaint()); axis.setTickMarksVisible(isTickMarksVisible()); axis.setTickLabelsVisible(isTickLabelsVisible()); axis.setTickLabelFont(getTickLabelFont()); axis.setTickLabelPaint(getTickLabelPaint()); axis.setTickLabelInsets(getTickLabelInsets()); axis.setLabelInsets(getLabelInsets()); }
From source file:daylightchart.options.chart.AxisOptions.java
/** * Sets the properties of the specified axis to match the properties * defined on this panel./*from w w w . java2s .c om*/ * * @param axis * the axis. */ void setAxisProperties(final Axis axis) { axis.setLabel(label); if (labelFont != null) { axis.setLabelFont(labelFont); } if (labelPaint != null) { axis.setLabelPaint(labelPaint); } if (labelInsets != null) { axis.setLabelInsets(labelInsets); } // axis.setTickMarksVisible(tickMarksVisible); axis.setTickLabelsVisible(tickLabelsVisible); if (tickLabelFont != null) { axis.setTickLabelFont(tickLabelFont); } if (tickLabelPaint != null) { axis.setTickLabelPaint(tickLabelPaint); } if (tickLabelInsets != null) { axis.setTickLabelInsets(tickLabelInsets); } }
From source file:ec.util.chart.swing.JTimeSeriesChart.java
private void onColorSchemeSupportChange(Axis axis) { axis.setAxisLinePaint(colorSchemeSupport.getAxisColor()); axis.setTickLabelPaint(colorSchemeSupport.getAxisColor()); axis.setTickMarkPaint(colorSchemeSupport.getAxisColor()); }
From source file:com.bdaum.zoom.report.internal.wizards.ReportComponent.java
private static void applyAxisProperties(Axis axis, String prefix, Map<String, Object> properties) { axis.setLabel((String) properties.get(prefix + AXISLABEL)); Font font = (Font) properties.get(prefix + AXISLABELFONT); if (font != null) axis.setLabelFont(font);/*from w w w .j av a 2s . c o m*/ Paint paint = (Paint) properties.get(prefix + AXISLABELPAINT); if (paint != null) axis.setLabelPaint(paint); Boolean visible = (Boolean) properties.get(prefix + TICKMARKSVISIBLE); if (visible != null) axis.setTickMarksVisible(visible); visible = (Boolean) properties.get(prefix + TICKLABELSVISIBLE); if (visible != null) axis.setTickLabelsVisible(visible); font = (Font) properties.get(prefix + TICKLABELFONT); if (font != null) axis.setTickLabelFont(font); paint = (Paint) properties.get(prefix + TICKLABELPAINT); if (paint != null) axis.setTickLabelPaint(paint); }
From source file:lucee.runtime.tag.Chart.java
private void setAxis(Axis axis, Font font) { if (axis != null) { axis.setLabelFont(font);//from w w w . j a v a 2 s. com axis.setLabelPaint(foregroundcolor); axis.setTickLabelFont(font); axis.setTickLabelPaint(foregroundcolor); axis.setTickLabelsVisible(true); } }