Package org.jdesktop.swingx.plaf.basic
Class BasicHyperlinkUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ButtonUI
-
- javax.swing.plaf.basic.BasicButtonUI
-
- org.jdesktop.swingx.plaf.basic.BasicHyperlinkUI
-
public class BasicHyperlinkUI extends BasicButtonUI
Basic implementation of theJXHyperlinkUI.
This is copied from org.jdesktop.jdnc.plaf.basic.BasicLinkButtonUI
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBasicHyperlinkUI.BasicHyperlinkListenerA BasicButtonListener specialized to the needs of a Hyperlink.
-
Field Summary
Fields Modifier and Type Field Description protected intdashedRectGapHeightprotected intdashedRectGapWidthprotected intdashedRectGapXprotected intdashedRectGapY-
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
-
-
Constructor Summary
Constructors Constructor Description BasicHyperlinkUI()
-
Method Summary
-
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installUI, paintIcon, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
getAccessibleChild, getAccessibleChildrenCount, update
-
-
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installDefaults
protected void installDefaults(AbstractButton b)
- Overrides:
installDefaultsin classBasicButtonUI
-
installListeners
protected void installListeners(AbstractButton b)
- Overrides:
installListenersin classBasicButtonUI
-
uninstallListeners
protected void uninstallListeners(AbstractButton b)
- Overrides:
uninstallListenersin classBasicButtonUI
-
getFocusColor
protected Color getFocusColor()
-
paint
public void paint(Graphics g, JComponent c)
- Overrides:
paintin classBasicButtonUI
-
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 contextb- Current button to rendertextRect- Bounding rectangle to render the text.text- String to renderv- the View to use.
-
paintText
protected void paintText(Graphics g, AbstractButton b, Rectangle textRect, String text)
Overridden to paint the underline on rollover.
- Overrides:
paintTextin classBasicButtonUI
-
paintFocus
protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
- Overrides:
paintFocusin classBasicButtonUI
-
paintButtonPressed
protected void paintButtonPressed(Graphics g, AbstractButton b)
- Overrides:
paintButtonPressedin classBasicButtonUI
-
createButtonListener
protected BasicButtonListener createButtonListener(AbstractButton b)
- Overrides:
createButtonListenerin classBasicButtonUI
-
contains
public boolean contains(JComponent c, int x, int y)
Overridden to return true if the position is inside the union of the text and icon rectangle, false otherwise.
- Overrides:
containsin classComponentUI
-
getIconTextRect
protected Rectangle getIconTextRect(AbstractButton b)
C&p'ed from BasicGraphicsUtils (getPreferredButtonSize).- Parameters:
b- the button to analyse.- Returns:
- the union of the text and icon rectangle of the AbstractButton or null if the button has children (??)
-
-