public class BasicHyperlinkUI extends BasicButtonUI
JXHyperlink
UI. Modifier and Type | Class and Description |
---|---|
static class |
BasicHyperlinkUI.BasicHyperlinkListener
A BasicButtonListener specialized to the needs of a Hyperlink.
|
(package private) static class |
BasicHyperlinkUI.ULHtml |
Modifier and Type | Field and Description |
---|---|
protected int |
dashedRectGapHeight |
protected int |
dashedRectGapWidth |
protected int |
dashedRectGapX |
protected int |
dashedRectGapY |
private Color |
focusColor |
private static Rectangle |
iconRect |
private static Logger |
LOG |
private PropertyChangeListener |
pcListener |
private static Rectangle |
textRect |
private View |
ulv |
private static Rectangle |
viewRect |
defaultTextIconGap, defaultTextShiftOffset
Constructor and Description |
---|
BasicHyperlinkUI() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(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.
|
protected BasicButtonListener |
createButtonListener(AbstractButton b) |
static ComponentUI |
createUI(JComponent c) |
protected Color |
getFocusColor() |
protected Rectangle |
getIconTextRect(AbstractButton b)
C&p'ed from BasicGraphicsUtils (getPreferredButtonSize).
|
protected void |
installDefaults(AbstractButton b) |
protected void |
installListeners(AbstractButton b) |
private boolean |
isInside(Rectangle iconTextRect,
int x,
int y) |
void |
paint(Graphics g,
JComponent c) |
protected void |
paintButtonPressed(Graphics g,
AbstractButton b) |
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)
Overridden to paint the underline on rollover.
|
private void |
paintUnderline(Graphics g,
AbstractButton b,
Rectangle rect,
String text) |
protected void |
uninstallListeners(AbstractButton b) |
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installUI, paintIcon, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallUI
getAccessibleChild, getAccessibleChildrenCount, update
protected int dashedRectGapX
protected int dashedRectGapY
protected int dashedRectGapWidth
protected int dashedRectGapHeight
private Color focusColor
private PropertyChangeListener pcListener
public BasicHyperlinkUI()
public static ComponentUI createUI(JComponent c)
protected void installDefaults(AbstractButton b)
installDefaults
in class BasicButtonUI
protected void installListeners(AbstractButton b)
installListeners
in class BasicButtonUI
protected void uninstallListeners(AbstractButton b)
uninstallListeners
in class BasicButtonUI
protected Color getFocusColor()
public void paint(Graphics g, JComponent c)
paint
in class BasicButtonUI
protected void paintHTMLText(Graphics g, AbstractButton b, Rectangle textRect, String 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(Graphics g, AbstractButton b, Rectangle textRect, String text)
Overridden to paint the underline on rollover.
paintText
in class BasicButtonUI
private void paintUnderline(Graphics g, AbstractButton b, Rectangle rect, String text)
protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
paintFocus
in class BasicButtonUI
protected void paintButtonPressed(Graphics g, AbstractButton b)
paintButtonPressed
in class BasicButtonUI
protected BasicButtonListener createButtonListener(AbstractButton b)
createButtonListener
in class BasicButtonUI
public boolean contains(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 ComponentUI
private boolean isInside(Rectangle iconTextRect, int x, int y)
iconTextRect
- point
- protected Rectangle getIconTextRect(AbstractButton b)
b
- the button to analyse.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses