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) {