List of usage examples for org.jfree.ui Align TOP_RIGHT
int TOP_RIGHT
To view the source code for org.jfree.ui Align TOP_RIGHT.
Click Source Link
From source file:org.owasp.jbrofuzz.graph.canvas.ResponseTimeChart.java
public ChartPanel getPlotCanvas() { final JFreeChart chart = ChartFactory.createBarChart("JBroFuzz Response Time Bar Chart", // chart title "File Name", // domain axis label "Response Time (ms)", // range axis label dataset, // data PlotOrientation.VERTICAL, // orientation false, // include legend true, // tooltips? true // URLs? );//from ww w . j a v a 2 s .com final Plot plot = chart.getPlot(); plot.setBackgroundImage(ImageCreator.IMG_OWASP_MED.getImage()); plot.setBackgroundImageAlignment(Align.TOP_RIGHT); final CategoryItemRenderer renderer = chart.getCategoryPlot().getRenderer(); renderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator()); return new ChartPanel(chart); }
From source file:net.sf.fspdfs.chartthemes.simple.SimpleSettingsFactory.java
/** * *//*from w w w . j a v a 2s. c o m*/ public static final ChartThemeSettings createChartThemeSettings() { ChartThemeSettings settings = new ChartThemeSettings(); ChartSettings chartSettings = settings.getChartSettings(); chartSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); chartSettings.setBackgroundImage(new FileImageProvider("net/sf/fspdfs/chartthemes/simple/fspdfs.png")); chartSettings.setBackgroundImageAlignment(new Integer(Align.TOP_RIGHT)); chartSettings.setBackgroundImageAlpha(new Float(1f)); chartSettings.setBorderVisible(Boolean.TRUE); chartSettings.setBorderPaint(new ColorProvider(Color.GREEN)); chartSettings.setBorderStroke(new BasicStroke(1f)); chartSettings.setAntiAlias(Boolean.TRUE); chartSettings.setTextAntiAlias(Boolean.TRUE); chartSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); TitleSettings titleSettings = settings.getTitleSettings(); titleSettings.setShowTitle(Boolean.TRUE); titleSettings.setPosition(EdgeEnum.TOP); titleSettings.setForegroundPaint(new ColorProvider(Color.black)); titleSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); titleSettings.getFont().setBold(Boolean.TRUE); titleSettings.getFont().setFontSize(22); titleSettings.setHorizontalAlignment(HorizontalAlignment.CENTER); titleSettings.setVerticalAlignment(VerticalAlignment.TOP); titleSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); TitleSettings subtitleSettings = settings.getSubtitleSettings(); subtitleSettings.setShowTitle(Boolean.TRUE); subtitleSettings.setPosition(EdgeEnum.TOP); subtitleSettings.setForegroundPaint(new ColorProvider(Color.red)); subtitleSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); subtitleSettings.getFont().setBold(Boolean.TRUE); subtitleSettings.setHorizontalAlignment(HorizontalAlignment.LEFT); subtitleSettings.setVerticalAlignment(VerticalAlignment.CENTER); subtitleSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); LegendSettings legendSettings = settings.getLegendSettings(); legendSettings.setShowLegend(Boolean.TRUE); legendSettings.setPosition(EdgeEnum.BOTTOM); legendSettings.setForegroundPaint(new ColorProvider(Color.black)); legendSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); legendSettings.getFont().setBold(Boolean.TRUE); legendSettings.setHorizontalAlignment(HorizontalAlignment.CENTER); legendSettings.setVerticalAlignment(VerticalAlignment.BOTTOM); //FIXMETHEME legendSettings.setBlockFrame(); legendSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); PlotSettings plotSettings = settings.getPlotSettings(); plotSettings.setOrientation(PlotOrientation.VERTICAL); // plotSettings.setForegroundAlpha(new Float(0.5f)); plotSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); // plotSettings.setBackgroundAlpha(new Float(0.5f)); plotSettings.setBackgroundImage(new FileImageProvider("net/sf/fspdfs/chartthemes/simple/fspdfs.png")); plotSettings.setBackgroundImageAlpha(new Float(0.5f)); plotSettings.setBackgroundImageAlignment(new Integer(Align.NORTH_WEST)); plotSettings.setLabelRotation(new Double(0)); plotSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); plotSettings.setOutlineVisible(Boolean.TRUE); plotSettings.setOutlinePaint(new ColorProvider(Color.red)); plotSettings.setOutlineStroke(new BasicStroke(1f)); plotSettings.setSeriesColorSequence(COLORS); // plotSettings.setSeriesGradientPaintSequence(GRADIENT_PAINTS); plotSettings.setSeriesOutlinePaintSequence(COLORS_DARKER); plotSettings.setSeriesStrokeSequence(STROKES); plotSettings.setSeriesOutlineStrokeSequence(OUTLINE_STROKES); plotSettings.setDomainGridlineVisible(Boolean.TRUE); plotSettings.setDomainGridlinePaint(new ColorProvider(Color.DARK_GRAY)); plotSettings.setDomainGridlineStroke(new BasicStroke(0.5f)); plotSettings.setRangeGridlineVisible(Boolean.TRUE); plotSettings.setRangeGridlinePaint(new ColorProvider(Color.BLACK)); plotSettings.setRangeGridlineStroke(new BasicStroke(0.5f)); plotSettings.getTickLabelFont().setFontName("Courier"); plotSettings.getTickLabelFont().setBold(Boolean.TRUE); plotSettings.getTickLabelFont().setFontSize(10); plotSettings.getDisplayFont().setFontName("Arial"); plotSettings.getDisplayFont().setBold(Boolean.TRUE); plotSettings.getDisplayFont().setFontSize(12); AxisSettings domainAxisSettings = settings.getDomainAxisSettings(); domainAxisSettings.setVisible(Boolean.TRUE); domainAxisSettings.setLocation(AxisLocation.BOTTOM_OR_RIGHT); domainAxisSettings.setLinePaint(new ColorProvider(Color.green)); domainAxisSettings.setLineStroke(new BasicStroke(1f)); domainAxisSettings.setLineVisible(Boolean.TRUE); // domainAxisSettings.setLabel("Domain Axis"); domainAxisSettings.setLabelAngle(new Double(0.0)); domainAxisSettings.setLabelPaint(new ColorProvider(Color.magenta)); domainAxisSettings.getLabelFont().setBold(Boolean.TRUE); domainAxisSettings.getLabelFont().setItalic(Boolean.TRUE); domainAxisSettings.getLabelFont().setFontName("Comic Sans MS"); domainAxisSettings.getLabelFont().setFontSize(12); domainAxisSettings.setLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 1, 1)); domainAxisSettings.setLabelVisible(Boolean.TRUE); domainAxisSettings.setTickLabelPaint(new ColorProvider(Color.cyan)); domainAxisSettings.getTickLabelFont().setBold(Boolean.TRUE); domainAxisSettings.getTickLabelFont().setItalic(Boolean.FALSE); domainAxisSettings.getTickLabelFont().setFontName("Arial"); domainAxisSettings.getTickLabelFont().setFontSize(10); domainAxisSettings.setTickLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 0.5, 0.5)); domainAxisSettings.setTickLabelsVisible(Boolean.TRUE); domainAxisSettings.setTickMarksInsideLength(new Float(0.1f)); domainAxisSettings.setTickMarksOutsideLength(new Float(0.2f)); domainAxisSettings.setTickMarksPaint(new ColorProvider(Color.ORANGE)); domainAxisSettings.setTickMarksStroke(new BasicStroke(1f)); domainAxisSettings.setTickMarksVisible(Boolean.TRUE); domainAxisSettings.setTickCount(new Integer(5)); AxisSettings rangeAxisSettings = settings.getRangeAxisSettings(); rangeAxisSettings.setVisible(Boolean.TRUE); rangeAxisSettings.setLocation(AxisLocation.TOP_OR_RIGHT); rangeAxisSettings.setLinePaint(new ColorProvider(Color.yellow)); rangeAxisSettings.setLineStroke(new BasicStroke(1f)); rangeAxisSettings.setLineVisible(Boolean.TRUE); // rangeAxisSettings.setLabel("Range Axis"); rangeAxisSettings.setLabelAngle(new Double(Math.PI / 2.0)); rangeAxisSettings.setLabelPaint(new ColorProvider(Color.green)); rangeAxisSettings.getLabelFont().setBold(Boolean.TRUE); rangeAxisSettings.getLabelFont().setItalic(Boolean.TRUE); rangeAxisSettings.getLabelFont().setFontName("Comic Sans MS"); rangeAxisSettings.getLabelFont().setFontSize(12); rangeAxisSettings.setLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 1, 1)); rangeAxisSettings.setLabelVisible(Boolean.TRUE); rangeAxisSettings.setTickLabelPaint(new ColorProvider(Color.pink)); rangeAxisSettings.getTickLabelFont().setBold(Boolean.FALSE); rangeAxisSettings.getTickLabelFont().setItalic(Boolean.TRUE); rangeAxisSettings.getTickLabelFont().setFontName("Arial"); rangeAxisSettings.getTickLabelFont().setFontSize(10); rangeAxisSettings.setTickLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 0.5, 0.5)); rangeAxisSettings.setTickLabelsVisible(Boolean.TRUE); rangeAxisSettings.setTickMarksInsideLength(new Float(0.2f)); rangeAxisSettings.setTickMarksOutsideLength(new Float(0.1f)); rangeAxisSettings.setTickMarksPaint(new ColorProvider(Color.black)); rangeAxisSettings.setTickMarksStroke(new BasicStroke(1f)); rangeAxisSettings.setTickMarksVisible(Boolean.TRUE); rangeAxisSettings.setTickCount(new Integer(6)); return settings; }
From source file:org.owasp.jbrofuzz.graph.canvas.ResponseSizeChart.java
public ChartPanel getPlotCanvas() { final JFreeChart chart = ChartFactory.createBarChart("JBroFuzz Response Size Bar Chart", // chart title "File Name", // domain axis label "Response Size (bytes)", // range axis label dataset, // data PlotOrientation.VERTICAL, // orientation false, // include legend true, // tooltips? true // URLs? );/*w w w . j a v a2 s.com*/ final Plot plot = chart.getPlot(); plot.setBackgroundImage(ImageCreator.IMG_OWASP_MED.getImage()); plot.setBackgroundImageAlignment(Align.TOP_RIGHT); final CategoryItemRenderer renderer = chart.getCategoryPlot().getRenderer(); renderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator()); return new ChartPanel(chart); }
From source file:org.owasp.jbrofuzz.graph.canvas.ResponseHeaderSizeChart.java
public ChartPanel getPlotCanvas() { final JFreeChart chart = ChartFactory.createBarChart("JBroFuzz Response Header Size Bar Chart", // chart title "File Name", // domain axis label "Response Header Size (bytes)", // range axis label dataset, // data PlotOrientation.VERTICAL, // orientation false, // include legend true, // tooltips? true // URLs? );//from w ww.jav a 2 s .c om final Plot plot = chart.getPlot(); plot.setBackgroundImage(ImageCreator.IMG_OWASP_MED.getImage()); plot.setBackgroundImageAlignment(Align.TOP_RIGHT); final CategoryItemRenderer renderer = chart.getCategoryPlot().getRenderer(); renderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator()); return new ChartPanel(chart); }
From source file:net.sf.jasperreports.chartthemes.simple.SimpleSettingsFactory.java
/** * *///from w w w.j a v a2 s . co m public static final ChartThemeSettings createChartThemeSettings() { ChartThemeSettings settings = new ChartThemeSettings(); ChartSettings chartSettings = settings.getChartSettings(); chartSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); chartSettings.setBackgroundImage( new FileImageProvider("net/sf/jasperreports/chartthemes/simple/jasperreports.png")); chartSettings.setBackgroundImageAlignment(Align.TOP_RIGHT); chartSettings.setBackgroundImageAlpha(1f); chartSettings.setBorderVisible(Boolean.TRUE); chartSettings.setBorderPaint(new ColorProvider(Color.GREEN)); chartSettings.setBorderStroke(new BasicStroke(1f)); chartSettings.setAntiAlias(Boolean.TRUE); chartSettings.setTextAntiAlias(Boolean.TRUE); chartSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); TitleSettings titleSettings = settings.getTitleSettings(); titleSettings.setShowTitle(Boolean.TRUE); titleSettings.setPosition(EdgeEnum.TOP); titleSettings.setForegroundPaint(new ColorProvider(Color.black)); titleSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); titleSettings.getFont().setBold(Boolean.TRUE); titleSettings.getFont().setFontSize(22f); titleSettings.setHorizontalAlignment(HorizontalAlignment.CENTER); titleSettings.setVerticalAlignment(VerticalAlignment.TOP); titleSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); TitleSettings subtitleSettings = settings.getSubtitleSettings(); subtitleSettings.setShowTitle(Boolean.TRUE); subtitleSettings.setPosition(EdgeEnum.TOP); subtitleSettings.setForegroundPaint(new ColorProvider(Color.red)); subtitleSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); subtitleSettings.getFont().setBold(Boolean.TRUE); subtitleSettings.setHorizontalAlignment(HorizontalAlignment.LEFT); subtitleSettings.setVerticalAlignment(VerticalAlignment.CENTER); subtitleSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); LegendSettings legendSettings = settings.getLegendSettings(); legendSettings.setShowLegend(Boolean.TRUE); legendSettings.setPosition(EdgeEnum.BOTTOM); legendSettings.setForegroundPaint(new ColorProvider(Color.black)); legendSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); legendSettings.getFont().setBold(Boolean.TRUE); legendSettings.setHorizontalAlignment(HorizontalAlignment.CENTER); legendSettings.setVerticalAlignment(VerticalAlignment.BOTTOM); //FIXMETHEME legendSettings.setBlockFrame(); legendSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); PlotSettings plotSettings = settings.getPlotSettings(); plotSettings.setOrientation(PlotOrientation.VERTICAL); // plotSettings.setForegroundAlpha(0.5f); plotSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); // plotSettings.setBackgroundAlpha(0.5f); plotSettings.setBackgroundImage( new FileImageProvider("net/sf/jasperreports/chartthemes/simple/jasperreports.png")); plotSettings.setBackgroundImageAlpha(0.5f); plotSettings.setBackgroundImageAlignment(Align.NORTH_WEST); plotSettings.setLabelRotation(0d); plotSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); plotSettings.setOutlineVisible(Boolean.TRUE); plotSettings.setOutlinePaint(new ColorProvider(Color.red)); plotSettings.setOutlineStroke(new BasicStroke(1f)); plotSettings.setSeriesColorSequence(COLORS); // plotSettings.setSeriesGradientPaintSequence(GRADIENT_PAINTS); plotSettings.setSeriesOutlinePaintSequence(COLORS_DARKER); plotSettings.setSeriesStrokeSequence(STROKES); plotSettings.setSeriesOutlineStrokeSequence(OUTLINE_STROKES); plotSettings.setDomainGridlineVisible(Boolean.TRUE); plotSettings.setDomainGridlinePaint(new ColorProvider(Color.DARK_GRAY)); plotSettings.setDomainGridlineStroke(new BasicStroke(0.5f)); plotSettings.setRangeGridlineVisible(Boolean.TRUE); plotSettings.setRangeGridlinePaint(new ColorProvider(Color.BLACK)); plotSettings.setRangeGridlineStroke(new BasicStroke(0.5f)); plotSettings.getTickLabelFont().setFontName("Courier"); plotSettings.getTickLabelFont().setBold(Boolean.TRUE); plotSettings.getTickLabelFont().setFontSize(10f); plotSettings.getDisplayFont().setFontName("Arial"); plotSettings.getDisplayFont().setBold(Boolean.TRUE); plotSettings.getDisplayFont().setFontSize(12f); AxisSettings domainAxisSettings = settings.getDomainAxisSettings(); domainAxisSettings.setVisible(Boolean.TRUE); domainAxisSettings.setLocation(AxisLocation.BOTTOM_OR_RIGHT); domainAxisSettings.setLinePaint(new ColorProvider(Color.green)); domainAxisSettings.setLineStroke(new BasicStroke(1f)); domainAxisSettings.setLineVisible(Boolean.TRUE); // domainAxisSettings.setLabel("Domain Axis"); domainAxisSettings.setLabelAngle(0.0d); domainAxisSettings.setLabelPaint(new ColorProvider(Color.magenta)); domainAxisSettings.getLabelFont().setBold(Boolean.TRUE); domainAxisSettings.getLabelFont().setItalic(Boolean.TRUE); domainAxisSettings.getLabelFont().setFontName("Comic Sans MS"); domainAxisSettings.getLabelFont().setFontSize(12f); domainAxisSettings.setLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 1, 1)); domainAxisSettings.setLabelVisible(Boolean.TRUE); domainAxisSettings.setTickLabelPaint(new ColorProvider(Color.cyan)); domainAxisSettings.getTickLabelFont().setBold(Boolean.TRUE); domainAxisSettings.getTickLabelFont().setItalic(Boolean.FALSE); domainAxisSettings.getTickLabelFont().setFontName("Arial"); domainAxisSettings.getTickLabelFont().setFontSize(10f); domainAxisSettings.setTickLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 0.5, 0.5)); domainAxisSettings.setTickLabelsVisible(Boolean.TRUE); domainAxisSettings.setTickMarksInsideLength(0.1f); domainAxisSettings.setTickMarksOutsideLength(0.2f); domainAxisSettings.setTickMarksPaint(new ColorProvider(Color.ORANGE)); domainAxisSettings.setTickMarksStroke(new BasicStroke(1f)); domainAxisSettings.setTickMarksVisible(Boolean.TRUE); domainAxisSettings.setTickCount(5); AxisSettings rangeAxisSettings = settings.getRangeAxisSettings(); rangeAxisSettings.setVisible(Boolean.TRUE); rangeAxisSettings.setLocation(AxisLocation.TOP_OR_RIGHT); rangeAxisSettings.setLinePaint(new ColorProvider(Color.yellow)); rangeAxisSettings.setLineStroke(new BasicStroke(1f)); rangeAxisSettings.setLineVisible(Boolean.TRUE); // rangeAxisSettings.setLabel("Range Axis"); rangeAxisSettings.setLabelAngle(Math.PI / 2.0d); rangeAxisSettings.setLabelPaint(new ColorProvider(Color.green)); rangeAxisSettings.getLabelFont().setBold(Boolean.TRUE); rangeAxisSettings.getLabelFont().setItalic(Boolean.TRUE); rangeAxisSettings.getLabelFont().setFontName("Comic Sans MS"); rangeAxisSettings.getLabelFont().setFontSize(12f); rangeAxisSettings.setLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 1, 1)); rangeAxisSettings.setLabelVisible(Boolean.TRUE); rangeAxisSettings.setTickLabelPaint(new ColorProvider(Color.pink)); rangeAxisSettings.getTickLabelFont().setBold(Boolean.FALSE); rangeAxisSettings.getTickLabelFont().setItalic(Boolean.TRUE); rangeAxisSettings.getTickLabelFont().setFontName("Arial"); rangeAxisSettings.getTickLabelFont().setFontSize(10f); rangeAxisSettings.setTickLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 0.5, 0.5)); rangeAxisSettings.setTickLabelsVisible(Boolean.TRUE); rangeAxisSettings.setTickMarksInsideLength(0.2f); rangeAxisSettings.setTickMarksOutsideLength(0.1f); rangeAxisSettings.setTickMarksPaint(new ColorProvider(Color.black)); rangeAxisSettings.setTickMarksStroke(new BasicStroke(1f)); rangeAxisSettings.setTickMarksVisible(Boolean.TRUE); rangeAxisSettings.setTickCount(6); return settings; }
From source file:com.jaspersoft.studio.components.chart.editor.wizard.BaseSettingsFactory.java
/** * *//*from w ww. jav a 2s .c o m*/ public static final ChartThemeSettings createChartThemeSettings() { ChartThemeSettings settings = new ChartThemeSettings(); ChartSettings chartSettings = settings.getChartSettings(); chartSettings.setBackgroundPaint(new GradientPaintProvider(CHART_BACKGROUND1, CHART_BACKGROUND2)); chartSettings.setBackgroundImage( new FileImageProvider("net/sf/jasperreports/chartthemes/simple/jasperreports.png")); chartSettings.setBackgroundImageAlignment(new Integer(Align.TOP_RIGHT)); chartSettings.setBackgroundImageAlpha(new Float(1f)); chartSettings.setBorderVisible(Boolean.FALSE); chartSettings.setBorderPaint(new ColorProvider(Color.BLACK)); chartSettings.setBorderStroke(new BasicStroke(1f)); chartSettings.setAntiAlias(Boolean.TRUE); chartSettings.setTextAntiAlias(Boolean.TRUE); chartSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); TitleSettings titleSettings = settings.getTitleSettings(); titleSettings.setShowTitle(Boolean.TRUE); titleSettings.setPosition(EdgeEnum.TOP); titleSettings.setForegroundPaint(new ColorProvider(Color.black)); titleSettings.setBackgroundPaint(new ColorProvider(TITLE_BACKGROUND)); titleSettings.getFont().setBold(Boolean.TRUE); titleSettings.getFont().setFontSize(22); titleSettings.setHorizontalAlignment(HorizontalAlignment.CENTER); titleSettings.setVerticalAlignment(VerticalAlignment.TOP); titleSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); TitleSettings subtitleSettings = settings.getSubtitleSettings(); subtitleSettings.setShowTitle(Boolean.TRUE); subtitleSettings.setPosition(EdgeEnum.TOP); subtitleSettings.setForegroundPaint(new ColorProvider(Color.BLACK)); subtitleSettings.setBackgroundPaint(new ColorProvider(SUBTITLE_BACKGROUND)); subtitleSettings.getFont().setBold(Boolean.TRUE); subtitleSettings.setHorizontalAlignment(HorizontalAlignment.CENTER); subtitleSettings.setVerticalAlignment(VerticalAlignment.TOP); subtitleSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); LegendSettings legendSettings = settings.getLegendSettings(); legendSettings.setShowLegend(Boolean.TRUE); legendSettings.setPosition(EdgeEnum.BOTTOM); legendSettings.setForegroundPaint(new ColorProvider(Color.black)); legendSettings.setBackgroundPaint(new ColorProvider(Color.white)); legendSettings.getFont().setBold(Boolean.TRUE); legendSettings.getFont().setFontSize(7); legendSettings.setHorizontalAlignment(HorizontalAlignment.CENTER); legendSettings.setVerticalAlignment(VerticalAlignment.BOTTOM); //FIXMETHEME legendSettings.setBlockFrame(); legendSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); PlotSettings plotSettings = settings.getPlotSettings(); plotSettings.setOrientation(PlotOrientation.VERTICAL); // plotSettings.setForegroundAlpha(new Float(0.5f)); plotSettings.setBackgroundPaint(new ColorProvider(Color.white)); plotSettings.setBackgroundAlpha(new Float(0.0f)); plotSettings.setBackgroundImage( new FileImageProvider("net/sf/jasperreports/chartthemes/simple/jasperreports.png")); plotSettings.setBackgroundImageAlpha(new Float(0.5f)); plotSettings.setBackgroundImageAlignment(new Integer(Align.NORTH_WEST)); plotSettings.setLabelRotation(new Double(0)); plotSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); plotSettings.setOutlineVisible(Boolean.TRUE); plotSettings.setOutlinePaint(new ColorProvider(Color.BLACK)); plotSettings.setOutlineStroke(new BasicStroke(1f)); plotSettings.setSeriesColorSequence(COLORS); // plotSettings.setSeriesGradientPaintSequence(GRADIENT_PAINTS); plotSettings.setSeriesOutlinePaintSequence(COLORS_DARKER); plotSettings.setSeriesStrokeSequence(STROKES); plotSettings.setSeriesOutlineStrokeSequence(OUTLINE_STROKES); plotSettings.setDomainGridlineVisible(Boolean.TRUE); plotSettings.setDomainGridlinePaint(new ColorProvider(Color.BLACK)); plotSettings.setDomainGridlineStroke(new BasicStroke(0.5f)); plotSettings.setRangeGridlineVisible(Boolean.TRUE); plotSettings.setRangeGridlinePaint(new ColorProvider(Color.BLACK)); plotSettings.setRangeGridlineStroke(new BasicStroke(0.5f)); plotSettings.getTickLabelFont().setFontName("Arial"); plotSettings.getTickLabelFont().setBold(Boolean.TRUE); plotSettings.getTickLabelFont().setFontSize(10); plotSettings.getDisplayFont().setFontName("Arial"); plotSettings.getDisplayFont().setBold(Boolean.TRUE); plotSettings.getDisplayFont().setFontSize(12); AxisSettings domainAxisSettings = settings.getDomainAxisSettings(); domainAxisSettings.setVisible(Boolean.TRUE); domainAxisSettings.setLocation(AxisLocation.BOTTOM_OR_RIGHT); domainAxisSettings.setLinePaint(new ColorProvider(Color.white)); domainAxisSettings.setLineStroke(new BasicStroke(1f)); domainAxisSettings.setLineVisible(Boolean.TRUE); // domainAxisSettings.setLabel("Domain Axis"); domainAxisSettings.setLabelAngle(new Double(0.0)); domainAxisSettings.setLabelPaint(new ColorProvider(Color.black)); domainAxisSettings.getLabelFont().setBold(Boolean.TRUE); domainAxisSettings.getLabelFont().setItalic(Boolean.FALSE); domainAxisSettings.getLabelFont().setFontName("Times New Roman"); domainAxisSettings.getLabelFont().setFontSize(10); domainAxisSettings.setLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 1, 1)); domainAxisSettings.setLabelVisible(Boolean.TRUE); domainAxisSettings.setTickLabelPaint(new ColorProvider(Color.cyan)); domainAxisSettings.getTickLabelFont().setBold(Boolean.TRUE); domainAxisSettings.getTickLabelFont().setItalic(Boolean.FALSE); domainAxisSettings.getTickLabelFont().setFontName("Times New Roman"); domainAxisSettings.getTickLabelFont().setFontSize(7); domainAxisSettings.getTickLabelFont().setItalic(Boolean.TRUE); domainAxisSettings.setTickLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 0.5, 0.5)); domainAxisSettings.setTickLabelsVisible(Boolean.TRUE); domainAxisSettings.setTickMarksInsideLength(new Float(0.1f)); domainAxisSettings.setTickMarksOutsideLength(new Float(0.2f)); domainAxisSettings.setTickMarksPaint(new ColorProvider(Color.black)); domainAxisSettings.setTickMarksStroke(new BasicStroke(1f)); domainAxisSettings.setTickMarksVisible(Boolean.TRUE); domainAxisSettings.setTickCount(new Integer(5)); AxisSettings rangeAxisSettings = settings.getRangeAxisSettings(); rangeAxisSettings.setVisible(Boolean.TRUE); rangeAxisSettings.setLocation(AxisLocation.TOP_OR_RIGHT); rangeAxisSettings.setLinePaint(new ColorProvider(Color.white)); rangeAxisSettings.setLineStroke(new BasicStroke(1f)); rangeAxisSettings.setLineVisible(Boolean.TRUE); // rangeAxisSettings.setLabel("Range Axis"); rangeAxisSettings.setLabelAngle(new Double(Math.PI / 2.0)); rangeAxisSettings.setLabelPaint(new ColorProvider(Color.black)); rangeAxisSettings.getLabelFont().setBold(Boolean.TRUE); rangeAxisSettings.getLabelFont().setItalic(Boolean.FALSE); rangeAxisSettings.getLabelFont().setFontName("Times New Roman"); rangeAxisSettings.getLabelFont().setFontSize(10); rangeAxisSettings.setLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 1, 1)); rangeAxisSettings.setLabelVisible(Boolean.TRUE); rangeAxisSettings.setTickLabelPaint(new ColorProvider(Color.pink)); rangeAxisSettings.getTickLabelFont().setBold(Boolean.FALSE); rangeAxisSettings.getTickLabelFont().setItalic(Boolean.FALSE); rangeAxisSettings.getTickLabelFont().setFontName("Times New Roman"); rangeAxisSettings.getTickLabelFont().setFontSize(7); rangeAxisSettings.getTickLabelFont().setItalic(Boolean.TRUE); rangeAxisSettings.setTickLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 0.5, 0.5)); rangeAxisSettings.setTickLabelsVisible(Boolean.TRUE); rangeAxisSettings.setTickMarksInsideLength(new Float(0.2f)); rangeAxisSettings.setTickMarksOutsideLength(new Float(0.1f)); rangeAxisSettings.setTickMarksPaint(new ColorProvider(Color.black)); rangeAxisSettings.setTickMarksStroke(new BasicStroke(1f)); rangeAxisSettings.setTickMarksVisible(Boolean.TRUE); rangeAxisSettings.setTickCount(new Integer(6)); return settings; }
From source file:org.owasp.jbrofuzz.graph.canvas.StatusCodeChart.java
public ChartPanel getPlotCanvas() { final JFreeChart chart = ChartFactory.createPieChart("JBroFuzz Status Code Pie Chart", dataset, true, // legend? true, // tooltips? false // URLs? );/* w w w . j a v a 2 s . c om*/ final Plot plot = chart.getPlot(); plot.setBackgroundImage(ImageCreator.IMG_OWASP_MED.getImage()); plot.setBackgroundImageAlignment(Align.TOP_RIGHT); return new ChartPanel(chart); }
From source file:org.owasp.jbrofuzz.graph.canvas.JaccardIndexChart.java
public ChartPanel getPlotCanvas() { final JFreeChart chart = ChartFactory.createBarChart("JBroFuzz Jaccard Index Bar Chart", // chart title "File Name", // domain axis label "Jaccard Similarity Coefficient", // range axis label dataset, // data PlotOrientation.VERTICAL, // orientation false, // include legend true, // tooltips? true // URLs? );/*from w ww .j a v a 2 s. c om*/ final Plot plot = chart.getPlot(); plot.setBackgroundImage(ImageCreator.IMG_OWASP_MED.getImage()); plot.setBackgroundImageAlignment(Align.TOP_RIGHT); final CategoryItemRenderer renderer = chart.getCategoryPlot().getRenderer(); renderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator()); return new ChartPanel(chart); }
From source file:org.owasp.jbrofuzz.graph.canvas.HammingDistanceChart.java
public ChartPanel getPlotCanvas() { final JFreeChart chart = ChartFactory.createBarChart("JBroFuzz Hamming Distance Bar Chart", // chart title "File Name", // domain axis label "Hamming Distance", // range axis label dataset, // data PlotOrientation.VERTICAL, // orientation false, // include legend true, // tooltips? true // URLs? );/* w ww. j a va2s . c om*/ final Plot plot = chart.getPlot(); plot.setBackgroundImage(ImageCreator.IMG_OWASP_MED.getImage()); plot.setBackgroundImageAlignment(Align.TOP_RIGHT); final CategoryItemRenderer renderer = chart.getCategoryPlot().getRenderer(); renderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator()); return new ChartPanel(chart); }
From source file:org.operamasks.faces.render.graph.ChartRenderer.java
private int getImageAlign(PositionType position) { if (position != null) { switch (position) { case Top: return Align.TOP; case Bottom: return Align.BOTTOM; case Left: return Align.LEFT; case Right: return Align.RIGHT; case TopLeft: return Align.TOP_LEFT; case LeftTop: return Align.TOP_LEFT; case TopRight: return Align.TOP_RIGHT; case RightTop: return Align.TOP_RIGHT; case BottomLeft: return Align.BOTTOM_LEFT; case LeftBottom: return Align.BOTTOM_LEFT; case BottomRight: return Align.BOTTOM_RIGHT; case RightBottom: return Align.BOTTOM_RIGHT; case Center: return Align.CENTER; case Stretch: return Align.FIT; }//www . jav a 2s .co m } return Align.FIT; }