|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.steema.teechart.TeeBase
com.steema.teechart.styles.Series
com.steema.teechart.styles.CustomBar
public class CustomBar
Title: CustomBar class
Description: Custom Bar Series.
Copyright (c) 2005-2008 by Steema Software SL. All Rights Reserved.
Company: Steema Software SL
Nested Class Summary | |
---|---|
static interface |
CustomBar.BarStyleResolver
|
static class |
CustomBar.MarksLocation
|
Nested classes/interfaces inherited from class com.steema.teechart.styles.Series |
---|
Series.MarkTextResolver |
Field Summary | |
---|---|
protected int |
barSizePercent
|
protected boolean |
bDark3D
|
protected boolean |
bUseOrigin
|
protected int |
conePercent
|
protected int |
customBarSize
|
protected double |
dOrigin
|
protected Rectangle |
iBarBounds
|
protected int |
iBarSize
|
protected MultiBars |
iMultiBar
|
protected int |
iNumBars
|
protected int |
iOrderPos
|
protected int |
iPreviousCount
|
protected boolean |
marksOnBar
|
protected Color |
normalBarColor
|
protected ChartPen |
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 | |
---|---|
CustomBar()
|
|
CustomBar(IBaseChart c)
|
Method Summary | |
---|---|
protected int |
applyBarOffset(int position)
|
int |
barMargin()
Returns side margin amount in pixels. |
void |
barRectangle(Color barColor,
int aLeft,
int aTop,
int aRight,
int aBottom)
For internal use. |
void |
barRectangle(Color barColor,
Rectangle r)
For internal use. |
protected Rectangle |
calcBarBounds(int valueIndex)
|
void |
calcFirstLastVisibleIndex()
|
protected void |
calcFirstLastVisibleIndex(boolean recursive)
|
protected int |
calcMarkLength(int valueIndex)
|
void |
calcZOrder()
|
int |
clicked(int x,
int y)
Returns the ValueIndex of the "clicked" point in the Series. |
void |
createSubGallery(Gallery addSubChart)
|
protected void |
doBarGradient(int valueIndex,
Rectangle rect)
|
void |
doBeforeDrawChart()
|
protected BarStyle |
doGetBarStyle(int valueIndex)
|
protected void |
doGradient3D(int valueIndex,
Point p0,
Point p1)
|
protected void |
drawLegendShape(IGraphics3D g,
int valueIndex,
Rectangle rect)
|
protected void |
drawTickLine(int tickPos,
BarStyle aStyle)
|
protected void |
drawTickLines(int startPos,
int endPos,
BarStyle aStyle)
|
boolean |
drawValuesForward()
Returns whether Series draws its points in ascending/descending order. |
boolean |
getAutoMarkPosition()
Repositions Marks on BarSeries to prevent overlapping. |
Rectangle |
getBarBounds()
Coordinates of current Bar point being displayed. |
protected int |
getBarBoundsMidX()
|
BarStyle |
getBarStyle()
Defines the Bar shape used to draw Bars. |
ChartBrush |
getBrush()
Defines the Brush used to fill Bars. |
int |
getConePercent()
The apex size as percentage of the base. |
int |
getCustomBarWidth()
|
boolean |
getDark3D()
Darkens sides of bars to enhance 3D effect. |
int |
getDepthPercent()
Determines the percent amount of bar size in "z" depth direction. |
Gradient |
getGradient()
Defines the color Gradient used to fill the Bars. |
boolean |
getGradientRelative()
Calculates Colors based on highest bar when Gradient is Visible. |
CustomBar.MarksLocation |
getMarksLocation()
|
boolean |
getMarksOnBar()
|
MultiBars |
getMultiBar()
Determines how multiple BarSeries will be displayed in the same Chart. |
int |
getOffsetPercent()
The Bar displacement as percentage of Bar size. |
double |
getOrigin()
The common bottom value used for all Bar points. |
ChartPen |
getPen()
Pen used to draw the Bar rectangles. |
boolean |
getSideMargins()
Margin between Chart rectangle and Bars. |
int |
getStackGroup()
Allows stacking independent Series within the same Chart, in series groups. |
ChartPen |
getTickLines()
Pen used to draw "tick" lines across each bar. |
boolean |
getUseOrigin()
Bars to be bottom aligned at the Origin method value. |
double |
getYOrigin()
Obsolete. |
protected void |
internalApplyBarMargin(Margins margins)
|
protected int |
internalCalcMarkLength(int valueIndex)
|
protected boolean |
internalClicked(int valueIndex,
Point point)
|
protected int |
internalGetOriginPos(int valueIndex,
int defaultOrigin)
|
protected boolean |
isPointInChartRect(int valueIndex)
|
protected int |
lastVisibleMark()
|
protected double |
maxMandatoryValue(double value)
|
protected double |
minMandatoryValue(double value)
|
protected int |
numSampleValues()
|
double |
pointOrigin(int valueIndex,
boolean sumAll)
For Internal Use. |
void |
prepareForGallery(boolean isEnabled)
|
void |
removeBarStyleResolver()
|
void |
setAutoMarkPosition(boolean value)
Repositions Marks on BarSeries to prevent overlapping. |
protected void |
setBarSizePercent(int value)
|
void |
setBarStyle(BarStyle value)
Defines the Bar shape used to draw Bars. |
void |
setBarStyleResolver(CustomBar.BarStyleResolver resolver)
|
void |
setChart(IBaseChart c)
Chart associated with this object. |
void |
setConePercent(int value)
Sets the apex size as a percentage of the base. |
void |
setCustomBarWidth(int value)
|
void |
setDark3D(boolean value)
Darkens sides of bars to enhance 3D effect. |
void |
setDepthPercent(int value)
Determines the percent amount of bar size in "z" depth direction. |
void |
setGradientRelative(boolean value)
Calculates Colors based on highest bar when Gradient is Visible. |
void |
setMarksLocation(CustomBar.MarksLocation value)
|
void |
setMarksOnBar(boolean value)
|
void |
setMultiBar(MultiBars value)
Determines how multiple BarSeries will be displayed in the same Chart. |
void |
setOffsetPercent(int value)
Sets the Bar displacement as percentage of Bar size. |
void |
setOrigin(double value)
Sets the common bottom value used for all Bar points. |
protected void |
setPenBrushBar(Color barColor)
|
void |
setSideMargins(boolean value)
Sets a margin between Chart rectangle and Bars. |
void |
setStackGroup(int value)
Allows stacking independent Series within the same Chart, in series groups. |
void |
setSubGallery(int index)
Creates and prepares the index'th Series style to show at sub-gallery dialog. |
void |
setUseOrigin(boolean value)
Allows Bars to be bottom aligned at the Origin method value. |
void |
setYOrigin(double value)
Obsolete. |
void |
setZPositions()
|
protected boolean |
shouldSerializeYOrigin()
|
protected boolean |
subGalleryStack()
|
Methods inherited from class com.steema.teechart.TeeBase |
---|
getChart, invalidate, setBooleanProperty, 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 |
---|
protected int barSizePercent
protected int conePercent
protected boolean bDark3D
protected MultiBars iMultiBar
protected boolean bUseOrigin
protected boolean marksOnBar
protected double dOrigin
protected ChartPen pPen
protected Rectangle iBarBounds
protected int iNumBars
protected int iOrderPos
protected int iPreviousCount
protected int iBarSize
protected int customBarSize
protected Color normalBarColor
Constructor Detail |
---|
public CustomBar(IBaseChart c)
public CustomBar()
Method Detail |
---|
public void setBarStyleResolver(CustomBar.BarStyleResolver resolver)
public void removeBarStyleResolver()
public boolean getMarksOnBar()
public void setMarksOnBar(boolean value)
public CustomBar.MarksLocation getMarksLocation()
public void setMarksLocation(CustomBar.MarksLocation value)
public Gradient getGradient()
Example:
barSeries = new Bar(myChart.getChart()); barSeries.getMarks().setVisible(true); barSeries.fillSampleValues(6); barSeries.setColor(Color.RED); barSeries.setBarStyle(BarStyle.RECTGRADIENT); barSeries.getGradient().setDirection(GradientDirection.VERTICAL); barSeries.getGradient().setStartColor(Color.GREEN); barSeries.getGradient().setUseMiddle(false); barSeries.getGradient().setMiddleColor(Color.YELLOW);
public boolean getGradientRelative()
public void setGradientRelative(boolean value)
value
- booleanpublic int getStackGroup()
public void setStackGroup(int value)
Example:
bar1Series.setStackGroup(0); bar2Series.setStackGroup(1);
value
- intpublic void setZPositions()
setZPositions
in class Series
public int getDepthPercent()
public void setDepthPercent(int value)
Example:
series.setDepthPercent(50) ; // % of 3D depth
value
- intpublic boolean getDark3D()
public void setDark3D(boolean value)
value
- booleanpublic void prepareForGallery(boolean isEnabled)
prepareForGallery
in class Series
protected void setBarSizePercent(int value)
public boolean getSideMargins()
public void setSideMargins(boolean value)
value
- booleanprotected boolean shouldSerializeYOrigin()
public double getYOrigin()
public void setYOrigin(double value)
value
- doublepublic boolean getUseOrigin()
public void setUseOrigin(boolean value)
value
- booleanpublic double getOrigin()
public void setOrigin(double value)
value
- doublepublic boolean getAutoMarkPosition()
public void setAutoMarkPosition(boolean value)
value
- booleanpublic int getConePercent()
public void setConePercent(int value)
value
- intpublic int getOffsetPercent()
public void setOffsetPercent(int value)
value
- intpublic BarStyle getBarStyle()
public void setBarStyle(BarStyle value)
value
- BarStylepublic ChartBrush getBrush()
getBrush
in class Series
public void setChart(IBaseChart c)
TeeBase
setChart
in interface ISeries
setChart
in class Series
c
- IBaseChartpublic MultiBars getMultiBar()
public void setMultiBar(MultiBars value)
value
- MultiBarspublic ChartPen getPen()
public ChartPen getTickLines()
public Rectangle getBarBounds()
protected int getBarBoundsMidX()
protected BarStyle doGetBarStyle(int valueIndex)
protected int internalCalcMarkLength(int valueIndex)
protected void doGradient3D(int valueIndex, Point p0, Point p1)
public void barRectangle(Color barColor, Rectangle r)
barColor
- Colorr
- Rectanglepublic void barRectangle(Color barColor, int aLeft, int aTop, int aRight, int aBottom)
barColor
- ColoraLeft
- intaTop
- intaRight
- intaBottom
- intprotected void doBarGradient(int valueIndex, Rectangle rect)
public int getCustomBarWidth()
public void setCustomBarWidth(int value)
public int barMargin()
protected void internalApplyBarMargin(Margins margins)
protected Rectangle calcBarBounds(int valueIndex)
protected boolean isPointInChartRect(int valueIndex)
isPointInChartRect
in class Series
protected void calcFirstLastVisibleIndex(boolean recursive)
public void calcFirstLastVisibleIndex()
calcFirstLastVisibleIndex
in interface ISeries
calcFirstLastVisibleIndex
in class Series
protected int lastVisibleMark()
lastVisibleMark
in class Series
protected int internalGetOriginPos(int valueIndex, int defaultOrigin)
protected double maxMandatoryValue(double value)
public double pointOrigin(int valueIndex, boolean sumAll)
valueIndex
- intsumAll
- boolean
protected double minMandatoryValue(double value)
public void calcZOrder()
calcZOrder
in class Series
public void doBeforeDrawChart()
doBeforeDrawChart
in class Series
protected void drawTickLine(int tickPos, BarStyle aStyle)
protected void drawTickLines(int startPos, int endPos, BarStyle aStyle)
protected void drawLegendShape(IGraphics3D g, int valueIndex, Rectangle rect)
drawLegendShape
in class Series
public boolean drawValuesForward()
Series
drawValuesForward
in class Series
protected int applyBarOffset(int position)
protected int calcMarkLength(int valueIndex)
protected boolean internalClicked(int valueIndex, Point point)
public int clicked(int x, int y)
clicked
in interface ISeries
clicked
in class Series
x
- inty
- int
protected int numSampleValues()
numSampleValues
in class Series
protected void setPenBrushBar(Color barColor)
protected boolean subGalleryStack()
public void createSubGallery(Gallery addSubChart)
createSubGallery
in class Series
public void setSubGallery(int index)
Series
setSubGallery
in interface ISeries
setSubGallery
in class Series
index
- int
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |