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
Basic implementation of the
This is copied from org.jdesktop.jdnc.plaf.basic.BasicLinkButtonUI
JXHyperlink
UI. This is copied from org.jdesktop.jdnc.plaf.basic.BasicLinkButtonUI
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A BasicButtonListener specialized to the needs of a Hyperlink. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
TODO docprotected int
TODO docprotected int
TODO docprotected int
TODO docFields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(JComponent c, int x, int y) protected BasicButtonListener
static ComponentUI
factory methodprotected Color
get focus Colorprotected Rectangle
pasted from BasicGraphicsUtils (getPreferredButtonSize).protected void
protected void
void
paint
(Graphics g, JComponent c) protected void
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) protected void
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
-
Field Details
-
dashedRectGapX
protected int dashedRectGapXTODO doc -
dashedRectGapY
protected int dashedRectGapYTODO doc -
dashedRectGapWidth
protected int dashedRectGapWidthTODO doc -
dashedRectGapHeight
protected int dashedRectGapHeightTODO doc
-
-
Constructor Details
-
BasicHyperlinkUI
public BasicHyperlinkUI()
-
-
Method Details
-
createUI
factory method- Parameters:
c
- not used- Returns:
- instance of BasicHyperlinkUI
-
installDefaults
- Overrides:
installDefaults
in classBasicButtonUI
-
installListeners
- Overrides:
installListeners
in classBasicButtonUI
-
uninstallListeners
- Overrides:
uninstallListeners
in classBasicButtonUI
-
getFocusColor
get focus Color- Returns:
- Color
-
paint
- Overrides:
paint
in classBasicButtonUI
-
paintHTMLText
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
Overridden to paint the underline on rollover.
- Overrides:
paintText
in classBasicButtonUI
-
paintFocus
protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect) - Overrides:
paintFocus
in classBasicButtonUI
-
paintButtonPressed
- Overrides:
paintButtonPressed
in classBasicButtonUI
-
createButtonListener
- Overrides:
createButtonListener
in classBasicButtonUI
-
contains
Overridden to return true if the position is inside the union of the text and icon rectangle, false otherwise.
- Overrides:
contains
in classComponentUI
-
getIconTextRect
pasted 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 (??)
-