private void removeAsBroadcast(ChatRoom room) { if (waiting) { broadcastRooms.remove(room); // Notify decorators SparkManager.getChatManager().notifySparkTabHandlers(room); waiting = false; } } });
public void fireChatRoomStateUpdated(final ChatRoom room) { final int index = indexOfComponent(room); if (index != -1) { SparkManager.getChatManager().notifySparkTabHandlers(room); } }
public void doRun() { for (ChatRoom chatRoom : getStaleChatRooms()) { // Notify decorators SparkManager.getChatManager().notifySparkTabHandlers(chatRoom); } } };
/** * Checks to see if the <code>ChatFrame</code> should stop flashing. * * @param component the component that should be notified. */ public void stopFlashing(final Component component) { SwingUtilities.invokeLater( () -> { try { // Stop the flashing SparkManager.getNativeManager().stopFlashing(chatFrame); // Notify decorators SparkManager.getChatManager().notifySparkTabHandlers(component); } catch (Exception ex) { Log.error("Could not stop flashing because " + ex.getMessage(), ex); } } ); }
public void cancelledNotification(final Jid from, final ChatState state) { SwingUtilities.invokeLater( () -> { ContactList contactList = SparkManager.getWorkspace().getContactList(); ChatRoom chatRoom; try { chatRoom = getChatContainer().getChatRoom(from.asBareJid()); if (chatRoom != null && chatRoom instanceof ChatRoomImpl) { typingNotificationList.remove(chatRoom); // Notify Decorators notifySparkTabHandlers(chatRoom); ((ChatRoomImpl)chatRoom).notifyChatStateChange(state); } } catch (ChatRoomNotFoundException e) { // Do nothing } contactList.useDefaults(from); } ); }
public void composingNotification(final Jid from) { SwingUtilities.invokeLater( () -> { final ContactList contactList = SparkManager.getWorkspace().getContactList(); ChatRoom chatRoom; try { chatRoom = getChatContainer().getChatRoom( from.asBareJid() ); if (chatRoom != null && chatRoom instanceof ChatRoomImpl) { typingNotificationList.add(chatRoom); // Notify Decorators notifySparkTabHandlers(chatRoom); ((ChatRoomImpl)chatRoom).notifyChatStateChange(ChatState.composing); } } catch (ChatRoomNotFoundException e) { // Do nothing } contactList.setIconFor(from, SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_EDIT_IMAGE)); } ); }
public void addContainerComponent(ContainerComponent comp) { createFrameIfNeeded(); addTab(comp.getTabTitle(), comp.getTabIcon(), comp.getGUI(), comp.getToolTipDescription()); chatFrame.setTitle(comp.getFrameTitle()); checkVisibility(comp.getGUI()); if (getSelectedComponent() != comp) { // Notify Decorators SparkManager.getChatManager().notifySparkTabHandlers(comp.getGUI()); } }
/** * Notification that the tab pane has been modified. Generally by changing of the tabs. * * @param e the ChangeEvent. */ public void stateChanged(ChangeEvent e) { // Stop the flashing only if the chat frame is in focus. if (chatFrame.isInFocus()) { stopFlashing(); } final Object o = getSelectedComponent(); if (o instanceof ChatRoom) { final ChatRoom room = (ChatRoom)o; focusChat(); // Set the title of the room. chatFrame.setTitle(room.getRoomTitle()); chatFrame.setIconImage(SparkManager.getMainWindow().getIconImage()); } else if (o instanceof ContainerComponent) { final ContainerComponent comp = (ContainerComponent)o; chatFrame.setTitle(comp.getFrameTitle()); chatFrame.setIconImage(comp.getTabIcon().getImage()); SparkManager.getChatManager().notifySparkTabHandlers(comp.getGUI()); } }
SparkManager.getChatManager().notifySparkTabHandlers(comp);
SparkManager.getChatManager().notifySparkTabHandlers(chatRoom);