当前位置: 首页>>代码示例>>Java>>正文


Java ItemLabelAnchor.OUTSIDE10属性代码示例

本文整理汇总了Java中org.jfree.chart.labels.ItemLabelAnchor.OUTSIDE10属性的典型用法代码示例。如果您正苦于以下问题:Java ItemLabelAnchor.OUTSIDE10属性的具体用法?Java ItemLabelAnchor.OUTSIDE10怎么用?Java ItemLabelAnchor.OUTSIDE10使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.jfree.chart.labels.ItemLabelAnchor的用法示例。


在下文中一共展示了ItemLabelAnchor.OUTSIDE10属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: calculateLabelAnchorPoint

private Point2D calculateLabelAnchorPoint(ItemLabelAnchor anchor, Rectangle2D bar, PlotOrientation orientation) {
	Point2D result = null;
	double offset = getItemLabelAnchorOffset();
	double x0 = bar.getX() - offset;
	double x1 = bar.getX();
	double x2 = bar.getX() + offset;
	double x3 = bar.getCenterX();
	double x4 = bar.getMaxX() - offset;
	double x5 = bar.getMaxX();
	double x6 = bar.getMaxX() + offset;

	double y0 = bar.getMaxY() + offset;
	double y1 = bar.getMaxY();
	double y2 = bar.getMaxY() - offset;
	double y3 = bar.getCenterY();
	double y4 = bar.getMinY() + offset;
	double y5 = bar.getMinY();
	double y6 = bar.getMinY() - offset;

	if (anchor == ItemLabelAnchor.CENTER) {
		result = new Point2D.Double(x3, y3);
	} else if (anchor == ItemLabelAnchor.INSIDE1) {
		result = new Point2D.Double(x4, y4);
	} else if (anchor == ItemLabelAnchor.INSIDE2) {
		result = new Point2D.Double(x4, y4);
	} else if (anchor == ItemLabelAnchor.INSIDE3) {
		result = new Point2D.Double(x4, y3);
	} else if (anchor == ItemLabelAnchor.INSIDE4) {
		result = new Point2D.Double(x4, y2);
	} else if (anchor == ItemLabelAnchor.INSIDE5) {
		result = new Point2D.Double(x4, y2);
	} else if (anchor == ItemLabelAnchor.INSIDE6) {
		result = new Point2D.Double(x3, y2);
	} else if (anchor == ItemLabelAnchor.INSIDE7) {
		result = new Point2D.Double(x2, y2);
	} else if (anchor == ItemLabelAnchor.INSIDE8) {
		result = new Point2D.Double(x2, y2);
	} else if (anchor == ItemLabelAnchor.INSIDE9) {
		result = new Point2D.Double(x2, y3);
	} else if (anchor == ItemLabelAnchor.INSIDE10) {
		result = new Point2D.Double(x2, y4);
	} else if (anchor == ItemLabelAnchor.INSIDE11) {
		result = new Point2D.Double(x2, y4);
	} else if (anchor == ItemLabelAnchor.INSIDE12) {
		result = new Point2D.Double(x3, y4);
	} else if (anchor == ItemLabelAnchor.OUTSIDE1) {
		result = new Point2D.Double(x5, y6);
	} else if (anchor == ItemLabelAnchor.OUTSIDE2) {
		result = new Point2D.Double(x6, y5);
	} else if (anchor == ItemLabelAnchor.OUTSIDE3) {
		result = new Point2D.Double(x6, y3);
	} else if (anchor == ItemLabelAnchor.OUTSIDE4) {
		result = new Point2D.Double(x6, y1);
	} else if (anchor == ItemLabelAnchor.OUTSIDE5) {
		result = new Point2D.Double(x5, y0);
	} else if (anchor == ItemLabelAnchor.OUTSIDE6) {
		result = new Point2D.Double(x3, y0);
	} else if (anchor == ItemLabelAnchor.OUTSIDE7) {
		result = new Point2D.Double(x1, y0);
	} else if (anchor == ItemLabelAnchor.OUTSIDE8) {
		result = new Point2D.Double(x0, y1);
	} else if (anchor == ItemLabelAnchor.OUTSIDE9) {
		result = new Point2D.Double(x0, y3);
	} else if (anchor == ItemLabelAnchor.OUTSIDE10) {
		result = new Point2D.Double(x0, y5);
	} else if (anchor == ItemLabelAnchor.OUTSIDE11) {
		result = new Point2D.Double(x1, y6);
	} else if (anchor == ItemLabelAnchor.OUTSIDE12) {
		result = new Point2D.Double(x3, y6);
	}

	return result;
}
 
开发者ID:OpenBD,项目名称:openbd-core,代码行数:73,代码来源:CustomClusteredXYBarRenderer.java


注:本文中的org.jfree.chart.labels.ItemLabelAnchor.OUTSIDE10属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。