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
 Point drawOutput(Graphics g, int outputIdx, Object values, Color color, Stroke stroke, IIndicatorDrawingSupport indicatorDrawingSupport, List<Shape> shapes, Map<Color,List<Point>> handles)
          This method will be called once for every output that marked as drawnByIndicator, every time when chart surface needs to be redrawn
 

Method Detail

drawOutput

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

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


Copyright © 2011. All Rights Reserved.