mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Minor tweaks to UI.
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@4876 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
@ -165,9 +165,7 @@ public class Workspace extends JPanel implements PacketListener {
|
||||
|
||||
// Set background
|
||||
Color menuBarColor = new Color(235, 233, 237);
|
||||
setBackground(menuBarColor);
|
||||
|
||||
|
||||
setBackground(Color.white);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -48,8 +48,10 @@ import javax.swing.JWindow;
|
||||
*/
|
||||
public class ContactGroup extends CollapsiblePane implements MouseListener {
|
||||
private List<ContactItem> contactItems = new ArrayList<ContactItem>();
|
||||
private List<ContactGroup> contactGroups = new ArrayList<ContactGroup>();
|
||||
private List<ContactGroupListener> listeners = new ArrayList<ContactGroupListener>();
|
||||
|
||||
private String groupName;
|
||||
private List listeners = new ArrayList();
|
||||
private DefaultListModel model = new DefaultListModel();
|
||||
private JList list;
|
||||
private boolean sharedGroup;
|
||||
@ -60,7 +62,6 @@ public class ContactGroup extends CollapsiblePane implements MouseListener {
|
||||
|
||||
private JWindow window = new JWindow();
|
||||
|
||||
private List contactGroups = new ArrayList();
|
||||
|
||||
/**
|
||||
* Create a new ContactGroup.
|
||||
@ -168,7 +169,7 @@ public class ContactGroup extends CollapsiblePane implements MouseListener {
|
||||
*
|
||||
* @param item the ContactItem.
|
||||
*/
|
||||
public void addContactItem(ContactItem item) {
|
||||
public synchronized void addContactItem(ContactItem item) {
|
||||
if (model.getSize() == 1 && model.getElementAt(0) == noContacts) {
|
||||
model.remove(0);
|
||||
}
|
||||
@ -181,8 +182,10 @@ public class ContactGroup extends CollapsiblePane implements MouseListener {
|
||||
item.setGroupName(getGroupName());
|
||||
contactItems.add(item);
|
||||
|
||||
|
||||
Collections.sort(contactItems, itemComparator);
|
||||
|
||||
|
||||
int index = contactItems.indexOf(item);
|
||||
|
||||
|
||||
@ -319,7 +322,7 @@ public class ContactGroup extends CollapsiblePane implements MouseListener {
|
||||
* @return all ContactItems.
|
||||
*/
|
||||
public List<ContactItem> getContactItems() {
|
||||
return contactItems;
|
||||
return new ArrayList<ContactItem>(contactItems);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -556,7 +559,7 @@ public class ContactGroup extends CollapsiblePane implements MouseListener {
|
||||
/**
|
||||
* Sorts ContactItems.
|
||||
*/
|
||||
final Comparator itemComparator = new Comparator() {
|
||||
final Comparator<ContactItem> itemComparator = new Comparator() {
|
||||
public int compare(Object contactItemOne, Object contactItemTwo) {
|
||||
final ContactItem item1 = (ContactItem)contactItemOne;
|
||||
final ContactItem item2 = (ContactItem)contactItemTwo;
|
||||
|
||||
@ -500,7 +500,7 @@ public class ContactItem extends JPanel {
|
||||
public void showUserComingOnline() {
|
||||
// Change Font
|
||||
getNicknameLabel().setFont(new Font("Dialog", Font.BOLD, 11));
|
||||
getNicknameLabel().setForeground(new Color(255, 118, 6));
|
||||
getNicknameLabel().setForeground(new Color(255, 128, 0));
|
||||
}
|
||||
|
||||
public void showUserGoingOfflineOnline() {
|
||||
|
||||
Reference in New Issue
Block a user