Java Code Examples for org.jfree.chart.util.RectangleAnchor#CENTER
The following examples show how to use
org.jfree.chart.util.RectangleAnchor#CENTER .
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: LegendTitle.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a new legend title with the specified arrangement. * * @param source the source. * @param hLayout the horizontal item arrangement (<code>null</code> not * permitted). * @param vLayout the vertical item arrangement (<code>null</code> not * permitted). */ public LegendTitle(LegendItemSource source, Arrangement hLayout, Arrangement vLayout) { this.sources = new LegendItemSource[] {source}; this.items = new BlockContainer(hLayout); this.hLayout = hLayout; this.vLayout = vLayout; this.backgroundPaint = null; this.legendItemGraphicEdge = RectangleEdge.LEFT; this.legendItemGraphicAnchor = RectangleAnchor.CENTER; this.legendItemGraphicLocation = RectangleAnchor.CENTER; this.legendItemGraphicPadding = new RectangleInsets(2.0, 2.0, 2.0, 2.0); this.itemFont = DEFAULT_ITEM_FONT; this.itemPaint = DEFAULT_ITEM_PAINT; this.itemLabelPadding = new RectangleInsets(2.0, 2.0, 2.0, 2.0); }
Example 2
Source File: LegendGraphic.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a new legend graphic. * * @param shape the shape (<code>null</code> not permitted). * @param fillPaint the fill paint (<code>null</code> not permitted). */ public LegendGraphic(Shape shape, Paint fillPaint) { if (shape == null) { throw new IllegalArgumentException("Null 'shape' argument."); } if (fillPaint == null) { throw new IllegalArgumentException("Null 'fillPaint' argument."); } this.shapeVisible = true; this.shape = shape; this.shapeAnchor = RectangleAnchor.CENTER; this.shapeLocation = RectangleAnchor.CENTER; this.shapeFilled = true; this.fillPaint = fillPaint; this.fillPaintTransformer = new StandardGradientPaintTransformer(); setPadding(2.0, 2.0, 2.0, 2.0); }
Example 3
Source File: DialValueIndicator.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a new instance of <code>DialValueIndicator</code>. * * @param datasetIndex the dataset index. */ public DialValueIndicator(int datasetIndex) { this.datasetIndex = datasetIndex; this.angle = -90.0; this.radius = 0.3; this.frameAnchor = RectangleAnchor.CENTER; this.templateValue = new Double(100.0); this.maxTemplateValue = null; this.formatter = new DecimalFormat("0.0"); this.font = new Font("Tahoma", Font.BOLD, 14); this.paint = Color.black; this.backgroundPaint = Color.white; this.outlineStroke = new BasicStroke(1.0f); this.outlinePaint = Color.blue; this.insets = new RectangleInsets(4, 4, 4, 4); this.valueAnchor = RectangleAnchor.RIGHT; this.textAnchor = TextAnchor.CENTER_RIGHT; }
Example 4
Source File: LegendTitle.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a new legend title with the specified arrangement. * * @param source the source. * @param hLayout the horizontal item arrangement (<code>null</code> not * permitted). * @param vLayout the vertical item arrangement (<code>null</code> not * permitted). */ public LegendTitle(LegendItemSource source, Arrangement hLayout, Arrangement vLayout) { this.sources = new LegendItemSource[] {source}; this.items = new BlockContainer(hLayout); this.hLayout = hLayout; this.vLayout = vLayout; this.backgroundPaint = null; this.legendItemGraphicEdge = RectangleEdge.LEFT; this.legendItemGraphicAnchor = RectangleAnchor.CENTER; this.legendItemGraphicLocation = RectangleAnchor.CENTER; this.legendItemGraphicPadding = new RectangleInsets(2.0, 2.0, 2.0, 2.0); this.itemFont = DEFAULT_ITEM_FONT; this.itemPaint = DEFAULT_ITEM_PAINT; this.itemLabelPadding = new RectangleInsets(2.0, 2.0, 2.0, 2.0); }
Example 5
Source File: LegendGraphic.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a new legend graphic. * * @param shape the shape (<code>null</code> not permitted). * @param fillPaint the fill paint (<code>null</code> not permitted). */ public LegendGraphic(Shape shape, Paint fillPaint) { if (shape == null) { throw new IllegalArgumentException("Null 'shape' argument."); } if (fillPaint == null) { throw new IllegalArgumentException("Null 'fillPaint' argument."); } this.shapeVisible = true; this.shape = shape; this.shapeAnchor = RectangleAnchor.CENTER; this.shapeLocation = RectangleAnchor.CENTER; this.shapeFilled = true; this.fillPaint = fillPaint; this.fillPaintTransformer = new StandardGradientPaintTransformer(); setPadding(2.0, 2.0, 2.0, 2.0); }
Example 6
Source File: DialValueIndicator.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Creates a new instance of <code>DialValueIndicator</code>. * * @param datasetIndex the dataset index. */ public DialValueIndicator(int datasetIndex) { this.datasetIndex = datasetIndex; this.angle = -90.0; this.radius = 0.3; this.frameAnchor = RectangleAnchor.CENTER; this.templateValue = new Double(100.0); this.formatter = new DecimalFormat("0.0"); this.font = new Font("Dialog", Font.BOLD, 14); this.paint = Color.black; this.backgroundPaint = Color.white; this.outlineStroke = new BasicStroke(1.0f); this.outlinePaint = Color.blue; this.insets = new RectangleInsets(4, 4, 4, 4); this.valueAnchor = RectangleAnchor.RIGHT; this.textAnchor = TextAnchor.CENTER_RIGHT; }
Example 7
Source File: LabelBlock.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Creates a new label block. * * @param text the text for the label (<code>null</code> not permitted). * @param font the font (<code>null</code> not permitted). * @param paint the paint (<code>null</code> not permitted). */ public LabelBlock(String text, Font font, Paint paint) { this.text = text; this.paint = paint; this.label = TextUtilities.createTextBlock(text, font, this.paint); this.font = font; this.toolTipText = null; this.urlText = null; this.contentAlignmentPoint = TextBlockAnchor.CENTER; this.textAnchor = RectangleAnchor.CENTER; }
Example 8
Source File: CategoryLabelPosition.java From astor with GNU General Public License v2.0 | 4 votes |
/** * Creates a new position record with default settings. */ public CategoryLabelPosition() { this(RectangleAnchor.CENTER, TextBlockAnchor.BOTTOM_CENTER, TextAnchor.CENTER, 0.0, CategoryLabelWidthType.CATEGORY, 0.95f); }
Example 9
Source File: CategoryLabelPosition.java From astor with GNU General Public License v2.0 | 4 votes |
/** * Creates a new position record with default settings. */ public CategoryLabelPosition() { this(RectangleAnchor.CENTER, TextBlockAnchor.BOTTOM_CENTER, TextAnchor.CENTER, 0.0, CategoryLabelWidthType.CATEGORY, 0.95f); }
Example 10
Source File: XYTitleAnnotation.java From astor with GNU General Public License v2.0 | 2 votes |
/** * Creates a new annotation to be displayed at the specified (x, y) * location. * * @param x the x-coordinate (in data space). * @param y the y-coordinate (in data space). * @param title the title (<code>null</code> not permitted). */ public XYTitleAnnotation(double x, double y, Title title) { this(x, y, title, RectangleAnchor.CENTER); }
Example 11
Source File: XYImageAnnotation.java From astor with GNU General Public License v2.0 | 2 votes |
/** * Creates a new annotation to be displayed at the specified (x, y) * location. * * @param x the x-coordinate (in data space). * @param y the y-coordinate (in data space). * @param image the image (<code>null</code> not permitted). */ public XYImageAnnotation(double x, double y, Image image) { this(x, y, image, RectangleAnchor.CENTER); }
Example 12
Source File: XYTitleAnnotation.java From astor with GNU General Public License v2.0 | 2 votes |
/** * Creates a new annotation to be displayed at the specified (x, y) * location. * * @param x the x-coordinate (in data space). * @param y the y-coordinate (in data space). * @param title the title (<code>null</code> not permitted). */ public XYTitleAnnotation(double x, double y, Title title) { this(x, y, title, RectangleAnchor.CENTER); }
Example 13
Source File: XYImageAnnotation.java From astor with GNU General Public License v2.0 | 2 votes |
/** * Creates a new annotation to be displayed at the specified (x, y) * location. * * @param x the x-coordinate (in data space). * @param y the y-coordinate (in data space). * @param image the image (<code>null</code> not permitted). */ public XYImageAnnotation(double x, double y, Image image) { this(x, y, image, RectangleAnchor.CENTER); }