class EventLogManagerController.PopupMenuItemActionListener extends Object implements ActionListener
ActionListener
for defining the
actionPerformed(ActionEvent)
method and creating a specific listener to use on the JMenuItem
items of the JPopupMenu
pop-up added to an
FooterAreaButton
button.
At the moment it implements the behaviour of the only JMenuItem
item inside the pop-up menu, but it can be modified with other items behaviours in
an easy manner if we will add other items to the pop-up menu of the
FooterAreaButton
button in the future.
In the present case, the only item inside the pop-up menu is the one that expresses
the user choice of closing the JInternalFrame
frame connected with the
button owner of the item.
This listener then will search the corresponding JInternalFrame
frame
of the FooterAreaButton
button, owner of the pressed item, and close it.
ActionListener
,
ActionEvent
,
JInternalFrame
,
JPopupMenu
,
JMenuItem
Constructor and Description |
---|
PopupMenuItemActionListener() |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e)
Invoked when an action occurs.
|
public void actionPerformed(ActionEvent e)
JInternalFrame
internal frame (specified by the second string).
Then, it applies the specified command to the specified internal frame.
actionPerformed
in interface ActionListener
e
- the action event generated by a componentJInternalFrame
,
ActionEvent