private void customizeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_customizeButtonActionPerformed
// Find the selected avatar. If the avatar does not require high-res
// graphics, then go ahead and configure the avatar.
AvatarSPI avatar = (AvatarSPI) avatarList.getSelectedValue();
if (avatar.isHighResolution() == false) {
avatar.configure();
return;
}
if (!AvatarImiJME.supportsHighQualityAvatars()) {
String msg = "Unfortunately your system graphics does not" +
" support the shaders which are required to configure" +
" this avatar";
String title = "Advanced Shaders Required";
JFrame frame = JmeClientMain.getFrame().getFrame();
JOptionPane.showMessageDialog(frame, msg, title, JOptionPane.ERROR_MESSAGE);
return;
}
// Fetch the currently selected avatar and display a dialog box to
// edit its configuration. Since the Customize button is only enabled
// when an item is selected, we assume something is selected in the
// list. At this point, we also know the graphics system supports the
// avatar, if high-res.
avatar.configure();
}//GEN-LAST:event_customizeButtonActionPerformed