SPARK-1735: MUC occupants list should have width (#196)

This commit attempts to prevent that the occupants list in a MUC
screen has a near-zero width.
This commit is contained in:
Guus der Kinderen
2016-08-20 13:05:40 +02:00
committed by wroot
parent 9b4b04b4b3
commit 1181b3feb2
2 changed files with 3 additions and 14 deletions

View File

@ -129,6 +129,7 @@ public class GroupChatParticipantList extends JPanel {
agentInfoPanel = new ImageTitlePanel(Res
.getString("message.participants.in.room"));
participantsList = new JXList(model);
participantsList.setPreferredSize( new Dimension( 200, getHeight() ));
participantsList.setCellRenderer(new ParticipantRenderer());
// Set the room to track
@ -202,6 +203,7 @@ userMap.put(displayName, userid);
if (p.getType() == Presence.Type.available) {
addParticipant(userid, p);
agentInfoPanel.setVisible(true);
groupChatRoom.validate();
} else {
removeUser(displayName);
}
@ -656,19 +658,6 @@ groupChatRoom.notifySettingsAccessRight();
}
}
/**
* Let's make sure that the panel doesn't strech past the scrollpane view
* pane.
*
* @return the preferred dimension
*/
public Dimension getPreferredSize() {
final Dimension size = super.getPreferredSize();
size.width = 150;
return size;
}
protected void checkPopup(MouseEvent evt) {
Point p = evt.getPoint();
final int index = participantsList.locationToIndex(p);

View File

@ -105,9 +105,9 @@ public class GroupChatRoom extends ChatRoom
// Room Information
roomInfo = UIComponentRegistry.createGroupChatParticipantList();
getSplitPane().setRightComponent( roomInfo.getGUI() );
getSplitPane().setResizeWeight( 0.8 );
roomInfo.setChatRoom( this );
getSplitPane().setResizeWeight( 1 );
setupListeners();