com.alee.laf.tooltip
Class WebToolTipUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ToolTipUI
          extended by javax.swing.plaf.basic.BasicToolTipUI
              extended by com.alee.laf.tooltip.WebToolTipUI
All Implemented Interfaces:
ShapeProvider, BorderMethods, SwingMethods

public class WebToolTipUI
extends javax.swing.plaf.basic.BasicToolTipUI
implements ShapeProvider, BorderMethods

Custom UI for JTooltip component.

Author:
Mikle Garin

Constructor Summary
WebToolTipUI()
           
 
Method Summary
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
          Returns an instance of the WebToolTipUI for the specified component.
 void installUI(javax.swing.JComponent c)
          Installs UI in the specified component.
 void paint(java.awt.Graphics g, javax.swing.JComponent c)
          Paints tooltip.
 java.awt.Shape provideShape()
          Returns component shape.
 void uninstallUI(javax.swing.JComponent c)
          Uninstalls UI from the specified component.
 void updateBorder()
          Updates custom WebLaF border.
 
Methods inherited from class javax.swing.plaf.basic.BasicToolTipUI
getMaximumSize, getMinimumSize, getPreferredSize, installDefaults, installListeners, uninstallDefaults, uninstallListeners
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebToolTipUI

public WebToolTipUI()
Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
Returns an instance of the WebToolTipUI for the specified component. This tricky method is used by UIManager to create component UIs when needed.

Parameters:
c - component that will use UI instance
Returns:
instance of the WebToolTipUI

installUI

public void installUI(javax.swing.JComponent c)
Installs UI in the specified component.

Overrides:
installUI in class javax.swing.plaf.basic.BasicToolTipUI
Parameters:
c - component for this UI

uninstallUI

public void uninstallUI(javax.swing.JComponent c)
Uninstalls UI from the specified component.

Overrides:
uninstallUI in class javax.swing.plaf.basic.BasicToolTipUI
Parameters:
c - component with this UI

provideShape

public java.awt.Shape provideShape()
Returns component shape.

Specified by:
provideShape in interface ShapeProvider
Returns:
component shape

updateBorder

public void updateBorder()
Updates custom WebLaF border.

Specified by:
updateBorder in interface BorderMethods

paint

public void paint(java.awt.Graphics g,
                  javax.swing.JComponent c)
Paints tooltip.

Overrides:
paint in class javax.swing.plaf.basic.BasicToolTipUI
Parameters:
g - graphics
c - component