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 TypeMethodDescriptionvoidvoidvoidvoidvoidvoidvoidvoidvoidvoid
-
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:
mouseClickedin interfaceMouseListener
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
- Specified by:
mouseExitedin interfaceMouseListener
-
keyTyped
- Specified by:
keyTypedin interfaceKeyListener
-
keyPressed
- Specified by:
keyPressedin interfaceKeyListener
-
keyReleased
- Specified by:
keyReleasedin interfaceKeyListener
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
itemStateChanged
- Specified by:
itemStateChangedin interfaceItemListener
-