com.ijchart.xychart.util
Class AnchorUtil

java.lang.Object
  extended by com.ijchart.xychart.util.AnchorUtil

public abstract class AnchorUtil
extends java.lang.Object

Title: IJChart

Description: a chart library for the Java(tm) platform.

Util class for draw the anchor of selected ChartShape.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.

Constructor Summary
AnchorUtil()
           
 
Method Summary
static void drawAnchor(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D drawArea, double anchorWidth)
           Draw the anchor of selected rectangle shape.
static java.awt.geom.Rectangle2D getAnchorRect(java.awt.geom.Point2D anchorCenterPoint, double anchorWidth)
           Calculate the anchor rect by a point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnchorUtil

public AnchorUtil()
Method Detail

drawAnchor

public static void drawAnchor(java.awt.Graphics2D g2,
                              java.awt.geom.Rectangle2D drawArea,
                              double anchorWidth)
Draw the anchor of selected rectangle shape.

Parameters:
g2 - Graphics2D the graphics device (such as the screen or the printer) (null not permitted).
drawArea - Rectangle2D The draw area (null not permitted).
anchorWidth - double The anchor rectangle width.

getAnchorRect

public static java.awt.geom.Rectangle2D getAnchorRect(java.awt.geom.Point2D anchorCenterPoint,
                                                      double anchorWidth)
Calculate the anchor rect by a point.

Parameters:
anchorCenterPoint - Point2D The center point of anchor rect (null not permitted).
anchorWidth - double The anchor width.
Returns:
Rectangle2D The anchor rect.