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 classA BasicButtonListener specialized to the needs of a Hyperlink.(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected intprotected intprivate Colorprivate static Rectangleprivate static final Loggerprivate PropertyChangeListenerprivate static Rectangleprivate Viewprivate static RectangleFields inherited from class BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(JComponent c, int x, int y) protected BasicButtonListenerstatic ComponentUIprotected Colorprotected RectangleCinvalid input: '&p''ed from BasicGraphicsUtils (getPreferredButtonSize).protected voidprotected voidprivate booleanvoidpaint(Graphics g, JComponent c) protected voidprotected voidpaintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect) protected voidpaintHTMLText(Graphics g, AbstractButton b, Rectangle textRect, String text, View v) Method which renders the text of the current button if html.protected voidpaintText(Graphics g, AbstractButton b, Rectangle textRect, String text) private voidpaintUnderline(Graphics g, AbstractButton b, Rectangle rect, String text) protected voidMethods inherited from class BasicButtonUI
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installUI, paintIcon, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallUIMethods inherited from class 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:
installDefaultsin classBasicButtonUI
-
installListeners
- Overrides:
installListenersin classBasicButtonUI
-
uninstallListeners
- Overrides:
uninstallListenersin classBasicButtonUI
-
getFocusColor
-
paint
- Overrides:
paintin 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:
paintTextin classBasicButtonUI
-
paintUnderline
-
paintFocus
protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect) - Overrides:
paintFocusin classBasicButtonUI
-
paintButtonPressed
- Overrides:
paintButtonPressedin classBasicButtonUI
-
createButtonListener
- Overrides:
createButtonListenerin classBasicButtonUI
-
contains
Overridden to return true if the position is inside the union of the text and icon rectangle, false otherwise.
- Overrides:
containsin 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 (??)
-