com.dukascopy.api.indicators
Interface IDrawingIndicator


public interface IDrawingIndicator

Defines method that will be called for outputs with drawnByIndicator attribute set to true


Method Summary
 java.awt.Point drawOutput(java.awt.Graphics g, int outputIdx, java.lang.Object values, java.awt.Color color, java.awt.Stroke stroke, IIndicatorDrawingSupport indicatorDrawingSupport, java.util.List<java.awt.Shape> shapes, java.util.Map<java.awt.Color,java.util.List<java.awt.Point>> handles)
          This method will be called once for every output marked as drawnByIndicator every time the chart surface needs to be redrawn
 

Method Detail

drawOutput

java.awt.Point drawOutput(java.awt.Graphics g,
                          int outputIdx,
                          java.lang.Object values,
                          java.awt.Color color,
                          java.awt.Stroke stroke,
                          IIndicatorDrawingSupport indicatorDrawingSupport,
                          java.util.List<java.awt.Shape> shapes,
                          java.util.Map<java.awt.Color,java.util.List<java.awt.Point>> handles)
This method will be called once for every output marked as drawnByIndicator every time the chart surface needs to be redrawn

Parameters:
g - graphical context
outputIdx - index of the output parameter
values - array of values (int[], double[] or Object[] depending of the type of the output)
color - color selected when the indicator was added
stroke - stroke selected when the indicator was added
indicatorDrawingSupport - provides information about candle positions, indexes, etc
shapes - graphical shapes can be added to this list. This makes it possible to show correct popup when user right-clicks one of the shapes in this list on chart
handles - coordinate points with their corresponding colors can be added to this list
Returns:
X-Y coordinates of last point drawn. This point will be used when drawing last value marker on chart. The marker will not be drawn if null is returned.