Java Code Examples for org.jfree.chart.axis.Axis#setLabelInsets()
The following examples show how to use
org.jfree.chart.axis.Axis#setLabelInsets() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultAxisEditor.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * Sets the properties of the specified axis to match the properties * defined on this panel. * * @param axis the axis. */ public void setAxisProperties(Axis axis) { axis.setLabel(getLabel()); axis.setLabelFont(getLabelFont()); axis.setLabelPaint(getLabelPaint()); axis.setTickMarksVisible(isTickMarksVisible()); // axis.setTickMarkStroke(getTickMarkStroke()); axis.setTickLabelsVisible(isTickLabelsVisible()); axis.setTickLabelFont(getTickLabelFont()); axis.setTickLabelPaint(getTickLabelPaint()); axis.setTickLabelInsets(getTickLabelInsets()); axis.setLabelInsets(getLabelInsets()); }
Example 2
Source File: DefaultAxisEditor.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * Sets the properties of the specified axis to match the properties * defined on this panel. * * @param axis the axis. */ public void setAxisProperties(Axis axis) { axis.setLabel(getLabel()); axis.setLabelFont(getLabelFont()); axis.setLabelPaint(getLabelPaint()); axis.setTickMarksVisible(isTickMarksVisible()); // axis.setTickMarkStroke(getTickMarkStroke()); axis.setTickLabelsVisible(isTickLabelsVisible()); axis.setTickLabelFont(getTickLabelFont()); axis.setTickLabelPaint(getTickLabelPaint()); axis.setTickLabelInsets(getTickLabelInsets()); axis.setLabelInsets(getLabelInsets()); }
Example 3
Source File: GenericChartTheme.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
protected void setAxisLabel(Axis axis, JRFont labelFont, Paint labelColor, Integer baseFontSize) { Boolean defaultAxisLabelVisible = (Boolean)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_LABEL_VISIBLE); if (defaultAxisLabelVisible != null && defaultAxisLabelVisible) { if (axis.getLabel() == null) axis.setLabel((String)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_LABEL)); Double defaultLabelAngle = (Double)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_LABEL_ANGLE); if (defaultLabelAngle != null) axis.setLabelAngle(defaultLabelAngle); Font themeLabelFont = getFont((JRFont)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_LABEL_FONT), labelFont, baseFontSize); axis.setLabelFont(themeLabelFont); RectangleInsets defaultLabelInsets = (RectangleInsets)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_LABEL_INSETS); if (defaultLabelInsets != null) { axis.setLabelInsets(defaultLabelInsets); } Paint labelPaint = labelColor != null ? labelColor : (Paint)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_LABEL_PAINT); if (labelPaint != null) { axis.setLabelPaint(labelPaint); } } }
Example 4
Source File: SimpleChartTheme.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
protected void setAxisLabel(Axis axis, JRFont labelFont, Paint labelColor, AxisSettings axisSettings) { Boolean axisLabelVisible = axisSettings.getLabelVisible(); if (axisLabelVisible == null || axisLabelVisible) { // if (axis.getLabel() == null) // axis.setLabel(axisSettings.getLabel()); Double labelAngle = axisSettings.getLabelAngle(); if (labelAngle != null) axis.setLabelAngle(labelAngle); JRBaseFont font = new JRBaseFont(); FontUtil.copyNonNullOwnProperties(axisSettings.getLabelFont(), font); FontUtil.copyNonNullOwnProperties(labelFont, font); font = new JRBaseFont(getChart(), font); axis.setLabelFont(getFontUtil().getAwtFont(font, getLocale())); RectangleInsets labelInsets = axisSettings.getLabelInsets(); if (labelInsets != null) { axis.setLabelInsets(labelInsets); } Paint labelPaint = labelColor != null ? labelColor : axisSettings.getLabelPaint() != null ? axisSettings.getLabelPaint().getPaint() : null; if (labelPaint != null) { axis.setLabelPaint(labelPaint); } } }
Example 5
Source File: DefaultAxisEditor.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
/** * Sets the properties of the specified axis to match the properties * defined on this panel. * * @param axis the axis. */ public void setAxisProperties(Axis axis) { axis.setLabel(getLabel()); axis.setLabelFont(getLabelFont()); axis.setLabelPaint(getLabelPaint()); axis.setTickMarksVisible(isTickMarksVisible()); // axis.setTickMarkStroke(getTickMarkStroke()); axis.setTickLabelsVisible(isTickLabelsVisible()); axis.setTickLabelFont(getTickLabelFont()); axis.setTickLabelPaint(getTickLabelPaint()); axis.setTickLabelInsets(getTickLabelInsets()); axis.setLabelInsets(getLabelInsets()); }
Example 6
Source File: DefaultAxisEditor.java From ECG-Viewer with GNU General Public License v2.0 | 5 votes |
/** * Sets the properties of the specified axis to match the properties * defined on this panel. * * @param axis the axis. */ public void setAxisProperties(Axis axis) { axis.setLabel(getLabel()); axis.setLabelFont(getLabelFont()); axis.setLabelPaint(getLabelPaint()); axis.setTickMarksVisible(isTickMarksVisible()); // axis.setTickMarkStroke(getTickMarkStroke()); axis.setTickLabelsVisible(isTickLabelsVisible()); axis.setTickLabelFont(getTickLabelFont()); axis.setTickLabelPaint(getTickLabelPaint()); axis.setTickLabelInsets(getTickLabelInsets()); axis.setLabelInsets(getLabelInsets()); }
Example 7
Source File: DefaultAxisEditor.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Sets the properties of the specified axis to match the properties * defined on this panel. * * @param axis the axis. */ public void setAxisProperties(Axis axis) { axis.setLabel(getLabel()); axis.setLabelFont(getLabelFont()); axis.setLabelPaint(getLabelPaint()); axis.setTickMarksVisible(isTickMarksVisible()); // axis.setTickMarkStroke(getTickMarkStroke()); axis.setTickLabelsVisible(isTickLabelsVisible()); axis.setTickLabelFont(getTickLabelFont()); axis.setTickLabelPaint(getTickLabelPaint()); axis.setTickLabelInsets(getTickLabelInsets()); axis.setLabelInsets(getLabelInsets()); }
Example 8
Source File: DefaultAxisEditor.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Sets the properties of the specified axis to match the properties * defined on this panel. * * @param axis the axis. */ public void setAxisProperties(Axis axis) { axis.setLabel(getLabel()); axis.setLabelFont(getLabelFont()); axis.setLabelPaint(getLabelPaint()); axis.setTickMarksVisible(isTickMarksVisible()); // axis.setTickMarkStroke(getTickMarkStroke()); axis.setTickLabelsVisible(isTickLabelsVisible()); axis.setTickLabelFont(getTickLabelFont()); axis.setTickLabelPaint(getTickLabelPaint()); axis.setTickLabelInsets(getTickLabelInsets()); axis.setLabelInsets(getLabelInsets()); }
Example 9
Source File: DefaultAxisEditor.java From opensim-gui with Apache License 2.0 | 5 votes |
/** * Sets the properties of the specified axis to match the properties * defined on this panel. * * @param axis the axis. */ public void setAxisProperties(Axis axis) { axis.setLabel(getLabel()); axis.setLabelFont(getLabelFont()); axis.setLabelPaint(getLabelPaint()); axis.setTickMarksVisible(isTickMarksVisible()); // axis.setTickMarkStroke(getTickMarkStroke()); axis.setTickLabelsVisible(isTickLabelsVisible()); axis.setTickLabelFont(getTickLabelFont()); axis.setTickLabelPaint(getTickLabelPaint()); axis.setTickLabelInsets(getTickLabelInsets()); axis.setLabelInsets(getLabelInsets()); }
Example 10
Source File: DefaultAxisEditor.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Sets the properties of the specified axis to match the properties * defined on this panel. * * @param axis the axis. */ public void setAxisProperties(Axis axis) { axis.setLabel(getLabel()); axis.setLabelFont(getLabelFont()); axis.setLabelPaint(getLabelPaint()); axis.setTickMarksVisible(isTickMarksVisible()); // axis.setTickMarkStroke(getTickMarkStroke()); axis.setTickLabelsVisible(isTickLabelsVisible()); axis.setTickLabelFont(getTickLabelFont()); axis.setTickLabelPaint(getTickLabelPaint()); axis.setTickLabelInsets(getTickLabelInsets()); axis.setLabelInsets(getLabelInsets()); }
Example 11
Source File: DefaultAxisEditor.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Sets the properties of the specified axis to match the properties * defined on this panel. * * @param axis the axis. */ public void setAxisProperties(Axis axis) { axis.setLabel(getLabel()); axis.setLabelFont(getLabelFont()); axis.setLabelPaint(getLabelPaint()); axis.setTickMarksVisible(isTickMarksVisible()); // axis.setTickMarkStroke(getTickMarkStroke()); axis.setTickLabelsVisible(isTickLabelsVisible()); axis.setTickLabelFont(getTickLabelFont()); axis.setTickLabelPaint(getTickLabelPaint()); axis.setTickLabelInsets(getTickLabelInsets()); axis.setLabelInsets(getLabelInsets()); }