List of usage examples for java.awt Color LIGHT_GRAY
Color LIGHT_GRAY
To view the source code for java.awt Color LIGHT_GRAY.
Click Source Link
From source file:net.sf.profiler4j.console.AllocDiffPanel.java
public AllocDiffPanel(int maxAgeMillis) { super(new BorderLayout()); totalSeries = new TimeSeries("Allocs/Sec", Millisecond.class); totalSeries.setMaximumItemAge(maxAgeMillis); TimeSeriesCollection seriesCollection = new TimeSeriesCollection(); seriesCollection.addSeries(totalSeries); NumberAxis numberAxis = new NumberAxis("Allocs/Sec"); numberAxis.setLabelFont(new Font("SansSerif", 0, 14)); numberAxis.setTickLabelFont(new Font("SansSerif", 0, 12)); numberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); DateAxis dateAxis = new DateAxis("Time"); dateAxis.setTickLabelFont(new Font("SansSerif", 0, 12)); dateAxis.setLabelFont(new Font("SansSerif", 0, 14)); dateAxis.setAutoRange(true);//from w ww.j a v a2 s. c om dateAxis.setLowerMargin(0); dateAxis.setUpperMargin(0); dateAxis.setTickLabelsVisible(true); dateAxis.setDateFormatOverride(new SimpleDateFormat("HH:mm:ss")); XYLineAndShapeRenderer lineRenderer = new XYLineAndShapeRenderer(true, false); lineRenderer.setSeriesPaint(0, Color.RED); lineRenderer.setSeriesPaint(1, Color.GREEN.darker()); lineRenderer.setStroke(new BasicStroke(2F, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)); XYPlot xyplot = new XYPlot(seriesCollection, dateAxis, numberAxis, lineRenderer); xyplot.setBackgroundPaint(Color.WHITE); xyplot.setDomainGridlinePaint(Color.LIGHT_GRAY); xyplot.setRangeGridlinePaint(Color.LIGHT_GRAY); xyplot.setAxisOffset(new RectangleInsets(5D, 5D, 5D, 5D)); JFreeChart chart = new JFreeChart("Object Allocactions in Remote JVM", new Font("SansSerif", Font.PLAIN, 18), xyplot, true); chart.setBackgroundPaint(Color.white); ChartPanel panel = new ChartPanel(chart); panel.setBorder(createCompoundBorder(createEmptyBorder(8, 8, 8, 8), createLineBorder(Color.LIGHT_GRAY))); add(panel); setBorder(createEmptyBorder(8, 8, 8, 8)); }
From source file:org.fhcrc.cpl.toolbox.gui.chart.PanelWithChart.java
protected void init(JFreeChart chart) { if (_chartPanel != null) remove(_chartPanel);//from ww w . j ava 2 s . c o m _chart = chart; _plot = chart.getPlot(); //dhmay changing the useBuffer arg to true, 20090915, with jfree 1.0.13. Much prettier, better performance _chartPanel = new ChartPanel(_chart, true); _chartPanel.setDisplayToolTips(true); add(_chartPanel); if (_plot instanceof XYPlot) { //only add .tsv and .csv save options if this is an XYPlot. //Otherwise, no way to get at the data generically initPopupMenu(); //dhmay adding 2009/09/15. As of jfree 1.0.13, several defaults changed annoyingly ((XYPlot) _plot).setDomainGridlinePaint(Color.LIGHT_GRAY); ((XYPlot) _plot).setRangeGridlinePaint(Color.LIGHT_GRAY); ((XYPlot) _plot).setAxisOffset(new RectangleInsets(0, 0, 0, 0)); } //dhmay adding 2009/09/15. As of jfree 1.0.13, several defaults changed annoyingly _chart.setBackgroundPaint(new Color(210, 210, 210)); _plot.setBackgroundPaint(Color.white); }
From source file:net.sf.dynamicreports.test.jasper.chart.Bar3DChartTest.java
@Override protected void configureReport(JasperReportBuilder rb) { TextColumnBuilder<String> column1; TextColumnBuilder<Integer> column2; Locale.setDefault(Locale.ENGLISH); rb.columns(column1 = col.column("Column1", "field1", String.class), column2 = col.column("Column2", "field2", Integer.class)) .summary(// w w w . ja v a 2 s . co m cht.bar3DChart().setCategory(column1).series(cht.serie(column2)).setShowLabels(true) .setXOffset(2d).setYOffset(3d), cht.bar3DChart().setCategory(column1).series(cht.serie(column2)) .setCategoryAxisFormat(cht.axisFormat().setLabel("category") .setLabelColor(Color.BLUE).setLabelFont(stl.fontArialBold()) .setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setTickLabelRotation(45d) .setLineColor(Color.LIGHT_GRAY)), cht.bar3DChart().setCategory(column1).series(cht.serie(column2)) .setValueAxisFormat(cht.axisFormat().setLabel("value").setLabelColor(Color.BLUE) .setLabelFont(stl.fontArialBold()) .setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setTickLabelMask("#,##0.00") .setLineColor(Color.LIGHT_GRAY).setRangeMinValueExpression(1) .setRangeMaxValueExpression(15))); }
From source file:net.sf.dynamicreports.test.jasper.chart.BarChartTest.java
@Override protected void configureReport(JasperReportBuilder rb) { TextColumnBuilder<String> column1; TextColumnBuilder<Integer> column2; Locale.setDefault(Locale.ENGLISH); rb.columns(column1 = col.column("Column1", "field1", String.class), column2 = col.column("Column2", "field2", Integer.class)) .summary(/*from w w w.j a v a 2 s . co m*/ cht.barChart().setCategory(column1).series(cht.serie(column2)).setShowLabels(true) .setShowTickLabels(false).setShowTickMarks(false), cht.barChart().setCategory(column1).series(cht.serie(column2)) .setCategoryAxisFormat(cht.axisFormat().setLabel("category") .setLabelColor(Color.BLUE).setLabelFont(stl.fontArialBold()) .setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setTickLabelRotation(45d) .setLineColor(Color.LIGHT_GRAY)), cht.barChart().setCategory(column1).series(cht.serie(column2)) .setValueAxisFormat(cht.axisFormat().setLabel("value").setLabelColor(Color.BLUE) .setLabelFont(stl.fontArialBold()) .setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setTickLabelMask("#,##0.00") .setLineColor(Color.LIGHT_GRAY).setRangeMinValueExpression(1) .setRangeMaxValueExpression(15))); }
From source file:net.sf.dynamicreports.test.jasper.chart.LineChartTest.java
@Override protected void configureReport(JasperReportBuilder rb) { TextColumnBuilder<String> column1; TextColumnBuilder<Integer> column2; Locale.setDefault(Locale.ENGLISH); rb.columns(column1 = col.column("Column1", "field1", String.class), column2 = col.column("Column2", "field2", Integer.class)) .summary(//from w w w. j a va2 s . c o m cht.lineChart().setCategory(column1).series(cht.serie(column2)).setShowShapes(false) .setShowLines(false), cht.lineChart().setCategory(column1).series(cht.serie(column2)) .setCategoryAxisFormat(cht.axisFormat().setLabel("category") .setLabelColor(Color.BLUE).setLabelFont(stl.fontArialBold()) .setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setTickLabelRotation(45d) .setLineColor(Color.LIGHT_GRAY)), cht.lineChart().setCategory(column1).series(cht.serie(column2)) .setValueAxisFormat(cht.axisFormat().setLabel("value").setLabelColor(Color.BLUE) .setLabelFont(stl.fontArialBold()) .setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setTickLabelMask("#,##0.00") .setLineColor(Color.LIGHT_GRAY).setRangeMinValueExpression(1) .setRangeMaxValueExpression(15))); }
From source file:net.sf.dynamicreports.test.jasper.chart.GanttChartTest.java
@Override protected void configureReport(JasperReportBuilder rb) { FieldBuilder<String> field1 = field("field1", String.class); FieldBuilder<Date> field2 = field("field2", Date.class); FieldBuilder<Date> field3 = field("field3", Date.class); FieldBuilder<Double> field4 = field("field4", Double.class); rb.summary(/*w ww . jav a2 s. c o m*/ cht.ganttChart().setTask(field1) .series(cht.ganttSerie().setStartDate(field2).setEndDate(field3).setPercent(field4) .setLabel("label"), cht.ganttSerie().setStartDate(field("field5", Date.class)) .setEndDate(field("field6", Date.class))) .setShowLabels(true).setShowTickLabels(false).setShowTickMarks(false), cht.ganttChart().setTask(field1).series(cht.ganttSerie().setStartDate(field2).setEndDate(field3)) .setTaskAxisFormat(cht.axisFormat().setLabel("task").setLabelColor(Color.BLUE) .setLabelFont(stl.fontArialBold()).setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setTickLabelRotation(45d) .setLineColor(Color.LIGHT_GRAY)), cht.ganttChart().setTask(field1).series(cht.ganttSerie().setStartDate(field2).setEndDate(field3)) .setTimeAxisFormat(cht.axisFormat().setLabel("time").setLabelColor(Color.BLUE) .setLabelFont(stl.fontArialBold()).setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setLineColor(Color.LIGHT_GRAY))); }
From source file:net.sf.dynamicreports.test.jasper.chart.StackedBarChartTest.java
@Override protected void configureReport(JasperReportBuilder rb) { TextColumnBuilder<String> column1; TextColumnBuilder<Integer> column2; Locale.setDefault(Locale.ENGLISH); rb.columns(column1 = col.column("Column1", "field1", String.class), column2 = col.column("Column2", "field2", Integer.class)) .summary(// w ww .jav a 2 s .com cht.stackedBarChart().setCategory(column1).series(cht.serie(column2)).setShowLabels(true) .setShowTickLabels(false).setShowTickMarks(false), cht.stackedBarChart().setCategory(column1).series(cht.serie(column2)) .setCategoryAxisFormat(cht.axisFormat().setLabel("category") .setLabelColor(Color.BLUE).setLabelFont(stl.fontArialBold()) .setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setTickLabelRotation(45d) .setLineColor(Color.LIGHT_GRAY)), cht.stackedBarChart().setCategory(column1).series(cht.serie(column2)) .setValueAxisFormat(cht.axisFormat().setLabel("value").setLabelColor(Color.BLUE) .setLabelFont(stl.fontArialBold()) .setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setTickLabelMask("#,##0.00") .setLineColor(Color.LIGHT_GRAY).setRangeMinValueExpression(1) .setRangeMaxValueExpression(15))); }
From source file:net.sf.dynamicreports.test.jasper.chart.WaterfallBarChartTest.java
@Override protected void configureReport(JasperReportBuilder rb) { TextColumnBuilder<String> column1; TextColumnBuilder<Integer> column2; Locale.setDefault(Locale.ENGLISH); rb.columns(column1 = col.column("Column1", "field1", String.class), column2 = col.column("Column2", "field2", Integer.class)) .summary(/*from ww w.j a v a 2s .c om*/ cht.waterfallBarChart().setCategory(column1).series(cht.serie(column2)).setShowLabels(true) .setShowTickLabels(false).setShowTickMarks(false), cht.waterfallBarChart().setCategory(column1).series(cht.serie(column2)) .setCategoryAxisFormat(cht.axisFormat().setLabel("category") .setLabelColor(Color.BLUE).setLabelFont(stl.fontArialBold()) .setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setTickLabelRotation(45d) .setLineColor(Color.LIGHT_GRAY)), cht.waterfallBarChart().setCategory(column1).series(cht.serie(column2)) .setValueAxisFormat(cht.axisFormat().setLabel("value").setLabelColor(Color.BLUE) .setLabelFont(stl.fontArialBold()) .setTickLabelFont(stl.fontArial().setItalic(true)) .setTickLabelColor(Color.CYAN).setTickLabelMask("#,##0.00") .setLineColor(Color.LIGHT_GRAY).setRangeMinValueExpression(1) .setRangeMaxValueExpression(15))); }
From source file:de.uzk.hki.da.main.SIPBuilder.java
/** * Starts the SIP-Builder in GUI mode// w w w . ja va 2s .c om * * @param confFolderPath Path to conf folder * @param dataFolderPath Path to data folder */ private static void startGUIMode(String confFolderPath, String dataFolderPath) { try { UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); } catch (Exception e) { return; } UIManager.put("Label.disabledForeground", Color.LIGHT_GRAY); UIManager.put("ComboBox.disabledForeground", Color.LIGHT_GRAY); UIManager.put("CheckBox.disabledText", Color.LIGHT_GRAY); Gui gui = new Gui(confFolderPath, dataFolderPath); gui.setBounds(100, 100, 750, 520); gui.setResizable(false); gui.setVisible(true); gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); gui.setTitle(getProperties().getProperty("ARCHIVE_NAME") + " SIP-Builder"); }
From source file:dinamica.ChartOutput.java
/** * Creates a gradient (white->gray) for charts, may * be overrided by subclasses to provide a custom gradient * @return Default gradient for charts/* w w w .ja v a 2 s . co m*/ */ protected GradientPaint getGradient() { return new GradientPaint(0, 0, Color.WHITE, 1000, 0, Color.LIGHT_GRAY); }