From 2c52427f8865ee40bf6f30254a8b25d7a99102cf Mon Sep 17 00:00:00 2001 From: Arthur <78031901+Arthur7770@users.noreply.github.com> Date: Wed, 17 Feb 2021 10:40:39 +0100 Subject: [PATCH] Deleting Listener. --- .../screen/listener/AxiomFieldListener.java | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 src/lsystem/screen/listener/AxiomFieldListener.java diff --git a/src/lsystem/screen/listener/AxiomFieldListener.java b/src/lsystem/screen/listener/AxiomFieldListener.java deleted file mode 100644 index 2a88999..0000000 --- a/src/lsystem/screen/listener/AxiomFieldListener.java +++ /dev/null @@ -1,40 +0,0 @@ -package lsystem.screen.listener; - -import lsystem.screen.MainFrame; - -import javax.swing.*; -import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.KeyEvent; -import java.awt.event.KeyListener; - -public class AxiomFieldListener implements KeyListener { - private MainFrame frame; - private int index; - - public AxiomFieldListener(MainFrame frame,int index){ - this.frame = frame; - this.index = index; - } - @Override - public void keyTyped(KeyEvent ke) { - if(ke.getKeyCode() != KeyEvent.VK_ENTER) - frame.changeList(String.valueOf(ke.getKeyChar()),(byte)0, (JTextArea) frame.textAreaList.get(index)); - else{ - String str = ";\r\n"; - frame.changeList(str,(byte)0, (JTextArea) frame.textAreaList.get(index)); - frame.textFieldList.get(index).setText(null); - } - } - - @Override - public void keyPressed(KeyEvent ke) { - if(ke.getKeyCode() == KeyEvent.VK_ENTER) - frame.textFieldList.get(index).setText(null); - } - - @Override - public void keyReleased(KeyEvent ke) { - } -}