com.steema.teechart.styles
Class Gantt

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.styles.Series
          extended by com.steema.teechart.styles.CustomPoint
              extended by com.steema.teechart.styles.Points
                  extended by com.steema.teechart.styles.Gantt
All Implemented Interfaces:
ISeries, java.io.Serializable, java.lang.Cloneable

public class Gantt
extends Points

Title: Gantt class

Description: Gantt Series.

Example:


   ganttSeries = new com.steema.teechart.styles.Gantt(myChart.getChart());
   ganttSeries.fillSampleValues();
 

Copyright (c) 2005-2008 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.steema.teechart.styles.Series
Series.MarkTextResolver
 
Field Summary
protected  ChartPen linePen
           
protected  TreatNullsStyle treatnulls
           
 
Fields inherited from class com.steema.teechart.styles.CustomPoint
iStacked, point
 
Fields inherited from class com.steema.teechart.styles.Series
AUTODEPTH, AUTOZORDER, bActive, bBrush, bColorEach, calcVisiblePoints, colorMember, customMarkText, drawBetweenPoints, endZ, firstVisible, hasZValues, iColors, InternalUse, iNumSampleValues, iZOrder, labelMember, lastVisible, listenerList, mandatory, manualData, marks, middleZ, notMandatory, percentDecimal, percentFormat, sLabels, startZ, useAxis, useSeriesColor, valueFormat, vxValues, vyValues, yMandatory
 
Fields inherited from class com.steema.teechart.TeeBase
chart
 
Constructor Summary
Gantt()
          Creates a new Gantt series.
Gantt(IBaseChart c)
           
 
Method Summary
 int add(DateTime start, DateTime endDate, double y, Color color)
          Adds a new Gantt point to the series, at the start and endDate positions.
 int add(DateTime start, DateTime endDate, double y, java.lang.String text)
           
 int add(DateTime start, DateTime endDate, double y, java.lang.String text, Color color)
           
 int add(double start, double endDate, double y)
          Adds a new Gantt bar with start and end coordinates to the Series.
 int add(double start, double endDate, double y, Color color)
          Adds a new Gantt bar with start and end coordinates and color.
 int add(double start, double endDate, double y, java.lang.String text)
          Adds a new Gantt bar with start and end coordinates and label.
 int add(double start, double endDate, double y, java.lang.String text, Color color)
          Adds a new Gantt bar with start and end coordinates, label and color.
protected  void addSampleValues(int numValues)
          Adds random values to series.
protected  double calcMinMaxValue(boolean isMin)
           
 boolean clickedPointer(int valueIndex, int tmpX, int tmpY, int x, int y)
          For internal use.
protected  void drawMark(int valueIndex, java.lang.String s, SeriesMarksPosition aPosition)
           
 void drawValue(int valueIndex)
          Called internally.
 ChartPen getConnectingPen()
          Determines the pen to draw the optional lines that connect Gantt Bars.
 java.lang.String getDescription()
          Gets descriptive text.
 ValueList getEndValues()
          Defines the ending Gantt bar date value.
The starting Gantt bar point is stored at TGanttSeries.StartValues
StartValues and EndValues can be specified both as DateTime or double values.
 double getMaxXValue()
          Returns the Maximum Value of the Series X Values List.
 ValueList getNextTasks()
          Holds the Gantt bar index each Gantt bar is connected to.
 ValueList getStartValues()
          Defines the starting Gantt bar date values.
The ending Gantt bar point date is stored at TGanttSeries.EndValues.
StartValues and EndValues can be specified both as DateTime or double values.
 TreatNullsStyle getTreatNulls()
          Defines how null points are treated.
 boolean isValidSourceOf(Series value)
          True if Series source is Gantt.
It returns false if the Value parameter is the same as Self.
 void prepareForGallery(boolean isEnabled)
           
 void setTreatNulls(TreatNullsStyle value)
           
 
Methods inherited from class com.steema.teechart.styles.Points
canDoExtra, createSubGallery, getColor, getLinePen, setColor, setColorEach, setSubGallery
 
Methods inherited from class com.steema.teechart.styles.CustomPoint
addSeriesMouseListener, assign, calcHorizMargins, calcVerticalMargins, calcXPos, calcYPos, calcZOrder, clicked, drawLegendShape, drawPointer, getMaxYValue, getMinXValue, getMinYValue, getOriginPos, getPointer, getStacked, onGetPointerStyle, removePointerStyleResolver, removeSeriesMouseListener, sameClassOrigin, setChart, setPointerStyleResolver, setStacked
 
Methods inherited from class com.steema.teechart.styles.Series
add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, addChartValue, added, addedValue, addNull, addNullXY, addSeriesPaintListener, addValues, assignDispose, assignValues, associatedToAxis, beginUpdate, calcFirstLastVisibleIndex, calcPosValue, CalculateMarkPosition, calcXPosValue, calcXSizeValue, calcYPosValue, calcYSizeValue, canAddRandomPoints, changeType, checkDataSource, checkMouse, checkOrder, checkOtherSeries, clear, clearLists, clicked, clone, cloneSeries, convertArray, createNewSeries, createNewSeries, dataSourceArray, delete, delete, delete, dispose, doAfterDrawValues, doBeforeDrawChart, doBeforeDrawValues, doClick, doClickPointer, doDoubleClick, draw, drawLegend, drawLegend, drawMarks, drawMarksSeries, drawSeries, drawSeriesForward, drawValuesForward, endUpdate, fillSampleValues, fillSampleValues, fireSeriesMouseEvent, fireSeriesPaint, firstDisplayed, galleryChanged3D, getActive, getAllowSinglePoint, getBitmapEditor, getColorEach, getColorMember, getColors, getCount, getCountLegendItems, getCursor, getCustomHorizAxis, getCustomVertAxis, getDataSource, getDefaultColor, getDefaultNullValue, getDepth, getEndZ, getFields, getFirstVisible, getFunction, getHasZValues, getHorizAxis, getHorizontalAxis, getLabelMember, getLabels, getLastVisible, getLegendString, getMandatory, getMandatoryAxis, getMarks, getMarkText, getMarkValue, getMaxZValue, getMiddleZ, getMinZValue, getNotMandatory, getNumGallerySeries, getNumSampleValues, getOriginValue, getPercentFormat, getPoint, getSeriesColor, getShowInLegend, getStartZ, getTitle, getUseAxis, getValueColor, getValueFormat, getValueIndexSwapper, getValueList, getValueList, getValueMarkText, getValuesLists, getVertAxis, getVerticalAxis, getVisible, getXValues, getYMandatory, getYValueList, getYValues, getZOrder, hasClickEvents, hasDataSource, hasListenersOf, hasNoMandatoryValues, isNull, isValidSeriesSource, lastDisplayed, legendItemColor, legendToValueIndex, maxMarkWidth, moreSameZOrder, mouseEvent, newFromType, numSampleValues, onDisposing, paintLegend, prepareLegendCanvas, randomBounds, readResolve, recalcGetAxis, refreshSeries, removeMarkTextResolver, removeSeriesPaintListener, repaint, sameClass, setActive, setColorMember, setColors, setCursor, setCustomHorizAxis, setCustomHorizAxis, setCustomVertAxis, setCustomVertAxis, setDataSource, setDefaultNullValue, setDepth, setEndZ, setFunction, setHorizontal, setHorizontalAxis, setLabelMember, setLabels, setMarks, setMarkTextResolver, setMiddleZ, setNull, setNull, setPercentFormat, setSeriesColor, setShowInLegend, setStartZ, setTitle, setValueFormat, setValueList, setVerticalAxis, setVisible, setXValues, setYValues, setZOrder, setZPositions, sortByLabels, sortByLabels, swapValueIndex, titleOrName, toString, valuesListAdd, xScreenToValue, yScreenToValue
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setColorProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.steema.teechart.styles.ISeries
getChart, invalidate
 

Field Detail

linePen

protected ChartPen linePen

treatnulls

protected TreatNullsStyle treatnulls
Constructor Detail

Gantt

public Gantt()
Creates a new Gantt series.


Gantt

public Gantt(IBaseChart c)
Method Detail

getStartValues

public ValueList getStartValues()
Defines the starting Gantt bar date values.
The ending Gantt bar point date is stored at TGanttSeries.EndValues.
StartValues and EndValues can be specified both as DateTime or double values.
Both are standard TChartValueList components. That means you can access their values with same methods as you can access X or Y values.
The TGanttSeries.Add method must be used to add Gantt bar points.

Returns:
ValueList

getEndValues

public ValueList getEndValues()
Defines the ending Gantt bar date value.
The starting Gantt bar point is stored at TGanttSeries.StartValues
StartValues and EndValues can be specified both as DateTime or double values.
Both are standard TChartValueList components. That means you can access their values with same methods as you can access X or Y values.
The TGanttSeries.Add method must be used to add Gantt bar points.

Returns:
ValueList

getNextTasks

public ValueList getNextTasks()
Holds the Gantt bar index each Gantt bar is connected to.
When a Gantt bar is added to TGanttSeries, it's NextTask value is assigned to -1 by default. That means the Gantt bar is NOT connected to any other Gantt Bar.
You need to set a valid bar index to NextTask.

Returns:
ValueList

addSampleValues

protected void addSampleValues(int numValues)
Adds random values to series.

Overrides:
addSampleValues in class Series
Parameters:
numValues - int

getConnectingPen

public ChartPen getConnectingPen()
Determines the pen to draw the optional lines that connect Gantt Bars.

Returns:
ChartPen

drawValue

public void drawValue(int valueIndex)
Called internally. Draws the "ValueIndex" point of the Series.

Specified by:
drawValue in interface ISeries
Overrides:
drawValue in class CustomPoint
Parameters:
valueIndex - int

clickedPointer

public boolean clickedPointer(int valueIndex,
                              int tmpX,
                              int tmpY,
                              int x,
                              int y)
For internal use.

Overrides:
clickedPointer in class CustomPoint
Parameters:
valueIndex - int
tmpX - int
tmpY - int
x - int
y - int
Returns:
boolean

drawMark

protected void drawMark(int valueIndex,
                        java.lang.String s,
                        SeriesMarksPosition aPosition)
Overrides:
drawMark in class CustomPoint

prepareForGallery

public void prepareForGallery(boolean isEnabled)
Overrides:
prepareForGallery in class Series

add

public int add(DateTime start,
               DateTime endDate,
               double y,
               java.lang.String text)

add

public int add(DateTime start,
               DateTime endDate,
               double y,
               java.lang.String text,
               Color color)

add

public int add(DateTime start,
               DateTime endDate,
               double y,
               Color color)
Adds a new Gantt point to the series, at the start and endDate positions.

Parameters:
start - DateTime
endDate - DateTime
y - double
color - Color
Returns:
int

add

public int add(double start,
               double endDate,
               double y,
               Color color)
Adds a new Gantt bar with start and end coordinates and color.

Parameters:
start - double
endDate - double
y - double
color - Color
Returns:
int

add

public int add(double start,
               double endDate,
               double y)
Adds a new Gantt bar with start and end coordinates to the Series.

Parameters:
start - double
endDate - double
y - double
Returns:
int

add

public int add(double start,
               double endDate,
               double y,
               java.lang.String text)
Adds a new Gantt bar with start and end coordinates and label.

Parameters:
start - double
endDate - double
y - double
text - String
Returns:
int

add

public int add(double start,
               double endDate,
               double y,
               java.lang.String text,
               Color color)
Adds a new Gantt bar with start and end coordinates, label and color.

Parameters:
start - double
endDate - double
y - double
text - String
color - Color
Returns:
int

isValidSourceOf

public boolean isValidSourceOf(Series value)
True if Series source is Gantt.
It returns false if the Value parameter is the same as Self.
It's used to validate DataSource both at design and run-time.

Overrides:
isValidSourceOf in class Series
Parameters:
value - Series
Returns:
boolean

getMaxXValue

public double getMaxXValue()
Returns the Maximum Value of the Series X Values List.

Overrides:
getMaxXValue in class CustomPoint
Returns:
double

getDescription

public java.lang.String getDescription()
Gets descriptive text.

Overrides:
getDescription in class Points
Returns:
String

calcMinMaxValue

protected double calcMinMaxValue(boolean isMin)

getTreatNulls

public TreatNullsStyle getTreatNulls()
Defines how null points are treated.

Returns:
TreatNullsStyle

setTreatNulls

public void setTreatNulls(TreatNullsStyle value)