Package quadbase.util
Interface ILinePropertySet
public interface ILinePropertySet
This interface is used to modify the properties associated with a 2D line chart.
A handle to an object that implements this interface can be obtained by calling the
gethLineProperties method defined in QbChart.
eg. QbChart chart = new QbChart(...); ILinePropertySet lineProp = chart.gethLineProperties();
-
Method Summary
Modifier and TypeMethodDescriptionReturns the color currently used for the areas above the horizontal line.Returns the color currently used for the areas below the horizontal line.intReturns the layout of the chart.boolean[]Returns the boolean used to determine what line is a step linedoubleReturns the proportion of the horizontal to the overall step line segmentbooleanReturns the state of drawing the area between dataline invalid input: '&' one horizontal line.booleanReturns the state of drawing the datapoints on top.booleanReturns if selective step line is usedbooleanReturns if all of the datalines are drawn in the step line fashionvoidsetAreaColors(Color colorAbove, Color colorBelow) Sets the colors of the areas enclosed by dataline invalid input: '&' horizontal line.voidsetAreaVisible(boolean state) Enable drawing the area between dataline invalid input: '&' one horizontal line.voidsetDataDrawnOnTop(boolean state) Specifies the drawing order of the datapoints, or the datalines--i.e.voidsetLayout(int x) Sets the layout of the chart to horizontal or vertical.voidsetSelectiveStepLineDrawn(boolean[] stepSelect) Specifies Step Lines to be drawn for selected lines.voidsetStepLineDrawn(boolean step) Specifies Step Lines to be drawn for all lines.voidsetStepLineDrawn(boolean step, double ratio) Specifies Step Lines to be drawn for all lines.voidsetStepLineRatio(double ratio) Specifies the proportion of the horizontal to the overall step line segment
-
Method Details
-
isStepLineDrawn
boolean isStepLineDrawn()Returns if all of the datalines are drawn in the step line fashion -
isSelectiveStepLineUsed
boolean isSelectiveStepLineUsed()Returns if selective step line is used -
getStepLineRatio
double getStepLineRatio()Returns the proportion of the horizontal to the overall step line segment -
setStepLineRatio
void setStepLineRatio(double ratio) Specifies the proportion of the horizontal to the overall step line segment -
getSelectiveStepLineDrawn
boolean[] getSelectiveStepLineDrawn()Returns the boolean used to determine what line is a step line -
setStepLineDrawn
void setStepLineDrawn(boolean step) Specifies Step Lines to be drawn for all lines. Draws in the horizontal direction first -
setSelectiveStepLineDrawn
void setSelectiveStepLineDrawn(boolean[] stepSelect) Specifies Step Lines to be drawn for selected lines. stepSelect array length would need to be at least equal to the number of lines. Draws in the horizontal direction first -
setStepLineDrawn
void setStepLineDrawn(boolean step, double ratio) Specifies Step Lines to be drawn for all lines. Also specifies the ratio where vertical lines are drawn to the next y value. Draws step lines in the horizontal direction first.- Parameters:
ratio- use 0.0 to draw vertical line first, 1.0 to draw horizontal lines til the next category, or any number between 0.0 to 1.0 to specify where the "step" occurs.
-
getLayout
int getLayout()Returns the layout of the chart.- Returns:
- The layout as: QbChart.HORIZONTAL or QbChart.VERTICAL
-
setLayout
void setLayout(int x) Sets the layout of the chart to horizontal or vertical.- Parameters:
x- QbChart.VERTICAL or QbChart.HORIZONTAL
-
setAreaVisible
void setAreaVisible(boolean state) Enable drawing the area between dataline invalid input: '&' one horizontal line. Frequently used in stock charts: dataline is the current day's prices while the horizontal line represents the previous closing price. Note: For 2D Line Chart with only one line. The default state is false. The default color above the horizontal line is pale red; the default color below the line is green. Please see setAreaColors to change the colors. -
isAreaVisible
boolean isAreaVisible()Returns the state of drawing the area between dataline invalid input: '&' one horizontal line. -
setAreaColors
Sets the colors of the areas enclosed by dataline invalid input: '&' horizontal line.- Parameters:
colorAbove- the color that is above the horizontal line, default value is Color.pink.colorBelow- the color that is below the horizontal line, default value is Color.green.
-
getAreaColorAbove
Color getAreaColorAbove()Returns the color currently used for the areas above the horizontal line. -
getAreaColorBelow
Color getAreaColorBelow()Returns the color currently used for the areas below the horizontal line. -
setDataDrawnOnTop
void setDataDrawnOnTop(boolean state) Specifies the drawing order of the datapoints, or the datalines--i.e. horizontal, vertical, trendlines... etc. When set true, datapoints would be on top of the datalines. When set false, datapoints may be covered by the datalines and may be less visible. Note: For 2D Line Chart only. The default state is false. -
isDataDrawnOnTop
boolean isDataDrawnOnTop()Returns the state of drawing the datapoints on top.
-