com.ijchart.xychart.shape
Class GranttChartShape

java.lang.Object
  extended by com.ijchart.xychart.shape.AbstractChartShape
      extended by com.ijchart.xychart.shape.AbstractTextChartShape
          extended by com.ijchart.xychart.shape.AbstractRectangleTextChartShape
              extended by com.ijchart.xychart.shape.RectangleTextChartShape
                  extended by com.ijchart.xychart.shape.GranttChartShape
All Implemented Interfaces:
IChartShapeChangeListener, IChartShape, java.io.Serializable, java.lang.Cloneable, java.util.EventListener

public class GranttChartShape
extends RectangleTextChartShape
implements java.lang.Cloneable, java.io.Serializable

Title: IJChart

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

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ijchart.xychart.shape.AbstractRectangleTextChartShape
DEFAULT_DRAW_AUTO_WRAP, DEFAULT_FORCE_INSIDE_TEXT_NO_WRAP, DEFAULT_FORCE_SHOW_ALL, DEFAULT_TEXT_MAX_SHOW_LINE
 
Fields inherited from class com.ijchart.xychart.shape.AbstractTextChartShape
DEFAULT_TEXT_DIRECTION, DEFAULT_TEXT_HORIZONTAL_ALIGNMENT, DEFAULT_TEXT_POSITION, DEFAULT_TEXT_VERTICAL_ALIGNMENT
 
Fields inherited from class com.ijchart.xychart.shape.AbstractChartShape
DEFAULT_DRAW_TYPE, DEFAULT_SHAPE_ID, DEFAULT_VISIBLE, transformedShape
 
Fields inherited from interface com.ijchart.xychart.shape.IChartShape
DEFAULT_BORDER_PAINT, DEFAULT_BORDER_STROKE, DEFAULT_CONTENT_PAINT, DEFAULT_DRAW_BORDER, DEFAULT_FILL_ALPHA, DEFAULT_FILL_PAINT, DEFAULT_FILL_SHAPE, DEFAULT_GRADIENT_PAINT_TRANSFORM_TYPE, DEFAULT_MARGIN, DEFAULT_SELECT_FILL_PAINT, DEFAULT_SELECT_RECT_ALPHA, DEFAULT_SELECT_RECT_WIDTH, DEFAULT_SELECTED, DEFAULT_TEXT_FONT, DEFAULT_TOOLTIP_SHAPE_WIDTH, HOTSPOT_TYPE_CIRCLE, HOTSPOT_TYPE_POLYGON, HOTSPOT_TYPE_RECTANGLE
 
Constructor Summary
GranttChartShape(java.awt.geom.Rectangle2D granttArea, java.awt.geom.Rectangle2D completeArea, java.awt.geom.Rectangle2D incompleteArea)
           Construct a grantt chart shape.
GranttChartShape(java.awt.geom.Rectangle2D granttArea, java.awt.geom.Rectangle2D completeArea, java.awt.geom.Rectangle2D incompleteArea, java.lang.String text)
           Construct a grantt chart shape.
 
Method Summary
 void draw(java.awt.Graphics2D g2)
           Draw the ChartShape on a Java 2d graphics device(such as the screen or the printer).
 java.awt.geom.Rectangle2D getCompleteArea()
           Returns the complete area.
 java.awt.Paint getCompleteAreaPaint()
           Returns the complete area paint.
 java.awt.geom.Rectangle2D getGanttArea()
           Returns the grantt area.
protected  java.awt.Shape getHotspotShape()
           Returns the hotspot shape.
 java.awt.geom.Rectangle2D getIncompleteArea()
           Returns the incomplete area.
 java.awt.Paint getIncompleteAreaPaint()
           Returns the incomplete area paint.
 ShapeType getShapeType()
           The type for describe this shape.
 void setCompleteArea(java.awt.geom.Rectangle2D completeArea)
           Sets the complete area,and sends a ChartShapeChangeEvent to all registered listeners.
 void setCompleteAreaPaint(java.awt.Paint paint)
           Sets the complete area paint,and sends a ChartShapeChangeEvent to all registered listeners.
 void setGranttArea(java.awt.geom.Rectangle2D granttArea)
           The grantt area,and sends a ChartShapeChangeEvent to all registered listeners.
 void setIncompleteArea(java.awt.geom.Rectangle2D incompleteArea)
           Sets the incomplete area,and sends a ChartShapeChangeEvent to all registered listeners.
 void setIncompleteAreaPaint(java.awt.Paint paint)
           Sets the incomplete area paint,and sends a ChartShapeChangeEvent to all registered listeners.
 
Methods inherited from class com.ijchart.xychart.shape.RectangleTextChartShape
calculateTransformedShape, clone, drawBorder, drawSelect, equals, getMinimumBound, hashCode, isBorderVisible, setBorderVisible, toString
 
Methods inherited from class com.ijchart.xychart.shape.AbstractRectangleTextChartShape
drawText, drawTextWithTrimMarginRect, getDrawArea, getLockPoint, getTextMaxShowLine, getTooltipShapeTranslatePoint, getTopLeftPoint, isAutoWrap, isForceInsideTextNoWrap, isForceShowAll, setAutoWrap, setDrawArea, setForceInsideTextNoWrap, setForceShowAllText, setTextMaxShowLine, splitString, translate
 
Methods inherited from class com.ijchart.xychart.shape.AbstractTextChartShape
getText, getTextDirection, getTextFont, getTextHorizontalAlign, getTextPaint, getTextPosition, getTextVerticalAlign, isDrawText, setDrawText, setText, setTextDirection, setTextFont, setTextHorizontalAlign, setTextPaint, setTextPosition, setTextVerticalAlign
 
Methods inherited from class com.ijchart.xychart.shape.AbstractChartShape
addChangeListener, afterDraw, beforeDraw, chartShapeChanged, contains, contains, drawAnchorByPoints, drawBackground, drawShapeBorder, fillShape, fireChartShapeChanged, forceChartShapeChanged, getBorderPaint, getBorderStroke, getBound, getData, getFillAlpha, getFillPaint, getGradientPaintTransformType, getHotspotPolyCoords, getHotspotType, getHotspotType, getId, getMargin, getOriginTooltipShape, getRotate, getSelectAnchorPaint, getSelectRectAlpha, getSelectRectWidth, getShapeChange, getShapeDrawType, getTooltipShape, getTooltipShapeRotate, getTooltipText, getURL, hasListener, isDrawBorder, isFillShape, isSelected, isVisible, notifyListeners, removeAllChangeListener, removeChangeListener, setBorderPaint, setBorderStroke, setData, setDrawBorder, setFillAlpha, setFillPaint, setFillShape, setGradientPaintTransformType, setId, setMargin, setOriginTooltipShape, setRotate, setSelectAnchorPaint, setSelected, setSelectRectAlpha, setSelectRectWidth, setShapeChange, setShapeDrawType, setTooltipText, setURL, setVisible
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GranttChartShape

public GranttChartShape(java.awt.geom.Rectangle2D granttArea,
                        java.awt.geom.Rectangle2D completeArea,
                        java.awt.geom.Rectangle2D incompleteArea)
Construct a grantt chart shape.

Parameters:
granttArea - Rectangle2D The grantt area (null not permitted).
completeArea - Rectangle2D The complete area (null permitted).
incompleteArea - Rectangle2D The incomplete area (null permitted).

GranttChartShape

public GranttChartShape(java.awt.geom.Rectangle2D granttArea,
                        java.awt.geom.Rectangle2D completeArea,
                        java.awt.geom.Rectangle2D incompleteArea,
                        java.lang.String text)
Construct a grantt chart shape.

Parameters:
granttArea - Rectangle2D The grantt area (null not permitted).
completeArea - Rectangle2D The complete area (null permitted).
incompleteArea - Rectangle2D The incomplete area (null permitted).
text - String The draw text (null permitted).
Method Detail

getGanttArea

public java.awt.geom.Rectangle2D getGanttArea()
Returns the grantt area.

Returns:
Rectangle2D The rectangle (never null).

setGranttArea

public void setGranttArea(java.awt.geom.Rectangle2D granttArea)
The grantt area,and sends a ChartShapeChangeEvent to all registered listeners.

Parameters:
granttArea - Rectangle2D The rectangle (null not permitted).

getCompleteArea

public java.awt.geom.Rectangle2D getCompleteArea()
Returns the complete area.

Returns:
Rectangle2D The rectangle (maybe null).

setCompleteArea

public void setCompleteArea(java.awt.geom.Rectangle2D completeArea)
Sets the complete area,and sends a ChartShapeChangeEvent to all registered listeners.

Parameters:
completeArea - Rectangle2D The rectangle (null permitted).

getIncompleteArea

public java.awt.geom.Rectangle2D getIncompleteArea()
Returns the incomplete area.

Returns:
Rectangle2D The rectangle (maybe null).

setIncompleteArea

public void setIncompleteArea(java.awt.geom.Rectangle2D incompleteArea)
Sets the incomplete area,and sends a ChartShapeChangeEvent to all registered listeners.

Parameters:
incompleteArea - Rectangle2D The rectangle (null permitted).

getCompleteAreaPaint

public java.awt.Paint getCompleteAreaPaint()
Returns the complete area paint.

Returns:
Paint The paint (maybe null).

setCompleteAreaPaint

public void setCompleteAreaPaint(java.awt.Paint paint)
Sets the complete area paint,and sends a ChartShapeChangeEvent to all registered listeners.

Parameters:
paint - Paint The paint (null permitted).

getIncompleteAreaPaint

public java.awt.Paint getIncompleteAreaPaint()
Returns the incomplete area paint.

Returns:
Paint The paint (maybe null).

setIncompleteAreaPaint

public void setIncompleteAreaPaint(java.awt.Paint paint)
Sets the incomplete area paint,and sends a ChartShapeChangeEvent to all registered listeners.

Parameters:
paint - Paint The paint (null permitted).

draw

public void draw(java.awt.Graphics2D g2)
Draw the ChartShape on a Java 2d graphics device(such as the screen or the printer).

Specified by:
draw in interface IChartShape
Overrides:
draw in class RectangleTextChartShape
Parameters:
g2 - Graphics2D The graphics device (such as the screen or the printer) (null not permitted).

getHotspotShape

protected java.awt.Shape getHotspotShape()
Returns the hotspot shape.

Overrides:
getHotspotShape in class RectangleTextChartShape
Returns:
Shape The hotspot shape (maybe null).

getShapeType

public ShapeType getShapeType()
The type for describe this shape.

Specified by:
getShapeType in interface IChartShape
Overrides:
getShapeType in class RectangleTextChartShape
Returns:
ShapeType The constant value in class ShapeType.