|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
org.jdesktop.swingx.plaf.basic.BasicHyperlinkUI
public class BasicHyperlinkUI
Basic implementation of the JXHyperlink
UI.
This is copied from org.jdesktop.jdnc.plaf.basic.BasicLinkButtonUI
Nested Class Summary | |
---|---|
static class |
BasicHyperlinkUI.BasicHyperlinkListener
A BasicButtonListener specialized to the needs of a Hyperlink. |
Field Summary | |
---|---|
protected int |
dashedRectGapHeight
|
protected int |
dashedRectGapWidth
|
protected int |
dashedRectGapX
|
protected int |
dashedRectGapY
|
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI |
---|
defaultTextIconGap, defaultTextShiftOffset |
Constructor Summary | |
---|---|
BasicHyperlinkUI()
|
Method Summary | |
---|---|
boolean |
contains(JComponent c,
int x,
int y)
Returns true if the specified x,y location is
contained within the look and feel's defined shape of the specified
component. |
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)
|
void |
paint(Graphics g,
JComponent c)
Paints the specified component appropriate for the look and feel. |
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)
Method which renders the text of the current button. |
protected void |
uninstallListeners(AbstractButton b)
|
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI |
---|
clearTextShiftOffset, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int dashedRectGapX
protected int dashedRectGapY
protected int dashedRectGapWidth
protected int dashedRectGapHeight
Constructor Detail |
---|
public BasicHyperlinkUI()
Method Detail |
---|
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)
javax.swing.plaf.ComponentUI
ComponentUI.update
method when
the specified component is being painted. Subclasses should override
this method and use the specified Graphics
object to
render the content of the component.
paint
in class BasicButtonUI
g
- the Graphics
context in which to paintc
- the component being painted;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple componentsComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
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
g
- Graphics contextb
- Current button to rendertextRect
- Bounding rectangle to render the text.text
- String to renderprotected 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)
true
if the specified x,y location is
contained within the look and feel's defined shape of the specified
component. x
and y
are defined to be relative
to the coordinate system of the specified component. Although
a component's bounds
is constrained to a rectangle,
this method provides the means for defining a non-rectangular
shape within those bounds for the purpose of hit detection. Overridden to return true if the position is inside the union of the text and icon rectangle, false otherwise.
contains
in class ComponentUI
c
- the component where the x,y location is being queried;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple componentsx
- the x coordinate of the pointy
- the y coordinate of the pointJComponent.contains(int, int)
,
Component.contains(int, int)
protected Rectangle getIconTextRect(AbstractButton b)
b
- the button to analyse.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |