/** * 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()); }
axis.setVisible(false); axis.setAxisLineVisible(true); axis.setAxisLinePaint(params.getColor(prefix + ChartParams.AXIS_LINE_COLOR_SUFFIX)); axis.setAxisLineStroke(params.getStroke(prefix + ChartParams.AXIS_LINE_STROKE_SUFFIX)); axis.setAxisLineVisible(false); axis.setLabel(params.getString(prefix + ChartParams.AXIS_LABEL_SUFFIX)); axis.setLabelFont(params.getFont(prefix + ChartParams.AXIS_LABEL_FONT_SUFFIX)); axis.setLabelPaint(params.getColor(prefix + ChartParams.AXIS_LABEL_COLOR_SUFFIX)); axis.setLabelInsets(params.getRectangleInsets(prefix + ChartParams.AXIS_LABEL_INSERTS_SUFFIX)); axis.setTickLabelsVisible(true); axis.setTickLabelFont(params.getFont(prefix + ChartParams.AXIS_TICK_LABEL_FONT_SUFFIX)); axis.setTickLabelPaint(params.getColor(prefix + ChartParams.AXIS_TICK_LABEL_COLOR_SUFFIX)); axis.setTickLabelInsets(params.getRectangleInsets(prefix + ChartParams.AXIS_TICK_LABEL_INSERTS_SUFFIX)); axis.setTickLabelsVisible(false);
axis.setLabelFont(JRFontUtil.getAwtFont(labelFont, getLocale())); axis.setTickLabelFont(JRFontUtil.getAwtFont(tickLabelFont, getLocale())); if (labelColor != null) axis.setLabelPaint(labelColor); axis.setTickLabelPaint(tickLabelColor); axis.setAxisLinePaint(lineColor); axis.setTickMarkPaint(lineColor);
Axis axis = (Axis) axes.get(axisIndex); Color axisColor = parseColor(styleSpec[1]); axis.setTickLabelPaint(axisColor); Font oldFont = axis.getTickLabelFont(); Font newFont = oldFont.deriveFont((float) fontSize); axis.setTickLabelFont(newFont); axis.setTickLabelsVisible(false); axis.setTickMarksVisible(false); axis.setAxisLineVisible(false); axis.setVisible(false); axis.setTickMarkPaint(tickColor);
this.labelFont = axis.getLabelFont(); this.labelPaintSample = new PaintSample(axis.getLabelPaint()); this.tickLabelFont = axis.getTickLabelFont(); this.tickLabelPaintSample = new PaintSample(axis.getTickLabelPaint()); this.tickLabelInsets = axis.getTickLabelInsets(); this.labelInsets = axis.getLabelInsets(); interior.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5)); interior.add(new JLabel(localizationResources.getString("Label"))); this.label = new JTextField(axis.getLabel()); interior.add(this.label); interior.add(new JPanel()); axis.isTickLabelsVisible() ); ticks.add(this.showTickLabelsCheckBox); axis.isTickMarksVisible() ); ticks.add(this.showTickMarksCheckBox);
if (xAxisCount == 0) { Axis xAxis = plot.getDomainAxis(); xAxis.setTickMarksVisible(true); xAxis.setTickLabelsVisible(true); axes.add(xAxis); xAxisCount++; if (yAxisCount == 0) { Axis yAxis = plot.getRangeAxis(); yAxis.setTickMarksVisible(true); yAxis.setTickLabelsVisible(true); axes.add(yAxis); yAxisCount++;
public static synchronized void labelAxisAxis(Axis axis, org.openfuxml.xml.addon.chart.Axis ofxAxis) { if(ofxAxis.isSetLabel()) { Label ofxLabel = ofxAxis.getLabel(); if(ofxLabel.isSetText()) { axis.setLabel(ofxLabel.getText()); if(ofxLabel.isSetSize() || ofxLabel.isSetFont()) { axis.setLabelFont(createFont(ofxLabel)); } } } }
rangeAxis.setAxisLinePaint(Color.BLACK); rangeAxis.setLabelFont(axisFont);
/** * Sets the insets for the axis label, and sends an {@link AxisChangeEvent} * to all registered listeners. * * @param insets the insets ({@code null} not permitted). * * @see #getLabelInsets() */ public void setLabelInsets(RectangleInsets insets) { setLabelInsets(insets, true); }
this.labelFont = axis.getLabelFont(); this.labelPaintSample = new PaintSample(axis.getLabelPaint()); this.tickLabelFont = axis.getTickLabelFont(); this.tickLabelPaintSample = new PaintSample(axis.getTickLabelPaint()); this.tickLabelInsets = axis.getTickLabelInsets(); this.labelInsets = axis.getLabelInsets(); interior.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5)); interior.add(new JLabel(localizationResources.getString("Label"))); this.label = new JTextField(axis.getLabel()); interior.add(this.label); interior.add(new JPanel()); axis.isTickLabelsVisible() ); ticks.add(this.showTickLabelsCheckBox); axis.isTickMarksVisible() ); ticks.add(this.showTickMarksCheckBox);
if (xAxisCount == 0) { Axis axis = plot.getRangeAxis(); axis.setTickLabelsVisible(true); axis.setTickMarksVisible(true); axes.add(axis); xAxisCount++;
/** * Sets the insets for the axis label, and sends an {@link AxisChangeEvent} * to all registered listeners. * * @param insets the insets (<code>null</code> not permitted). * * @see #getLabelInsets() */ public void setLabelInsets(RectangleInsets insets) { setLabelInsets(insets, true); }
/** * 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()); }
if (yAxisCount == 0) { Axis yAxis = plot.getRangeAxis(); yAxis.setTickLabelsVisible(true); yAxis.setTickMarksVisible(true); axes.add(yAxis); yAxisCount++;