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.(package private) static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected int
protected int
protected int
private Color
private static Rectangle
private static final Logger
private PropertyChangeListener
private static Rectangle
private View
private static Rectangle
Fields 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
protected Color
protected Rectangle
Cinvalid input: '&p''ed from BasicGraphicsUtils (getPreferredButtonSize).protected void
protected void
private boolean
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) private void
paintUnderline
(Graphics g, AbstractButton b, Rectangle rect, 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
-
LOG
-
viewRect
-
textRect
-
iconRect
-
dashedRectGapX
protected int dashedRectGapX -
dashedRectGapY
protected int dashedRectGapY -
dashedRectGapWidth
protected int dashedRectGapWidth -
dashedRectGapHeight
protected int dashedRectGapHeight -
focusColor
-
ulv
-
pcListener
-
-
Constructor Details
-
BasicHyperlinkUI
public BasicHyperlinkUI()
-
-
Method Details
-
createUI
-
installDefaults
- Overrides:
installDefaults
in classBasicButtonUI
-
installListeners
- Overrides:
installListeners
in classBasicButtonUI
-
uninstallListeners
- Overrides:
uninstallListeners
in classBasicButtonUI
-
getFocusColor
-
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
-
paintUnderline
-
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
-
isInside
- Parameters:
iconTextRect
-point
-- Returns:
-
getIconTextRect
Cinvalid input: '&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 (??)
-