Package se.his.it401g.todo
Class TaskInputListener
java.lang.Object
se.his.it401g.todo.TaskInputListener
- All Implemented Interfaces:
ActionListener
,ItemListener
,KeyListener
,MouseListener
,EventListener
public class TaskInputListener
extends Object
implements KeyListener, MouseListener, ActionListener, ItemListener
This class implements listeners for different input events on the task GUI. You may use this class for your custom task type, or create another listener.
For example, when you change the test of a task and press enter, the keyPress method is called to switch from the input field to a JLabel displaying the text.
This file licensed under the Creative Commons (CC) BY 4.0 license.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
void
void
void
void
void
void
-
Constructor Details
-
TaskInputListener
- Parameters:
task
- is the task object that this listener is responsible for.text
- is the text input field that this listener receives events from.textLabel
- is the text label that this listener receives events from.
-
-
Method Details
-
mouseClicked
- Specified by:
mouseClicked
in interfaceMouseListener
-
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
- Specified by:
mouseExited
in interfaceMouseListener
-
keyTyped
- Specified by:
keyTyped
in interfaceKeyListener
-
keyPressed
- Specified by:
keyPressed
in interfaceKeyListener
-
keyReleased
- Specified by:
keyReleased
in interfaceKeyListener
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-
itemStateChanged
- Specified by:
itemStateChanged
in interfaceItemListener
-