Package com.atolsystems.atolutilities

Examples of com.atolsystems.atolutilities.NamedObject


                        JOptionPane.YES_NO_OPTION);
                if(JOptionPane.YES_OPTION==choice)
                    return lastCard;
            }
            NamedObject[] names=new NamedObject[compatibleCards.size()+1];
            names[0]=new NamedObject("Cancel",new Integer(-1));
            for(int i=0;i<compatibleCards.size();i++)
                names[i+1]=new NamedObject(compatibleCards.get(i).getIdentifiableCardDescription(), new Integer(i));
            NamedObject o = (NamedObject) JOptionPane.showInputDialog(
                        null,
                        "The card could not be identified as one of the supported cards.\n"+
                        "Please select a card model to continue or select \"Cancel\".",
                        "Card model selection",
                        JOptionPane.QUESTION_MESSAGE,
                        null,
                        names,
                        names[0]);
            if((null==o) || (-1==((Integer)o.getObject()))){
                String msg="The card could not be identified as one of the supported cards and manual selection has been cancelled. Supported cards:\n";
                for(int i=0;i<compatibleCards.size();i++)
                    msg+=compatibleCards.get(i).getIdentifiableCardDescription()+"\n";
                throw new StopRequestFromUserException(msg);
            }
            index=(Integer)o.getObject();
            lastWasSelectedByUser=true;
        }
        lastCard=compatibleCards.get(index);
        lastAtr=atr;
        return lastCard;
View Full Code Here

TOP

Related Classes of com.atolsystems.atolutilities.NamedObject

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.