Package Utils

Examples of Utils.Card


        for(int i=0; i<prfMain.getCardNumber(); i++)
        {
            Enumeration<Card> enCard=profile.getCards();
            while(enCard.hasMoreElements())
            {
                Card crdTemp=enCard.nextElement();
                if(crdTemp.getOrdNumber()==i)
                {
                    LoadCard(crdTemp, false);
                    break;
                }
            }
View Full Code Here


        for(int i=0; i<prfMain.getCardNumber(); i++)
        {
            Enumeration<Card> enCard=profile.getCards();
            while(enCard.hasMoreElements())
            {
                Card crdTemp=enCard.nextElement();
                if(crdTemp.getOrdNumber()==i)
                {
                    LoadCard(crdTemp, false);
                    break;
                }
            }
View Full Code Here

        vctGroups=null;
        for(int i=0; i<dblValues.length; i++){dblValues[i]=0;}
        Enumeration<Card> enCards=mwcMain.getProfile().getCards();
        while(enCards.hasMoreElements())
        {
            Card crdTemp=enCards.nextElement();
            Enumeration<Transaction> enTrans =crdTemp.getAllTransactions();
            while(enTrans.hasMoreElements())
            {
                Transaction tmpTrans=enTrans.nextElement();
                if((tmpTrans.getDate().before(dtBegin))||((tmpTrans.getDate().after(dtEnd))))
                    continue;
                for(int i=mitTimer.getIterationNumber(); mitTimer.hasNext(); mitTimer.next())
                {
                    i=mitTimer.getIterationNumber();
                    if(mitTimer.isInCurrentMonth(tmpTrans.getDate()))
                    {
                        for(int k=0; k<strGroups.length; k++)
                        {
                            if(strGroups[k].equals(mwcMain.getProfile().getReasons().get(tmpTrans.strReason.trim().toLowerCase())))
                                dblMonthSpent[k][i]-=tmpTrans.amount;
                        }
                    }
                }
                mitTimer.reset();
                for(int i=0; i<strGroups.length; i++)
                {
                    if(tmpTrans.amount>0)
                        continue;
                    if((strGroups[i].equals(mwcMain.getProfile().getReasons().get(tmpTrans.strReason.trim().toLowerCase())))&&(!tmpTrans.strReason.equals(TransferController.TransferMinus)))
                        dblValues[i]+=tmpTrans.amount;
                }
                if(tmpTrans.amount<0)
                    dblTotal-=tmpTrans.amount;
            }
        }
        //circular diagram 0 tab
        jtpAnalisys.addTab("Resourse distribution", new CircularDiagram(strGroups, dblValues));
        //jtpAnalisys.setToolTipTextAt(0, "Resourse distribution");
        //fill the dates
        String[] strDates=new String[mitTimer.getIterationCount()];
        for(Date t=mitTimer.getDateOfIteration(); mitTimer.hasNext(); mitTimer.next())
            strDates[mitTimer.getIterationNumber()]=DateTool.getDateStr(mitTimer.getDateOfIteration(), "MM.yyyy");
        mitTimer.reset();
        //Calculade all data
        enCards=mwcMain.getProfile().getCards();
        int intCardPointer=mwcMain.getProfile().getCardNumber()-1;
        double dblMonthBalance;
        while(enCards.hasMoreElements())
        {
            Card crdTemp=enCards.nextElement();
            strCardNames[intCardPointer]=crdTemp.getName();
            dblMonthBalance=crdTemp.getInitialBalance();
            Enumeration<Transaction> enInitTrans=crdTemp.getAllTransactions();
            while(enInitTrans.hasMoreElements())
            {
                Transaction trTemp=enInitTrans.nextElement();
                if(trTemp.getDate().before(dtBegin))
                    dblMonthBalance+=trTemp.amount;
            }
            while(mitTimer.hasNext())
            {
               
                Enumeration<Transaction> enTranCr=crdTemp.getAllTransactions();
                while(enTranCr.hasMoreElements())
                {
                    Transaction trans=enTranCr.nextElement();
                    if(mitTimer.isInCurrentMonth(trans.getDate()))
                    {
View Full Code Here

               }
               else
               {
                   try
                   {
                       crdNew=new Card(txtName.getText(), Double.parseDouble(txtValue.getText()), mwcHost.getProfile());
                       mwcHost.getProfile().addCard(crdNew);
                       mwcHost.LoadCard(crdNew, true);
                       mwcHost.UpdateCardNumbers(false);
                       dispose();
                   }
View Full Code Here

               }
               else
               {
                   try
                   {
                       crdNew=new Card(txtName.getText(), Double.parseDouble(txtValue.getText()), mwcHost.getProfile());
                       mwcHost.getProfile().addCard(crdNew);
                       mwcHost.LoadCard(crdNew, true);
                       mwcHost.UpdateCardNumbers(false);
                       dispose();
                   }
View Full Code Here

        for(int i=0; i<prfMain.getCardNumber(); i++)
        {
            Enumeration<Card> enCard=profile.getCards();
            while(enCard.hasMoreElements())
            {
                Card crdTemp=enCard.nextElement();
                if(crdTemp.getOrdNumber()==i)
                {
                    LoadCard(crdTemp, false);
                    break;
                }
            }
View Full Code Here

        vctGroups=null;
        for(int i=0; i<dblValues.length; i++){dblValues[i]=0;}
        Enumeration<Card> enCards=mwcMain.getProfile().getCards();
        while(enCards.hasMoreElements())
        {
            Card crdTemp=enCards.nextElement();
            Enumeration<Transaction> enTrans =crdTemp.getAllTransactions();
            while(enTrans.hasMoreElements())
            {
                Transaction tmpTrans=enTrans.nextElement();
                if((tmpTrans.getDate().before(dtBegin))||((tmpTrans.getDate().after(dtEnd))))
                    continue;
                for(int i=mitTimer.getIterationNumber(); mitTimer.hasNext(); mitTimer.next())
                {
                    i=mitTimer.getIterationNumber();
                    if(mitTimer.isInCurrentMonth(tmpTrans.getDate()))
                    {
                        for(int k=0; k<strGroups.length; k++)
                        {
                            if(strGroups[k].equals(mwcMain.getProfile().getReasons().get(tmpTrans.strReason.trim().toLowerCase())))
                                dblMonthSpent[k][i]-=tmpTrans.amount;
                        }
                    }
                }
                mitTimer.reset();
                for(int i=0; i<strGroups.length; i++)
                {
                    if(tmpTrans.amount>0)
                        continue;
                    if(strGroups[i].equals(mwcMain.getProfile().getReasons().get(tmpTrans.strReason.trim().toLowerCase())))
                        dblValues[i]+=tmpTrans.amount;
                }
                if(tmpTrans.amount<0)
                    dblTotal-=tmpTrans.amount;
            }
        }
        //circular diagram 0 tab
        jtpAnalisys.addTab("Resourse distribution", new CircularDiagram(strGroups, dblValues));
        //jtpAnalisys.setToolTipTextAt(0, "Resourse distribution");
        //fill the dates
        String[] strDates=new String[mitTimer.getIterationCount()];
        for(Date t=mitTimer.getDateOfIteration(); mitTimer.hasNext(); mitTimer.next())
            strDates[mitTimer.getIterationNumber()]=DateTool.getDateStr(mitTimer.getDateOfIteration(), "MM.yyyy");
        mitTimer.reset();
        //Calculade all data
        enCards=mwcMain.getProfile().getCards();
        int intCardPointer=mwcMain.getProfile().getCardNumber()-1;
        double dblMonthBalance;
        while(enCards.hasMoreElements())
        {
            Card crdTemp=enCards.nextElement();
            strCardNames[intCardPointer]=crdTemp.getName();
            dblMonthBalance=crdTemp.getInitialBalance();
            while(mitTimer.hasNext())
            {
               
                Enumeration<Transaction> enTranCr=crdTemp.getAllTransactions();
                while(enTranCr.hasMoreElements())
                {
                    Transaction trans=enTranCr.nextElement();
                    if(mitTimer.isInCurrentMonth(trans.getDate()))
                    {
View Full Code Here

               }
               else
               {
                   try
                   {
                       crdNew=new Card(txtName.getText(), Double.parseDouble(txtValue.getText()), mwcHost.getProfile());
                       mwcHost.getProfile().addCard(crdNew);
                       mwcHost.LoadCard(crdNew, true);
                       mwcHost.UpdateCardNumbers(false);
                       dispose();
                   }
View Full Code Here

TOP

Related Classes of Utils.Card

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.