Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.lookandfeel
Class SIPCommButtonUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ButtonUI
          extended by javax.swing.plaf.basic.BasicButtonUI
              extended by javax.swing.plaf.metal.MetalButtonUI
                  extended by net.java.sip.communicator.impl.gui.lookandfeel.SIPCommButtonUI
All Implemented Interfaces:
Skinnable

public class SIPCommButtonUI
extends MetalButtonUI
implements Skinnable

SIPCommButtonUI implementation.

Author:
Yana Stamcheva

Field Summary
 
Fields inherited from class javax.swing.plaf.metal.MetalButtonUI
disabledTextColor, focusColor, selectColor
 
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
 
Constructor Summary
SIPCommButtonUI()
           
 
Method Summary
static ComponentUI createUI(JComponent c)
          Creates the UI for the given JComponent.
 void installDefaults(AbstractButton b)
          Installs default configurations for the given AbstractButton.
 void loadSkin()
          Reloads buffered images.
 void paint(Graphics g, JComponent c)
          Paints this button UI.
protected  void paintButtonPressed(Graphics g, AbstractButton b)
          Overriden to do nothing.
protected  void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
          Paints the focused view of the given AbstractButton.
 void uninstallDefaults(AbstractButton b)
          Uninstalls default configurations for the given AbstractButton.
 
Methods inherited from class javax.swing.plaf.metal.MetalButtonUI
createButtonListener, getDisabledTextColor, getFocusColor, getSelectColor, paintText, update
 
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installListeners, installUI, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SIPCommButtonUI

public SIPCommButtonUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)
Creates the UI for the given JComponent.

Parameters:
c - the JComponent, for which to create an UI
Returns:
the component UI

installDefaults

public void installDefaults(AbstractButton b)
Installs default configurations for the given AbstractButton.

Overrides:
installDefaults in class MetalButtonUI
Parameters:
b - the button, for which we're installing the defaults

uninstallDefaults

public void uninstallDefaults(AbstractButton b)
Uninstalls default configurations for the given AbstractButton.

Overrides:
uninstallDefaults in class MetalButtonUI
Parameters:
b - the button, for which we're uninstalling the defaults

paint

public void paint(Graphics g,
                  JComponent c)
Paints this button UI.

Overrides:
paint in class BasicButtonUI
Parameters:
g - the Graphics object used for painting
c - the Component to paint

paintFocus

protected void paintFocus(Graphics g,
                          AbstractButton b,
                          Rectangle viewRect,
                          Rectangle textRect,
                          Rectangle iconRect)
Paints the focused view of the given AbstractButton.

Overrides:
paintFocus in class MetalButtonUI
Parameters:
g - the Graphics object used for painting
b - the button to paint
viewRect - the rectangle indicating the bounds of the focused button
textRect - the rectangle indicating the bounds of the text
iconRect - the rectangle indicating the bounds of the icon

paintButtonPressed

protected void paintButtonPressed(Graphics g,
                                  AbstractButton b)
Overriden to do nothing.

Overrides:
paintButtonPressed in class MetalButtonUI

loadSkin

public void loadSkin()
Reloads buffered images.

Specified by:
loadSkin in interface Skinnable

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.