} else if (ie.getSource() == m_cModel || ie.getSource() == m_cName || ie.getSource() == m_cTons || ie.getSource() == m_cBV || ie.getSource() == m_cYear || ie.getSource() == m_cLevel || ie.getSource() == m_cCost) { GUIPreferences.getInstance().setMechSelectorIncludeModel(m_cModel.getState()); GUIPreferences.getInstance().setMechSelectorIncludeName(m_cName.getState()); GUIPreferences.getInstance().setMechSelectorIncludeTons(m_cTons.getState()); GUIPreferences.getInstance().setMechSelectorIncludeBV(m_cBV.getState()); GUIPreferences.getInstance().setMechSelectorIncludeYear(m_cYear.getState()); GUIPreferences.getInstance().setMechSelectorIncludeLevel(m_cLevel.getState()); GUIPreferences.getInstance().setMechSelectorIncludeCost(m_cCost.getState()); clearMechPreview(); sortMechs(); m_mechList.invalidate(); pack(); setLocation(computeDesiredLocation());
    public void itemStateChanged(ItemEvent ie)    {        if (ie.getSource() == m_chSort) {            clearMechPreview();            sortMechs();        }        else if (ie.getSource() == m_chWeightClass                 || ie.getSource() == m_chType                 || ie.getSource() == m_chUnitType) {            clearMechPreview();            filterMechs();        } else if (ie.getSource() == m_mechList) {            int selected = m_mechList.getSelectedIndex();            if (selected == -1) {                clearMechPreview();                return;            }            else {                MechSummary ms = m_mechsCurrent[selected];                try {                    Entity entity = new MechFileParser(ms.getSourceFile(), ms.getEntryName()).getEntity();                    previewMech(entity);                } catch (EntityLoadingException ex) {                    System.out.println("Unable to load mech: " + ms.getSourceFile() + ": " + ms.getEntryName() + ": " + ex.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$                    ex.printStackTrace();                    clearMechPreview();                    return;                }            }        }    }