Пример #1
0
 public JComponent getController(final TresCanvas canvas) {
   JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 1, 0));
   Color color = m_algo.getColor();
   panel.setBorder(BorderFactory.createMatteBorder(2, 2, 2, 2, color));
   panel.setBackground(color);
   JCheckBox checkBox =
       new JCheckBox(m_algo.m_name, m_doPaint) {
         @Override
         protected void fireItemStateChanged(ItemEvent event) {
           super.fireItemStateChanged(event);
           m_doPaint = (event.getStateChange() == ItemEvent.SELECTED);
           canvas.repaint();
         }
       };
   checkBox.setOpaque(false);
   panel.add(checkBox);
   panel.add(m_algo.getController(canvas));
   return panel;
 }
Пример #2
0
 public void paint(Graphics g, ChartAxe xTimeAxe, ChartAxe yPriceAxe, Point cursorPoint) {
   m_algo.paintAlgo(g, xTimeAxe, yPriceAxe, cursorPoint);
 }
Пример #3
0
 public int paintYAxe(Graphics g, ChartAxe xTimeAxe, int yRight, Map<String, ChartAxe> yAxes) {
   return m_algo.paintYAxe(g, xTimeAxe, yRight, yAxes);
 }
Пример #4
0
 public String getRunAlgoParams() {
   return m_algo.getRunAlgoParams();
 } // proxy call
Пример #5
0
 public double getDirectionAdjusted() {
   return m_algo.getDirectionAdjusted();
 } // proxy call
Пример #6
0
 public BaseAlgoWatcher(TresExchData tresExchData, TresAlgo algo) {
   m_tresExchData = tresExchData;
   m_algo = algo;
   algo.setListener(this);
 }