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
|
// Set background
|
||||||
Color menuBarColor = new Color(235, 233, 237);
|
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 {
|
public class ContactGroup extends CollapsiblePane implements MouseListener {
|
||||||
private List<ContactItem> contactItems = new ArrayList<ContactItem>();
|
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 String groupName;
|
||||||
private List listeners = new ArrayList();
|
|
||||||
private DefaultListModel model = new DefaultListModel();
|
private DefaultListModel model = new DefaultListModel();
|
||||||
private JList list;
|
private JList list;
|
||||||
private boolean sharedGroup;
|
private boolean sharedGroup;
|
||||||
@ -60,7 +62,6 @@ public class ContactGroup extends CollapsiblePane implements MouseListener {
|
|||||||
|
|
||||||
private JWindow window = new JWindow();
|
private JWindow window = new JWindow();
|
||||||
|
|
||||||
private List contactGroups = new ArrayList();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new ContactGroup.
|
* Create a new ContactGroup.
|
||||||
@ -168,7 +169,7 @@ public class ContactGroup extends CollapsiblePane implements MouseListener {
|
|||||||
*
|
*
|
||||||
* @param item the ContactItem.
|
* @param item the ContactItem.
|
||||||
*/
|
*/
|
||||||
public void addContactItem(ContactItem item) {
|
public synchronized void addContactItem(ContactItem item) {
|
||||||
if (model.getSize() == 1 && model.getElementAt(0) == noContacts) {
|
if (model.getSize() == 1 && model.getElementAt(0) == noContacts) {
|
||||||
model.remove(0);
|
model.remove(0);
|
||||||
}
|
}
|
||||||
@ -181,8 +182,10 @@ public class ContactGroup extends CollapsiblePane implements MouseListener {
|
|||||||
item.setGroupName(getGroupName());
|
item.setGroupName(getGroupName());
|
||||||
contactItems.add(item);
|
contactItems.add(item);
|
||||||
|
|
||||||
|
|
||||||
Collections.sort(contactItems, itemComparator);
|
Collections.sort(contactItems, itemComparator);
|
||||||
|
|
||||||
|
|
||||||
int index = contactItems.indexOf(item);
|
int index = contactItems.indexOf(item);
|
||||||
|
|
||||||
|
|
||||||
@ -319,7 +322,7 @@ public class ContactGroup extends CollapsiblePane implements MouseListener {
|
|||||||
* @return all ContactItems.
|
* @return all ContactItems.
|
||||||
*/
|
*/
|
||||||
public List<ContactItem> getContactItems() {
|
public List<ContactItem> getContactItems() {
|
||||||
return contactItems;
|
return new ArrayList<ContactItem>(contactItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -556,7 +559,7 @@ public class ContactGroup extends CollapsiblePane implements MouseListener {
|
|||||||
/**
|
/**
|
||||||
* Sorts ContactItems.
|
* Sorts ContactItems.
|
||||||
*/
|
*/
|
||||||
final Comparator itemComparator = new Comparator() {
|
final Comparator<ContactItem> itemComparator = new Comparator() {
|
||||||
public int compare(Object contactItemOne, Object contactItemTwo) {
|
public int compare(Object contactItemOne, Object contactItemTwo) {
|
||||||
final ContactItem item1 = (ContactItem)contactItemOne;
|
final ContactItem item1 = (ContactItem)contactItemOne;
|
||||||
final ContactItem item2 = (ContactItem)contactItemTwo;
|
final ContactItem item2 = (ContactItem)contactItemTwo;
|
||||||
|
|||||||
@ -500,7 +500,7 @@ public class ContactItem extends JPanel {
|
|||||||
public void showUserComingOnline() {
|
public void showUserComingOnline() {
|
||||||
// Change Font
|
// Change Font
|
||||||
getNicknameLabel().setFont(new Font("Dialog", Font.BOLD, 11));
|
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() {
|
public void showUserGoingOfflineOnline() {
|
||||||
|
|||||||
Reference in New Issue
Block a user