*** empty log message ***

cusax-fix
Yana Stamcheva 21 years ago
parent c1235a8d50
commit a6ce312562

@ -92,7 +92,7 @@ public static void main(String[] args){
User user = new User();
user.setProtocols(new String[]{"SIP", "ICQ", "MSN"});
MainFrame mainFrame = new MainFrame(clist, user);
mainFrame.setTitle("SIP Communicator");

@ -101,7 +101,7 @@ public class LookAndFeelConstants {
.loadImage("../resources/buttons/hangUpRollover.gif");
public static final Image STATUS_SELECTOR_BOX = LookAndFeelConstants
.loadImage("../resources/buttons/combobox.png");
.loadImage("../resources/buttons/combobox1.png");
/*=========================================================================
@ -217,7 +217,7 @@ public class LookAndFeelConstants {
* ------------------------ OTHER CONSTANTS ------------------------------
========================================================================*/
public static final int RIGHT_SHIFT_STATUS_ICON = 7;
public static final int RIGHT_SHIFT_STATUS_ICON = 2;
/**

@ -1,5 +1,6 @@
package net.java.sip.communicator.impl.gui.main;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.util.ArrayList;
@ -34,6 +35,9 @@ private void init() {
StatusSelectorBox protocolStatusCombo = new StatusSelectorBox(
protocolStatusList.toArray(), (Status)protocolStatusList.get(0));
protocolStatusCombo.setIconLeftShift (LookAndFeelConstants.
RIGHT_SHIFT_STATUS_ICON);
this.add(protocolStatusCombo);
}
}

@ -22,7 +22,11 @@ public class SIPCommButton extends JButton {
private Image bgRolloverImage;
private Image iconImage;
private int iconRightShift = 0;
private int iconLeftShift = 0;
public SIPCommButton() {
super();
@ -78,7 +82,9 @@ public void paint(Graphics g) {
g.drawImage(this.iconImage,
(this.bgImage.getWidth(null) -
this.iconImage.getWidth(null)) / 2,
this.iconImage.getWidth(null)) / 2 +
this.iconRightShift -
this.iconLeftShift,
(this.bgImage.getHeight(null) -
this.iconImage.getHeight(null)) / 2, this);
}
@ -92,26 +98,28 @@ public void paint(Graphics g) {
g.drawImage(this.iconImage,
(this.bgImage.getWidth(null) -
this.iconImage.getWidth(null)) / 2,
this.iconImage.getWidth(null)) / 2 +
this.iconRightShift -
this.iconLeftShift,
(this.bgImage.getHeight(null) -
this.iconImage.getHeight(null)) / 2, this);
}
}
}
public Image getBgImage() {
public Image getBgImage () {
return bgImage;
}
public void setBgImage(Image bgImage) {
public void setBgImage (Image bgImage) {
this.bgImage = bgImage;
}
public Image getBgRolloverImage() {
public Image getBgRolloverImage () {
return bgRolloverImage;
}
public void setBgRolloverImage(Image bgRolloverImage) {
public void setBgRolloverImage (Image bgRolloverImage) {
this.bgRolloverImage = bgRolloverImage;
}
@ -122,4 +130,20 @@ public Image getIconImage() {
public void setIconImage(Image iconImage) {
this.iconImage = iconImage;
}
public void setIconRightShift (int iconRightShift) {
this.iconRightShift = iconRightShift;
}
public void setIconLeftShift (int iconLeftShift) {
this.iconLeftShift = iconLeftShift;
}
public int getIconRightShift (int iconRightShift) {
return this.iconRightShift;
}
public int getIconLeftShift (int iconLeftShift) {
return this.iconLeftShift;
}
}

@ -20,26 +20,26 @@ public StatusIcon ( Image bgImage,
int rightShift) {
super( bgImage.getWidth(null) + rightShift,
bgImage.getHeight(null) + rightShift,
bgImage.getHeight(null),
BufferedImage.TYPE_4BYTE_ABGR);
this.bgImage = bgImage;
this.iconImage = iconImage;
this.rightShift = rightShift;
this.getGraphics().drawImage (this.bgImage, 0, rightShift/2, null);
this.getGraphics().drawImage (this.bgImage, 0, 0, null);
if (this.iconImage != null){
int x = (this.bgImage.getWidth(null) -
this.iconImage.getWidth(null)) / 2;
this.iconImage.getWidth(null)) + rightShift;
int y = (this.bgImage.getHeight(null) -
this.iconImage.getHeight(null)) / 2;
this.iconImage.getHeight(null));
this.getGraphics().drawImage ( this.iconImage,
x + rightShift,
y + rightShift,
x,
y,
null);
}
@ -59,11 +59,11 @@ public StatusIcon (Image image) {
public StatusIcon (Image image, int rightShift) {
super( image.getWidth(null) + rightShift,
image.getHeight(null) + rightShift,
image.getHeight(null),
BufferedImage.TYPE_4BYTE_ABGR);
this.bgImage = image;
this.getGraphics().drawImage (this.bgImage, 0, rightShift/2, null);
this.getGraphics().drawImage (this.bgImage, 0, 0, null);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

Loading…
Cancel
Save