org.jdesktop.swingx.plaf.basic
Class BasicHyperlinkUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ButtonUI
          extended by javax.swing.plaf.basic.BasicButtonUI
              extended by org.jdesktop.swingx.plaf.basic.BasicHyperlinkUI
Direct Known Subclasses:
WindowsHyperlinkUI

public class BasicHyperlinkUI
extends BasicButtonUI

Basic implementation of the JXHyperlink UI.
This is copied from org.jdesktop.jdnc.plaf.basic.BasicLinkButtonUI


Field Summary
protected  int dashedRectGapHeight
           
protected  int dashedRectGapWidth
           
protected  int dashedRectGapX
           
protected  int dashedRectGapY
           
 
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
 
Constructor Summary
BasicHyperlinkUI()
           
 
Method Summary
static ComponentUI createUI(JComponent c)
           
protected  Color getFocusColor()
           
protected  void installDefaults(AbstractButton b)
           
protected  void installListeners(AbstractButton b)
           
 void paint(Graphics g, JComponent c)
          Paints the specified component appropriate for the look and feel.
protected  void paintButtonPressed(Graphics g, AbstractButton b)
           
protected  void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
           
protected  void paintHTMLText(Graphics g, AbstractButton b, Rectangle textRect, String text, View v)
          Method which renders the text of the current button if html.
protected  void paintText(Graphics g, AbstractButton b, Rectangle textRect, String text)
          Method which renders the text of the current button.
protected  void uninstallListeners(AbstractButton b)
           
 
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, createButtonListener, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installUI, paintIcon, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dashedRectGapX

protected int dashedRectGapX

dashedRectGapY

protected int dashedRectGapY

dashedRectGapWidth

protected int dashedRectGapWidth

dashedRectGapHeight

protected int dashedRectGapHeight
Constructor Detail

BasicHyperlinkUI

public BasicHyperlinkUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

installDefaults

protected void installDefaults(AbstractButton b)
Overrides:
installDefaults in class BasicButtonUI

installListeners

protected void installListeners(AbstractButton b)
Overrides:
installListeners in class BasicButtonUI

uninstallListeners

protected void uninstallListeners(AbstractButton b)
Overrides:
uninstallListeners in class BasicButtonUI

getFocusColor

protected Color getFocusColor()

paint

public void paint(Graphics g,
                  JComponent c)
Description copied from class: javax.swing.plaf.ComponentUI
Paints the specified component appropriate for the look and feel. This method is invoked from the ComponentUI.update method when the specified component is being painted. Subclasses should override this method and use the specified Graphics object to render the content of the component.

Overrides:
paint in class BasicButtonUI
Parameters:
g - the Graphics context in which to paint
c - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)

paintHTMLText

protected void paintHTMLText(Graphics g,
                             AbstractButton b,
                             Rectangle textRect,
                             String text,
                             View v)
Method which renders the text of the current button if html.

Parameters:
g - Graphics context
b - Current button to render
textRect - Bounding rectangle to render the text.
text - String to render
v - the View to use.

paintText

protected void paintText(Graphics g,
                         AbstractButton b,
                         Rectangle textRect,
                         String text)
Method which renders the text of the current button.

Overridden to paint the underline on rollover.

Overrides:
paintText in class BasicButtonUI
Parameters:
g - Graphics context
b - Current button to render
textRect - Bounding rectangle to render the text.
text - String to render

paintFocus

protected void paintFocus(Graphics g,
                          AbstractButton b,
                          Rectangle viewRect,
                          Rectangle textRect,
                          Rectangle iconRect)
Overrides:
paintFocus in class BasicButtonUI

paintButtonPressed

protected void paintButtonPressed(Graphics g,
                                  AbstractButton b)
Overrides:
paintButtonPressed in class BasicButtonUI