public class GreetingAction extends javax.swing.AbstractAction
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
greeting |
private javax.swing.Action |
oppositeAction |
private javax.swing.JTextArea |
textArea |
Constructor and Description |
---|
GreetingAction(java.lang.String greeting,
javax.swing.JTextArea textArea)
Constructs a greeting action.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event) |
void |
setOpposite(javax.swing.Action action)
Sets the opposite action.
|
private java.lang.String greeting
private javax.swing.JTextArea textArea
private javax.swing.Action oppositeAction
public GreetingAction(java.lang.String greeting, javax.swing.JTextArea textArea)
greeting
- the string to add to the text areatextArea
- the text area to which to add the greetingpublic void setOpposite(javax.swing.Action action)
action
- the action to be enabled after this action was
carried outpublic void actionPerformed(java.awt.event.ActionEvent event)