List of usage examples for java.awt Color green
Color green
To view the source code for java.awt Color green.
Click Source Link
From source file:j2se.jfreechart.barchart.BarChartDemo3.java
/** * Creates a sample chart.//w ww.ja v a2 s .c om * * @param dataset the dataset. * * @return a sample chart. */ private JFreeChart createChart(final CategoryDataset dataset) { final JFreeChart chart = ChartFactory.createBarChart("Bar Chart Demo 3", // chart title "Category", // domain axis label "Value", // range axis label dataset, // data PlotOrientation.VERTICAL, // the plot orientation false, // include legend true, false); chart.setBackgroundPaint(Color.lightGray); // get a reference to the plot for further customisation... final CategoryPlot plot = chart.getCategoryPlot(); plot.setNoDataMessage("NO DATA!"); final CategoryItemRenderer renderer = new CustomRenderer(new Paint[] { Color.red, Color.blue, Color.green, Color.yellow, Color.orange, Color.cyan, Color.magenta, Color.blue }); // renderer.setLabelGenerator(new StandardCategoryLabelGenerator()); renderer.setItemLabelsVisible(true); final ItemLabelPosition p = new ItemLabelPosition(ItemLabelAnchor.CENTER, TextAnchor.CENTER, TextAnchor.CENTER, 45.0); renderer.setPositiveItemLabelPosition(p); plot.setRenderer(renderer); // change the margin at the top of the range axis... final ValueAxis rangeAxis = plot.getRangeAxis(); rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); rangeAxis.setLowerMargin(0.15); rangeAxis.setUpperMargin(0.15); return chart; }
From source file:org.cyberoam.iview.charts.MeterChart.java
/** * This method generates JFreeChart instance for Meter chart with dial port and iView customization. * @param reportID//www. java2 s . c o m * @param rsw * @param request * @return */ public static JFreeChart getChart(int reportID, ResultSetWrapper rsw, HttpServletRequest request) { ReportBean reportBean = ReportBean.getRecordbyPrimarykey(reportID); JFreeChart chart = null; ReportColumnBean reportColumnBean = null; GraphBean graphBean = null; try { DefaultValueDataset data = null; graphBean = GraphBean.getRecordbyPrimarykey(reportBean.getGraphId()); reportColumnBean = ReportColumnBean.getRecordByPrimaryKey(reportBean.getReportId(), graphBean.getYColumnId()); String yColumnDBname = reportColumnBean.getDbColumnName(); rsw.first(); double used = Double.parseDouble(rsw.getString(yColumnDBname)); data = new DefaultValueDataset(100 - used); DialPlot plot = new DialPlot(data); chart = new JFreeChart("", JFreeChart.DEFAULT_TITLE_FONT, plot, false); chart.setBackgroundPaint(Color.white); int imgWidth = graphBean.getWidth(); int imgHeight = graphBean.getHeight(); if (request != null && request.getParameter("imgwidth") != null && !"".equalsIgnoreCase(request.getParameter("imgwidth")) && !"null".equalsIgnoreCase(request.getParameter("imgwidth"))) { imgWidth = Integer.parseInt(request.getParameter("imgwidth")); } if (request != null && request.getParameter("imgheight") != null && !"".equalsIgnoreCase(request.getParameter("imgheight")) && !"null".equalsIgnoreCase(request.getParameter("imgheight"))) { imgHeight = Integer.parseInt(request.getParameter("imgheight")); } plot.setView((1 - ((double) imgWidth / (double) imgHeight)) / 2, plot.getViewY(), ((double) imgWidth / (double) imgHeight), plot.getViewHeight()); StandardDialFrame dialFrame = new StandardDialFrame(); dialFrame.setBackgroundPaint(new Color(54, 73, 109)); dialFrame.setRadius(0.8); dialFrame.setStroke(new BasicStroke(0)); plot.setDialFrame(dialFrame); GradientPaint gp = new GradientPaint(new Point(), new Color(255, 255, 255), new Point(), new Color(196, 210, 219)); DialBackground db = new DialBackground(gp); db.setGradientPaintTransformer( new StandardGradientPaintTransformer(GradientPaintTransformType.VERTICAL)); plot.setBackground(db); DialValueIndicator dvi = new DialValueIndicator(0); dvi.setRadius(0.55); dvi.setBackgroundPaint(gp); dvi.setNumberFormat(new DecimalFormat("###")); dvi.setFont(new Font("Vandara", Font.CENTER_BASELINE, 10)); dvi.setOutlinePaint(Color.lightGray); plot.addLayer(dvi); StandardDialScale scale = new StandardDialScale(0, 100, -120, -300, 10, 4); scale.setTickRadius(0.75); scale.setTickLabelOffset(0.15); scale.setTickLabelFont(new Font("Vandara", Font.CENTER_BASELINE, 9)); plot.addScale(0, scale); StandardDialRange range = new StandardDialRange(0.0, 50.0, Color.green); range.setInnerRadius(0.35); range.setOuterRadius(0.38); plot.addLayer(range); StandardDialRange range2 = new StandardDialRange(50.0, 75.0, Color.yellow); range2.setInnerRadius(0.35); range2.setOuterRadius(0.38); plot.addLayer(range2); StandardDialRange range3 = new StandardDialRange(75.0, 100.0, Color.red); range3.setInnerRadius(0.35); range3.setOuterRadius(0.38); plot.addLayer(range3); DialPointer needle = new DialPointer.Pointer(); needle.setRadius(0.55); plot.addLayer(needle); DialCap cap = new DialCap(); cap.setRadius(0.05); plot.setCap(cap); } catch (Exception e) { CyberoamLogger.appLog.debug("MeterChart=>Exception : " + e, e); } return chart; }
From source file:edu.mit.fss.examples.member.gui.PowerSubsystemPanel.java
/** * Instantiates a new power subsystem panel for a subsystem. * * @param subsystem the subsystem/* w w w .ja v a 2 s.co m*/ */ public PowerSubsystemPanel(SpacePowerSubsystem subsystem) { this.subsystem = subsystem; logger.trace("Creating and adding energy storage chart panel."); storageDataset = new TimeSeriesCollection(); storageSeries = new TimeSeries("Storage"); storageDataset.addSeries(storageSeries); storageChart = ChartFactory.createTimeSeriesChart(null, "Time", "Stored Energy (W-hr)", storageDataset, false, false, false); storageChart.setBackgroundPaint(getBackground()); if (storageChart.getPlot() instanceof XYPlot) { XYPlot xyPlot = (XYPlot) storageChart.getPlot(); XYItemRenderer renderer = new StandardXYItemRenderer(StandardXYItemRenderer.SHAPES_AND_LINES); renderer.setSeriesShape(0, new Ellipse2D.Double(-2, -2, 4, 4)); xyPlot.setRenderer(renderer); xyPlot.setBackgroundPaint(Color.WHITE); xyPlot.setDomainGridlinePaint(Color.GRAY); xyPlot.setRangeGridlinePaint(Color.GRAY); } addTab("Storing", new ChartPanel(storageChart)); logger.trace("Creating and adding energy transformation chart panel."); powerDataset = new TimeSeriesCollection(); generationSeries = new TimeSeries("Generation"); powerDataset.addSeries(generationSeries); consumptionSeries = new TimeSeries("Consumption"); powerDataset.addSeries(consumptionSeries); powerChart = ChartFactory.createTimeSeriesChart(null, "Time", "Power (W)", powerDataset, true, false, false); powerChart.setBackgroundPaint(getBackground()); if (powerChart.getPlot() instanceof XYPlot) { XYPlot xyPlot = (XYPlot) powerChart.getPlot(); XYItemRenderer renderer = new StandardXYItemRenderer(StandardXYItemRenderer.SHAPES_AND_LINES); renderer.setSeriesShape(0, new Ellipse2D.Double(-2, -2, 4, 4)); renderer.setSeriesPaint(0, Color.red); renderer.setSeriesShape(1, new Ellipse2D.Double(-2, -2, 4, 4)); renderer.setSeriesPaint(1, Color.green); xyPlot.setRenderer(renderer); xyPlot.setBackgroundPaint(Color.WHITE); xyPlot.setDomainGridlinePaint(Color.GRAY); xyPlot.setRangeGridlinePaint(Color.GRAY); } JPanel chartPanel = new JPanel(new BorderLayout()); chartPanel.add(new ChartPanel(powerChart), BorderLayout.CENTER); chartPanel.add(new JButton(exportAction), BorderLayout.SOUTH); addTab("Transforming", chartPanel); }
From source file:ega.projekt.graphDraw.DrawGraph.java
public static BasicVisualizationServer<Node, Edge> generatePanel(ega.projekt.graph.Graph dataGraph, int panelWidth, int panelHeight) { if (dataGraph.getEdges().isEmpty()) System.out.println("Error initializing graph"); DrawGraph graphView = new DrawGraph(dataGraph); Layout<Node, Edge> layout = new StaticLayout(graphView.drawGraph); for (Node n : graphView.drawGraph.getVertices()) { layout.setLocation(n, new java.awt.geom.Point2D.Double(n.getX(), n.getY())); }//www.jav a2 s . co m layout.setSize(new Dimension(panelWidth, panelHeight)); BasicVisualizationServer<Node, Edge> vv = new BasicVisualizationServer<>(layout); vv.setPreferredSize(new Dimension(panelWidth, panelHeight)); Transformer<Node, Paint> vertexPaint = new Transformer<Node, Paint>() { public Paint transform(Node i) { return Color.GREEN; } }; final Stroke edgeStroke = new BasicStroke(1.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER); Transformer<Edge, Stroke> edgeStrokeTransformer = new Transformer<Edge, Stroke>() { public Stroke transform(Edge e) { return edgeStroke; } }; vv.getRenderContext().setVertexFillPaintTransformer(vertexPaint); vv.getRenderContext().setEdgeStrokeTransformer(edgeStrokeTransformer); vv.getRenderContext().setEdgeShapeTransformer(new EdgeShape.QuadCurve<Node, Edge>()); vv.getRenderContext().setEdgeLabelTransformer(new Transformer<Edge, String>() { public String transform(Edge e) { return (e.getFlowString() + "/" + Integer.toString(e.getCapacity())); } }); vv.getRenderContext().setVertexLabelTransformer(new Transformer<Node, String>() { public String transform(Node n) { return (Integer.toString(n.getID())); } }); vv.getRenderer().getVertexLabelRenderer().setPosition(Renderer.VertexLabel.Position.CNTR); return vv; }
From source file:gov.llnl.lc.infiniband.opensm.plugin.gui.bargraph.AnimatedBarGraph.java
private static JFreeChart createChart(BarGraphDataSeries dataSeries) { if (dataSeries == null) return null; BarGraphDataSeries ds = dataSeries;//w ww . ja v a 2 s . c o m // create the chart... JFreeChart chart = ChartFactory.createBarChart(ds.getTitle(), // chart title ds.getDomainLabel(), // domain axis label ds.getRangeLabel(), // range axis label ds.getDataSet(0), // data PlotOrientation.VERTICAL, // orientation true, // include legend true, // tooltips? false // URLs? ); // get a reference to the plot for further customization... CategoryPlot plot = (CategoryPlot) chart.getPlot(); plot.setDomainGridlinesVisible(true); // set the range axis to display integers only... NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis(); rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); // disable bar outlines... BarRenderer renderer = (BarRenderer) plot.getRenderer(); renderer.setDrawBarOutline(false); // set up gradient paints for series... GradientPaint gp0 = new GradientPaint(0.0f, 0.0f, Color.blue, 0.0f, 0.0f, new Color(0, 0, 64)); GradientPaint gp1 = new GradientPaint(0.0f, 0.0f, Color.green, 0.0f, 0.0f, new Color(0, 64, 0)); GradientPaint gp2 = new GradientPaint(0.0f, 0.0f, Color.red, 0.0f, 0.0f, new Color(64, 0, 0)); GradientPaint gp3 = new GradientPaint(0.0f, 0.0f, Color.yellow, 0.0f, 0.0f, new Color(64, 0, 0)); renderer.setSeriesPaint(0, gp0); renderer.setSeriesPaint(1, gp1); renderer.setSeriesPaint(2, gp2); renderer.setSeriesPaint(3, gp3); CategoryAxis domainAxis = plot.getDomainAxis(); domainAxis.setCategoryLabelPositions(CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 6.0)); ValueRange vr = ds.getRangeValueRanges().get(0); if (vr != null) { Range range = new Range(vr.getMin() / vr.getScale(), vr.getMax() / vr.getScale()); rangeAxis.setRange(range); } return chart; }
From source file:edu.ucla.stat.SOCR.chart.demo.BarChartDemo9.java
/** * Returns an array of paint objects that will be used for the bar colors. * //from ww w . j a va 2 s. c o m * @return An array of paint objects. */ private static Paint[] createPaint() { Paint[] colors = new Paint[5]; colors[0] = new GradientPaint(0f, 0f, Color.white, 0f, 0f, Color.red); colors[1] = new GradientPaint(0f, 0f, Color.white, 0f, 0f, Color.green); colors[2] = new GradientPaint(0f, 0f, Color.white, 0f, 0f, Color.blue); colors[3] = new GradientPaint(0f, 0f, Color.white, 0f, 0f, Color.orange); colors[4] = new GradientPaint(0f, 0f, Color.white, 0f, 0f, Color.magenta); return colors; }
From source file:ecg.ecgshow.ECGShowUI.java
private void createECGData(long timeZone) { ECGData = new JPanel(new GridLayout(LEAD_COUNT, 1)); dateAxises = new DateAxis[LEAD_COUNT]; ECGSeries = new TimeSeries[LEAD_COUNT * 2]; for (int i = 0; i < LEAD_COUNT; i++) { TimeSeriesCollection timeseriescollection = new TimeSeriesCollection(); //XYDataset TimeSeriesCollection ECGSeries[i] = new TimeSeries("?" + (i + 1)); ECGSeries[i].setMaximumItemCount(500); ECGSeries[i + LEAD_COUNT] = new TimeSeries(""); ECGSeries[i + LEAD_COUNT].setMaximumItemAge(timeZone); ECGSeries[i + LEAD_COUNT].setMaximumItemCount(2); timeseriescollection.addSeries(ECGSeries[i]); timeseriescollection.addSeries(ECGSeries[i + LEAD_COUNT]); //DateAxis dateaxis = new DateAxis("Time"); dateAxises[i] = new DateAxis(""); dateAxises[i].setTickLabelFont(new Font("SansSerif", 0, (int) (HEIGHT * 0.016))); dateAxises[i].setLabelFont(new Font("SansSerif", 0, (int) (HEIGHT * 0.018))); dateAxises[i].setTickLabelsVisible(true); dateAxises[i].setVisible(false); //NumberAxis numberaxis = new NumberAxis("ecg"); NumberAxis numberaxis = new NumberAxis("ecg"); numberaxis.setTickLabelFont(new Font("SansSerif", 0, (int) (HEIGHT * 0.016))); numberaxis.setLabelFont(new Font("SansSerif", 0, (int) (HEIGHT * 0.018))); numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); numberaxis.setVisible(false);//w w w. j a v a2 s . c om numberaxis.setLowerBound(1500D); numberaxis.setUpperBound(3000D); XYLineAndShapeRenderer xylineandshaperenderer = new XYLineAndShapeRenderer(true, false); xylineandshaperenderer.setSeriesPaint(0, Color.GREEN); // xylineandshaperenderer.setSeriesStroke(0, new BasicStroke(2)); xylineandshaperenderer.setSeriesPaint(1, Color.LIGHT_GRAY); // xylineandshaperenderer.setSeriesStroke(1, new BasicStroke(5)); XYPlot xyplot = new XYPlot(timeseriescollection, dateAxises[i], numberaxis, xylineandshaperenderer); xyplot.setBackgroundPaint(Color.LIGHT_GRAY); xyplot.setDomainGridlinePaint(Color.LIGHT_GRAY); xyplot.setRangeGridlinePaint(Color.LIGHT_GRAY); xyplot.setAxisOffset(new RectangleInsets(5D, 5D, 5D, 5D)); xyplot.setBackgroundPaint(Color.BLACK); JFreeChart jfreechart = new JFreeChart(xyplot); jfreechart.setBackgroundPaint(new Color(237, 237, 237));//? jfreechart.getLegend().setVisible(false); ChartPanel chartpanel = new ChartPanel(jfreechart, (int) (WIDTH * 46 / 100), (int) (HEIGHT * 17 / 100), 0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, false, true, false, false); chartpanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0) //??0 , BorderFactory.createEmptyBorder() //???? )); chartpanel.setMouseZoomable(false); //? ECGData.add(chartpanel); } }
From source file:NewChart.java
/** * Creates a sample chart.// w w w. j a va2 s.co m * * @param dataset the dataset. * * @return The chart. */ private static JFreeChart createChart(CategoryDataset dataset) { // create the chart... JFreeChart chart = KIDLYFactory.createBarChart("NewChart", // chart title "Category", // domain axis label "Value", // range axis label dataset, // data PlotOrientation.VERTICAL, // orientation true, // include legend true, // tooltips? false // URLs? ); // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART... // set the background color for the chart... chart.setBackgroundPaint(Color.white); // get a reference to the plot for further customisation... CategoryPlot plot = (CategoryPlot) chart.getPlot(); // ****************************************************************** // More than 150 demo applications are included with the JFreeChart // Developer Guide...for more information, see: // // > http://www.object-refinery.com/jfreechart/guide.html // // ****************************************************************** // set the range axis to display integers only... NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis(); rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); // disable bar outlines... KIDLYRenderer renderer = (KIDLYRenderer) plot.getRenderer(); renderer.setDrawBarOutline(false); // set up gradient paints for series... GradientPaint gp0 = new GradientPaint(0.0f, 0.0f, Color.blue, 0.0f, 0.0f, new Color(0, 0, 64)); GradientPaint gp1 = new GradientPaint(0.0f, 0.0f, Color.green, 0.0f, 0.0f, new Color(0, 64, 0)); GradientPaint gp2 = new GradientPaint(0.0f, 0.0f, Color.red, 0.0f, 0.0f, new Color(64, 0, 0)); renderer.setSeriesPaint(0, gp0); renderer.setSeriesPaint(1, gp1); renderer.setSeriesPaint(2, gp2); CategoryAxis domainAxis = plot.getDomainAxis(); domainAxis.setCategoryLabelPositions(CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 6.0)); // OPTIONAL CUSTOMISATION COMPLETED. return chart; }
From source file:com.metricsplugin.charts.BarChart.java
/** * Creates a sample chart.// w w w.j a va2 s. c o m * * @param dataset the dataset. * * @return The chart. */ private JFreeChart createChart(CategoryDataset dataset) { // create the chart... JFreeChart chart = ChartFactory.createBarChart(name, // chart title labels[0], // domain axis label labels[1], // range axis label dataset, // data PlotOrientation.VERTICAL, // orientation true, // include legend true, // tooltips? false // URLs? ); // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART... // set the background color for the chart... chart.setBackgroundPaint(Color.white); // get a reference to the plot for further customisation... CategoryPlot plot = (CategoryPlot) chart.getPlot(); // ****************************************************************** // More than 150 demo applications are included with the JFreeChart // Developer Guide...for more information, see: // // > http://www.object-refinery.com/jfreechart/guide.html // // ****************************************************************** // set the range axis to display integers only... NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis(); rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); // disable bar outlines... BarRenderer renderer = (BarRenderer) plot.getRenderer(); renderer.setDrawBarOutline(false); // set up gradient paints for series... GradientPaint gp0 = new GradientPaint(0.0f, 0.0f, Color.blue, 0.0f, 0.0f, new Color(0, 0, 64)); GradientPaint gp1 = new GradientPaint(0.0f, 0.0f, Color.green, 0.0f, 0.0f, new Color(0, 64, 0)); GradientPaint gp2 = new GradientPaint(0.0f, 0.0f, Color.red, 0.0f, 0.0f, new Color(64, 0, 0)); renderer.setSeriesPaint(0, gp0); renderer.setSeriesPaint(1, gp1); renderer.setSeriesPaint(2, gp2); CategoryAxis domainAxis = plot.getDomainAxis(); domainAxis.setCategoryLabelPositions(CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 6.0)); // OPTIONAL CUSTOMISATION COMPLETED. return chart; }
From source file:net.sf.dynamicreports.test.jasper.chart.XyBlockChartTest.java
@Override public void test() { super.test(); numberOfPagesTest(1);/* ww w . j a va 2s . c om*/ JFreeChart chart = getChart("summary.chart1", 0); XYItemRenderer renderer = chart.getXYPlot().getRenderer(); Assert.assertEquals("renderer", XYBlockRenderer.class, renderer.getClass()); Assert.assertEquals("block width", 1.1, ((XYBlockRenderer) renderer).getBlockWidth()); Assert.assertEquals("block height", 0.9, ((XYBlockRenderer) renderer).getBlockHeight()); Assert.assertEquals("block anchor", org.jfree.ui.RectangleAnchor.BOTTOM_LEFT, ((XYBlockRenderer) renderer).getBlockAnchor()); Assert.assertEquals("paintScale", LookupPaintScale.class, ((XYBlockRenderer) renderer).getPaintScale().getClass()); LookupPaintScale paintScale = (LookupPaintScale) ((XYBlockRenderer) renderer).getPaintScale(); Assert.assertEquals("paintScale default lower bound", 0.1, paintScale.getLowerBound()); Assert.assertEquals("paintScale default upper bound", 5d, paintScale.getUpperBound()); Assert.assertEquals("paintScale default paint", Color.WHITE, paintScale.getDefaultPaint()); Assert.assertEquals("paintScale paint 1", Color.RED, paintScale.getPaint(1)); Assert.assertEquals("paintScale paint 2", Color.GREEN, paintScale.getPaint(2)); Assert.assertEquals("paintScale paint 3", Color.BLUE, paintScale.getPaint(3)); LegendItemCollection legendItems = chart.getXYPlot().getLegendItems(); Assert.assertEquals("legend item 1 label", "1", legendItems.get(0).getLabel()); Assert.assertEquals("legend item 1 paint", Color.RED, legendItems.get(0).getFillPaint()); Assert.assertEquals("legend item 2 label", "2", legendItems.get(1).getLabel()); Assert.assertEquals("legend item 2 paint", Color.GREEN, legendItems.get(1).getFillPaint()); Assert.assertEquals("legend item 3 label", "3", legendItems.get(2).getLabel()); Assert.assertEquals("legend item 3 paint", Color.BLUE, legendItems.get(2).getFillPaint()); xyzChartDataTest(chart, 0, "serie0", new Number[][] { { 1d, 2d, 0d }, { 2d, 3d, 1d }, { 3d, 4d, 2d }, { 4d, 5d, 3d } }); chart = getChart("summary.chart2", 0); Axis axis = chart.getXYPlot().getDomainAxis(); Assert.assertEquals("category label", "category", axis.getLabel()); Assert.assertEquals("category label color", Color.BLUE, axis.getLabelPaint()); Assert.assertEquals("category label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont()); Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint()); Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont()); Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint()); chart = getChart("summary.chart3", 0); axis = chart.getXYPlot().getRangeAxis(); Assert.assertEquals("value label", "value", axis.getLabel()); Assert.assertEquals("value label color", Color.BLUE, axis.getLabelPaint()); Assert.assertEquals("value label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont()); Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint()); Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont()); Assert.assertEquals("tick label mask", "10.00", ((NumberAxis) axis).getNumberFormatOverride().format(10)); Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint()); }