class EventLogManagerController.RecentButtonMouseListener extends MouseAdapter
MouseAdapter
for creating a
specific listener for the MenuAreaButton
"Recent" button.
When the button get pressed, this listener will ask the View to show a pop-up menu connected
with this button and containing a set of menu items that represent the elements
in the recentLogList
of the Model. These elements are the most recent document opened by the application.
To each of these items, the View will add a EventLogManagerController.RecentButtonItemActionListener
, to manage their
behaviour when pressed.
MouseAdapter
,
MenuAreaButton
Modifier and Type | Field and Description |
---|---|
private EventLogManagerController.RecentButtonItemActionListener |
itemListener
This special
ActionListener will be associated to every items
of the pop-up menu created by the mousePressed(MouseEvent)
and will manage their corresponding action. |
Constructor and Description |
---|
RecentButtonMouseListener()
Creates a
RecentButtonMouseListener , calling the
constructor of the super class and then initialising the instance
variables. |
Modifier and Type | Method and Description |
---|---|
void |
mousePressed(MouseEvent e)
Invoked when a mouse button has been pressed on a component
This method asks the view to shop a pop-up menu connected with the selected
JButton ,
containing a list defined by the passed LinkedList read from the Model and with
the passed ActionListener associated with every item in the list. |
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseReleased, mouseWheelMoved
private EventLogManagerController.RecentButtonItemActionListener itemListener
ActionListener
will be associated to every items
of the pop-up menu created by the mousePressed(MouseEvent)
and will manage their corresponding action.public RecentButtonMouseListener()
RecentButtonMouseListener
, calling the
constructor of the super class and then initialising the instance
variables.public void mousePressed(MouseEvent e)
This method asks the view to shop a pop-up menu connected with the selected JButton
,
containing a list defined by the passed LinkedList
read from the Model and with
the passed ActionListener
associated with every item in the list.
mousePressed
in interface MouseListener
mousePressed
in class MouseAdapter