mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Removing webrender eval.
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@6623 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
BIN
build/lib/dist/corecomponents-win.jar
vendored
BIN
build/lib/dist/corecomponents-win.jar
vendored
Binary file not shown.
@ -8,7 +8,7 @@
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../src/java" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../target" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="JDK 1.5.0" jdkType="JavaSDK" />
|
||||
<orderEntry type="jdk" jdkName="1.6" jdkType="JavaSDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library>
|
||||
@ -181,15 +181,6 @@
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../lib/dist/corecomponents-win.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
@ -199,15 +190,6 @@
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../lib/dist/syntheticaBlueMoon.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
@ -217,6 +199,15 @@
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../lib/dist/syntheticaBlueMoon.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntryProperties />
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
|
||||
@ -14,7 +14,6 @@ import org.jivesoftware.MainWindow;
|
||||
import org.jivesoftware.Spark;
|
||||
import org.jivesoftware.resource.Res;
|
||||
import org.jivesoftware.resource.SparkRes;
|
||||
import org.jivesoftware.resource.Default;
|
||||
import org.jivesoftware.smack.PacketListener;
|
||||
import org.jivesoftware.smack.filter.AndFilter;
|
||||
import org.jivesoftware.smack.filter.FromContainsFilter;
|
||||
@ -46,9 +45,9 @@ import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.JTabbedPane;
|
||||
import javax.swing.KeyStroke;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.JTabbedPane;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
|
||||
@ -58,10 +57,6 @@ import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.awt.Frame;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Image;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.geom.AffineTransform;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.MouseAdapter;
|
||||
@ -102,7 +97,9 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
* Creates the ChatRooms to hold all ChatRooms.
|
||||
*/
|
||||
public ChatContainer() {
|
||||
// Have the chat start at the bottom.
|
||||
super(JTabbedPane.BOTTOM);
|
||||
|
||||
// Set minimum size
|
||||
setMinimumSize(new Dimension(400, 200));
|
||||
// Don't allow tabs to shrink and allow scrolling.
|
||||
@ -135,12 +132,9 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
this.setFocusable(false);
|
||||
|
||||
setOpaque(true);
|
||||
|
||||
setBackground(Color.white);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Adds navigation capability to chat rooms. Users can navigate using the alt-left or right arrow keys.
|
||||
*/
|
||||
@ -182,8 +176,10 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
}
|
||||
});
|
||||
|
||||
this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ctrl W"), "escape");
|
||||
this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "escape");
|
||||
this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("Ctrl W"), "escape");
|
||||
this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control W"), "escape");
|
||||
|
||||
|
||||
this.getActionMap().put("escape", new AbstractAction("escape") {
|
||||
public void actionPerformed(ActionEvent evt) {
|
||||
@ -196,7 +192,7 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
String appleString = org.jivesoftware.spark.util.StringUtils.keyStroke2String(appleStroke);
|
||||
|
||||
// Handle Apple Key W
|
||||
this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(appleString + "w"), "appleStroke");
|
||||
this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(appleString + " W"), "appleStroke");
|
||||
this.getActionMap().put("appleStroke", new AbstractAction("appleStroke") {
|
||||
public void actionPerformed(ActionEvent evt) {
|
||||
closeActiveRoom();
|
||||
@ -220,7 +216,7 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
*
|
||||
* @param room the ChatRoom to add.
|
||||
*/
|
||||
public synchronized void addChatRoom(final ChatRoom room) {
|
||||
public void addChatRoom(final ChatRoom room) {
|
||||
createFrameIfNeeded();
|
||||
|
||||
room.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, Color.LIGHT_GRAY));
|
||||
@ -251,7 +247,7 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
tooltip = "<html><body><b>Contact: </b>" + nickname + "<br><b>JID: </b>" + tooltip;
|
||||
}
|
||||
else {
|
||||
tooltip = room.getRoomname();
|
||||
tooltip = ((GroupChatRoom)room).getRoomname();
|
||||
}
|
||||
|
||||
// Create ChatRoom UI and dock
|
||||
@ -274,7 +270,7 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
chatFrame.setTitle(room.getRoomTitle());
|
||||
}
|
||||
|
||||
final SwingWorker visibilityThread = new SwingWorker() {
|
||||
SwingWorker worker = new SwingWorker() {
|
||||
public Object construct() {
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
@ -290,15 +286,13 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
}
|
||||
};
|
||||
|
||||
visibilityThread.start();
|
||||
worker.start();
|
||||
|
||||
// Add to ChatRoomList
|
||||
chatRoomList.add(room);
|
||||
|
||||
// Notify users that the chat room has been opened.
|
||||
fireChatRoomOpened(room);
|
||||
|
||||
// Focus Chat
|
||||
focusChat();
|
||||
}
|
||||
|
||||
@ -383,25 +377,7 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
flashWindow(chatRoom);
|
||||
}
|
||||
else if (!chatFrame.isVisible()) {
|
||||
if (Spark.isWindows()) {
|
||||
chatFrame.setFocusableWindowState(false);
|
||||
chatFrame.setState(Frame.ICONIFIED);
|
||||
}
|
||||
chatFrame.setVisible(true);
|
||||
|
||||
// Set to new tab.
|
||||
int tabLocation = indexOfComponent(chatRoom);
|
||||
setSelectedIndex(tabLocation);
|
||||
|
||||
// If the ContactList is in the tray, we need better notification by flashing
|
||||
// the chatframe.
|
||||
if (!SparkManager.getMainWindow().isVisible()) {
|
||||
flashWindow(chatRoom);
|
||||
}
|
||||
else if (chatFrame.getState() == Frame.ICONIFIED) {
|
||||
flashWindow(chatRoom);
|
||||
}
|
||||
|
||||
handleHiddenChatFrame(chatRoom);
|
||||
}
|
||||
}
|
||||
|
||||
@ -422,12 +398,17 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
}
|
||||
|
||||
fireChatRoomClosed(room);
|
||||
|
||||
room.removeMessageListener(this);
|
||||
|
||||
// Remove mappings
|
||||
presenceMap.remove(room.getRoomname());
|
||||
|
||||
chatRoomList.remove(room);
|
||||
|
||||
// Cleanup
|
||||
room.getTranscriptWindow().clear();
|
||||
room.getTranscripts().clear();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -602,6 +583,9 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
}
|
||||
|
||||
private void handleMessageNotification(final ChatRoom chatRoom) {
|
||||
if (true) {
|
||||
return;
|
||||
}
|
||||
ChatRoom activeChatRoom = null;
|
||||
try {
|
||||
activeChatRoom = getActiveChatRoom();
|
||||
@ -639,31 +623,33 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
startFlashing(chatRoom);
|
||||
}
|
||||
else if (!chatFrame.isVisible()) {
|
||||
if (Spark.isWindows()) {
|
||||
chatFrame.setFocusableWindowState(false);
|
||||
chatFrame.setState(Frame.ICONIFIED);
|
||||
}
|
||||
chatFrame.setVisible(true);
|
||||
|
||||
// Set to new tab.
|
||||
int tabLocation = indexOfComponent(chatRoom);
|
||||
setSelectedIndex(tabLocation);
|
||||
|
||||
// If the ContactList is in the tray, we need better notification by flashing
|
||||
// the chatframe.
|
||||
if (!SparkManager.getMainWindow().isVisible()) {
|
||||
startFlashing(chatRoom);
|
||||
}
|
||||
else if (chatFrame.getState() == Frame.ICONIFIED) {
|
||||
startFlashing(chatRoom);
|
||||
}
|
||||
|
||||
handleHiddenChatFrame(chatRoom);
|
||||
}
|
||||
else if (chatRoom != activeChatRoom) {
|
||||
startFlashing(chatRoom);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleHiddenChatFrame(ChatRoom chatRoom) {
|
||||
int tabLocation = indexOfComponent(chatRoom);
|
||||
setSelectedIndex(tabLocation);
|
||||
if (Spark.isWindows()) {
|
||||
chatFrame.setFocusableWindowState(false);
|
||||
chatFrame.setState(Frame.ICONIFIED);
|
||||
}
|
||||
|
||||
chatFrame.setVisible(true);
|
||||
|
||||
// If the ContactList is in the tray, we need better notification by flashing
|
||||
// the chatframe.
|
||||
if (!SparkManager.getMainWindow().isVisible()) {
|
||||
flashWindow(chatRoom);
|
||||
}
|
||||
else if (chatFrame.getState() == Frame.ICONIFIED) {
|
||||
flashWindow(chatRoom);
|
||||
}
|
||||
}
|
||||
|
||||
public void messageSent(ChatRoom room, Message message) {
|
||||
useTabDefault(room);
|
||||
}
|
||||
@ -685,7 +671,6 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
|
||||
// Set the title of the room.
|
||||
chatFrame.setTitle(room.getRoomTitle());
|
||||
chatFrame.setIconImage(SparkManager.getMainWindow().getIconImage());
|
||||
}
|
||||
catch (ChatRoomNotFoundException e1) {
|
||||
// Ignore
|
||||
@ -977,8 +962,14 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
if (room instanceof ChatRoomImpl) {
|
||||
final ChatRoomImpl chatRoomImpl = (ChatRoomImpl)room;
|
||||
if (!chatRoomImpl.isIconHandler()) {
|
||||
Presence presence = chatRoomImpl.getPresence();
|
||||
Icon icon = SparkManager.getUserManager().getTabIconForPresence(presence);
|
||||
Icon icon = chatRoomImpl.getAlternativeIcon();
|
||||
|
||||
// if an alternative icon is not used, get the icon based on the users
|
||||
// presence.
|
||||
if (icon == null) {
|
||||
Presence presence = chatRoomImpl.getPresence();
|
||||
icon = SparkManager.getUserManager().getTabIconForPresence(presence);
|
||||
}
|
||||
tab.setIcon(icon);
|
||||
}
|
||||
}
|
||||
@ -1086,6 +1077,7 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
|
||||
// Set the title of the room.
|
||||
chatFrame.setTitle(room.getRoomTitle());
|
||||
chatFrame.setIconImage(SparkManager.getMainWindow().getIconImage());
|
||||
}
|
||||
catch (ChatRoomNotFoundException e1) {
|
||||
}
|
||||
@ -1095,6 +1087,9 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
public void windowDeactivated(WindowEvent windowEvent) {
|
||||
}
|
||||
|
||||
public void windowClosing(WindowEvent e) {
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Start timer
|
||||
@ -1106,7 +1101,7 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
SwingWorker worker = new SwingWorker() {
|
||||
public Object construct() {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
Thread.sleep(50);
|
||||
}
|
||||
catch (InterruptedException e1) {
|
||||
Log.error(e1);
|
||||
|
||||
@ -49,6 +49,7 @@ import javax.swing.text.Document;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
@ -125,6 +126,21 @@ public abstract class ChatRoom extends BackgroundPanel implements ActionListener
|
||||
}
|
||||
});
|
||||
|
||||
chatAreaButton = new ChatAreaSendField(SparkRes.getString(SparkRes.SEND)) {
|
||||
public Dimension getPreferredSize() {
|
||||
Dimension dim = super.getPreferredSize();
|
||||
|
||||
int windowHeight = getChatRoom().getHeight();
|
||||
|
||||
if (dim.getHeight() > windowHeight - 200) {
|
||||
dim.height = windowHeight - 200;
|
||||
}
|
||||
|
||||
return dim;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
textScroller = new JScrollPane(transcriptWindow);
|
||||
|
||||
textScroller.getVerticalScrollBar().addMouseListener(new MouseAdapter() {
|
||||
@ -140,8 +156,6 @@ public abstract class ChatRoom extends BackgroundPanel implements ActionListener
|
||||
textScroller.setBackground(transcriptWindow.getBackground());
|
||||
textScroller.getViewport().setBackground(Color.white);
|
||||
|
||||
chatAreaButton = new ChatAreaSendField(SparkRes.getString(SparkRes.SEND));
|
||||
|
||||
getChatInputEditor().setSelectedTextColor((Color)UIManager.get("ChatInput.SelectedTextColor"));
|
||||
getChatInputEditor().setSelectionColor((Color)UIManager.get("ChatInput.SelectionColor"));
|
||||
|
||||
@ -404,6 +418,8 @@ public abstract class ChatRoom extends BackgroundPanel implements ActionListener
|
||||
else {
|
||||
chatAreaButton.getButton().setEnabled(false);
|
||||
}
|
||||
|
||||
verticalSplit.setDividerLocation(-1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user