[Mathlib-commitlog] SF.net SVN: mathlib:[906] JMathLib/trunk/src/jmathlib/ui/awt/ ConsoleKeyHandler
Status: Beta
Brought to you by:
st_mueller
|
From: <st_...@us...> - 2009-03-01 15:27:31
|
Revision: 906
http://mathlib.svn.sourceforge.net/mathlib/?rev=906&view=rev
Author: st_mueller
Date: 2009-03-01 15:27:27 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
deletet ConsoleKeyhandler.java. Instead use jmathlib.ui.common.ConsoleKeyHandler
Removed Paths:
-------------
JMathLib/trunk/src/jmathlib/ui/awt/ConsoleKeyHandler.java
Deleted: JMathLib/trunk/src/jmathlib/ui/awt/ConsoleKeyHandler.java
===================================================================
--- JMathLib/trunk/src/jmathlib/ui/awt/ConsoleKeyHandler.java 2009-03-01 15:00:59 UTC (rev 905)
+++ JMathLib/trunk/src/jmathlib/ui/awt/ConsoleKeyHandler.java 2009-03-01 15:27:27 UTC (rev 906)
@@ -1,59 +0,0 @@
-package jmathlib.ui.awt;
-
-import java.awt.event.*;
-
-/**Class for handling key events
-It only works with the Console class*/
-public class ConsoleKeyHandler implements KeyListener
-{
- public ConsoleKeyHandler()
- {
- }
-
- public void keyTyped(KeyEvent e){}
-
- /**Interpret key presses*/
- public void keyPressed(KeyEvent e)
- {
- Console input = ((Console)e.getSource());
- int keyValue = e.getKeyCode();
-
- if((keyValue == KeyEvent.VK_UP) ||
- (keyValue == KeyEvent.VK_DOWN) )
- {
- //consume the key event so the cursor doesn't move
- e.consume();
-
- if(keyValue == KeyEvent.VK_UP) //up cursor
- input.prevCommand();
- else if(keyValue == KeyEvent.VK_DOWN) //down cursor
- input.nextCommand();
-
- }
- else if(keyValue == KeyEvent.VK_LEFT) //left cursor
- {
- //check the cursor isn't moving off the current line
- input.checkPosition();
- }
- else if(keyValue == KeyEvent.VK_ENTER)
- {
- //stop the enter from working
- e.consume();
- }
- }
-
-
- public void keyReleased(KeyEvent e)
- {
- Console input = ((Console)e.getSource());
- int keyValue = e.getKeyCode();
-
- if(keyValue == KeyEvent.VK_ENTER)
- input.interpretLine();
- else if(keyValue == KeyEvent.VK_HOME)
- input.home();
- else if((keyValue == KeyEvent.VK_UP) ||
- (keyValue == KeyEvent.VK_DOWN) )
- input.end();
- }
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|