org.jdesktop.swingx.plaf.basic
public class BasicHyperlinkUI extends javax.swing.plaf.basic.BasicButtonUI
JXHyperlink
UI. Modifier and Type | Class and Description |
---|---|
static class |
BasicHyperlinkUI.BasicHyperlinkListener
A BasicButtonListener specialized to the needs of a Hyperlink.
|
Modifier and Type | Field and Description |
---|---|
protected int |
dashedRectGapHeight |
protected int |
dashedRectGapWidth |
protected int |
dashedRectGapX |
protected int |
dashedRectGapY |
Constructor and Description |
---|
BasicHyperlinkUI() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(javax.swing.JComponent c,
int x,
int y) |
protected javax.swing.plaf.basic.BasicButtonListener |
createButtonListener(javax.swing.AbstractButton b) |
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c) |
protected java.awt.Color |
getFocusColor() |
protected java.awt.Rectangle |
getIconTextRect(javax.swing.AbstractButton b)
C&p'ed from BasicGraphicsUtils (getPreferredButtonSize).
|
protected void |
installDefaults(javax.swing.AbstractButton b) |
protected void |
installListeners(javax.swing.AbstractButton b) |
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c) |
protected void |
paintButtonPressed(java.awt.Graphics g,
javax.swing.AbstractButton b) |
protected void |
paintFocus(java.awt.Graphics g,
javax.swing.AbstractButton b,
java.awt.Rectangle viewRect,
java.awt.Rectangle textRect,
java.awt.Rectangle iconRect) |
protected void |
paintHTMLText(java.awt.Graphics g,
javax.swing.AbstractButton b,
java.awt.Rectangle textRect,
java.lang.String text,
javax.swing.text.View v)
Method which renders the text of the current button if html.
|
protected void |
paintText(java.awt.Graphics g,
javax.swing.AbstractButton b,
java.awt.Rectangle textRect,
java.lang.String text) |
protected void |
uninstallListeners(javax.swing.AbstractButton b) |
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installUI, paintIcon, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallUI
protected int dashedRectGapX
protected int dashedRectGapY
protected int dashedRectGapWidth
protected int dashedRectGapHeight
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
protected void installDefaults(javax.swing.AbstractButton b)
installDefaults
in class javax.swing.plaf.basic.BasicButtonUI
protected void installListeners(javax.swing.AbstractButton b)
installListeners
in class javax.swing.plaf.basic.BasicButtonUI
protected void uninstallListeners(javax.swing.AbstractButton b)
uninstallListeners
in class javax.swing.plaf.basic.BasicButtonUI
protected java.awt.Color getFocusColor()
public void paint(java.awt.Graphics g, javax.swing.JComponent c)
paint
in class javax.swing.plaf.basic.BasicButtonUI
protected void paintHTMLText(java.awt.Graphics g, javax.swing.AbstractButton b, java.awt.Rectangle textRect, java.lang.String text, javax.swing.text.View v)
g
- Graphics contextb
- Current button to rendertextRect
- Bounding rectangle to render the text.text
- String to renderv
- the View to use.protected void paintText(java.awt.Graphics g, javax.swing.AbstractButton b, java.awt.Rectangle textRect, java.lang.String text)
Overridden to paint the underline on rollover.
paintText
in class javax.swing.plaf.basic.BasicButtonUI
protected void paintFocus(java.awt.Graphics g, javax.swing.AbstractButton b, java.awt.Rectangle viewRect, java.awt.Rectangle textRect, java.awt.Rectangle iconRect)
paintFocus
in class javax.swing.plaf.basic.BasicButtonUI
protected void paintButtonPressed(java.awt.Graphics g, javax.swing.AbstractButton b)
paintButtonPressed
in class javax.swing.plaf.basic.BasicButtonUI
protected javax.swing.plaf.basic.BasicButtonListener createButtonListener(javax.swing.AbstractButton b)
createButtonListener
in class javax.swing.plaf.basic.BasicButtonUI
public boolean contains(javax.swing.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.
contains
in class javax.swing.plaf.ComponentUI
protected java.awt.Rectangle getIconTextRect(javax.swing.AbstractButton b)
b
- the button to analyse.