public class ClickableTextAction
extends java.lang.Object
implements java.io.Serializable
ClickableTextAction class is used for implementing
the clickable (sensible) text. The clickable text action has a command
string and action listeners. If the text with a text style containing
an action is clicked, the action event that has a command string of
the action is delivered to the action listeners associated with the
action.| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected java.lang.String |
actionCommand
The command string associated with the action.
|
protected java.awt.event.ActionListener |
actionListener
The action listener associated with the action.
|
protected static java.lang.String |
actionListenerK
Internal constant for serialization
|
| コンストラクタと説明 |
|---|
ClickableTextAction(java.lang.String actionCommand)
Constructs a clickable text action with the specified command string.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
addActionListener(java.awt.event.ActionListener l)
Adds the specified action listener to receive action events
from this action.
|
boolean |
equals(java.lang.Object anObject)
Compares two objects for equality.
|
java.lang.String |
getActionCommand()
Returns the command string for the action event fired by this action.
|
boolean |
hasActionListener()
Checks if this action has action listeners.
|
int |
hashCode()
Returns a hashcode for this action.
|
void |
performClickableAction()
Performs this action.
|
void |
performClickableAction(java.lang.Object source)
Performs this action with the specified source for the action event.
|
void |
removeActionListener(java.awt.event.ActionListener l)
Removes the specified action listener so it no longer receives
action events from this action.
|
protected java.lang.String actionCommand
protected transient java.awt.event.ActionListener actionListener
protected static final java.lang.String actionListenerK
public ClickableTextAction(java.lang.String actionCommand)
actionCommand - the command string.public java.lang.String getActionCommand()
public boolean hasActionListener()
public void addActionListener(java.awt.event.ActionListener l)
l - the action listener.public void removeActionListener(java.awt.event.ActionListener l)
l - the action listenerpublic void performClickableAction()
public void performClickableAction(java.lang.Object source)
source - the source for the action event.public int hashCode()
hashCode クラス内 java.lang.Objectpublic boolean equals(java.lang.Object anObject)
equals クラス内 java.lang.Object