Dukascopy
 
 
Wiki JStore Search Login

JFOREX-3141 OutputParameterInfo.setColor(..) ignored
 Post subject: JFOREX-3141 OutputParameterInfo.setColor(..) ignored Post rating: 0   New post Posted: Sun 07 Aug, 2011, 11:33 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
If the first OutputParameterInfo has no color assigned through setColor(color), ALL subsequent OutputParameterInfo objects will get random colors assigned, even if they have colors assigned.

Example: first param DrawingStyle.NONE, no color assigned...
        outputParameterInfos = new OutputParameterInfo[] {
            new OutputParameterInfo("Idx", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.NONE)
                {{
                }},
           new OutputParameterInfo("Max", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.HISTOGRAM)
                {{
                     setColor(Color.GREEN);                    // <=== will get a random color assigned instead of green
                }},
          ...


workaround:
assigning ALL OutputParameterInfo objects a color regardless even the ones with DrawingStyle.NONE will lead to the engine using the set colors.
        outputParameterInfos = new OutputParameterInfo[] {
            new OutputParameterInfo("Idx", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.NONE)
                {{
                      setColor(Color.BLACK);                    // <=== dummy assignment as workaround
               }},
           new OutputParameterInfo("Max", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.HISTOGRAM)
                {{
                     setColor(Color.GREEN);                    // <=== ... will lead to correctly processing this setColor-statement
                }},
          ...



Best, RR.


 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com