diff options
19 files changed, 361 insertions, 74 deletions
diff --git a/resources/colors/colorResources.properties b/resources/colors/colorResources.properties index c0f3536..6d58dca 100644 --- a/resources/colors/colorResources.properties +++ b/resources/colors/colorResources.properties @@ -107,4 +107,4 @@ splashScreenTextColor=FFFFFF splashScreenTitleColor=EAEAEA # Background color for the contact list background. -contactListBackground=EFEFEF
\ No newline at end of file +contactListBackground=FFFFFF
\ No newline at end of file diff --git a/resources/images/impl/gui/buttons/dialButtonBg.png b/resources/images/impl/gui/buttons/dialButtonBg.png Binary files differindex ef20f62..6b97008 100644 --- a/resources/images/impl/gui/buttons/dialButtonBg.png +++ b/resources/images/impl/gui/buttons/dialButtonBg.png diff --git a/resources/images/impl/gui/buttons/dialButtonRolloverBg.png b/resources/images/impl/gui/buttons/dialButtonRolloverBg.png Binary files differindex 702cbce..b3fed59 100644 --- a/resources/images/impl/gui/buttons/dialButtonRolloverBg.png +++ b/resources/images/impl/gui/buttons/dialButtonRolloverBg.png diff --git a/resources/images/impl/gui/common/mainWindowBackground.png b/resources/images/impl/gui/common/mainWindowBackground.png Binary files differnew file mode 100644 index 0000000..0032f48 --- /dev/null +++ b/resources/images/impl/gui/common/mainWindowBackground.png diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommButton.java b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommButton.java index 79ed7c9..83a6e90 100755 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommButton.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommButton.java @@ -84,10 +84,12 @@ public class SIPCommButton extends JButton { * * @param g The Graphics object. */ - public void paintComponent(Graphics g) { + public void paintComponent(Graphics g) + { AntialiasingManager.activateAntialiasing(g); - if (this.bgImage != null) { + if (this.bgImage != null) + { // If there's no icon, we make grey the backgroundImage // when disabled. if (this.iconImage == null && !isEnabled()) { diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallList.java b/src/net/java/sip/communicator/impl/gui/main/call/CallList.java index 444334b..4e77ca3 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallList.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallList.java @@ -24,17 +24,19 @@ public class CallList public CallList() { + this.setOpaque(false); + this.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); this.getSelectionModel().setSelectionMode( ListSelectionModel.SINGLE_SELECTION); this.setCellRenderer(new CallListCellRenderer()); - + this.setModel(listModel); this.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - + this.addMouseListener(this); } diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallListCellRenderer.java b/src/net/java/sip/communicator/impl/gui/main/call/CallListCellRenderer.java index adab088..1c364c9 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallListCellRenderer.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallListCellRenderer.java @@ -54,25 +54,23 @@ public class CallListCellRenderer extends JPanel super(new BorderLayout(5, 5)); - this.setBackground(Color.WHITE); - - this.setOpaque(true); - + this.setOpaque(false); + this.dataPanel.setOpaque(false); - + this.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); this.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - + this.nameLabel.setIconTextGap(2); - + this.nameLabel.setPreferredSize(new Dimension(10, 25)); - + this.nameLabel.setFont(this.getFont().deriveFont(Font.BOLD)); - + this.dataPanel.add(nameLabel, BorderLayout.CENTER); - - this.add(dataPanel, BorderLayout.CENTER); + + this.add(dataPanel, BorderLayout.CENTER); } /** diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallListPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/CallListPanel.java index c6f3699..0a50681 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallListPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallListPanel.java @@ -8,6 +8,7 @@ package net.java.sip.communicator.impl.gui.main.call; import java.awt.*; import java.awt.event.*; +import java.awt.image.*; import java.util.*; import javax.swing.*; @@ -80,13 +81,14 @@ public class CallListPanel */ private void initPanels() { - this.scrollPane.getViewport().add(callList); - + this.scrollPane.setViewport(new ScrollPaneBackground()); + this.scrollPane.getViewport().setView(callList); + this.searchPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); this.searchPanel.add(searchLabel, BorderLayout.WEST); this.searchPanel.add(searchComboBox, BorderLayout.CENTER); this.searchPanel.add(pluginPanel, BorderLayout.NORTH); - + this.add(searchPanel, BorderLayout.NORTH); this.add(scrollPane, BorderLayout.CENTER); } @@ -178,7 +180,7 @@ public class CallListPanel String allItem = Messages.getI18NString("all").getText(); - if(!comboModel.contains(allItem)) { + if(!comboModel.contains(allItem)) { searchComboBox.addItem(allItem); } @@ -266,7 +268,7 @@ public class CallListPanel new LoadLastCallsFromHistory().start(); - filteredSearch = false; + filteredSearch = false; } } @@ -380,4 +382,53 @@ public class CallListPanel this.pluginPanel.remove(c); } + + private class ScrollPaneBackground extends JViewport + { + BufferedImage bgImage; + + TexturePaint texture; + + public ScrollPaneBackground() + { + bgImage = ImageLoader.getImage(ImageLoader.MAIN_WINDOW_BACKGROUND); +// Rectangle rect +// = new Rectangle(0, 0, +// bgImage.getWidth(null), +// bgImage.getHeight(null)); + +// texture = new TexturePaint(bgImage, rect); + } + + public void paintComponent(Graphics g) + { + // do the superclass behavior first + super.paintComponent(g); + + g.setColor(new Color( + ColorResources.getColor("contactListBackground"))); + + // paint the background with the choosen color + g.fillRect(0, 0, getWidth(), getHeight()); + + // paint the image + if (bgImage != null) + { + Graphics2D g2 = (Graphics2D) g; + +// g2.setPaint(texture); + + g2.drawImage(bgImage, + this.getWidth() - bgImage.getWidth(), + this.getHeight() - bgImage.getHeight(), + this); + } + } + + public void setView(JComponent view) + { + view.setOpaque(false); + super.setView(view); + } + } } diff --git a/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java index 3d1efc6..f7398ba 100755 --- a/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/DialPanel.java @@ -9,10 +9,12 @@ package net.java.sip.communicator.impl.gui.main.call; import java.awt.*; import java.awt.event.*; +import java.awt.image.*; import javax.swing.*; import net.java.sip.communicator.impl.gui.*; +import net.java.sip.communicator.impl.gui.customcontrols.*; import net.java.sip.communicator.impl.gui.utils.*; import net.java.sip.communicator.service.audionotifier.*; import net.java.sip.communicator.service.protocol.*; @@ -34,41 +36,41 @@ public class DialPanel private JComboBox phoneNumberCombo; - private JButton oneButton = new JButton(new ImageIcon(ImageLoader - .getImage(ImageLoader.ONE_DIAL_BUTTON))); + private DialButton oneButton = new DialButton( + ImageLoader.getImage(ImageLoader.ONE_DIAL_BUTTON)); - private JButton twoButton = new JButton(new ImageIcon(ImageLoader - .getImage(ImageLoader.TWO_DIAL_BUTTON))); + private DialButton twoButton = new DialButton( + ImageLoader.getImage(ImageLoader.TWO_DIAL_BUTTON)); - private JButton threeButton = new JButton(new ImageIcon(ImageLoader - .getImage(ImageLoader.THREE_DIAL_BUTTON))); + private DialButton threeButton = new DialButton( + ImageLoader.getImage(ImageLoader.THREE_DIAL_BUTTON)); - private JButton fourButton = new JButton(new ImageIcon(ImageLoader - .getImage(ImageLoader.FOUR_DIAL_BUTTON))); + private DialButton fourButton = new DialButton( + ImageLoader.getImage(ImageLoader.FOUR_DIAL_BUTTON)); - private JButton fiveButton = new JButton(new ImageIcon(ImageLoader - .getImage(ImageLoader.FIVE_DIAL_BUTTON))); + private DialButton fiveButton = new DialButton( + ImageLoader.getImage(ImageLoader.FIVE_DIAL_BUTTON)); - private JButton sixButton = new JButton(new ImageIcon(ImageLoader - .getImage(ImageLoader.SIX_DIAL_BUTTON))); + private DialButton sixButton = new DialButton( + ImageLoader.getImage(ImageLoader.SIX_DIAL_BUTTON)); - private JButton sevenButton = new JButton(new ImageIcon(ImageLoader - .getImage(ImageLoader.SEVEN_DIAL_BUTTON))); + private DialButton sevenButton = new DialButton( + ImageLoader.getImage(ImageLoader.SEVEN_DIAL_BUTTON)); - private JButton eightButton = new JButton(new ImageIcon(ImageLoader - .getImage(ImageLoader.EIGHT_DIAL_BUTTON))); + private DialButton eightButton = new DialButton( + ImageLoader.getImage(ImageLoader.EIGHT_DIAL_BUTTON)); - private JButton nineButton = new JButton(new ImageIcon(ImageLoader - .getImage(ImageLoader.NINE_DIAL_BUTTON))); + private DialButton nineButton = new DialButton( + ImageLoader.getImage(ImageLoader.NINE_DIAL_BUTTON)); - private JButton starButton = new JButton(new ImageIcon(ImageLoader - .getImage(ImageLoader.STAR_DIAL_BUTTON))); + private DialButton starButton = new DialButton( + ImageLoader.getImage(ImageLoader.STAR_DIAL_BUTTON)); - private JButton zeroButton = new JButton(new ImageIcon(ImageLoader - .getImage(ImageLoader.ZERO_DIAL_BUTTON))); + private DialButton zeroButton = new DialButton( + ImageLoader.getImage(ImageLoader.ZERO_DIAL_BUTTON)); - private JButton diezButton = new JButton(new ImageIcon(ImageLoader - .getImage(ImageLoader.DIEZ_DIAL_BUTTON))); + private DialButton diezButton = new DialButton( + ImageLoader.getImage(ImageLoader.DIEZ_DIAL_BUTTON)); private JPanel dialPadPanel = new JPanel(new GridLayout(4, 3, 5, 5)); @@ -91,7 +93,7 @@ public class DialPanel this.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); - this.dialPadPanel.setPreferredSize(new Dimension(140, 140)); + this.dialPadPanel.setPreferredSize(new Dimension(150, 150)); this.init(); } @@ -391,4 +393,47 @@ public class DialPanel public void mouseReleased(MouseEvent e) { } + + private class DialButton extends SIPCommButton + { + /** + * Creates an instance of <tt>MsgToolbarButton</tt>. + * @param iconImage The icon to display on this button. + */ + public DialButton(Image iconImage) + { + super( ImageLoader.getImage(ImageLoader.DIAL_BUTTON_BG), + ImageLoader.getImage(ImageLoader.DIAL_BUTTON_ROLLOVER_BG), + iconImage, null); + } + } + + public void paintComponent(Graphics g) + { + // do the superclass behavior first + super.paintComponent(g); + + g.setColor(new Color( + ColorResources.getColor("contactListBackground"))); + + // paint the background with the chosen color + g.fillRect(0, 0, getWidth(), getHeight()); + + BufferedImage bgImage + = ImageLoader.getImage(ImageLoader.MAIN_WINDOW_BACKGROUND); + + // If we haven't specified a background image, we return. + if (bgImage == null) + return; + + // paint the image + Graphics2D g2 = (Graphics2D) g; + +// g2.setPaint(texture); + + g2.drawImage(bgImage, + this.getWidth() - bgImage.getWidth(), + this.getHeight() - bgImage.getHeight(), + this); + } } diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java index dab4d70..662943a 100755 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java @@ -10,6 +10,7 @@ package net.java.sip.communicator.impl.gui.main.chat; import java.awt.*; import java.awt.datatransfer.*; import java.awt.event.*; +import java.awt.image.*; import java.io.*; import java.util.*; import java.util.regex.*; @@ -121,7 +122,11 @@ public class ChatConversationPanel this.setWheelScrollingEnabled(true); - this.getViewport().add(chatEditorPane); + this.setViewport(new ScrollPaneBackground()); + + this.chatEditorPane.setOpaque(false); + + this.getViewport().setView(chatEditorPane); this.getVerticalScrollBar().setUnitIncrement(30); @@ -1127,4 +1132,53 @@ public class ChatConversationPanel } return processedMessage.toString(); } + + private class ScrollPaneBackground extends JViewport + { + BufferedImage bgImage; + + TexturePaint texture; + + public ScrollPaneBackground() + { + bgImage = ImageLoader.getImage(ImageLoader.MAIN_WINDOW_BACKGROUND); +// Rectangle rect +// = new Rectangle(0, 0, +// bgImage.getWidth(null), +// bgImage.getHeight(null)); + +// texture = new TexturePaint(bgImage, rect); + } + + public void paintComponent(Graphics g) + { + // do the superclass behavior first + super.paintComponent(g); + + g.setColor(new Color( + ColorResources.getColor("contactListBackground"))); + + // paint the background with the choosen color + g.fillRect(0, 0, getWidth(), getHeight()); + + // paint the image + if (bgImage != null) + { + Graphics2D g2 = (Graphics2D) g; + +// g2.setPaint(texture); + + g2.drawImage(bgImage, + this.getWidth() - bgImage.getWidth(), + this.getHeight() - bgImage.getHeight(), + this); + } + } + + public void setView(JComponent view) + { + view.setOpaque(false); + super.setView(view); + } + } } diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsList.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsList.java index d4897ee..2109311 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsList.java +++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsList.java @@ -52,6 +52,8 @@ public class ChatRoomsList this.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + this.setOpaque(false); + this.setModel(listModel); this.setCellRenderer(new ChatRoomsListCellRenderer()); diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListCellRenderer.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListCellRenderer.java index a75eec0..b7ef43c 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListCellRenderer.java +++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListCellRenderer.java @@ -39,9 +39,7 @@ public class ChatRoomsListCellRenderer extends JPanel { super(new BorderLayout()); - this.setBackground(Color.WHITE); - - this.setOpaque(true); + this.setOpaque(false); this.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListPanel.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListPanel.java index 17ee2c7..ce6b28f 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListPanel.java @@ -8,12 +8,14 @@ package net.java.sip.communicator.impl.gui.main.chatroomslist; import java.awt.*; import java.awt.event.*; +import java.awt.image.*; import javax.swing.*; import net.java.sip.communicator.impl.gui.main.*; import net.java.sip.communicator.impl.gui.main.chat.*; import net.java.sip.communicator.impl.gui.main.chat.conference.*; +import net.java.sip.communicator.impl.gui.utils.*; /** * The <tt>ChatRoomsListPanel</tt> is the panel that contains the @@ -44,9 +46,9 @@ public class ChatRoomsListPanel this.treePanel.add(chatRoomsList, BorderLayout.NORTH); - this.treePanel.setBackground(Color.WHITE); - - this.getViewport().add(treePanel); + this.treePanel.setOpaque(false); + this.setViewport(new ScrollPaneBackground()); + this.getViewport().setView(treePanel); this.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); @@ -111,4 +113,52 @@ public class ChatRoomsListPanel } } + private class ScrollPaneBackground extends JViewport + { + BufferedImage bgImage; + + TexturePaint texture; + + public ScrollPaneBackground() + { + bgImage = ImageLoader.getImage(ImageLoader.MAIN_WINDOW_BACKGROUND); +// Rectangle rect +// = new Rectangle(0, 0, +// bgImage.getWidth(null), +// bgImage.getHeight(null)); + +// texture = new TexturePaint(bgImage, rect); + } + + public void paintComponent(Graphics g) + { + // do the superclass behavior first + super.paintComponent(g); + + g.setColor(new Color( + ColorResources.getColor("contactListBackground"))); + + // paint the background with the choosen color + g.fillRect(0, 0, getWidth(), getHeight()); + + // paint the image + if (bgImage != null) + { + Graphics2D g2 = (Graphics2D) g; + +// g2.setPaint(texture); + + g2.drawImage(bgImage, + this.getWidth() - bgImage.getWidth(), + this.getHeight() - bgImage.getHeight(), + this); + } + } + + public void setView(JComponent view) + { + view.setOpaque(false); + super.setView(view); + } + } } diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactList.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactList.java index 57503de..8a2d30a 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactList.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactList.java @@ -85,6 +85,8 @@ public class ContactList this.setModel(listModel); + this.setOpaque(false); + this.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); this.getSelectionModel().setSelectionMode( diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java index d454dec..f701528 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java @@ -54,23 +54,23 @@ public class ContactListCellRenderer extends JPanel super(new BorderLayout()); this.mainFrame = mainFrame; - this.setBackground(Color.WHITE); buttonsPanel = new JPanel(); buttonsPanel.setLayout(new GridLayout(1, 0)); - - this.buttonsPanel.setOpaque(false); + this.buttonsPanel.setName("buttonsPanel"); - this.setOpaque(true); + this.setOpaque(false); + this.nameLabel.setOpaque(false); + this.buttonsPanel.setOpaque(false); this.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - + this.nameLabel.setIconTextGap(2); - + this.nameLabel.setPreferredSize(new Dimension(10, 17)); - - this.add(nameLabel, BorderLayout.CENTER); + + this.add(nameLabel, BorderLayout.CENTER); } /** diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java index 3c5a439..229302a 100755 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java @@ -9,6 +9,7 @@ package net.java.sip.communicator.impl.gui.main.contactlist; import java.awt.*; import java.awt.event.*; +import java.awt.image.*; import java.util.*; import javax.swing.*; @@ -62,8 +63,12 @@ public class ContactListPanel this.mainFrame = mainFrame; this.chatWindowManager = mainFrame.getChatWindowManager(); - - this.getViewport().add(treePanel); + + this.treePanel.setOpaque(false); + + this.setViewport(new ScrollPaneBackground()); + + this.getViewport().setView(treePanel); this.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); @@ -573,4 +578,53 @@ public class ContactListPanel } } } + + private class ScrollPaneBackground extends JViewport + { + BufferedImage bgImage; + + TexturePaint texture; + + public ScrollPaneBackground() + { + bgImage = ImageLoader.getImage(ImageLoader.MAIN_WINDOW_BACKGROUND); +// Rectangle rect +// = new Rectangle(0, 0, +// bgImage.getWidth(null), +// bgImage.getHeight(null)); + +// texture = new TexturePaint(bgImage, rect); + } + + public void paintComponent(Graphics g) + { + // do the superclass behavior first + super.paintComponent(g); + + g.setColor(new Color( + ColorResources.getColor("contactListBackground"))); + + // paint the background with the choosen color + g.fillRect(0, 0, getWidth(), getHeight()); + + // paint the image + if (bgImage != null) + { + Graphics2D g2 = (Graphics2D) g; + +// g2.setPaint(texture); + + g2.drawImage(bgImage, + this.getWidth() - bgImage.getWidth(), + this.getHeight() - bgImage.getHeight(), + this); + } + } + + public void setView(JComponent view) + { + view.setOpaque(false); + super.setView(view); + } + } } diff --git a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java index 25f3579..116c448 100644 --- a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java +++ b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java @@ -204,6 +204,13 @@ public class ImageLoader { * ============================APPLICATION ICONS ========================= * ----------------------------------------------------------------------- */ + + /** + * The background of the main window and chat window. + */ + public static final ImageID MAIN_WINDOW_BACKGROUND + = new ImageID("MAIN_WINDOW_BACKGROUND"); + /** * An empty 16x16 icon used for alignment. */ @@ -568,8 +575,17 @@ public class ImageLoader { public static final ImageID LEAVE_ICON = new ImageID("LEAVE_ICON"); - public static final ImageID WINDOW_LOGO - = new ImageID("WINDOW_LOGO"); + /** + * Background image of the dial button. + */ + public static final ImageID DIAL_BUTTON_BG + = new ImageID("DIAL_BUTTON_BG"); + + /** + * Background image when rollover on the dial button. + */ + public static final ImageID DIAL_BUTTON_ROLLOVER_BG + = new ImageID("DIAL_BUTTON_ROLLOVER_BG"); // ///////////////////// Edit Text Toolbar icons ////////////////////////// @@ -1050,22 +1066,30 @@ public class ImageLoader { * @param imageID The identifier of the image. * @return The image for the given identifier. */ - public static BufferedImage getImage(ImageID imageID) { + public static BufferedImage getImage(ImageID imageID) + { BufferedImage image = null; - if (loadedImages.containsKey(imageID)) { - + if (loadedImages.containsKey(imageID)) + { image = (BufferedImage) loadedImages.get(imageID); - } else { + } + else + { String path = Images.getString(imageID.getId()); - try { + if (path == null) + return null; + + try + { image = ImageIO.read(ImageLoader.class.getClassLoader() .getResource(path)); loadedImages.put(imageID, image); - - } catch (Exception exc) { + } + catch (Exception exc) + { log.error("Failed to load image:" + path, exc); } } diff --git a/src/net/java/sip/communicator/impl/gui/utils/Images.java b/src/net/java/sip/communicator/impl/gui/utils/Images.java index 716b998..a11db2e 100644 --- a/src/net/java/sip/communicator/impl/gui/utils/Images.java +++ b/src/net/java/sip/communicator/impl/gui/utils/Images.java @@ -43,7 +43,8 @@ public class Images catch (MissingResourceException exc) { logger.warn("Failed to find image for path " + key, exc); - return '!' + key + '!'; } + + return null; } } diff --git a/src/net/java/sip/communicator/impl/gui/utils/images.properties b/src/net/java/sip/communicator/impl/gui/utils/images.properties index 4453cd2..a1fbca1 100644 --- a/src/net/java/sip/communicator/impl/gui/utils/images.properties +++ b/src/net/java/sip/communicator/impl/gui/utils/images.properties @@ -62,6 +62,8 @@ TEXT_ITALIC_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/textItalicRollover TEXT_UNDERLINED_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/textUnderlinedRollover.png DIAL_BUTTON=resources/images/impl/gui/buttons/dialButton.png INVITE_DIALOG_ICON=resources/images/impl/gui/common/inviteDialogIcon.png +DIAL_BUTTON_BG=resources/images/impl/gui/buttons/dialButtonBg.png +DIAL_BUTTON_ROLLOVER_BG=resources/images/impl/gui/buttons/dialButtonRolloverBg.png MSG_TOOLBAR_BUTTON_BG=resources/images/impl/gui/buttons/msgToolbarBg.png MSG_TOOLBAR_ROLLOVER_BUTTON_BG=resources/images/impl/gui/buttons/msgToolBarRolloverBg.png @@ -188,4 +190,6 @@ LEAVE_ICON=resources/images/impl/gui/common/leave.png WINDOW_LOGO=resources/images/impl/gui/common/windowLogo.png -STATUS_SEPARATOR_ICON=resources/images/impl/gui/common/statusSeparator1.png
\ No newline at end of file +STATUS_SEPARATOR_ICON=resources/images/impl/gui/common/statusSeparator1.png + +MAIN_WINDOW_BACKGROUND=resources/images/impl/gui/common/mainWindowBackground.png
\ No newline at end of file |