org.jfree.chart.JFreeChart.createAlignedRectangle2D()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(139)

本文整理了Java中org.jfree.chart.JFreeChart.createAlignedRectangle2D()方法的一些代码示例,展示了JFreeChart.createAlignedRectangle2D()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFreeChart.createAlignedRectangle2D()方法的具体详情如下:
包路径:org.jfree.chart.JFreeChart
类名称:JFreeChart
方法名:createAlignedRectangle2D

JFreeChart.createAlignedRectangle2D介绍

[英]Creates a rectangle that is aligned to the frame.
[中]创建与框架对齐的矩形。

代码示例

代码示例来源:origin: jfree/jfreechart

if (position == RectangleEdge.TOP) {
  Size2D size = t.arrange(g2, constraint);
  titleArea = createAlignedRectangle2D(size, area,
      t.getHorizontalAlignment(), VerticalAlignment.TOP);
  retValue = t.draw(g2, titleArea, p);
} else if (position == RectangleEdge.BOTTOM) {
  Size2D size = t.arrange(g2, constraint);
  titleArea = createAlignedRectangle2D(size, area,
      t.getHorizontalAlignment(), VerticalAlignment.BOTTOM);
  retValue = t.draw(g2, titleArea, p);
} else if (position == RectangleEdge.RIGHT) {
  Size2D size = t.arrange(g2, constraint);
  titleArea = createAlignedRectangle2D(size, area,
      HorizontalAlignment.RIGHT, t.getVerticalAlignment());
  retValue = t.draw(g2, titleArea, p);
} else if (position == RectangleEdge.LEFT) {
  Size2D size = t.arrange(g2, constraint);
  titleArea = createAlignedRectangle2D(size, area,
      HorizontalAlignment.LEFT, t.getVerticalAlignment());
  retValue = t.draw(g2, titleArea, p);

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

if (position == RectangleEdge.TOP) {
  Size2D size = t.arrange(g2, constraint);
  titleArea = createAlignedRectangle2D(size, area,
      t.getHorizontalAlignment(), VerticalAlignment.TOP);
  retValue = t.draw(g2, titleArea, p);
  titleArea = createAlignedRectangle2D(size, area,
      t.getHorizontalAlignment(), VerticalAlignment.BOTTOM);
  retValue = t.draw(g2, titleArea, p);
  titleArea = createAlignedRectangle2D(size, area,
      HorizontalAlignment.RIGHT, t.getVerticalAlignment());
  retValue = t.draw(g2, titleArea, p);
  titleArea = createAlignedRectangle2D(size, area,
      HorizontalAlignment.LEFT, t.getVerticalAlignment());
  retValue = t.draw(g2, titleArea, p);

相关文章