/**
* Sets up the player info (team, camo) panel
*/
private void setupPlayerInfo() {
Player player = client.getLocalPlayer();
panPlayerInfo = new JPanel();
labPlayerInfo = new JLabel(Messages
.getString("ChatLounge.labPlayerInfo")); //$NON-NLS-1$
lisPlayerInfo = new JList(new DefaultListModel());
lisPlayerInfo.addListSelectionListener(this);
butAddBot = new JButton(Messages.getString("ChatLounge.butAddBot")); //$NON-NLS-1$
butAddBot.setActionCommand("add_bot"); //$NON-NLS-1$
butAddBot.addActionListener(this);
butRemoveBot = new JButton(Messages
.getString("ChatLounge.butRemoveBot")); //$NON-NLS-1$
butRemoveBot.setEnabled(false);
butRemoveBot.setActionCommand("remove_bot"); //$NON-NLS-1$
butRemoveBot.addActionListener(this);
labTeam = new JLabel(
Messages.getString("ChatLounge.labTeam"), SwingConstants.RIGHT); //$NON-NLS-1$
labCamo = new JLabel(
Messages.getString("ChatLounge.labCamo"), SwingConstants.RIGHT); //$NON-NLS-1$
choTeam = new JComboBox();
setupTeams();
choTeam.addItemListener(this);
butCamo = new JButton();
butCamo.setPreferredSize(new Dimension(84, 72));
butCamo.setActionCommand("camo"); //$NON-NLS-1$
butCamo.addActionListener(this);
camoDialog.addItemListener(new CamoChoiceListener(camoDialog, butCamo,
this));
refreshCamos();
// If we have a camo pattern, use it. Otherwise set a background.
Image[] images = (Image[]) camoDialog.getSelectedObjects();
if (images != null) {
butCamo.setIcon(new ImageIcon(images[0]));
} else {
BufferedImage tempImage = new BufferedImage(84, 72, BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = tempImage.createGraphics();
graphics.setColor(PlayerColors.getColor(player.getColorIndex()));
graphics.fillRect(0, 0, 84, 72);
butCamo.setIcon(new ImageIcon(tempImage));
}
butInit = new JButton(Messages.getString("ChatLounge.butInit")); //$NON-NLS-1$