public void fireChatRoomStateUpdated(final ChatRoom room) { final int index = indexOfComponent(room); if (index != -1) { SparkManager.getChatManager().notifySparkTabHandlers(room); } }
public void actionPerformed(ActionEvent actionEvent) { chatFrame.setState(Frame.NORMAL); chatFrame.setVisible(true); int tabLocation = indexOfComponent(room); if (tabLocation != -1) { setSelectedIndex(tabLocation); } } });
/** * Activates the specified ChatRoom. * * @param room the ChatRoom to activate. */ public void activateChatRoom(ChatRoom room) { int tabLocation = indexOfComponent(room); setSelectedIndex(tabLocation); chatFrame.bringFrameIntoFocus(); focusChat(); }
/** * Activates the component in tabbed pane. * * @param component the component contained within the tab to activate. */ public void activateComponent(Component component) { int tabLocation = indexOfComponent(component); if (tabLocation != -1) { setSelectedIndex(tabLocation); } chatFrame.bringFrameIntoFocus(); focusChat(); }
public void setChatRoomTitle(ChatRoom room, String title) { int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); fireChatRoomStateUpdated(room); tab.setTabTitle(room.getTabTitle()); } }
/** * Closes a tab of a room. * * @param component the component inside of the tab to close. */ public void closeTab(Component component) { int location = indexOfComponent(component); if (location == -1) { return; } if (getTabCount() == 0) { chatFrame.setTitle(""); } this.close(this.getTabAt(location)); }
int tabLoc = indexOfComponent(chatRoom); if (tabLoc != -1) { SparkManager.getChatManager().notifySparkTabHandlers(chatRoom);
final int index = indexOfComponent(comp); if (index != -1) {
int tabLocation = indexOfComponent(component); setSelectedIndex(tabLocation); int tabLocation = indexOfComponent(component); setSelectedIndex(tabLocation);
int tabLocation = indexOfComponent(chatRoom); setSelectedIndex(tabLocation); groupChatMessageCheck(chatRoom, customMsg, customMsgText, customMsgTitle); int tabLocation = indexOfComponent(chatRoom); setSelectedIndex(tabLocation); int tabLocation = indexOfComponent(chatRoom); setSelectedIndex(tabLocation);