new icons added

cusax-fix
Yana Stamcheva 20 years ago
parent b490cf4a10
commit 2605a4c01f

@ -13,29 +13,40 @@
public class CallPanel extends JPanel{
private Image callButtonIcon = LookAndFeelConstants.CALL_BUTTON_ICON;
private Image hangupButtonIcon = LookAndFeelConstants.HANG_UP_BUTTON_ICON;
private Image callButtonPressedIcon = LookAndFeelConstants.CALL_PRESSED_BUTTON_BG;
private Image hangupButtonPressedIcon = LookAndFeelConstants.HANGUP_PRESSED_BUTTON_BG;
private Image callButtonBG = LookAndFeelConstants.CALL_BUTTON_BG;
private Image callButtonRolloverBG = LookAndFeelConstants.CALL_ROLLOVER_BUTTON_BG;
private Image hangupButtonBG = LookAndFeelConstants.HANGUP_BUTTON_BG;
private Image hangupButtonRolloverBG = LookAndFeelConstants.HANGUP_ROLLOVER_BUTTON_BG;
private JComboBox phoneNumberCombo = new JComboBox();
private JPanel buttonsPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
private JPanel buttonsPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 15, 5));
private SIPCommButton callButton;
private SIPCommButton hangupButton;
public CallPanel(){
super(new BorderLayout());
/*
callButton = new SIPCommButton(callButtonBG,
callButtonRolloverBG,
callButtonIcon);
hangupButton = new SIPCommButton(hangupButtonBG,
hangupButtonRolloverBG,
hangupButtonIcon);
*/
callButton = new SIPCommButton(callButtonBG,
callButtonRolloverBG,
callButtonPressedIcon,
null);
hangupButton = new SIPCommButton(hangupButtonBG,
hangupButtonRolloverBG,
hangupButtonPressedIcon,
null);
this.setBorder(BorderFactory.createEmptyBorder(10, 5, 10, 5));
this.init();
}

@ -1,23 +1,15 @@
package net.java.sip.communicator.impl.gui.main;
import java.awt.Frame;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.io.File;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JRootPane;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.plaf.metal.MetalLookAndFeel;
import javax.swing.plaf.metal.MetalTheme;
import net.java.sip.communicator.impl.gui.main.customcontrols.StatusIcon;
import com.l2fprod.gui.plaf.skin.Skin;
import com.l2fprod.gui.plaf.skin.SkinLookAndFeel;
import com.l2fprod.util.OS;
//import examples.demo;
@ -77,36 +69,36 @@ public static void main(String[] args){
} catch (Exception e) { }
//Image frameIcon =
//new ImageIcon(demo.class.getResource("windowicon.gif")).getImage();
// so option pane as same icon as us
//JOptionPane.getRootFrame().setIconImage(frameIcon);
//TODO: To be removed when the contact list service is ready
ContactList clist = new ContactList();
clist.addContact(new ContactItem("user1"));
clist.addContact(new ContactItem("user2"));
clist.addContact(new ContactItem("user3"));
ContactItem citem1 = new ContactItem("Ivancho");
ContactItem citem2 = new ContactItem("Traiancho");
ContactItem citem3 = new ContactItem("Glupancho");
citem1.setUserIcon(new ImageIcon(LookAndFeelConstants.USER_ONLINE_ICON));
citem2.setUserIcon(new ImageIcon(LookAndFeelConstants.USER_ONLINE_ICON));
citem3.setUserIcon(new ImageIcon(LookAndFeelConstants.USER_ONLINE_ICON));
clist.addContact(citem1);
clist.addContact(citem2);
clist.addContact(citem3);
User user = new User();
user.setProtocols(new String[]{"SIP", "ICQ", "MSN"});
//////////////////////////////////////////////////////////////////////
MainFrame mainFrame = new MainFrame(clist, user);
mainFrame.setTitle("SIP Communicator");
// There is a problem with the quality of the title bar icon. It's not solved.
BufferedImage iconImage = new BufferedImage(LookAndFeelConstants.SIP_LOGO.getWidth(null),
LookAndFeelConstants.ICQ_LOGO.getHeight(null),
BufferedImage.TYPE_3BYTE_BGR);
iconImage.getGraphics().drawImage(LookAndFeelConstants.SIP_LOGO, 0, 0, mainFrame);
mainFrame.setTitle("Communicator");
mainFrame.setIconImage(LookAndFeelConstants.SIP_LOGO);
mainFrame.setIconImage(iconImage);
//In order to have the same icon when using option panes
JOptionPane.getRootFrame().setIconImage(LookAndFeelConstants.SIP_LOGO);
mainFrame.pack();
mainFrame.setVisible(true);

@ -2,6 +2,8 @@
import java.awt.Image;
import javax.swing.Icon;
/**
* @author Yana Stamcheva
*
@ -15,6 +17,7 @@ public class ContactItem {
private Image photo;
private String[] protocolList;
private String status;
private Icon userIcon;
public ContactItem(String nickname){
this.nickname = nickname;
@ -51,4 +54,12 @@ public String getStatus() {
public void setStatus(String status) {
this.status = status;
}
public Icon getUserIcon() {
return userIcon;
}
public void setUserIcon(Icon userIcon) {
this.userIcon = userIcon;
}
}

@ -4,7 +4,6 @@
import java.awt.Dimension;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Vector;
import javax.swing.BoxLayout;
import javax.swing.JPanel;

@ -24,8 +24,8 @@ public class ContactPanel extends JPanel {
private boolean isMouseOver = false;
private boolean isSelected = false;
private JLabel nicknameLabel = new JLabel();
private JLabel nicknameLabel = new JLabel();
public ContactPanel(ContactItem contactItem){
super(new BorderLayout());
@ -36,16 +36,18 @@ public ContactPanel(ContactItem contactItem){
private void init(){
nicknameLabel.setFont(this.getFont().deriveFont(Font.BOLD));
this.nicknameLabel.setFont(this.getFont().deriveFont(Font.BOLD));
this.setUserData();
this.add(nicknameLabel, BorderLayout.WEST);
this.add(nicknameLabel, BorderLayout.CENTER);
}
public void setUserData(){
nicknameLabel.setText(this.contactItem.getNickName());
this.nicknameLabel.setText(this.contactItem.getNickName());
this.nicknameLabel.setIcon(this.contactItem.getUserIcon());
this.nicknameLabel.setIconTextGap(0);
}
public void paintComponent(Graphics g){

@ -8,6 +8,8 @@
import javax.swing.JButton;
import javax.swing.JPanel;
import net.java.sip.communicator.impl.gui.main.customcontrols.SIPCommButton;
/**
* @author Yana Stamcheva
*
@ -17,18 +19,53 @@
public class DialPanel extends JPanel {
private Font buttonTextFont = new Font("Verdana", Font.BOLD, 12);
private JButton oneButton = new JButton("1");
private JButton twoButton = new JButton("2");
private JButton threeButton = new JButton("3");
private JButton fourButton = new JButton("4");
private JButton fiveButton = new JButton("5");
private JButton sixButton = new JButton("6");
private JButton sevenButton = new JButton("7");
private JButton eightButton = new JButton("8");
private JButton nineButton = new JButton("9");
private JButton starButton = new JButton("*");
private JButton zeroButton = new JButton("0+");
private JButton diezButton = new JButton("#");
private SIPCommButton oneButton = new SIPCommButton
(LookAndFeelConstants.DIAL_BUTTON_BG,
LookAndFeelConstants.DIAL_BUTTON_ROLLOVER_BG);
private SIPCommButton twoButton = new SIPCommButton
(LookAndFeelConstants.DIAL_BUTTON_BG,
LookAndFeelConstants.DIAL_BUTTON_ROLLOVER_BG);
private SIPCommButton threeButton = new SIPCommButton
(LookAndFeelConstants.DIAL_BUTTON_BG,
LookAndFeelConstants.DIAL_BUTTON_ROLLOVER_BG);
private SIPCommButton fourButton = new SIPCommButton
(LookAndFeelConstants.DIAL_BUTTON_BG,
LookAndFeelConstants.DIAL_BUTTON_ROLLOVER_BG);
private SIPCommButton fiveButton = new SIPCommButton
(LookAndFeelConstants.DIAL_BUTTON_BG,
LookAndFeelConstants.DIAL_BUTTON_ROLLOVER_BG);
private SIPCommButton sixButton = new SIPCommButton
(LookAndFeelConstants.DIAL_BUTTON_BG,
LookAndFeelConstants.DIAL_BUTTON_ROLLOVER_BG);
private SIPCommButton sevenButton = new SIPCommButton
(LookAndFeelConstants.DIAL_BUTTON_BG,
LookAndFeelConstants.DIAL_BUTTON_ROLLOVER_BG);
private SIPCommButton eightButton = new SIPCommButton
(LookAndFeelConstants.DIAL_BUTTON_BG,
LookAndFeelConstants.DIAL_BUTTON_ROLLOVER_BG);
private SIPCommButton nineButton = new SIPCommButton
(LookAndFeelConstants.DIAL_BUTTON_BG,
LookAndFeelConstants.DIAL_BUTTON_ROLLOVER_BG);
private SIPCommButton starButton = new SIPCommButton
(LookAndFeelConstants.DIAL_BUTTON_BG,
LookAndFeelConstants.DIAL_BUTTON_ROLLOVER_BG);
private SIPCommButton zeroButton = new SIPCommButton
(LookAndFeelConstants.DIAL_BUTTON_BG,
LookAndFeelConstants.DIAL_BUTTON_ROLLOVER_BG);
private SIPCommButton diezButton = new SIPCommButton
(LookAndFeelConstants.DIAL_BUTTON_BG,
LookAndFeelConstants.DIAL_BUTTON_ROLLOVER_BG);
private JPanel dialPadPanel = new JPanel(new GridLayout(4, 3, 5, 5));

Loading…
Cancel
Save