[kaffe] CVS kaffe (robilad): AWT test cleanup
Kaffe CVS
cvs-commits at kaffe.org
Mon Feb 7 11:52:10 PST 2005
PatchSet 5499
Date: 2005/02/07 19:46:19
Author: robilad
Branch: HEAD
Tag: (none)
Log:
AWT test cleanup
2005-02-07 Dalibor Topic <robilad at kaffe.org>
* test/awt/Calc/Calc.java,
test/awt/Calc/Calc.sh,
test/awt/TextEdit/README,
test/awt/TextEdit/TextEdit.jar,
test/awt/TextEdit/TextEdit.sh,
test/awt/TextEdit/copyright.txt,
test/awt/Unico/README,
test/awt/Unico/Unico.class,
test/awt/Unico/readme.txt,
test/awt/Unico/unico.jar,
test/awt/Unico/unico.sh:
Removed tests without included source code.
* test/awt/WidgetsDemo/DemoImageDict.java: Removed unused file.
* test/Makefile.am (EXTRA_DIST) Removed deleted files.
Members:
ChangeLog:1.3544->1.3545
test/Makefile.am:1.7->1.8
test/Makefile.in:1.132->1.133
test/awt/Calc/Calc.java:1.1->1.2(DEAD)
test/awt/Calc/Calc.sh:1.1->1.2(DEAD)
test/awt/TextEdit/README:1.1->1.2(DEAD)
test/awt/TextEdit/TextEdit.jar:1.1->1.2(DEAD)
test/awt/TextEdit/TextEdit.sh:1.1->1.2(DEAD)
test/awt/TextEdit/copyright.txt:1.1->1.2(DEAD)
test/awt/Unico/README:1.1->1.2(DEAD)
test/awt/Unico/Unico.class:1.1->1.2(DEAD)
test/awt/Unico/readme.txt:1.1->1.2(DEAD)
test/awt/Unico/unico.jar:1.1->1.2(DEAD)
test/awt/Unico/unico.sh:1.1->1.2(DEAD)
test/awt/WidgetsDemo/DemoImageDict.java:1.1->1.2(DEAD)
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3544 kaffe/ChangeLog:1.3545
--- kaffe/ChangeLog:1.3544 Mon Feb 7 18:47:12 2005
+++ kaffe/ChangeLog Mon Feb 7 19:46:19 2005
@@ -1,5 +1,24 @@
2005-02-07 Dalibor Topic <robilad at kaffe.org>
+ * test/awt/Calc/Calc.java,
+ test/awt/Calc/Calc.sh,
+ test/awt/TextEdit/README,
+ test/awt/TextEdit/TextEdit.jar,
+ test/awt/TextEdit/TextEdit.sh,
+ test/awt/TextEdit/copyright.txt,
+ test/awt/Unico/README,
+ test/awt/Unico/Unico.class,
+ test/awt/Unico/readme.txt,
+ test/awt/Unico/unico.jar,
+ test/awt/Unico/unico.sh:
+ Removed tests without included source code.
+
+ * test/awt/WidgetsDemo/DemoImageDict.java: Removed unused file.
+
+ * test/Makefile.am (EXTRA_DIST) Removed deleted files.
+
+2005-02-07 Dalibor Topic <robilad at kaffe.org>
+
* libraries/extensions/comm/javalib/Makefile.am,
libraries/extensions/microsoft/javalib/Makefile.am,
libraries/extensions/pjava/javalib/Makefile.am,
Index: kaffe/test/Makefile.am
diff -u kaffe/test/Makefile.am:1.7 kaffe/test/Makefile.am:1.8
--- kaffe/test/Makefile.am:1.7 Mon Feb 7 17:49:10 2005
+++ kaffe/test/Makefile.am Mon Feb 7 19:46:23 2005
@@ -15,18 +15,6 @@
DIST_SUBDIRS = internal regression jni
EXTRA_DIST = \
- awt/Calc/Calc.java \
- awt/Calc/Calc.sh \
- awt/TextEdit/README \
- awt/TextEdit/TextEdit.jar \
- awt/TextEdit/TextEdit.sh \
- awt/TextEdit/copyright.txt \
- awt/Unico/README \
- awt/Unico/Unico.class \
- awt/Unico/readme.txt \
- awt/Unico/unico.jar \
- awt/Unico/unico.sh \
- awt/WidgetsDemo/DemoImageDict.java \
awt/WidgetsDemo/README \
awt/WidgetsDemo/WidgetsDemo.java \
awt/WidgetsDemo/WidgetsDemo.sh \
Index: kaffe/test/Makefile.in
diff -u kaffe/test/Makefile.in:1.132 kaffe/test/Makefile.in:1.133
--- kaffe/test/Makefile.in:1.132 Mon Feb 7 17:49:10 2005
+++ kaffe/test/Makefile.in Mon Feb 7 19:46:23 2005
@@ -358,18 +358,6 @@
SUBDIRS = $(INTERNAL_TEST) regression jni
DIST_SUBDIRS = internal regression jni
EXTRA_DIST = \
- awt/Calc/Calc.java \
- awt/Calc/Calc.sh \
- awt/TextEdit/README \
- awt/TextEdit/TextEdit.jar \
- awt/TextEdit/TextEdit.sh \
- awt/TextEdit/copyright.txt \
- awt/Unico/README \
- awt/Unico/Unico.class \
- awt/Unico/readme.txt \
- awt/Unico/unico.jar \
- awt/Unico/unico.sh \
- awt/WidgetsDemo/DemoImageDict.java \
awt/WidgetsDemo/README \
awt/WidgetsDemo/WidgetsDemo.java \
awt/WidgetsDemo/WidgetsDemo.sh \
@@ -543,7 +531,7 @@
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- $(mkdir_p) $(distdir)/awt/Calc $(distdir)/awt/TextEdit $(distdir)/awt/Unico $(distdir)/awt/WidgetsDemo
+ $(mkdir_p) $(distdir)/awt/WidgetsDemo
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
===================================================================
Checking out kaffe/test/awt/Calc/Calc.java
RCS: /home/cvs/kaffe/kaffe/test/awt/Calc/Attic/Calc.java,v
VERS: 1.1
***************
--- kaffe/test/awt/Calc/Calc.java Mon Feb 7 19:52:09 2005
+++ /dev/null Sun Aug 4 19:57:58 2002
@@ -1,357 +0,0 @@
-//*******************************
-// Java script of Calculator
-// << Calc.java >>
-//===============================
-// Ver 0.0 96/01/19 T.Yamazaki
-//-------------------------------
-// email : yamaza at st.rim.or.jp
-//*******************************
-
-import java.awt.BorderLayout;
-import java.awt.Button;
-import java.awt.Dimension;
-import java.awt.FlowLayout;
-import java.awt.Frame;
-import java.awt.GridLayout;
-import java.awt.Panel;
-import java.awt.TextField;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-import java.awt.event.WindowEvent;
-import java.awt.event.WindowListener;
-
-//===================
-// Calculator Applet
-//===================
-public class Calc
- extends Frame
- implements ActionListener, WindowListener, KeyListener
-{
-//--------
- // member
- //--------
- TextField text;
- String sText1;
- String sText2;
- double dReg1;
- double dReg2;
- double dMem;
- int sOperator;
- boolean isFixReg;
- boolean hasDec;
- final static int MREAD = -1;
- final static int MPLUS = -2;
- final static int MMINUS = -3;
- final static int NOOP = 0;
- Button[] buttons;
-
-//-------------
-// constructor
-//-------------
-public Calc() {
- super( "Calc");
-
- Button b;
-
- Panel pFrame = new Panel();
- pFrame.setLayout(new FlowLayout());
-
- text = new TextField("");
- //text.setForeground(Color.yellow);
- text.setEditable(false);
- text.addKeyListener( this);
-
- //text.setBackground(Color.black);
- Panel pCalc = new Panel();
-
- pCalc.setLayout(new BorderLayout(0, 5));
- pCalc.add("North", text);
-
- pFrame.add("Center", pCalc);
-
- Dimension dSize= pCalc.getSize();
- dSize.width = dSize.width + 20;
- dSize.height = dSize.height + 20;
- pFrame.setSize(dSize);
-
- Panel pKey = new Panel();
- pKey.setLayout(new GridLayout(5, 4, 5, 5));
- add("Center", pKey);
-
- addButtons( pKey);
-
- pCalc.add("Center", pKey);
-
- setLayout(new BorderLayout(0, 0));
- add("North", pFrame);
- //setBackground(Color.darkGray);
-
- dReg1 = 0.0;
- dReg2 = 0.0;
- dMem = 0.0;
-
- sOperator = NOOP;
- text.setText("0");
- isFixReg = true;
- hasDec = false;
-
- addWindowListener( this);
- addKeyListener( this);
-
- //setBounds(50,50,150,190);
- pack();
- //setResizable(false);
- setVisible( true);
-}
-
-private double Calculation ( int op, double dReg1, double dReg2 ) {
- switch ( op ) {
- case '+': dReg1 = dReg1 + dReg2; break;
- case '-': dReg1 = dReg1 - dReg2; break;
- case '*': dReg1 = dReg1 * dReg2; break;
- case '/': dReg1 = dReg1 / dReg2; break;
- default: dReg1 = dReg2;
- }
- return dReg1;
-}
-
-public void action ( int cmd ) {
- Double dTemp;
-
- switch ( cmd ) {
- case 'C':
- dReg1 = 0.0;
- dReg2 = 0.0;
- sOperator = NOOP;
- text.setText("0");
- isFixReg = true;
- break;
-
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- cmd -= '0';
- if (isFixReg)
- sText2 = Integer.toString( cmd);
- else
- sText2 = text.getText() + cmd;
- text.setText(sText2);
- isFixReg = false;
- break;
-
- case '.':
- if (hasDec == false) {
- if (isFixReg)
- sText2 = "0.";
- else
- sText2 = text.getText() + ".";
- text.setText(sText2);
- hasDec = true;
- isFixReg = false;
- }
- break;
-
- //
- // operations
- //
- case '+': case '-': case '*': case '/': case '=':
- sText1 = text.getText();
- dReg2 = (Double.valueOf(sText1)).doubleValue();
- dReg1 = Calculation( sOperator, dReg1, dReg2);
- dTemp = new Double(dReg1);
- sText2 = dTemp.toString();
- text.setText(sText2);
- sOperator = cmd;
- isFixReg = true;
- hasDec = false;
- break;
-
- //
- // memory read operation
- //
- case MREAD:
- dTemp = new Double(dMem);
- sText2 = dTemp.toString();
- text.setText(sText2);
- sOperator = NOOP;
- isFixReg = true;
- hasDec = false;
- break;
-
- //
- // memory add operation
- //
- case MPLUS:
- sText1 = text.getText();
- dReg2 = (Double.valueOf(sText1)).doubleValue();
- dReg1 = Calculation( sOperator, dReg1, dReg2);
- dTemp = new Double(dReg1);
- sText2 = dTemp.toString();
- text.setText(sText2);
-
- dMem = dMem + dReg1;
- sOperator = NOOP;
- isFixReg = true;
- hasDec = false;
- break;
-
- //
- // memory sub operation
- //
- case MMINUS:
- sText1 = text.getText();
- dReg2 = (Double.valueOf(sText1)).doubleValue();
- dReg1 = Calculation( sOperator, dReg1, dReg2);
-
- dTemp = new Double(dReg1);
- sText2 = dTemp.toString();
- text.setText(sText2);
- dMem = dMem - dReg1;
- sOperator = NOOP;
- isFixReg = true;
- hasDec = false;
- break;
- }
-}
-
-public void actionPerformed ( ActionEvent e ) {
- //
- // numeric key input
- //
- String arg = e.getActionCommand();
-
- if ( "MR".equals( arg) )
- action( MREAD);
- else if ( "M+".equals( arg) )
- action( MPLUS);
- else if ( "M-".equals( arg) )
- action( MMINUS);
- else if ( arg.length() == 1 )
- action( arg.charAt( 0));
-}
-
-void addButtons ( Panel pKey ) {
- String[] labels = { "C", "MR", "M-", "M+",
- "7", "8", "9", "/",
- "4", "5", "6", "*",
- "1", "2", "3", "-",
- "0", ".", "=", "+" };
-
- buttons = new Button[labels.length];
-
- for ( int i=0; i<labels.length; i++ ) {
- buttons[i] = new Button( labels[i]);
- pKey.add( buttons[i]);
- buttons[i].addActionListener( this);
- buttons[i].addKeyListener( this);
- }
-}
-
-public void keyPressed ( KeyEvent e ) {
- char c = e.getKeyChar();
- int o = e.getKeyCode();
- int cmd = -1;
-
- switch ( c ) {
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- case '/': case '*': case '=': case '.':
- cmd = c;
- break;
- case '+':
- cmd = e.isControlDown() ? MPLUS : '+';
- break;
- case '-':
- cmd = e.isControlDown() ? MMINUS : '-';
- break;
-
- default:
- switch ( o ) {
- /* interferes with Button key interface (enter, space triggers action)
- case KeyEvent.VK_SPACE:
- cmd = '=';
- break;
- */
- case KeyEvent.VK_BACK_SPACE:
- case KeyEvent.VK_DELETE:
- case KeyEvent.VK_ESCAPE:
- cmd = 'C';
- break;
- case KeyEvent.VK_PAGE_DOWN:
- cmd = MREAD;
- break;
- }
- }
-
- if ( cmd != -1 ) {
- setFocus( cmd);
- action( cmd);
- }
-}
-
-public void keyReleased ( KeyEvent e ) {
-}
-
-public void keyTyped ( KeyEvent e ) {
-}
-
-public static void main(String args[])
- {
- Calc app = new Calc();
-}
-
-void setFocus ( int cmd ) {
- int i;
-
- switch ( cmd ) {
- case 'C': i=0; break;
- case MREAD: i=1; break;
- case MMINUS: i=2; break;
- case MPLUS: i=3; break;
- case '7': i=4; break;
- case '8': i=5; break;
- case '9': i=6; break;
- case '/': i=7; break;
- case '4': i=8; break;
- case '5': i=9; break;
- case '6': i=10; break;
- case '*': i=11; break;
- case '1': i=12; break;
- case '2': i=13; break;
- case '3': i=14; break;
- case '-': i=15; break;
- case '0': i=16; break;
- case '.': i=17; break;
- case '=': i=18; break;
- case '+': i=19; break;
- default: i=-1;
- }
-
- if ( i >= 0 ) {
- buttons[i].requestFocus();
- }
-}
-
-public void windowActivated ( WindowEvent evt ) {
-}
-
-public void windowClosed ( WindowEvent evt ){
-}
-
-public void windowClosing ( WindowEvent evt ){
- dispose();
-}
-
-public void windowDeactivated ( WindowEvent evt ){
-}
-
-public void windowDeiconified ( WindowEvent evt ){
-}
-
-public void windowIconified ( WindowEvent evt ){
-}
-
-public void windowOpened ( WindowEvent evt ){
-}
-}
===================================================================
Checking out kaffe/test/awt/Calc/Calc.sh
RCS: /home/cvs/kaffe/kaffe/test/awt/Calc/Attic/Calc.sh,v
VERS: 1.1
***************
--- kaffe/test/awt/Calc/Calc.sh Mon Feb 7 19:52:09 2005
+++ /dev/null Sun Aug 4 19:57:58 2002
@@ -1 +0,0 @@
-kaffe Calc
===================================================================
Checking out kaffe/test/awt/TextEdit/README
RCS: /home/cvs/kaffe/kaffe/test/awt/TextEdit/Attic/README,v
VERS: 1.1
***************
--- kaffe/test/awt/TextEdit/README Mon Feb 7 19:52:09 2005
+++ /dev/null Sun Aug 4 19:57:58 2002
@@ -1,7 +0,0 @@
-This is a simple TextEditor written by John Jensen.
-
-To run simply type:
-
- sh TextEdit.sh
-or
- kaffe -jar TextEdit.jar
===================================================================
Checking out kaffe/test/awt/TextEdit/TextEdit.jar
RCS: /home/cvs/kaffe/kaffe/test/awt/TextEdit/Attic/TextEdit.jar,v
VERS: 1.1
***************
cvs [checkout aborted]: received broken pipe signal
Binary files - and /dev/null differ
===================================================================
Checking out kaffe/test/awt/TextEdit/TextEdit.sh
RCS: /home/cvs/kaffe/kaffe/test/awt/TextEdit/Attic/TextEdit.sh,v
VERS: 1.1
***************
--- kaffe/test/awt/TextEdit/TextEdit.sh Mon Feb 7 19:52:09 2005
+++ /dev/null Sun Aug 4 19:57:58 2002
@@ -1 +0,0 @@
-kaffe -jar TextEdit.jar $*
===================================================================
Checking out kaffe/test/awt/TextEdit/copyright.txt
RCS: /home/cvs/kaffe/kaffe/test/awt/TextEdit/Attic/copyright.txt,v
VERS: 1.1
***************
--- kaffe/test/awt/TextEdit/copyright.txt Mon Feb 7 19:52:09 2005
+++ /dev/null Sun Aug 4 19:57:58 2002
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 1997 John Jensen. All rights reserved.
- *
- * This software is FREE FOR COMMERCIAL AND NON-COMMERCIAL USE,
- * provided the following condition is met.
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby granted,
- * provided that any copy or derivative of this software or documentation
- * retaining the name "John Jensen" also retains this condition and the
- * following disclaimer.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * CopyrightVersion 1.0
- */
===================================================================
Checking out kaffe/test/awt/Unico/README
RCS: /home/cvs/kaffe/kaffe/test/awt/Unico/Attic/README,v
VERS: 1.1
***************
--- kaffe/test/awt/Unico/README Mon Feb 7 19:52:09 2005
+++ /dev/null Sun Aug 4 19:57:58 2002
@@ -1,7 +0,0 @@
-This is a simple conversion utility written by Andrea Poltronieri.
-
-To run simply type:
-
- sh unico.sh
-or
- kaffe Unico
===================================================================
Checking out kaffe/test/awt/Unico/Unico.class
RCS: /home/cvs/kaffe/kaffe/test/awt/Unico/Attic/Unico.class,v
VERS: 1.1
***************
cvs [checkout aborted]: received broken pipe signal
Binary files - and /dev/null differ
===================================================================
Checking out kaffe/test/awt/Unico/readme.txt
RCS: /home/cvs/kaffe/kaffe/test/awt/Unico/Attic/readme.txt,v
VERS: 1.1
***************
--- kaffe/test/awt/Unico/readme.txt Mon Feb 7 19:52:10 2005
+++ /dev/null Sun Aug 4 19:57:58 2002
@@ -1,32 +0,0 @@
-UniCo 1.0
-
-UniCo requires a Java 1.1 Virtual Machine.
-
-How to use UniCo :
-1 Extract the content of unico.zip
-2 Add the path of the file Unico.class to your CLASSPATH environment variable
-3 Execute the java class Unico in your java intepreter
-
-
-The files unico.sh, unico.bat, unico.bat can perform the CLASSPATH setting and
-start UniCo if they are executed from the directory in wich the Unico.class file is
-located.
-
-unico.sh is for unix
-unico.bat is for win95/NT with JDK 1.1 or later
-unicoms.bat is for win95/NT with Internet Explorer 4.0 or later
-
-For upgrades and new versions go to
-http://arena.sci.univr.it/~poltro/unico
-
-Send comments to
-poltro at arena.sci.univr.it
-
-
-
-
-
-
-
-
-
===================================================================
Checking out kaffe/test/awt/Unico/unico.jar
RCS: /home/cvs/kaffe/kaffe/test/awt/Unico/Attic/unico.jar,v
VERS: 1.1
***************
cvs [checkout aborted]: received broken pipe signal
Binary files - and /dev/null differ
===================================================================
Checking out kaffe/test/awt/Unico/unico.sh
RCS: /home/cvs/kaffe/kaffe/test/awt/Unico/Attic/unico.sh,v
VERS: 1.1
***************
--- kaffe/test/awt/Unico/unico.sh Mon Feb 7 19:52:10 2005
+++ /dev/null Sun Aug 4 19:57:58 2002
@@ -1 +0,0 @@
-java Unico
===================================================================
Checking out kaffe/test/awt/WidgetsDemo/DemoImageDict.java
RCS: /home/cvs/kaffe/kaffe/test/awt/WidgetsDemo/Attic/DemoImageDict.java,v
VERS: 1.1
***************
--- kaffe/test/awt/WidgetsDemo/DemoImageDict.java Mon Feb 7 19:52:10 2005
+++ /dev/null Sun Aug 4 19:57:58 2002
@@ -1,13 +0,0 @@
-import java.awt.Toolkit;
-
-public class DemoImageDict
- extends kaffe.awt.ImageDict
-{
-public DemoImageDict() {
- super();
- putImage( "Add", "back.jpg", false);
- putImage( "Remove", "forward.jpg", false);
- putImage( "Modify", "transfer.jpg", false);
- putImage( "Close", "hand.up.jpg", false);
-}
-}
More information about the kaffe
mailing list