Example #1
0
        virtual public int renderTitles(xGraphics g, int x, int y)
        {
            xVector v = getTitles();

            if (v != null)
            {
                for (int i = 0; i < v.size(); i++)
                {
                    stTitle t = (stTitle)v.elementAt(i);
                    g.setColor(t.color);
                    g.drawString(mFont, t.title, x, y);

                    x += g.getStringWidth(mFont, t.title) + 20;
                }
            }

            return(x);
        }
Example #2
0
        override public xVector getTitles()
        {
            xVector v     = new xVector();
            stTitle title = new stTitle(getTitle(), C.COLOR_WHITE);

            v.addElement(title);
            return(v);

            /*
             * xVector v = new xVector();
             *
             * Share share = getShare();
             * if (share == null)
             *  return null;
             *
             * int idx = share.getCursor();
             * int adx = (int)Share.pADX[idx];
             * int pdi = (int)Share.pPLUS_DI[idx];
             * int mdi = (int)Share.pMINUS_DI[idx];
             *
             * StringBuilder sb = Utils.sb;
             * sb.Length = 0;
             * sb.AppendFormat("ADX({0})={1}", mContext.mOptADXPeriod, adx);
             * v.addElement(new stTitle(sb.ToString(), 0xfff0f0f0));
             *
             * //  +di
             * sb.Length = 0;
             * sb.AppendFormat("DMI({0}): +DI={1}", (int)mContext.mOptADXPeriodDMI, pdi);
             * v.addElement(new stTitle(sb.ToString(), 0xff00ff00));
             *
             * //  signal 9
             * sb.Length = 0;
             * sb.AppendFormat("-DI: {0}", mdi);
             *
             * v.addElement(new stTitle(sb.ToString(), 0xffff0000));
             *
             * return v;
             * */
        }