com.ijchart.xychart.render.category
Class GranttRender
java.lang.Object
com.ijchart.xychart.render.AbstractRender
com.ijchart.xychart.render.AbstractWithAxisRender
com.ijchart.xychart.render.category.AbstractCategoryRender
com.ijchart.xychart.render.category.GranttRender
- All Implemented Interfaces:
- IDatasetChangeListener, IRender, IRenderWithAxis, java.io.Serializable, java.lang.Cloneable, java.util.EventListener
public class GranttRender
- extends AbstractCategoryRender
- implements java.lang.Cloneable, java.io.Serializable
Title: IJChart
Description: a chart library for the Java(tm) platform.
A render for simple Gantt charts.
Copyright: Copyright (c) 2013
Company:
- Version:
- 1.0
- Author:
- zhang feng min,shanghai china.
Contract me by email.
- See Also:
- Serialized Form
Fields inherited from class com.ijchart.xychart.render.AbstractRender |
borderPaints, borderStrokes, DEFAULT_AUTO_SELECT_BORDER_PAINT, DEFAULT_AUTO_SELECT_BORDER_STROKE, DEFAULT_AUTO_SELECT_FILL_PAINT, DEFAULT_BACKGROUND_IMAGE_ALIGNMENT, DEFAULT_BACKGROUND_PAINT, DEFAULT_BASE_BORDER_PAINT, DEFAULT_BASE_BORDER_STROKE, DEFAULT_BASE_ITEM_FILL, DEFAULT_BASE_ITEM_FILL_PAINT, DEFAULT_BASE_ITEM_FILL_PAINT_TRANSFORMER, DEFAULT_BASE_ITEM_LABEL_FONT, DEFAULT_BASE_ITEM_LABEL_HORIZONTAL_ALIGNMENT, DEFAULT_BASE_ITEM_LABEL_PAINT, DEFAULT_BASE_ITEM_LABEL_VERTICAL_ALIGNMENT, DEFAULT_BASE_ITEM_LABEL_VISIBLE, DEFAULT_BORDER_PAINT, DEFAULT_BORDER_STROKE, DEFAULT_DRAW_BORDER, DEFAULT_DRAWINT_SUPPLIER, DEFAULT_GENERATOR_TOOLTIP, DEFAULT_GENERATOR_URL, DEFAULT_LABEL_GENERATOR, DEFAULT_RENDER_AREA_BORDER_VISIBLE, DEFAULT_TOOLTIP_GENERATOR, fillPaints |
Method Summary |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
protected IChartShape |
createItemShapeOnly(java.awt.geom.Rectangle2D rect,
java.lang.String text,
java.lang.Object appendParam)
Create a shape with no attribute specified. |
void |
drawAllItems(CategoryAxis categoryAxis,
AbstractValueAxis valueAxis,
RectangleEdge valueAxisEdge,
java.awt.geom.Rectangle2D dataArea,
ChartOrientation orientation,
RenderShapeCollection renderShapes,
float alpha)
Draws all data items. |
boolean |
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object. |
java.awt.Paint |
getCompletePaint()
Returns the paint for displaying the percentage complete. |
GranttDrawType |
getDrawType()
Returns the draw type of grantt chart,the type defined in class GranttDrawType. |
double |
getEndPercent()
Returns the position of the end of the progress indicator, as a
percentage of the bar width. |
java.awt.Paint |
getIncompletePaint()
Returns the paint for displaying the percentage incomplete. |
double |
getStartPercent()
Returns the position of the start of the progress indicator, as a
percentage of the bar width. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isDrawCompleteAndIncomplete()
Returns the boolean flag that controls whether or not draw complete
and incomplete progress. |
void |
setCompletePaint(java.awt.Paint paint)
Sets the paint used to show the percentage complete and sends a
RenderChangeEvent to all registered listeners. |
void |
setDrawCompleteAndIncomplete(boolean flag)
Sets a boolean flag that controls whether or not draw complete and
incomplete progress. |
void |
setDrawType(GranttDrawType drawType)
Sets the draw type of grantt chart. |
void |
setEndPercent(double percent)
Sets the position of the end of the progress indicator, as a percentage
of the bar width,and sends a
RenderChangeEvent to all registered listeners. |
void |
setIncompletePaint(java.awt.Paint paint)
Sets the paint used to show the percentage incomplete and sends a
RenderChangeEvent to all registered listeners. |
void |
setStartPercent(double percent)
Sets the position of the start of the progress indicator, as a
percentage of the bar width,and sends a
RenderChangeEvent to all registered listeners. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class com.ijchart.xychart.render.category.AbstractCategoryRender |
addAnnotation, createCategoryMarkerShape, drawAllAnnotation, drawCategoryMarker, getAllAnnotations, getBaseValue, getItemMargin, getMaximumBarWidth, getMinimumBarWidth, removeAllAnnotation, setBaseValue, setItemMargin, setMaximumBarWidth, setMinimumBarWidth |
Methods inherited from class com.ijchart.xychart.render.AbstractRender |
add3DShapes, addChangeListener, calculateLegendItemShapes, datasetChanged, drawBackground, drawBackgroundImage, drawDrawAreaBorder, fireRenderChanged, getBackgroundImage, getBackgroundImageAlignment, getBackgroundImageAlpha, getBackgroundPaint, getBaseItemBorderPaint, getBaseItemBorderStroke, getBaseItemFillPaint, getBaseItemFillPaintTransformer, getBaseItemLabelDirection, getBaseItemLabelFont, getBaseItemLabelHorizontalAlignment, getBaseItemLabelPaint, getBaseItemLabelPosition, getBaseItemLabelVerticalAlignment, getBaseItemLabelVisible, getBorderPaints, getBorderStrokes, getChartArea, getColumnItemBorderPaint, getColumnItemBorderStroke, getColumnItemFillPaint, getColumnItemFillPaintTransformer, getColumnItemLabelDirection, getColumnItemLabelFont, getColumnItemLabelHorizontalAlignment, getColumnItemLabelPaint, getColumnItemLabelPosition, getColumnItemLabelVerticalAlignment, getDataset, getDrawingSupplier, getFillPaints, getItemBorderPaint, getItemBorderStroke, getItemFillPaint, getItemFillPaintHelper, getItemFillPaintTransformer, getItemLabelDirection, getItemLabelFont, getItemLabelHorizontalAlignment, getItemLabelPaint, getItemLabelPosition, getItemLabelVerticalAlignment, getLabelGenerator, getLegendItemCount, getLegendItemLabels, getLegendItemLabelsByColumn, getLegendItemLabelsByRow, getLegendItemShapes, getLegendPositon, getLegendType, getNegativeItemLabelHorizontalAlignment, getNegativeItemLabelVerticalAlignment, getPositiveItemLabelHorizontalAlignment, getPositiveItemLabelVerticalAlignment, getRenderAreaBorderPaint, getRenderAreaBorderStroke, getRowItemBorderPaint, getRowItemBorderStroke, getRowItemFillPaint, getRowItemFillPaintTransformer, getRowItemLabelDirection, getRowItemLabelFont, getRowItemLabelHorizontalAlignment, getRowItemLabelPaint, getRowItemLabelPosition, getRowItemLabelVerticalAlignment, getToolTipGenerator, hasListener, isAutoSelectBorderPaint, isAutoSelectBorderStroke, isAutoSelectFillPaint, isBaseItemDrawBorder, isBaseItemFill, isColumnItemDrawBorder, isColumnItemFill, isColumnItemLabelVisible, isColumnItemVisible, isGeneratorTooltip, isGeneratorUrl, isItemDrawBorder, isItemFill, isItemLabelVisible, isItemVisible, isRenderAreaBorderVisible, isRowItemDrawBorder, isRowItemFill, isRowItemLabelVisible, isRowItemVisible, notifyListeners, removeAllChangeListener, removeChangeListener, setAutoSelectBorderPaint, setAutoSelectBorderStroke, setAutoSelectFillPaint, setBackgroundImage, setBackgroundImageAlignment, setBackgroundImageAlpha, setBackgroundPaint, setBaseItemBorderPaint, setBaseItemBorderStroke, setBaseItemDrawBorder, setBaseItemFill, setBaseItemFillPaint, setBaseItemFillPaintTransformer, setBaseItemLabelDirection, setBaseItemLabelFont, setBaseItemLabelHorizontalAlignment, setBaseItemLabelPaint, setBaseItemLabelPosition, setBaseItemLabelVerticalAlignment, setBaseItemLabelVisible, setChartArea, setColumnItemBorderPaint, setColumnItemBorderStroke, setColumnItemDrawBorder, setColumnItemFill, setColumnItemFillPaint, setColumnItemFillPaintTransformer, setColumnItemLabelDirection, setColumnItemLabelFont, setColumnItemLabelHorizontalAlignment, setColumnItemLabelPaint, setColumnItemLabelPosition, setColumnItemLabelVerticalAlignment, setColumnItemLabelVisible, setColumnItemVisible, setCustomLegendType, setDataset, setDrawingSupplier, setDrawingSupplier, setGeneratorTooltip, setGeneratorUrl, setItemBorderPaint, setItemBorderStroke, setItemDrawBorder, setItemFill, setItemFillPaint, setItemFillPaintTransformer, setItemLabelDirection, setItemLabelFont, setItemLabelHorizontalAlignment, setItemLabelPaint, setItemLabelPosition, setItemLabelVerticalAlignment, setItemLabelVisible, setItemVisible, setLabelGenerator, setLegendPositon, setNegativeItemLabelHorizontalAlignment, setNegativeItemLabelVerticalAlignment, setPositiveItemLabelHorizontalAlignment, setPositiveItemLabelVerticalAlignment, setRenderAreaBorderPaint, setRenderAreaBorderStroke, setRenderAreaBorderVisible, setRowItemBorderPaint, setRowItemBorderStroke, setRowItemDrawBorder, setRowItemFill, setRowItemFillPaint, setRowItemFillPaintTransformer, setRowItemLabelDirection, setRowItemLabelFont, setRowItemLabelHorizontalAlignment, setRowItemLabelPaint, setRowItemLabelPosition, setRowItemLabelVerticalAlignment, setRowItemLabelVisible, setRowItemVisible, setToolTipGenerator |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ijchart.xychart.render.IRender |
addChangeListener, drawBackground, drawBackgroundImage, drawDrawAreaBorder, getBaseItemBorderPaint, getBaseItemBorderStroke, getBaseItemFillPaint, getBaseItemFillPaintTransformer, getBaseItemLabelFont, getBaseItemLabelHorizontalAlignment, getBaseItemLabelPaint, getBaseItemLabelPosition, getBaseItemLabelVerticalAlignment, getBaseItemLabelVisible, getColumnItemBorderPaint, getColumnItemBorderStroke, getColumnItemFillPaint, getColumnItemFillPaintTransformer, getColumnItemLabelFont, getColumnItemLabelHorizontalAlignment, getColumnItemLabelPaint, getColumnItemLabelPosition, getColumnItemLabelVerticalAlignment, getItemBorderPaint, getItemBorderStroke, getItemFillPaint, getItemFillPaintTransformer, getItemLabelFont, getItemLabelHorizontalAlignment, getItemLabelPaint, getItemLabelPosition, getItemLabelVerticalAlignment, getLabelGenerator, getLegendType, getNegativeItemLabelHorizontalAlignment, getNegativeItemLabelVerticalAlignment, getPositiveItemLabelHorizontalAlignment, getPositiveItemLabelVerticalAlignment, getRowItemBorderPaint, getRowItemBorderStroke, getRowItemFillPaint, getRowItemFillPaintTransformer, getRowItemLabelFont, getRowItemLabelHorizontalAlignment, getRowItemLabelPaint, getRowItemLabelPosition, getRowItemLabelVerticalAlignment, getToolTipGenerator, isBaseItemDrawBorder, isBaseItemFill, isColumnItemDrawBorder, isColumnItemFill, isColumnItemLabelVisible, isColumnItemVisible, isItemDrawBorder, isItemFill, isItemLabelVisible, isItemVisible, isRowItemDrawBorder, isRowItemFill, isRowItemLabelVisible, isRowItemVisible, removeAllChangeListener, removeChangeListener, setBaseItemBorderPaint, setBaseItemBorderStroke, setBaseItemDrawBorder, setBaseItemFill, setBaseItemFillPaint, setBaseItemFillPaintTransformer, setBaseItemLabelFont, setBaseItemLabelHorizontalAlignment, setBaseItemLabelPaint, setBaseItemLabelPosition, setBaseItemLabelVerticalAlignment, setBaseItemLabelVisible, setColumnItemBorderPaint, setColumnItemBorderStroke, setColumnItemDrawBorder, setColumnItemFill, setColumnItemFillPaint, setColumnItemFillPaintTransformer, setColumnItemLabelFont, setColumnItemLabelHorizontalAlignment, setColumnItemLabelPaint, setColumnItemLabelPosition, setColumnItemLabelVerticalAlignment, setColumnItemLabelVisible, setColumnItemVisible, setCustomLegendType, setItemBorderPaint, setItemBorderStroke, setItemDrawBorder, setItemFill, setItemFillPaint, setItemFillPaintTransformer, setItemLabelFont, setItemLabelHorizontalAlignment, setItemLabelPaint, setItemLabelPosition, setItemLabelVerticalAlignment, setItemLabelVisible, setItemVisible, setLabelGenerator, setNegativeItemLabelHorizontalAlignment, setNegativeItemLabelVerticalAlignment, setPositiveItemLabelHorizontalAlignment, setPositiveItemLabelVerticalAlignment, setRowItemBorderPaint, setRowItemBorderStroke, setRowItemDrawBorder, setRowItemFill, setRowItemFillPaint, setRowItemFillPaintTransformer, setRowItemLabelFont, setRowItemLabelHorizontalAlignment, setRowItemLabelPaint, setRowItemLabelPosition, setRowItemLabelVerticalAlignment, setRowItemLabelVisible, setRowItemVisible, setToolTipGenerator |
DEFAULT_DRAW_TYPE
public static final GranttDrawType DEFAULT_DRAW_TYPE
-
The default draw type of grantt chart.
DEFAULT_COMPLETE_PAINT
public static final java.awt.Paint DEFAULT_COMPLETE_PAINT
-
The paint for displaying the percentage complete.
DEFAULT_INCOMPLETE_PAINT
public static final java.awt.Paint DEFAULT_INCOMPLETE_PAINT
-
The paint for displaying the incomplete part of a task.
DEFAULT_START_PERCENT
public static final double DEFAULT_START_PERCENT
-
Controls the starting edge of the progress indicator (expressed as a
percentage of the overall bar width).This is a default value.
- See Also:
- Constant Field Values
DEFAULT_END_PERCENT
public static final double DEFAULT_END_PERCENT
-
Controls the ending edge of the progress indicator (expressed as a
percentage of the overall bar width).This is a default value.
- See Also:
- Constant Field Values
DEFAULT_DRAW_COMPLETE_AND_INCOMPLETE
public static final boolean DEFAULT_DRAW_COMPLETE_AND_INCOMPLETE
-
A default boolean flag that controls whether or not draw complete
and incomplete progress.
- See Also:
- Constant Field Values
GranttRender
public GranttRender(IMatrixDataset dataset)
-
constructor.
- Parameters:
dataset
- IMatrixDataset
The dataset (null not permitted).
getDrawType
public GranttDrawType getDrawType()
-
Returns the draw type of grantt chart,the type defined in class GranttDrawType.
- Returns:
- GranttDrawType
The draw type of grantt chart (never null).
setDrawType
public void setDrawType(GranttDrawType drawType)
-
Sets the draw type of grantt chart.
- Parameters:
drawType
- GranttDrawType
The draw type (null not permitted).
getCompletePaint
public java.awt.Paint getCompletePaint()
-
Returns the paint for displaying the percentage complete.
- Returns:
- Paint
The paint (never null).
setCompletePaint
public void setCompletePaint(java.awt.Paint paint)
-
Sets the paint used to show the percentage complete and sends a
RenderChangeEvent
to all registered listeners.
- Parameters:
paint
- Paint
The paint (null not permitted).
getIncompletePaint
public java.awt.Paint getIncompletePaint()
-
Returns the paint for displaying the percentage incomplete.
- Returns:
- Paint
The paint (never null).
setIncompletePaint
public void setIncompletePaint(java.awt.Paint paint)
-
Sets the paint used to show the percentage incomplete and sends a
RenderChangeEvent
to all registered listeners.
- Parameters:
paint
- Paint
The paint (null not permitted).
getStartPercent
public double getStartPercent()
-
Returns the position of the start of the progress indicator, as a
percentage of the bar width.
- Returns:
- double
The start percent.
setStartPercent
public void setStartPercent(double percent)
-
Sets the position of the start of the progress indicator, as a
percentage of the bar width,and sends a
RenderChangeEvent
to all registered listeners.
- Parameters:
percent
- double
The percent.
getEndPercent
public double getEndPercent()
-
Returns the position of the end of the progress indicator, as a
percentage of the bar width.
- Returns:
- double
The end percent.
setEndPercent
public void setEndPercent(double percent)
-
Sets the position of the end of the progress indicator, as a percentage
of the bar width,and sends a
RenderChangeEvent
to all registered listeners.
- Parameters:
percent
- double
The percent.
isDrawCompleteAndIncomplete
public boolean isDrawCompleteAndIncomplete()
-
Returns the boolean flag that controls whether or not draw complete
and incomplete progress.
- Returns:
- boolean
setDrawCompleteAndIncomplete
public void setDrawCompleteAndIncomplete(boolean flag)
-
Sets a boolean flag that controls whether or not draw complete and
incomplete progress.
- Parameters:
flag
- boolean
A boolean.
drawAllItems
public void drawAllItems(CategoryAxis categoryAxis,
AbstractValueAxis valueAxis,
RectangleEdge valueAxisEdge,
java.awt.geom.Rectangle2D dataArea,
ChartOrientation orientation,
RenderShapeCollection renderShapes,
float alpha)
-
Draws all data items.
- Specified by:
drawAllItems
in class AbstractCategoryRender
- Parameters:
categoryAxis
- CategoryAxis
The category axis (null not permitted).valueAxis
- AbstractValueAxis
The value axis (null not permitted).valueAxisEdge
- RectangleEdge
The value axis edge (null not permitted).dataArea
- Rectangle2D
The chart data area (null not permitted).orientation
- ChartOrientation
The chart orientation (null not permitted).renderShapes
- RenderShapeCollection
Collects information about the render (null not permitted).alpha
- float
The alpha transparency (in the range 0.0f to 1.0f, where 0.0f is fully transparent,
and 1.0f is fully opaque).
createItemShapeOnly
protected IChartShape createItemShapeOnly(java.awt.geom.Rectangle2D rect,
java.lang.String text,
java.lang.Object appendParam)
-
Create a shape with no attribute specified.
- Overrides:
createItemShapeOnly
in class AbstractRender
- Parameters:
rect
- Rectangle2D
The bar rectangle (null not permitted).text
- String
The text (null permitted).appendParam
- Object
The append parameter,used for special propose (null permitted).
- Returns:
- IChartShape
The shape.
equals
public boolean equals(java.lang.Object obj)
-
Tests this instance for equality with an arbitrary object.
- Overrides:
equals
in class AbstractCategoryRender
- Parameters:
obj
- the object (null permitted).
- Returns:
- A boolean.
hashCode
public int hashCode()
-
Returns a hash code value for the object.
- Overrides:
hashCode
in class AbstractCategoryRender
- Returns:
- int
A hash code value for this object.
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
-
Creates and returns a copy of this object.
- Overrides:
clone
in class AbstractCategoryRender
- Returns:
- object a clone of this instance.
- Throws:
java.lang.CloneNotSupportedException
- if the object's class does not
support the Cloneable interface. Subclasses
that override the clone method can also
throw this exception to indicate that an instance cannot
be cloned.
toString
public java.lang.String toString()
-
Returns a string representation of the object.
- Overrides:
toString
in class AbstractCategoryRender
- Returns:
- a string representation of the object.