use of org.jivesoftware.sparkplugin.ui.PhonePad in project Spark by igniterealtime.
the class RosterMemberPanel method buildTopPanel.
/**
* Builds the information block.
*
* @return the UI representing the Information Block.
*/
private JPanel buildTopPanel() {
final JPanel panel = new JPanel(new GridBagLayout());
panel.setOpaque(false);
// Add phone label
phoneLabel = new JLabel();
phoneLabel.setFont(new Font("Arial", Font.BOLD, 13));
phoneLabel.setForeground(new Color(64, 103, 162));
panel.add(phoneLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 2, 2, 2), 0, 0));
// Add Dial Pad
final RolloverButton dialPadButton = new RolloverButton(PhoneRes.getImageIcon("ICON_NUMBERPAD_IMAGE"));
panel.add(dialPadButton, new GridBagConstraints(1, 0, 1, 3, 1.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(0, 2, 2, 2), 0, 0));
final PhonePad pad = new PhonePad();
dialPadButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent actionEvent) {
pad.showDialpad(dialPadButton, true);
}
});
// Add Connected Label
connectedLabel = new JLabel(CONNECTED);
connectedLabel.setFont(new Font("Arial", Font.BOLD, 13));
connectedLabel.setHorizontalTextPosition(JLabel.CENTER);
connectedLabel.setHorizontalAlignment(JLabel.CENTER);
panel.add(connectedLabel, new GridBagConstraints(0, 1, 2, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));
return panel;
}
use of org.jivesoftware.sparkplugin.ui.PhonePad in project Spark by igniterealtime.
the class NonRosterPanel method buildDefaultUI.
private void buildDefaultUI() {
// Add Top Panel
final JPanel topPanel = buildTopPanel();
add(topPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
// Build Control Panel
final JPanel middlePanel = buildMiddlePanel();
add(middlePanel, new GridBagConstraints(0, 6, 2, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
// Build Bottom Panel
final PhonePad phonePad = new PhonePad();
historyPanel = new PreviousConversationPanel();
add(phonePad, new GridBagConstraints(0, 8, 1, 1, 0.0, 0.9, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
add(historyPanel, new GridBagConstraints(1, 8, 1, 1, 1.0, 0.9, GridBagConstraints.NORTH, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0));
// Setup default settings
setupDefaults();
uiBuilt = true;
}
Aggregations