Added jabber animated Icon

cusax-fix
Damian Minkov 19 years ago
parent caa9270994
commit 0b408767c8

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -24,7 +24,7 @@
/**
* All look and feel related constants are stored here.
*
*
* @author Yana Stamcheva
*/
@ -43,24 +43,24 @@ public class Constants {
* a contact.
*/
public static boolean REMOVE_CONTACT_ASK = true;
/**
* Indicates whether the message automatic popup is enabled.
*/
public static boolean AUTO_POPUP_NEW_MESSAGE = true;
/**
* Indicates the number of messages to show in the chat area when a new
* chat is opened.
*/
public static int CHAT_HISTORY_SIZE = 10;
/*
* ===================================================================
* ------------------------ MESSAGE TYPES ---------------------------
* ===================================================================
*/
/**
* The outging message type.
*/
@ -70,7 +70,7 @@ public class Constants {
* The incoming message type.
*/
public static final String INCOMING_MESSAGE = "IncomingMessage";
/**
* The system message type.
*/
@ -80,12 +80,12 @@ public class Constants {
* The history incoming message type.
*/
public static final String HISTORY_INCOMING_MESSAGE = "HistoryIncomingMessage";
/**
* The history outgoing message type.
*/
public static final String HISTORY_OUTGOING_MESSAGE = "HistoryOutgoingMessage";
/*
* ===================================================================
* ------------------------ SIZE CONSTANTS ---------------------------
@ -101,7 +101,7 @@ public class Constants {
* The minimum width of the main application window.
*/
public static final int MAINFRAME_MIN_WIDTH = 80;
/**
* The size of the gradient used for painting the selected background of
* some components.
@ -171,14 +171,14 @@ public class Constants {
= new Color(209, 212, 225);
/**
* The start color used to paint a gradient mouse over background of some
* The start color used to paint a gradient mouse over background of some
* components.
*/
public static final Color MOVER_START_COLOR = new Color(230,
230, 230);
/**
* The end color used to paint a gradient mouse over background of some
* The end color used to paint a gradient mouse over background of some
* components.
*/
public static final Color MOVER_END_COLOR = new Color(255,
@ -229,7 +229,7 @@ public class Constants {
*/
public static final Font FONT = new Font(Constants.FONT_NAME, Font.PLAIN,
new Integer(Constants.FONT_SIZE).intValue());
/*
* ======================================================================
* ------------------------ PROTOCOL NAMES -------------------------------
@ -280,11 +280,11 @@ public class Constants {
* window".
*/
public static final boolean TABBED_CHAT_WINDOW = true;
/**
* The default path, where chat window styles could be found.
*/
public static final String DEFAULT_STYLE_PATH
public static final String DEFAULT_STYLE_PATH
= "net/java/sip/communicator/impl/gui/resources/styles";
/*
@ -304,10 +304,10 @@ public class Constants {
specialCharsList.add(new Integer(KeyEvent.VK_LEFT));
specialCharsList.add(new Integer(KeyEvent.VK_RIGHT));
};
/**
* Checks if the given char is in the list of application special chars.
*
*
* @param charCode The char code.
*/
public static boolean isSpecialChar(int charCode) {
@ -316,7 +316,7 @@ public static boolean isSpecialChar(int charCode) {
else
return false;
}
/**
* Gets the protocol logo icon in size 16x16.
* @param protocolName The protocol name.
@ -354,7 +354,7 @@ public static Image getProtocolIcon(String protocolName) {
return protocolIcon;
}
/**
* Gets the protocol logo icon in size 32x32.
* @param protocolName The protocol name.
@ -400,7 +400,7 @@ public static Image getProtocolBigIcon(String protocolName) {
* contains.
*/
public static BufferedImage[] getProtocolAnimatedIcon(String protocolName) {
if (protocolName.equals(Constants.SIP)) {
return null;
}
@ -422,7 +422,7 @@ else if (protocolName.equals(Constants.YAHOO)) {
}
else if (protocolName.equals(Constants.JABBER)) {
return ImageLoader.getAnimatedImage(
ImageLoader.ICQ_CONNECTING);
ImageLoader.JABBER_CONNECTING);
}
else if (protocolName.equals(Constants.SKYPE)) {
return ImageLoader.getAnimatedImage(
@ -436,12 +436,12 @@ else if (protocolName.equals(Constants.SKYPE)) {
/**
* Returns the image corresponding to the given presence status.
* @param status The presence status.
* @param status The presence status.
* @return the image corresponding to the given presence status.
*/
public static BufferedImage getStatusIcon(PresenceStatus status) {
int connectivity = status.getStatus();
if(connectivity < 20) {
return ImageLoader
.getImage(ImageLoader.USER_OFFLINE_ICON);
@ -468,11 +468,11 @@ else if(connectivity > 80 && connectivity < 100) {
* Loads a chat window style.
*/
public static void loadAdiumStyle(){
File is = new File(Constants.class.getClassLoader()
.getResource(DEFAULT_STYLE_PATH + "/TotallyClear").toString());
}
/**
* Temporary method to load the css style used in the chat window.
* @param style

@ -741,6 +741,12 @@ public class ImageLoader {
*/
public static final ImageID JABBER_32x32 = new ImageID("JABBER_32x32");
/**
* The JABBER "connecting" 16x16 animated icon.
*/
public static final ImageID JABBER_CONNECTING = new ImageID("JABBER_CONNECTING");
/**
* The Jabber logo 16x16 icon.
*/
@ -965,7 +971,7 @@ public static BufferedImage getImage(ImageID imageID) {
image = (BufferedImage) loadedImages.get(imageID);
} else {
String path = Images.getString(imageID.getId());
try {
image = ImageIO.read(ImageLoader.class.getClassLoader()
.getResource(path));
@ -999,14 +1005,14 @@ public static byte[] getImageInBytes(ImageID imageID) {
return image;
}
/**
* Loads an image from a given bytes array.
* @param imageBytes The bytes array to load the image from.
* @return The image for the given bytes array.
*/
public static Image getBytesInImage(byte[] imageBytes) {
Image image = null;
try {
image = ImageIO.read(
@ -1024,7 +1030,7 @@ public static Image getBytesInImage(byte[] imageBytes) {
* @return A BufferedImage array containing the animated image.
*/
public static BufferedImage[] getAnimatedImage(ImageID imageID) {
String path = Images.getString(imageID.getId());
URL url = ImageLoader.class.getClassLoader().getResource(path);

@ -104,6 +104,7 @@ AIM_LOGO=net/java/sip/communicator/impl/gui/resources/protocols/aim/Aim16.png
YAHOO_32x32=net/java/sip/communicator/impl/gui/resources/protocols/yahoo/Yahoo.png
YAHOO_LOGO=net/java/sip/communicator/impl/gui/resources/protocols/yahoo/Yahoo16.png
JABBER_32x32=net/java/sip/communicator/impl/gui/resources/protocols/jabber/Jabber2.png
JABBER_CONNECTING=net/java/sip/communicator/impl/gui/resources/protocols/jabber/jabber16x16-connecting.gif
JABBER_LOGO=net/java/sip/communicator/impl/gui/resources/protocols/jabber/Jabber16.png
SKYPE_32x32=net/java/sip/communicator/impl/gui/resources/protocols/skype/Skype.png
SKYPE_LOGO=net/java/sip/communicator/impl/gui/resources/protocols/skype/Skype16.png
@ -164,4 +165,4 @@ SCROLLBAR_THUMB_VERTICAL=net/java/sip/communicator/impl/gui/resources/lookandfee
ADD_CONTACT_WIZARD_ICON=net/java/sip/communicator/impl/gui/resources/common/addContactWizardIcon.png
RENAME_DIALOG_ICON=net/java/sip/communicator/impl/gui/resources/common/renameDialogIcon.png
BROWSER_ICON=net/java/sip/communicator/impl/gui/resources/common/browser16x16.png
BROWSER_ICON=net/java/sip/communicator/impl/gui/resources/common/browser16x16.png

Loading…
Cancel
Save