/**
* Initializes all components in this panel.
*/
private void initComponents()
{
JPanel mainPanel = new TransparentPanel(new BorderLayout(10, 0));
mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
// disable html rendering
callLabelDisplayName.putClientProperty("html.disable", Boolean.TRUE);
callLabelAddress.putClientProperty("html.disable", Boolean.TRUE);
callLabelImage.putClientProperty("html.disable", Boolean.TRUE);
JComponent buttonsPanel = new CallToolBar(false, true);
callButton = new SIPCommButton();
if(mergeCall)
mergeCallButton = new SIPCommButton();
if(video)
videoCallButton = new SIPCommButton();
hangupButton = new SIPCommButton();
callButton.setName(CALL_BUTTON);
hangupButton.setName(HANGUP_BUTTON);
callButton.addActionListener(this);
if(mergeCall)
{
mergeCallButton.setName(CONF_CALL_BUTTON);
mergeCallButton.addActionListener(this);
}
hangupButton.addActionListener(this);
if(video)
{
videoCallButton.setName(VIDEO_CALL_BUTTON);
videoCallButton.addActionListener(this);
}
preCallWindow.add(mainPanel);
mainPanel.add(callLabelImage, BorderLayout.WEST);
JPanel labelsPanel = new TransparentPanel();
labelsPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
labelsPanel.setLayout(new BoxLayout(labelsPanel, BoxLayout.Y_AXIS));
callLabelDisplayName.setAlignmentX(JLabel.LEFT_ALIGNMENT);
labelsPanel.add(callLabelDisplayName);
labelsPanel.add(Box.createVerticalStrut(3));
callLabelAddress.setAlignmentX(JLabel.LEFT_ALIGNMENT);
labelsPanel.add(callLabelAddress);
if (accountsCombo != null)
{
labelsPanel.add(Box.createVerticalStrut(3));
accountsCombo.setAlignmentX(JLabel.LEFT_ALIGNMENT);
labelsPanel.add(accountsCombo);
}
mainPanel.add(labelsPanel, BorderLayout.CENTER);
// Loads skin resources.
loadSkin();
JPanel rightPanel = new TransparentPanel(
new FlowLayout(FlowLayout.CENTER, 0, 0));
rightPanel.setBorder(BorderFactory.createEmptyBorder(6, 0, 0, 0));
buttonsPanel.add(callButton);
if(mergeCall)
buttonsPanel.add(mergeCallButton);
if(video)
buttonsPanel.add(videoCallButton);
buttonsPanel.add(hangupButton);
rightPanel.add(buttonsPanel);
mainPanel.add(rightPanel, BorderLayout.EAST);
}