|| ae.getSource().equals(m_bPickClose)) {
int x = m_mechList.getSelectedIndex();
if (x == -1) {
return;
}
MechSummary ms = m_mechsCurrent[m_mechList.getSelectedIndex()];
try {
Entity e = new MechFileParser(ms.getSourceFile(), ms
.getEntryName()).getEntity();
Client c = null;
if (m_chPlayer.getSelectedIndex() > 0) {
String name = (String) m_chPlayer.getSelectedItem();
c = m_clientgui.getBots().get(name);
}
if (c == null) {
c = m_client;
}
autoSetSkills(e);
e.setOwner(c.getLocalPlayer());
c.sendAddEntity(e);
} 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();
return;
}
if (ae.getSource().equals(m_bPickClose)) {
setVisible(false);
}
} else if (ae.getSource().equals(m_bSearch)) {
advancedSearch();
} else if (ae.getSource().equals(m_bReset)) {
resetSearch();
} else if (ae.getSource().equals(m_bToggleAdvanced)) {
toggleAdvanced();
} else if (ae.getSource().equals(m_bShowBV)) {
JEditorPane tEditorPane = new JEditorPane();
tEditorPane.setContentType("text/html");
tEditorPane.setEditable(false);
MechSummary ms = m_mechsCurrent[m_mechList.getSelectedIndex()];
try {
Entity e = new MechFileParser(ms.getSourceFile(), ms
.getEntryName()).getEntity();
e.calculateBattleValue();
tEditorPane.setText(e.getBVText());
} catch (Exception e) {
}