Makes the 'Exit Full Screen' button displayed in the full-screen window (depicting the video in a call) look like the 'Hold' and 'Mute' buttons. It looks a touch differently because it has a roll-over effect and the other two don't (probably becuase it's SIPCommButton and the other two are SIPCommToggleButton) but that's much harder to notice than before when it used to be rendered with a completely different look.

cusax-fix
Lyubomir Marinov 17 years ago
parent 48f991af23
commit 4a27a25686

@ -27,29 +27,30 @@ public class SIPCommButton
{
private Image bgImage;
private Image pressedImage;
private final Image pressedImage;
private Image iconImage;
private final Image iconImage;
/**
* Creates a button with custom background image and icon image.
*
* @param bgImage The background image.
* @param pressedImage
* @param iconImage The icon.
*/
public SIPCommButton( Image bgImage,
Image pressedImage,
Image iconImage)
{
super();
MouseRolloverHandler mouseHandler = new MouseRolloverHandler();
this.addMouseListener(mouseHandler);
this.addMouseMotionListener(mouseHandler);
// Explicitly remove all borders that may be set from the current
// look and feel.
/*
* Explicitly remove all borders that may be set from the current look
* and feel.
*/
this.setBorder(null);
this.setContentAreaFilled(false);
@ -222,7 +223,7 @@ public void setBackgroundImage(Image bgImage)
this.bgImage = bgImage;
}
protected class ButtonRepaintCallback implements FadeTrackerCallback
private class ButtonRepaintCallback implements FadeTrackerCallback
{
public void fadeEnded(FadeKind arg0)
{
@ -248,16 +249,16 @@ public void run()
public void fadeReversed(FadeKind arg0, boolean arg1, float arg2)
{
}
}
protected class MouseRolloverHandler
private class MouseRolloverHandler
implements MouseListener,
MouseMotionListener
{
public void mouseMoved(MouseEvent e)
{}
{
}
public void mouseExited(MouseEvent e)
{
@ -275,7 +276,8 @@ public void mouseExited(MouseEvent e)
}
public void mouseClicked(MouseEvent e)
{}
{
}
public void mouseEntered(MouseEvent e)
{
@ -293,12 +295,15 @@ public void mouseEntered(MouseEvent e)
}
public void mousePressed(MouseEvent e)
{}
{
}
public void mouseReleased(MouseEvent e)
{}
{
}
public void mouseDragged(MouseEvent e)
{}
{
}
}
}

@ -745,8 +745,10 @@ public void actionPerformed(ActionEvent event)
private Component createExitFullScreenButton()
{
JButton button =
new JButton(new ImageIcon(ImageLoader
.getImage(ImageLoader.EXIT_FULL_SCREEN_BUTTON)));
new SIPCommButton(
ImageLoader.getImage(ImageLoader.CALL_SETTING_BUTTON_BG),
ImageLoader.getImage(ImageLoader.CALL_SETTING_BUTTON_PRESSED_BG),
ImageLoader.getImage(ImageLoader.EXIT_FULL_SCREEN_BUTTON));
button.setToolTipText(GuiActivator.getResources().getI18NString(
"service.gui.EXIT_FULL_SCREEN_TOOL_TIP"));

Loading…
Cancel
Save