public class OutputParameterInfo extends Object
Modifier and Type | Class and Description |
---|---|
static class |
OutputParameterInfo.DrawingStyle
Specifies how to draw output
|
static class |
OutputParameterInfo.Type
Type of the output
|
Modifier and Type | Field and Description |
---|---|
static int |
DASH_LINE
Deprecated.
use
OutputParameterInfo.DrawingStyle.DASH_LINE instead |
static int |
DOT
Deprecated.
use
OutputParameterInfo.DrawingStyle.DOTS instead |
static int |
DOT_LINE
Deprecated.
use
OutputParameterInfo.DrawingStyle.DOT_LINE instead |
static int |
HISTO
Deprecated.
use
OutputParameterInfo.DrawingStyle.HISTOGRAM instead |
static int |
LINE
Deprecated.
use
OutputParameterInfo.DrawingStyle.LINE instead |
static int |
PATTERN_BOOL
Deprecated.
use
OutputParameterInfo.DrawingStyle.PATTERN_BOOL instead |
static int |
PATTERN_BULL_BEAR
Deprecated.
|
static int |
PATTERN_STRENGTH
Deprecated.
|
Constructor and Description |
---|
OutputParameterInfo()
Creates empty parameter description without setting any field
|
OutputParameterInfo(String name,
OutputParameterInfo.Type type,
int flags)
Deprecated.
use
OutputParameterInfo(String, Type, DrawingStyle) instead |
OutputParameterInfo(String name,
OutputParameterInfo.Type type,
OutputParameterInfo.DrawingStyle drawingStyle)
Creates output parameter descriptor and sets all fields.
|
OutputParameterInfo(String name,
OutputParameterInfo.Type type,
OutputParameterInfo.DrawingStyle drawingStyle,
boolean lastValueOnChart)
Creates output parameter descriptor and sets all fields.
|
Modifier and Type | Method and Description |
---|---|
char |
getArrowSymbol()
Returns arrow character for outputs with
OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_UP or OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_DOWN style |
Color |
getColor()
Returns default color for output or null if no color was set
Used as trend up color for outputs with
OutputParameterInfo.DrawingStyle.isOutputAsLine() is true |
Color |
getColor2()
Used as trend down color for outputs with
OutputParameterInfo.DrawingStyle.isOutputAsLine() is true
By default equals to color |
OutputParameterInfo.DrawingStyle |
getDrawingStyle()
Returns style that specifies how to draw this output
|
int |
getFlags()
Deprecated.
use
getDrawingStyle() instead |
Instrument |
getInstrument()
Returns instrument of this output, or null if no instrument was set
|
int |
getLineWidth()
Returns drawing line width
|
String |
getName()
Returns name of the output
|
float |
getOpacityAlpha()
Returns transparency alpha value
|
int |
getShift()
Shifts output by number of candles returned
|
OutputParameterInfo.Type |
getType()
Returns type of the output
|
boolean |
isDrawnByIndicator()
Returns true if indicator draws this output itself
|
boolean |
isGapAtNaN()
Returns true if drawing logic should make a gap in lines when there is a NaN or Integer.MIN_VALUE in output
|
boolean |
isHistogramTwoColor()
Returns true if histogram should be shown in two colors
|
boolean |
isShowOutput() |
boolean |
isShowPopupInfo()
Checks should tooltip with info appear on mouse over the output or not.
|
boolean |
isShowValueOnChart()
Checks should last value be specially drawn on chart or not.
|
void |
setArrowSymbol(char arrowSymbol)
Sets arrow character for outputs with
OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_UP or OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_DOWN style |
void |
setColor(Color color)
Sets default color to use when drawing this output
|
void |
setColor2(Color color2)
Sets default color used when drawing trend down outputs
|
void |
setDrawingStyle(OutputParameterInfo.DrawingStyle drawingStyle)
Sets style that specifies how to draw this output
|
void |
setDrawnByIndicator(boolean drawnByIndicator)
If set to true, than indicator should have public method
public void drawOutput(Graphics g, int outputIdx, Object values, Color color, IIndicatorDrawingSupport indicatorDrawingSupport, List
Also it's possible to define public double[] getMinMax(int outputIdx, Object values) methods,
that will be called to define minimum and maximum values for scale
Please look at the description of IIndicator interface for more info |
void |
setFlags(int flags)
Deprecated.
use
setDrawingStyle(DrawingStyle) instead |
void |
setGapAtNaN(boolean gapAtNaN)
Set to true to make gaps at candles with Double.NaN or Integer.MIN_VALUE in output
|
void |
setHistogramTwoColor(boolean histogramTwoColor)
If set to true and drawing style is histogram, then it will be shown in two colors, positive values with green and negative with red
|
void |
setInstrument(Instrument instrument)
Sets instrument of this output.
|
void |
setLineWidth(int lineWidth) |
void |
setName(String name)
Sets name of the output
|
void |
setOpacityAlpha(float alpha)
Sets the transparency alpha value
|
void |
setShift(int shift)
Sets number of candles to shift this output
|
void |
setShowOutput(boolean showOutput) |
void |
setShowPopupInfo(boolean showPopupInfo)
Defines should tooltip with info appear on mouse over the output or not.
|
void |
setShowValueOnChart(boolean showValueOnChart)
Defines should last value be specially drawn on chart or not.
|
void |
setType(OutputParameterInfo.Type type)
Sets type of the output
|
@Deprecated public static final int LINE
OutputParameterInfo.DrawingStyle.LINE
instead@Deprecated public static final int DOT_LINE
OutputParameterInfo.DrawingStyle.DOT_LINE
instead@Deprecated public static final int DASH_LINE
OutputParameterInfo.DrawingStyle.DASH_LINE
instead@Deprecated public static final int DOT
OutputParameterInfo.DrawingStyle.DOTS
instead@Deprecated public static final int HISTO
OutputParameterInfo.DrawingStyle.HISTOGRAM
instead@Deprecated public static final int PATTERN_BOOL
OutputParameterInfo.DrawingStyle.PATTERN_BOOL
instead@Deprecated public static final int PATTERN_BULL_BEAR
OutputParameterInfo.DrawingStyle.PATTERN_BULL_BEAR
instead@Deprecated public static final int PATTERN_STRENGTH
OutputParameterInfo.DrawingStyle.PATTERN_STRENGTH
insteadpublic OutputParameterInfo()
public OutputParameterInfo(String name, OutputParameterInfo.Type type, int flags)
OutputParameterInfo(String, Type, DrawingStyle)
insteadname
- name of the outputtype
- type of the outputflags
- flags of the outputpublic OutputParameterInfo(String name, OutputParameterInfo.Type type, OutputParameterInfo.DrawingStyle drawingStyle)
name
- name of the outputtype
- type of the outputdrawingStyle
- specifies how to draw this outputpublic OutputParameterInfo(String name, OutputParameterInfo.Type type, OutputParameterInfo.DrawingStyle drawingStyle, boolean lastValueOnChart)
name
- name of the outputtype
- type of the outputdrawingStyle
- specifies how to draw this outputlastValueOnChart
- true
to show indicator's last value
for this output on chart.public String getName()
public void setName(String name)
name
- name of the outputpublic OutputParameterInfo.Type getType()
public void setType(OutputParameterInfo.Type type)
type
- type of the outputpublic Instrument getInstrument()
public void setInstrument(Instrument instrument)
instrument
- instrument of the outputpublic int getFlags()
getDrawingStyle()
insteadpublic void setFlags(int flags)
setDrawingStyle(DrawingStyle)
insteadflags
- flags of the outputpublic OutputParameterInfo.DrawingStyle getDrawingStyle()
public void setDrawingStyle(OutputParameterInfo.DrawingStyle drawingStyle)
drawingStyle
- specifies how to draw this outputpublic Color getColor()
OutputParameterInfo.DrawingStyle.isOutputAsLine()
is truegetColor2()
public void setColor(Color color)
color
- color to draw withpublic Color getColor2()
OutputParameterInfo.DrawingStyle.isOutputAsLine()
is true
By default equals to color
getColor()
public void setColor2(Color color2)
color2
- the color2 to setpublic char getArrowSymbol()
OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_UP
or OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_DOWN
stylepublic void setArrowSymbol(char arrowSymbol)
OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_UP
or OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_DOWN
stylearrowSymbol
- arrow characterpublic void setHistogramTwoColor(boolean histogramTwoColor)
histogramTwoColor
- if true, then show histogram in two colorspublic boolean isHistogramTwoColor()
public int getShift()
public void setShift(int shift)
shift
- number of candles to shift this outputpublic boolean isDrawnByIndicator()
public void setDrawnByIndicator(boolean drawnByIndicator)
public void drawOutput(Graphics g, int outputIdx, Object values, Color color, IIndicatorDrawingSupport indicatorDrawingSupport, List shapes, Map>Map> handles)
Also it's possible to define public double[] getMinMax(int outputIdx, Object values)
methods,
that will be called to define minimum and maximum values for scale
Please look at the description of IIndicator interface for more infodrawnByIndicator
- true if indicator draws this output itselfpublic boolean isGapAtNaN()
public void setGapAtNaN(boolean gapAtNaN)
gapAtNaN
- true for gapspublic boolean isShowValueOnChart()
true
to draw the last value, false
to not.public void setShowValueOnChart(boolean showValueOnChart)
showValueOnChart
- true
to draw the last value,
false
to not.public boolean isShowPopupInfo()
public void setShowPopupInfo(boolean showPopupInfo)
showPopupInfo
- true of tooltip should be shownpublic boolean isShowOutput()
public void setShowOutput(boolean showOutput)
public float getOpacityAlpha()
public void setOpacityAlpha(float alpha)
alpha
- ranges from 0 to 1public int getLineWidth()
public void setLineWidth(int lineWidth)
Copyright © 2016. All rights reserved.