com.steema.teechart.styles
Class Bar

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.styles.Series
          extended by com.steema.teechart.styles.CustomBar
              extended by com.steema.teechart.styles.Bar
All Implemented Interfaces:
ISeries, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Bar3D, BarJoin, CustomError, ImageBar

public class Bar
extends CustomBar

Title: Bar class

Description: The Bar Series component outputs all points as vertical bars.

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.CustomBar
CustomBar.BarStyleResolver
 
Nested classes/interfaces inherited from class com.steema.teechart.styles.Series
Series.MarkTextResolver
 
Field Summary
 
Fields inherited from class com.steema.teechart.styles.CustomBar
barSizePercent, bDark3D, bUseOrigin, conePercent, customBarSize, dOrigin, iBarBounds, iBarSize, iMultiBar, iNumBars, iOrderPos, iPreviousCount, normalBarColor, pPen
 
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
Bar()
           
Bar(IBaseChart c)
           
 
Method Summary
 void calcHorizMargins(Margins margins)
          Returns the number of pixels for horizontal margins
 void calcVerticalMargins(Margins margins)
          Returns the number of pixels for vertical margins
 int calcXPos(int valueIndex)
          The Screen X pixel coordinate of the ValueIndex Series value.
The horizontal Bar position is the "real" X pos + the BarWidth by our BarSeries order.
 int calcYPos(int valueIndex)
          The Screen Y pixel coordinate of the ValueIndex Series value.
 void drawBar(int barIndex, int startPos, int endPos)
          Internal use
protected  void drawMark(int valueIndex, java.lang.String s, SeriesMarksPosition p)
           
protected  boolean drawSeriesForward(int valueIndex)
           
protected  void drawTickLine(int tickPos, BarStyle aStyle)
           
 void drawValue(int valueIndex)
          Called internally.
 int getBarWidthPercent()
          Determines the percent of total Bar width used.
Setting BarWidthPercent = 100 makes joined Bars.
You can control how many Bars appear at the same time by using Page.MaxPointsPerPage.
Default value: 70
 java.lang.String getDescription()
          Gets descriptive text.
 double getMaxXValue()
          The Maximum Value of the Series X Values List.
 double getMaxYValue()
          The Maximum Value of the Series Y Values List.
 double getMinXValue()
          The Minimum Value of the Series X Values List.
 double getMinYValue()
          The Minimum Value of the Series Y Values List.
 int getOriginPos(int valueIndex)
          The corresponding screen pixels coordinate of the leftmost horizontal bar edge.
protected  int internalCalcMarkLength(int valueIndex)
           
protected  boolean internalClicked(int valueIndex, java.awt.Point point)
           
protected  boolean moreSameZOrder()
          Returns true if there are more series that share the same Z order.
For example Stacked Bars.
 void setBarWidthPercent(int value)
          Sets the percent of total Bar width used.
Default value: 70
 
Methods inherited from class com.steema.teechart.styles.CustomBar
applyBarOffset, barMargin, barRectangle, barRectangle, calcMarkLength, calcZOrder, clicked, createSubGallery, doBarGradient, doBeforeDrawChart, doGetBarStyle, doGradient3D, drawLegendShape, drawTickLines, getAutoMarkPosition, getBarBounds, getBarBoundsMidX, getBarStyle, getBrush, getConePercent, getCustomBarWidth, getDark3D, getDepthPercent, getGradient, getGradientRelative, getMultiBar, getOffsetPercent, getOrigin, getPen, getSideMargins, getStackGroup, getTickLines, getUseOrigin, getYOrigin, internalApplyBarMargin, internalGetOriginPos, maxMandatoryValue, minMandatoryValue, numSampleValues, pointOrigin, prepareForGallery, removeBarStyleResolver, setAutoMarkPosition, setBarSizePercent, setBarStyle, setBarStyleResolver, setChart, setConePercent, setCustomBarWidth, setDark3D, setDepthPercent, setGradientRelative, setMultiBar, setOffsetPercent, setOrigin, setPenBrushBar, setSideMargins, setStackGroup, setSubGallery, setUseOrigin, setYOrigin, setZPositions, shouldSerializeYOrigin, subGalleryStack
 
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, addSampleValues, addSeriesMouseListener, addSeriesPaintListener, addValues, assign, 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, doBeforeDrawValues, doClick, doClickPointer, doDoubleClick, draw, drawLegend, drawLegend, drawMarks, drawMarksSeries, drawSeries, drawValuesForward, endUpdate, fillSampleValues, fillSampleValues, fireSeriesMouseEvent, fireSeriesPaint, firstDisplayed, galleryChanged3D, getActive, getAllowSinglePoint, getBitmapEditor, getColor, 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, isValidSourceOf, lastDisplayed, legendItemColor, legendToValueIndex, maxMarkWidth, mouseEvent, newFromType, onDisposing, paintLegend, prepareLegendCanvas, randomBounds, readResolve, recalcGetAxis, refreshSeries, removeMarkTextResolver, removeSeriesMouseListener, removeSeriesPaintListener, repaint, sameClass, setActive, setColor, setColorEach, 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, 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
 

Constructor Detail

Bar

public Bar()

Bar

public Bar(IBaseChart c)
Method Detail

getDescription

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

Overrides:
getDescription in class Series
Returns:
String

getBarWidthPercent

public int getBarWidthPercent()
Determines the percent of total Bar width used.
Setting BarWidthPercent = 100 makes joined Bars.
You can control how many Bars appear at the same time by using Page.MaxPointsPerPage.
Default value: 70

Returns:
int

setBarWidthPercent

public void setBarWidthPercent(int value)
Sets the percent of total Bar width used.
Default value: 70

Parameters:
value - int
See Also:
getBarWidthPercent()

internalCalcMarkLength

protected int internalCalcMarkLength(int valueIndex)
Overrides:
internalCalcMarkLength in class CustomBar

internalClicked

protected boolean internalClicked(int valueIndex,
                                  java.awt.Point point)
Overrides:
internalClicked in class CustomBar

calcHorizMargins

public void calcHorizMargins(Margins margins)
Description copied from class: Series
Returns the number of pixels for horizontal margins

Overrides:
calcHorizMargins in class Series
Parameters:
margins - Margins

calcVerticalMargins

public void calcVerticalMargins(Margins margins)
Description copied from class: Series
Returns the number of pixels for vertical margins

Overrides:
calcVerticalMargins in class Series
Parameters:
margins - Margins

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 Series
Parameters:
valueIndex - int

drawTickLine

protected void drawTickLine(int tickPos,
                            BarStyle aStyle)
Overrides:
drawTickLine in class CustomBar

drawBar

public void drawBar(int barIndex,
                    int startPos,
                    int endPos)
Internal use

Parameters:
barIndex - int
startPos - int
endPos - int

moreSameZOrder

protected boolean moreSameZOrder()
Description copied from class: Series
Returns true if there are more series that share the same Z order.
For example Stacked Bars.

Overrides:
moreSameZOrder in class Series
Returns:
boolean

calcXPos

public int calcXPos(int valueIndex)
The Screen X pixel coordinate of the ValueIndex Series value.
The horizontal Bar position is the "real" X pos + the BarWidth by our BarSeries order.

Overrides:
calcXPos in class Series
Parameters:
valueIndex - int
Returns:
int

calcYPos

public int calcYPos(int valueIndex)
The Screen Y pixel coordinate of the ValueIndex Series value.

Overrides:
calcYPos in class Series
Parameters:
valueIndex - int
Returns:
int

drawMark

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

drawSeriesForward

protected boolean drawSeriesForward(int valueIndex)
Overrides:
drawSeriesForward in class Series

getOriginPos

public int getOriginPos(int valueIndex)
The corresponding screen pixels coordinate of the leftmost horizontal bar edge.

Parameters:
valueIndex - int
Returns:
int

getMaxXValue

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

Overrides:
getMaxXValue in class Series
Returns:
double

getMinXValue

public double getMinXValue()
The Minimum Value of the Series X Values List.

Overrides:
getMinXValue in class Series
Returns:
double

getMaxYValue

public double getMaxYValue()
The Maximum Value of the Series Y Values List.

Overrides:
getMaxYValue in class Series
Returns:
double

getMinYValue

public double getMinYValue()
The Minimum Value of the Series Y Values List.

Overrides:
getMinYValue in class Series
Returns:
double