|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JButton
com.zfqjava.swing.JLinkButton
public class JLinkButton
JLinkButton provides a button can launch a
URL.
| Nested Class Summary | |
|---|---|
protected class |
JLinkButton.AccessibleJLinkButton
This class implements accessibility support for the JLinkButton class. |
| Nested classes/interfaces inherited from class javax.swing.JButton |
|---|
JButton.AccessibleJButton |
| Nested classes/interfaces inherited from class javax.swing.AbstractButton |
|---|
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
ALWAYS_UNDERLINE
Identifies the always underline behavior of the link text. |
static int |
HOVER_UNDERLINE
Identifies the hover underline behavior of the link text. |
static int |
NEVER_UNDERLINE
Identifies the nerver underline behavior of the link text. |
static int |
SYSTEM_DEFAULT
Identifies the default behavior of the link text. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JLinkButton()
Creates a button with no set text or icon or URL. |
|
JLinkButton(Action a)
Creates a button where properties are taken from the Action supplied. |
|
JLinkButton(Icon icon)
Creates a link button with an icon. |
|
JLinkButton(Icon icon,
URL url)
Creates a button with the icon and the URL. |
|
JLinkButton(String text)
Creates a button with where text are taken from the URL. |
|
JLinkButton(String text,
Icon icon,
URL url)
Creates a button with initial text and an icon. |
|
JLinkButton(String text,
URL url)
Creates a button with the text and the URL. |
|
JLinkButton(URL url)
Creates a button with where text are taken from the URL. |
|
| Method Summary | |
|---|---|
protected Action |
createDefaultAction()
Creates a action handler to handle this button's action event. |
AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this JLinkButton. |
Color |
getActiveLinkColor()
Returns the active link color. |
Action |
getDefaultAction()
Returns the default action handler of this button. |
Color |
getDisabledLinkColor()
Returns the disabled link color. |
int |
getLinkBehavior()
Returns the current link behaviro of this JLinkButton. |
Color |
getLinkColor()
Returns the link color. |
URL |
getLinkURL()
Returns the URL that this button linked. |
String |
getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component. |
Color |
getVisitedLinkColor()
Returns the visited link color. |
boolean |
isLinkVisited()
Returns true if this link URL has been visited, otherwise return false; |
protected String |
paramString()
Returns a string representation of this JLinkButton. |
void |
setActiveLinkColor(Color activeColor)
Sets the active link color. |
void |
setDefaultAction(Action action)
Sets the action that will handle this button's action event. |
void |
setDisabledLinkColor(Color disabledColor)
Sets the disabled link color. |
void |
setLinkBehavior(int behavior)
Sets this JLinkButton link behavior. |
void |
setLinkColor(Color color)
Sets the link color. |
void |
setLinkURL(URL url)
Sets the URL that this button linked. |
void |
setLinkVisited(boolean isVisited)
Sets the linkVisited property, default is false. |
protected void |
setupToolTipText()
Setup the tool tip text when the link URL changed. |
void |
setVisitedLinkColor(Color visitedColor)
Sets the visited link color. |
void |
updateUI()
Resets the UI property to a value from the current look and feel. |
| Methods inherited from class javax.swing.JButton |
|---|
isDefaultButton, isDefaultCapable, removeNotify, setDefaultCapable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int ALWAYS_UNDERLINE
public static final int HOVER_UNDERLINE
public static final int NEVER_UNDERLINE
public static final int SYSTEM_DEFAULT
| Constructor Detail |
|---|
public JLinkButton()
JLinkButton(java.lang.String, javax.swing.Icon, java.net.URL)public JLinkButton(Action a)
Action supplied.
a - the Action used to specify the new buttonJLinkButton(java.lang.String, javax.swing.Icon, java.net.URL)public JLinkButton(Icon icon)
icon - the Icon image to display on the link buttonpublic JLinkButton(String text)
URL.
JLinkButton(java.lang.String, javax.swing.Icon, java.net.URL)public JLinkButton(URL url)
URL.
JLinkButton(java.lang.String, javax.swing.Icon, java.net.URL)
public JLinkButton(String text,
URL url)
JLinkButton(java.lang.String, javax.swing.Icon, java.net.URL)
public JLinkButton(Icon icon,
URL url)
JLinkButton(java.lang.String, javax.swing.Icon, java.net.URL)
public JLinkButton(String text,
Icon icon,
URL url)
text - the text of the buttonicon - the Icon image to display on the button| Method Detail |
|---|
public void updateUI()
updateUI in class JButtonJComponent.updateUI()public String getUIClassID()
getUIClassID in class JButtonJComponent.getUIClassID(),
UIDefaults.getUI(javax.swing.JComponent)protected void setupToolTipText()
public void setLinkBehavior(int behavior)
JLinkButton link behavior.
One of the 4 legal values:
behavior - the link behavior type
IllegalArgumentException - if the behavior illegalgetLinkBehavior()public int getLinkBehavior()
JLinkButton.
One of the 4 legal values:
setLinkBehavior(int)public void setLinkColor(Color color)
color - the link colorgetLinkColor()public Color getLinkColor()
setLinkColor(java.awt.Color)public void setActiveLinkColor(Color activeColor)
activeColor - the active link colorgetActiveLinkColor()public Color getActiveLinkColor()
setActiveLinkColor(java.awt.Color)public void setDisabledLinkColor(Color disabledColor)
disabledColor - the disabled link colorgetDisabledLinkColor()public Color getDisabledLinkColor()
setDisabledLinkColor(java.awt.Color)public void setVisitedLinkColor(Color visitedColor)
visitedColor - the visited link colorgetVisitedLinkColor()public Color getVisitedLinkColor()
setVisitedLinkColor(java.awt.Color)public URL getLinkURL()
URL that this button linked.
URL that this button linkedgetLinkURL()public void setLinkURL(URL url)
URL that this button linked.
url - the URL that this button linkedgetLinkURL()public void setLinkVisited(boolean isVisited)
linkVisited property, default is false.
isVisited - the visited stateisLinkVisited()public boolean isLinkVisited()
setLinkVisited(boolean)public void setDefaultAction(Action action)
action - the action handler to usegetDefaultAction()public Action getDefaultAction()
setDefaultAction(javax.swing.Action)protected Action createDefaultAction()
protected String paramString()
null.
paramString in class JButtonpublic AccessibleContext getAccessibleContext()
getAccessibleContext in interface AccessiblegetAccessibleContext in class JButton
|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||