Package de.netsysit.policymanager.Enums

Examples of de.netsysit.policymanager.Enums.Cards


            public void propertyChange(PropertyChangeEvent evt) {
                String propName = evt.getPropertyName();
                if (propName.equals("dbActiveItemSet")) {
                    CardLayout layout = (CardLayout) mainRightPnl.getLayout();
                    ItemTypes item = dbModel.getActiveItem();
                    Cards card = item.getCard();
                    String cardString = item.getCardString();
                    layout.show(mainRightPnl, cardString);
                    mainCardsLst.setSelectedValue(card, true);

                }
            }
        };

        dbModel.addPropertyChangeListener(mfPcl);
        PersonalListCellRenderer cr = new PersonalListCellRenderer();
        EnumSet cards = Enums.getCards();
        for (Object card : cards) {
            mainCardsLstModel.addElement((Cards) card);
        }

        mainCardsLst.setModel(mainCardsLstModel);
//        mainCardsLst.addPropertyChangeListener(mfPcl);
        mainCardsLst.setCellRenderer(cr);
        mainCardsLst.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        mainCardsLst.setSelectedIndex(0);
        mainCardsLst.addListSelectionListener(new ListSelectionListener() {

            public void valueChanged(ListSelectionEvent e) {
                if (!e.getValueIsAdjusting()) {
                    Cards eCard = (Cards) mainCardsLst.getSelectedValue();
                    if (eCard == Cards.APP) {
                        dbModel.setActiveItem(ItemTypes.APP);
                        ActionFactory.get(ActionFactory.ActionKey.MAIN_ADD).setName(rb.getString("addapp"));
                        ActionFactory.get(ActionFactory.ActionKey.MAIN_DELETE).setName(rb.getString("delapp"));
                    } else if (eCard == Cards.LIST) {
View Full Code Here

TOP

Related Classes of de.netsysit.policymanager.Enums.Cards

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.