Пример #1
0
  /** Removes the room that is currently selected. */
  void removeSelectedRoom() {
    ChatRoomWrapper chatRoomWrapper = chatRoomsTableModel.getValueAt(chatRoomList.getSelectedRow());

    ConferenceChatManager conferenceManager =
        GuiActivator.getUIService().getConferenceChatManager();
    conferenceManager.removeChatRoom(chatRoomWrapper);
  }
Пример #2
0
  /** Initializes the chat rooms list interface. */
  private void initChatRoomList() {
    this.chatRoomsTableModel = new ChatRoomTableModel(chatRoomList);

    this.chatRoomList.addMouseListener(this);

    this.chatRoomList.setDefaultRenderer(
        ProtocolProviderService.class, new ProtocolProviderTableCellRenderer());
    this.chatRoomList.setDefaultRenderer(ChatRoomWrapper.class, new ChatRoomTableCellRenderer());

    this.chatRoomList.setOpaque(false);
    this.chatRoomList.setModel(chatRoomsTableModel);

    ConferenceChatManager confChatManager = GuiActivator.getUIService().getConferenceChatManager();

    confChatManager.addChatRoomListChangeListener(chatRoomsTableModel);

    //        this.chatRoomList.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
    //        this.chatRoomList.getColumnModel().getColumn(0).setMinWidth(250);
    //        this.chatRoomList.getColumnModel().getColumn(1).setMinWidth(250);
    //        this.chatRoomList.getColumnModel().getColumn(2).setPreferredWidth(50);
  }