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 classA BasicButtonListener specialized to the needs of a Hyperlink. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intTODO docprotected intTODO docprotected intTODO docprotected intTODO docFields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(JComponent c, int x, int y) protected BasicButtonListenerstatic ComponentUIfactory methodprotected Colorget focus Colorprotected Rectanglepasted from BasicGraphicsUtils (getPreferredButtonSize).protected voidprotected voidvoidpaint(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) protected voidMethods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installUI, paintIcon, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallUIMethods 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:
installDefaultsin classBasicButtonUI
-
installListeners
- Overrides:
installListenersin classBasicButtonUI
-
uninstallListeners
- Overrides:
uninstallListenersin classBasicButtonUI
-
getFocusColor
get focus Color- Returns:
- Color
-
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
-
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
-
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 (??)
-