public class OutputParameterInfo
extends java.lang.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(java.lang.String name,
OutputParameterInfo.Type type,
int flags)
Deprecated.
use
OutputParameterInfo(String, Type, DrawingStyle) instead |
OutputParameterInfo(java.lang.String name,
OutputParameterInfo.Type type,
OutputParameterInfo.DrawingStyle drawingStyle)
Creates output parameter descriptor and sets all fields.
|
OutputParameterInfo(java.lang.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 |
java.awt.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 |
java.awt.Color |
getColor2()
Used as trend down color for outputs with
OutputParameterInfo.DrawingStyle.isOutputAsLine() is true
By default equals to color |
int |
getDisplayOrder()
Returns default display order of indicator output.
|
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
|
java.lang.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()
Checks should output be drawn or not.
|
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(java.awt.Color color)
Sets default color to use when drawing this output
|
void |
setColor2(java.awt.Color color2)
Sets default color used when drawing trend down outputs
|
void |
setDisplayOrder(int displayOrder)
Sets default display order of indicator output.
|
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<Shape> shapes, Map<Color, List<Point>>Map<Color, List<Point>> handles) Also it's possible to define public double[] getMinMax(int outputIdx, Object values) method, 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)
Sets drawing line width
|
void |
setName(java.lang.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)
Defines should output be drawn or not.
|
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(java.lang.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(java.lang.String name, OutputParameterInfo.Type type, OutputParameterInfo.DrawingStyle drawingStyle)
name
- name of the outputtype
- type of the outputdrawingStyle
- specifies how to draw this outputpublic OutputParameterInfo(java.lang.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 java.lang.String getName()
public void setName(java.lang.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 java.awt.Color getColor()
OutputParameterInfo.DrawingStyle.isOutputAsLine()
is true
getColor2()
public void setColor(java.awt.Color color)
color
- color to draw withpublic java.awt.Color getColor2()
OutputParameterInfo.DrawingStyle.isOutputAsLine()
is true
By default equals to color
getColor()
public void setColor2(java.awt.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 boolean isHistogramTwoColor()
public void setHistogramTwoColor(boolean histogramTwoColor)
histogramTwoColor
- if true, then show histogram in two colorspublic 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<Shape> shapes, Map<Color, List<Point>>Map<Color, List<Point>> handles)
public double[] getMinMax(int outputIdx, Object values)
drawnByIndicator
- 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()
true
to draw the output, false
to not.public void setShowOutput(boolean showOutput)
showOutput
- true
to draw the output, false
to not.public float getOpacityAlpha()
public void setOpacityAlpha(float alpha)
alpha
- ranges from 0 to 1public int getLineWidth()
public void setLineWidth(int lineWidth)
lineWidth
- drawing line widthpublic int getDisplayOrder()
public void setDisplayOrder(int displayOrder)
displayOrder
- default display orderCopyright © 2024. All rights reserved.