mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
SPARK-1296 added the ChatFramToFrontListener to fix build ;)
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12281 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
committed by
holger.bergunde
parent
fae878b7e5
commit
fd7a7aa36e
@ -55,7 +55,7 @@ public class ChatFrame extends JFrame implements WindowFocusListener {
|
||||
private boolean focused;
|
||||
private JCheckBox alwaysOnTopItem;
|
||||
private ChatFrame chatFrame = this;
|
||||
private Collection<ChatFrameToFronListener> _windowToFrontListeners = new ArrayList<ChatFrameToFronListener>();
|
||||
private Collection<ChatFrameToFrontListener> _windowToFrontListeners = new ArrayList<ChatFrameToFrontListener>();
|
||||
|
||||
/**
|
||||
* Creates default ChatFrame.
|
||||
@ -252,7 +252,7 @@ public class ChatFrame extends JFrame implements WindowFocusListener {
|
||||
|
||||
|
||||
private void fireWindowOnTopListeners(boolean active) {
|
||||
for (ChatFrameToFronListener fl: _windowToFrontListeners)
|
||||
for (ChatFrameToFrontListener fl: _windowToFrontListeners)
|
||||
{
|
||||
fl.updateStatus(active);
|
||||
}
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
package org.jivesoftware.spark.ui;
|
||||
|
||||
/**
|
||||
* Interface for all chatroom that get triggered if another chatroom or part of spark changes if the chat frame should always stay on top
|
||||
* (Observer Pattern)
|
||||
* @author Holger Bergunde
|
||||
*
|
||||
*/
|
||||
public interface ChatFrameToFrontListener {
|
||||
|
||||
/**
|
||||
* Update. From now on the chat frame will stay on top, or not
|
||||
* @param active
|
||||
*/
|
||||
void updateStatus(boolean active);
|
||||
|
||||
/**
|
||||
* the observer should register on this chatframe component
|
||||
* @param chatframe
|
||||
*/
|
||||
void registeredToFrame(ChatFrame chatframe);
|
||||
}
|
||||
@ -84,7 +84,7 @@ import org.jivesoftware.sparkimpl.settings.local.SettingsManager;
|
||||
/**
|
||||
* The base implementation of all ChatRoom conversations. You would implement this class to have most types of Chat.
|
||||
*/
|
||||
public abstract class ChatRoom extends BackgroundPanel implements ActionListener, PacketListener, DocumentListener, ConnectionListener, FocusListener, ContextMenuListener, ChatFrameToFronListener {
|
||||
public abstract class ChatRoom extends BackgroundPanel implements ActionListener, PacketListener, DocumentListener, ConnectionListener, FocusListener, ContextMenuListener, ChatFrameToFrontListener {
|
||||
private static final long serialVersionUID = 7981019929515888299L;
|
||||
private final JPanel chatPanel;
|
||||
private final JSplitPane splitPane;
|
||||
|
||||
Reference in New Issue
Block a user