diff --git a/CHANGELOG b/CHANGELOG
new file mode 120000
index 0000000000..d5888ead85
--- /dev/null
+++ b/CHANGELOG
@@ -0,0 +1 @@
+ReleaseNotes
\ No newline at end of file
diff --git a/ReleaseNotes/ReleaseNotes4.0.1.txt b/ReleaseNotes/ReleaseNotes4.0.1.txt
new file mode 100644
index 0000000000..0b944faea4
--- /dev/null
+++ b/ReleaseNotes/ReleaseNotes4.0.1.txt
@@ -0,0 +1,202 @@
+ Geant4.0.1 Release Notes
+ ------------------------
+
+ 14th July 1999
+
+This version of Geant4 is a "consolidation" of the first public
+release. Its main characteristics are:
+
+ o improved reliability and robustness.
+ o the possibility of using granular (sub-category) libraries. We
+ recommend this mode of installation and use.
+ o the possibility of using either the Standard Template Library
+ (STL) or RogueWave tools.h++, selectable at installation and use
+ time.
+ o new low energy electromagnetic processes (first version).
+ o extension of nuclear photon-evaporation to include the calculation
+ of time to production for gammas.
+ o improvements in design of the User Action classes - see below.
+
+Note that the next release, Geant4.1.0, will be offered only in the
+STL version.
+
+This code and some binary libraries are available through our "Source
+Code" Web page - see our Geant4 Home
+Page.
+
+Please refer to Geant4
+User Documentation for further information about using Geant4.
+Updates to the documentation for Geant4.0.1 are still in preparation
+and are expected to be published within three weeks.
+
+
+Contents
+--------
+
+ 1. Supported and Tested Platforms
+ 2. CLHEP 1.4
+ 3. Using the Standard Template Library
+ 4. Compiler Specific Problems
+ 5. Known Run-Time Problems
+ 6. Compilation Warnings
+ 7. Known Run-Time Warnings
+ 8. Changes of the Signatures of Methods of the User Action Classes
+
+
+1. Supported and Tested Platforms
+---------------------------------
+
+ o SUN Solaris 5.6, C++ 4.2 patch 104631-04.
+ o HP 10.20, aCC C++ B3910B A.01.18.
+ o Linux 2.0.35, gcc C++ egcs-2.91.60. There is a bug in an egcs
+ include file which affects compilation with STL - see comments
+ below. This configuration was tested in the RedHat 5.1
+ distribution, but versions of Geant4 have also been compiled
+ successfully in Debian and Suse distributions.
+
+Platforms also tested but giving rise to some problems - see below:
+
+ o AIX 4.3, xlC compiler.
+ o DEC V4.0, cxx C++ V6.1-027.
+ o NT 4.0 with Service Pack 4 and Cygnus Tools b20 with:
+ Visual C++ 6.0 Service Pack 2 for either STL or RogueWave, or
+ Visual C++ 5.0 Service Pack 3 for the RogueWave version only.
+
+
+2. CLHEP 1.4
+------------
+
+Geant4.0.1 requires the installation of CLHEP
+1.4. The following platform specific instructions apply:
+
+ DEC: Do *not* use the compiler option "-std strict_ansi".
+
+ NT: After configure, edit the file config/CLHEP-x86-cygnus-win32 and
+ comment out "#define HEP-USE-STD 1".
+
+
+
+3. Using the Standard Template Library
+--------------------------------------
+
+The following versions of STL have been tested:
+
+ ObjectSpace STL on: AIX,
+ DEC, HP, NT and SUN.
+
+ STLPORT STL on: NT
+
+ "Native" STL on: Linux.
+
+This is selected at installation/compile time by environment variables
+- see documentation. Be aware that this is the first implementation
+of "The STL Interface" for which the emphasis has been on correct
+behaviour, not on performance. Also, the size of libraries and
+executables is considerably larger. These issues will be addressed in
+the next release.
+
+
+4. Compiler Specific Problems
+-----------------------------
+
+ o Linux with egcs-1.1.1 and 1.1.2
+
+ In order to compile with STL it is necessary to edit
+ stl_hash_fun.h in /usr/include/g++/ or /usr/local/include/g++/.
+ Lines 65-67 must be removed or commented out. These are the
+ lines in question:
+
+ __STL_TEMPLATE_NULL struct hash {
+ size_t operator()(unsigned char x) const { return x; }
+ };
+
+ o AIX 4.3, xlC compiler.
+
+ Geant4 does compile and link on AIX... eventually. The compiler
+ is very slow and the executables in debug mode are very large.
+ On rsplus at CERN we had to revert to a version of the archiver
+ corresponding to AIX 4.1 in order to have templates treated
+ correctly. This has limited our ability to test Geant4.
+
+ o DEC V4.0, cxx C++ V6.1-027.
+
+ We have found cases of mis-compilation of min and max templates
+ on DEC. We have traced those which cause serious malfunction
+ but there is no guarantee that there are no other cases.
+ Detailed inspection of assembler output suggests that this
+ problem might not be confined to min and max. This has been
+ reported to DEC/Compaq. We understand a new version 6.1A of the
+ compiler is on its way. However we cannot guarantee correct
+ execution of Geant4 on DEC with the current version of the
+ compiler.
+
+ o NT
+
+ - Note that the G4SYSTEM environment variable used for compiling
+ Geant4 on NT has changed from WIN32-VC-NICE to WIN32-VC.
+ Please check documentation on setting the environment.
+ - Testing was done using the debuggable version only.
+ - g3tog4 has not been ported to NT.
+ - During the making of dependency files during compilation there
+ are repeated warnings ("strstrea.h not found") - this is an
+ artefact of using g++ for this purpose.
+ - Ignore linker warnings: "conflicts with use of other libs".
+ - Ignore linker errors: "unresolved external symbol
+ __imp__MessageBoxA@16".
+ - There is a known problem reading the data files for neutron
+ scattering processes. A patch resolving this problem will
+ be issued soon.
+
+
+
+5. Known Run-Time Problems
+--------------------------
+
+ o Reading STEP files on DEC with optimised libraries causes a Memory
+ fault - but see notes on DEC above.
+ o exampleN04 loops on DEC with optimised libraries - but see notes
+ on DEC above.
+ o On HP, an executable which uses "integral approach"
+ electromagnetic processes - G4IMultipleScattering,
+ G4IeIonisation, G4IeBremsstrahlung, G4IeplusAnnihilation,
+ G4IhIonisation - has intermittently given Bus error(coredump).
+
+
+6. Compilation Warnings
+-----------------------
+
+There are compilation warnings om some platforms. We do not believe
+that any will lead to incorrect run-time behaviour, but we are working
+on reducing them.
+
+
+7. Known Run-Time Warnings
+--------------------------
+
+The following messages are written to error output while tracking. We
+believe none give rise to incorrect behaviour.
+
+ o G4PropagatorInField::LocateIntersectionPoint: Warning: Integration
+ inaccuracy requires an adjustment in the step's endpoint Two
+ mid-points are further apart than their curve length difference:
+ Dist = xxx curve length = yyy
+ o Stepsize underflow in Stepper.
+ o Warning G4Navigator::ComputeStep found slightly inaccurate
+ position...
+ o Warning in G4Navigator::ComputeStep: The Step's starting point has
+ moved...
+
+
+8. Changes of the Signatures of Methods of the User Action Classes
+------------------------------------------------------------------
+
+The signatures of all methods of all of the optional user action
+classes have been changed. Now every method takes a constant pointer
+to an appropriate G4 object. To cope with this change the user code
+must be modified. The examples and documents are updated and the user
+is requested to consult to them. We are sorry for this inconvenience
+but we concluded that this change will provide the user with a better
+and more robust code.
diff --git a/config/G4ODBMS_BUILD.gmk b/config/G4ODBMS_BUILD.gmk
index 85e0b944c9..44bf7fb042 100644
--- a/config/G4ODBMS_BUILD.gmk
+++ b/config/G4ODBMS_BUILD.gmk
@@ -1,4 +1,4 @@
-# $Id: G4ODBMS_BUILD.gmk,v 2.1 1998/07/09 13:00:42 morita Exp $
+# $Id: G4ODBMS_BUILD.gmk,v 1.1 1999/01/07 15:58:31 gunter Exp $
# ----------------------------------------------------------------
# GNUmakefile for CPPFLAGS for HepODBMS and Objectivity/DB.
# Youhei Morita, 9th July 1998.
diff --git a/config/G4UI_BUILD.gmk b/config/G4UI_BUILD.gmk
index a875f04080..75c0a40741 100644
--- a/config/G4UI_BUILD.gmk
+++ b/config/G4UI_BUILD.gmk
@@ -1,4 +1,4 @@
-# $Id: G4UI_BUILD.gmk,v 2.7 1998/10/23 15:14:36 barrand Exp $
+# $Id: G4UI_BUILD.gmk,v 1.1 1999/01/07 15:58:31 gunter Exp $
# -------------------------------------------------------------
# Interfaces-specific CPPFLAGS for BUILD phase.
# John Allison, 6th July 1998.
diff --git a/config/G4UI_USE.gmk b/config/G4UI_USE.gmk
index 4c8ec5ba7f..3ab00c06a9 100644
--- a/config/G4UI_USE.gmk
+++ b/config/G4UI_USE.gmk
@@ -1,4 +1,4 @@
-# $Id: G4UI_USE.gmk,v 2.7 1998/08/26 11:05:37 allison Exp $
+# $Id: G4UI_USE.gmk,v 1.1 1999/01/07 15:58:31 gunter Exp $
# -------------------------------------------------------------
# GNUmakefile for CPPFLAGS for interfaces USE phase.
# John Allison, 6th July 1998.
diff --git a/config/G4VIS_BUILD.gmk b/config/G4VIS_BUILD.gmk
index f46e838814..90e50ee836 100644
--- a/config/G4VIS_BUILD.gmk
+++ b/config/G4VIS_BUILD.gmk
@@ -1,4 +1,4 @@
-# $Id: G4VIS_BUILD.gmk,v 1.2 1998/07/07 15:10:33 allison Exp $
+# $Id: G4VIS_BUILD.gmk,v 1.2 1999/06/19 15:20:38 johna Exp $
# -------------------------------------------------------------
# Visualization-specific CPPFLAGS for BUILD phase.
# John Allison, 24th January 1998.
@@ -62,12 +62,6 @@ ifdef G4VIS_BUILD_OI_DRIVER
CPPFLAGS += -DG4VIS_BUILD_OI_DRIVER
endif
-ifdef G4VIS_BUILD_RAYX_DRIVER
- G4VIS_BUILD = 1
- INC_X11 = 1
- CPPFLAGS += -DG4VIS_BUILD_RAYX_DRIVER
-endif
-
# For VRML and VRMLFILE drivers
ifdef G4VIS_BUILD_VRML_DRIVER
G4VIS_BUILD = 1
diff --git a/config/G4VIS_USE.gmk b/config/G4VIS_USE.gmk
index 95dd9a443c..0e2bb45cd1 100644
--- a/config/G4VIS_USE.gmk
+++ b/config/G4VIS_USE.gmk
@@ -1,4 +1,4 @@
-# $Id: G4VIS_USE.gmk,v 1.7 1998/12/07 03:48:44 stanaka Exp $
+# $Id: G4VIS_USE.gmk,v 1.2 1999/06/19 15:20:40 johna Exp $
# -------------------------------------------------------------
# GNUmakefile for CPPFLAGS for visualization USE phase.
# John Allison, 24th January 1998.
@@ -70,15 +70,6 @@ ifdef G4VIS_USE_OI
LOAD_IV = 1
endif
-ifdef G4VIS_USE_RAYX
- G4VIS_USE = 1
- CPPFLAGS += -DG4VIS_USE_RAYX
- CPPFLAGS += -I$(G4BASE)/visualization/G4Ray/include
- VISLIBS += -lG4Ray
- INC_X11 = 1
- LOAD_X11 = 1
-endif
-
ifdef G4VIS_USE_VRML
G4VIS_USE_VRML_OR_VRMLFILE = 1
CPPFLAGS += -DG4VIS_USE_VRML
diff --git a/config/History b/config/History
index 2187dd50d7..e98befc05e 100644
--- a/config/History
+++ b/config/History
@@ -1,5 +1,5 @@
-$Id: History,v 2.65 1998/12/15 19:29:12 gcosmo Exp $
-$Name: geant4-00 $
+$Id: History,v 1.50 1999/07/06 17:54:47 johna Exp $
+$Name: geant4-00-01 $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,176 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
+6th July 1999 John Allison (config-01-00-10)
+- Changed -L/usr/X11/lib to -L/usr/X11R6/lib for Linux.
+
+6th July 1999 Gunter Folger (config-01-00-09)
+- Adapt architecture.gmk for use of STL with WIN32-VC
+ Remove NICE from G4SYSTEM name WIN32-VC in architecture, globlib and
+ binmake.gmk
+
+3rd July 1999 John Allison (config-01-00-08a)
+- Added full-stop after i.e in binmake.gmk.
+
+2nd July 1999 John Allison (config-01-00-08)
+- Protected liblist against duplicate library names.
+
+29th June 1999 Gabriele Cosmo (config-01-00-07)
+- architecture.gmk: fixed bug in SUN-CC setup concerning XMLIBS and XMFLAGS.
+ -lXm was missing.
+
+25th June 1999 Gabriele Cosmo
+- Use $G4LIB/$G4SYSTEM instead of $G4LIBDIR in binmake.gmk for invoking
+ liblist and search for libname.map (granular libraries setup).
+
+24th June 1999 John Allison
+- Use liblist and libname.map in $G4LIBDIR.
+
+19th June 1999 John Allison
+- Removed references to G4Ray in G4VIS_BUILD.gmk and G4VIS_USE.gmk.
+
+9th June 1999 Gunter Folger
+- Adapt liblist.c for Windows, all changes contained withing #ifdef WIN32 blocks.
+
+4th June 1999 John Allison
+- Corrected USER_DEFINED_LDLIBS action.
+- Changed `export G4TMP=$(G4TMP);' to `G4TMP=$(G4TMP); export G4TMP;'
+- Added -I$(G4BASE)/geometry/solids/Boolean/include.
+- Introduced LDLIBS_PREFINAL (Gunter).
+
+2nd June 1999 John Allison
+- Changed more occurrences of := to = to fix crash of liblist at startup.
+
+1st June 1999 John Allison
+- Changed LDLIBS2 := to LDLIBS2 = in binmake.gmk.
+- Reverted $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(G4TARGET) to $(G4TMPDIR).
+- Added /$(G4TARGET) to liblist -d $(G4WORKDIR)/tmp/$(G4SYSTEM) in binmake.gmk.
+
+31st May 1999 John Allison
+- Added -I$(G4BASE)/processes/electromagnetic/lowenergy/include.
+
+27th May 1999 Gabriele Cosmo (config-01-00-06)
+- architecture.gmk: set default $G4INSTALL path to $HOME/geant4 (was still referring
+ to geant4beta...).
+- Restored default CLHEP_BASE_DIR to /afs/cern.ch/sw/geant4/dev/CLHEP/$G4SYSTEM/pro.
+- architecture.gmk: added -DG4NOT_ISO_DELETES for NT setup (G.Folger).
+
+25th May 1999 Gabriele Cosmo
+- architecture.gmk: fixed bug in SUN-CC setup. Replaced VISLIBS with LOADLIBS to
+ specify inclusion of socket libraries -lsocket -lnsl.
+- binmake.gmk: fixed path to libname.map in the definition of LDLIBS2 for the
+ granular libs setup.
+
+19th May 1999 John Allison
+- Force linking of static library, libCLHEP.a.
+
+18th May 1999 John Allison
+- Specify -DG4NOT_ISO_DELETES in any case (not just G4USE_STL) and only
+ for HP, Sun and AIX.
+
+17th May 1999 Gabriele Cosmo
+- Added -DG4NOT_ISO_DELETES for DEC and AIX and moved inside G4USE_STL or
+ G4USE_OSPACE scope for all platforms which need it.
+- Added path to wrappers for AIX.
+
+17th May 1999 John Allison
+- Added -DG4NOT_ISO_DELETES for Sun and HP.
+- Changed order of -I$(OSPACEDIR)/ospace/std and -I$(OSPACEDIR)/ospace/stl.
+
+13th May 1999 Gabriele Cosmo (config-01-00-05)
+- architecture.gmk: G4USE_OSPACE setup is now independent from G4USE_STL which
+ is now devoted for generic STL setup. Added -DOS_NO_TYPEDEF_5 option to HP-aCC
+ for ObjectSpace.
+
+12th May 1999 Gabriele Cosmo
+- architecture.gmk: modified path to STL wrapper files directory to point to
+ $RWINC/wrappers/$G4SYSTEM. Wrappers are now differenciated according to
+ the architecture type.
+
+11th May 1999 Gabriele Cosmo
+- architecture.gmk: merged Isidro's OSPACE setup for HP-aCC.
+ Reorganised OSPACE options by introducing OSPACEINC variable.
+
+10th May 1999 Guy Barrand
+- interactivity.gmk ; put OpenGL things after OPACS things to have
+ correct link order.
+
+10th May 1999 John Allison
+- Added -I$(OSPACEDIR)/ospace/stl for Sun.
+
+7th May 1999 John Allison
+- Added GREP := grep except for SUN.
+- Introduced STLInterface/wrappers directory. Testing on OSF+ObjectSpace (G.Cosmo).
+
+6th May 1999 Gabriele Cosmo
+- Introduced G4USE_OSPACE for ObjectSpace STL. If defined G4USE_STL is
+ set as well. Modified architecture.gmk and binmake.gmk.
+
+6th May 1999 John Allison
+- Removed extra library for circular dependencies. Now all solved!
+
+5th May 1999 Gabriele Cosmo
+- Fixed typo in architecture.gmk and defined OSPACEDIR to point to the G4
+ dev area where links to the ObjectSpace installations at CERN have been
+ created for all platforms. "pro" version points to ObjectSpace 2.1.
+
+5th May 1999 John Allison
+- Eliminated all references to RW in the case of G4USE_STL.
+- Added OSPACE variables.
+
+28th April 1999 Gabriele Cosmo (config-01-00-04)
+- architecture.gmk: moved link for CLHEP to "new" to test the new version
+ 1.4 of CLHEP. It will become "pro" again as soon as the new CLHEP will be
+ validated. NOTE: for DEC-cxx a custom CLHEP installation is used in order
+ to deactivate the ISO-ANSI options now set by default in CLHEP.
+
+19th April 1999 Gabriele Cosmo (config-01-00-03)
+- architecture.gmk: introduced CCFLAGS for all platforms. Set CCFLAGS to
+ "-Ae +DAportable" for HP-aCC to overcome compilation problems on liblist.c
+
+18th April 1999 Youhei Morita
+- architecture.gmk, binmake.gmk: introduced OBJY_LDLIB variable for
+ defining Objectivity library within G4ODBMS.
+
+13th April 1999 Gabriele Cosmo
+- architecture.gmk: added the following options in compilation:
+ o HP-aCC, SGI-CC: +Onolimit, -Olimit 5000 respectively.
+ Not suppress any optimization specifying a high or unlimited memory
+ limitation.
+ o DEC-cxx: -timplicit_local.
+ Get rid of the template repository by generating explicit template
+ instantiations used in the code with internal linkage.
+
+13th April 1999 John Allison
+- In binmake.gmk: - moved libmap target to source/GNUmakefile.
+ - extensive tidying.
+
+12th April 1999 John Allison
+- In liblist.c: - fixed bug to distinguish, e.g., track from tracking.
+ - improved printing.
+ - improved "Usage" comments.
+ - improved protection against bad input format.
+- In binmake.gmk, used $(ECHO) to solve platform dependency of echo.
+- In binmake.gmk for granular libraries:
+ - fully implemented -d option.
+ - Gave /tmp files a unique name.
+ - Removed repeated libraries - no longer necessary, all circular
+ dependencies seem solved.
+
+9th April 1999 Frank Behner
+- Fixed bug in liblist in -d option
+- Changed binmake.gmk to use liblist -d
+
+18th February 1999 John Allison
+- Added G4USE_STL flag.
+- Added code for linking granular libraries.
+
+1st January 1999 Gunter Folger (config-01-00-02)
+- Add FCLIBS for SUN.
+
+January 29th 1999 - John Allison (config-01-00-01)
+- Changed rd44 to sw/geant4.
+
December 15th, 1998 - G.Cosmo (config-00-04-11)
- Added G4_HAVE_BOOL to DEC-cxx.
- Cosmetic changes.
diff --git a/config/architecture.gmk b/config/architecture.gmk
index c39456cd84..db6b726b64 100644
--- a/config/architecture.gmk
+++ b/config/architecture.gmk
@@ -1,4 +1,4 @@
-# $Id: architecture.gmk,v 2.40 1998/12/15 19:29:13 gcosmo Exp $
+# $Id: architecture.gmk,v 1.36 1999/07/06 17:54:49 johna Exp $
# ------------------------------------------------------------------------
# GEANT 4 - Architecture configuration script for GNU Make
#
@@ -25,10 +25,12 @@
#
# Linux-g++ Linux (Red Hat 5.1), egcs 1.1
#
-# WIN32-VC-NICE NiceNT and Microsoft Visual C++ 5.0 installed
-# locally as CD-ROM intallation
-# ex. NiceNT at CERN (but CYGWIN32 installed
-# locally, because not full installation on NICE)
+# WIN32-VC NT and Microsoft Visual C++ 5.0 or Microsoft Visual C++ 6.0
+# and using CYGWIN32 tools ( make, g++ as "makedepend", sh...)
+# ( Note: you will need to set your environment, see installation
+# guide.)
+#
+# WIN32-VC-NICE alias for the above, although NICE is not used anymore.
#
# WIN32-G++-NICE NiceNT and CYGWIN32 with g++ as base compiler
# ex. NiceNT at CERN (but CYGWIN32 and RogueWave
@@ -38,6 +40,13 @@
MAKEFLAGS= --no-print-directory
+# Specify G4USE_STL when using STL, even for using our "temporary"
+# STLinterface to RogueWave.
+#
+ifdef G4USE_STL
+ CPPFLAGS += -DG4USE_STL
+endif
+
# If not specified, the default platform for G4SYSTEM is IBM-AIX ...
#
ifndef G4SYSTEM
@@ -45,10 +54,10 @@ ifndef G4SYSTEM
endif
# If not specified, the default path for G4 installation G4INSTALL is
-# set to $HOME/geant4beta ...
+# set to $HOME/geant4 ...
#
ifndef G4INSTALL
- G4INSTALL := $(HOME)/geant4beta
+ G4INSTALL := $(HOME)/geant4
endif
# If not specified, the default path for G4 source G4BASE is
@@ -80,6 +89,7 @@ ifndef G4LIB
G4LIB := $(G4INSTALL)/lib
endif
G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4LIB) ] && mkdir -p $(G4LIB) )
+G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4LIB)/$(G4SYSTEM) ] && mkdir -p $(G4LIB)/$(G4SYSTEM) )
# If not specified, the default path for G4 binaries G4BIN is
# set to $G4WORKDIR/bin/$G4SYSTEM ...
@@ -118,11 +128,11 @@ ifndef G4DEBUG
endif
#
-# CLHEP path
+# CLHEP path, etc.
#
ifndef CLHEP_BASE_DIR
- CLHEP_BASE_DIR := /afs/cern.ch/rd44/dev/CLHEP/$(G4SYSTEM)/pro
+ CLHEP_BASE_DIR := /afs/cern.ch/sw/geant4/dev/CLHEP/$(G4SYSTEM)/pro
endif
CLHEP_INCLUDE_DIR := $(CLHEP_BASE_DIR)/include
CLHEP_LIB_DIR := $(CLHEP_BASE_DIR)/lib
@@ -131,33 +141,102 @@ ifndef CLHEP_LIB
endif
ifeq ($(G4SYSTEM),WIN32-VC-NICE)
-#
-# NiceNT policy for letter drive mapping
-#
-ifndef CLHEP_BASE_DIR
- CLHEP_BASE_DIR := "z:\p32\lhcpp\clhep\1.1"
+G4SYSTEM:=WIN32-VC
endif
-CLHEP_INCLUDE_DIR := $(CLHEP_BASE_DIR)/include
-CLHEP_LIB_DIR := $(CLHEP_BASE_DIR)/lib
-CLHEP_LIB := libCLHEP-cl.a
+
+ifeq ($(G4SYSTEM),WIN32-VC)
+# CLHEP_BASE_DIR must be defined in the environment
+ CLHEP_INCLUDE_DIR := $(CLHEP_BASE_DIR)/include
+ CLHEP_LIB_DIR := $(CLHEP_BASE_DIR)/lib
+ CLHEP_LIB := CLHEP.lib
endif
#
-# Rogue Wave Tools.h++ path
+# Rogue Wave Tools.h++ path & ObjectSpace STL
#
-ifndef RWBASE
- RWBASE := /afs/cern.ch/rd44/dev/rogue/$(G4SYSTEM)
-endif
-RWINC := $(RWBASE)
-RWLIBDIR := $(RWBASE)/lib
-RWLIB := rwtool
-
-ifeq ($(G4SYSTEM),HP-aCC)
- RWBASE := /opt/aCC
- RWINC := $(RWBASE)/include
- RWLIBDIR := /usr/lib
-endif
+ifdef G4USE_OSPACE
+
+#Object Space STL implementation
+
+ RWINC := $(G4BASE)/global/STLInterface
+ OSPACEDIR := /afs/cern.ch/sw/geant4/dev/ObjectSpace/$(G4SYSTEM)/pro/ToolKit
+ OSPACEINC := -I$(OSPACEDIR)/ospace/std -I$(OSPACEDIR)/ospace/stl
+ OSPACELIBS := -L$(OSPACEDIR)/lib -lospace
+ CPPFLAGS += -DG4USE_STL
+
+ ifeq ($(G4SYSTEM),WIN32-VC)
+ OSPACEDIR := $(OBJECT_SPACE_BASE)
+ OSPACEINC := -I$(OSPACEDIR)/ospace/std -I$(OSPACEDIR)/ospace/stl -I$(OSPACEDIR)
+ OSPACELIBS := '-libpath:c:\dev\ospace\lib std-2.1-vc5.0-mt.lib'
+ CPPFLAGS += -DG4USE_STL -DG4USE_OLDSTL
+ CPPFLAGS += -DOS_WIN_NT_4_0 -DOS_MULTI_THREADED -D_WIN32_WINNT $(OSPACEINC)
+ endif
+else
+ifdef G4USE_STL
+
+# Native STL implemetation
+
+ RWINC := $(G4BASE)/global/STLInterface
+
+else
+ifdef G4USE_STLPORT
+
+# STLport STL implementation (free) ( derived from SGI implementaion)
+ ifeq ($(G4SYSTEM),WIN32-VC)
+
+ RWINC := $(G4BASE)/global/STLInterface
+ STLPORTDIR := $(STLPORT_BASE)
+ OSPACEINC := -I$(STLPORTDIR)/stl
+ CPPFLAGS += -DG4USE_STL -DG4USE_OLDSTL
+ CPPFLAGS += -D_NOTHREADS -D__STL_NO_NEW_IOSTREAMS -D__STL_NO_NAMESPACES -D__STL_NO_NEW_STYLE_HEADERS
+
+ endif
+
+endif #STLport
+endif #STL
+endif #OPSPACE
+
+# default to RW if RWINC is not set...
+ifndef RWINC
+ ifndef RWBASE
+ RWBASE := /afs/cern.ch/sw/geant4/dev/rogue/$(G4SYSTEM)
+ endif
+ RWINC := $(RWBASE)
+ RWLIBDIR := $(RWBASE)/lib
+ RWLIB := rwtool
+
+ ifeq ($(G4SYSTEM),HP-aCC)
+ RWBASE := /opt/aCC
+ RWINC := $(RWBASE)/include
+ RWLIBDIR := /usr/lib
+ endif
+
+ ifeq ($(G4SYSTEM),WIN32-VC)
+# RWBASE must be defined in the environment
+
+ RWINC := $(RWBASE)
+ RWLIBDIR := $(RWBASE)"\lib"
+ RWLIB := mtlmt.lib
+ endif
+
+ ifeq ($(G4SYSTEM),WIN32-G++-NICE)
+ #
+ # locally installed RogueWave for g++ (mount mapping)
+ #
+ RWBASE := /rogue
+ RWINC := $(RWBASE)
+ RWLIBDIR := $(RWBASE)/lib
+ RWLIB := rwtool
+ endif
+
+ #
+ # Make dependencies files by g++ then need right RW include
+ #
+ ifdef RWINCGPP
+ RWINCGPP := -I$(RWINCGPP)
+ endif
+endif # ifndef RWINC
#
# Paths for G4 data
@@ -172,33 +251,10 @@ ifndef G4LEVELGAMMADATA
G4LEVELGAMMADATA := $(G4DATA)/PhotonEvaporation
endif
-ifeq ($(G4SYSTEM),WIN32-VC-NICE)
-#
-# NiceNT policy for letter drive mapping
-#
-ifndef RWBASE
- RWBASE := "z:\p32\lhcpp\rw\tools\7.0.2\rogue"
-endif
- RWINC := $(RWBASE)
- RWLIBDIR := $(RWBASE)"\lib"
- RWLIB := mtldmt.lib
- RWINCGPP := /rogue
-endif
-
-ifeq ($(G4SYSTEM),WIN32-G++-NICE)
-#
-# locally installed RogueWave for g++ (mount mapping)
-#
- RWBASE := /rogue
- RWINC := $(RWBASE)
- RWLIBDIR := $(RWBASE)/lib
- RWLIB := rwtool
-endif
-
#
# Toggle variables (positional qualifiers) between WIN32-VC and UNIX...
#
-ifeq ($(G4SYSTEM),WIN32-VC-NICE)
+ifeq ($(G4SYSTEM),WIN32-VC)
OUT_OBJ := -TP '-Fo'
FOR_OBJ := '-Fo'
OUT_LIB := '-out:'
@@ -226,29 +282,37 @@ else
FLIB_PATT := $(LIB_PATT)
endif
-#
-# Make dependencies files by g++ then need right RW include
-#
-ifdef RWINCGPP
- RWINCGPP := -I$(RWINCGPP)
-endif
-
#
# Variables for implicit rules, etc., as suggested in GNU Make manual...
#
-CPPFLAGS += -Iinclude \
- -I$(CLHEP_INCLUDE_DIR) \
- -I$(RWINC)
+CPPFLAGS += -Iinclude -I$(RWINC)
+CPPFLAGS += -I$(CLHEP_INCLUDE_DIR)
+
#
# Positional qualifiers in action...
#
-ifeq ($(G4SYSTEM),WIN32-VC-NICE)
- LDFLAGS := -link $(LIB_PATH)$(CLHEP_LIB_DIR) $(LIB_PATH)$(RWLIBDIR)
- LOADLIBS := $(CLHEP_LIB) $(RWLIB)
+ifeq ($(G4SYSTEM),WIN32-VC)
+ LDFLAGS := -link $(LIB_PATH)$(CLHEP_LIB_DIR)
+ ifdef RWLIBDIR
+ LDFLAGS += $(LIB_PATH)$(RWLIBDIR)
+ endif
+ LOADLIBS := $(CLHEP_LIB)
+ ifdef RWLIB
+ LOADLIBS += $(RWLIB)
+ endif
else
- LDFLAGS := -L$(CLHEP_LIB_DIR) -L$(RWLIBDIR)
- LOADLIBS := -l$(CLHEP_LIB) -l$(RWLIB) -lm
+## LDFLAGS := -L$(CLHEP_LIB_DIR)
+ LDFLAGS :=
+ ifdef RWLIBDIR
+ LDFLAGS += -L$(RWLIBDIR)
+ endif
+## LOADLIBS := -l$(CLHEP_LIB)
+ LOADLIBS := $(CLHEP_LIB_DIR)/lib$(CLHEP_LIB).a
+ ifdef RWLIB
+ LOADLIBS += -l$(RWLIB)
+ endif
+ LOADLIBS += -lm
endif
#
@@ -310,6 +374,9 @@ AR := ar r
# Default echo used with makedepend. Changed for SUN-CC, Linux-g++.
ECHO:= echo
+# Default grep used with source/GNUmakfile. Changed for SUN-CC.
+GREP := grep
+
#
# Architecture dependent variables...
@@ -324,6 +391,7 @@ ifeq ($(G4SYSTEM),AIX-xlC)
else
CXXFLAGS := -g -qdbxextra -qcheck=all -qfullpath -qtwolink -+
FCFLAGS := -g
+ CCFLAGS := -g
endif
FC := xlf
FCFLAGS += -qextname
@@ -340,6 +408,19 @@ ifeq ($(G4SYSTEM),AIX-xlC)
ifndef OGLLIBS
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
endif
+ ifdef G4ODBMS
+ ifeq ($(OBJY_VERS),4.0.2)
+ OBJY_LDLIB := oo_shar.4.02
+ endif
+ endif
+ CPPFLAGS += -DG4NOT_ISO_DELETES
+ ifdef G4USE_STL
+ CPPFLAGS += -I$(RWINC)/wrappers/$(G4SYSTEM)
+ endif
+ ifdef G4USE_OSPACE
+ CPPFLAGS += -DOS_AIX_4 -DOS_NEW_CHECK -DOS_STL_ASSERT -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
+ CPPFLAGS += -I$(RWINC)/wrappers/$(G4SYSTEM) $(OSPACEINC) -I$(OSPACEDIR)
+ endif
endif
# -------- SUN ---------
@@ -351,6 +432,7 @@ ifeq ($(G4SYSTEM),SUN-CC)
else
CXXFLAGS := -g
FCFLAGS := -g
+ CCFLAGS := -g
endif
# CXXFLAGS += -fnonstd
CFRONT_G4TEMPLATE_REPOSITORY := true
@@ -358,11 +440,11 @@ ifeq ($(G4SYSTEM),SUN-CC)
SHEXT := so
AR := $(CXX) -xar -ptr$(G4TREP) -o
ECHO := /bin/echo
+ GREP := /usr/xpg4/bin/grep
+ FCLIBS := -lM77 -lF77 -lsunmath
X11FLAGS := -I/usr/openwin/include/X11/extensions -I/usr/openwin/include/X11 -I/usr/openwin/include
X11LIBS := -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib -R/usr/openwin/lib -lXmu -lX11 -lXext
-
- XMFLAGS := -I/usr/include/Motif1.2
- XMLIBS := -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib -R/usr/openwin/lib -lXt -lX11
+ XMLIBS := -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib -R/usr/openwin/lib -lXt -lXm -lX11
XAWFLAGS := -I/usr/openwin/include/X11
XAWLIBS := -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib -R/usr/openwin/lib -lXaw -lXmu -lXt -lX11 -lXext
ifndef OGLFLAGS
@@ -371,8 +453,21 @@ ifeq ($(G4SYSTEM),SUN-CC)
ifndef OGLLIBS
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
endif
+ ifdef G4ODBMS
+ ifeq ($(OBJY_VERS),4.0.2)
+ OBJY_LDLIB := oo
+ endif
+ endif
CPPFLAGS += -DSOCKET_IRIX_SOLARIS
- VISLIBS += -L/usr/lib -lsocket -lnsl
+ LOADLIBS += -L/usr/lib -lsocket -lnsl
+ CPPFLAGS += -DG4NOT_ISO_DELETES
+ ifdef G4USE_STL
+ CPPFLAGS += -I$(RWINC)/wrappers/$(G4SYSTEM)
+ endif
+ ifdef G4USE_OSPACE
+ CPPFLAGS += -DOS_SOLARIS_2_5 -DOS_NEW_CHECK -DOS_STL_ASSERT -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
+ CPPFLAGS += -I$(RWINC)/wrappers/$(G4SYSTEM) $(OSPACEINC) -I$(OSPACEDIR)
+ endif
endif
# -------- HP ---------
@@ -380,10 +475,11 @@ endif
ifeq ($(G4SYSTEM),HP-aCC)
CXX := aCC
ifdef G4OPTIMISE
- CXXFLAGS := +O2
+ CXXFLAGS := +O2 +Onolimit
else
- CXXFLAGS := -g
+ CXXFLAGS := -g
FCFLAGS := -g
+ CCFLAGS := -g
endif
CXXFLAGS += +DAportable
CPPFLAGS += -I/usr
@@ -393,6 +489,7 @@ ifeq ($(G4SYSTEM),HP-aCC)
G4_HAVE_BOOL := yes
FC := f77
FCFLAGS += +E6 +ppu
+ CCFLAGS += -Ae +DAportable
X11FLAGS := -I/usr/include/X11/extensions -I/usr/contrib/X11R6/include -I/usr/contrib/X11R6/include/X11
X11LIBS := -L/usr/contrib/X11R6/lib -lXmu -L/usr/lib -lXt -lXext -lX11
XMFLAGS := -I/usr/include/Motif1.2
@@ -406,6 +503,20 @@ ifeq ($(G4SYSTEM),HP-aCC)
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
OGLLIBS += -L/opt/graphics/common/lib -lXwindow -lhpgfx -lXhp11 -ldld
endif
+ ifdef G4ODBMS
+ ifeq ($(OBJY_VERS),4.0.2)
+ OBJY_LDLIB := oo
+ endif
+ endif
+ CPPFLAGS += -DG4NOT_ISO_DELETES
+ ifdef G4USE_STL
+ CPPFLAGS += -I$(RWINC)/wrappers/$(G4SYSTEM) -DG4USE_EXPLICIT_TYPES_IN_TEMPLATES
+ endif
+ ifdef G4USE_OSPACE
+ CPPFLAGS += -DOS_HPUX_10_20 -DOS_NEW_CHECK -DOS_STL_ASSERT -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
+ CPPFLAGS += -DOS_NO_TYPEDEF_5 -D__HPACC_NOEH -DG4USE_EXPLICIT_TYPES_IN_TEMPLATES
+ CPPFLAGS += -I$(RWINC)/wrappers/$(G4SYSTEM) $(OSPACEINC) -I$(OSPACEDIR)
+ endif
endif
# -------- SGI ---------
@@ -413,11 +524,13 @@ endif
ifeq ($(G4SYSTEM),SGI-CC)
CXX := CC
ifdef G4OPTIMISE
- CXXFLAGS := -O -ptused
+ CXXFLAGS := -O -Olimit 5000
else
- CXXFLAGS := -g -ptused
- FCFLAGS := -g
+ CXXFLAGS := -g
+ FCFLAGS := -g
+ CCFLAGS := -g
endif
+ CXXFLAGS += -ptused
FC := f77
FCLIBS := -lftn
SHEXT := so
@@ -431,6 +544,10 @@ ifeq ($(G4SYSTEM),SGI-CC)
OGLLIBS := -L/usr/lib -lGLU -lGL
endif
CPPFLAGS += -DSOCKET_IRIX_SOLARIS
+ ifdef G4USE_OSPACE
+ CPPFLAGS += -DOS_IRIX_6_2 -DOS_NEW_CHECK -DOS_STL_ASSERT -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
+ CPPFLAGS += $(OSPACEINC) -I$(OSPACEDIR)
+ endif
endif
# -------- DEC ---------
@@ -442,11 +559,12 @@ ifeq ($(G4SYSTEM),DEC-cxx)
else
CXXFLAGS := -gall
FCFLAGS := -g
+ CCFLAGS := -g
endif
CFRONT_G4TEMPLATE_REPOSITORY := true
G4_HAVE_BOOL := yes
LDFLAGS += -taso
- CXXFLAGS += -ieee
+ CXXFLAGS += -ieee -timplicit_local
FC := f77
FCLIBS := -lUfor -lfor -lFutil -lots
X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
@@ -458,6 +576,15 @@ ifeq ($(G4SYSTEM),DEC-cxx)
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
# OGLLIBS := -lMesaGLU -lMesaGL
endif
+ ifdef G4USE_STL
+ CPPFLAGS += -I$(RWINC)/wrappers/$(G4SYSTEM)
+ CXXFLAGS += -nostdnew
+ endif
+ ifdef G4USE_OSPACE
+ CPPFLAGS += -DOS_OSF1_4 -DOS_NEW_CHECK -DOS_STL_ASSERT -DOS_NO_WSTRING -DOS_NO_ALLOCATORS -D__NO_EDG_EXCEPTION_CLASSES
+ CPPFLAGS += -I$(RWINC)/wrappers/$(G4SYSTEM) $(OSPACEINC) -I$(OSPACEDIR)
+ CXXFLAGS += -nostdnew
+ endif
endif
# ------ GNU/LINUX ------
@@ -470,14 +597,15 @@ ifeq ($(G4SYSTEM),Linux-g++)
CXXFLAGS += -O
else
CXXFLAGS += -g
- FCFLAGS := -g
+ FCFLAGS := -g
+ CCFLAGS := -g
endif
FC := g77
FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
FCLIBS := -lf2c
ECHO := /bin/echo
X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
- X11LIBS := -L/usr/X11/lib -lXmu -lXt -lXext -lX11 -lSM -lICE
+ X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lSM -lICE
XMFLAGS := -I/usr/X11R6/include
XMLIBS := -lXm -lXpm
ifndef OGLFLAGS
@@ -487,29 +615,41 @@ ifeq ($(G4SYSTEM),Linux-g++)
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
endif
OIVFLAGS += -I$(OIHOME)/include
+ ifdef G4USE_OSPACE
+ CPPFLAGS += -DOS_LINUX_2 -DOS_NEW_CHECK -DOS_STL_ASSERT -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
+ CPPFLAGS += -I$(OSPACEDIR)/ospace/std -I$(OSPACEDIR)
+ endif
endif
-# ------ WIN32/VC/NICE ------
+# ------ WIN32/VC ------
#
-ifeq ($(G4SYSTEM),WIN32-VC-NICE)
+ifeq ($(G4SYSTEM),WIN32-VC)
CXX := CL
G4_HAVE_BOOL := yes
G4_NO_CBRT := yes
ifdef G4OPTIMISE
CXXFLAGS += -Ox
else
- CXXFLAGS += -Od
+ CXXFLAGS += -Od -Zi -Fd$(G4LIBDIR)/lib$(name)
endif
- CXXFLAGS += -GX -Zm200 -DWIN32 # -TP
+ CXXFLAGS += -MD -GX -Zm200 -nologo -DWIN32 -D_CONSOLE
+ CXXFLAGS += -D_WIN32 -DOS -DG4NOT_ISO_DELETES
+ CPPFLAGS += -DWIN32 -DRW_NO_XMSG
#
# Should set $INCLUDE environment, if not set as below
#
-# CXXFLAGS += -I'\\srv1_info\v2\vc50pro1\DEVSTUDIO\VC\INCLUDE'
+ifdef G4USE_OSPACE
+ CXXFLAGS += $(OSPACEINC)
+else
+ifdef G4USE_STLPORT
+ CXXFLAGS += $(OSPACEINC)
+endif #stlport
+endif #ospace
- LDFLAGS += -FORCE
+ LDFLAGS += -FORCE /NODEFAULTLIB:MSVCRT.dll
#
-# Should set $LIB environment, if not set as below
+# Should set $LIB environment to include VC++ Studio lib directories, e.g.
#
# $(LIB_PATH)"c:\ProgramFiles\DevStudio\vc\lib" \
# $(LIB_PATH)'\\srv1_info\v2\vc50pro1\DEVSTUDIO\VC\LIB' \
@@ -561,7 +701,11 @@ ifdef G4_NO_CBRT
endif
# Standard Template Library (STL) not installed
-CPPFLAGS += -DRW_NO_STL
+ifndef G4USE_STL
+ ifndef G4USE_OSPACE
+ CPPFLAGS += -DRW_NO_STL
+ endif
+endif
# Verbosity code can be left out (for better performance)
# by defining G4_NO_VERBOSE.
diff --git a/config/binmake.gmk b/config/binmake.gmk
index 43a77879ed..c88cb22b89 100644
--- a/config/binmake.gmk
+++ b/config/binmake.gmk
@@ -1,4 +1,4 @@
-# $Id: binmake.gmk,v 2.22 1998/12/01 22:59:47 gcosmo Exp $
+# $Id: binmake.gmk,v 1.29 1999/07/06 15:19:42 gunter Exp $
# ----------------------------------------------------------
# Script defining rules and paths for making binaries.
# Gabriele Cosmo, 25/06/1998.
@@ -27,6 +27,7 @@ ifndef INCFLAGS
-I$(G4BASE)/particles/hadrons/barions/include \
-I$(G4BASE)/particles/hadrons/ions/include \
-I$(G4BASE)/particles/hadrons/mesons/include \
+ -I$(G4BASE)/particles/shortlived/include \
-I$(G4BASE)/processes/management/include \
-I$(G4BASE)/processes/general/include \
-I$(G4BASE)/processes/decay/include \
@@ -37,6 +38,7 @@ ifndef INCFLAGS
-I$(G4BASE)/processes/electromagnetic/muons/include \
-I$(G4BASE)/processes/electromagnetic/utils/include \
-I$(G4BASE)/processes/electromagnetic/xrays/include \
+ -I$(G4BASE)/processes/electromagnetic/lowenergy/include \
-I$(G4BASE)/processes/hadronic/management/include \
-I$(G4BASE)/processes/hadronic/processes/include \
-I$(G4BASE)/processes/hadronic/util/include \
@@ -58,6 +60,7 @@ ifndef INCFLAGS
-I$(G4BASE)/geometry/management/include \
-I$(G4BASE)/geometry/solids/CSG/include \
-I$(G4BASE)/geometry/solids/BREPS/include \
+ -I$(G4BASE)/geometry/solids/Boolean/include \
-I$(G4BASE)/geometry/solids/STEP/include \
-I$(G4BASE)/geometry/solids/STEPinterface/include \
-I$(G4BASE)/geometry/volumes/include \
@@ -92,84 +95,162 @@ ifdef G4ODBMS
-DHep_HAS_BUILDIN_BOOL_CONSTANTS
endif
-ifndef LDLIBS
-
-ifdef G4EXLIB
- LDLIBS := -l$(G4TARGET) $(VISLIBS) $(UILIBS)
-else
- LDLIBS := $(VISLIBS) $(UILIBS)
-endif
-
-ifdef G4ODBMS
- LDLIBS += -lG4persistency
-endif
-
- LDLIBS += \
- -lG4readout \
- -lG4run \
- -lG4event \
- -lG4tracking \
- -lG4processes \
- -lG4particles \
- -lG4digits+hits \
- -lG4track \
- -lG4materials \
- -lG4geometry \
- -lG4graphics_reps \
- -lG4intercoms \
- -lG4global \
- $(INTYLIBS)
-endif
-
-ifdef G4ODBMS
- LDFLAGS += -L$(OBJY_DIR)/lib \
- -L$(HEP_ODBMS_DIR)/lib
-
-# Note: -loo_sahr.4.02 and -lHepODBMS should be placed
-# _before_ -l$(CLHEP_LIB) -l$(RWLIB)
-
- LDLIBS += -loo_shar.4.02 -lHepODBMS
-endif
-
CPPFLAGS += $(INCFLAGS)
LDFLAGS += -L$(G4LIBDIR)
-LDLIBS += $(LOADLIBS)
G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(G4TARGET)
G4BINDIR := $(G4BIN)/$(G4SYSTEM)
ifdef G4EXLIB
-G4LIBDIR := $(G4TMPDIR)
-LDFLAGS += -L$(G4LIBDIR)
-include $(G4INSTALL)/config/common.gmk
+ G4LIBDIR := $(G4TMPDIR)
+ LDFLAGS += -L$(G4LIBDIR)
+ include $(G4INSTALL)/config/common.gmk
+endif
+
+GLOBALLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4global.a && echo yes)
+
+ifdef LDLIBS
+ USER_DEFINED_LDLIBS := 1
+endif
+
+# Because of the script for granular libraries which replaces part of LDLIBS
+# and because of the way user defined LDLIBS was augmented historically I
+# have split LDLIBS into 4 parts...
+#
+ifndef USER_DEFINED_LDLIBS
+
+# LDLIBS1 contains the very high level libraries...
+#
+ifdef G4EXLIB
+ LDLIBS1 := -l$(G4TARGET)
+endif
+
+# VISLIBS and UILIBS are now handles by the granular library script...
+#
+ifdef GLOBALLIBS
+ LDLIBS1 += $(VISLIBS) $(UILIBS)
+endif
+
+ifdef G4ODBMS
+ LDLIBS1 += -lG4persistency
+endif
+
+ifdef GLOBALLIBS
+ LDLIBS2 := -lG4readout \
+ -lG4run \
+ -lG4event \
+ -lG4tracking \
+ -lG4processes \
+ -lG4particles \
+ -lG4digits+hits \
+ -lG4track \
+ -lG4materials \
+ -lG4geometry \
+ -lG4graphics_reps \
+ -lG4intercoms \
+ -lG4global
+else
+# The next line specifically should read LDLIBS2 = , not LDLIBS2 :=, so
+# that it is not expanded until the directory G4TMPDIR is created.
+ LDLIBS2 = $(shell \
+ G4TMP=$(G4TMP); export G4TMP; \
+ if [ \( -f $(G4LIB)/$(G4SYSTEM)/liblist \
+ -a -f $(G4LIB)/$(G4SYSTEM)/libname.map \) ]; then \
+ $(G4LIB)/$(G4SYSTEM)/liblist \
+ -d $(G4TMPDIR) \
+ < $(G4LIB)/$(G4SYSTEM)/libname.map; fi)
+# Extra libraries to resolve remaining circular dependencies...
+# LDLIBS2 +=
+endif
+
+# LDLIBS3 contains the first set of low level libraries...
+#
+LDLIBS3 += $(INTYLIBS)
+
+endif # ifndef USER_DEFINED_LDLIBS
+
+# LDLIBS4 contains the next set of low level libraries which historically
+# (why?) the user is not supposed to be able to define...
+#
+ifdef G4ODBMS
+ LDFLAGS += -L$(OBJY_DIR)/lib \
+ -L$(HEP_ODBMS_DIR)/lib
+
+# Note: -l$(OBJY_LDLIB) and -lHepODBMS should be placed
+# _before_ -l$(CLHEP_LIB) -l$(RWLIB)
+
+ LDLIBS4 += -l$(OBJY_LDLIB) -lHepODBMS
+endif
+ifdef G4USE_OSPACE
+ LDLIBS4 += $(OSPACELIBS)
+endif
+
+LDLIBS4 += $(EXTRALIBS)
+LDLIBS4 += $(LOADLIBS)
+
+# Finally assemble libraries...
+#
+ifdef USER_DEFINED_LDLIBS
+ LDLIBS_PREFINAL := $(LDLIBS)
+else
+ LDLIBS_PREFINAL = $(LDLIBS1) $(LDLIBS2) $(LDLIBS3)
+endif
+LDLIBS_PREFINAL += $(LDLIBS4)
+
+ifeq ($(G4SYSTEM),WIN32-VC)
+ WIN32TMP := $(patsubst -L%,$(LIB_PATH)%,$(LDFLAGS))
+ LDFLAGS = $(patsubst /,$(PATH_DEL),$(WIN32TMP))
+ LDLIBS = $(patsubst -l%,lib%.a,$(LDLIBS_PREFINAL))
+else
+ LDLIBS = $(LDLIBS_PREFINAL)
endif
-LDLIBS += $(EXTRALIBS)
sources := $(wildcard $(G4TARGET).cc)
objects := $(patsubst %.cc,$(G4TMPDIR)/exe/%.o,$(sources))
dependencies := $(patsubst %.cc,$(G4TMPDIR)/exe/%.d,$(sources))
-.PHONY: bin clean clean_bin
+LINK_DEPENDENCIES := $(G4TMPDIR)/exe/obj.last
+
+.PHONY: bin clean clean_bin debug
# Make $(G4TARGET) executable.
bin: $(G4BINDIR)/$(G4TARGET)
-ifeq ($(G4SYSTEM),WIN32-VC-NICE)
- WIN32TMP := $(patsubst -L%,$(LIB_PATH)%,$(LDFLAGS))
- LDFLAGS = $(patsubst /,$(PATH_DEL),$(WIN32TMP))
- LDLIBS := $(patsubst -l%,lib%.a,$(LDLIBS))
+$(G4BINDIR)/$(G4TARGET): $(LINK_DEPENDENCIES)
+ifndef USER_DEFINED_LDLIBS
+ ifndef GLOBALLIBS
+ @echo "WARNING: This assumes you are using granular libraries!"
+ @echo "WARNING: It looked for your global library G4global and,"
+ @echo " not finding it, assumes you are using granular"
+ @echo " libraries."
+ @echo "WARNING: If you did not intend this, interrupt now (CTRL-C),"
+ @echo " and go back and make global libraries, i.e.,"
+ @echo ' cd $$G4INSTALL/source'
+ @echo " gmake global"
+ @if [ ! \( -f $(G4LIB)/$(G4SYSTEM)/liblist \
+ -a -f $(G4LIB)/$(G4SYSTEM)/libname.map \) ]; then \
+ echo "ERROR: No liblist program or library map file."; \
+ echo " These are needed for building with granular"; \
+ echo " libraries."; \
+ echo ' cd $$G4INSTALL/source'; \
+ echo " gmake"; \
+ echo " or if you are sure you have already made all the"; \
+ echo " granular libraries:"; \
+ echo " gmake libmap"; \
+ exit 1; fi
+ endif
endif
-
-$(G4BINDIR)/$(G4TARGET): $(G4TMPDIR)/exe/obj.last
@if [ ! -d $(G4BINDIR) ] ; then mkdir $(G4BINDIR) ;fi
ifdef CPPVERBOSE
$(CXX) $(CXXFLAGS) $(CPPFLAGS) \
- -o $(G4BINDIR)/$(G4TARGET) $(objects) $(LDFLAGS) $(LDLIBS)
+ -o $(G4BINDIR)/$(G4TARGET) $(objects) $(LDFLAGS) \
+ $(LDLIBS)
else
@echo Linking $(G4TARGET) ...
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) \
- -o $(G4BINDIR)/$(G4TARGET) $(objects) $(LDFLAGS) $(LDLIBS)
+ -o $(G4BINDIR)/$(G4TARGET) $(objects) $(LDFLAGS) \
+ $(LDLIBS)
endif
# Touch the versioning file
@@ -197,13 +278,8 @@ $(G4TMPDIR)/exe/$(G4TARGET).d: $(G4TARGET).cc
@if [ ! -d $(G4TMPDIR) ] ; then mkdir $(G4TMPDIR) ;fi
@if [ ! -d $(G4TMPDIR)/exe ] ; then mkdir $(G4TMPDIR)/exe ;fi
@echo Making dependency for file $<...
-ifeq ($(G4SYSTEM),Linux-g++)
- @($(ECHO) -n $(G4TMPDIR)/exe/ ; \
+ @($(ECHO) $(G4TMPDIR)/exe/\\c ; \
g++ -MM $(RWINCGPP) $(CPPFLAGS) $< ) | sed 's!$(G4TMPDIR)/exe/$*.o!& $@!' >$@
-else
- @($(ECHO) $(G4TMPDIR)/\\c ; \
- g++ -MM $(RWINCGPP) $(CPPFLAGS) $< ) | sed 's!$(G4TMPDIR)/exe/$*.o!& $@!' >$@
-endif
-include $(dependencies)
clean:
diff --git a/config/common.gmk b/config/common.gmk
index 1f0fa55212..b291703031 100644
--- a/config/common.gmk
+++ b/config/common.gmk
@@ -1,4 +1,4 @@
-# $Id: common.gmk,v 2.7 1998/07/29 00:53:08 gcosmo Exp $
+# $Id: common.gmk,v 1.1 1999/01/07 15:58:32 gunter Exp $
# ----------------------------------------------------------------
# Common part of GNUmakefile for libraries. John Allison, 5/7/95.
# ----------------------------------------------------------------
diff --git a/config/globlib.gmk b/config/globlib.gmk
index 8e3a07f611..2bd8055f84 100644
--- a/config/globlib.gmk
+++ b/config/globlib.gmk
@@ -1,4 +1,4 @@
-# $Id: globlib.gmk,v 2.15 1998/12/11 00:40:21 gcosmo Exp $
+# $Id: globlib.gmk,v 1.2 1999/07/06 15:19:44 gunter Exp $
# --------------------------------------------------------------
# Script for compound libraries. Gabriele Cosmo, 25/6/98.
# --------------------------------------------------------------
@@ -36,7 +36,7 @@ $(G4LIBDIR)/lib$(name).a: \
#
#
#
- @if [ X$(G4SYSTEM) = XWIN32-VC-NICE ] ; i=NO; \
+ @if [ X$(G4SYSTEM) = XWIN32-VC ] ; i=NO; \
then \
(( for lib in $(SUBLIBS); \
do ( if [ $$i = NO ]; \
diff --git a/config/interactivity.gmk b/config/interactivity.gmk
index 709d5d1988..39fc6d38a5 100644
--- a/config/interactivity.gmk
+++ b/config/interactivity.gmk
@@ -11,7 +11,7 @@
# Other libraries
-########################### OpenGL, Inventor ############
+########################### Inventor ############
# Should be before OpenGL.
ifdef INC_IV
@@ -23,15 +23,8 @@ ifdef LOAD_IV
INTYLIBS += $(OIVLIBS)
endif
-ifdef INC_GL
- CPPFLAGS += $(OGLFLAGS)
-endif
-ifdef LOAD_GL
- INTYLIBS += $(OGLLIBS)
-endif
-
########################### OPACS #######################
-# X11 things must come after.
+# OpenGL, X11 things must come after.
ifdef INC_OPACS
CPPFLAGS += -I$(COROOT)/include -I$(XXROOT)/include -I$(WOROOT)/include
@@ -70,6 +63,15 @@ endif
endif
+########################### OpenGL ###############################
+
+ifdef INC_GL
+ CPPFLAGS += $(OGLFLAGS)
+endif
+ifdef LOAD_GL
+ INTYLIBS += $(OGLLIBS)
+endif
+
########################### Motif, Athena, X11 ###################
# Motif raise X11 flags.
diff --git a/config/liblist.c b/config/liblist.c
new file mode 100644
index 0000000000..d6591c115a
--- /dev/null
+++ b/config/liblist.c
@@ -0,0 +1,512 @@
+/* $Id: liblist.c,v 1.7 1999/07/02 12:27:38 stesting Exp $ */
+
+/*
+Given a "libname.map" file on standard input and a list or directory
+of .d dependency files liblist produces:
+ a) without -l option, a library list ordered according to the libname.map,
+ giving a warning if conflicting dependencies are found in the .d files.
+ b) with -l option, another libname.map, ordered according firstly to the
+ original libname.map file, then reordered according to the dependencies
+ found in the .d files. This option is used for compiling the file
+ libname.map from all the dependencies.
+The .d files are specfied in the argument(s).
+The libname.map is on standard input.
+
+Usage:
+ liblist *.d < libname.map
+ liblist -d < libname.map
+ liblist -l *.d < libname.map
+ liblist -ld < libname.map
+ liblist -l -d < libname.map
+where is a directory name of a directory which is recursively
+searched for dependency files.
+
+Frank Behner, John Allison 13th February 1999.
+*/
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#define BUFSIZE 1000000
+#define TRIGSIZE 1000
+#define NLIBMAX 200
+
+extern char *optarg;
+extern int optind, opterr, optopt;
+
+char** parsedir(char *directory,int *argc)
+{
+ DIR *actualdir;
+ FILE *actualfile;
+ struct dirent *entry;
+ char *buffer=0;
+ struct stat status;
+ char **targv=0,**ptr,**phelp;
+ int len,targc,s;
+
+ /*Open the actual directory*/
+ actualdir=opendir(directory);
+
+ /*Loop over all entries */
+ for(entry=readdir(actualdir);entry!=NULL;entry=readdir(actualdir))
+ {
+ /* Throw away . and .. */
+ if(strcmp(entry->d_name,".")==0 ||
+ strcmp(entry->d_name,"..")==0) continue;
+ /* Obtain the status information of that entry */
+ if(buffer) free(buffer);
+ buffer=(char*) malloc((strlen(directory)+
+ strlen(entry->d_name)+2)*sizeof(char));
+ strcpy(buffer,directory);
+ strcat(buffer,"/");
+ strcat(buffer,entry->d_name);
+ s=stat(buffer,&status);
+ if(s==0)
+ {
+ if(S_ISDIR(status.st_mode))
+ {
+ /* a directory, so we are going recursive*/
+ targc=0;
+ ptr=parsedir(buffer,&targc);
+ if(targc)
+ {
+ phelp=targv;
+ targv=(char**) malloc((*argc+targc)*sizeof(char*));
+ memcpy(targv,phelp,*argc*sizeof(char*));
+ memcpy(&targv[*argc],ptr,targc*sizeof(char*));
+ *argc+=targc;
+ free(phelp);
+ free(ptr);
+ }
+ }
+ else if(S_ISREG(status.st_mode))
+ {
+ /* a regular file is it .d? */
+ len=strlen(entry->d_name);
+ if(entry->d_name[len-2]=='.' && entry->d_name[len-1]=='d')
+ {
+ phelp=targv;
+ targv=(char**) malloc((*argc+1)*sizeof(char*));
+ memcpy(targv,phelp,*argc*sizeof(char*));
+ targv[*argc]=strdup(buffer);
+ (*argc)++;
+ free(phelp);
+ }
+ }
+ }
+ else
+ perror(" No status");
+ }
+
+ if(buffer) free(buffer);
+ closedir(actualdir);
+
+ return targv;
+}
+
+
+int main (int argc, char** argv) {
+
+ char buffer[BUFSIZE],*bufferPtr,workbuf[256];
+ char *ptr,*p,**pp,**pp1,**pp2,*directory=0;
+ char **rargv;
+ int i,optl=0,swapping,c,rargc;
+ FILE *fp;
+
+#ifdef _WIN32
+ char *ntg4tmp=0,*ntg4tmp1=0;
+ int nti;
+#endif
+
+ struct libmap_
+ {
+ char *lib;
+ char *trigger;
+ int used;
+ char **uses;
+ struct libmap_ *next;
+ };
+
+ struct libmap_ *libmap=0,*libmapPtr=0,*libmapPtr1=0,*libmapPtr2=0,
+ *prevPtr1,*prevPtr2,*tmpp,*userLibmapPtr;
+
+ while((c=getopt(argc,argv,"ld:"))!=EOF)
+ {
+ switch(c)
+ {
+ case 'l':
+ optl=1;
+ break;
+ case 'd':
+ directory=strdup(optarg);
+ break;
+ }
+ }
+
+ /*Adjust parameters after parsing options */
+
+ if(optindnext)
+ {
+ if(strcmp(libmapPtr1->lib,ptr)==0)
+ {
+ fprintf(stderr," ERROR: Duplicate library name: %s\n",ptr);
+ fprintf(stderr,
+ " Perhaps a duplicate subdirectory with"
+ " a GNUmakefile with the same library name.\n"
+ );
+ exit(1);
+ }
+ }
+
+ if(libmap)
+ {
+ libmapPtr->next=(struct libmap_*) malloc(sizeof(struct libmap_));
+ libmapPtr=libmapPtr->next;
+ }
+ else /* First time through anchor libmapPtr to libmap. */
+ {
+ libmap=(struct libmap_*) malloc(sizeof(struct libmap_));
+ libmapPtr=libmap;
+ }
+ libmapPtr->next=0;
+ libmapPtr->lib=strdup(ptr);
+ libmapPtr->used=0;
+ libmapPtr->uses=(char**)calloc(NLIBMAX,sizeof(char*));
+
+ /* If option -l not specified, fill uses list... */
+ if(!optl)
+ {
+ pp=libmapPtr->uses;
+ if(ptr)
+ {
+ ptr=strtok(NULL," \n");
+ while (ptr)
+ {
+ *pp=strdup(ptr);
+ pp++;
+ ptr=strtok(NULL," \n");
+ }
+ }
+ }
+
+ /* Get directory name... */
+ gets(buffer);
+ ptr=strtok(buffer,"/");
+ if(!ptr)
+ {
+ fprintf(stderr," ERROR: \"/\" before \"source\" expected.\n");
+ exit(1);
+ }
+ while(ptr&&strcmp (ptr,"source"))ptr=strtok(NULL,"/");
+ ptr=strtok(NULL,"/");
+ if(!ptr)
+ {
+ fprintf(stderr," ERROR: \"source\" expected.\n");
+ exit(1);
+ }
+ libmapPtr->trigger=(char*)malloc(TRIGSIZE);
+ strcpy(libmapPtr->trigger,ptr);
+ ptr=strtok(NULL,"/");
+ while(ptr&&strcmp(ptr,"GNUmakefile"))
+ {
+ strcat(libmapPtr->trigger,"/");
+ strcat(libmapPtr->trigger,ptr);
+ ptr=strtok(NULL,"/");
+ }
+ if(!ptr)
+ {
+ fprintf(stderr," ERROR: \"source//GNUmakefile\" expected.\n");
+ exit(1);
+ }
+ }
+
+ if(optl)fprintf(stderr," Reading dependency files...\n");
+
+#ifdef _WIN32
+ ntg4tmp=getenv("G4TMP");
+ if ( ! ntg4tmp )
+ {
+ fprintf(stderr," ERROR: Cannot find environment variable G4TMP\n");
+ exit(1);
+ }
+ ntg4tmp1=strdup(ntg4tmp);
+#endif
+
+ for(i=0;inext)
+ {
+ strcpy(workbuf,libmapPtr->lib);
+ /* Add trailing "/" to distinguish track/ and tracking/, etc. */
+ strcat(workbuf,"/");
+ if(strstr(ptr,workbuf)) break;
+ }
+ if(libmapPtr)
+ {
+ userLibmapPtr=libmapPtr;
+ }
+ else
+ {
+ userLibmapPtr=0;
+ }
+
+ /* Look for a "used" library and add it to the "user" uses list... */
+ do
+ {
+ for(libmapPtr=libmap;libmapPtr;libmapPtr=libmapPtr->next)
+ {
+ strcpy(workbuf,libmapPtr->trigger);
+ strcat(workbuf,"/include");
+ ptr=strstr(buffer,workbuf);
+ if(ptr)
+ {
+ libmapPtr->used=1;
+ if(userLibmapPtr)
+ {
+ for(pp=userLibmapPtr->uses;*pp;pp++)
+ {
+ if(strcmp(*pp,libmapPtr->lib)==0)break;
+ }
+ if(!*pp)*pp=libmapPtr->lib;
+ }
+ }
+ }
+ fgets(buffer,BUFSIZE,fp);
+
+#ifdef _WIN32
+ while ( ptr=strchr(buffer,'\\') ) *ptr='/';
+
+ while (ntg4tmp1 && (ptr=strstr(buffer,ntg4tmp1)) )
+ {
+ for(nti=0;ntinext)
+ {
+ for(pp=libmapPtr->uses;*pp;pp++)
+ {
+ for(libmapPtr1=libmap;libmapPtr1!=libmapPtr;
+ libmapPtr1=libmapPtr1->next)
+ {
+ if(strcmp(libmapPtr1->lib,*pp)==0)
+ {
+ for(pp1=libmapPtr1->uses;*pp1;pp1++)
+ {
+ if(strcmp(*pp1,libmapPtr->lib)==0)break;
+ }
+ if(*pp1)
+ {
+ fprintf
+ (stderr,
+ " WARNING: %s and %s use each other.\n",
+ libmapPtr->lib,
+ libmapPtr1->lib);
+ }
+ }
+ else
+ {
+ /* Not right yet...
+ for(pp1=libmapPtr1->uses;*pp1;pp1++)
+ {
+ for(libmapPtr0=libmap;libmapPtr0!=libmapPtr1;
+ libmapPtr0=libmapPtr0->next)
+ {
+ if(libmapPtr0==*pp)
+ {
+ fprintf
+ (stderr,
+ " WARNING: triangular dependecy:\n"
+ " %s uses %s uses %s uses %s.\n",
+ libmapPtr->lib,
+ libmapPtr1->lib,
+ libmapPtr0->lib,
+ libmapPtr->lib);
+ }
+ }
+ }
+ */
+ }
+ }
+ }
+ }
+
+ fprintf(stderr," Reordering according to dependencies...\n");
+ do
+ {
+ swapping=0;
+ prevPtr2=0;
+ for(libmapPtr=libmap;libmapPtr;libmapPtr=libmapPtr->next)
+ {
+ for(pp=libmapPtr->uses;*pp;pp++)
+ {
+ prevPtr1=0;
+ for(libmapPtr1=libmap;libmapPtr1!=libmapPtr;
+ libmapPtr1=libmapPtr1->next)
+ {
+ if(strcmp(libmapPtr1->lib,*pp)==0)
+ {
+ /* Check that 1st doesn't use 2nd... */
+ for(pp1=libmapPtr1->uses;*pp1;pp1++)
+ {
+ if(strcmp(*pp1,libmapPtr->lib)==0)break;
+ }
+ if(!*pp1) /* If not... */
+ {
+ swapping=1;
+ /* Make previous of 1st now point to 2nd... */
+ if(prevPtr1)
+ {
+ prevPtr1->next=libmapPtr;
+ }
+ else
+ {
+ libmap=libmapPtr;
+ }
+ /* Make 2nd now point to what 1st did, unless
+ it's adjacent, in which case make it point
+ to 1st itself... */
+ tmpp=libmapPtr->next;
+ if(libmapPtr1->next==libmapPtr)
+ {
+ libmapPtr->next=libmapPtr1;
+ }
+ else
+ {
+ libmapPtr->next=libmapPtr1->next;
+ }
+ /* Make previous of 2nd point to 1st, unless
+ it's adjacent, in which case leave it... */
+ if(libmapPtr1->next!=libmapPtr)
+ {
+ prevPtr2->next=libmapPtr1;
+ }
+ /* Make 1st now point to what 2nd did... */
+ libmapPtr1->next=tmpp;
+ break;
+ }
+ }
+ prevPtr1=libmapPtr1;
+ }
+ if(swapping)break;
+ }
+ prevPtr2=libmapPtr;
+ if(swapping)break;
+ }
+ }while(swapping);
+
+ fprintf(stderr," Writing new library map file...\n");
+ for(libmapPtr=libmap;libmapPtr;libmapPtr=libmapPtr->next)
+ {
+ printf("%s:",libmapPtr->lib);
+ for(pp=libmapPtr->uses;*pp;pp++)
+ {
+ printf(" %s",*pp);
+ }
+ printf("\n");
+ printf("source/%s/GNUmakefile\n",libmapPtr->trigger);
+ }
+ }
+ else
+ {
+ /* Add dependent libraries... */
+ for(libmapPtr=libmap;libmapPtr;libmapPtr=libmapPtr->next)
+ {
+ if(libmapPtr->used)
+ {
+ for(pp=libmapPtr->uses;*pp;pp++)
+ {
+ for(libmapPtr1=libmap;libmapPtr1;libmapPtr1=libmapPtr1->next)
+ {
+ if(strcmp(libmapPtr1->lib,*pp)==0)
+ {
+ libmapPtr1->used=1;
+ }
+ }
+ }
+ }
+ }
+
+ /* Write out library list... */
+ for(libmapPtr=libmap;libmapPtr;libmapPtr=libmapPtr->next)
+ {
+ if(libmapPtr->used)
+ {
+ printf("-l%s ",libmapPtr->lib);
+ }
+ }
+ }
+
+ exit(0);
+
+}
diff --git a/environments/History b/environments/History
index d7588cd849..a114858804 100644
--- a/environments/History
+++ b/environments/History
@@ -1,4 +1,4 @@
-$Id: History,v 2.10 1998/12/11 20:26:05 allison Exp $
+$Id: History,v 1.3 1999/05/20 10:13:46 johna Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,17 @@ committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
+
+envs-01-00-02 20th May 1999 John Allison
+- Only OPACS and History tagged.
+- Archived Momo (cvs remove) which puts it in the Attic. Can be retrieved
+ with cvs update -D 990519 environmants/Momo.
+- OPACS development (Guy).
+- XVT not currently under development.
+
+envs-00-04-01 7th January 1999 hajime Yoshida
+- New Momo with make capabilities along with library selection
+- GGEmake updated for the latest g++ (egcs-1.1)
envs-00-04-01 11th December 1998 Hajime Yoshida Masayasu Nagamatu
- The latest version of GGE, the whole *.java, *.class and example files committed
diff --git a/environments/Momo/.Momoext b/environments/Momo/.Momoext
deleted file mode 100644
index fb5fc7e208..0000000000
--- a/environments/Momo/.Momoext
+++ /dev/null
@@ -1,26 +0,0 @@
-#Momo Plug-in example
-# An example of Momo/Tcl Plug-in
-#1998 July 20 H Yoshida
-
-# A line starting with # is a comment line.
-# An empty line is ignored.
-# Momoseparator is a separation line between menu items.
-# Any Unix X-window applications can be invoked by describing
-# the command name and associated arguments.
-# See the example below.
-# Commands are executed in the background.
-# But & is not necessary at the end of a line.
-
-java gge
-#java gag
-
-xclock
-
-Momoseparator
-xterm
-
-Momoseparator
-netscape
-
-
-
diff --git a/environments/Momo/.Momorc b/environments/Momo/.Momorc
deleted file mode 100644
index 5462655b19..0000000000
--- a/environments/Momo/.Momorc
+++ /dev/null
@@ -1,5 +0,0 @@
-FONT -adobe-courier-bold-r-normal--14-100-100-100-m-90-iso8859-1
-GUI_STYLE horizontal
-GUI_POSITION left
-FORE_GROUND_COLOR #000000000
-BACK_GROUND_COLOR #b5bfffa3c
diff --git a/environments/Momo/G4UIGAG.history b/environments/Momo/G4UIGAG.history
deleted file mode 100644
index 0159abd76d..0000000000
--- a/environments/Momo/G4UIGAG.history
+++ /dev/null
@@ -1,73 +0,0 @@
- History file for the G4UIGAG class
-
-
-4 Dec 1998
-- ready for release
- - java GAG and Tcl/tk GAG are protected against G4binary with
- G4UIterminal session. They terminate the execution of
- the G4binary and become ready to run other G4binaries
- with G4UIGAG session.
-
- - The above is associated with minor modification (only one line)
- in G4UIterminal.cc
-
- - many cosmetic changes, specially for Java GAG
-
- - JDK1.2 version is yet to come.
-
- - G4UIGAG is now completely equivalent with G4UIterminal in
- the terminal mode. Including Help functions.
-
-20 Aug
-- Beta-01
-
-6 July 1998
-- ready for beta
-
-July , 1998
--@@Ask is introduced. G4UIGAG does nothing and simply passes it to
-GAG.
-
-July, 1998
-
-- bug fixed. (uiMode == terminal_mode)
-
-Apr 15, 98
-- sendDisableList() is fully implemented. Now the command is properly
- disabled when the state transition occurs.
- The state transition is detected only when entering the interaction loop
- such as {preInit, Idle} state. This limitation comes from our design
- choice to avoid any overhead when the beam is on.
-- modified the showCurrent() to open an error message window if the
- current value is not properly set. The "@@ErrResult" protocol is used.
-
-Apr 14, 98
-- fixed the "hang" bug when the current value is asked. The showCurrent()
- is modified to handle the embedded null string of the current value.
-
-Apr 06, 98
-- renamed getRangeString() to getRange()
-
-March 26, 98
-- minor bug fix for the help command, terminalHelp() is modified.
-
-March 16, 98
-- bug fix for the Disable list.
-- This is the stable version because the functionality is tested using a
- check list.
-
-March 13, 98
-- handles the parameter update of each command, such as "on the fly"
- updation of the candidate list
-- handles the dynamic menu reconfigration using /test/installVis command
-
-March 12, 98
-- change the specification of @@PROMPT and @@State
-- added internal routines such as "sendATclParamProperty()"
-- send the range string of G4UIcommand
-
-March 10, 98
-- modify to send the protocol version string (@@Version) of GAG
-- send the disable list (ad hoc version to test GUI)
-- send the attributes of command/parameter even if it is not defined
-
diff --git a/environments/Momo/GGEmake/DrawDAWN.g4m b/environments/Momo/GGEmake/DrawDAWN.g4m
deleted file mode 100644
index 7884e1a237..0000000000
--- a/environments/Momo/GGEmake/DrawDAWN.g4m
+++ /dev/null
@@ -1,10 +0,0 @@
-#GGE draw macro
-/vis~/create_view/new_graphics_system DAWN
-/vis~/camera/viewpoint 60. 30.
-/vis~/camera/zoom 2
-/vis~/set/drawing_style 2
-/vis~/set culling on
-/vis~/set/cull_by_density on 0.01
-/vis~/draw/current
-/vis~/draw/axes 0 0 0 10000 mm
-/vis~/show/view
diff --git a/environments/Momo/GGEmake/DrawDAWNFILE.g4m b/environments/Momo/GGEmake/DrawDAWNFILE.g4m
deleted file mode 100644
index ee492a932a..0000000000
--- a/environments/Momo/GGEmake/DrawDAWNFILE.g4m
+++ /dev/null
@@ -1,10 +0,0 @@
-#GGE draw macro
-/vis~/create_view/new_graphics_system DAWNFILE
-/vis~/camera/viewpoint 60. 30.
-/vis~/camera/zoom 2
-/vis~/set/drawing_style 2
-/vis~/set culling on
-/vis~/set/cull_by_density on 0.01
-/vis~/draw/current
-/vis~/draw/axes 0 0 0 10000 mm
-/vis~/show/view
diff --git a/environments/Momo/GGEmake/DrawOGLIX.g4m b/environments/Momo/GGEmake/DrawOGLIX.g4m
deleted file mode 100644
index 87d7da70f7..0000000000
--- a/environments/Momo/GGEmake/DrawOGLIX.g4m
+++ /dev/null
@@ -1,10 +0,0 @@
-#GGE draw macro
-/vis~/create_view/new_graphics_system OGLIX
-/vis~/camera/viewpoint 60. 30.
-/vis~/camera/zoom 2
-/vis~/set/drawing_style 2
-/vis~/set culling on
-/vis~/set/cull_by_density on 0.01
-/vis~/draw/current
-/vis~/draw/axes 0 0 0 10000 mm
-
diff --git a/environments/Momo/GGEmake/GNUmakefile b/environments/Momo/GGEmake/GNUmakefile
deleted file mode 100644
index 3616105383..0000000000
--- a/environments/Momo/GGEmake/GNUmakefile
+++ /dev/null
@@ -1,17 +0,0 @@
-# $Id: GNUmakefile,v 1.2 1998/11/12 10:49:50 yhajime Exp $
-# --------------------------------------------------------------
-# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
-# --------------------------------------------------------------
-
-name := myDetector
-G4TARGET := $(name)
-G4EXLIB := true
-
-ifndef G4INSTALL
- G4INSTALL = ../../..
-endif
-
-.PHONY: all
-all: lib bin
-
-include $(G4INSTALL)/config/binmake.gmk
diff --git a/environments/Momo/GGEmake/GNUmakefile.light b/environments/Momo/GGEmake/GNUmakefile.light
deleted file mode 100644
index 8e15abd0d2..0000000000
--- a/environments/Momo/GGEmake/GNUmakefile.light
+++ /dev/null
@@ -1,37 +0,0 @@
-# $Id: GNUmakefile.light,v 1.2 1998/11/12 10:49:52 yhajime Exp $
-# --------------------------------------------------------------
-# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
-# --------------------------------------------------------------
-
-name := exampleN01
-G4TARGET := $(name)
-G4EXLIB := true
-
-ifndef G4INSTALL
- G4INSTALL = ../../..
-endif
-
-LDLIBS := \
- -l$(G4TARGET) \
- -lG4run \
- -lG4event \
- -lG4tracking \
- -lG4bosons \
- -lG4partman \
- -lG4transportation \
- -lG4procman \
- -lG4track \
- -lG4materials \
- -lG4digits+hits \
- -lG4csg \
- -lG4geometrymng \
- -lG4volumes \
- -lG4magneticfield \
- -lG4graphics_reps \
- -lG4intercoms \
- -lG4global
-
-.PHONY: all
-all: lib bin
-
-include $(G4INSTALL)/config/binmake.gmk
diff --git a/environments/Momo/GGEmake/History b/environments/Momo/GGEmake/History
deleted file mode 100644
index cb47307881..0000000000
--- a/environments/Momo/GGEmake/History
+++ /dev/null
@@ -1,23 +0,0 @@
-$Id: History,v 1.2 1998/11/12 10:49:54 yhajime Exp $
--------------------------------------------------------------------
-
- =========================================================
- Geant4 - an Object-Oriented Toolkit for Simulation in HEP
- =========================================================
-
- Example N01 History file
- ------------------------
-This file should be used by the G4 example coordinator to briefly
-summarize all major modifications introduced in the code and keep
-track of all tags.
-
- ----------------------------------------------------------
- * Reverse chronological order (last date on top), please *
- ----------------------------------------------------------
-
-May 07, 98 M.Asai
-- First commitment of all classes.
-
-April 09, 98 G. Cosmo
-
-- Created.
diff --git a/environments/Momo/GGEmake/README b/environments/Momo/GGEmake/README
deleted file mode 100644
index d12b580674..0000000000
--- a/environments/Momo/GGEmake/README
+++ /dev/null
@@ -1,433 +0,0 @@
- README of GGE; GEANT4 Geometry Editor
-
- 1998 Oct. 15
- 1998 Sep. 24
- 1998 Sep. 10
- 1998 Aug. 31
- Hajime YOSHIDA
- Naruto University of Education
-
-1) Introduction
-
- GGE, GEANT4 Geometry Editor, is a visual tool to "create" a
-detector geometry after GEANT4's.
-
-It provides users with tables
-into which users can fill with their detector parameters. After the
-data in the tables, GGE creates C++ source codes for a detector.
-When a user uses default functions of GGE, C++ codes generated by GGE is a complete
-description of a detector, including the definition of atoms, materials, solids, color attributes,
-logical volumes and physical volumes with rotations and translations.
-The C++ source codes are saved into files and can be compiled to make a GEANT4 executable.
-A minimum set of files for the GEANT4 managers to visualise the detector as well as
-a GNUMakefile are provided for that.
-
-GAG is helpful to have a visualization of the whole detector.
-Simple macro files are associated, too, for visualisation.
-
- GGE consists of two editors (material and volume) which are
-interrelated upon users' request. Volume editor provides Single
-Positioned Volume, Repeated Volumes with incremental copy numbers
-(translational arrangement or axially symmetric arrangement), Replicas (in any axis)
-and Parametrized volumes(not yet).
-
-GGE is based on Java's MVC model, or Swing so that any change or input to the tables by a user
-are automatically reflected to the internal data structure of GGE and C++ codes.
-
-2) Functions of GGE
-
- 2.1) Material Editor
- a) implemented in this version
-
- + append, insert, edit and delete a material
- + material from scratch
- + material by combination (number or fractional ratios)
- + periodic table of atoms automatically popped up to create a material
- + default states are provided (material state, temperature, pressure)
- + canonical physical units in GEANT4 selectable from a combobox
-
- + "in Use" mark for materials used in user's detector
- + materials used in the logical volumes are automatically made "in Use".
- + user can add any materials "in Use" to have C++ constructors
-
- + persistent material file
- + load, append or save a material file
- + an exemplary persistent material database file "MaterialDB.g4mt" from the PDG
-
- b)not yet implemented
-
- - material from materials (coming soon)
- - isotope (planned)
- - protection from duplicated "in Use" instances of the same materials.
-
- 2.2) Volume Editor ; logical and physical volumes
-
- a)implemented
-
- + G4Solids
- + CSG solids
- + G4box, G4tubs, G4cons, G4trd
- + parameters and canonical units
- + preview with DAWN (automatically chosen world size)
- + BREPs
- + Pcone, Pgon
- + any number of nodes and facets with parameters and canonical units
- + preview with DAWN (automatically chosen world size)
- + G4LogicalVolume
- + create, delete a logical volume
- + Its name, G4Solid, material, visualization attributes
- + selectable G4Solid among the above candidates
- + type-in materials name (drag and drop is planned)
- + Color Chooser to specify visualization attribute (color and its name)
- + Used materials link to material DB
-
- + G4PVPlacement ; arrangement of physical volumes
- + Type 1 constructor = rotation of the frame, physical mother volume
- + Type 2 constructor = rotation of a body, physical mother volume
- + Type 3 constructor = rotation of the frame, logical mother volume
- + Type 4 constructor = rotation of a body, logical mother volume
-
- + Single Positioned Volume (SPV)
- + mother volume is either
- null(Master Reference System), logical or physical
- + MARS is constructed first in C++ code.
- + translation in the X, Y or Z direction (default is no translation)
- + rotation around X, Y or Z axis with an angle (frame or body)
-
- + Repeated Volumes with incremental copy numbers (RVArrangement)
- + translational arrangement of any number of copies of a logical volume
- + placements in the X, Y or Z direction
- + the position of the first copy and incremental step size
- + with respect to a logical or physical mother volume
- + axially symmetric arrangement
- + rotational axis is parallel to X, Y or Z axis
- + rotation of the frames or a body
- + position of the center of axial symmetry
- + radius of axially symmetric arrangement
- + starting angle and incremental step angle with number of copies
- + logical or physical mother volume
-
- + Replica
- + replication in the X, Y or Z direction
- + replication in rho, phi or Z direction
- + width (in length or angle) and number of replicas
- + offset (in length or angle)
- + logical or physical mother volume
-
- b)to be implemented
-
- - other CSG solids
-
- - paremetrised volumes
- - linear scaling
- - linear rotation
-
- 2.3) Generation of C++ code ; "MyDetectorConstruction.cc"
-
- a) implemented
- + C++ code is output to a editor widget
- + necessary header files are automatically included
- + save the file with a file chooser
- + order of creating instances;
- G4Elements, G4Material, G4VisAttributes, G4Solids, G4LogicalVolume,
- Single Positioned Volumes, Repeated Volumes, Replicas
- x order of instantiation inside each section is decided by GGE user,
- except MARS
- + return the instance name of the MARS
-
- b)not implemented
- - automatic correct ordering of constructors of volumes
-
-
- 2.4) GGEmake; a directory containing the GEANT4 codes to compile and visualize the detector
- a) implemented
- + GNUmakefile
- + myDetector.cc ; main() with GAG session and visualization manager
- + src/ directory contains
- + MyDetectorConstruction.cc
- + MyPhysicsList.cc
- + MyPrimaryGeneratorAction.cc
- + MyVisManager.cc
- + include/ directory
-
- 2.5) compile and visualize with Momo and GAG
-
- a) implemented
-
- + canonical scheme of GEANT4 to compile
- + make G4TARGET=myDetector
- + the binary is created as $G4INSTALL/bin/G4SYSTEM/myDetector
-
- + Momo (GAG, Compile and GGE buttons)
- + rapid cycling of GGE and GAG to edit and view the geometry
- + a macro file for visualization (OGLIX default) "DrawDAWN.g4m", etc..
-
- b) not implemented
- - automatic "calibration" of the detector with geantino
-
- 2.6) exemplary persistent detector files with *.g4dt suffix
- + 3D array of lead plates using translational RVArrangement
- + BREP Pcones trumpetss using axially symmetric RVArrangement
- + Replicas to form cylinders
-
--------------------------------------------------------------------------
-
-3) Installation
-
-The minimum set to get C++ source code
- 1) GGE.jar file
- 2) Java interpreter ; java
-Additional set to compile
- 3) GEANT4 toolkit with compiled libraries
- 4) GGEmake directory
-Additional set to visualise and use GUI
- 4) DAWN (plus Ghostview) or OGLIX or VRML
- 5) GAG (Java version) or GAG.jar file
-Additional too to make life easy
- 6) Momo to use all the above ingredients; Momo.jar file
- (without Momo, you have to invoke GGE, compile and GAG respectively in windows.)
-
-3.1) Java and Swing
-We have tested GGE on Unix-en (Linux and Solaris) and Windows (95/NT).
-
- 3.1.1) Unix:
-
- + Linux: jdk1.1.3 or later(i.,e., jdk-1.1.6) + Swing-1.0.2
- 1) jdk1.1.5 may have bugs, while jdk1.1.6 works
- 2) GGE co-works with Swing-1.0.2 and not with 1.0.1 (or maybe not
- with 1.0.3).
- 3) we are testing the current GGE with JRE1.2-beta04. The present source can be
- compiled but doesn't execute correctly. In any case
- Sun has announced on 17 August that JDK1.2 will be delayed
- till November!!
- + Solaris: jdk1.1.6 + swing-1.0.2
-
-
- We assume that you have
- 1)jdk1.1.6/bin/java (Java interpreter) to which paths are set
- 2)Swing-1.0.2 which is defreezed and placed in $HOME/swing/swingall.jar
-
- 3.1.2) Windows:
-
- We use JBuilder2 with Swing-1.0.2. Note that you have to
- eliminate all other libraries than swing-1.0.2, after having
- copied it into JBuilder2.
-
- We are trying JDK1.2beta4 + JRE1.2 with JBuilder2.
-
- NOTE! At present we have not Momo/GAG for Windows. So,
- you can only create C++ code under the Windows.
-
-3.2) GGE and related files
-The latest product of GGE is that of Sep. 24.
-All *.java, *.class and GGE.jar files are placed in
- geant4beta/environments/Momo/java/Momo/GGE
-
-Only "GGE.jar" file is necessary to run GGE.
-
- GGE/*.java GGE source files
- GGE/*.class GGE byte code files
- GGE/GGE.jar jar archive file to which CLASSPATH must be set
- GGE/*.g4mt material database after PDG data
- GGE/*.g4dt exampleN0x detector file
-C++ source codes and GNUmakefiles to compile with GEANT4 are placed in
- geant4beta/environments/Momo/GGEmake.
-
-Only geantino is instantiated in the initialization of GEANT4, so that it is quite
-rapid to have a visualization of the geometry. You can choose DAWN, OpenGL or VRML system.
-
- GGEmake/myGGEdetector.cc main() program
- /GNUmakefile
- /src
- /src/MyDetectorConstruction.cc C++ generated by GGE
- /src/MyPrimaryGeneratorAction.cc geantino gun
- /src/MyVisManager.cc DAWN, DAWNFILE, OGLIX, OGLSX, VRML1, VRML1FILE
- /src/MyPhysicsList.cc geantino definition
- /include/*.hh
- /GGEdraw.g4m default macro file to visualize with OGLIX
-
-3.3) install, setenv and run
-
- %set path=($path jdk1.1.6/bin) <=== add the path to java and javac
- %setenv CLASSPATH .:$HOME/swing/swingall.jar:$HOME/geant4beta/environments/Momo/java/Momo/GGE/GGE.jar
-
-
- Then in any directory, you can invoke GGE.
-
- %java gge
-
-
-3.4) DAWN, Tcl/Tk and Postscript for the preview of CSG or BREP solids
- If you don't use GGE's preview button, these are not necessary.
-
- If you want to preview G4Solids, you have to install
-DAWN, Fukui renderer as well as Tcl/Tk wish (Tcl/Tk 8.0) for its GUI.
-DAWN uses also Postscript to draw *.prim files.
-
-For the visualization of the whole detector, DAWN or Mesa (for OGLIX)
-are necessary.
-
-3.5) GEANT4 toolkit and its environments
-The visualization manager instantiates DAWN, DAWNFILE, OPENGLIX,
-OPENGLSX, VRML, VRMLFILE. So, you have to setenv accordingly.
-
-4) A First Lesson; how to use GGE.
-
-Here is a walk-through of how to use GGE.
-
-4.1) Visualize the prefabricated detector sample
- 1) In a xterm, type %java gge
- 2) In the "Volume window", select "Load a Volume file" menu
- and double click on "trumpetBREP.g4dt"
- 3) Click "Makesource" and select "Make C++ code". Have a look of the generated C++ code.
- 4) Save the C++ code (overwrite the existing one)
- in .../GGEmake/src/MyDetectorConstruction.cc" using the file chooser.
- 5) In another xterm, go to the directory GGEmake/ and type
- %make G4TARGET=myGGEdetector
-
- Watch if there is any compilation error. At present,
- GGE is made so that it generates correct C++ codes,
- if a user uses GGE correctly.
-
- In the example of "trumpetBREP.g4dt", a few warnings are shown on BREP.
- 6) Check that you have "myGGEdetector" executable, in $(G4INSTALL)/bin/$(G4SYSTEM)
- 7) In another xterm, type
- %java gag
-
- and with the "Run GEANT4" button, choose and run "myGGEdetector".
- 8) Use /control/execute command and double click on "GGEdraw.g4m".
- To have a better view, use vis~ commands (camera/viewpoint, zoom etc).
- You can select DAWNFILE to draw and have a PS hardcopy.
-
-4.2) Modify the prefabricated detector
- Now let's change the detector configuration. Go to the "Volume" window
- and change any part of it, including material.
-
-4.2.1) Changing materials
-
- 1) First, you have to "Clear Material" in the Material editor.
- 2) Then, select "Load material" and double click on "MaterialDB.g4mt".
- Now you have a list of materials.
- 3) Then, in the "Logical Volume" panel, double click the box you want to change
- and type in the name of the material in the material editor.
- 4) Change as many materials as you like and push "Used Material" button.
- You see that materials you have typed in are marked "Used" in red.
- If not, you might have mistyped the name of a material.
- 5) If you want to use additional materials, select "Use" in the material
- editor (the leftmost column).
- 6) Push "Makesource" and see your change has been realized in the C++ code.
-
- NOTE!! Be careful that there are no duplicated "Used" materials, when
- you load the material DB without "Clear Material".
-
-4.2.2) Modifying the size parameters of solids
-
- To change the sizes of G4 solids
- 1) click a "solid" box of the logical volume of your choice.
- 2) You have a pop-up window to edit the parameters. Change a parameter
- or its unit, as you like.
- 3) Push "Makesource" and see if your changes have been correctly applied
- to C++ code.
- 4) In case of BREP solids, the pop-up window has variable number of columns
- to accept any number of nodes.
- 5) For complicated solids like BREPs, preview may be useful. Click "View"
- button and you have a view with the DAWN renderer. Its g4.prim file
- is also shown in an edit-able widget.
-
-4.2.3) Changing the type of solid of an existing logical volume
- You may want to replace the current G4Solid with another one. In the
- present GGE you can't do so directly. You have to "Create" a new logical
- volume with the type of solid you want and then delete the unnecessary volume.
-
- 1) Choose your new solid with "Select Solid" combo-box.
- 2) Push "Create" button and you have a pop-up window to input parameters.
- 3) Type in numbers and select their units.
- 4) Preview if you like and then push "OK".
- 5) Check the C++ code.
-
-4.2.4) Changing visualization attributes (Color).
- 1) You have to "Create" a new VisAttributes
- 2) Upon the "Create" button, you have a Color Chooser.
- 3) Select RGB (not HSV). Set your color with slide-bars.
- 4) Give it a name, and push "OK". Then you have a color circle and name in the
- VisAttrib panel.
- 5) Edit the VisAtb box in the LogicalVolume panel.
- 6) See the C++ code.
-
-4.2.5) Changing Repeated Volumes
-
-
-
-
-"exampleN01.g4dt" contains three "single positioned volumes"
- and one "repeated volumes" in the X direction.
- Change the parameter of repetition such as the number
- or width, or you can add another "repeated volumes"
- in another direction.
-
- In "trumpetBREP.g4dt" you can edit BREPs, adding new faces etc..
-
- b) making C++ code "MyDetectorConstruction.cc" and compile.
-
- Finally, back to the step 3 and recompile.
-
-
- Opening GGE, compile, GAG simultaneously, you can
- test and improve the geometry, just like creating
- HTML or TeX documents.
-
-
-4) Naming conventions in GGE
-
- Knowledge of GGE's naming convention is helpful to read the generated C++ code as
-well as using GGE correctly.
-
- 4-1) Elements and materials
-
- a) Elements are named "elementXXX", where XXX stands for the
- element's symbol in the periodic table.
- b) materials are named just as you have typed in the second column
- of the material window.
-
- 4-2) solids and logical volumes
- The "Name" typed in the first (leftmost) column of the "Logical Volume"
- is used to name the corresponding solid. If the name "world" is given
- to a logical volume of a Box, the G4Solid has an instance "solidworld".
- 4-3) logical and physical volumes
- The instance of a physical volume defined by "pName" has a name prefixed
- with "physical", i.,e., instance's name is "physical" + pName ( + =>
- string concatenation). "logical" is added to the instance of a logical
- volume.
- In case of SPV (single positioned volume), the columns "pName" (instance of
- physical volume) and "pLogical" may have the same strings.
-
- In case of RVA (repeated volumes arrangement), "pName" is different from
- "pLogical" whose copies are repeatedly placed.
-
- 4-4) All variables are named after their proper instances.
- See for example, the control variable used in the for loop in the
- RVA.
-
- Another examples are arrays to define BREP geometry.
-5) Default values and combo-boxes
-
-
-5.1) Default optional values of materials
- GGE provides default values in a pre-filled columns or with the
- combo-boxes. "Use", "State" and "Unit" columns are equipped with
- combo-boxes. Temperature and pressure column are pre-filled with
- 273.15 * kelvin and 1 * atmosphere.
-5.2) Default values in volumes
- "Mother Type" is either NULL (mother of all), logical (type 2, 4 constructors)
- or physical (type 2 or 4 constructors) in G4PVPlacement.
-
-
-
-
-
-
-
-
-
-
-
diff --git a/environments/Momo/GGEmake/include/MyDetectorConstruction.hh b/environments/Momo/GGEmake/include/MyDetectorConstruction.hh
deleted file mode 100644
index dc76b9431a..0000000000
--- a/environments/Momo/GGEmake/include/MyDetectorConstruction.hh
+++ /dev/null
@@ -1,31 +0,0 @@
-// This code implementation is the intellectual property of
-// the RD44 GEANT4 collaboration.
-//
-// By copying, distributing or modifying the Program (or any work
-// based on the Program) you indicate your acceptance of this statement,
-// and all its terms.
-//
-// $Id: MyDetectorConstruction.hh,v 1.2 1998/11/12 10:50:05 yhajime Exp $
-// GEANT4 tag $Name: geant4-00 $
-//
-
-#ifndef MyDetectorConstruction_H
-#define MyDetectorConstruction_H 1
-
-class G4VPhysicalVolume;
-
-#include "G4VUserDetectorConstruction.hh"
-
-class MyDetectorConstruction : public G4VUserDetectorConstruction
-{
- public:
- MyDetectorConstruction();
- ~MyDetectorConstruction();
-
- public:
- G4VPhysicalVolume* Construct();
-
-};
-
-#endif
-
diff --git a/environments/Momo/GGEmake/include/MyPhysicsList.hh b/environments/Momo/GGEmake/include/MyPhysicsList.hh
deleted file mode 100644
index 7a72b813a3..0000000000
--- a/environments/Momo/GGEmake/include/MyPhysicsList.hh
+++ /dev/null
@@ -1,47 +0,0 @@
-// This code implementation is the intellectual property of
-// the RD44 GEANT4 collaboration.
-//
-// By copying, distributing or modifying the Program (or any work
-// based on the Program) you indicate your acceptance of this statement,
-// and all its terms.
-//
-// $Id: MyPhysicsList.hh,v 1.2 1998/11/12 10:50:06 yhajime Exp $
-// GEANT4 tag $Name: geant4-00 $
-//
-//
-//
-// ExN01PhysicsList
-// Construct/define particles and physics processes
-//
-// Particle defined in ExampleN01
-// geantino
-//
-// Process defined in ExampleN01
-// transportation
-//
-
-#ifndef MyPhysicsList_h
-#define MyPhysicsList_h 1
-
-#include "G4VUserPhysicsList.hh"
-#include "globals.hh"
-
-class MyPhysicsList: public G4VUserPhysicsList
-{
- public:
- MyPhysicsList();
- ~MyPhysicsList();
-
- protected:
- // Construct particle and physics process
- void ConstructParticle();
- void ConstructProcess();
- void SetCuts(G4double cut);
-
-};
-
-#endif
-
-
-
-
diff --git a/environments/Momo/GGEmake/include/MyPrimaryGeneratorAction.hh b/environments/Momo/GGEmake/include/MyPrimaryGeneratorAction.hh
deleted file mode 100644
index bc97da0fb7..0000000000
--- a/environments/Momo/GGEmake/include/MyPrimaryGeneratorAction.hh
+++ /dev/null
@@ -1,35 +0,0 @@
-// This code implementation is the intellectual property of
-// the RD44 GEANT4 collaboration.
-//
-// By copying, distributing or modifying the Program (or any work
-// based on the Program) you indicate your acceptance of this statement,
-// and all its terms.
-//
-// $Id: MyPrimaryGeneratorAction.hh,v 1.2 1998/11/12 10:50:06 yhajime Exp $
-// GEANT4 tag $Name: geant4-00 $
-//
-
-#ifndef MyPrimaryGeneratorAction_h
-#define MyPrimaryGeneratorAction_h 1
-
-#include "G4VUserPrimaryGeneratorAction.hh"
-
-class G4ParticleGun;
-class G4Event;
-
-class MyPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
-{
- public:
- MyPrimaryGeneratorAction();
- ~MyPrimaryGeneratorAction();
-
- public:
- void GeneratePrimaries(G4Event* anEvent);
-
- private:
- G4ParticleGun* particleGun;
-};
-
-#endif
-
-
diff --git a/environments/Momo/GGEmake/include/MyVisManager.hh b/environments/Momo/GGEmake/include/MyVisManager.hh
deleted file mode 100644
index 2363375e84..0000000000
--- a/environments/Momo/GGEmake/include/MyVisManager.hh
+++ /dev/null
@@ -1,50 +0,0 @@
-// This code implementation is the intellectual property of
-// the RD44 GEANT4 collaboration.
-//
-// By copying, distributing or modifying the Program (or any work
-// based on the Program) you indicate your acceptance of this statement,
-// and all its terms.
-//
-// $Id: MyVisManager.hh,v 1.2 1998/11/12 10:50:07 yhajime Exp $
-// GEANT4 tag $Name: geant4-00 $
-//
-//
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
-// Example Visualization Manager implementing virtual function
-// RegisterGraphicsSystems. Exploits C-pre-processor variables
-// G4VIS_USE_DAWN, etc., which are set by the GNUmakefiles if
-// environment variables of the same name are set.
-
-// So all you have to do is set environment variables and compile and
-// instantiate this in your main().
-
-// Alternatively, you can implement an empty function here and just
-// register the systems you want in your main(), e.g.:
-// G4VisManager* myVisManager = new MyVisManager;
-// myVisManager -> RegisterGraphicsSystem (new MyGraphicsSystem);
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
-#ifndef MyVisManager_h
-#define MyVisManager_h 1
-
-#include "G4VisManager.hh"
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
-class MyVisManager: public G4VisManager {
-
-public:
-
- MyVisManager ();
-
-private:
-
- void RegisterGraphicsSystems ();
-
-};
-
-#endif
diff --git a/environments/Momo/GGEmake/myDetector.cc b/environments/Momo/GGEmake/myDetector.cc
deleted file mode 100644
index 2c438af50f..0000000000
--- a/environments/Momo/GGEmake/myDetector.cc
+++ /dev/null
@@ -1,81 +0,0 @@
-// This code implementation is the intellectual property of
-// the RD44 GEANT4 collaboration.
-//
-// By copying, distributing or modifying the Program (or any work
-// based on the Program) you indicate your acceptance of this statement,
-// and all its terms.
-//
-// $Id: myDetector.cc,v 1.1 1998/11/12 10:50:01 yhajime Exp $
-// GEANT4 tag $Name: geant4-00 $
-//
-//
-// --------------------------------------------------------------
-// GEANT 4 - GGEVis.cc
-//
-// For information related to this code contact:
-// CERN, IT Division, ASD Group
-// --------------------------------------------------------------
-// Comments
-//
-//
-// --------------------------------------------------------------
-
-#include "G4RunManager.hh"
-#include "G4UImanager.hh"
-#include "G4UIGAG.hh"
-#include "MyDetectorConstruction.hh"
-#include "MyPhysicsList.hh"
-#include "MyPrimaryGeneratorAction.hh"
-
-#ifdef G4VIS_USE
-#include "MyVisManager.hh"
-#endif
-
-
-#include "g4templates.hh"
-
-int main()
-{
- // Construct the default run manager
- G4RunManager* runManager = new G4RunManager;
-
- // set mandatory initialization classes
- runManager->SetUserInitialization(new MyDetectorConstruction);
- runManager->SetUserInitialization(new MyPhysicsList);
-
-#ifdef G4VIS_USE
- // visualization manager
- G4VisManager* visManager = new MyVisManager;
- visManager->Initialize();
-#endif
-
- // set mandatory user action class
- runManager->SetUserAction(new MyPrimaryGeneratorAction);
-
- // Initialize G4 kernel
- runManager->Initialize();
-
- // get the pointer to the User Interface manager
- G4UImanager* UI = G4UImanager::GetUIpointer();
-
- G4UIsession * session = new G4UIGAG;
- session->SessionStart();
- delete session;
-
-
- // job termination
-#ifdef G4VIS_USE
- delete visManager;
-#endif
-
- delete runManager;
- return 0;
-}
-
-
-
-
-
-
-
-
diff --git a/environments/Momo/GGEmake/src/MyDetectorConstruction.cc b/environments/Momo/GGEmake/src/MyDetectorConstruction.cc
deleted file mode 100644
index 81ba0ae9eb..0000000000
--- a/environments/Momo/GGEmake/src/MyDetectorConstruction.cc
+++ /dev/null
@@ -1,117 +0,0 @@
-//------HeaderFile-
- #include "MyDetectorConstruction.hh"
-
-#include "G4UnitsTable.hh"
-
-#include "G4VUserDetectorConstruction.hh"
-
-#include "globals.hh"
-#include "G4Material.hh"
-#include "G4MaterialTable.hh"
-#include "G4Element.hh"
-#include "G4ElementTable.hh"
-#include "G4Box.hh"
-#include "G4Tubs.hh"
-#include "G4LogicalVolume.hh"
-#include "G4ThreeVector.hh"
-#include "G4PVPlacement.hh"
-#include "G4PVReplica.hh"
-#include "G4SDManager.hh"
-#include "G4VisAttributes.hh"
-#include "G4Colour.hh"
-
-MyDetectorConstruction::MyDetectorConstruction( )
-{ ; }
-MyDetectorConstruction::~MyDetectorConstruction( )
-{ ; }
-G4VPhysicalVolume* MyDetectorConstruction::Construct( )
-{
-// Elements
-G4Element* elementN = new G4Element( "Nitrogen", "N", 7. , 14.00674*g/mole );
-G4Element* elementO = new G4Element( "Oxygen", "O", 8. , 15.9994*g/mole );
-G4Element* elementH = new G4Element( "Hydrogen", "H", 1. , 1.00794*g/mole );
-G4Element* elementC = new G4Element( "Carbon", "C", 6. , 12.011*g/mole );
-
-// Materials from Combination
-
-G4Material* Air = new G4Material("Air", 1.205*g/cm3, 2, kStateGas, 293.0*kelvin, 1.0*atmosphere );
-Air->AddElement( elementN, 3 );
-Air->AddElement( elementO, 1 );
-G4Material* Methane = new G4Material("Methane", 0.4241*g/cm3, 2, kStateLiquid, 111.7*kelvin, 1.0*atmosphere );
-Methane->AddElement( elementH, 4 );
-Methane->AddElement( elementC, 1 );
-
-// Materials from Scratch
-
-G4Material* Cu = new G4Material("Cu", 29, 63.546*g/mole, 8.96*g/cm3,kStateSolid, 293.0*kelvin, 1.0*pascal );
-G4Material* Xeliquid = new G4Material("Xeliquid", 54, 131.29*g/mole, 3.52*g/cm3,kStateLiquid, 165.0*kelvin, 1.0*atmosphere );
-
-// Visualization attributes
-
-
-G4VisAttributes * blue= new G4VisAttributes( G4Colour(133,255,255 ));
-
-G4VisAttributes * darkgray= new G4VisAttributes( G4Colour(75,84,87 ));
-
-G4VisAttributes * trackred= new G4VisAttributes( G4Colour(234,84,87 ));
-
-G4VisAttributes * calred= new G4VisAttributes( G4Colour(234,178,87 ));
-
-// Logical Volumes
-
-G4Box *solidexpHall= new G4Box("solidexpHall", 5.0*m, 2.0*m, 2.0*m );
-G4LogicalVolume * logicalexpHall = new G4LogicalVolume(solidexpHall, Air, "logicalexpHall" ,0,0,0);
-logicalexpHall->SetVisAttributes(blue);
-G4Box *solidcalblock= new G4Box("solidcalblock", 60.0*cm, 11.0*cm, 11.0*cm );
-G4LogicalVolume * logicalcalblock = new G4LogicalVolume(solidcalblock, Xeliquid, "logicalcalblock" ,0,0,0);
-logicalcalblock->SetVisAttributes(darkgray);
-G4Tubs *solidtracker= new G4Tubs("solidtracker", 0.0*cm, 60.0*cm, 50.0*cm, 0.0*deg, 360.0*deg );
-G4LogicalVolume * logicaltracker = new G4LogicalVolume(solidtracker, Methane, "logicaltracker" ,0,0,0);
-logicaltracker->SetVisAttributes(trackred);
-G4Box *solidcallayer= new G4Box("solidcallayer", 1.0*cm, 10.0*cm, 10.0*cm );
-G4LogicalVolume * logicalcallayer = new G4LogicalVolume(solidcallayer, Cu, "logicalcallayer" ,0,0,0);
-logicalcallayer->SetVisAttributes(calred);
-G4Box *solidcalstack= new G4Box("solidcalstack", 60.0*cm, 11.0*cm, 68.0*cm );
-G4LogicalVolume * logicalcalstack = new G4LogicalVolume(solidcalstack, Xeliquid, "logicalcalstack" ,0,0,0);
-logicalcalstack->SetVisAttributes(darkgray);
-
-// Physical Volumes -------Single Positioned Volume, Repeated Volumes, Replicas---------------------------
-
-
-// Single Positioned Volumes
-
-G4VPhysicalVolume * physicalexpHall= new G4PVPlacement(0,G4ThreeVector(0.0*m,0.0*mm,0.0*cm), "physicalexpHall",logicalexpHall,NULL,false, 0);
-
-G4VPhysicalVolume * physicaltracker= new G4PVPlacement(0,G4ThreeVector(-1.0*m,0.0*mm,0.0*cm), "physicaltracker",logicaltracker,physicalexpHall,false, 0);
-
-
-// Repeated Volumes
-
-G4int copycallayerx;
-copycallayerx=0;
-for (G4int callayerx=1; callayerx<=20; callayerx++){
- G4double transcallayerx =-55.0*cm+5.0*cm*(callayerx-1);
- G4VPhysicalVolume * physicalcallayerx = new G4PVPlacement(0,G4ThreeVector(transcallayerx,0.0*cm,0.0*cm), logicalcallayer,"physicalcallayerx",logicalcalblock,false,copycallayerx++);
-}
-
-G4int copystacky;
-copystacky=0;
-for (G4int stacky=1; stacky<=6; stacky++){
- G4double transstacky =-66.0*cm+22.0*cm*(stacky-1);
- G4VPhysicalVolume * physicalstacky = new G4PVPlacement(0,G4ThreeVector(0.0*cm, transstacky, 0.0*mm), logicalcalblock,"physicalstacky",logicalcalstack,false,copystacky++);
-}
-G4int copystackz;
-copystackz=0;
-for (G4int stackz=1; stackz<=6; stackz++){
- G4double transstackz =-68.0*cm+22.0*cm*(stackz-1);
- G4VPhysicalVolume * physicalstackz = new G4PVPlacement(0,G4ThreeVector(80.0*cm,0.0*cm,transstackz), "physicalstackz", logicalcalstack, physicalexpHall,false,copystackz++);
-}
-
-// Replicas
-
-
-// return the physical World
-
-
- return physicalexpHall;
-}
diff --git a/environments/Momo/GGEmake/src/MyPhysicsList.cc b/environments/Momo/GGEmake/src/MyPhysicsList.cc
deleted file mode 100644
index aeab1572f6..0000000000
--- a/environments/Momo/GGEmake/src/MyPhysicsList.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// This code implementation is the intellectual property of
-// the RD44 GEANT4 collaboration.
-//
-// By copying, distributing or modifying the Program (or any work
-// based on the Program) you indicate your acceptance of this statement,
-// and all its terms.
-//
-// $Id: MyPhysicsList.cc,v 1.1 1998/09/02 12:10:38 masayasu Exp $
-// GEANT4 tag $Name: geant4-00 $
-//
-//
-
-#include "MyPhysicsList.hh"
-#include "G4ParticleTypes.hh"
-
-
-MyPhysicsList::MyPhysicsList()
-{;}
-
-MyPhysicsList::~MyPhysicsList()
-{;}
-
-void MyPhysicsList::ConstructParticle()
-{
- // In this method, static member functions should be called
- // for all particles which you want to use.
- // This ensures that objects of these particle types will be
- // created in the program.
-
- G4Geantino::GeantinoDefinition();
-}
-
-void MyPhysicsList::ConstructProcess()
-{
- // Define transportation process
-
- AddTransportation();
-}
-
-void MyPhysicsList::SetCuts(G4double cut)
-{
- // set a cut value to all particles
-
- SetCutValueForOthers(cut);
-}
-
-
diff --git a/environments/Momo/GGEmake/src/MyPrimaryGeneratorAction.cc b/environments/Momo/GGEmake/src/MyPrimaryGeneratorAction.cc
deleted file mode 100644
index e09cdc0e4d..0000000000
--- a/environments/Momo/GGEmake/src/MyPrimaryGeneratorAction.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-// This code implementation is the intellectual property of
-// the RD44 GEANT4 collaboration.
-//
-// By copying, distributing or modifying the Program (or any work
-// based on the Program) you indicate your acceptance of this statement,
-// and all its terms.
-//
-// $Id: MyPrimaryGeneratorAction.cc,v 1.1 1998/09/02 12:10:39 masayasu Exp $
-// GEANT4 tag $Name: geant4-00 $
-//
-
-#include "MyPrimaryGeneratorAction.hh"
-
-#include "G4Event.hh"
-#include "G4ParticleGun.hh"
-#include "G4UImanager.hh"
-#include "globals.hh"
-
-MyPrimaryGeneratorAction::MyPrimaryGeneratorAction()
-{
- G4int n_particle = 1;
- particleGun = new G4ParticleGun(n_particle);
-
- G4UImanager* UI = G4UImanager::GetUIpointer();
- UI->ApplyCommand("/gun/particle geantino");
- UI->ApplyCommand("/gun/energy 1.0 GeV");
- UI->ApplyCommand("/gun/position -2.0 0.0 0.0 m");
-}
-
-MyPrimaryGeneratorAction::~MyPrimaryGeneratorAction()
-{
- delete particleGun;
-}
-
-void MyPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
-{
- G4UImanager* UI = G4UImanager::GetUIpointer();
- G4int i = anEvent->GetEventID() % 3;
- switch(i)
- {
- case 0:
- UI->ApplyCommand("/gun/direction 1.0 0.0 0.0");
- break;
- case 1:
- UI->ApplyCommand("/gun/direction 1.0 0.1 0.0");
- break;
- case 2:
- UI->ApplyCommand("/gun/direction 1.0 0.0 0.1");
- break;
- }
-
- particleGun->GeneratePrimaryVertex(anEvent);
-}
-
-
diff --git a/environments/Momo/GGEmake/src/MyVisManager.cc b/environments/Momo/GGEmake/src/MyVisManager.cc
deleted file mode 100644
index 84a56a296c..0000000000
--- a/environments/Momo/GGEmake/src/MyVisManager.cc
+++ /dev/null
@@ -1,140 +0,0 @@
-// This code implementation is the intellectual property of
-// the RD44 GEANT4 collaboration.
-//
-// By copying, distributing or modifying the Program (or any work
-// based on the Program) you indicate your acceptance of this statement,
-// and all its terms.
-//
-// $Id: MyVisManager.cc,v 1.1 1998/09/02 12:10:40 masayasu Exp $
-// GEANT4 tag $Name: geant4-00 $
-//
-//
-// John Allison 24th January 1998.
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
-#ifdef G4VIS_USE
-
-#include "MyVisManager.hh"
-
-// Supported drivers...
-
-#ifdef G4VIS_USE_DAWN
-#include "G4FukuiRenderer.hh"
-#endif
-
-#ifdef G4VIS_USE_DAWNFILE
-#include "G4DAWNFILE.hh"
-#endif
-
-#ifdef G4VIS_USE_OPENGLX
-#include "G4OpenGLImmediateX.hh"
-#include "G4OpenGLStoredX.hh"
-#endif
-
-
-#ifdef G4VIS_USE_VRML
-#include "G4VRML1.hh"
-// #include "G4VRML2.hh"
-#endif
-
-#ifdef G4VIS_USE_VRMLFILE
-#include "G4VRML1File.hh"
-//#include "G4VRML2File.hh"
-#endif
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
-MyVisManager::MyVisManager () {}
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
-void MyVisManager::RegisterGraphicsSystems () {
-
-#ifdef G4VIS_USE_DAWN
- RegisterGraphicsSystem (new G4FukuiRenderer);
-#endif
-
-#ifdef G4VIS_USE_DAWNFILE
- RegisterGraphicsSystem (new G4DAWNFILE);
-#endif
-
-
-#ifdef G4VIS_USE_OPENGLX
- RegisterGraphicsSystem (new G4OpenGLImmediateX);
- RegisterGraphicsSystem (new G4OpenGLStoredX);
-#endif
-
-
-#ifdef G4VIS_USE_VRML
- RegisterGraphicsSystem (new G4VRML1);
-// RegisterGraphicsSystem (new G4VRML2);
-#endif
-
-#ifdef G4VIS_USE_VRMLFILE
- RegisterGraphicsSystem (new G4VRML1File);
-// RegisterGraphicsSystem (new G4VRML2File);
-#endif
-
- if (fVerbose > 0) {
- G4cout <<
- "\nYou have successfully chosen to use the following graphics systems."
- << endl;
- PrintAvailableGraphicsSystems ();
- }
-}
-
-#endif
-
-//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/environments/Momo/README.GGE b/environments/Momo/README.GGE
deleted file mode 100644
index 39f86a1d9c..0000000000
--- a/environments/Momo/README.GGE
+++ /dev/null
@@ -1,449 +0,0 @@
- README of GGE; GEANT4 Geometry Editor
-
- 1998 Dec. 11
- 1998 Oct. 15
- 1998 Sep. 24
- 1998 Sep. 10
- 1998 Aug. 31
- Hajime YOSHIDA
- Naruto University of Education
-0) Reference
- GGE is changing day-by-day. It will be adapted to the new Java2 (ex JDK1.2).
-So, after this release, we will keep the latest versions and related information in our URL;
-
- http://erpc1.naruto-u.ac.jp/~geant4
-
-
-1) Introduction
-
- GGE, GEANT4 Geometry Editor, is a visual tool to "create" a C++ source code which
-implements a detector geometry after GEANT4's norm.
-
-It provides users with tables which users fill with their detector parameters,
-such as its materials, solid shapes, visualisation attributes and placement. After the
-data in the tables, GGE creates C++ source codes for a detector. The C++ codes is a complete
-description of a detector, including the definition of atoms, materials, solids, color attributes,
-logical volumes and physical volumes with rotations and translations.
-The C++ source code is saved into a file and can be compiled to make a GEANT4 executable.
-A minimum set of files for the GEANT4 managers to visualise the detector as well as
-a GNUMakefile are provided for that.
-
-GAG is helpful to have a visualization of the whole detector.
-Simple macro files are associated, too, for visualisation.
-
- GGE consists of two editors (material and volume) which are
-interrelated upon users' request. Volume editor has two main functions;
-first is to define logical volumes, while the second is to position or relocate them.
-GGE provides users a variety of relocation; Single Placement, Multiple Copies
- with incremental copy numbers (translational arrangement or axially symmetric arrangement),
-Replicas (in any axis or phi direction) and Parametrized volumes(not yet).
-
-GGE is based on Java's MVC model so that any change or input to the tables by a user
-are automatically reflected to the internal data structure of GGE and C++ codes.
-
-2) Functions of GGE
-
- 2.1) Material Editor
- a) implemented in this version
-
- + append, insert, edit and delete a material
- + material from scratch
- + material by combination (number or fractional ratios)
- + periodic table of atoms automatically popped up to create a material
- + default states are provided (material state, temperature, pressure)
- + canonical physical units in GEANT4 selectable from a combobox
-
- + "in Use" mark for materials used in user's detector
- + materials used in the logical volumes are automatically made "in Use".
- + user can add any materials "in Use" to have C++ constructors
-
- + persistent material file
- + load, append or save a material file
- + an exemplary persistent material database file "MaterialDB.g4mt" from the PDG
-
- b)not yet implemented
-
- - material from materials (coming)
- - isotope (planned)
- - protection from duplicated "in Use" instances of the same materials.
-
- 2.2) Volume Editor ; logical and physical volumes
-
- a)implemented
-
- + G4Solids
- + CSG solids
- + Box, Tube segment, Cone segment, Sphere segment, Torus segment, Parallelepiped,
- Symmetric Trapezoid, HYPE
- + parameters and canonical units
- + preview with DAWN (automatically chosen world size)
- + BREPs
- + Polycone segment, Polyhedra
- + any number of nodes and facets with parameters and canonical units
- + preview with DAWN (automatically chosen world size)
- + G4LogicalVolume
- + create, delete a logical volume
- + Its name, G4Solid, material, visualization attributes
- + selectable G4Solid among the above candidates (CSGs, BREPs)
- + type-in materials name (drag and drop is planned)
- + Color Chooser to specify visualization attribute (color and its name)
- + Used materials link to material DB
-
- + G4PVPlacement ; Placement of physical volumes
- + Type 1 constructor = rotation of the frame, physical mother volume
- + Type 2 constructor = rotation of a body, physical mother volume
- + Type 3 constructor = rotation of the frame, logical mother volume
- + Type 4 constructor = rotation of a body, logical mother volume
-
- + Single Placement of a Volume (SPV)
- + mother volume is either
- null(Master Reference System), logical or physical
- + MARS is constructed first in C++ code.
- + logical mother is for nested volumes
- + translation in the X, Y or Z direction (default is no translation)
- + rotation around X, Y or Z axis with an angle (frame or body)
-
- + Repeated Placement of a Volume with incremental copy numbers (RPV)
- + translational arrangement of any number of copies of a logical volume
- + placements in the X, Y or Z direction
- + the position of the first copy and incremental step size
- + with respect to a logical or physical mother volume
- + axially symmetric arrangement
- + rotational axis is parallel to X, Y or Z axis
- + rotation of the frames or a body
- + position of the center of axial symmetry can be set
- + radius of axially symmetric arrangement
- + starting angle and incremental step angle with number of copies
- + logical or physical mother volume
-
- + Slicing or Replica
- + replication in the X, Y or Z direction (cartesian coordinates)
- + replication in rho or phi direction (cylindrical coordinates)
- + width (in length or angle) and number of replicas
- + offset (in length or angle)
- + logical or physical mother volume
-
- b)to be implemented
-
-
-
- - paremetrised volumes (coming soon)
- - linear scaling
- - linear rotation
-
- 2.3) Generation of C++ code ; "MyDetectorConstruction.cc" (default naming)
-
- a) implemented
- + C++ code is output to a editor widget
- + all necessary header files are automatically included
- + save the file with a file chooser; "GGEmake/MyDetectorConstruction.cc" (default naming)
- + order of creating instances;
- G4Elements, G4Material, G4VisAttributes, G4Solids, G4LogicalVolume,
- Single Positioned Volumes, Repeated Volumes, Replicas
- x order of instantiation inside each section is decided by GGE user,
- except MARS
- + return the instance name of the MARS
-
- b)not implemented
- - automatic correct ordering of constructors of volumes
-
-
- 2.4) GGEmake; a directory containing the GEANT4 codes to compile and visualize the detector
- a) implemented
- + GNUmakefile
- + myDetector.cc ; main() with GAG session and visualization manager
- + src/ directory contains
- + MyDetectorConstruction.cc
- + MyPhysicsList.cc
- + MyPrimaryGeneratorAction.cc
- + MyVisManager.cc
- + include/ directory
-
- 2.5) compile and visualize with Momo and GAG
-
- a) implemented
-
- + canonical scheme of GEANT4 to compile
- + make G4TARGET=myDetector
- + the binary is created as $G4INSTALL/bin/$G4SYSTEM/myDetector
-
- + Momo (GAG, Compile and GGE buttons)
- + rapid cycling of GGE and GAG to edit and view the geometry
- + a macro file for visualization (OGLIX default) "DrawDAWN.g4m", etc..
-
- b) not implemented
- - automatic "calibration" of the detector with geantino
-
- 2.6) exemplary persistent detector files with *.g4dt suffix
- + rotateallsolids.g4dt; all CSG except HYPE and two BREPs are placed in an axially symmetric manner
- + translateallsolids.g4dt
-
-
--------------------------------------------------------------------------
-
-3) Installation
-
-The minimum set to run GGE and to create the C++ source code
- 1) GGE.jar file
- 2) Java interpreter ; java
-Additional set to compile and get the executable
- 3) GEANT4 toolkit with compiled libraries
- 4) GGEmake directory
-Additional set to visualise and use GUI
- 4) DAWN (plus Ghostview) or OGLIX or VRML
- 5) GAG (Java version) or GAG.jar file
-Additional too to make life easy
- 6) Momo to use all the above ingredients; Momo.jar file
- (without Momo, you have to invoke GGE, compile and GAG respectively in windows.)
-
-3.1) Java and Swing
-We have tested GGE on Unix-en (Linux and Solaris) and Windows (95/NT).
-
- 3.1.1) Unix:
-
- + Linux: jdk1.1.3 or later(i.,e., jdk-1.1.6 or jdk-1.1.7) + Swing-1.0.2
-
- 1) GGE co-works with Swing-1.0.2 and not with 1.0.1 (or maybe not
- with 1.0.3).
- 2) we are testing the current GGE with JRE1.2-beta04. The present source can be
- compiled but doesn't execute correctly. In any case
- Sun has announced on 17 August that JDK1.2 will be delayed
- till November!!
- + Solaris: jdk1.1.6 + swing-1.0.2
-
-
- We assume that you have
- 1)$JAVAHOME/jdk1.1.6/bin/java (Java interpreter) to which paths are set
- 2)Swing-1.0.2 which is defreezed and placed in $JAVAHOME/swing/swingall.jar
-
- 3.1.2) Windows:
-
- We use JBuilder2 with Swing-1.0.2. Note that you have to
- eliminate all other libraries other than swing-1.0.2, after having
- copied it into JBuilder2.
-
- We are trying JDK1.2beta4 + JRE1.2 with JBuilder2.
-
- NOTE! At present you can only create C++ code under the Windows.
-
-3.2) GGE and related files
-
-The latest product of GGE is that of 11th December 1998.
-All *.java, *.class and GGE.jar files are placed in
- $G4INSTALL/environments/Momo/java/Momo/GGE
-
-Only "GGE.jar" file is necessary to run GGE. The following files are included for
-completeness.
-
- GGE/*.java GGE source files
- GGE/*.class GGE byte code files
- GGE/GGE.jar jar archive file to which CLASSPATH must be set
- GGE/*.g4mt material database after PDG data
- GGE/*.g4dt exampleN0x detector file
-
-A set of C++ source codes and GNUmakefiles necessary to compile with GEANT4 are placed in
- $G4INSTALL/environments/Momo/GGEmake.
-
-Only geantino is instantiated in the initialization of GEANT4, so that it is quite
-rapid to have a visualization of the geometry. You can choose DAWN, OpenGL or VRML system.
-
- GGEmake/myDetector.cc main() program
- /GNUmakefile
- /src
- /src/MyDetectorConstruction.cc C++ generated by GGE
- /src/MyPrimaryGeneratorAction.cc geantino gun
- /src/MyVisManager.cc DAWN, DAWNFILE, OGLIX, OGLSX, VRML1, VRML1FILE
- /src/MyPhysicsList.cc geantino definition
- /include/*.hh
- /DrawOGLIX.g4m macro file to visualize with OGLIX
- /DrawDAWN.g4m macro file for DAWN
- /DrawDAWNFILE.g4m macro file for DAWN with Postscript file
-
-3.3) install, setenv and run
-
- %set path=($path $JAVAHOME/jdk1.1.6/bin) <=== add the path to java and javac
- %setenv CLASSPATH .:$JAVAHOME/swing/swingall.jar:$G4INSTALL/environments/Momo/java/Momo/GGE/GGE.jar
-
-
- In any directory, you can invoke GGE.
-
- %java gge
-Then, the material window appears, followed by the volume window.
-
-3.4) DAWN, Tcl/Tk and Postscript for the preview of CSG or BREP solids
-
-
- If you want to preview G4Solids, you have to install
-DAWN, Fukui renderer as well as Tcl/Tk wish (Tcl/Tk 8.0) for its GUI.
-DAWN uses also Postscript to draw *.prim files.
- If you don't use GGE's preview button, these are not necessary.
-
-For the visualization of the whole detector, DAWN or Mesa (for OGLIX)
-are necessary.
-
-3.5) GEANT4 toolkit and its environments
-The visualization manager instantiates DAWN, DAWNFILE, OPENGLIX,
-OPENGLSX, VRML, VRMLFILE. So, you have to setenv accordingly.
-
-4) A First Lesson; how to use GGE.
-
-Here is a walk-through of how to use GGE.
-
-4.1) Visualize the prefabricated detector sample
- 1) In a xterm, type %java gge
- 2) In the "Volume window", select "Load a Volume file" menu
- and double click on "rotateallsolids.g4dt"
- 3) Click "Makesource" and select "Make C++ code". Have a look of the generated C++ code.
- 4) Save the C++ code (overwrite the existing one)
- in .../GGEmake/src/MyDetectorConstruction.cc" using the file chooser.
- 5) In another xterm, go to the directory GGEmake/ and type
- %make G4TARGET=myDetector
-
- Watch if there is any compilation error. At present,
- GGE is made so that it generates correct C++ codes,
- if a user uses GGE correctly.
-
-
- 6) Check that you have "myDetector" executable, in $(G4INSTALL)/bin/$(G4SYSTEM)
- 7) In another xterm, type
- %java gag
-
- and with the "Run GEANT4" button, choose and run "myDetector".
- 8) Use /control/execute command and double click on "DrawOGLIX.g4m".
- To have a better view, use vis commands (camera/viewpoint, zoom etc).
- You can select DrawDAWNFILE to draw and have a PS hardcopy.
-
-4.2) Modify the prefabricated detector
- Now let's change the detector configuration. Go to the "Volume" window
- and change any part of it, including material.
-
-4.2.1) Changing materials
-
- 1) First, you have to "Clear Material" in the Material editor.
- 2) Then, select "Load material" and double click on "MaterialDB.g4mt".
- Now you have a list of materials.
- 3) Then, in the "Logical Volume" panel, double click the box you want to change
- and type in the name of the material in the material editor.
- 4) Change as many materials as you like and push "Used Material" button.
- You see that materials you have typed in are marked "Used" in red.
- If not, you might have mistyped the name of a material.
- 5) If you want to use additional materials, select "Use" in the material
- editor (the leftmost column).
- 6) Push "Makesource" and see your change has been realized in the C++ code.
-
- NOTE!! Be careful that there are no duplicated "Used" materials, when
- you load the material DB without "Clear Material".
-
-4.2.2) Modifying the size parameters of solids
-
- To change the sizes of G4 solids
- 1) click a "solid" box of the logical volume of your choice.
- 2) You have a pop-up window to edit the parameters. Change a parameter
- or its unit, as you like.
- 3) Push "Makesource" and see if your changes have been correctly applied
- to C++ code.
- 4) In case of BREP solids, the pop-up window has variable number of columns
- to accept any number of nodes.
- 5) For complicated solids like BREPs, preview may be useful. Click "View"
- button and you have a view with the DAWN renderer. Its g4.prim file
- is also shown in an edit-able widget.
-
-4.2.3) Changing the type of solid of an existing logical volume
- You may want to replace the current G4Solid with another one. In the
- present GGE you can't do so directly. You have to "Create" a new logical
- volume with the type of solid you want and then delete the unnecessary volume.
-
- 1) Choose your new solid with "Select Solid" combo-box.
- 2) Push "Create" button and you have a pop-up window to input parameters.
- 3) Type in numbers and select their units.
- 4) Preview if you like and then push "OK".
- 5) Check the C++ code.
-
-4.2.4) Changing visualization attributes (Color).
- 1) You have to "Create" a new VisAttributes
- 2) Upon the "Create" button, you have a Color Chooser.
- 3) Select RGB (not HSV). Set your color with slide-bars.
- 4) Give it a name, and push "OK". Then you have a color circle and name in the
- VisAttrib panel.
- 5) Edit the VisAtb box in the LogicalVolume panel.
- 6) See the C++ code.
-
-4.2.5) Changing Repeated Volumes
-
-
- a) "edit" the physical volumes
-
- "translateallsolids.g4dt" contains all except HYPE CSG and two BREP volumes which are
- positioned in "Pepeated Placement Volumes" in threee directions.
- Change the parameter of repetition such as the number or width, or you can
- add another "repeated volumes" in another direction.
-
-
-
- b) making C++ code "MyDetectorConstruction.cc" and compile.
-
- Finally, back to the step 3 and recompile.
- If you have any compiler errors, in most cases, it is due to unfilled table, misspelled name
- etc.. GGE is not yet wise enough to correct such simple mistakes.
-
-
-
-
- Opening GGE, compile, GAG simultaneously, you can
- test and improve the geometry, just like creating
- HTML or TeX documents.
-
-
-4) Naming conventions in GGE
-
- Knowledge of GGE's naming convention is helpful to read the generated C++ code as
-well as using GGE correctly.
-
- 4-1) Elements and materials
-
- a) Elements are named "elementXXX", where XXX stands for the
- element's symbol in the periodic table.
- b) materials are named just as you have typed in the second column
- of the material window.
-
- 4-2) solids and logical volumes
- The "Name" typed in the first (leftmost) column of the "Logical Volume"
- is used to name the corresponding solid. If, for example, the name "world" is given
- to a logical volume of a Box, the G4Box has an instance "solidworld".
- 4-3) logical and physical volumes
- The instance of a physical volume defined by "pName" has a name prefixed
- with "physical", i.,e., instance's name is "physical" + pName ( the plus sign means
- string concatenation). "logical" is added to the instance of a logical
- volume.
- In case of SPV (single placement of a volume), the columns "pName" (instance of
- physical volume) and "pLogical" may have the same strings.
-
- In case of RPV (repeated placement of a volume ), "pName" must be different from
- "pLogical" whose copies are repeatedly placed.
-
- 4-4) All variables are named after their proper instances.
- See for example, the control variable used in the for loop in the
- RPV. Another examples are seen in the arrays to define BREP geometry.
-
-5) Default values and combo-boxes
-
-
-5.1) Default optional values of materials
- GGE provides default values in a pre-filled columns or with the
- combo-boxes. "Use", "State" and "Unit" columns are equipped with
- combo-boxes. Temperature and pressure column are pre-filled with
- 273.15 * kelvin and 1 * atmosphere.
-5.2) Default values in volumes
- "Mother Type" is either NULL (mother of all), logical (type 2, 4 constructors)
- or physical (type 2 or 4 constructors) in G4PVPlacement.
-
-
-
-
-
-
-
-
-
-
-
diff --git a/environments/Momo/README.first b/environments/Momo/README.first
deleted file mode 100644
index bee9dd1f8d..0000000000
--- a/environments/Momo/README.first
+++ /dev/null
@@ -1,194 +0,0 @@
-How to Install and Use GAG and Momo
-
- 1998 December 4 revised for release
- 1998 July 6 written for beta
-
- Hajime YOSHIDA
-
-1) Necessary Toolkits for GAG, GGE and Momo
-
-1.1) Tcl/Tk and JAVA
-
-GAG, GGE and Momo are implemented, using the popular "Open Source
-Programs", or free software; Tcl/tk 8.0a or later and
-JDK 1.1.3 or later and JAVA Foundation Class Swing-1.0.2.
-Both are supported and freely distributed by Sun Microsystems.
-
-As of July 6, JAVA GAG is tested on Linux with JDK-1.1.3 + Swing-1.0.2 and on
-Solaris with JDK-1.1.6 + Swing-1.0.2. Tcl/Tk GAG is tested on
-Linux and Solaris with Tcl8.0p2/Tk8.0p2.
-
-As of December 4, Java GAG is running on Linux (RedHat 5.2) with JDK-1.1.7 +
-Swing-1.0.2. So, replace JDK-1.1.3 below with the latest JDK-1.1.7.
-JDK1.2 version is not yet delivered.
-
-1.2) Installation
-If the required toolkits as well as GAG, GGE and Momo have been installed
-in your computer system by your system administrator or by your collegues,
-you have only to set PATH and environment variables which
-will be explained later. Such lucky few can skip the next section of
-installation.
-
-1.2.1) Installation of Tcl/tk
-
-If you are using free Unix like Linux, the latest version (8.0a or
-later) of Tcl/tk is already included. If it is installed by root to
-the default destination, /usr/local/bin and /uar/local/lib,
-and if you can locate wish (version 8.0) in your path, everuthing is
-good.
-
-To verify this, do as follows;
-
- [yoshidah@ermac1 G++-Linux]$ wish
- % info tclversion
- 8.0
- % exit
- [yoshidah@ermac1 G++-Linux]$
-
-
-Tk command "wish" pops up a small white window. You delete it with "exit".
-
-
-If not, you can install it under your home directory without root's permission.
-You can get the latest version of Tcl/tk from many mirror sites world-wide.
-It is easy to compile and install them.
-Be careful that tcl8.0.tar.gz and tk8.0.tar.gz files are placed in the same
-directory.
-
-First attack the Tcl package. You do " ./configure" then "make"
- and finally "make install".
-Then, you repeat the same procedure for Tk package.
-
-If Tcl/Tk is installed in an arbitrary destination, you have to set
-path and environmental variables.
-
- : Verify that {\tt wish} is in in your PATH and its version is correct.
- : setenv TCL_LIBRARY to the directory where "libtcl.a" is placed
- : setenv TK_LIBRARY to the directory where "libtk.a" is placed
-
-1.2.2 Installation of JAVA
-
-GAG, GGE and Momo use JDK 1.1.3 or later and Java Foundation Class,
-or Swing-1.0.2 (early access version).
-Note that older or newer versions of Swing are imcompatible with
-the current Java GAG.
-
-GAG, GGE anf Momo is going to be updated to JDK1.2 which has not been
-released yet. JAVA Foundation Class will follow important
-modifications in the JDK1.2. Thus present GUI may not work
-correctly with other than Swing-1.0.2 on which it is implemented.
-(Swing-1.0.2 still contains "preview" classes!! -July 1998-)
-
-Swing is available from JAVA Developer Connection. You are requested to
-register yourself as a JDC member. Please read carefully licence agreement
-to use it on your computer.
-For general information on JAVA, visit JavaSoft Home Page.
-
-You may put Swing package in any directory, but you have to make the
-environment variable CLASSPATH include "swingall.jar".
-
- %setenv CLASSPATH .:/home/foo/swing1.0.2/swingall.jar:
-
-You are recommended to check sample programs associated with it.
-
- % cd ~foo/swing1.0.2/examples/SwingSet/classes
- % java SwingSet
-
-Wait a moment while loading many classes. If it works well, though
-very slowly, you can use GAG of JAVA version.
-
-
-JAVA GAG uses TextWidget, a free software which is includes as is in the
-current GAG distribution. Please read and respect the copyleft written
-there.
-
-
-2) Install and Run GAG, GGE and Momo
-
-After unpacking GEANT4 package you have the Momo files under the
-"geant4alpha/environments/Momo/" directory.
-
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !!!!! Important!!!!!
- Keep the following directory hierarchy. Tcl/tk
-products assume that all relevant files are found under $MOMOPATH, while
-JAVA products assume that all relevant classes are found in $CLASSPATH.
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-2.1) JAVA GUIs
-2.1.1 Files
-
- ../Momo/java/Momo/ necessary hierarchy for JAVA's name space.
- /Momo/GAG/ Java source codes; *.java
- /Momo/GGE/ Java source codes; *.java (to come)
- /Momo/GAG/GAG.jar JAVA binary archive
-
-2.1.2) CLASSPATH
-
-JAVA's CLASSPATH must contain the following;
-
- JDK's class file : The path to "classes.zip" is set by default.
- Otherwise let's assume /home/foo/jdk1.1.6/lib/classes.zip.
-
- Swing-1.0: As was explained above, "swingall.jar" is the only file necessary
- for Swing-1.0.2. Let us assume that you have Swing-1.0.2 in your
- $HOME/swing1.0.2/swingall.jar.
-
- GAG.jar: In the GEANT4 distribution, it is placed in
- geant4alpha/environments/Momo/java/Momo/GAG/GAG.jar. So, let's
- assume that it is at
- $HOME/geant4alpha/environments/Momo/java/Momo/GAG/GAG.jar.
-
-Assuming you have everything in your $HOME, CLASSPATH example for Unix
-is like;
-
- %setenv CLASSPATH .:$HOME/swing1.0.2/swingall.jar:\
- $HOME/geant4alpha/environments/Momo/java/Momo/GAG/GAG.jar:
- $HOME/jdk1.1.6/lib/classes.zip
-
-2.1.3) Run JAVA GAG
-
-To run JAVA GAG without Momo, type the following line at any directory.
-
- % java gag
-
-Then, choose a GEANT4 executable file.
-
-2.2) Tcl/Tk GUIs
-
-2.2.1) Files
-
- ../Momo/tcltk/ This is the MOMOPATH.
- /tcltk/tMomo.tcl Momo script file
- /tcltk/tmomo* Momo executable file
- /tcltk/GAG/ GAG procedures script files
- /tcltk/GAG/GAG.tcl GAG script file
- /tcltk/XXXXX Other directories containing procedures used
- in GAG.tcl
-
-2.2.2) MOMOPATH
-
-You have to setenv MOMOPATH which specifies the position of Momo/tcltk/.
-For example, like;
-
- %setenv MOMOPATH $HOME/geant4alpha/environments/Momo/tcltk
-
-2.2.3) Run Tcl/Tk Momo and GAG
-
-Then you can run Momo
-
- %$MOMOPATH/tmomo
-
-Or without using Momo, GAG can be directly invoked by
-
- %wish $MOMOPATH/GAG/GAG.tcl
-
-Good luck!
-
-
-
-
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/ExampleFileFilter.class b/environments/Momo/java/Momo/ExampleFileFilter.class
deleted file mode 100644
index 716d818829..0000000000
Binary files a/environments/Momo/java/Momo/ExampleFileFilter.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/ExampleFileFilter.java b/environments/Momo/java/Momo/ExampleFileFilter.java
deleted file mode 100644
index c559e85ba8..0000000000
--- a/environments/Momo/java/Momo/ExampleFileFilter.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * @(#)ExampleFileFilter.java 1.4 98/04/14
- *
- * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved.
- *
- * This software is the confidential and proprietary information of Sun
- * Microsystems, Inc. ("Confidential Information"). You shall not
- * disclose such Confidential Information and shall use it only in
- * accordance with the terms of the license agreement you entered into
- * with Sun.
- *
- * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
- * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
- * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
- * THIS SOFTWARE OR ITS DERIVATIVES.
- *
- */
-
-
-import java.io.File;
-import java.util.Hashtable;
-import java.util.Enumeration;
-import com.sun.java.swing.*;
-import com.sun.java.swing.preview.filechooser.*;
-import com.sun.java.swing.preview.*;
-
-/**
- * A convenience implementation of FileFilter that filters out
- * all files except for those type extensions that it knows about.
- *
- * Extensions are of the type ".foo", which is typically found on
- * Windows and Unix boxes, but not on Macinthosh. Case is ignored.
- *
- * Example - create a new filter that filerts out all files
- * but gif and jpg image files:
- *
- * JFileChooser chooser = new JFileChooser();
- * ExampleFileFilter filter = new ExampleFileFilter(
- * new String{"gif", "jpg"}, "JPEG & GIF Images")
- * chooser.addChoosableFileFilter(filter);
- * chooser.showOpenDialog(this);
- *
- * @version 1.4 04/14/98
- * @author Jeff Dinkins
- */
-public class ExampleFileFilter extends FileFilter {
-
- private static String TYPE_UNKNOWN = "Type Unknown";
- private static String HIDDEN_FILE = "Hidden File";
-
- private Hashtable filters = null;
- private String description = null;
- private String fullDescription = null;
- private boolean useExtensionsInDescription = true;
-
- /**
- * Creates a file filter. If no filters are added, then all
- * files are accepted.
- *
- * @see #addExtension
- */
- public ExampleFileFilter() {
- this((String) null, (String) null);
- }
-
- /**
- * Creates a file filter that accepts files with the given extension.
- * Example: new ExampleFileFilter("jpg");
- *
- * @see #addExtension
- */
- public ExampleFileFilter(String extension) {
- this(extension,null);
- }
-
- /**
- * Creates a file filter that accepts the given file type.
- * Example: new ExampleFileFilter("jpg", "JPEG Image Images");
- *
- * Note that the "." before the extension is not needed. If
- * provided, it will be ignored.
- *
- * @see #addExtension
- */
- public ExampleFileFilter(String extension, String description) {
- this(new String[] {extension}, description);
- }
-
- /**
- * Creates a file filter from the given string array.
- * Example: new ExampleFileFilter(String {"gif", "jpg"});
- *
- * Note that the "." before the extension is not needed adn
- * will be ignored.
- *
- * @see #addExtension
- */
- public ExampleFileFilter(String[] filters) {
- this(filters, null);
- }
-
- /**
- * Creates a file filter from the given string array and description.
- * Example: new ExampleFileFilter(String {"gif", "jpg"}, "Gif and JPG Images");
- *
- * Note that the "." before the extension is not needed and will be ignored.
- *
- * @see #addExtension
- */
- public ExampleFileFilter(String[] filters, String description) {
- this.filters = new Hashtable(filters.length);
- for (int i = 0; i < filters.length; i++) {
- // add filters one by one
- addExtension(filters[i]);
- }
- setDescription(description);
- }
-
- /**
- * Return true if this file should be shown in the directory pane,
- * false if it shouldn't.
- *
- * Files that begin with "." are ignored.
- *
- * @see #getExtension
- * @see FileFilter#accepts
- */
- public boolean accept(File f) {
- if(f != null) {
- if(f.isDirectory()) {
- return true;
- }
- String extension = getExtension(f);
- if(extension != null && filters.get(getExtension(f)) != null) {
- return true;
- };
- }
- return false;
- }
-
- /**
- * Return the extension portion of the file's name .
- *
- * @see #getExtension
- * @see FileFilter#accept
- */
- public String getExtension(File f) {
- if(f != null) {
- String filename = f.getName();
- int i = filename.lastIndexOf('.');
- if(i>0 && i0 && i 0) {
- fileName = args[0];
- geantStart(args);
- }
- String[] fn = new String[1];
- while(!endGAG){
- waiting();
- if (endGAG) return;
- fn[0] = fileName;
- geantStart(fn);
- }
- }
- private synchronized void waiting(){
- try{
- wait();
- }catch(InterruptedException e){
- }
- }
- private synchronized void resume(){
- notify();
- }
- private void geantStart(String[] args){
- String line, prompt = "G4";
- geant4 = new GAGpipe(args);
- boolean paramChanged = false;
- if (geant4.isError()){
- JOptionPane.showMessageDialog(this, geant4.getErrorMsg(),
- "Warning", JOptionPane.WARNING_MESSAGE);
- geant4 = null;
- return;
- }
- executingMenu(true);
- if (textEdit == null) textEdit = new TextEdit();
- errStream = new ErrStream(geant4);
- errStream.start();
- geant4.writeLine("@@GAGmodeJAVA");
- while ((line = geant4.readStdLine()) != null){
- if (line.startsWith("@@")){
- if (line.equals("@@JTreeBegin")){
- if (makeCommandTree()) break;
- continue;
- }
- if (line.equals("@@JParamBegin")){
- if (receiveParams()) break;
- paramChanged = true;
- continue;
- }
- if (line.equals("@@JDirGuideBegin")){
- if (receiveCascade()) break;
- continue;
- }
- if (line.equals("@@DisableListBegin")){
- if (receiveDisables()) break;
- paramChanged = true;
- continue;
- }
- if (line.equals("@@Ready")){
-//yoshida effective even if paramPanel is null. But PROMPT case is enough.
- p1.setVisible(true);
-
- p1.setBackground(Color.green); repaint();
- if (paramPanel != null) {
- paramPanel.toReady();
- if (paramChanged && !command.equals("")) setParamPanel(command);
- }
- paramChanged = false;
- textEdit.writeString(prompt + ">");
- exitG4.setEnabled(true);
- continue;
- }
- if (line.startsWith("@@PROMPT")){
- prompt = line.substring(line.indexOf("\"")+1, line.lastIndexOf("\""));
- promptLabel.setText(prompt);
-//yoshida effective even if paramPanel is null
- p1.setVisible(true);
- p1.setBackground(Color.green); repaint();
- setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
- show();
-
- continue;
- }
- if (line.startsWith("@@State")){
- continue;
- }
-// direct interaction with users
- if (line.startsWith("@@Ask")){
- String answer = JOptionPane.showInputDialog(this,line);
- geant4.writeLine(answer);
- continue;
- }
-//direct questionnaire
-
- if (line.startsWith("@@CurrentValue")){
- paramPanel.loadCurrentValues(line);
- textEdit.writeLine(line.substring(line.indexOf(" ")+1));
- continue;
- }
- if (line.startsWith("@@Version")){
- StringTokenizer st = new StringTokenizer( line );
- st.nextToken();
- g4Ver = st.nextToken();
- continue;
- }
- if (line.startsWith("@@ErrResult")){
- JOptionPane.showMessageDialog(this,
- line.substring(line.indexOf("\"")+1, line.lastIndexOf("\"")),
- "Warning", JOptionPane.WARNING_MESSAGE);
- continue;
- }
- }
- textEdit.writeLine(line);
- }
- geantTerminate();
- }
- private void geantTerminate(){
- executingMenu(false);
- if (geant4 != null){
- geant4.processKill();
- geant4 = null;
- }
- paramsHash = null;
- if (errStream != null){
- errStream.close();
- errStream = null;
- }
- cardLayout.show(getContentPane(), "idle");
- paramPanel = null;
- }
- private boolean makeCommandTree() {
- String pLine, label;
- command = "";
- DefaultMutableTreeNode topTree, nowTree, childTree;
- boolean found;
- cardLayout.show(getContentPane(), "tree");
- if (splitPane != null) geantPanel.remove(splitPane);
- int lastIndex = fileName.lastIndexOf("/");
- topTree = new DefaultMutableTreeNode( (lastIndex<0) ? fileName : fileName.substring(lastIndex+1) );
- while( !(pLine = geant4.readStdLine()).equals("@@JTreeEnd") ){
- if (pLine == null){ return true;}
- nowTree = topTree; childTree = null; found = true;
- StringTokenizer stCo = new StringTokenizer(pLine,"/");
- while(stCo.hasMoreTokens()){
- label = stCo.nextToken();
- if (found){
- found = false;
- for (int i=0; i 1) {
- for (int i=1; i 0 ){
- DefaultMutableTreeNode tempNode;
- if (path.length > 1) {
- dirHelp = (String)paramsHash.get(command+"/");
- }else{
- dirHelp = new String(path[0].toString());
- }
- JLabel[][] helpLabel = new JLabel[2][childCount];
- for (int i=0; childCount > i; i++){
- tempNode = (DefaultMutableTreeNode)nowNode.getChildAt(i);
- tempPath = command + "/" + tempNode;
- if (tempNode.getChildCount() == 0){
- helpLabel[0][i] = new JLabel(tempNode+" ");
- helpLabel[0][i].setForeground(isEnableCommand(tempPath) ? Color.red : Color.lightGray);
- helpLabel[1][i] = new JLabel(((GAGcommandItem)(paramsHash.get(tempPath))).getTitle());
- }else{
- helpLabel[0][i] = new JLabel(tempNode+"/ ");
- helpLabel[0][i].setForeground(isEnableCommand(tempPath+"/") ? Color.blue : Color.lightGray);
- helpLabel[1][i] = new JLabel((String)paramsHash.get(tempPath +"/"));
- }
- }
- paramPanel.setTreeHelp(dirHelp, helpLabel);
- }else{
- GAGcommandItem ci = (GAGcommandItem)paramsHash.get(command);
- if (ci == null) return;
- paramPanel.setParamBox(ci, isEnableCommand(command));
- }
- return;
- }
- boolean isEnableCommand(String command){
- return !disableCommands.contains(command);
- }
- public void actionPerformed(ActionEvent ae){
-
-
- Object o = ae.getSource();
- if ( o == directField){
- sendCommand(directField.getText());
- paramPanel.addHistory(directField.getText());
- directField.setText("");
- return;
- }
- if (o == exitGAG){
- if (geant4 != null) {
- if(JOptionPane.showConfirmDialog(this, "Kill GEANT4 automatically.", "Exit GAG", JOptionPane.YES_NO_OPTION) == 1) {return;}
- geantTerminate();
- endGAG = true;
- }else{
- resume();
- endGAG = true;
- }
- return;
- }
- if (o == exitG4){
- sendCommand("exit");
- return;
- }
- if (o == execG4){
- if (geant4Chooser.showOpenDialog(this) == -1 )return;
-// Swing1.0.2
- File f = geant4Chooser.getSelectedFile();
- if (f.isFile()) {
- fileName = f.getPath();
- resume();
- }
- return;
- }
- if (o == killG4){
- geantTerminate();
- return;
- }
- if (o == htmlHelp){
- return;
- }
- if (o == about){
- new AboutDialog(this, gagVer, g4Ver);
- return;
- }
- if (o == clearAllHist){
- paramPanel.clearAllHistory();
- return;
- }
- if (o == clearOneHist){
- paramPanel.clearOneHistory();
- return;
- }
- if (o == saveHist){
- if (historyChooser.showSaveDialog(this) == -1 ) return;
-// Swing1.0.2
- try{
- FileOutputStream fo = new FileOutputStream(historyChooser.getSelectedFile());
- PrintWriter outf = new PrintWriter(new DataOutputStream(fo));
- String[] items = paramPanel.getHistoryItems();
- for (int i=0; i 0) {
- params = new String[paramEnts][MAX];
- }
- this.range = range;
- return;
- }
- String getCommandName(){
- return name;
- }
- String[] getCommandGuide(){
- return guide;
- }
- String getTitle(){
- return guide[0];
- }
- String getCommandRange(){
- return range;
- }
- int getParamEntries(){
- return paramEnts;
- }
- String getParamName(int pos){
- return params[pos][NAME];
- }
- String getParamGuide(int pos){
- return params[pos][GUIDE];
- }
- String getParamType(int pos){
- return params[pos][TYPE];
- }
- boolean isOmittable(int ent){
- return params[ent][OMITTABLE].equals("1");
- }
- String getParamDefault(int pos){
- return params[pos][DEFAULT];
- }
- String getParamRange(int pos){
- return params[pos][RANGE];
- }
- String getParamCandidate(int pos){
- return params[pos][CANDIDATE];
- }
-}
diff --git a/environments/Momo/java/Momo/GAG/GAG/GAGpipe.class b/environments/Momo/java/Momo/GAG/GAG/GAGpipe.class
deleted file mode 100644
index fed20fe65b..0000000000
Binary files a/environments/Momo/java/Momo/GAG/GAG/GAGpipe.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/GAG/GAGpipe.java b/environments/Momo/java/Momo/GAG/GAG/GAGpipe.java
deleted file mode 100644
index 0f9bcf81b5..0000000000
--- a/environments/Momo/java/Momo/GAG/GAG/GAGpipe.java
+++ /dev/null
@@ -1,66 +0,0 @@
-// GAG (Geant4 Adaptive GUI)
-// Requires : JDK 1.1.3 (or later) + swing-1.0.2
-// Version : alpha 1998/Mar/31
-// GEANT4 GUI Group, Toshiaki Kodama
-// 1998 July 6 GEANT4 Beta-01
-
-package GAG;
-
-import java.io.*;
-
-class GAGpipe {
- private Process ps;
- private BufferedReader inpS, errS;
- private PrintWriter outS;
- private String errMsg;
- private boolean isErr;
-
- GAGpipe(String[] execFile){
- errMsg = null; isErr = false;
- try {
- ps = Runtime.getRuntime().exec(execFile);
- } catch(IOException e){
- isErr = true;
- errMsg = e.getMessage();
- return;
- }
- inpS = new BufferedReader(new InputStreamReader(ps.getInputStream()));
- errS = new BufferedReader(new InputStreamReader(ps.getErrorStream()));
- outS = new PrintWriter(new DataOutputStream(ps.getOutputStream()));
- }
- String readStdLine(){
- String line = null;
- try{
- line=inpS.readLine();
- }catch(IOException e){
- isErr = true;
- errMsg = e.getMessage();
- }
- return line;
- }
- String readErrLine(){
- String line = null;
- try{
- line=errS.readLine();
- }catch(IOException e){
- isErr = true;
- errMsg = e.getMessage();
- System.err.println(errMsg);
- }
- return line;
- }
- synchronized boolean writeLine(String st){
- outS.println(st);
- return outS.checkError();
- }
- synchronized void processKill(){
- ps.destroy();
- }
- boolean isError(){
- return isErr;
- }
- String getErrorMsg(){
- if (!isErr) return "";
- return errMsg;
- }
-}
diff --git a/environments/Momo/java/Momo/GAG/GAG/GAGtextEditor.class b/environments/Momo/java/Momo/GAG/GAG/GAGtextEditor.class
deleted file mode 100644
index 008395e100..0000000000
Binary files a/environments/Momo/java/Momo/GAG/GAG/GAGtextEditor.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/GAG/GAGtextEditor.java b/environments/Momo/java/Momo/GAG/GAG/GAGtextEditor.java
deleted file mode 100644
index b88680b99f..0000000000
--- a/environments/Momo/java/Momo/GAG/GAG/GAGtextEditor.java
+++ /dev/null
@@ -1,13 +0,0 @@
-// GAG (Geant4 Adaptive GUI)
-// Requires : JDK 1.1.3 (or later) + swing-1.0.2
-// Version : alpha 1998/Mar/31
-// Toshiaki Kodama GEANT4 GUI Group
-// 1998 July 6 GEANT4 Beta-01
-// This is an junction to better TextEditor in future.
-
-package GAG;
-
-public interface GAGtextEditor {
- public void writeString(String str);
- public void writeLine(String str);
-}
diff --git a/environments/Momo/java/Momo/GAG/GAG/HtmlFrame.class b/environments/Momo/java/Momo/GAG/GAG/HtmlFrame.class
deleted file mode 100644
index a1001bf160..0000000000
Binary files a/environments/Momo/java/Momo/GAG/GAG/HtmlFrame.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/GAG/HtmlFrame.java b/environments/Momo/java/Momo/GAG/GAG/HtmlFrame.java
deleted file mode 100644
index ede83911ba..0000000000
--- a/environments/Momo/java/Momo/GAG/GAG/HtmlFrame.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// jdk-1.1.3 (or later) + swing-1.0.2
-// This is not required in GAG
-
-import com.sun.java.swing.*;
-
-import java.awt.*;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.io.IOException;
-
-public class HtmlFrame extends JFrame {
- public HtmlFrame() {
- // setBackground(Color.white);
- setLayout(new BorderLayout());
- try {
- URL url = new URL("http://erlt1.naruto-u.ac.jp/~geant4/README_Momo.html");
- JEditorPane html = new JEditorPane(url);
- JScrollPane scroller = new JScrollPane(html);
- add("Center", scroller);
- } catch (MalformedURLException e) {
- System.out.println("Malformed URL: " + e);
- } catch (IOException e) {
- System.out.println("IOException: " + e);
- }
- setSize(400, 400);
- show();
- }
- public static void main(String arg[]){
- new HtmlFrame();
- }
-}
diff --git a/environments/Momo/java/Momo/GAG/GAG/ParamPanel.class b/environments/Momo/java/Momo/GAG/GAG/ParamPanel.class
deleted file mode 100644
index 9ccebd7ff6..0000000000
Binary files a/environments/Momo/java/Momo/GAG/GAG/ParamPanel.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/GAG/ParamPanel.java b/environments/Momo/java/Momo/GAG/GAG/ParamPanel.java
deleted file mode 100644
index 7be3a5d3d3..0000000000
--- a/environments/Momo/java/Momo/GAG/GAG/ParamPanel.java
+++ /dev/null
@@ -1,416 +0,0 @@
-// GAG (Geant4 Adaptive GUI)
-// Requires : JDK 1.1.3 (or later) + swing-1.0.2
-// Version : alpha 1998/Mar/31
-// GEANT4 GUI Group, Toshiaki Kodama
-// modified by H Yoshida, 1998 June 25
-// use of FileFilter of Swing 1.0.2, to select after file extensions
-// improvement of notification method of GEANT4 states
-// by using setVisible and setBackground of relevant buttons
-// specially "ok" button.
-
-package GAG;
-
-import com.sun.java.swing.preview.*;
-//FileFilter of Swing1.0.2
-import ExampleFileFilter;
-
-import java.util.*;
-import java.awt.*;
-import java.io.*;
-import java.awt.event.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.preview.filechooser.*;
-// for Swing-1.0.2 FileChooser
-
-class ParamPanel extends JPanel implements ActionListener, ItemListener {
- private GAG gag;
- private GridBagLayout gbl; GridBagConstraints gbc;
- private JPanel paramArea;
- private JButton def, current, clear, ok, fileBrowser;
- private JComboBox history;
- private int posY;
- private GAGcommandItem ci;
- private Component paraBox[];
- private boolean isExecuting;
- private JFileChooser fileChooser;
-// FileFilter in Swing-1.0.2 test
- private ExampleFileFilter g4mFilter, macroFilter, g4macroFilter,
- txtFilter;
-
-
-
- ParamPanel(GAG gag){
- isExecuting = false;
- this.gag = gag;
- setLayout( new BorderLayout() );
-
- gbc = new GridBagConstraints();
- gbl = new GridBagLayout();
-
- paramArea = new JPanel();
- paramArea.setLayout(gbl);
- paramArea.setBackground(new Color(255, 250, 230));
- add("Center", new JScrollPane(paramArea));
-
- JPanel buttons = new JPanel();
- buttons.setLayout(new GridLayout( 1, 0, 2, 2));
-// Yoshida color
- def = new JButton("Default");
- current = new JButton("Current");
- clear = new JButton("Clear");
- ok = new JButton("OK");
- ok.setBackground(Color.green);
-//no good?? ok.setFont(new Font("OK",1,12));
- def.setBackground(Color.blue);
- current.setBackground(Color.orange);
- clear.setBackground(SystemColor.white);
-// ok.setBackground(SystemColor.control);
-// color
-
- buttons.add( def );
- buttons.add( current );
- buttons.add( clear );
- buttons.add( ok );
- add("South", buttons);
-
- history = new JComboBox();
- history.addItem("# GEANT4 history macro.");
- history.addItemListener(this);
- add("North", history);
-//yoshida setinvisible and setdisable
- def.setVisible(false);
- def.setEnabled(false);
- def.setMargin(new Insets(1,3,1,3));
- def.addActionListener(this);
-
-//yoshida
- current.setVisible(false);
- current.setEnabled(false);
- current.setMargin(new Insets(1,3,1,3));
- current.addActionListener(this);
-//yoshida
- clear.setVisible(false);
- clear.setEnabled(false);
- clear.setMargin(new Insets(1,3,1,3));
- clear.addActionListener(this);
-
-//yoshida
- ok.setVisible(false);
- ok.setEnabled(false);
- ok.setMargin(new Insets(1,3,1,3));
- ok.addActionListener(this);
-
- fileBrowser = new JButton("Open a Macro File");
- fileBrowser.addActionListener(this);
- fileChooser = new JFileChooser(".");
-// Swing 1.0.2 FileFilter OK!! 1998 June 25
- fileChooser.setDialogTitle("Macro File");
- g4mFilter = new ExampleFileFilter("g4m", "Geant4 macro");
- g4macroFilter = new ExampleFileFilter("g4macro", "Geant4 macro");
- txtFilter = new ExampleFileFilter("txt", "Geant4 macro");
- macroFilter = new ExampleFileFilter("macro", "Geant4 macro");
-
- fileChooser.addChoosableFileFilter(g4mFilter);
- fileChooser.addChoosableFileFilter(g4macroFilter);
- fileChooser.addChoosableFileFilter(txtFilter);
- fileChooser.addChoosableFileFilter(macroFilter);
-
-// end of Swing-1.0.2 FileChooser
-
-
- }
- void setParamBox(GAGcommandItem ci, boolean enable){
- paramArea.removeAll();
- this.ci = ci;
- posY = 0;
- JLabel l;
- if (!enable){
- l = new JLabel("This command is not available.");
- l.setForeground(Color.red);
- addComponent(l);
- }
- addComponent(new JLabel(ci.getCommandName()));
- String guide[] = ci.getCommandGuide();
- for (int i=0; i 0){
- def.setEnabled(true);
-//yoshida
- def.setVisible(true);
- current.setEnabled(!isExecuting && enable);
-//yoshida
- current.setVisible(!isExecuting && enable);
- clear.setEnabled(true);
-//yoshida
- clear.setVisible(true);
- paraBox = new JComponent[ci.getParamEntries()];
- String candidateList;
- for (int i=0; i 0){
- String val;
- for (int i=0; i= 0){
- JOptionPane.showMessageDialog(this, ci.getParamName(i)+"\nThis parameter cannot include SPACE character", "Error", JOptionPane.WARNING_MESSAGE);
- return null;
- }
- }else{
- val = (String)((JComboBox)paraBox[i]).getSelectedItem();
- }
- param.append(" "+val);
- }
-//yoshida
- current.setVisible(false);
- current.setEnabled(false);
- }
-//yoshida
- ok.setVisible(false);
- ok.setEnabled(false);
- history.addItem(param.toString());
- return param.toString();
- }
- private void addComponent(Component compo){
- gbc.gridx = 0; gbc.gridy = posY++;
- gbc.gridwidth = 3; gbc.gridheight = 1;
- gbc.weightx = 1.0; gbc.weighty = 0.0;
- gbc.anchor = GridBagConstraints.WEST;
- gbl.setConstraints(compo, gbc);
- paramArea.add(compo);
- }
- private void addComponent(Component compo1, Component compo2){
- gbc.gridx = 0; gbc.gridy = posY;
- gbc.gridwidth = 1; gbc.gridheight = 1;
- gbc.weightx = 0.0; gbc.weighty = 0.0;
- gbc.anchor = GridBagConstraints.EAST;
- gbl.setConstraints(compo1, gbc);
- paramArea.add(compo1);
- gbc.gridx = 1;
- gbc.anchor = GridBagConstraints.WEST;
- gbl.setConstraints(compo2, gbc);
- paramArea.add(compo2);
- posY++;
- }
- private void addComponent(Component title, Component compo1, Component compo2){
- gbc.gridx = 0; gbc.gridy = posY;
- gbc.gridwidth = 1; gbc.gridheight = 1;
- gbc.weightx = 0.0; gbc.weighty = 0.0;
- gbc.fill = GridBagConstraints.NONE;
- gbc.anchor = GridBagConstraints.EAST;
- gbl.setConstraints(title, gbc);
- paramArea.add(title);
- gbc.gridx = 1;
- gbc.fill = GridBagConstraints.HORIZONTAL;
- gbl.setConstraints(compo1, gbc);
- paramArea.add(compo1);
- gbc.gridx = 2;
- gbc.fill = GridBagConstraints.NONE;
- gbc.anchor = GridBagConstraints.WEST;
- gbl.setConstraints(compo2, gbc);
- paramArea.add(compo2);
- posY++;
- }
- private void loadValue(int i, String str){
- if (paraBox[i] instanceof JTextField){
- ((JTextField)paraBox[i]).setText(str);
- }
- if (paraBox[i] instanceof JComboBox){
- ((JComboBox)paraBox[i]).setSelectedItem(str);
- }
- }
- void addHistory(String line){
- if (line.startsWith("/")) history.addItem(line);
- }
- void clearAllHistory(){
- history.removeAllItems();
- }
- void clearOneHistory(){
- int ix = history.getSelectedIndex();
- if (ix >= 0) history.removeItemAt(ix);
- }
- String[] getHistoryItems(){
- String[] item = new String[history.getItemCount()];
- for (int i=0; i>history.getItemCount(); i++){
- item[i] = (String)history.getItemAt(i);
- }
- return item;
- }
- void loadCurrentValues(String line){
- StringTokenizer st = new StringTokenizer( line );
- st.nextToken();
- int i=0;
- while(st.hasMoreTokens()){
- loadValue(i++, st.nextToken());
- }
- }
- public void itemStateChanged(ItemEvent ie){
- if (isExecuting) return;
- if (ie.getStateChange() != ItemEvent.SELECTED) return;
- String str = (String)ie.getItem();
- if ( !str.startsWith("/") ) return;
- StringTokenizer st = new StringTokenizer( str );
- if (!gag.setParamPanel(st.nextToken())) return;
- int i=0;
- while(st.hasMoreTokens()){
- loadValue(i++, st.nextToken());
- if (i >= ci.getParamEntries()) return;
- }
- }
- public void actionPerformed(ActionEvent ev){
- Object source = ev.getSource();
- if ( source == ok ){
- String p = makeCommandLine();
- if (p == null) return;
- isExecuting = true;
- gag.sendCommand(p);
-//yoshida instead of sandwatch, ok button becomes invisible
- ok.setVisible(false);
- ok.setEnabled(false);
-// Be careful! mouse may freeze, if setinvisible but not setdisabled!!
- return;
- }else if (source == def){
- for (int i=0; ci.getParamEntries()>i; i++){
- loadValue(i, ci.getParamDefault(i));
- }
- return;
- }else if (source == current){
- gag.reqCurrent(ci.getCommandName());
- return;
- }else if (source == clear){
- for (int i=0; ci.getParamEntries()>i; i++){
- if (paraBox[i] instanceof JTextField){
- ((JTextField)paraBox[i]).setText("");
- }
- }
- return;
- }else if (source == fileBrowser){
-//swing102 filechooser showDialog(this, null) or the next
- if (fileChooser.showOpenDialog(this) == -1 ) return;
- File f = fileChooser.getSelectedFile();
- if (f.isFile()) {
- if (paraBox[0] instanceof JTextField){
- ((JTextField)paraBox[0]).setText(f.getPath());
- }
- }
- return;
- }
- }
- void toReady(){
- isExecuting = false;
- if (ci == null) return;
- ok.setEnabled(true);
-//yoshida setenable then setvisible
- ok.setVisible(true);
- if (ci.getParamEntries() == 0) return;
- current.setEnabled(true);
-//yoshida
- current.setVisible(true);
- }
-}
-
-class BooleanCombo extends JComboBox {
- BooleanCombo(String str){
- String def = str.toUpperCase();
- if (def.equals("0") || def.equals("1")){
- addItem("0");
- addItem("1");
- }else if (def.equals("Y") || def.equals("N")){
- addItem("Y");
- addItem("N");
- }else if (def.equals("YES") || def.equals("NO")){
- addItem("YES");
- addItem("NO");
- }else if (def.equals("T") || def.equals("F")){
- addItem("T");
- addItem("F");
- } else {
- addItem("FALSE");
- addItem("TRUE");
- }
- if (!def.equals("")){
- setSelectedItem(def);
- }
- }
-}
diff --git a/environments/Momo/java/Momo/GAG/GAG/README b/environments/Momo/java/Momo/GAG/GAG/README
deleted file mode 100644
index 6e6c9f899b..0000000000
--- a/environments/Momo/java/Momo/GAG/GAG/README
+++ /dev/null
@@ -1,24 +0,0 @@
-1998 June 25 Yoshida
-
- Improve look-and-feel of GAG by KOdama (as of 31/March/1998).
-
-
-Swing-1.0.1 is used.
-Swing-1.0.2 is desirable, but wait a moment. Swing-1.0.2 has
-not yet frozen classes and interfaces, among them JColorChooser
-and JFileChooser.
-They are left as before in swing.preview package!!
-
-
-Swing-1.0.2 JFileChooser is good for us since it allows file filtering,
- free label on buttons etc..
-
-But it is better to wait JDK1.2!!
-
-
-So there is only minor improvements.
-
-Font is one of the most iportant improvement.
-Current fonts are too small or not beautiful.
-
-
diff --git a/environments/Momo/java/Momo/GAG/GAG/TextEditor.class b/environments/Momo/java/Momo/GAG/GAG/TextEditor.class
deleted file mode 100644
index bc84f4b9f9..0000000000
Binary files a/environments/Momo/java/Momo/GAG/GAG/TextEditor.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/GAG/TextEditor.java b/environments/Momo/java/Momo/GAG/GAG/TextEditor.java
deleted file mode 100644
index a5ee95e058..0000000000
--- a/environments/Momo/java/Momo/GAG/GAG/TextEditor.java
+++ /dev/null
@@ -1,131 +0,0 @@
-// jdk-1.1.3 (or later) + swing-1.0.2
-// JFileChooser is to be used soon.
-//
-package GAG;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.io.*;
-import java.net.URL;
-import java.util.*;
-
-import com.sun.java.swing.text.*;
-import com.sun.java.swing.*;
-
-class TextEditor extends JFrame implements ActionListener {
- private JMenuItem newf, open, save, cut, copy, paste;
- private JTextArea editor;
- private JToolBar toolbar;
- protected FileDialog fileDialog;
-
- TextEditor() {
- super("GAG TextEditor");
- getContentPane().setLayout(new BorderLayout());
- editor = new JTextArea();
- editor.setFont(new Font("Serif", Font.BOLD, 12));
- JScrollPane scroller = new JScrollPane();
- //scroller.setVerticalScrollBarPolicy(JScrollPane.SCROLLBARS_ALWAYS);
- JViewport port = scroller.getViewport();
- port.add(editor);
- port.setBackingStoreEnabled(false);
- setJMenuBar( createMenubar() );
- getContentPane().add("Center", scroller);
- pack();
- setSize(500, 600);
- show();
- }
- JMenuBar createMenubar(){
- JMenu file, edit;
- JMenuBar mb = new JMenuBar();
- file = new JMenu("File");
- file.add(newf = new JMenuItem("New"));
- file.add(open = new JMenuItem("Open"));
- file.add(save = new JMenuItem("Save"));
- edit = new JMenu("Edit");
- edit.add(cut = new JMenuItem("Cut"));
- edit.add(copy = new JMenuItem("Copy"));
- edit.add(paste = new JMenuItem("Paste"));
- mb.add(file);
- mb.add(edit);
- newf.addActionListener(this);
- open.addActionListener(this);
- save.addActionListener(this);
- cut.addActionListener(this);
- copy.addActionListener(this);
- paste.addActionListener(this);
- return mb;
- }
- void writeString(String s){
- editor.append(s);
- }
- void writeLine(String s){
- editor.append(s+"\n");
- }
-
- public static void main(String[] args) {
- new TextEditor();
- }
- public void actionPerformed(ActionEvent e) {
- Object o = e.getSource();
- if (o == newf){newAction(); return;}
- if (o == open){openAction(); return;}
- if (o == save){saveAction(); return;}
- if (o == cut){editor.cut(); return;}
- if (o == copy){editor.copy(); return;}
- if (o == paste){editor.paste(); return;}
- }
- void newAction(){
- editor.setDocument(new PlainDocument());
- validate();
- }
- void openAction(){
- if (fileDialog == null) {
- fileDialog = new FileDialog(this);
- }
- fileDialog.setMode(FileDialog.LOAD);
- fileDialog.show();
-
- String file = fileDialog.getFile();
- if (file == null) {
- return;
- }
- newAction();
- String directory = fileDialog.getDirectory();
- File f = new File(directory, file);
- StringBuffer sb = new StringBuffer();
- if (f.exists()) {
- setTitle(file);
- try{
- Reader in = new FileReader(f);
- char[] buff = new char[4096];
- int nch;
- while ((nch = in.read(buff, 0, buff.length)) != -1) {
- sb.append(new String(buff, 0, nch));
- }
- }catch(IOException e){ System.err.println(e.getMessage()); }
- editor.setText(sb.toString());
- validate();
- }
- }
- void saveAction(){
- String saveText;
- if (fileDialog == null) {
- fileDialog = new FileDialog(this);
- }
- fileDialog.setMode(FileDialog.LOAD);
- fileDialog.show();
-
- String file = fileDialog.getFile();
- if (file == null) {
- return;
- }
- String directory = fileDialog.getDirectory();
- File f = new File(directory, file);
- try{
- FileOutputStream fo = new FileOutputStream(f);
- PrintWriter outf = new PrintWriter(new DataOutputStream(fo));
- outf.println(editor.getText());
- outf.close();
- }catch(IOException e){ System.err.println(e.getMessage()); }
- }
-}
diff --git a/environments/Momo/java/Momo/GAG/GAGcommandItem.class b/environments/Momo/java/Momo/GAG/GAGcommandItem.class
deleted file mode 100644
index c773bac20f..0000000000
Binary files a/environments/Momo/java/Momo/GAG/GAGcommandItem.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/GAGcommandItem.java b/environments/Momo/java/Momo/GAG/GAGcommandItem.java
deleted file mode 100644
index f20f52a87d..0000000000
--- a/environments/Momo/java/Momo/GAG/GAGcommandItem.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// GAG (Geant4 Adaptive GUI)
-// Requires : JDK 1.1.3 (or later) + swing-1.0.2
-// Version : alpha 1998/Mar/31
-// GEANT4 GUI Group, Toshiaki Kodama
-// 1998 July 6 GEANT4 Beta-01
-
-package GAG;
-
-class GAGcommandItem extends Object {
- static final int NAME=0, GUIDE=1, TYPE=2, OMITTABLE=3, DEFAULT=4, RANGE=5, CANDIDATE=6;
- static final int MAX = 7;
- private String name, guide[], range;
- private int paramEnts;
- String params[][];
- GAGcommandItem(String name, String guide[], String range, int ents){
- this.name = name;
- this.guide = guide;
- paramEnts = ents;
- if (ents > 0) {
- params = new String[paramEnts][MAX];
- }
- this.range = range;
- return;
- }
- String getCommandName(){
- return name;
- }
- String[] getCommandGuide(){
- return guide;
- }
- String getTitle(){
- return guide[0];
- }
- String getCommandRange(){
- return range;
- }
- int getParamEntries(){
- return paramEnts;
- }
- String getParamName(int pos){
- return params[pos][NAME];
- }
- String getParamGuide(int pos){
- return params[pos][GUIDE];
- }
- String getParamType(int pos){
- return params[pos][TYPE];
- }
- boolean isOmittable(int ent){
- return params[ent][OMITTABLE].equals("1");
- }
- String getParamDefault(int pos){
- return params[pos][DEFAULT];
- }
- String getParamRange(int pos){
- return params[pos][RANGE];
- }
- String getParamCandidate(int pos){
- return params[pos][CANDIDATE];
- }
-}
diff --git a/environments/Momo/java/Momo/GAG/GAGpipe.class b/environments/Momo/java/Momo/GAG/GAGpipe.class
deleted file mode 100644
index fed20fe65b..0000000000
Binary files a/environments/Momo/java/Momo/GAG/GAGpipe.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/GAGpipe.java b/environments/Momo/java/Momo/GAG/GAGpipe.java
deleted file mode 100644
index 0f9bcf81b5..0000000000
--- a/environments/Momo/java/Momo/GAG/GAGpipe.java
+++ /dev/null
@@ -1,66 +0,0 @@
-// GAG (Geant4 Adaptive GUI)
-// Requires : JDK 1.1.3 (or later) + swing-1.0.2
-// Version : alpha 1998/Mar/31
-// GEANT4 GUI Group, Toshiaki Kodama
-// 1998 July 6 GEANT4 Beta-01
-
-package GAG;
-
-import java.io.*;
-
-class GAGpipe {
- private Process ps;
- private BufferedReader inpS, errS;
- private PrintWriter outS;
- private String errMsg;
- private boolean isErr;
-
- GAGpipe(String[] execFile){
- errMsg = null; isErr = false;
- try {
- ps = Runtime.getRuntime().exec(execFile);
- } catch(IOException e){
- isErr = true;
- errMsg = e.getMessage();
- return;
- }
- inpS = new BufferedReader(new InputStreamReader(ps.getInputStream()));
- errS = new BufferedReader(new InputStreamReader(ps.getErrorStream()));
- outS = new PrintWriter(new DataOutputStream(ps.getOutputStream()));
- }
- String readStdLine(){
- String line = null;
- try{
- line=inpS.readLine();
- }catch(IOException e){
- isErr = true;
- errMsg = e.getMessage();
- }
- return line;
- }
- String readErrLine(){
- String line = null;
- try{
- line=errS.readLine();
- }catch(IOException e){
- isErr = true;
- errMsg = e.getMessage();
- System.err.println(errMsg);
- }
- return line;
- }
- synchronized boolean writeLine(String st){
- outS.println(st);
- return outS.checkError();
- }
- synchronized void processKill(){
- ps.destroy();
- }
- boolean isError(){
- return isErr;
- }
- String getErrorMsg(){
- if (!isErr) return "";
- return errMsg;
- }
-}
diff --git a/environments/Momo/java/Momo/GAG/GAGtextEditor.class b/environments/Momo/java/Momo/GAG/GAGtextEditor.class
deleted file mode 100644
index 008395e100..0000000000
Binary files a/environments/Momo/java/Momo/GAG/GAGtextEditor.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/GAGtextEditor.java b/environments/Momo/java/Momo/GAG/GAGtextEditor.java
deleted file mode 100644
index b88680b99f..0000000000
--- a/environments/Momo/java/Momo/GAG/GAGtextEditor.java
+++ /dev/null
@@ -1,13 +0,0 @@
-// GAG (Geant4 Adaptive GUI)
-// Requires : JDK 1.1.3 (or later) + swing-1.0.2
-// Version : alpha 1998/Mar/31
-// Toshiaki Kodama GEANT4 GUI Group
-// 1998 July 6 GEANT4 Beta-01
-// This is an junction to better TextEditor in future.
-
-package GAG;
-
-public interface GAGtextEditor {
- public void writeString(String str);
- public void writeLine(String str);
-}
diff --git a/environments/Momo/java/Momo/GAG/HtmlFrame.class b/environments/Momo/java/Momo/GAG/HtmlFrame.class
deleted file mode 100644
index a1001bf160..0000000000
Binary files a/environments/Momo/java/Momo/GAG/HtmlFrame.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/HtmlFrame.java b/environments/Momo/java/Momo/GAG/HtmlFrame.java
deleted file mode 100644
index ede83911ba..0000000000
--- a/environments/Momo/java/Momo/GAG/HtmlFrame.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// jdk-1.1.3 (or later) + swing-1.0.2
-// This is not required in GAG
-
-import com.sun.java.swing.*;
-
-import java.awt.*;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.io.IOException;
-
-public class HtmlFrame extends JFrame {
- public HtmlFrame() {
- // setBackground(Color.white);
- setLayout(new BorderLayout());
- try {
- URL url = new URL("http://erlt1.naruto-u.ac.jp/~geant4/README_Momo.html");
- JEditorPane html = new JEditorPane(url);
- JScrollPane scroller = new JScrollPane(html);
- add("Center", scroller);
- } catch (MalformedURLException e) {
- System.out.println("Malformed URL: " + e);
- } catch (IOException e) {
- System.out.println("IOException: " + e);
- }
- setSize(400, 400);
- show();
- }
- public static void main(String arg[]){
- new HtmlFrame();
- }
-}
diff --git a/environments/Momo/java/Momo/GAG/NOTE.txt b/environments/Momo/java/Momo/GAG/NOTE.txt
deleted file mode 100644
index 08900cd4f2..0000000000
--- a/environments/Momo/java/Momo/GAG/NOTE.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-1998 July 6 JAVA GAG for Beta-01 release
-
- H. Yoshida; Naruto UE
-
-This directory and its subdirectories contain all necessary JAVA
-source codes as well as *.class files. All are archived into
-GAG.jar file.
-
-JAVA GAG uses Swing-1.0.2. Older versions based on Swing-1.0.1 can't
-be compiled, and pour out "deprecated" errors on javac.
-
-But Swing-1.0.2 has yet unfrozen classes and interfaces, among them
-are JColorChooser and JFileChooser which JAVA GAG uses.
-
-They are left as before in swing.preview package!!
-Swing-1.0.3 is announced, but we will wait JDK1.2 which
-is forseen in the next September (right?).
-
-
diff --git a/environments/Momo/java/Momo/GAG/ParamPanel.class b/environments/Momo/java/Momo/GAG/ParamPanel.class
deleted file mode 100644
index 9ccebd7ff6..0000000000
Binary files a/environments/Momo/java/Momo/GAG/ParamPanel.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/ParamPanel.java b/environments/Momo/java/Momo/GAG/ParamPanel.java
deleted file mode 100644
index 7be3a5d3d3..0000000000
--- a/environments/Momo/java/Momo/GAG/ParamPanel.java
+++ /dev/null
@@ -1,416 +0,0 @@
-// GAG (Geant4 Adaptive GUI)
-// Requires : JDK 1.1.3 (or later) + swing-1.0.2
-// Version : alpha 1998/Mar/31
-// GEANT4 GUI Group, Toshiaki Kodama
-// modified by H Yoshida, 1998 June 25
-// use of FileFilter of Swing 1.0.2, to select after file extensions
-// improvement of notification method of GEANT4 states
-// by using setVisible and setBackground of relevant buttons
-// specially "ok" button.
-
-package GAG;
-
-import com.sun.java.swing.preview.*;
-//FileFilter of Swing1.0.2
-import ExampleFileFilter;
-
-import java.util.*;
-import java.awt.*;
-import java.io.*;
-import java.awt.event.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.preview.filechooser.*;
-// for Swing-1.0.2 FileChooser
-
-class ParamPanel extends JPanel implements ActionListener, ItemListener {
- private GAG gag;
- private GridBagLayout gbl; GridBagConstraints gbc;
- private JPanel paramArea;
- private JButton def, current, clear, ok, fileBrowser;
- private JComboBox history;
- private int posY;
- private GAGcommandItem ci;
- private Component paraBox[];
- private boolean isExecuting;
- private JFileChooser fileChooser;
-// FileFilter in Swing-1.0.2 test
- private ExampleFileFilter g4mFilter, macroFilter, g4macroFilter,
- txtFilter;
-
-
-
- ParamPanel(GAG gag){
- isExecuting = false;
- this.gag = gag;
- setLayout( new BorderLayout() );
-
- gbc = new GridBagConstraints();
- gbl = new GridBagLayout();
-
- paramArea = new JPanel();
- paramArea.setLayout(gbl);
- paramArea.setBackground(new Color(255, 250, 230));
- add("Center", new JScrollPane(paramArea));
-
- JPanel buttons = new JPanel();
- buttons.setLayout(new GridLayout( 1, 0, 2, 2));
-// Yoshida color
- def = new JButton("Default");
- current = new JButton("Current");
- clear = new JButton("Clear");
- ok = new JButton("OK");
- ok.setBackground(Color.green);
-//no good?? ok.setFont(new Font("OK",1,12));
- def.setBackground(Color.blue);
- current.setBackground(Color.orange);
- clear.setBackground(SystemColor.white);
-// ok.setBackground(SystemColor.control);
-// color
-
- buttons.add( def );
- buttons.add( current );
- buttons.add( clear );
- buttons.add( ok );
- add("South", buttons);
-
- history = new JComboBox();
- history.addItem("# GEANT4 history macro.");
- history.addItemListener(this);
- add("North", history);
-//yoshida setinvisible and setdisable
- def.setVisible(false);
- def.setEnabled(false);
- def.setMargin(new Insets(1,3,1,3));
- def.addActionListener(this);
-
-//yoshida
- current.setVisible(false);
- current.setEnabled(false);
- current.setMargin(new Insets(1,3,1,3));
- current.addActionListener(this);
-//yoshida
- clear.setVisible(false);
- clear.setEnabled(false);
- clear.setMargin(new Insets(1,3,1,3));
- clear.addActionListener(this);
-
-//yoshida
- ok.setVisible(false);
- ok.setEnabled(false);
- ok.setMargin(new Insets(1,3,1,3));
- ok.addActionListener(this);
-
- fileBrowser = new JButton("Open a Macro File");
- fileBrowser.addActionListener(this);
- fileChooser = new JFileChooser(".");
-// Swing 1.0.2 FileFilter OK!! 1998 June 25
- fileChooser.setDialogTitle("Macro File");
- g4mFilter = new ExampleFileFilter("g4m", "Geant4 macro");
- g4macroFilter = new ExampleFileFilter("g4macro", "Geant4 macro");
- txtFilter = new ExampleFileFilter("txt", "Geant4 macro");
- macroFilter = new ExampleFileFilter("macro", "Geant4 macro");
-
- fileChooser.addChoosableFileFilter(g4mFilter);
- fileChooser.addChoosableFileFilter(g4macroFilter);
- fileChooser.addChoosableFileFilter(txtFilter);
- fileChooser.addChoosableFileFilter(macroFilter);
-
-// end of Swing-1.0.2 FileChooser
-
-
- }
- void setParamBox(GAGcommandItem ci, boolean enable){
- paramArea.removeAll();
- this.ci = ci;
- posY = 0;
- JLabel l;
- if (!enable){
- l = new JLabel("This command is not available.");
- l.setForeground(Color.red);
- addComponent(l);
- }
- addComponent(new JLabel(ci.getCommandName()));
- String guide[] = ci.getCommandGuide();
- for (int i=0; i 0){
- def.setEnabled(true);
-//yoshida
- def.setVisible(true);
- current.setEnabled(!isExecuting && enable);
-//yoshida
- current.setVisible(!isExecuting && enable);
- clear.setEnabled(true);
-//yoshida
- clear.setVisible(true);
- paraBox = new JComponent[ci.getParamEntries()];
- String candidateList;
- for (int i=0; i 0){
- String val;
- for (int i=0; i= 0){
- JOptionPane.showMessageDialog(this, ci.getParamName(i)+"\nThis parameter cannot include SPACE character", "Error", JOptionPane.WARNING_MESSAGE);
- return null;
- }
- }else{
- val = (String)((JComboBox)paraBox[i]).getSelectedItem();
- }
- param.append(" "+val);
- }
-//yoshida
- current.setVisible(false);
- current.setEnabled(false);
- }
-//yoshida
- ok.setVisible(false);
- ok.setEnabled(false);
- history.addItem(param.toString());
- return param.toString();
- }
- private void addComponent(Component compo){
- gbc.gridx = 0; gbc.gridy = posY++;
- gbc.gridwidth = 3; gbc.gridheight = 1;
- gbc.weightx = 1.0; gbc.weighty = 0.0;
- gbc.anchor = GridBagConstraints.WEST;
- gbl.setConstraints(compo, gbc);
- paramArea.add(compo);
- }
- private void addComponent(Component compo1, Component compo2){
- gbc.gridx = 0; gbc.gridy = posY;
- gbc.gridwidth = 1; gbc.gridheight = 1;
- gbc.weightx = 0.0; gbc.weighty = 0.0;
- gbc.anchor = GridBagConstraints.EAST;
- gbl.setConstraints(compo1, gbc);
- paramArea.add(compo1);
- gbc.gridx = 1;
- gbc.anchor = GridBagConstraints.WEST;
- gbl.setConstraints(compo2, gbc);
- paramArea.add(compo2);
- posY++;
- }
- private void addComponent(Component title, Component compo1, Component compo2){
- gbc.gridx = 0; gbc.gridy = posY;
- gbc.gridwidth = 1; gbc.gridheight = 1;
- gbc.weightx = 0.0; gbc.weighty = 0.0;
- gbc.fill = GridBagConstraints.NONE;
- gbc.anchor = GridBagConstraints.EAST;
- gbl.setConstraints(title, gbc);
- paramArea.add(title);
- gbc.gridx = 1;
- gbc.fill = GridBagConstraints.HORIZONTAL;
- gbl.setConstraints(compo1, gbc);
- paramArea.add(compo1);
- gbc.gridx = 2;
- gbc.fill = GridBagConstraints.NONE;
- gbc.anchor = GridBagConstraints.WEST;
- gbl.setConstraints(compo2, gbc);
- paramArea.add(compo2);
- posY++;
- }
- private void loadValue(int i, String str){
- if (paraBox[i] instanceof JTextField){
- ((JTextField)paraBox[i]).setText(str);
- }
- if (paraBox[i] instanceof JComboBox){
- ((JComboBox)paraBox[i]).setSelectedItem(str);
- }
- }
- void addHistory(String line){
- if (line.startsWith("/")) history.addItem(line);
- }
- void clearAllHistory(){
- history.removeAllItems();
- }
- void clearOneHistory(){
- int ix = history.getSelectedIndex();
- if (ix >= 0) history.removeItemAt(ix);
- }
- String[] getHistoryItems(){
- String[] item = new String[history.getItemCount()];
- for (int i=0; i>history.getItemCount(); i++){
- item[i] = (String)history.getItemAt(i);
- }
- return item;
- }
- void loadCurrentValues(String line){
- StringTokenizer st = new StringTokenizer( line );
- st.nextToken();
- int i=0;
- while(st.hasMoreTokens()){
- loadValue(i++, st.nextToken());
- }
- }
- public void itemStateChanged(ItemEvent ie){
- if (isExecuting) return;
- if (ie.getStateChange() != ItemEvent.SELECTED) return;
- String str = (String)ie.getItem();
- if ( !str.startsWith("/") ) return;
- StringTokenizer st = new StringTokenizer( str );
- if (!gag.setParamPanel(st.nextToken())) return;
- int i=0;
- while(st.hasMoreTokens()){
- loadValue(i++, st.nextToken());
- if (i >= ci.getParamEntries()) return;
- }
- }
- public void actionPerformed(ActionEvent ev){
- Object source = ev.getSource();
- if ( source == ok ){
- String p = makeCommandLine();
- if (p == null) return;
- isExecuting = true;
- gag.sendCommand(p);
-//yoshida instead of sandwatch, ok button becomes invisible
- ok.setVisible(false);
- ok.setEnabled(false);
-// Be careful! mouse may freeze, if setinvisible but not setdisabled!!
- return;
- }else if (source == def){
- for (int i=0; ci.getParamEntries()>i; i++){
- loadValue(i, ci.getParamDefault(i));
- }
- return;
- }else if (source == current){
- gag.reqCurrent(ci.getCommandName());
- return;
- }else if (source == clear){
- for (int i=0; ci.getParamEntries()>i; i++){
- if (paraBox[i] instanceof JTextField){
- ((JTextField)paraBox[i]).setText("");
- }
- }
- return;
- }else if (source == fileBrowser){
-//swing102 filechooser showDialog(this, null) or the next
- if (fileChooser.showOpenDialog(this) == -1 ) return;
- File f = fileChooser.getSelectedFile();
- if (f.isFile()) {
- if (paraBox[0] instanceof JTextField){
- ((JTextField)paraBox[0]).setText(f.getPath());
- }
- }
- return;
- }
- }
- void toReady(){
- isExecuting = false;
- if (ci == null) return;
- ok.setEnabled(true);
-//yoshida setenable then setvisible
- ok.setVisible(true);
- if (ci.getParamEntries() == 0) return;
- current.setEnabled(true);
-//yoshida
- current.setVisible(true);
- }
-}
-
-class BooleanCombo extends JComboBox {
- BooleanCombo(String str){
- String def = str.toUpperCase();
- if (def.equals("0") || def.equals("1")){
- addItem("0");
- addItem("1");
- }else if (def.equals("Y") || def.equals("N")){
- addItem("Y");
- addItem("N");
- }else if (def.equals("YES") || def.equals("NO")){
- addItem("YES");
- addItem("NO");
- }else if (def.equals("T") || def.equals("F")){
- addItem("T");
- addItem("F");
- } else {
- addItem("FALSE");
- addItem("TRUE");
- }
- if (!def.equals("")){
- setSelectedItem(def);
- }
- }
-}
diff --git a/environments/Momo/java/Momo/GAG/README b/environments/Momo/java/Momo/GAG/README
deleted file mode 100644
index 6e6c9f899b..0000000000
--- a/environments/Momo/java/Momo/GAG/README
+++ /dev/null
@@ -1,24 +0,0 @@
-1998 June 25 Yoshida
-
- Improve look-and-feel of GAG by KOdama (as of 31/March/1998).
-
-
-Swing-1.0.1 is used.
-Swing-1.0.2 is desirable, but wait a moment. Swing-1.0.2 has
-not yet frozen classes and interfaces, among them JColorChooser
-and JFileChooser.
-They are left as before in swing.preview package!!
-
-
-Swing-1.0.2 JFileChooser is good for us since it allows file filtering,
- free label on buttons etc..
-
-But it is better to wait JDK1.2!!
-
-
-So there is only minor improvements.
-
-Font is one of the most iportant improvement.
-Current fonts are too small or not beautiful.
-
-
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/AboutDialog.class b/environments/Momo/java/Momo/GAG/TextEdit/AboutDialog.class
deleted file mode 100644
index 4a625698ef..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/AboutDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/EditMan.class b/environments/Momo/java/Momo/GAG/TextEdit/EditMan.class
deleted file mode 100644
index b5fc8311e7..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/EditMan.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/EditMan.java b/environments/Momo/java/Momo/GAG/TextEdit/EditMan.java
deleted file mode 100644
index ae7d9c607f..0000000000
--- a/environments/Momo/java/Momo/GAG/TextEdit/EditMan.java
+++ /dev/null
@@ -1,444 +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
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.datatransfer.*;
-
-class EditMan extends Object implements ActionListener, ClipboardOwner
-{
- // remember stuff
-
- private TextEdit textEdit;
- private TextCanvas textCanvas;
- private String undoString = new String("Undo");
- private String redoString = new String("Redo");
- private String copyString = new String("Copy");
- private String cutString = new String("Cut");
- private String pasteString = new String("Paste");
- private String findString = new String("Find");
- private String replaceString = new String("Replace");
- private MenuItem undoItem;
- private MenuItem redoItem;
- private MenuItem copyItem;
- private MenuItem cutItem;
- private Clipboard clipboard;
-
- private FindDialog findDialog = null;
- private String findPattern = null;
- private ReplaceDialog replaceDialog = null;
- private String ReplacePattern = null;
- private String ReplaceReplace = null;
-
- // constructor puts together UI
-
- public EditMan(TextEdit p)
- {
- textEdit = p;
- textCanvas = textEdit.getCanvas();
- clipboard = textEdit.getToolkit().getSystemClipboard();
- }
-
- public void addItems(Menu menu)
- {
- MenuItem item;
- undoItem = new MenuItem(undoString, new MenuShortcut(KeyEvent.VK_Z,false));
- undoItem.setActionCommand(undoString);
- undoItem.setEnabled(false);
- menu.add(undoItem);
- redoItem = new MenuItem(redoString, new MenuShortcut(KeyEvent.VK_Y,false));
- redoItem.setActionCommand(redoString);
- redoItem.setEnabled(false);
- menu.add(redoItem);
- menu.addSeparator();
- copyItem = new MenuItem(copyString, new MenuShortcut(KeyEvent.VK_C,false));
- copyItem.setActionCommand(copyString);
- copyItem.setEnabled(false);
- menu.add(copyItem);
- cutItem = new MenuItem(cutString, new MenuShortcut(KeyEvent.VK_X,false));
- cutItem.setActionCommand(cutString);
- cutItem.setEnabled(false);
- menu.add(cutItem);
- item = new MenuItem(pasteString, new MenuShortcut(KeyEvent.VK_V,false));
- item.setActionCommand(pasteString);
- menu.add(item);
- menu.addSeparator();
- item = new MenuItem(findString, new MenuShortcut(KeyEvent.VK_F,false));
- item.setActionCommand(findString);
- menu.add(item);
- item = new MenuItem(replaceString, new MenuShortcut(KeyEvent.VK_H,false));
- item.setActionCommand(replaceString);
- menu.add(item);
- menu.addActionListener(this);
-
- textCanvas.setEditMan(this);
- }
-
- public void updateCopyItems(boolean have_selection)
- {
- copyItem.setEnabled(have_selection);
- cutItem.setEnabled(have_selection);
- }
-
- public void updateUndoItems(boolean have_undo, boolean have_redo)
- {
- undoItem.setEnabled(have_undo);
- redoItem.setEnabled(have_redo);
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- String cmd = evt.getActionCommand();
-
- if (cmd == null)
- return;
-
- if (cmd.equals(undoString))
- {
- textCanvas.undo(true);
- }
- if (cmd.equals(redoString))
- {
- textCanvas.undo(false);
- }
- else
- if (cmd.equals(copyString))
- {
- // Implement Copy operation
- String srcData = textCanvas.copy(false);
- if (srcData != null)
- {
- StringSelection contents = new StringSelection(srcData);
- clipboard.setContents(contents, this);
- }
- }
- else
- if (cmd.equals(cutString))
- {
- // Implement Copy operation
- String srcData = textCanvas.copy(true);
- if (srcData != null)
- {
- StringSelection contents = new StringSelection(srcData);
- clipboard.setContents(contents, this);
- }
- }
- else
- if (cmd.equals(pasteString))
- {
- String dstData;
- // Implement Paste operation
- Transferable content = clipboard.getContents(this);
- if (content != null)
- {
- try
- {
- dstData = (String)content.getTransferData(DataFlavor.stringFlavor);
- }
- catch (Exception e)
- {
- System.out.println("Could not read clipboard");
- return;
- }
- textCanvas.paste(dstData);
- }
- }
- else
- if (cmd.equals(findString))
- {
- if (findDialog == null)
- findDialog = new FindDialog(textEdit,this,findPattern);
- findDialog.show();
- }
- else
- if (cmd.equals(replaceString))
- {
- if (replaceDialog == null)
- replaceDialog = new ReplaceDialog(textEdit,this,ReplacePattern,ReplaceReplace);
- replaceDialog.show();
- }
- }
-
- public void CloseFindDialog(String pat)
- {
- findDialog = null;
- findPattern = new String(pat);
- }
-
- public void CloseReplaceDialog(String pat, String rep)
- {
- replaceDialog = null;
- ReplacePattern = new String(pat);
- ReplaceReplace = new String(rep);
- }
-
- public void lostOwnership(Clipboard clipboard, Transferable contents)
- {
- }
-}
-
-class FindDialog extends Frame implements WindowListener, ActionListener
-{
- private Button fbutton,cbutton;
- private EditMan editMan;
- private TextEdit textEdit;
- private TextField pattern;
-
- public FindDialog(TextEdit te, EditMan em, String pat)
- {
- super("Find");
-
- setBackground(Color.lightGray);
-
- textEdit = te;
- editMan = em;
-
- Panel p1 = new Panel();
- p1.setLayout(new FlowLayout());
- p1.add(new Label("Find:"));
-
-
- pattern = new TextField();
- pattern.setColumns(35);
-
- if (pat != null)
- pattern.setText(pat);
-
- p1.add(pattern);
- p1.doLayout();
- add("North", p1);
-
- Panel p2 = new Panel();
- fbutton = new Button("Find Next");
- fbutton.addActionListener(this);
- p2.add(fbutton);
- cbutton = new Button("Cancel");
- cbutton.addActionListener(this);
- p2.add(cbutton);
- add("South",p2);
- setSize(400,110);
-
- addWindowListener(this);
- }
-
- public void windowDeiconified(WindowEvent event) {}
- public void windowIconified(WindowEvent event) {}
- public void windowActivated(WindowEvent event) {}
- public void windowDeactivated(WindowEvent event) {}
- public void windowOpened(WindowEvent event) {}
- public void windowClosed(WindowEvent event) {}
- public void windowClosing(WindowEvent event)
- {
- editMan.CloseFindDialog(pattern.getText());
- dispose();
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- if (evt.getSource() == cbutton)
- {
- editMan.CloseFindDialog(pattern.getText());
- dispose();
- return;
- }
-
- if (evt.getSource() == fbutton)
- if (!textEdit.getCanvas().find(pattern.getText()))
- {
- NotFound nf = new NotFound(textEdit);
- nf.show();
- }
- }
-
-}
-
-class ReplaceDialog extends Frame implements WindowListener, ActionListener
-{
- private Button fbutton,rbutton,cbutton;
- private TextField pattern;
- private TextField replace;
- private TextEdit textEdit;
- private EditMan editMan;
- boolean foundOnce = false;
-
- public ReplaceDialog(TextEdit p, EditMan em, String pat, String rep)
- {
- super("Find and Replace");
-
- setBackground(Color.lightGray);
-
- textEdit = p;
- editMan = em;
- Panel p1 = new Panel();
-
- GridBagLayout gridbag = new GridBagLayout();
- GridBagConstraints constraints = new GridBagConstraints();
- p1.setLayout(gridbag);
-
- Label flabel = new Label("Find:");
- constraints.anchor = GridBagConstraints.NORTHWEST;
- gridbag.setConstraints(flabel, constraints);
-
- pattern = new TextField();
- pattern.setColumns(35);
-
- if (pat != null)
- pattern.setText(pat);
-
- constraints.gridwidth = GridBagConstraints.REMAINDER;
- gridbag.setConstraints(pattern, constraints);
-
- p1.add(flabel);
- p1.add(pattern);
-
- Label rlabel = new Label("Replace:");
- constraints.anchor = GridBagConstraints.WEST;
- constraints.gridwidth = 1;
- gridbag.setConstraints(rlabel, constraints);
-
- replace = new TextField();
- replace.setColumns(35);
-
- if (rep != null)
- replace.setText(rep);
-
- constraints.gridwidth = GridBagConstraints.REMAINDER;
- gridbag.setConstraints(replace, constraints);
-
- p1.add(rlabel);
- p1.add(replace);
-
- add("Center", p1);
-
- Panel p3 = new Panel();
- fbutton = new Button("Find Next");
- fbutton.addActionListener(this);
- p3.add(fbutton);
- rbutton = new Button("Replace");
- rbutton.addActionListener(this);
- p3.add(rbutton);
- cbutton = new Button("Cancel");
- cbutton.addActionListener(this);
- p3.add(cbutton);
- add("South",p3);
- setSize(400,120);
-
- addWindowListener(this);
- }
-
- public void windowDeiconified(WindowEvent event) {}
- public void windowIconified(WindowEvent event) {}
- public void windowActivated(WindowEvent event) {}
- public void windowDeactivated(WindowEvent event) {}
- public void windowOpened(WindowEvent event) {}
- public void windowClosed(WindowEvent event) {}
- public void windowClosing(WindowEvent event)
- {
- editMan.CloseReplaceDialog(pattern.getText(),replace.getText());
- dispose();
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- if (evt.getSource() == cbutton)
- {
- editMan.CloseReplaceDialog(pattern.getText(),replace.getText());
- dispose();
- return;
- }
-
- if (evt.getSource() == fbutton)
- foundOnce = textEdit.getCanvas().find(pattern.getText());
- else
- if (evt.getSource() == rbutton)
- {
- if (!foundOnce)
- {
- TextCanvas textCanvas = textEdit.getCanvas();
- String selection= textCanvas.copy(false);
- if (selection != null)
- foundOnce = selection.equals(pattern.getText());
- }
-
- if (foundOnce)
- textEdit.getCanvas().paste(replace.getText());
-
- foundOnce = textEdit.getCanvas().find(pattern.getText());
- }
-
- if (!foundOnce)
- {
- NotFound nf = new NotFound(textEdit);
- nf.show();
- }
- }
-
-}
-
-class NotFound extends Dialog implements WindowListener, ActionListener
-{
- private Button okButton;
-
- public NotFound(TextEdit te)
- {
- super(te,"",true);
-
- Panel north = new Panel();
- north.add(new Label("String not found"));
- add("North", north);
-
- okButton = new Button("OK");
- okButton.addActionListener(this);
- Panel south = new Panel();
- south.add(okButton);
- add("South", south);
-
- setSize(200,110);
-
- addWindowListener(this);
- }
-
- public void windowDeiconified(WindowEvent event) {}
- public void windowIconified(WindowEvent event) {}
- public void windowActivated(WindowEvent event) {}
- public void windowDeactivated(WindowEvent event) {}
- public void windowOpened(WindowEvent event) {}
- public void windowClosed(WindowEvent event) {}
- public void windowClosing(WindowEvent event)
- {
- dispose();
- }
-
- public void actionPerformed(ActionEvent evt)
- {
- if (evt.getSource() == okButton)
- dispose();
- }
-
-}
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/FindDialog.class b/environments/Momo/java/Momo/GAG/TextEdit/FindDialog.class
deleted file mode 100644
index 5f50f48dbd..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/FindDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/FontMan.class b/environments/Momo/java/Momo/GAG/TextEdit/FontMan.class
deleted file mode 100644
index d959f5471d..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/FontMan.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/NotFound.class b/environments/Momo/java/Momo/GAG/TextEdit/NotFound.class
deleted file mode 100644
index 83245f7533..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/NotFound.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/Note.class b/environments/Momo/java/Momo/GAG/TextEdit/Note.class
deleted file mode 100644
index df5398cb77..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/Note.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/Note.java b/environments/Momo/java/Momo/GAG/TextEdit/Note.java
deleted file mode 100644
index e96085d61b..0000000000
--- a/environments/Momo/java/Momo/GAG/TextEdit/Note.java
+++ /dev/null
@@ -1,118 +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
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.awt.event.*;
-
-// This extension of Dialog implements modal dialogs with a callback interface
-// to work around the "modal dialog problem" on Windows. The "NoteListener"
-// interface is used to return an action code to the parent when "continue" is
-// pressed.
-
-class Note extends Dialog implements WindowListener, ActionListener
-{
- int noteAction;
- NoteListener noteListener;
- Button accepted;
- Button whatever;
-
- // Constructor takes a string and an action. Note that action == 0 implies
- // that there is only an "ok" button, while action != 0 implies a "Continue" and
- // a "Cancel" button.
-
- public Note(Frame parent, String s, int action)
- {
- super(parent, "Note", true);
-
- noteListener = (NoteListener)parent;
- noteAction = action;
-
- Panel center = new Panel();
- center.add(new Label(s));
- add("Center", center);
-
- Panel south = new Panel();
-
- if (action != 0)
- {
- accepted = new Button("Continue");
- accepted.addActionListener(this);
- south.add(accepted);
- whatever = new Button("Cancel");
- whatever.addActionListener(this);
- south.add(whatever);
- }
- else
- {
- whatever = new Button("Ok");
- whatever.addActionListener(this);
- south.add(whatever);
- }
-
- add("South", south);
-
- setSize(300, 100);
-
- addWindowListener(this);
- }
-
- // if we get a "Continue" button, call the parent's noteListener
-
- public void actionPerformed(ActionEvent event)
- {
- Object source;
-
- source = event.getSource();
-
- if (source == accepted)
- {
- setVisible(false);
- setModal(false);
- noteListener.noteListen(noteAction);
- }
-
- if ((source == accepted) || (source == whatever))
- dispose();
- }
-
- // add the 1.1 WindowListener stuff
-
- public void windowDeiconified(WindowEvent event) {}
- public void windowIconified(WindowEvent event) {}
- public void windowActivated(WindowEvent event) {}
- public void windowDeactivated(WindowEvent event) {}
- public void windowOpened(WindowEvent event) {}
- public void windowClosed(WindowEvent event) {}
-
- public void windowClosing(WindowEvent event) {
- dispose();
- }
-
-}
-
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/NoteListener.class b/environments/Momo/java/Momo/GAG/TextEdit/NoteListener.class
deleted file mode 100644
index f4c87f6f40..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/NoteListener.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/NoteListener.java b/environments/Momo/java/Momo/GAG/TextEdit/NoteListener.java
deleted file mode 100644
index 7e43eae3b3..0000000000
--- a/environments/Momo/java/Momo/GAG/TextEdit/NoteListener.java
+++ /dev/null
@@ -1,34 +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
- */
-
-package TextEdit;
-
-interface NoteListener
-{
- public void noteListen(int action);
-}
-
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/PrintMan.class b/environments/Momo/java/Momo/GAG/TextEdit/PrintMan.class
deleted file mode 100644
index a0d7fea37c..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/PrintMan.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/PrintMan.java b/environments/Momo/java/Momo/GAG/TextEdit/PrintMan.java
deleted file mode 100644
index a1da10de32..0000000000
--- a/environments/Momo/java/Momo/GAG/TextEdit/PrintMan.java
+++ /dev/null
@@ -1,154 +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
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.util.*;
-
-public class PrintMan extends Thread
-{
-
- private PrintJob pjob;
- private Vector spool;
- private Font font;
- private Frame parent;
- private String jobName;
- private int tabsize;
-
- private final int PRINT_PROGRESS = 10000;
-
- public PrintMan(Frame p, String n, Vector lines, Font f, int t)
- {
- int i,max,part,tens;
-
- parent = p;
- jobName = n;
- font = f;
- tabsize = t;
-
- max = lines.size();
- spool = new Vector(max);
- tens = max / 10;
- part = 0;
-
- Progress spoolProgress = null;
-
- if (max > PRINT_PROGRESS)
- {
- spoolProgress = new Progress(parent,"Saving print copy ... ");
- spoolProgress.show();
- }
-
- for (i=0;i PRINT_PROGRESS)
- part++;
- if (part > tens)
- {
- spoolProgress.update( (int)(100 * i / max) );
- part = 0;
- }
- }
-
- if (spoolProgress != null)
- spoolProgress.dispose();
- }
-
- public void run()
- {
- pjob = parent.getToolkit().getPrintJob(parent, jobName, null);
-
- if (pjob == null)
- return;
-
- Graphics pg = pjob.getGraphics();
-
- if (pg != null)
- {
- String nextLine;
- int pageHeight = pjob.getPageDimension().height;
- pg.setFont(font);
- FontMetrics fm = pg.getFontMetrics(font);
- int fontHeight = fm.getHeight();
- int fontDescent = fm.getDescent();
- int curHeight = 0;
-
- for (int i = 0; i < spool.size(); i++ )
- {
- curHeight += fontHeight;
- if (curHeight > pageHeight)
- {
- pg.dispose();
- pg = pjob.getGraphics();
- if (pg == null)
- return;
- pg.setFont(font);
- curHeight = fontHeight;
- }
- nextLine = detabbed((String)spool.elementAt(i),tabsize);
- pg.drawString(nextLine, 0, curHeight - fontDescent);
- }
-
- pg.dispose();
- }
-
- pjob.end();
- }
-
- private String detabbed(String s, int tabSize)
- {
- if (s.indexOf('\t') < 0)
- return s;
-
- char c;
- String t = new String("");
- int j=0;
- int tabs;
- int max = s.length();
-
- for (int i=0; i 0) t = t + ' ';
- }
- else
- {
- t = t + c;
- j++;
- }
- }
-
- return t;
- }
-
-}
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/Progress.class b/environments/Momo/java/Momo/GAG/TextEdit/Progress.class
deleted file mode 100644
index 545f682688..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/Progress.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/Progress.java b/environments/Momo/java/Momo/GAG/TextEdit/Progress.java
deleted file mode 100644
index b7a4b71af8..0000000000
--- a/environments/Momo/java/Momo/GAG/TextEdit/Progress.java
+++ /dev/null
@@ -1,67 +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
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.awt.event.*;
-
-// This extension of Dialog implements modal dialogs with a callback interface
-// to work around the "modal dialog problem" on Windows. The "NoteListener"
-// interface is used to return an action code to the parent when "continue" is
-// pressed.
-
-class Progress extends Dialog
-{
- Panel center;
-
- public Progress(Frame parent, String s)
- {
- super(parent);
-
- Panel north = new Panel();
- north.add(new Label(s));
- add("North", north);
-
- center = new Panel();
- add("Center", center);
-
- setSize(300, 100);
- }
-
- public void update( int percent )
- {
- Dimension d = center.getSize();
- Graphics g = center.getGraphics();
-
- int fifth = d.width / 5;
- int third = d.height / 3;
-
- g.fillRect( fifth, third, (fifth * 3 * percent) / 100, third);
- }
-
-}
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/ReplaceDialog.class b/environments/Momo/java/Momo/GAG/TextEdit/ReplaceDialog.class
deleted file mode 100644
index 8e5b0fa599..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/ReplaceDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/SizeMan.class b/environments/Momo/java/Momo/GAG/TextEdit/SizeMan.class
deleted file mode 100644
index aef239019e..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/SizeMan.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextCanvas.class b/environments/Momo/java/Momo/GAG/TextEdit/TextCanvas.class
deleted file mode 100644
index f2ec6edbd9..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/TextCanvas.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextCanvas.java b/environments/Momo/java/Momo/GAG/TextEdit/TextCanvas.java
deleted file mode 100644
index 97c0ac1d51..0000000000
--- a/environments/Momo/java/Momo/GAG/TextEdit/TextCanvas.java
+++ /dev/null
@@ -1,1407 +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
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.io.*;
-import java.util.*;
-import java.awt.event.*;
-
-class TextCanvas extends Canvas implements MouseMotionListener, MouseListener, ComponentListener, AdjustmentListener, KeyListener, FocusListener {
- final public int NOACTION = 0; // a null note action
- final private int EDGE = 10;
-
- private Scrollbar horiz; // control
- private Scrollbar vert; // control
-
- private boolean eactive,hactive; // is there currently a range?
- private boolean dirty; // document dirty flag
- private boolean mouseDown;
-
- private int sx,sy,ny; // current scroll positions
- private int line,column,pix; // the current column
- private int eline,ecolumn,epix; // the current end column
- private int widest,wpix; // the longest line
- private int oldlines; // repaint to old line count (if longer)
- private int fontHeight; // save time
- private int fontDescent; // save time
- private int tabSize = 4; // preference
-
- private String lineSeparator;
-
- private Font font; // preference
- private FontMetrics fontMetrics; // save time
- private Frame parent; // freindly object
- private TextCursor textCursor; // freindly object
- private EditMan editMan; // freindly object
- private Dimension dimension; // save time
- private Vector lines; // line buffer
- private TextJournal journal; // journal for "undo"
- private TextScroller textScroller = null;
-
- public TextCanvas(Frame p, Scrollbar h, Scrollbar v) {
- super();
-
- setBackground(Color.white);
- setForeground(Color.black);
-
- parent = p;
-
- lineSeparator = System.getProperty("line.separator");
-
- horiz = h;
- horiz.addAdjustmentListener(this);
- horiz.addKeyListener(this);
-
- vert = v;
- vert.addAdjustmentListener(this);
- vert.addKeyListener(this);
-
- lines = new Vector();
-
- journal = new TextJournal(this,lines,lineSeparator);
-
- addComponentListener(this);
- addMouseListener(this);
- addKeyListener(this);
- addFocusListener(this);
-
- clear();
- validate();
- requestFocus();
-
- textCursor = new TextCursor(this);
- textCursor.start();
- }
-
- //Toshiaki added
- public void writeString(String str){
- paste(str);
- journal.clear();
- }
- public void writeLine(String str){
- pause_cursor();
- textCursor.suspend();
- if (hactive) copy(true);
- String s = (String)lines.elementAt(line);
- lines.setElementAt(s + str, line);
- line++; column = 0;
- lines.insertElementAt("", line);
- if (editMan != null) {
- editMan.updateCopyItems(false);
- editMan.updateUndoItems(false, false);
- }
- journal.clear();
- if (dimension == null) dimension = getSize();
- shiftVert(line);
- shiftHoriz(EDGE);
- repaint();
- textCursor.resume();
- dirty = true;
- }
-
- private boolean gotFocus = false;
-
- public void focusGained(FocusEvent e) {
- gotFocus = true;
- release_cursor();
- }
-
- private void release_cursor()
- {
- if ((textCursor != null) && !eactive && gotFocus)
- textCursor.release_cursor(true);
- }
-
- public void focusLost(FocusEvent e)
- {
- pause_cursor();
- gotFocus = false;
- }
-
- private void pause_cursor()
- {
- if ((textCursor != null) && !eactive && gotFocus)
- textCursor.pause_cursor(true);
- }
-
- public void setEditMan(EditMan em)
- {
- editMan = em;
- }
-
- public void clear()
- {
- clear_area(null);
- hactive = eactive = dirty = false;
- if (editMan != null)
- {
- editMan.updateCopyItems(false);
- editMan.updateUndoItems(false, false);
- }
- oldlines = wpix = widest = line = column = sx = sy = 0;
- pix = EDGE;
- horiz.setValue(0);
- vert.setValue(0);
- lines.removeAllElements();
- journal.clear();
- }
-
- public void validate()
- {
- if (lines.size() == 0)
- appendLine(new String(""));
- redoCanvas();
- }
-
- public void setFont(String fs, int size)
- {
- font = new Font(fs, Font.PLAIN, size);
- Graphics g = getGraphics();
-
- if (g != null)
- {
- clear_area(g);
- updateFonts(g);
- resizeLines();
- redoCanvas();
- repaint();
- g.dispose();
- }
- else
- fontMetrics = null;
- }
-
- private void clear_area(Graphics g)
- {
- boolean foobar = false;
-
- pause_cursor();
-
- if (dimension == null)
- return;
-
- if (g == null)
- {
- g = getGraphics();
- foobar = true;
- }
-
- if (g != null)
- g.clearRect(0,0,dimension.width,dimension.height);
-
- if (foobar && (g != null))
- g.dispose();
- }
-
- public void setTab(int tab)
- {
- clear_area(null);
- tabSize = tab;
- resizeLines();
- repaint();
- }
-
- public void undo(boolean undo_it)
- {
- TextPosition tp;
-
- pause_cursor();
-
- if (undo_it)
- tp = journal.undo();
- else
- tp = journal.redo();
-
- if (tp == null)
- release_cursor();
- else
- {
- hactive = eactive = false;
- line = eline = tp.line;
- column = ecolumn = tp.column;
- pix = epix = pix_at(line,column);
- shiftVert(line);
- shiftHoriz(pix);
- repaint();
- }
- }
-
- public void updateUndoItems(boolean have_undo, boolean have_redo)
- {
- if (editMan != null)
- editMan.updateUndoItems(have_undo, have_redo);
- }
-
- private void updateFonts(Graphics g)
- {
- boolean foobar = false;
-
- if (g == null)
- {
- g = getGraphics();
- foobar = true;
- }
-
- if (g != null)
- {
- g.setFont(font);
- fontMetrics = g.getFontMetrics(font);
- fontHeight = fontMetrics.getHeight();
- fontDescent = fontMetrics.getDescent();
-
- if (foobar)
- g.dispose();
- }
- }
-
- public void print(String name)
- {
- PrintMan pm = new PrintMan(parent, name, lines, font, tabSize);
-
- if (pm != null)
- pm.start();
- }
-
- public boolean find( String pattern )
- {
- int i,max,ct,start,from;
- String whole;
-
- pause_cursor();
-
- max = lines.size();
- i = line;
- ct = 0;
-
- while (ct++ <= max)
- {
- whole = (String)lines.elementAt(i);
-
- if (( i == line ) && ( ct == 1 ))
- {
- if (eactive)
- from = column + 1;
- else
- from = column;
- }
- else
- from = 0;
-
- start = whole.indexOf(pattern,from);
-
- if (start >= 0)
- {
- line = eline = i;
- column = start;
- pix = stringLength(whole.substring(0,column)) + EDGE;
- ecolumn = start + pattern.length();
- epix = stringLength(whole.substring(0,ecolumn)) + EDGE;
- eactive = true;
- setup_h();
- save_h();
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- shiftVert(line);
- shiftHoriz(pix);
- shiftHoriz(epix);
- repaint();
- return true;
- }
-
- i++;
- if (i >= max)
- i = 0;
- }
-
- release_cursor();
- return false;
- }
-
- public synchronized void mousePressed(MouseEvent e)
- {
- Graphics g;
-
- requestFocus();
-
- if (mouseDown)
- return;
-
- mouseDown = true;
-
- pause_cursor();
- g = getGraphics();
- updateFonts(g);
-
- clickPosition( e.getX(), e.getY() );
-
- if ((cline < 0) || (cline >= lines.size()))
- return;
-
- eline = cline;
- ecolumn = ccolumn;
- epix = cpix;
-
- int clickCount = e.getClickCount();
-
- if (clickCount == 3)
- {
- eline = line = cline;
- column = 0;
- pix = EDGE;
- String whole = (String)lines.elementAt(cline);
- ecolumn = whole.length();
- epix = stringLength(whole) + EDGE;
- eactive = true;
- setup_h();
- save_h();
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- repaint();
- }
- else
- if (clickCount == 2)
- {
- char c;
- eline = line = cline;
- String whole = (String)lines.elementAt(cline);
- column = ecolumn = ccolumn;
- while (true)
- {
- if (column == 0)
- break;
-
- if (!Character.isLetterOrDigit(whole.charAt(column-1)))
- break;
-
- column--;
- }
- pix = stringLength(whole.substring(0,column)) + EDGE;
- int max = whole.length();
- while (true)
- {
- if (ecolumn >= max)
- break;
-
- if (!Character.isLetterOrDigit(whole.charAt(ecolumn)))
- break;
-
- ecolumn++;
- }
- epix = stringLength(whole.substring(0,ecolumn)) + EDGE;
- eactive = true;
- setup_h();
- save_h();
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- repaint();
- }
- else
- if (e.isShiftDown())
- {
- eline = cline;
- ecolumn = ccolumn;
- epix = cpix;
- eactive = true;
- setup_h();
- save_h();
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- repaint();
- }
- else
- {
- if (hactive)
- flip_h( g, oline, opix, oeline, oepix );
- eline = line = cline;
- ecolumn = column = ccolumn;
- epix = pix = cpix;
- hactive = false;
- eactive = true;
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- addMouseMotionListener(this);
- }
-
- g.dispose();
- }
-
- private int opix, oepix, oline, oeline;
- private int hpix, hepix, hline, heline, hcolumn, hecolumn;
- private int lastx,lasty;
-
- public synchronized void mouseDragged(MouseEvent e)
- {
- Graphics g;
-
- g = getGraphics();
- updateFonts(g);
-
- if (e != null)
- {
- lastx = e.getX();
- lasty = e.getY();
- }
-
- clickPosition( lastx, lasty );
-
- eline = cline;
- ecolumn = ccolumn;
- epix = cpix;
-
- eactive = ((eline != line) || (ecolumn != column));
- if (eactive || hactive)
- {
- setup_h();
-
- if ((eline < sy) ||
- (eline >= sy+ny) ||
- (epix < sx) ||
- (epix >= dimension.width))
- {
- if (textScroller == null)
- {
- textScroller = new TextScroller(this);
- textScroller.start();
- }
- shiftVert(eline);
- shiftHoriz(epix);
- setup_h();
- save_h();
- for (int i = 0; i < ny; i++)
- drawLine(g,sy+i);
- }
- else
- {
- if (textScroller != null)
- {
- textScroller.stop();
- textScroller = null;
- }
- if (hactive)
- {
- if ((hline < oline) || ((hline == oline) && (hpix < opix)))
- flip_h( g, hline, hpix, oline, opix );
- if ((hline > oline) || ((hline == oline) && (hpix > opix)))
- flip_h( g, oline, opix, hline, hpix );
- if ((heline < oeline) || ((heline == oeline) && (hepix < oepix)))
- flip_h( g, heline, hepix, oeline, oepix );
- if ((heline > oeline) || ((heline == oeline) && (hepix > oepix)))
- flip_h( g, oeline, oepix, heline, hepix );
- }
- else
- flip_h( g, hline, hpix, heline, hepix );
-
- hactive = eactive;
- save_h();
- }
- }
- g.dispose();
- }
-
- private int cline, ccolumn, cpix;
-
- void clickPosition( int x, int y )
- {
- cline = (y / fontHeight) + sy;
-
- if (cline < 0)
- {
- cline = ccolumn = cpix = 0;
- return;
- }
-
- if (cline >= lines.size())
- {
- cline = lines.size() - 1;
- String whole = (String)lines.elementAt(cline);
- ccolumn = whole.length();
- cpix = stringLength(whole) + EDGE;
- return;
- }
-
- x += sx;
-
- ccolumn = 0;
- cpix = 0;
-
- if (x > EDGE)
- {
- String whole = (String)lines.elementAt(cline);
- String part;
-
- ccolumn = whole.length();
-
- if (( ccolumn > 0 ) && ( x < (cpix = stringLength(whole) + EDGE) ))
- {
- if (ccolumn > 10)
- {
- int delta = ccolumn / 5;
-
- do {
- ccolumn -= delta;
- if (ccolumn < 0)
- {
- ccolumn = 0;
- part = null;
- }
- else
- part = whole.substring(0,ccolumn);
- } while (( ccolumn > 0 ) && ( x < (cpix = stringLength(part) + EDGE) ));
-
- ccolumn += delta;
- }
-
- while (( ccolumn > 0 ) && ( x < (cpix = stringLength(whole) + EDGE) ))
- whole = whole.substring(0,--ccolumn);
- }
- }
- }
-
- private void flip_h(Graphics g, int sline, int spix, int eline, int epix)
- {
- int i;
- int bx,ex,by;
-
- g.setXORMode(Color.white);
-
- if (eline >= sy + ny)
- {
- eline = sy + ny - 1;
- epix = 5000;
- }
-
- for (i = sline; i <= eline; i++)
- {
- by = (i - sy) * fontHeight;
- bx = 0;
- ex = 5000;
- if (i == sline)
- {
- bx = spix - sx;
- }
- if (i == eline)
- {
- ex = epix - sx;
- if (sline == eline)
- ex -= bx;
- }
- g.fillRect(bx,by,ex,fontHeight);
- }
- }
-
- private void setup_h()
- {
- if ((line < eline) || ((line == eline) && (column <= ecolumn)))
- {
- hline = line;
- hcolumn = column;
- hpix = pix;
- heline = eline;
- hecolumn = ecolumn;
- hepix = epix;
- }
- else
- {
- hline = eline;
- hcolumn = ecolumn;
- hpix = epix;
- heline = line;
- hecolumn = column;
- hepix = pix;
- }
- }
-
- private void save_h()
- {
- opix = hpix;
- oepix = hepix;
- oline = hline;
- oeline = heline;
- hactive = eactive;
- }
-
- public synchronized void mouseReleased(MouseEvent e)
- {
- if (!mouseDown)
- return;
-
- mouseDown = false;
-
- if (textScroller != null)
- {
- textScroller.stop();
- textScroller = null;
- }
- removeMouseMotionListener(this);
- eactive = ((eline != line) || (ecolumn != column));
- release_cursor();
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- }
-
- public void mouseEntered(MouseEvent e) {}
- public void mouseExited(MouseEvent e) {}
- public void mouseClicked(MouseEvent e) {}
- public void mouseMoved(MouseEvent e) {}
- public void keyTyped(KeyEvent e) {}
- public void keyReleased(KeyEvent e) {}
-
- private final int myMask = KeyEvent.CTRL_MASK | KeyEvent.META_MASK | KeyEvent.ALT_MASK;
-
- public void keyPressed(KeyEvent e)
- {
- int keyCode = e.getKeyCode();
- char keyChar;
- int max;
- String s;
-
- if (!gotFocus)
- return;
-
- if ((e.getModifiers() & myMask) != 0)
- return;
-
- if ((keyCode == e.VK_UP) && (line == 0))
- return;
-
- pause_cursor();
-
- switch (keyCode) {
- case e.VK_UP:
- line--;
- cursorAdjust();
- return;
- case e.VK_DOWN:
- line++;
- cursorAdjust();
- return;
- case e.VK_RIGHT:
- column++;
- cursorAdjust();
- return;
- case e.VK_LEFT:
- column--;
- cursorAdjust();
- return;
- default:
- keyChar = e.getKeyChar();
- if (keyChar != KeyEvent.CHAR_UNDEFINED)
- {
- if (keyCode == KeyEvent.VK_ENTER)
- {
- if (hactive)
- copy(true);
- journal.split_line(line,column);
- shiftVert(++line);
- column = 0;
- pix = EDGE;
- shiftHoriz(0);
- dirty = true;
- repaint();
- return;
- }
- else
- if (keyCode == KeyEvent.VK_BACK_SPACE)
- {
- if (hactive)
- {
- copy(true);
- return;
- }
- if (column > 0)
- {
- journal.delete_prev_char(line,column);
- column--;
- redoLine(line,column+1);
- return;
- }
- else
- if (line > 0)
- {
- line--;
- s = (String)lines.elementAt(line);
- column = s.length();
- shiftHoriz(stringLength(s) + EDGE);
- journal.join_line(line,column);
- shiftVert(line);
- dirty = true;
- repaint();
- return;
- }
- }
- else
- if (keyCode == KeyEvent.VK_DELETE)
- {
- if (hactive)
- {
- copy(true);
- return;
- }
- s = (String)lines.elementAt(line);
- max = s.length();
- if (column < max)
- {
- journal.delete_next_char(line,column);
- redoLine(line,column+1);
- return;
- }
- else
- if (line+1 < lines.size())
- {
- journal.join_line(line,column);
- dirty = true;
- repaint();
- return;
- }
- }
- else
- if (keyCode != KeyEvent.VK_ESCAPE &&
- keyChar != '\n' &&
- keyChar != '\b')
- {
- if (hactive)
- copy(true);
- journal.insert_char(line,column,keyChar);
- column++;
- redoLine(line,column);
- release_cursor();
- return;
- }
- }
- }
- release_cursor();
- }
-
- public void paste(String s)
- {
- int oldline;
- int oldcolumn;
- TextPosition tp;
-
- pause_cursor();
-
- if (hactive)
- copy(true);
-
- oldline = line;
- oldcolumn = column;
-
- tp = journal.insert_section(line,column,s);
- line = tp.line;
- column = tp.column;
-
- pix = pix_at( line, column );
- shiftVert(line);
- shiftHoriz(pix);
-
- if (oldline != line)
- {
- repaint();
- }
- else
- {
- redoLine(oldline,oldcolumn+1);
-// release_cursor();
- }
-
- dirty = true;
- }
-
- int pix_at(int line, int column)
- {
- if (column == 0)
- return EDGE;
- else
- return stringLength(((String)lines.elementAt(line)).substring(0, column)) + EDGE;
- }
-
- public String copy(boolean cut)
- {
- String s;
- int oldline;
- int oldcolumn;
- boolean paint = false;
-
- if (!hactive)
- return null;
-
- if (hline == heline)
- {
- oldline = hline;
- oldcolumn = hcolumn;
- }
- else
- paint = true;
-
- s = journal.delete_section(hline, hcolumn, heline, hecolumn, cut);
-
- if (cut)
- {
- dirty = true;
- line = hline;
- column = hcolumn;
- hactive = eactive = false;
-
- if (shiftVert(line))
- paint = true;
-
- pix = pix_at(line,column);
- if (shiftHoriz(pix))
- paint = true;
-
- if (paint)
- {
- repaint();
- }
- else
- {
- redoLine(line,column+1);
-// release_cursor();
- }
-
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- }
-
- return s;
- }
-
- private void cursorAdjust()
- {
- int min, max;
- boolean paint = false;
-
- if (eactive)
- {
- paint = true;
- hactive = eactive = false;
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- }
-
- // straighten up lines first
-
- if (line < 0)
- line = 0;
- else
- {
- max = lines.size();
-
- if (line >= max )
- line = max - 1;
- }
-
- // straighten up columns
-
- if (column < 0)
- column = 0;
- else
- {
- max = ((String)lines.elementAt(line)).length();
- if (column > max)
- column = max;
- }
-
- // off page?
-
- if (shiftVert(line))
- paint = true;
-
- if (shiftHoriz(stringLength(((String)lines.elementAt(line)).substring(0, column)) + EDGE))
- paint = true;
-
- if (paint)
- repaint();
- else
- release_cursor();
- }
-
- private boolean shiftVert( int line )
- {
- if (line < sy)
- {
- sy = line;
- if (sy < 0)
- sy = 0;
- vert.setValue(sy);
- return true;
- }
-
- if (line >= sy+ny)
- {
- sy = line - ny + 1;
- vert.setValue(sy);
- return true;
- }
-
- return false;
- }
-
- private boolean shiftHoriz( int x )
- {
- if (x <= sx)
- {
- sx = x - (dimension.width / 5);
-
- if (sx < 0)
- sx = 0;
-
- horiz.setValue(sx);
- return true;
- }
-
- if (x >= sx + dimension.width)
- {
- sx = x - dimension.width + (dimension.width / 5);
- horiz.setValue(sx);
- return true;
- }
-
- return false;
- }
-
-
- private void redoLine(int line, int column)
- {
- String s;
- int x,y,height,width;
-
- s = (String)lines.elementAt(line);
-
- if (longest(s,line))
- redoControls(horiz.getValue(), vert.getValue(),false);
- dirty = true;
- updateFonts(null);
- height = fontHeight;
- y = (line - sy) * height;
- String sub = s.substring(0, column-1);
- x = stringLength(sub) + EDGE;
- if (shiftHoriz(x))
- {
- repaint();
- }
- else
- {
- x = x - sx - EDGE;
- width = dimension.width - x;
- repaint(10, x, y, width, height);
- }
-
- }
-
- public void componentHidden(ComponentEvent e) {}
- public void componentShown(ComponentEvent e) {}
- public void componentMoved(ComponentEvent e) {}
-
- public void componentResized(ComponentEvent e)
- {
- redoControls(horiz.getValue(), vert.getValue(),true);
- }
-
- private void redoCanvas()
- {
- redoControls(horiz.getValue(), vert.getValue(),false);
- }
-
- private void redoControls(int h, int v, boolean clear)
- {
- int maxline, maxpix, bubble;
-
- Graphics g = getGraphics();
-
- if (g == null)
- return;
-
- updateFonts(g);
-
- if (g != null)
- {
- dimension = getSize();
-
- if (clear)
- clear_area(g);
-
- maxpix = wpix;
- bubble = dimension.width;
-
- if ( bubble > maxpix)
- maxpix = bubble;
-
- if ( h > maxpix )
- h = maxpix;
-
- if ( maxpix > 0 )
- maxpix += 12;
-
- horiz.setValues(h, bubble, 0, maxpix);
-
- maxline = lines.size();
-
- if ( maxline <= 0 )
- maxline = 10;
-
- bubble = ny = dimension.height / fontHeight;
-
- if (bubble > maxline)
- bubble = maxline;
-
- if (v > maxline)
- v = maxline;
-
- vert.setValues(v, bubble, 0, maxline);
- repaint();
-
- g.dispose();
- }
- }
-
- private void appendLine(String s)
- {
- int count = lines.size();
- lines.insertElementAt( s, count );
- longest(s,count);
- }
-
- private boolean longest(String s, int line)
- {
- int len = stringLength(s);
- if (len > wpix)
- {
- wpix = (len * 5) / 4;
- widest = line;
- return true;
- }
- return false;
- }
-
- private void resizeLines()
- {
- if (widest < lines.size())
- {
- int len = stringLength((String)lines.elementAt(widest));
- if (len > wpix)
- {
- wpix = len;
- redoControls(horiz.getValue(), vert.getValue(),false);
- }
- }
-
- if ((hline >= 0) && (hline < lines.size()))
- opix = hpix = pix_at(hline,hcolumn);
-
- if ((heline >= 0) && (heline < lines.size()))
- oepix = hepix = pix_at(heline,hecolumn);
- }
-
- private int stringLength(String s)
- {
- if (fontMetrics == null)
- return -1;
-
- return fontMetrics.stringWidth(detabbed(s));
- }
-
- private String detabbed(String s)
- {
- if (s.indexOf('\t') < 0)
- return s;
-
- char c;
- String t = new String("");
- int j=0;
- int tabs;
- int max = s.length();
-
- for (int i=0; i 0) t = t + ' ';
- }
- else
- {
- t = t + c;
- j++;
- }
- }
-
- return t;
- }
-
- public boolean isDirty()
- {
- return dirty;
- }
-
- public void getCursorPos(Graphics g, Rectangle r)
- {
- updateFonts(g);
- r.width = 2;
- r.height = fontHeight;
- r.y = (line - sy) * r.height;
-
- if (column > 0)
- {
- String s = ((String)lines.elementAt(line)).substring(0, column);
- r.x = stringLength(s) + EDGE - sx;
- }
- else
- r.x = EDGE - sx;
- }
-
- public void adjustmentValueChanged(AdjustmentEvent e)
- {
- pause_cursor();
- if (e.getSource() == horiz)
- {
- sx = e.getValue();
- horiz.setValue(sx);
- }
- else
- if (e.getSource() == vert)
- {
- sy = e.getValue();
- vert.setValue(sy);
- }
- repaint();
- }
-
- private final int SLOW_READ = 2000;
- private final int SLOW_WRITE = 10000;
-
- public void read(File file)
- {
- Progress readProgress = null;
- boolean show_progress;
- long max,part,all,tens;
- String line;
-
- max = file.length();
- tens = max / 10;
- part = all = 0;
- show_progress = max > SLOW_READ;
-
- if (show_progress)
- {
- if (readProgress == null)
- readProgress = new Progress(parent,"Reading file ... ");
-
- readProgress.show();
- }
-
- clear();
-
- try
- {
- FileReader fr = new FileReader(file);
- BufferedReader br = new BufferedReader(fr);
-
- while ( (line=br.readLine()) != null)
- {
- if (show_progress)
- {
- part += line.length();
- if (part > tens)
- {
- all += part;
- readProgress.update( (int)(100 * all / max) );
- part = 0;
- }
- }
- appendLine(line);
- }
-
- br.close();
- fr.close();
- }
-
- catch (IOException e)
- {
- notify("Error - could not read file", NOACTION);
- }
- if (readProgress != null)
- readProgress.dispose();
- }
-
- public void write(File file)
- {
- Progress writeProgress = null;
- boolean show_progress;
- long max,part,all,tens;
- String line;
-
- max = lines.size();
- tens = max / 10;
- part = all = 0;
- show_progress = max > SLOW_WRITE;
-
- if (show_progress)
- {
- if (writeProgress == null)
- writeProgress = new Progress(parent,"Writing file ... ");
-
- writeProgress.show();
- }
-
- try
- {
- FileWriter fw = new FileWriter(file);
- BufferedWriter bw=new BufferedWriter(fw);
-
- for (int i=0;i tens)
- {
- all += part;
- writeProgress.update( (int)(100 * all / max) );
- part = 0;
- }
- }
- }
-
- bw.close();
- fw.close();
-
- dirty = false;
- }
-
- catch (IOException e)
- {
- notify("Error - could not write file", NOACTION);
- }
- if (writeProgress != null)
- writeProgress.dispose();
- }
-
- public void update(Graphics g)
- {
- paint(g);
- }
-
- public void paint(Graphics g)
- {
- int i;
- Rectangle clip;
- Rectangle curs = new Rectangle();
-
- pause_cursor();
-
- g.setPaintMode();
- updateFonts(g);
-
- i = lines.size();
- if (oldlines != i)
- {
- oldlines = i;
- redoControls(horiz.getValue(), vert.getValue(),true);
- }
-
- if (dimension == null)
- dimension = getSize();
-
- clip = g.getClipBounds();
-
- i = clip.y / fontHeight;
-
- if ( clip.height / fontHeight == 1)
- drawLine(g, sy + i);
- else
- for (i = 0; i < ny; i++)
- drawLine(g,sy+i);
-
- release_cursor();
- }
-
- private synchronized void drawLine(Graphics g, int i)
- {
- int x,y,m;
- int bx,ex;
- String s;
- Rectangle curs = null;
-
- g.setPaintMode();
- g.setColor(Color.black);
-
- x = EDGE-sx;
- y = (i - sy + 1) * fontHeight;
- m = fontHeight;// + fontDescent;
-
- if (hactive && (i > oline) && (i < oeline))
- g.fillRect(0,y-fontHeight,dimension.width,m);
- else
- g.clearRect(0,y-fontHeight,dimension.width,m);
-
- if (i >= lines.size())
- return;
-
- s = detabbed((String)lines.elementAt(i));
-
- if (hactive && (i > oline) && (i < oeline))
- {
- g.setColor(Color.white);
- g.drawString(s, x, y-fontDescent);
- g.setColor(Color.black);
- }
- else
- g.drawString(s, x, y-fontDescent);
-
- if (hactive && ((i == oline) || (i == oeline)))
- {
- g.setXORMode(Color.white);
- bx = 0;
- ex = 5000;
- if (i == oline)
- {
- bx = opix - sx;
- }
- if (i == oeline)
- {
- ex = oepix - sx;
- if (oline == oeline)
- ex -= bx;
- }
- g.fillRect(bx,y-fontHeight,ex,m);
- }
- }
-
- private void notify(String s, int action)
- {
- Note note = new Note(parent,s,action);
- note.setVisible(true);
- }
-}
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextCursor.class b/environments/Momo/java/Momo/GAG/TextEdit/TextCursor.class
deleted file mode 100644
index f6fa8c3344..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/TextCursor.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextCursor.java b/environments/Momo/java/Momo/GAG/TextEdit/TextCursor.java
deleted file mode 100644
index 191df6b3a2..0000000000
--- a/environments/Momo/java/Momo/GAG/TextEdit/TextCursor.java
+++ /dev/null
@@ -1,100 +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
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.awt.event.*;
-
-class TextCursor extends Thread
-{
- private TextCanvas canvas;
- private boolean flash;
- private boolean undraw; // true when the next draw erases
- private Rectangle r;
-
- public TextCursor(TextCanvas c)
- {
- canvas = c;
- r = new Rectangle();
- }
-
- public void run()
- {
- while (true)
- {
- sync_draw();
- try { sleep(400); }
- catch(InterruptedException e) {}
- }
- }
-
- private synchronized void sync_draw()
- {
- if (flash)
- draw_or_undraw();
- }
-
- public boolean getUndraw()
- {
- return undraw;
- }
-
- public synchronized void pause_cursor(boolean draw)
- {
-// if (draw && undraw)
- if (undraw)
- draw_or_undraw();
- flash = false;
- }
-
- public synchronized void release_cursor(boolean draw)
- {
- if (!undraw)
- draw_or_undraw();
- flash = true;
- }
-
- private boolean draw_or_undraw()
- {
- Graphics g = canvas.getGraphics();
-
- if (g != null)
- {
- if (!undraw)
- canvas.getCursorPos(g,r);
- g.setXORMode(Color.white);
- g.drawLine(r.x, r.y, r.x, r.y+r.height);
- undraw = !undraw;
- g.dispose();
- }
- return undraw;
- }
-
-// public static void dumpStack() {new Exception("Stack trace").printStackTrace();}
-
-}
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextEdit.class b/environments/Momo/java/Momo/GAG/TextEdit/TextEdit.class
deleted file mode 100644
index d236638605..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/TextEdit.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextEdit.java b/environments/Momo/java/Momo/GAG/TextEdit/TextEdit.java
deleted file mode 100644
index c2cff3e833..0000000000
--- a/environments/Momo/java/Momo/GAG/TextEdit/TextEdit.java
+++ /dev/null
@@ -1,308 +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.
- *
- * CopyrightVersion 1.0
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.io.*;
-import java.util.*;
-import java.awt.event.*;
-
-import GAG.*;
-
-public class TextEdit extends Frame implements GAGtextEditor, NoteListener, WindowListener
-{
- // The NoteListen member fuction of NoteListener is overridded to support
- // the following actions.
-
- final private int NOACTION = 0;
- final private int NEWFILE = 1;
- final private int OPENFILE = 2;
- final private int QUITAPP = 3;
-
- // allocate standard components of TextEdit as part of initialization:
-
- public File file = new File("Untitled");
-
- private String openPrompt = new String("Open text file");
- private String closePrompt = new String("Save file as");
-
- // initialize some state flags
-
- private boolean neverNamed = true;
- private boolean menuBusy = false;
-
- // these three .. no four! .. four objects form the main window
-
- private Scrollbar horiz;
- private Scrollbar vert;
- private TextCanvas textCanvas;
- private TextMenu textMenu;
-
- // font
-
- private String fontString = new String("Courier");
- private int fontSize = 12;
- private int tabSize = 4;
-
- // constructor puts together UI
-
- public TextEdit() {
- this.setTitle();
-
- vert = new Scrollbar(Scrollbar.VERTICAL);
- add("East", vert);
- horiz = new Scrollbar(Scrollbar.HORIZONTAL);
- add("South", horiz);
-
- textCanvas = new TextCanvas(this,horiz,vert);
- add("Center", textCanvas);
- textCanvas.setFont(fontString,fontSize);
- addKeyListener(textCanvas);
-
- textMenu = new TextMenu(this);
- setMenuBar(textMenu);
-
- addWindowListener(this);
-
- setSize(500, 400);
- setVisible(true);
- try { Thread.sleep(400); } catch(InterruptedException e) {}
- }
- public void writeString(String s){
- textCanvas.writeString(s);
- }
- public void writeLine(String s){
- textCanvas.writeLine(s);
- }
-
- // allow others to go straight to the canvas
- public TextCanvas getCanvas() {
- return textCanvas;
- }
-
- // add current filename to window title
-
- private void setTitle(){
- super.setTitle("TextEdit - " + file.getName());
- }
-
- // add the 1.1 WindowListener stuff
-
- public void windowDeiconified(WindowEvent event) {}
- public void windowIconified(WindowEvent event) {}
- public void windowActivated(WindowEvent event) {}
- public void windowDeactivated(WindowEvent event) {}
- public void windowOpened(WindowEvent event) {}
- public void windowClosed(WindowEvent event) {}
-
- public void windowClosing(WindowEvent event) {
- if (isItSafe(QUITAPP))
- System.exit(0);
- }
-
- // high level command processors (invoked my menu)
-
- public void setFont(String fs) {
- fontString = fs;
- textCanvas.setFont(fontString, fontSize);
- }
-
- public void setFontSize(int s) {
- fontSize = s;
- textCanvas.setFont(fontString, fontSize);
- }
-
- public void setTabSize(int s) {
- tabSize = s;
- textCanvas.setTab(tabSize);
- }
-
- public int getTabSize() {
- return tabSize;
- }
-
- public void cmdFileNew() {
- if (isItSafe(NEWFILE))
- newFile();
- }
-
- public void cmdFileOpen() {
- if (isItSafe(OPENFILE))
- openFile();
- }
-
- public void cmdFileSave() {
- saveFile(false);
- }
-
- public void cmdFileSaveAs() {
- saveFile(true);
- }
-
- public void cmdPrint() {
- textCanvas.print(file.getName());
- }
-
- public void cmdFileQuit() {
- if (isItSafe(QUITAPP))
- System.exit(0);
- }
-
- // if the file has been modified (dirty), fire off a notify dialog
- // and pass it the "action" you want returned to noteListen. This
- // dataflow beats the "modal dialog problem" on Windows
-
- // I believe isItSafe is what Laurence Olivier said repeatedly to
- // Dustan Hoffman in Marathon Man.
-
- private boolean isItSafe(int action) {
- if (textCanvas.isDirty())
- {
- notify( "The current file has not been saved. ", action );
- return false;
- }
- else
- return true;
- }
-
- // implementation of the NoteListener interface - it does whatever
- // action the user agreed to by pressing "Continue" on a modal dialog
-
- public void noteListen(int action)
- {
- switch (action)
- {
- case NOACTION:
- break;
- case NEWFILE:
- newFile();
- break;
- case OPENFILE:
- openFile();
- break;
- case QUITAPP:
- System.exit(0);
- break;
- }
- }
-
- // clear out the document
-
- private void newFile()
- {
- neverNamed = true;
- file = new File("Untitled");
- this.setTitle();
- textCanvas.clear();
- textCanvas.validate();
- }
-
- // call getFile to get a file path, and if you get one open it
-
- private void openFile()
- {
- if (getFile(FileDialog.LOAD))
- openTheFile();
- }
-
- public void openTheFile()
- {
- textCanvas.read(file);
- textCanvas.validate();
- neverNamed = false;
- this.setTitle();
- }
-
- // call getFile to get a file path, and if you get one save to it
-
- private void saveFile(boolean As)
- {
- boolean ok;
-
- if (neverNamed || As)
- {
- ok = getFile(FileDialog.SAVE);
- neverNamed = false;
- }
- else
- ok = true;
-
- if (ok)
- {
- textCanvas.write(file);
- neverNamed = false;
- this.setTitle();
- }
- }
-
- // use FileDialog to get a filepath
-
- private boolean getFile(int mode)
- {
- String prompt;
- String filename;
- String pathname;
-
- if (mode == FileDialog.LOAD)
- prompt = openPrompt;
- else
- prompt = closePrompt;
-
- FileDialog d = new FileDialog(this, prompt, mode);
-
- if (mode == FileDialog.LOAD)
- d.setFile("*");
- else
- d.setFile(file.getName());
-
- d.setDirectory(".");
- d.setVisible(true);
-
- filename = d.getFile();
-
- pathname = d.getDirectory() + filename;
-
- d.dispose();
-
- if (filename != null)
- {
- file = new File(pathname);
- return true;
- }
- else
- return false;
- }
-
- // launch a note
-
- private void notify(String s, int action) {
- Note note = new Note(this,s,action);
- note.setVisible(true);
- }
-
- // main declares the TextEdit frame which does everything
-
- public static void main(String[] args) {
- TextEdit f = new TextEdit();
- if (args.length > 0) {
- f.file = new File(args[0]);
- if (f.file.isFile())
- f.openTheFile();
- else
- f.notify("File not found: "+args[0],0);
- }
- }
-}
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextEdit.java.bak b/environments/Momo/java/Momo/GAG/TextEdit/TextEdit.java.bak
deleted file mode 100644
index 1510fa618b..0000000000
--- a/environments/Momo/java/Momo/GAG/TextEdit/TextEdit.java.bak
+++ /dev/null
@@ -1,306 +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.
- *
- * CopyrightVersion 1.0
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.io.*;
-import java.util.*;
-import java.awt.event.*;
-
-public class TextEdit extends Frame implements NoteListener, WindowListener
-{
- // The NoteListen member fuction of NoteListener is overridded to support
- // the following actions.
-
- final private int NOACTION = 0;
- final private int NEWFILE = 1;
- final private int OPENFILE = 2;
- final private int QUITAPP = 3;
-
- // allocate standard components of TextEdit as part of initialization:
-
- public File file = new File("Untitled");
-
- private String openPrompt = new String("Open text file");
- private String closePrompt = new String("Save file as");
-
- // initialize some state flags
-
- private boolean neverNamed = true;
- private boolean menuBusy = false;
-
- // these three .. no four! .. four objects form the main window
-
- private Scrollbar horiz;
- private Scrollbar vert;
- private TextCanvas textCanvas;
- private TextMenu textMenu;
-
- // font
-
- private String fontString = new String("Courier");
- private int fontSize = 12;
- private int tabSize = 4;
-
- // constructor puts together UI
-
- public TextEdit() {
- this.setTitle();
-
- vert = new Scrollbar(Scrollbar.VERTICAL);
- add("East", vert);
- horiz = new Scrollbar(Scrollbar.HORIZONTAL);
- add("South", horiz);
-
- textCanvas = new TextCanvas(this,horiz,vert);
- add("Center", textCanvas);
- textCanvas.setFont(fontString,fontSize);
- addKeyListener(textCanvas);
-
- textMenu = new TextMenu(this);
- setMenuBar(textMenu);
-
- addWindowListener(this);
- }
- public void writeStr(String t){
- textCanvas.appendLine(t);
- }
- public void writeText(String t){
- textCanvas.appendLine(t);
- }
-
- // allow others to go straight to the canvas
-
- public TextCanvas getCanvas() {
- return textCanvas;
- }
-
- // add current filename to window title
-
- private void setTitle(){
- super.setTitle("TextEdit - " + file.getName());
- }
-
- // add the 1.1 WindowListener stuff
-
- public void windowDeiconified(WindowEvent event) {}
- public void windowIconified(WindowEvent event) {}
- public void windowActivated(WindowEvent event) {}
- public void windowDeactivated(WindowEvent event) {}
- public void windowOpened(WindowEvent event) {}
- public void windowClosed(WindowEvent event) {}
-
- public void windowClosing(WindowEvent event) {
- if (isItSafe(QUITAPP))
- System.exit(0);
- }
-
- // high level command processors (invoked my menu)
-
- public void setFont(String fs) {
- fontString = fs;
- textCanvas.setFont(fontString, fontSize);
- }
-
- public void setFontSize(int s) {
- fontSize = s;
- textCanvas.setFont(fontString, fontSize);
- }
-
- public void setTabSize(int s) {
- tabSize = s;
- textCanvas.setTab(tabSize);
- }
-
- public int getTabSize() {
- return tabSize;
- }
-
- public void cmdFileNew() {
- if (isItSafe(NEWFILE))
- newFile();
- }
-
- public void cmdFileOpen() {
- if (isItSafe(OPENFILE))
- openFile();
- }
-
- public void cmdFileSave() {
- saveFile(false);
- }
-
- public void cmdFileSaveAs() {
- saveFile(true);
- }
-
- public void cmdPrint() {
- textCanvas.print(file.getName());
- }
-
- public void cmdFileQuit() {
- if (isItSafe(QUITAPP))
- System.exit(0);
- }
-
- // if the file has been modified (dirty), fire off a notify dialog
- // and pass it the "action" you want returned to noteListen. This
- // dataflow beats the "modal dialog problem" on Windows
-
- // I believe isItSafe is what Laurence Olivier said repeatedly to
- // Dustan Hoffman in Marathon Man.
-
- private boolean isItSafe(int action) {
- if (textCanvas.isDirty())
- {
- notify( "The current file has not been saved. ", action );
- return false;
- }
- else
- return true;
- }
-
- // implementation of the NoteListener interface - it does whatever
- // action the user agreed to by pressing "Continue" on a modal dialog
-
- public void noteListen(int action)
- {
- switch (action)
- {
- case NOACTION:
- break;
- case NEWFILE:
- newFile();
- break;
- case OPENFILE:
- openFile();
- break;
- case QUITAPP:
- System.exit(0);
- break;
- }
- }
-
- // clear out the document
-
- private void newFile()
- {
- neverNamed = true;
- file = new File("Untitled");
- this.setTitle();
- textCanvas.clear();
- textCanvas.validate();
- }
-
- // call getFile to get a file path, and if you get one open it
-
- private void openFile()
- {
- if (getFile(FileDialog.LOAD))
- openTheFile();
- }
-
- public void openTheFile()
- {
- textCanvas.read(file);
- textCanvas.validate();
- neverNamed = false;
- this.setTitle();
- }
-
- // call getFile to get a file path, and if you get one save to it
-
- private void saveFile(boolean As)
- {
- boolean ok;
-
- if (neverNamed || As)
- {
- ok = getFile(FileDialog.SAVE);
- neverNamed = false;
- }
- else
- ok = true;
-
- if (ok)
- {
- textCanvas.write(file);
- neverNamed = false;
- this.setTitle();
- }
- }
-
- // use FileDialog to get a filepath
-
- private boolean getFile(int mode)
- {
- String prompt;
- String filename;
- String pathname;
-
- if (mode == FileDialog.LOAD)
- prompt = openPrompt;
- else
- prompt = closePrompt;
-
- FileDialog d = new FileDialog(this, prompt, mode);
-
- if (mode == FileDialog.LOAD)
- d.setFile("*");
- else
- d.setFile(file.getName());
-
- d.setDirectory(".");
- d.setVisible(true);
-
- filename = d.getFile();
-
- pathname = d.getDirectory() + filename;
-
- d.dispose();
-
- if (filename != null)
- {
- file = new File(pathname);
- return true;
- }
- else
- return false;
- }
-
- // launch a note
-
- private void notify(String s, int action) {
- Note note = new Note(this,s,action);
- note.setVisible(true);
- }
-
- // main declares the TextEdit frame which does everything
-
- public static void main(String[] args) {
- TextEdit f = new TextEdit();
- f.setSize(500, 400);
- f.setVisible(true);
- if (args.length > 0) {
- f.file = new File(args[0]);
- if (f.file.isFile())
- f.openTheFile();
- else
- f.notify("File not found: "+args[0],0);
- }
- }
-}
-
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextJournal.class b/environments/Momo/java/Momo/GAG/TextEdit/TextJournal.class
deleted file mode 100644
index 09bdc3ca1a..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/TextJournal.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextJournal.java b/environments/Momo/java/Momo/GAG/TextEdit/TextJournal.java
deleted file mode 100644
index 22a11ffe2b..0000000000
--- a/environments/Momo/java/Momo/GAG/TextEdit/TextJournal.java
+++ /dev/null
@@ -1,463 +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
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.util.*;
-
-class TextJournal
-{
- private TextCanvas canvas; // the parent
- private Vector lines; // the document
- private TextJournalItem journal; // the journal
- private TextJournalItem undo_list; // where we are in undo
- private TextJournalItem redo_list; // where we are in redo
-
- private boolean had_undo;
- private boolean had_redo;
-
- private String lineSeparator;
-
- private final int REPLACE_LINE = 1;
- private final int SPLIT_LINE = 2;
- private final int JOIN_LINE = 3;
- private final int INSERT = 4;
- private final int DELETE = 5;
-
- public TextJournal(TextCanvas c, Vector v, String ls)
- {
- canvas = c;
- lines = v;
- lineSeparator = ls;
- undo_list = redo_list = null;
- had_undo = had_redo = false;
- }
-
- public void clear()
- {
- undo_list = redo_list = null;
- had_undo = had_redo = false;
- }
-
- private void updateMenus()
- {
- boolean got_undo;
- boolean got_redo;
-
- got_undo = undo_list != null;
- got_redo = redo_list != null;
-
- if ((had_undo != got_undo) || (had_redo != got_redo))
- canvas.updateUndoItems(got_undo, got_redo);
-
- had_undo = got_undo;
- had_redo = got_redo;
- }
-
- public TextPosition undo()
- {
- TextJournalItem temp;
- TextPosition tp = null;
-
- if (undo_list != null)
- {
- temp = undo_list;
- undo_list = temp.next;
-
- switch (temp.action)
- {
- case REPLACE_LINE:
- redo_line(temp);
- break;
- case SPLIT_LINE:
- split_or_join(temp,true);
- break;
- case JOIN_LINE:
- split_or_join(temp,false);
- break;
- case INSERT:
- copy_or_cut(temp,true);
- break;
- case DELETE:
- insert(temp);
- break;
- default:;
- }
-
- tp = new TextPosition(temp.line,temp.column);
-
- temp.next = redo_list;
- redo_list = temp;
- }
-
- updateMenus();
- return tp;
- }
-
- public TextPosition redo()
- {
- TextJournalItem temp;
- TextPosition tp = null;
- int line, column;
-
- if (redo_list != null)
- {
- temp = redo_list;
- redo_list = temp.next;
-
- line = temp.line;
- column = temp.column;
-
- switch (temp.action)
- {
- case REPLACE_LINE:
- column = temp.text.length();
- redo_line(temp);
- break;
- case SPLIT_LINE:
- split_or_join(temp,false);
- column = 0;
- break;
- case JOIN_LINE:
- split_or_join(temp,true);
- break;
- case INSERT:
- insert(temp);
- line = temp.eline;
- column = temp.ecolumn;
- break;
- case DELETE:
- copy_or_cut(temp,true);
- break;
- default:;
- }
-
- tp = new TextPosition(line,column);
-
- temp.next = undo_list;
- undo_list = temp;
- }
-
- updateMenus();
- return tp;
- }
-
- public void insert_char(int line, int column, char c)
- {
- String s;
-
- s = (String)lines.elementAt(line);
-
- remember_line(line,column,s);
-
- s = s.substring(0, column) + c + s.substring(column, s.length());
- lines.setElementAt(s,line);
- }
-
- public void delete_prev_char(int line, int column)
- {
- String s;
-
- s = (String)lines.elementAt(line);
-
- remember_line(line,column,s);
-
- s = s.substring(0, column-1) + s.substring(column, s.length());
- lines.setElementAt(s,line);
- }
-
- public void delete_next_char(int line, int column)
- {
- String s;
-
- s = (String)lines.elementAt(line);
-
- remember_line(line,column,s);
-
- s = s.substring(0, column) + s.substring(column+1, s.length());
- lines.setElementAt(s,line);
- }
-
- private void remember_line(int line, int column, String s)
- {
- boolean new_line = true;
-
- if (undo_list != null)
- new_line = (undo_list.action != REPLACE_LINE) || (undo_list.line != line);
-
- if (new_line)
- {
- TextJournalItem new_journal = new TextJournalItem();
- new_journal.action = REPLACE_LINE;
- new_journal.line = line;
- new_journal.column = column;
- new_journal.text = new String(s);
- new_journal.next = undo_list;
- undo_list = new_journal;
- }
-
- redo_list = null;
- updateMenus();
- }
-
- private void redo_line(TextJournalItem i)
- {
- String s;
- s = (String)lines.elementAt(i.line);
- lines.setElementAt(i.text,i.line);
- i.text = s;
- }
-
- public void split_line(int line, int column)
- {
- TextJournalItem new_journal = new TextJournalItem();
- new_journal.action = SPLIT_LINE;
- new_journal.line = line;
- new_journal.column = column;
-
- split_or_join(new_journal,false);
-
- new_journal.next = undo_list;
- undo_list = new_journal;
- redo_list = null;
- updateMenus();
- }
-
- public void join_line(int line, int column)
- {
- TextJournalItem new_journal = new TextJournalItem();
- new_journal.action = JOIN_LINE;
- new_journal.line = line;
- new_journal.column = column;
-
- split_or_join(new_journal,true);
-
- new_journal.next = undo_list;
- undo_list = new_journal;
- redo_list = null;
- updateMenus();
- }
-
- public void split_or_join(TextJournalItem i, boolean join)
- {
- String s;
- int line = i.line;
- int column = i.column;
-
- if (join)
- {
- s = (String)lines.elementAt(line);
- s = s.concat((String)lines.elementAt(line+1));
- lines.setElementAt(s,line);
- lines.removeElementAt(line+1);
- }
- else
- {
- s = (String)lines.elementAt(line);
- lines.setElementAt(s.substring(0,column),line);
- lines.insertElementAt(s.substring(column,s.length()),++line);
- }
- }
-
- public TextPosition insert_section(int line, int column, String s)
- {
- int charCt;
- int saveCt;
- int charMax;
- char c,c2;
- String s2 = null;
- TextPosition tp;
-
- // start creating journal item
-
- TextJournalItem new_journal = new TextJournalItem();
- new_journal.action = INSERT;
- new_journal.text = new String(s);
- new_journal.line = line; // starting line and column
- new_journal.column = column;
-
- // insert the text
-
- tp = insert(new_journal);
-
- // finish creating journal entry
-
- new_journal.eline = tp.line; // updated line and column
- new_journal.ecolumn = tp.column;
- new_journal.next = undo_list;
- undo_list = new_journal;
- redo_list = null;
- updateMenus();
-
- return tp;
- }
-
- public TextPosition insert(TextJournalItem i)
- {
- int line = i.line;
- int column = i.column;
- String s = i.text;
-
- int charCt;
- int saveCt;
- int charMax;
- char c,c2;
- String s2 = null;
-
- // insert the text
-
- charMax = s.length();
- charCt = saveCt = 0;
-
- while (charCt < charMax)
- {
- c = s.charAt(charCt);
- charCt++;
- if ((c == '\r') || (c == '\n'))
- {
- s2 = (String)lines.elementAt(line);
- lines.setElementAt(s2.substring(0,column) + s.substring(saveCt,charCt-1),line);
- lines.insertElementAt(s2.substring(column,s2.length()),++line);
- column = 0;
- if (charCt < charMax)
- {
- c2 = s.charAt(charCt);
- if (((c == '\r') && (c2 == '\n')) || ((c2 == '\r') && (c == '\n')))
- charCt++;
- }
- saveCt = charCt;
- }
- }
-
- if (saveCt < charCt)
- {
- s2 = (String)lines.elementAt(line);
- s = s.substring(saveCt,charCt);
- if (column == 0)
- s2 = s + s2;
- else
- s2 = s2.substring(0, column) + s + s2.substring(column, s2.length());
- column += s.length();
- lines.setElementAt(s2,line);
- }
-
- return new TextPosition(line,column);
- }
-
- public String delete_section(int line, int column, int eline, int ecolumn, boolean cut)
- {
- String text;
-
- TextJournalItem new_journal = new TextJournalItem();
- new_journal.action = DELETE;
- new_journal.line = line;
- new_journal.column = column;
- new_journal.eline = eline;
- new_journal.ecolumn = ecolumn;
-
- text = copy_or_cut(new_journal,cut);
-
- if (cut)
- {
- new_journal.text = new String(text);
- new_journal.next = undo_list;
- undo_list = new_journal;
- redo_list = null;
- updateMenus();
- }
-
- return text;
- }
-
- private String copy_or_cut(TextJournalItem i, boolean cut)
- {
- String s,s2;
- String text = null;
-
- int line = i.line;
- int column = i.column;
- int eline = i.eline;
- int ecolumn = i.ecolumn;
-
- if (line == eline)
- {
- s = (String)lines.elementAt(line);
- text = s.substring(column,ecolumn);
- if (cut)
- {
- s = s.substring(0, column) + s.substring(ecolumn, s.length());
- lines.setElementAt(s,line);
- }
- }
- else
- {
- s = (String)lines.elementAt(line);
- text = s.substring(column,s.length());
- s = s.substring(0, column);
-
- int diff = eline - line;
- int k = line + 1;
-
- for (int j = 1; j < diff; j++)
- {
- s2 = (String)lines.elementAt(k);
- text = text + lineSeparator + s2;
- if (cut)
- lines.removeElementAt(k);
- else
- k++;
- }
-
- if (k != lines.size())
- {
- s2 = (String)lines.elementAt(k);
- text = text + lineSeparator + s2.substring(0,ecolumn);
- s = s + s2.substring(ecolumn,s2.length());
- if (cut)
- lines.removeElementAt(k);
- }
-
- if (cut)
- lines.setElementAt(s,line);
- }
-
- return text;
- }
-
-}
-
-class TextJournalItem
-{
- public TextJournalItem next;
- public String text;
- public int action;
- public int line;
- public int column;
- public int eline;
- public int ecolumn;
-}
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextJournalItem.class b/environments/Momo/java/Momo/GAG/TextEdit/TextJournalItem.class
deleted file mode 100644
index c1265cc788..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/TextJournalItem.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextMenu.class b/environments/Momo/java/Momo/GAG/TextEdit/TextMenu.class
deleted file mode 100644
index d5f1c99de4..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/TextMenu.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextMenu.java b/environments/Momo/java/Momo/GAG/TextEdit/TextMenu.java
deleted file mode 100644
index 19cb617ddf..0000000000
--- a/environments/Momo/java/Momo/GAG/TextEdit/TextMenu.java
+++ /dev/null
@@ -1,254 +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.
- *
- * CopyrightVersion 1.0
- */
-
-package TextEdit;
-
-import java.util.*;
-import java.awt.*;
-import java.awt.event.*;
-
-public class TextMenu extends MenuBar implements ActionListener {
- // menus
- private Menu fileMenu;
- private Menu editMenu;
- private Menu fontMenu;
- private Menu sizeMenu;
- private Menu helpMenu;
-
- // adaptors
- private EditMan editMan;
- private SizeMan sizeMan;
- private FontMan fontMan;
-
- // allocate standard components of TextEdit as part of initialization:
- private String newString = new String("New");
- private String openString = new String("Open");
- private String saveString = new String("Save");
- private String saveAsString = new String("Save As");
- private String printString = new String("Print");
- private String quitString = new String("Quit");
- private String aboutString = new String("About");
-
- // remember who our parents are
-
- private TextEdit textEdit;
- private TextCanvas textCanvas;
-
- // constructor puts together UI
-
- public TextMenu(TextEdit parent) {
- super();
-
- textEdit = parent;
- textCanvas = textEdit.getCanvas();
-
- CheckboxMenuItem cbi;
-
- editMan = new EditMan(parent);
- sizeMan = new SizeMan(parent);
- fontMan = new FontMan(parent);
-
- fileMenu = new Menu("File");
- fileMenu.add(new MenuItem(newString));
- fileMenu.add(new MenuItem(openString));
- fileMenu.add(new MenuItem(saveString));
- fileMenu.add(new MenuItem(saveAsString));
- fileMenu.addSeparator();
- fileMenu.add(new MenuItem(printString));
- //fileMenu.addSeparator();
- //fileMenu.add(new MenuItem(quitString));
- fileMenu.addActionListener(this);
- add(fileMenu);
-
- editMenu = new Menu("Edit");
- editMan.addItems(editMenu);
- add(editMenu);
-
- fontMenu = new Menu("Font");
- String[] fontNames = parent.getToolkit().getFontList();
- for (int i = 0; i < fontNames.length; i++) {
- if (fontNames[i].equals("Courier")){
- cbi = add_checked(fontMenu, fontMan, fontNames[i]);
- fontMan.remember(cbi);
- }else{
- add_unchecked(fontMenu, fontMan, fontNames[i]);
- }
- }
- add(fontMenu);
-
- sizeMenu = new Menu("Size");
- add_unchecked(sizeMenu, sizeMan, new String("10"));
- add_unchecked(sizeMenu, sizeMan, new String("11"));
- cbi = add_checked(sizeMenu, sizeMan, new String("12"));
- sizeMan.remember(cbi);
- add_unchecked(sizeMenu, sizeMan, new String("14"));
- add_unchecked(sizeMenu, sizeMan, new String("16"));
- add_unchecked(sizeMenu, sizeMan, new String("18"));
- add_unchecked(sizeMenu, sizeMan, new String("36"));
- add(sizeMenu);
-
- helpMenu = new Menu("Help");
- helpMenu.add(new MenuItem(aboutString));
- helpMenu.addActionListener(this);
- setHelpMenu(helpMenu);
- }
-
- private void add_unchecked( Menu menu, ItemListener adaptor, String string ) {
- CheckboxMenuItem cbi;
-
- cbi = new CheckboxMenuItem(string);
- cbi.addItemListener(adaptor);
- menu.add(cbi);
- }
-
- private CheckboxMenuItem add_checked( Menu menu, ItemListener adaptor, String string ) {
- CheckboxMenuItem cbi;
-
- cbi = new CheckboxMenuItem(string);
- cbi.addItemListener(adaptor);
- cbi.setState(true);
- menu.add(cbi);
- return cbi;
- }
-
- // action handler, part of std java event handling
-
- public void actionPerformed(ActionEvent evt) {
- int i;
-
- Object source = evt.getSource();
- String cmd = evt.getActionCommand();
-
- if (source == fileMenu)
- doFile(cmd);
- else
- if (source == helpMenu) {
- AboutDialog ab = new AboutDialog(textEdit);
- ab.show();
- }
- }
-
- private void doFile(String cmd){
- if (cmd.equals(newString))
- textEdit.cmdFileNew();
- else
- if (cmd.equals(openString))
- textEdit.cmdFileOpen();
- else
- if (cmd.equals(saveString))
- textEdit.cmdFileSave();
- else
- if (cmd.equals(saveAsString))
- textEdit.cmdFileSaveAs();
- else
- if (cmd.equals(printString))
- textEdit.cmdPrint();
- else
- if (cmd.equals(quitString))
- textEdit.cmdFileQuit();
- }
-}
-
-class AboutDialog extends Dialog implements WindowListener, ActionListener {
- Button ok;
- public AboutDialog(Frame parent) {
- super(parent,"About TextEdit",true);
-
- Panel center = new Panel(new GridLayout(0,1));
- center.add(new Label("GAG v0.1alpha", Label.CENTER));
- center.add(new Label("Copyright (c) 1997 Toshiaki Kodama"));
- center.add(new Label("Contact: toshiaki@naruto-u.ac.jp"));
- center.add(new Label("This GAG includs TextEditi. (c) 1997 John Jensen"));
- add("Center", center);
-
- Panel p = new Panel();
- ok = new Button("Ok");
- ok.addActionListener(this);
- p.add(ok);
- add("South",p);
- //setSize(240,240);
- pack();
- addWindowListener(this);
- }
-
- // dispose on 'ok'
- public void actionPerformed(ActionEvent event) {
- if (event.getSource() == ok)
- dispose();
- }
-
- // add the 1.1 WindowListener stuff
-
- public void windowDeiconified(WindowEvent event) {}
- public void windowIconified(WindowEvent event) {}
- public void windowActivated(WindowEvent event) {}
- public void windowDeactivated(WindowEvent event) {}
- public void windowOpened(WindowEvent event) {}
- public void windowClosed(WindowEvent event) {}
- public void windowClosing(WindowEvent event) {
- dispose();
- }
-}
-
-class SizeMan extends Object implements ItemListener {
- // remember stuff
-
- private TextEdit textEdit;
- private CheckboxMenuItem lastSize = null;
-
- // constructor puts together UI
-
- public SizeMan(TextEdit parent) {
- textEdit = parent;
- }
-
- public void remember( CheckboxMenuItem item ) {
- if (lastSize != null)
- lastSize.setState(false);
- lastSize = item;
- }
-
- public void itemStateChanged(ItemEvent evt) {
- remember((CheckboxMenuItem)evt.getSource());
- String cmd = (String)evt.getItem();
- Integer size = new Integer(cmd);
- textEdit.setFontSize(size.intValue());
- }
-}
-
-final class FontMan extends Object implements ItemListener {
- // remember stuff
-
- private TextEdit textEdit;
- private CheckboxMenuItem lastTab = null;
-
- // constructor puts together UI
-
- public FontMan(TextEdit parent) {
- textEdit = parent;
- }
-
- public void remember( CheckboxMenuItem item ) {
- if (lastTab != null)
- lastTab.setState(false);
- lastTab = item;
- }
-
- public void itemStateChanged(ItemEvent evt) {
- String cmd = (String)evt.getItem();
- remember((CheckboxMenuItem)evt.getSource());
- textEdit.setFont(cmd);
- }
-}
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextPosition.class b/environments/Momo/java/Momo/GAG/TextEdit/TextPosition.class
deleted file mode 100644
index f38b4acca1..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/TextPosition.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextPosition.java b/environments/Momo/java/Momo/GAG/TextEdit/TextPosition.java
deleted file mode 100644
index 1a8e03f680..0000000000
--- a/environments/Momo/java/Momo/GAG/TextEdit/TextPosition.java
+++ /dev/null
@@ -1,40 +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
- */
-
-package TextEdit;
-
-class TextPosition
-{
- public int line;
- public int column;
-
- public TextPosition(int l, int c)
- {
- line = l;
- column = c;
- }
-}
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextScroller.class b/environments/Momo/java/Momo/GAG/TextEdit/TextScroller.class
deleted file mode 100644
index 32998e0cb8..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEdit/TextScroller.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEdit/TextScroller.java b/environments/Momo/java/Momo/GAG/TextEdit/TextScroller.java
deleted file mode 100644
index 9001b762af..0000000000
--- a/environments/Momo/java/Momo/GAG/TextEdit/TextScroller.java
+++ /dev/null
@@ -1,53 +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
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.awt.event.*;
-
-class TextScroller extends Thread
-{
- private TextCanvas canvas;
-
- public TextScroller(TextCanvas c)
- {
- canvas = c;
- }
-
- public void run()
- {
- while (true)
- {
- try { sleep(10); }
- catch(InterruptedException e) {}
-
- canvas.mouseDragged(null);
- }
- }
-}
-
diff --git a/environments/Momo/java/Momo/GAG/TextEditor.class b/environments/Momo/java/Momo/GAG/TextEditor.class
deleted file mode 100644
index bc84f4b9f9..0000000000
Binary files a/environments/Momo/java/Momo/GAG/TextEditor.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/TextEditor.java b/environments/Momo/java/Momo/GAG/TextEditor.java
deleted file mode 100644
index a5ee95e058..0000000000
--- a/environments/Momo/java/Momo/GAG/TextEditor.java
+++ /dev/null
@@ -1,131 +0,0 @@
-// jdk-1.1.3 (or later) + swing-1.0.2
-// JFileChooser is to be used soon.
-//
-package GAG;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.io.*;
-import java.net.URL;
-import java.util.*;
-
-import com.sun.java.swing.text.*;
-import com.sun.java.swing.*;
-
-class TextEditor extends JFrame implements ActionListener {
- private JMenuItem newf, open, save, cut, copy, paste;
- private JTextArea editor;
- private JToolBar toolbar;
- protected FileDialog fileDialog;
-
- TextEditor() {
- super("GAG TextEditor");
- getContentPane().setLayout(new BorderLayout());
- editor = new JTextArea();
- editor.setFont(new Font("Serif", Font.BOLD, 12));
- JScrollPane scroller = new JScrollPane();
- //scroller.setVerticalScrollBarPolicy(JScrollPane.SCROLLBARS_ALWAYS);
- JViewport port = scroller.getViewport();
- port.add(editor);
- port.setBackingStoreEnabled(false);
- setJMenuBar( createMenubar() );
- getContentPane().add("Center", scroller);
- pack();
- setSize(500, 600);
- show();
- }
- JMenuBar createMenubar(){
- JMenu file, edit;
- JMenuBar mb = new JMenuBar();
- file = new JMenu("File");
- file.add(newf = new JMenuItem("New"));
- file.add(open = new JMenuItem("Open"));
- file.add(save = new JMenuItem("Save"));
- edit = new JMenu("Edit");
- edit.add(cut = new JMenuItem("Cut"));
- edit.add(copy = new JMenuItem("Copy"));
- edit.add(paste = new JMenuItem("Paste"));
- mb.add(file);
- mb.add(edit);
- newf.addActionListener(this);
- open.addActionListener(this);
- save.addActionListener(this);
- cut.addActionListener(this);
- copy.addActionListener(this);
- paste.addActionListener(this);
- return mb;
- }
- void writeString(String s){
- editor.append(s);
- }
- void writeLine(String s){
- editor.append(s+"\n");
- }
-
- public static void main(String[] args) {
- new TextEditor();
- }
- public void actionPerformed(ActionEvent e) {
- Object o = e.getSource();
- if (o == newf){newAction(); return;}
- if (o == open){openAction(); return;}
- if (o == save){saveAction(); return;}
- if (o == cut){editor.cut(); return;}
- if (o == copy){editor.copy(); return;}
- if (o == paste){editor.paste(); return;}
- }
- void newAction(){
- editor.setDocument(new PlainDocument());
- validate();
- }
- void openAction(){
- if (fileDialog == null) {
- fileDialog = new FileDialog(this);
- }
- fileDialog.setMode(FileDialog.LOAD);
- fileDialog.show();
-
- String file = fileDialog.getFile();
- if (file == null) {
- return;
- }
- newAction();
- String directory = fileDialog.getDirectory();
- File f = new File(directory, file);
- StringBuffer sb = new StringBuffer();
- if (f.exists()) {
- setTitle(file);
- try{
- Reader in = new FileReader(f);
- char[] buff = new char[4096];
- int nch;
- while ((nch = in.read(buff, 0, buff.length)) != -1) {
- sb.append(new String(buff, 0, nch));
- }
- }catch(IOException e){ System.err.println(e.getMessage()); }
- editor.setText(sb.toString());
- validate();
- }
- }
- void saveAction(){
- String saveText;
- if (fileDialog == null) {
- fileDialog = new FileDialog(this);
- }
- fileDialog.setMode(FileDialog.LOAD);
- fileDialog.show();
-
- String file = fileDialog.getFile();
- if (file == null) {
- return;
- }
- String directory = fileDialog.getDirectory();
- File f = new File(directory, file);
- try{
- FileOutputStream fo = new FileOutputStream(f);
- PrintWriter outf = new PrintWriter(new DataOutputStream(fo));
- outf.println(editor.getText());
- outf.close();
- }catch(IOException e){ System.err.println(e.getMessage()); }
- }
-}
diff --git a/environments/Momo/java/Momo/GAG/g4.eps b/environments/Momo/java/Momo/GAG/g4.eps
deleted file mode 100644
index 17f6bb30aa..0000000000
--- a/environments/Momo/java/Momo/GAG/g4.eps
+++ /dev/null
@@ -1,316 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%BoundingBox: 56.6929134 56.6929134 538.582677 785.19685
-% FILE: g4.eps
-
-% DEFAULT FONT:
-/Times-Roman findfont 24 scalefont setfont
-
-% DEFAULT COLOR:
-0 0 0 setrgbcolor
-
-% DEFAULT LINE:
-0.283464567 setlinewidth
-[1.41732283] 0 setdash
-
-% DEFINE PostScript Functions:
-/PATH
-{/POINT 0 def
- /X 0 def
- newpath
- {X 1 eq{POINT 0 eq{moveto
- /POINT 1 def
- }{lineto }ifelse
- /X 0 def
- }{/X X 1 add def}ifelse
- }forall
-} def
-/FILLPOLYGON{ PATH closepath fill }def
-/DRAWFILLPOLYGON{ PATH closepath gsave stroke grestore fill }def
-/DRAWPOLYGON{ PATH closepath stroke }def
-/DRAWPATH { PATH stroke } def
-/BOXPATH
-{/X 0 def
- {X 0 eq{/LLX exch def}if
- X 1 eq{/LLY exch def}if
- X 2 eq{/URX exch def}if
- X 3 eq{/URY exch def}if
- /X X 1 add def
- }forall
- LLX LLY moveto
- URX LLY lineto
- URX URY lineto
- LLX URY lineto
- closepath
-}def
-
-% CLIPPING:
-[56.6929134 56.6929134 538.582677 785.19685] BOXPATH clip
-
-% PARAMETERS:
-% Generated by Fukui Renderer DAWN version 3.29a-GL
-% O.x = 0
-% O.y = 0
-% O.z = 0
-% camera_d = 1558850
-% v_angle = 60
-% h_angle = 30
-% focal_d = 3458.17
-% e_2d = 1e-07
-% e_3d = 0.001
-
-0 0.25 0.25 setrgbcolor
-0 setlinewidth
-[] 0 setdash
-[ 363.165918 408.693432 256.427578 377.879528 252.86612 375.752036 359.604152 406.565893 ] DRAWFILLPOLYGON
-0 0.343791747 0.343791747 setrgbcolor
-[ 342.407747 466.135989 235.669053 435.324424 239.816417 435.422276 346.555396 466.233966 ] DRAWFILLPOLYGON
-0 0.356663203 0.356663203 setrgbcolor
-[ 346.555396 466.233966 239.816417 435.422276 244.267157 433.483565 351.00638 464.295449 ] DRAWFILLPOLYGON
-0 0.25 0.25 setrgbcolor
-[ 365.899023 412.705817 259.160374 381.891948 256.427578 377.879528 363.165918 408.693432 ] DRAWFILLPOLYGON
-0 0.362265738 0.362265738 setrgbcolor
-[ 351.00638 464.295449 244.267157 433.483565 248.717958 429.640389 355.457366 460.452524 ] DRAWFILLPOLYGON
-0 0.25 0.25 setrgbcolor
-[ 367.617199 418.329626 260.878259 387.51587 259.160374 381.891948 365.899023 412.705817 ] DRAWFILLPOLYGON
-0 0.256866467 0.256866467 setrgbcolor
-[ 368.203339 425.181607 261.464149 394.368036 260.878259 387.51587 367.617199 418.329626 ] DRAWFILLPOLYGON
-0 0.360217548 0.360217548 setrgbcolor
-[ 355.457366 460.452524 248.717958 429.640389 252.865496 424.154646 359.605017 454.967071 ] DRAWFILLPOLYGON
-0 0.285689009 0.285689009 setrgbcolor
-[ 367.617491 432.794801 260.878106 401.981473 261.464149 394.368036 368.203339 425.181607 ] DRAWFILLPOLYGON
-0 0.350658214 0.350658214 setrgbcolor
-[ 359.605017 454.967071 252.865496 424.154646 256.427108 417.400182 363.166664 448.212916 ] DRAWFILLPOLYGON
-0 0.737185032 0.737185032 setrgbcolor
-[ 260.878259 387.51587 261.464149 394.368036 260.878106 401.981473 259.160064 409.837318 256.427108 417.400182 252.865496 424.154646 248.717958 429.640389 244.267157 433.483565 239.816417 435.422276 235.669053 435.324424 232.107697 433.196701 229.37504 429.184131 227.657293 423.560179 227.071504 416.708112 227.657584 409.094876 229.375589 401.23928 232.108444 393.676647 235.669918 386.922333 239.817317 381.436619 244.268017 377.593345 248.718719 375.654432 252.86612 375.752036 256.427578 377.879528 259.160374 381.891948 ] DRAWFILLPOLYGON
-0 0.33423919 0.33423919 setrgbcolor
-[ 363.166664 448.212916 256.427108 417.400182 259.160064 409.837318 365.899573 440.65036 ] DRAWFILLPOLYGON
-0 0.312079403 0.312079403 setrgbcolor
-[ 365.899573 440.65036 259.160064 409.837318 260.878106 401.981473 367.617491 432.794801 ] DRAWFILLPOLYGON
-0 0 0 setrgbcolor
-0.283464567 setlinewidth
-[ 256.427578 377.879528 252.86612 375.752036] DRAWPATH
-[ 252.86612 375.752036 359.604152 406.565893] DRAWPATH
-[ 359.604152 406.565893 363.165918 408.693432] DRAWPATH
-[ 342.407747 466.135989 235.669053 435.324424] DRAWPATH
-[ 235.669053 435.324424 239.816417 435.422276] DRAWPATH
-[ 346.555396 466.233966 342.407747 466.135989] DRAWPATH
-[ 239.816417 435.422276 244.267157 433.483565] DRAWPATH
-[ 351.00638 464.295449 346.555396 466.233966] DRAWPATH
-[ 259.160374 381.891948 256.427578 377.879528] DRAWPATH
-[ 363.165918 408.693432 365.899023 412.705817] DRAWPATH
-[ 244.267157 433.483565 248.717958 429.640389] DRAWPATH
-[ 355.457366 460.452524 351.00638 464.295449] DRAWPATH
-[ 260.878259 387.51587 259.160374 381.891948] DRAWPATH
-[ 365.899023 412.705817 367.617199 418.329626] DRAWPATH
-[ 261.464149 394.368036 260.878259 387.51587] DRAWPATH
-[ 367.617199 418.329626 368.203339 425.181607] DRAWPATH
-[ 248.717958 429.640389 252.865496 424.154646] DRAWPATH
-[ 359.605017 454.967071 355.457366 460.452524] DRAWPATH
-[ 260.878106 401.981473 261.464149 394.368036] DRAWPATH
-[ 368.203339 425.181607 367.617491 432.794801] DRAWPATH
-[ 252.865496 424.154646 256.427108 417.400182] DRAWPATH
-[ 363.166664 448.212916 359.605017 454.967071] DRAWPATH
-[ 260.878259 387.51587 261.464149 394.368036] DRAWPATH
-[ 261.464149 394.368036 260.878106 401.981473] DRAWPATH
-[ 260.878106 401.981473 259.160064 409.837318] DRAWPATH
-[ 259.160064 409.837318 256.427108 417.400182] DRAWPATH
-[ 256.427108 417.400182 252.865496 424.154646] DRAWPATH
-[ 252.865496 424.154646 248.717958 429.640389] DRAWPATH
-[ 248.717958 429.640389 244.267157 433.483565] DRAWPATH
-[ 244.267157 433.483565 239.816417 435.422276] DRAWPATH
-[ 239.816417 435.422276 235.669053 435.324424] DRAWPATH
-[ 235.669053 435.324424 232.107697 433.196701] DRAWPATH
-[ 232.107697 433.196701 229.37504 429.184131] DRAWPATH
-[ 229.37504 429.184131 227.657293 423.560179] DRAWPATH
-[ 227.657293 423.560179 227.071504 416.708112] DRAWPATH
-[ 227.071504 416.708112 227.657584 409.094876] DRAWPATH
-[ 227.657584 409.094876 229.375589 401.23928] DRAWPATH
-[ 229.375589 401.23928 232.108444 393.676647] DRAWPATH
-[ 232.108444 393.676647 235.669918 386.922333] DRAWPATH
-[ 235.669918 386.922333 239.817317 381.436619] DRAWPATH
-[ 239.817317 381.436619 244.268017 377.593345] DRAWPATH
-[ 244.268017 377.593345 248.718719 375.654432] DRAWPATH
-[ 248.718719 375.654432 252.86612 375.752036] DRAWPATH
-[ 252.86612 375.752036 256.427578 377.879528] DRAWPATH
-[ 256.427578 377.879528 259.160374 381.891948] DRAWPATH
-[ 259.160374 381.891948 260.878259 387.51587] DRAWPATH
-[ 256.427108 417.400182 259.160064 409.837318] DRAWPATH
-[ 365.899573 440.65036 363.166664 448.212916] DRAWPATH
-[ 259.160064 409.837318 260.878106 401.981473] DRAWPATH
-[ 367.617491 432.794801 365.899573 440.65036] DRAWPATH
-0 1 0 setrgbcolor
-[ 264.328583 443.597384 259.895233 643.551148] DRAWPATH
-[ 279.166803 383.472354 415.444902 99.051835] DRAWPATH
-[ 262.437441 443.05148 -24.086577 565.879451] DRAWPATH
-[ 229.117341 412.249044 64.3088635 153.960869] DRAWPATH
-[ 272.827096 446.050595 24.9274199 748.650859] DRAWPATH
-[ 258.466551 390.987192 258.466551 390.987192] DRAWPATH
-0 0 1 setrgbcolor
-[ 260.630197 389.493408 260.630197 389.493408] DRAWPATH
-1 0 0 setrgbcolor
-[ 193.862307 404.896273 229.443349 415.167457] DRAWPATH
-0 1 0 setrgbcolor
-[ 279.068678 383.677146 279.166803 383.472354] DRAWPATH
-1 0 0 setrgbcolor
-[ 229.443349 415.167457 229.443349 415.167457] DRAWPATH
-[ 231.38415 415.724252 231.413979 415.732659] DRAWPATH
-0 1 0 setrgbcolor
-[ 229.462547 415.154797 229.462547 415.154797] DRAWPATH
-[ 229.117341 412.249044 229.117341 412.249044] DRAWPATH
-[ 232.265397 419.631173 232.240701 419.678418] DRAWPATH
-1 0 0 setrgbcolor
-[ 232.265397 419.631173 232.242895 419.67184] DRAWPATH
-0 1 0 setrgbcolor
-[ 227.080395 416.812114 -88.0277439 381.44444] DRAWPATH
-[ 232.530793 433.449478 219.027456 833.512198] DRAWPATH
-[ 233.485721 405.157887 233.485721 405.157887] DRAWPATH
-[ 227.964937 424.567415 71.9497245 603.106657] DRAWPATH
-0 0 1 setrgbcolor
-[ 231.950035 416.688529 231.950035 416.688529] DRAWPATH
-0 1 0 setrgbcolor
-[ 229.414352 415.111112 229.414352 415.111112] DRAWPATH
-[ 228.56948 426.546707 159.16286 564.420323] DRAWPATH
-[ 235.10191 413.570282 235.10191 413.570282] DRAWPATH
-1 0 0 setrgbcolor
-[ 227.566556 422.498821 226.343667 423.088111] DRAWPATH
-[ 254.056151 409.73393 254.056151 409.73393] DRAWPATH
-0 1 0 setrgbcolor
-[ 229.432695 415.067496 229.432695 415.067496] DRAWPATH
-[ 229.397805 415.049856 229.397805 415.049856] DRAWPATH
-1 0 0 setrgbcolor
-[ 238.550244 417.264691 238.524123 417.290028] DRAWPATH
-0 1 0 setrgbcolor
-[ 229.541661 415.133287 229.541661 415.133287] DRAWPATH
-[ 229.443024 415.360964 229.443024 415.360964] DRAWPATH
-[ 229.557862 413.676111 229.557862 413.676111] DRAWPATH
-[ 229.474919 415.280559 229.474919 415.280559] DRAWPATH
-[ 243.206956 419.39126 243.200938 419.401456] DRAWPATH
-[ 229.833983 416.572518 229.833983 416.572518] DRAWPATH
-[ 243.510512 418.014941 243.537849 417.983114] DRAWPATH
-[ 229.277074 418.526291 229.277074 418.526291] DRAWPATH
-[ 229.362005 416.651469 229.362005 416.651469] DRAWPATH
-0 0 1 setrgbcolor
-[ 247.784449 420.679525 247.784449 420.679525] DRAWPATH
-1 0 0 setrgbcolor
-[ 248.338818 420.51525 248.329746 420.487606] DRAWPATH
-[ 247.940744 421.270645 247.953346 421.274654] DRAWPATH
-0 1 0 setrgbcolor
-[ 229.132734 415.202853 229.132734 415.202853] DRAWPATH
-[ 227.427963 416.932831 227.427963 416.932831] DRAWPATH
-[ 348.447035 448.404037 348.759509 448.787024] DRAWPATH
-1 0 0 setrgbcolor
-[ 249.017077 421.824763 249.017047 421.831449] DRAWPATH
-0 1 0 setrgbcolor
-[ 348.759509 448.787024 573.846362 724.658576] DRAWPATH
-0 0 1 setrgbcolor
-[ 249.518627 417.75022 249.518627 417.75022] DRAWPATH
-[ 249.498203 417.81173 249.518627 417.75022] DRAWPATH
-1 0 0 setrgbcolor
-[ 251.141383 419.74193 251.150158 419.698439] DRAWPATH
-0 1 0 setrgbcolor
-[ 228.972351 416.166003 228.972351 416.166003] DRAWPATH
-1 0 0 setrgbcolor
-[ 253.657471 422.652695 253.680414 422.657931] DRAWPATH
-[ 228.490117 416.908859 228.490117 416.908859] DRAWPATH
-[ 254.136266 420.756403 254.117884 420.752679] DRAWPATH
-0 1 0 setrgbcolor
-[ 231.435234 411.280743 231.435234 411.280743] DRAWPATH
-1 0 0 setrgbcolor
-[ 226.630692 421.821743 226.487144 422.856886] DRAWPATH
-[ 226.343667 423.088111 226.630692 421.821743] DRAWPATH
-[ 226.487144 422.856886 226.671553 423.064338] DRAWPATH
-[ 226.671553 423.064338 226.601259 422.859458] DRAWPATH
-[ 226.601259 422.859458 226.598915 422.884838] DRAWPATH
-[ 226.343667 423.088111 96.1632207 485.477746] DRAWPATH
-0 0 1 setrgbcolor
-[ 254.087015 418.842954 254.087015 418.842954] DRAWPATH
-0 1 0 setrgbcolor
-[ 228.854869 403.620282 -79.9841558 192.435383] DRAWPATH
-1 0 0 setrgbcolor
-[ 255.774357 419.827002 255.782155 419.830599] DRAWPATH
-0 1 0 setrgbcolor
-[ 227.962616 424.559816 -64.1673552 510.023397] DRAWPATH
-0 0 1 setrgbcolor
-[ 258.978899 423.615132 258.978899 423.615132] DRAWPATH
-[ 260.253232 421.981488 260.253232 421.981488] DRAWPATH
-1 0 0 setrgbcolor
-[ 264.779562 427.715258 264.777309 427.715654] DRAWPATH
-[ 266.93389 428.488954 267.016701 428.51101] DRAWPATH
-0 0 1 setrgbcolor
-[ 272.197483 428.099623 272.197483 428.099623] DRAWPATH
-[ 266.454545 424.031458 266.454545 424.031458] DRAWPATH
-0 1 0 setrgbcolor
-[ 278.22765 447.609537 476.061991 811.345174] DRAWPATH
-[ 230.689664 431.114494 -84.0170457 483.276715] DRAWPATH
-0 0 1 setrgbcolor
-[ 289.495085 432.665363 289.495085 432.665363] DRAWPATH
-0 1 0 setrgbcolor
-[ 360.567866 453.141165 501.779623 494.053404] DRAWPATH
-[ 274.81961 382.089718 281.507704 278.709227] DRAWPATH
-0 0 1 setrgbcolor
-[ 283.267243 433.30677 283.267243 433.30677] DRAWPATH
-0 1 0 setrgbcolor
-[ 352.646892 462.879051 523.597944 535.650842] DRAWPATH
-[ 294.629734 452.34422 426.845285 796.63278] DRAWPATH
-[ 272.832964 446.052288 70.2896649 608.782654] DRAWPATH
-[ 365.624887 441.410478 520.031697 460.512511] DRAWPATH
-0 0 1 setrgbcolor
-[ 293.898461 435.639168 293.898461 435.639168] DRAWPATH
-0 1 0 setrgbcolor
-[ 294.741327 452.376433 279.243037 807.586243] DRAWPATH
-[ 367.683413 431.938129 529.254118 435.985576] DRAWPATH
-[ 321.863328 460.205565 366.946012 499.352072] DRAWPATH
-[ 323.720815 460.741754 514.68594 621.48418] DRAWPATH
-0 0 1 setrgbcolor
-[ 303.642892 437.467347 303.642892 437.467347] DRAWPATH
-0 1 0 setrgbcolor
-[ 353.092179 462.494596 482.719741 525.752758] DRAWPATH
-0 0 1 setrgbcolor
-[ 318.759707 423.56244 318.759707 423.56244] DRAWPATH
-1 0 0 setrgbcolor
-[ 315.180079 458.276355 432.087389 682.733455] DRAWPATH
-0 1 0 setrgbcolor
-[ 315.088226 458.24984 440.26874 700.16838] DRAWPATH
-[ 351.0125 464.290165 530.525426 549.181302] DRAWPATH
-[ 364.889743 443.44478 525.442294 476.360298] DRAWPATH
-[ 319.695546 459.579805 480.094269 734.889045] DRAWPATH
-[ 350.758764 464.403292 543.776363 545.188437] DRAWPATH
-[ 296.626665 452.920661 286.817084 474.067408] DRAWPATH
-0 0 1 setrgbcolor
-[ 228.962805 403.12674 219.945446 394.483225] DRAWPATH
-1 0 0 setrgbcolor
-[ 235.976065 411.704248 236.002186 411.724193] DRAWPATH
-0 1 0 setrgbcolor
-[ 305.170023 390.85148 215.516274 196.797811] DRAWPATH
-[ 360.386023 453.486004 571.67512 510.756953] DRAWPATH
-[ 360.849831 452.606459 500.88611 527.200735] DRAWPATH
-0 0 1 setrgbcolor
-[ 219.945446 394.483225 103.734142 273.199056] DRAWPATH
-1 0 0 setrgbcolor
-[ 219.945446 394.483225 223.109363 392.98258] DRAWPATH
-[ 223.109363 392.98258 224.012389 390.623768] DRAWPATH
-[ 224.012389 390.623768 225.260273 389.63598] DRAWPATH
-[ 225.260273 389.63598 226.112176 386.927522] DRAWPATH
-[ 226.112176 386.927522 227.008066 385.971662] DRAWPATH
-[ 228.860937 380.110527 228.379431 378.702407] DRAWPATH
-[ 230.704864 380.981206 228.860937 380.110527] DRAWPATH
-[ 227.008066 385.971662 229.219277 384.992072] DRAWPATH
-[ 226.244777 379.24149 226.429013 378.94604] DRAWPATH
-[ 226.925635 379.459864 226.244777 379.24149] DRAWPATH
-[ 226.429013 378.94604 226.446446 378.904656] DRAWPATH
-[ 227.879853 379.54638 226.925635 379.459864] DRAWPATH
-[ 228.379431 378.702407 227.879853 379.54638] DRAWPATH
-[ 229.219277 384.992072 229.965354 384.227034] DRAWPATH
-[ 230.428695 382.924359 230.704864 380.981206] DRAWPATH
-[ 229.965354 384.227034 230.428695 382.924359] DRAWPATH
-[ 103.734142 273.199056 102.894987 274.236229] DRAWPATH
-0 0 1 setrgbcolor
-[ 103.734142 273.199056 26.9973037 206.282819] DRAWPATH
-1 0 0 setrgbcolor
-[ 102.894987 274.236229 102.51116 273.516345] DRAWPATH
-[ 102.560512 272.763499 102.923606 272.873917] DRAWPATH
-[ 102.923606 272.873917 103.206417 273.058928] DRAWPATH
-[ 103.206417 273.058928 103.131555 273.311725] DRAWPATH
-[ 103.131555 273.311725 103.132598 273.316082] DRAWPATH
-[ 102.51116 273.516345 102.026106 273.051121] DRAWPATH
-[ 102.026106 273.051121 102.560512 272.763499] DRAWPATH
diff --git a/environments/Momo/java/Momo/GAG/gag.class b/environments/Momo/java/Momo/GAG/gag.class
deleted file mode 100644
index db91d5c7cc..0000000000
Binary files a/environments/Momo/java/Momo/GAG/gag.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GAG/gag.java b/environments/Momo/java/Momo/GAG/gag.java
deleted file mode 100644
index faee532326..0000000000
--- a/environments/Momo/java/Momo/GAG/gag.java
+++ /dev/null
@@ -1,15 +0,0 @@
-// GAG (Geant4 Adaptive GUI)
-// Requires : JDK 1.1.3 (or later) + swing-1.0.2
-// Version : alpha 1998/Mar/30
-// GEANT4 GUI Group Toshiaki Kodama
-// 1998 July 6 GEANT4 Beta-01
-
-import GAG.GAG;
-
-public class gag {
- public static void main(String args[]){
- GAG gag = new GAG();
- gag.mainLoop(args);
- System.exit(0);
- }
-}
diff --git a/environments/Momo/java/Momo/GGE/AbstractGGEFrame.class b/environments/Momo/java/Momo/GGE/AbstractGGEFrame.class
deleted file mode 100644
index 4f380a4e14..0000000000
Binary files a/environments/Momo/java/Momo/GGE/AbstractGGEFrame.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/AbstractGGEFrame.java b/environments/Momo/java/Momo/GGE/AbstractGGEFrame.java
deleted file mode 100644
index f73e7511df..0000000000
--- a/environments/Momo/java/Momo/GGE/AbstractGGEFrame.java
+++ /dev/null
@@ -1,19 +0,0 @@
-import java.awt.event.*;
-import com.sun.java.swing.*;
-import java.io.Serializable;
-
-abstract class AbstractGGEFrame extends JFrame implements WindowListener, Serializable {
- AbstractGGEFrame(String title){
- super(title);
- addWindowListener(this);
- }
- public void windowDeiconified(WindowEvent event) {}
- public void windowIconified(WindowEvent event) {}
- public void windowActivated(WindowEvent event) {}
- public void windowDeactivated(WindowEvent event) {}
- public void windowOpened(WindowEvent event) {}
- public void windowClosed(WindowEvent event) {}
- public void windowClosing(WindowEvent event) {
- System.exit(0);
- }
-}
diff --git a/environments/Momo/java/Momo/GGE/AngUnitCombo.class b/environments/Momo/java/Momo/GGE/AngUnitCombo.class
deleted file mode 100644
index 914b872e4a..0000000000
Binary files a/environments/Momo/java/Momo/GGE/AngUnitCombo.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/AngUnitCombo.java b/environments/Momo/java/Momo/GGE/AngUnitCombo.java
deleted file mode 100644
index 4bc3252ab8..0000000000
--- a/environments/Momo/java/Momo/GGE/AngUnitCombo.java
+++ /dev/null
@@ -1,9 +0,0 @@
-import com.sun.java.swing.*;
-
-class AngUnitCombo extends JComboBox {
- AngUnitCombo(){
- addItem("rad");
- addItem("mrad");
- addItem("deg");
- }
-}
diff --git a/environments/Momo/java/Momo/GGE/BREPDialog.class b/environments/Momo/java/Momo/GGE/BREPDialog.class
deleted file mode 100644
index 9c208be33c..0000000000
Binary files a/environments/Momo/java/Momo/GGE/BREPDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/BREPDialog.java b/environments/Momo/java/Momo/GGE/BREPDialog.java
deleted file mode 100644
index 29e1006b87..0000000000
--- a/environments/Momo/java/Momo/GGE/BREPDialog.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/* GGE (Geant4 Geometry Editor)
- * Tetsuyay Yamada
- * 9/9
- */
-// title no hyouji no henkou 1998 10 30
-
-
-
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
-import java.io.*;
-import java.lang.Runtime.*;
-
-import com.sun.java.swing.*;
-import com.sun.java.swing.table.*;
-import com.sun.java.swing.event.*;
-
-class BREPDialog extends SolidDialog implements ActionListener {
- private BREPItem solid;
- private JTextField phiField[], sidesField;
- private JComboBox sphiAngUnit, dphiAngUnit;
- private JButton addButton, delButton, view, okButton;
- private JFrame frame;
- private JTable zTable;
- private String tableHead[] = {"Z","RMax","RMin","Unit"};
- private DefaultTableModel dataModel;
- DAWNSourceFrame dawnSFrame;
-
- BREPDialog(SolidCellEditor parent, BREPItem solid){
- super(parent.parent, solid.toString());
- this.solid = solid;
- dawnSFrame = new DAWNSourceFrame();
- getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
-
- JPanel brepButtonPanel = new JPanel();
- brepButtonPanel.setLayout(new GridLayout(1,2));
- brepButtonPanel.add(okButton = new JButton(" OK "));
- brepButtonPanel.add(view = new JButton(" VIEW "));
-
- getContentPane().add(brepButtonPanel);
-
- GridBagLayout gbl = new GridBagLayout();
- GridBagConstraints gbc = new GridBagConstraints();
- JPanel panel = new JPanel(gbl);
- JLabel phiLabel[] = new JLabel[2];
- phiField = new JTextField[2];
- sphiAngUnit = new AngUnitCombo();
- dphiAngUnit = new AngUnitCombo();
- for (int i=0; i-2PI
-// pDPhi Delta angle of the segment in radians
-
-// pRMin1 inside radius at -Dz
-// pRMin2 inside radius at +Dz
-// pRMax1 outside radius at -Dz
-// pRMax2 outside radius at +Dz
-// pDz half length in z
-// pSPhi starting angle of the segment in radians
-// pDPhi delta angle of the segment in radian
-
-
-
-
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/CreateLogicalDialog.class b/environments/Momo/java/Momo/GGE/CreateLogicalDialog.class
deleted file mode 100644
index dec103f265..0000000000
Binary files a/environments/Momo/java/Momo/GGE/CreateLogicalDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/CreateMaterialCombi.class b/environments/Momo/java/Momo/GGE/CreateMaterialCombi.class
deleted file mode 100644
index 983289e43b..0000000000
Binary files a/environments/Momo/java/Momo/GGE/CreateMaterialCombi.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/CreateMaterialCombi.java b/environments/Momo/java/Momo/GGE/CreateMaterialCombi.java
deleted file mode 100644
index 0a860d4915..0000000000
--- a/environments/Momo/java/Momo/GGE/CreateMaterialCombi.java
+++ /dev/null
@@ -1,62 +0,0 @@
-
-//example
-//8.5
-
-import java.awt.*;
-import java.awt.event.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.event.*;
-import java.util.*;
-
-public class CreateMaterialCombi extends JDialog implements ActionListener{
- JButton b1, b2, b3;
- JLabel label1, label2;
- private MaterialFrame matFrame;
- private InsertCombiDialog insertCombiDialog;
- public CreateMaterialCombi(MaterialFrame matFrame){
- super(matFrame,"Create Material(Combination)",false);
- this.matFrame = matFrame;
- JPanel createMaterialPanel = new JPanel();
- createMaterialPanel.setLayout(new BorderLayout());
- b1 = new JButton("APPEND");
- b2 = new JButton("INSERT");
- b3 = new JButton("END");
- b1.addActionListener(this);
- b2.addActionListener(this);
- b3.addActionListener(this);
- JPanel labelPanel = new JPanel();
- labelPanel.setLayout(new BorderLayout());
- label1 = new JLabel(" Choose Append or Insert");
- label1.setFont(new Font("Serif",Font.BOLD, 12));
- label2 = new JLabel(" Choose Elements from the ElementsTable");
- label2.setFont(new Font("Serif",Font.BOLD, 12));
- labelPanel.add(label1, BorderLayout.NORTH);
- labelPanel.add(label2, BorderLayout.CENTER);
- createMaterialPanel.add(labelPanel, BorderLayout.NORTH);
- createMaterialPanel.add(b3, BorderLayout.EAST);
- createMaterialPanel.add(b2, BorderLayout.CENTER);
- createMaterialPanel.add(b1, BorderLayout.WEST);
- getContentPane().add(createMaterialPanel, BorderLayout.CENTER);
-// pack();
- setSize(250, 100);
-
- }
- public void actionPerformed(ActionEvent e){
- if(e.getSource() == b1){
- matFrame.appendMC();
- }else if(e.getSource() == b2){
- insertCombiDialog = new InsertCombiDialog(matFrame);
- insertCombiDialog.setVisible(true);
- }else if(e.getSource() == b3){
- matFrame.et.setVisible(false);
- matFrame.mcTable.createMatCloseAct();
- this.setVisible(false);
- }
- }
-
-}
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/CreateMaterialScratch.class b/environments/Momo/java/Momo/GGE/CreateMaterialScratch.class
deleted file mode 100644
index d8a7c18f25..0000000000
Binary files a/environments/Momo/java/Momo/GGE/CreateMaterialScratch.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/CreateMaterialScratch.java b/environments/Momo/java/Momo/GGE/CreateMaterialScratch.java
deleted file mode 100644
index b5d311bf56..0000000000
--- a/environments/Momo/java/Momo/GGE/CreateMaterialScratch.java
+++ /dev/null
@@ -1,67 +0,0 @@
-//example
-//8.5
-import com.sun.java.swing.table.*;
-import java.awt.*;
-import java.awt.event.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.event.*;
-import java.util.*;
-
-public class CreateMaterialScratch extends JDialog implements ActionListener{
-
- JButton b1, b2, b3;
- JLabel label1,label2;
- private MaterialFrame matFrame;
- private InsertScratchDialog insertScratchDialog;
-
- public CreateMaterialScratch(MaterialFrame matFrame){
- super(matFrame,"Create Material(Scratch)",false);
- this.matFrame = matFrame;
- JPanel createMaterialPanel = new JPanel();
- createMaterialPanel.setLayout(new BorderLayout());
- b1 = new JButton("APPEND");
- b2 = new JButton("INSERT");
- b3 = new JButton("END");
- b1.addActionListener(this);
- b2.addActionListener(this);
- b3.addActionListener(this);
- JPanel labelPanel = new JPanel();
- labelPanel.setLayout(new BorderLayout());
- label1 = new JLabel(" Choose Append or Insert");
- label1.setFont(new Font("Serif",Font.BOLD,12));
- label2 = new JLabel(" Choose a Element from the ElementsTable");
- label2.setFont(new Font("Serif",Font.BOLD, 12));
- labelPanel.add(label1, BorderLayout.NORTH);
- labelPanel.add(label2, BorderLayout.CENTER);
- createMaterialPanel.add(labelPanel, BorderLayout.NORTH);
- createMaterialPanel.add(b3, BorderLayout.EAST);
- createMaterialPanel.add(b2, BorderLayout.CENTER);
- createMaterialPanel.add(b1, BorderLayout.WEST);
- getContentPane().add(createMaterialPanel, BorderLayout.CENTER);
-// pack();
- setSize(250, 100);
-
- }
- public void actionPerformed(ActionEvent e){
- if(e.getSource() == b1){
- matFrame.appendMS();
- }
- else if(e.getSource() == b2){
- insertScratchDialog = new InsertScratchDialog(matFrame);
- insertScratchDialog.setVisible(true);
- }else if(e.getSource() == b3){
- matFrame.et.setVisible(false);
- matFrame.msTable.createMatCloseAct();
- this.setVisible(false);
-
- }
- }
-
-}
-
-
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/CreateRepeatDialog.class b/environments/Momo/java/Momo/GGE/CreateRepeatDialog.class
deleted file mode 100644
index 3230a38935..0000000000
Binary files a/environments/Momo/java/Momo/GGE/CreateRepeatDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/CreateRepeatRotateDialog.class b/environments/Momo/java/Momo/GGE/CreateRepeatRotateDialog.class
deleted file mode 100644
index 7b98c90a54..0000000000
Binary files a/environments/Momo/java/Momo/GGE/CreateRepeatRotateDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/CreateReplicaDialog.class b/environments/Momo/java/Momo/GGE/CreateReplicaDialog.class
deleted file mode 100644
index 49c819c3ac..0000000000
Binary files a/environments/Momo/java/Momo/GGE/CreateReplicaDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/CreateReplicaDialog.java b/environments/Momo/java/Momo/GGE/CreateReplicaDialog.java
deleted file mode 100644
index d334220072..0000000000
--- a/environments/Momo/java/Momo/GGE/CreateReplicaDialog.java
+++ /dev/null
@@ -1,61 +0,0 @@
-
-//example
-//8.5
-
-import java.awt.*;
-import java.awt.event.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.event.*;
-import java.util.*;
-
-public class CreateReplicaDialog extends JDialog implements ActionListener{
- private JButton b1, b2, b3;
- private JLabel label1, label2;
- private ReplicasFrame repFrame;
- private InsertReplicaDialog insertReplicaDialog;
- public CreateReplicaDialog(ReplicasFrame repFrame){
- super(repFrame,"Create Slicing Translation",false);
- this.repFrame = repFrame;
- JPanel createRepPanel = new JPanel();
- createRepPanel.setLayout(new BorderLayout());
- b1 = new JButton("APPEND");
- b2 = new JButton("INSERT");
- b3 = new JButton("END");
- b1.addActionListener(this);
- b2.addActionListener(this);
- b3.addActionListener(this);
- JPanel labelPanel = new JPanel();
- labelPanel.setLayout(new BorderLayout());
- label1 = new JLabel(" Choose Append or Insert");
- label1.setFont(new Font("Serif",Font.BOLD, 12));
-// label2 = new JLabel(" ");
-// label2.setFont(new Font("Serif",Font.BOLD, 12));
- labelPanel.add(label1, BorderLayout.NORTH);
-// labelPanel.add(label2, BorderLayout.CENTER);
- createRepPanel.add(labelPanel, BorderLayout.NORTH);
- createRepPanel.add(b3, BorderLayout.EAST);
- createRepPanel.add(b2, BorderLayout.CENTER);
- createRepPanel.add(b1, BorderLayout.WEST);
- getContentPane().add(createRepPanel, BorderLayout.CENTER);
-// pack();
- setSize(250, 100);
-
- }
- public void actionPerformed(ActionEvent e){
- if(e.getSource() == b1){
- repFrame.appendRep();
- }else if(e.getSource() == b2){
- insertReplicaDialog = new InsertReplicaDialog(repFrame);
- insertReplicaDialog.setVisible(true);
- }else if(e.getSource() == b3){
- this.setVisible(false);
- repFrame.createRepCloseAct();
- }
- }
-
-}
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/CreateSingleDialog.class b/environments/Momo/java/Momo/GGE/CreateSingleDialog.class
deleted file mode 100644
index b40196c690..0000000000
Binary files a/environments/Momo/java/Momo/GGE/CreateSingleDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/CreateSlicingDialog.class b/environments/Momo/java/Momo/GGE/CreateSlicingDialog.class
deleted file mode 100644
index 1b972172d1..0000000000
Binary files a/environments/Momo/java/Momo/GGE/CreateSlicingDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/CreateSlicingDialog.java b/environments/Momo/java/Momo/GGE/CreateSlicingDialog.java
deleted file mode 100644
index c5f7ef0d48..0000000000
--- a/environments/Momo/java/Momo/GGE/CreateSlicingDialog.java
+++ /dev/null
@@ -1,61 +0,0 @@
-
-//example
-//8.5
-
-import java.awt.*;
-import java.awt.event.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.event.*;
-import java.util.*;
-
-public class CreateSlicingDialog extends JDialog implements ActionListener{
- private JButton b1, b2, b3;
- private JLabel label1, label2;
- private SlicingAxialFrame slicingFrame;
- private InsertSlicingDialog insertSlicingDialog;
- public CreateSlicingDialog(SlicingAxialFrame slicingFrame){
- super(slicingFrame,"Create Slicing Axial Smmetric",false);
- this.slicingFrame = slicingFrame;
- JPanel createSlicingPanel = new JPanel();
- createSlicingPanel.setLayout(new BorderLayout());
- b1 = new JButton("APPEND");
- b2 = new JButton("INSERT");
- b3 = new JButton("END");
- b1.addActionListener(this);
- b2.addActionListener(this);
- b3.addActionListener(this);
- JPanel labelPanel = new JPanel();
- labelPanel.setLayout(new BorderLayout());
- label1 = new JLabel(" Choose Append or Insert");
- label1.setFont(new Font("Serif",Font.BOLD, 12));
-// label2 = new JLabel(" ");
-// label2.setFont(new Font("Serif",Font.BOLD, 12));
- labelPanel.add(label1, BorderLayout.NORTH);
-// labelPanel.add(label2, BorderLayout.CENTER);
- createSlicingPanel.add(labelPanel, BorderLayout.NORTH);
- createSlicingPanel.add(b3, BorderLayout.EAST);
- createSlicingPanel.add(b2, BorderLayout.CENTER);
- createSlicingPanel.add(b1, BorderLayout.WEST);
- getContentPane().add(createSlicingPanel, BorderLayout.CENTER);
-// pack();
- setSize(250, 100);
-
- }
- public void actionPerformed(ActionEvent e){
- if(e.getSource() == b1){
- slicingFrame.appendSlicing();
- }else if(e.getSource() == b2){
- insertSlicingDialog = new InsertSlicingDialog(slicingFrame);
- insertSlicingDialog.setVisible(true);
- }else if(e.getSource() == b3){
- this.setVisible(false);
- slicingFrame.createSlicingCloseAct();
- }
- }
-
-}
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/DAWNSourceFrame.class b/environments/Momo/java/Momo/GGE/DAWNSourceFrame.class
deleted file mode 100644
index 849c228677..0000000000
Binary files a/environments/Momo/java/Momo/GGE/DAWNSourceFrame.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/DAWNSourceFrame.java b/environments/Momo/java/Momo/GGE/DAWNSourceFrame.java
deleted file mode 100644
index 303b0f859d..0000000000
--- a/environments/Momo/java/Momo/GGE/DAWNSourceFrame.java
+++ /dev/null
@@ -1,103 +0,0 @@
-import java.awt.*;
-import java.awt.event.*;
-import java.io.*;
-import java.util.*;
-import com.sun.java.swing.preview.filechooser.*;
-import ExampleFileFilter;
-
-import com.sun.java.swing.text.*;
-import com.sun.java.swing.preview.*;
-import com.sun.java.swing.event.*;
-import com.sun.java.swing.*;
-
-class DAWNSourceFrame extends JFrame implements ActionListener {
- private JMenuItem close, save, cut, copy, paste;
- private String fileName;
- public JTextArea dawnEditor;
-// protected FileDialog fileDialog;
- private JFileChooser fileChooser;
- DAWNSourceFrame(){
- super(" DAWN Text Editor");
- getContentPane().setLayout(new BorderLayout());
- dawnEditor = new JTextArea();
- //editor.setFont(new Font("Courier", Font.PLAIN, 12));
- JScrollPane scroller = new JScrollPane();
- //scroller.setVerticalScrollBarPolicy(JScrollPane.SCROLLBARS_ALWAYS);
- JViewport port = scroller.getViewport();
- port.add(dawnEditor);
- port.setBackingStoreEnabled(false);
- setJMenuBar( createMenubar() );
- getContentPane().add("Center", scroller);
- pack();
- setSize(350, 350);
-// show();
- }
-
- JMenuBar createMenubar(){
- JMenu file, edit;
- JMenuBar mb = new JMenuBar();
- file = new JMenu("File");
- file.add(close = new JMenuItem("Close"));
- file.add(save = new JMenuItem("Save"));
-
- edit = new JMenu("Edit");
- edit.add(cut = new JMenuItem("Cut"));
- edit.add(copy = new JMenuItem("Copy"));
- edit.add(paste = new JMenuItem("Paste"));
- mb.add(file);
- mb.add(edit);
-
- close.addActionListener(this);
- save.addActionListener(this);
- cut.addActionListener(this);
- copy.addActionListener(this);
- paste.addActionListener(this);
- return mb;
- }
-
- public static void main(String[] args) {
- new DAWNSourceFrame();
- }
- public void actionPerformed(ActionEvent e) {
- Object o = e.getSource();
- if (o == save){saveAction(); return;}
- if (o == close){setVisible(false);}
- if (o == cut){dawnEditor.cut(); return;}
- if (o == copy){dawnEditor.copy(); return;}
- if (o == paste){dawnEditor.paste(); return;}
- }
- void saveAction(){
- String saveText;
- if (fileChooser == null) {
- fileChooser = new JFileChooser(".");
- }
- fileChooser.setDialogTitle("Save C++ Source Code");
- fileChooser.setDialogType(1);
- ExampleFileFilter primFile = new ExampleFileFilter("prim","PRIM Source Code");
- fileChooser.setFileFilter(primFile);
- fileChooser.showDialog(this, null);
- fileChooser.getSelectedFile();
-
- File f = fileChooser.getSelectedFile();
- fileName = f.getPath();
- try{
- FileOutputStream fo = new FileOutputStream(fileName);
- PrintWriter outf = new PrintWriter(new DataOutputStream(fo));
- outf.println(dawnEditor.getText());
- outf.close();
- }catch(IOException e){ System.err.println(e.getMessage()); }
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/DellCombiDialog.class b/environments/Momo/java/Momo/GGE/DellCombiDialog.class
deleted file mode 100644
index 83058d774c..0000000000
Binary files a/environments/Momo/java/Momo/GGE/DellCombiDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/DellCombiDialog.java b/environments/Momo/java/Momo/GGE/DellCombiDialog.java
deleted file mode 100644
index fea0a188e1..0000000000
--- a/environments/Momo/java/Momo/GGE/DellCombiDialog.java
+++ /dev/null
@@ -1,51 +0,0 @@
-
-//example
-//8.5
-
-import java.awt.*;
-import java.awt.event.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.event.*;
-import java.util.*;
-
-public class DellCombiDialog extends JDialog implements ActionListener{
- JButton b1, b2;
- JLabel label1;
- private MaterialFrame matFrame;
- public DellCombiDialog(MaterialFrame matFrame){
- super(matFrame,"Delete Material (Combination)",false);
- this.matFrame = matFrame;
- JPanel createMaterialPanel = new JPanel();
- createMaterialPanel.setLayout(new BorderLayout());
- b1 = new JButton("OK");
- b2 = new JButton("CANCEL");
- b1.addActionListener(this);
- b2.addActionListener(this);
-
- label1 = new JLabel(" Click the MaterialName to delete");
- label1.setFont(new Font("Serif",Font.BOLD, 13));
-
- createMaterialPanel.add(label1, BorderLayout.NORTH);
- createMaterialPanel.add(b1, BorderLayout.CENTER);
- createMaterialPanel.add(b2, BorderLayout.EAST);
- getContentPane().add(createMaterialPanel, BorderLayout.CENTER);
-// pack();
- setSize(250, 80);
-
- }
- public void actionPerformed(ActionEvent e){
- if(e.getSource() == b1){
- matFrame.dellMC();
- this.setVisible(false);
- }else if(e.getSource() == b2){
- matFrame.mcTable.dellMatCloseAct();
- this.setVisible(false);
- }
- }
-
-}
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/DellLogicalDialog.class b/environments/Momo/java/Momo/GGE/DellLogicalDialog.class
deleted file mode 100644
index 3118882efc..0000000000
Binary files a/environments/Momo/java/Momo/GGE/DellLogicalDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/DellLogicalDialog.java b/environments/Momo/java/Momo/GGE/DellLogicalDialog.java
deleted file mode 100644
index b96ac06316..0000000000
--- a/environments/Momo/java/Momo/GGE/DellLogicalDialog.java
+++ /dev/null
@@ -1,52 +0,0 @@
-
-//example
-//8.5
-
-import java.awt.*;
-import java.awt.event.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.event.*;
-import java.util.*;
-
-public class DellLogicalDialog extends JDialog implements ActionListener{
- private JButton b1, b2;
- private JLabel label1;
- private VolumesFrame volFrame;
- public DellLogicalDialog(VolumesFrame volFrame){
- super(volFrame,"Delete Logical Volume",false);
- this.volFrame = volFrame;
- JPanel createLogPanel = new JPanel();
- createLogPanel.setLayout(new BorderLayout());
- b1 = new JButton("OK");
- b2 = new JButton("CANCEL");
- b1.addActionListener(this);
- b2.addActionListener(this);
-
- label1 = new JLabel(" Click the pName to delete");
- label1.setFont(new Font("Serif",Font.BOLD, 13));
-
- createLogPanel.add(label1, BorderLayout.NORTH);
- createLogPanel.add(b1, BorderLayout.CENTER);
- createLogPanel.add(b2, BorderLayout.EAST);
- getContentPane().add(createLogPanel, BorderLayout.CENTER);
-// pack();
- setSize(250, 80);
-
- }
- public void actionPerformed(ActionEvent e){
- if(e.getSource() == b1){
- volFrame.logPanel.dell();
-// this.setVisible(false);
- }else if(e.getSource() == b2){
- this.setVisible(false);
- volFrame.logPanel.dellLogCloseAct();
- }
- }
-
-}
-
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/DellRepeatDialog.class b/environments/Momo/java/Momo/GGE/DellRepeatDialog.class
deleted file mode 100644
index 32880556ea..0000000000
Binary files a/environments/Momo/java/Momo/GGE/DellRepeatDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/DellRepeatDialog.java b/environments/Momo/java/Momo/GGE/DellRepeatDialog.java
deleted file mode 100644
index 5ada90d73a..0000000000
--- a/environments/Momo/java/Momo/GGE/DellRepeatDialog.java
+++ /dev/null
@@ -1,55 +0,0 @@
-
-//example
-//8.5
-
-import java.awt.*;
-import java.awt.event.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.event.*;
-import java.util.*;
-
-public class DellRepeatDialog extends JDialog implements ActionListener{
- private JButton b1, b2;
- private JLabel label1;
- private RepeatedVolume repeatFrame;
- public DellRepeatDialog(RepeatedVolume repeatFrame){
- super(repeatFrame,"Delete Repeated Volume",false);
- this.repeatFrame = repeatFrame;
- JPanel createRepeatPanel = new JPanel();
- createRepeatPanel.setLayout(new BorderLayout());
- b1 = new JButton("OK");
- b2 = new JButton("CANCEL");
- b1.addActionListener(this);
- b2.addActionListener(this);
-
- label1 = new JLabel(" Click the pName to delete");
- label1.setFont(new Font("Serif",Font.BOLD, 13));
-
- createRepeatPanel.add(label1, BorderLayout.NORTH);
- createRepeatPanel.add(b1, BorderLayout.CENTER);
- createRepeatPanel.add(b2, BorderLayout.EAST);
- getContentPane().add(createRepeatPanel, BorderLayout.CENTER);
-// pack();
- setSize(250, 80);
-
- }
- public void actionPerformed(ActionEvent e){
- if(e.getSource() == b1){
- repeatFrame.dellRepeat();
-// repeatFrame.dellRepeatCloseAct();
-// this.setVisible(false);
- }else if(e.getSource() == b2){
- this.setVisible(false);
- repeatFrame.dellRepeatCloseAct();
- }
- }
-
-}
-
-
-
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/DellRepeatRotateDialog.class b/environments/Momo/java/Momo/GGE/DellRepeatRotateDialog.class
deleted file mode 100644
index d326af3021..0000000000
Binary files a/environments/Momo/java/Momo/GGE/DellRepeatRotateDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/DellRepeatRotateDialog.java b/environments/Momo/java/Momo/GGE/DellRepeatRotateDialog.java
deleted file mode 100644
index 120de6f75b..0000000000
--- a/environments/Momo/java/Momo/GGE/DellRepeatRotateDialog.java
+++ /dev/null
@@ -1,55 +0,0 @@
-
-//example
-//8.5
-
-import java.awt.*;
-import java.awt.event.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.event.*;
-import java.util.*;
-
-public class DellRepeatRotateDialog extends JDialog implements ActionListener{
- private JButton b1, b2;
- private JLabel label1;
- private RepeatedRotateVolume repeatFrame;
- public DellRepeatRotateDialog(RepeatedRotateVolume repeatFrame){
- super(repeatFrame,"Delete Repeated Volume",false);
- this.repeatFrame = repeatFrame;
- JPanel createRepeatPanel = new JPanel();
- createRepeatPanel.setLayout(new BorderLayout());
- b1 = new JButton("OK");
- b2 = new JButton("CANCEL");
- b1.addActionListener(this);
- b2.addActionListener(this);
-
- label1 = new JLabel(" Click the pName to delete");
- label1.setFont(new Font("Serif",Font.BOLD, 13));
-
- createRepeatPanel.add(label1, BorderLayout.NORTH);
- createRepeatPanel.add(b1, BorderLayout.CENTER);
- createRepeatPanel.add(b2, BorderLayout.EAST);
- getContentPane().add(createRepeatPanel, BorderLayout.CENTER);
-// pack();
- setSize(250, 80);
-
- }
- public void actionPerformed(ActionEvent e){
- if(e.getSource() == b1){
- repeatFrame.dellRepeat();
-// repeatFrame.dellRepeatCloseAct();
-// this.setVisible(false);
- }else if(e.getSource() == b2){
- this.setVisible(false);
- repeatFrame.dellRepeatCloseAct();
- }
- }
-
-}
-
-
-
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/DellReplicaDialog.class b/environments/Momo/java/Momo/GGE/DellReplicaDialog.class
deleted file mode 100644
index 5138c13382..0000000000
Binary files a/environments/Momo/java/Momo/GGE/DellReplicaDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/DellReplicaDialog.java b/environments/Momo/java/Momo/GGE/DellReplicaDialog.java
deleted file mode 100644
index d88564d1e7..0000000000
--- a/environments/Momo/java/Momo/GGE/DellReplicaDialog.java
+++ /dev/null
@@ -1,52 +0,0 @@
-
-//example
-//8.5
-
-import java.awt.*;
-import java.awt.event.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.event.*;
-import java.util.*;
-
-public class DellReplicaDialog extends JDialog implements ActionListener{
- private JButton b1, b2;
- private JLabel label1;
- private ReplicasFrame repFrame;
- public DellReplicaDialog(ReplicasFrame repFrame){
- super(repFrame,"Delete Slicing Translation",false);
- this.repFrame = repFrame;
- JPanel createRepPanel = new JPanel();
- createRepPanel.setLayout(new BorderLayout());
- b1 = new JButton("OK");
- b2 = new JButton("CANCEL");
- b1.addActionListener(this);
- b2.addActionListener(this);
-
- label1 = new JLabel(" Click the pName to delete");
- label1.setFont(new Font("Serif",Font.BOLD, 13));
-
- createRepPanel.add(label1, BorderLayout.NORTH);
- createRepPanel.add(b1, BorderLayout.CENTER);
- createRepPanel.add(b2, BorderLayout.EAST);
- getContentPane().add(createRepPanel, BorderLayout.CENTER);
-// pack();
- setSize(250, 80);
-
- }
- public void actionPerformed(ActionEvent e){
- if(e.getSource() == b1){
- repFrame.dellRep();
-// this.setVisible(false);
- }else if(e.getSource() == b2){
- this.setVisible(false);
- repFrame.dellRepCloseAct();
- }
- }
-
-}
-
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/DellScratchDialog.class b/environments/Momo/java/Momo/GGE/DellScratchDialog.class
deleted file mode 100644
index c59cd40332..0000000000
Binary files a/environments/Momo/java/Momo/GGE/DellScratchDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/DellScratchDialog.java b/environments/Momo/java/Momo/GGE/DellScratchDialog.java
deleted file mode 100644
index c2e60ecccf..0000000000
--- a/environments/Momo/java/Momo/GGE/DellScratchDialog.java
+++ /dev/null
@@ -1,54 +0,0 @@
-
-//example
-//8.5
-
-import java.awt.*;
-import java.awt.event.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.event.*;
-import java.util.*;
-
-public class DellScratchDialog extends JDialog implements ActionListener{
- JButton b1, b2;
- JLabel label1, label2;
- private MaterialFrame matFrame;
-
- public DellScratchDialog(MaterialFrame matFrame){
- super(matFrame,"Delete Material (Scratch)",false);
- this.matFrame = matFrame;
- JPanel createMaterialPanel = new JPanel();
- createMaterialPanel.setLayout(new BorderLayout());
- b1 = new JButton("OK");
- b2 = new JButton("CANCEL");
- b1.addActionListener(this);
- b2.addActionListener(this);
-
- label1 = new JLabel(" Click the MaterialName to delete");
- label1.setFont(new Font("Serif",Font.BOLD, 13));
-
- createMaterialPanel.add(label1, BorderLayout.NORTH);
- createMaterialPanel.add(b1, BorderLayout.CENTER);
- createMaterialPanel.add(b2, BorderLayout.EAST);
- getContentPane().add(createMaterialPanel, BorderLayout.CENTER);
-// pack();
- setSize(250, 80);
-
- }
- public void actionPerformed(ActionEvent e){
- if(e.getSource() == b1){
- matFrame.dellMS();
- this.setVisible(false);
- }else if(e.getSource() == b2){
- matFrame.msTable.dellMatCloseAct();
- this.setVisible(false);
-
- }
- }
-
-}
-
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/DellSingleDialog.class b/environments/Momo/java/Momo/GGE/DellSingleDialog.class
deleted file mode 100644
index 3b26ddfdd6..0000000000
Binary files a/environments/Momo/java/Momo/GGE/DellSingleDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/DellSingleDialog.java b/environments/Momo/java/Momo/GGE/DellSingleDialog.java
deleted file mode 100644
index 084592f7bb..0000000000
--- a/environments/Momo/java/Momo/GGE/DellSingleDialog.java
+++ /dev/null
@@ -1,56 +0,0 @@
-//Tetsuya Yamada
-//example
-//8.21
-
-import java.awt.*;
-import java.awt.event.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.event.*;
-import java.util.*;
-
-public class DellSingleDialog extends JDialog implements ActionListener{
- private JButton b1, b2;
- private JLabel label1;
- private SingleVolume singleFrame;
- public DellSingleDialog(SingleVolume singleFrame){
- super(singleFrame,"Delete Single Positioned Volume",false);
- this.singleFrame = singleFrame;
- JPanel createSinglePanel = new JPanel();
- createSinglePanel.setLayout(new BorderLayout());
- b1 = new JButton("OK");
- b2 = new JButton("CANCEL");
- b1.addActionListener(this);
- b2.addActionListener(this);
-
- label1 = new JLabel(" Click the pName to delete");
- label1.setFont(new Font("Serif",Font.BOLD, 13));
-
- createSinglePanel.add(label1, BorderLayout.NORTH);
- createSinglePanel.add(b1, BorderLayout.CENTER);
- createSinglePanel.add(b2, BorderLayout.EAST);
- getContentPane().add(createSinglePanel, BorderLayout.CENTER);
-// pack();
- setSize(250, 80);
-
- }
- public void actionPerformed(ActionEvent e){
- if(e.getSource() == b1){
- singleFrame.dellSingle();
-// this.setVisible(false);
- }else if(e.getSource() == b2){
- this.setVisible(false);
- singleFrame.dellSingleCloseAct();
- }
- }
-
-}
-
-
-
-
-
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/DellSlicingDialog.class b/environments/Momo/java/Momo/GGE/DellSlicingDialog.class
deleted file mode 100644
index 2558ff9776..0000000000
Binary files a/environments/Momo/java/Momo/GGE/DellSlicingDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/DellSlicingDialog.java b/environments/Momo/java/Momo/GGE/DellSlicingDialog.java
deleted file mode 100644
index bfb7d32bf0..0000000000
--- a/environments/Momo/java/Momo/GGE/DellSlicingDialog.java
+++ /dev/null
@@ -1,52 +0,0 @@
-
-//example
-//8.5
-
-import java.awt.*;
-import java.awt.event.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.event.*;
-import java.util.*;
-
-public class DellSlicingDialog extends JDialog implements ActionListener{
- private JButton b1, b2;
- private JLabel label1;
- private SlicingAxialFrame slicingFrame;
- public DellSlicingDialog(SlicingAxialFrame slicingFrame){
- super(slicingFrame,"Delete Slicing Axial",false);
- this.slicingFrame = slicingFrame;
- JPanel createSlicingPanel = new JPanel();
- createSlicingPanel.setLayout(new BorderLayout());
- b1 = new JButton("OK");
- b2 = new JButton("CANCEL");
- b1.addActionListener(this);
- b2.addActionListener(this);
-
- label1 = new JLabel(" Click the pName to delete");
- label1.setFont(new Font("Serif",Font.BOLD, 13));
-
- createSlicingPanel.add(label1, BorderLayout.NORTH);
- createSlicingPanel.add(b1, BorderLayout.CENTER);
- createSlicingPanel.add(b2, BorderLayout.EAST);
- getContentPane().add(createSlicingPanel, BorderLayout.CENTER);
-// pack();
- setSize(250, 80);
-
- }
- public void actionPerformed(ActionEvent e){
- if(e.getSource() == b1){
- slicingFrame.dellSlicing();
-// this.setVisible(false);
- }else if(e.getSource() == b2){
- this.setVisible(false);
- slicingFrame.dellSlicingCloseAct();
- }
- }
-
-}
-
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/DoubleCellEditor.class b/environments/Momo/java/Momo/GGE/DoubleCellEditor.class
deleted file mode 100644
index a12f0cc983..0000000000
Binary files a/environments/Momo/java/Momo/GGE/DoubleCellEditor.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/DoubleCellEditor.java b/environments/Momo/java/Momo/GGE/DoubleCellEditor.java
deleted file mode 100644
index a729598499..0000000000
--- a/environments/Momo/java/Momo/GGE/DoubleCellEditor.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- */
-
-import com.sun.java.swing.*;
-import com.sun.java.swing.table.*;
-
-import java.util.*;
-import java.awt.*;
-
-class DoubleCellEditor extends DefaultCellEditor {
- JFrame frame;
- DoubleCellEditor(){
- super(new JTextField());
- setClickCountToStart(1);
- }
- public Object getCellEditorValue(){
- Double value;
- String valueStr = (String)super.getCellEditorValue();
- if (valueStr.equals("")) return "";
- try{
- value = new Double(valueStr);
- }catch(NumberFormatException e){
- frame = new JFrame();
- JOptionPane.showMessageDialog(frame,"Not a Number", "Warning Dialog",
- JOptionPane.WARNING_MESSAGE,null);
- return "";
-// value = new Double(0.0);
- }
- return value;
- }
-}
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/ElementCell.class b/environments/Momo/java/Momo/GGE/ElementCell.class
deleted file mode 100644
index 2b8c091d5f..0000000000
Binary files a/environments/Momo/java/Momo/GGE/ElementCell.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/ElementCell.java b/environments/Momo/java/Momo/GGE/ElementCell.java
deleted file mode 100644
index 327c3920c1..0000000000
--- a/environments/Momo/java/Momo/GGE/ElementCell.java
+++ /dev/null
@@ -1,53 +0,0 @@
-// Table of Elements
-
-import java.awt.*;
-import java.awt.event.*;
-import com.sun.java.swing.*;
-
-class ElementCell extends JPanel implements ActionListener {
- static int selectedElems = 0;
- ElementItem ei;
- private boolean isSelected;
- private JButton e;
- private Color bg;
- ElementCell(ElementItem ei){
- this.ei = ei;
- isSelected = false;
- setLayout(new GridLayout(2,1));
- if (ei.isMetal){
- bg = new Color(255, 175, 175);
- }else{
- bg = new Color(175, 175, 255);
- }
- setBackground(bg);
- e = new JButton(ei.symbol);
- e.setMargin(new Insets(1,3,1,3));
- e.setToolTipText(ei.name);
- e.addActionListener(this);
- add(e);
- add(new JLabel(Integer.toString(ei.atomNum), JLabel.CENTER));
- }
- public void actionPerformed(ActionEvent ev){
- Object source = ev.getSource();
- if (isSelected){
- selectedElems--;
- isSelected = false;
- setBackground(bg);
- }else{
- if (selectedElems >= 8) return;
- selectedElems++;
- isSelected = true;
- setBackground(Color.lightGray);
- }
- repaint();
- }
- void clear(){
- selectedElems = 0;
- isSelected = false;
- setBackground(bg);
- repaint();
- }
- boolean isSelected(){
- return isSelected;
- }
-}
diff --git a/environments/Momo/java/Momo/GGE/ElementItem.class b/environments/Momo/java/Momo/GGE/ElementItem.class
deleted file mode 100644
index a9c236836f..0000000000
Binary files a/environments/Momo/java/Momo/GGE/ElementItem.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/ElementItem.java b/environments/Momo/java/Momo/GGE/ElementItem.java
deleted file mode 100644
index c91299b39c..0000000000
--- a/environments/Momo/java/Momo/GGE/ElementItem.java
+++ /dev/null
@@ -1,23 +0,0 @@
-// GGE (Geant4 Geometry Editor)
-// Element Item
-// Toshiaki Kodama
-
-class ElementItem extends GGEItem {
-//Object {
- String name, symbol;
- int atomNum; double massNum;
- boolean isMetal;
-
- ElementItem(String name, String symbol, int atomNum, double massNum, boolean isMetal){
- this.name = name;
- this.symbol = symbol;
- this.atomNum = atomNum; this.massNum = massNum;
- this.isMetal = isMetal;
- }
- String getCPP(){
- return new String("G4Element* element" +symbol+ " = new G4Element( \"" + name + "\", \"" + symbol + "\", " + atomNum + ". , " + massNum + "*g/mole );\n");
- }
- public String toString(){
- return symbol;
- }
-}
diff --git a/environments/Momo/java/Momo/GGE/ElementsTable.class b/environments/Momo/java/Momo/GGE/ElementsTable.class
deleted file mode 100644
index 09b7feef62..0000000000
Binary files a/environments/Momo/java/Momo/GGE/ElementsTable.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/ElementsTable.java b/environments/Momo/java/Momo/GGE/ElementsTable.java
deleted file mode 100644
index fc0555ddb2..0000000000
--- a/environments/Momo/java/Momo/GGE/ElementsTable.java
+++ /dev/null
@@ -1,221 +0,0 @@
-// PERIODIC TABLE OF THE ELEMENTS
-// PDG table 4.1
-
-import java.awt.*;
-import com.sun.java.swing.*;
-
-class ElementsTable extends AbstractGGEFrame {
- private ElementCell ecel[];
- ElementsTable(){
- super("Elements");
- GridBagLayout gbl = new GridBagLayout();
- GridBagConstraints gbc = new GridBagConstraints();
- getContentPane().setLayout(gbl);
- getContentPane().setBackground(new Color(230, 250, 230));
- int elemPosX[] = {1, 0, 17,
- 0, 1, 12, 13, 14, 15, 16, 17,
- 0, 1, 12, 13, 14, 15, 16, 17,
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
- 0, 1,
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
- 0, 1,
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 };
- int elemPosY[] = {0, 0, 0,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 5, 5,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 6, 6,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 };
-
- ElementItem el[] = makeElements();
- gbc.insets = new Insets(1,1,1,1);
- gbc.fill = GridBagConstraints.BOTH;
- gbc.weightx = 1.0; gbc.weighty = 1.0;
- ecel = new ElementCell[el.length];
- for (int i = 0; i0 && iSetVisAttributes("+
- rowData.elementAt(3)+");\n\n");
- }
- }
- }
- return cpp.toString();
- }
-}
-
-
-
-
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/MaterialAbstTable.class b/environments/Momo/java/Momo/GGE/MaterialAbstTable.class
deleted file mode 100644
index b657a43538..0000000000
Binary files a/environments/Momo/java/Momo/GGE/MaterialAbstTable.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/MaterialAbstTable.java b/environments/Momo/java/Momo/GGE/MaterialAbstTable.java
deleted file mode 100644
index df844a4281..0000000000
--- a/environments/Momo/java/Momo/GGE/MaterialAbstTable.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- *
- */
-//7.3
-
-import com.sun.java.swing.*;
-import com.sun.java.swing.table.*;
-import com.sun.java.swing.event.*;
-
-import java.util.*;
-import java.awt.*;
-import java.awt.event.*;
-
-abstract public class MaterialAbstTable extends JTable implements ActionListener {
- protected JButton ins, del;
- protected String tableTitle;
- MaterialFrame parent;
- protected DefaultTableModel model;
-
- MaterialAbstTable(DefaultTableModel model, MaterialFrame parent){
-
- super(model);
- this.model = model;
- this.parent = parent;
-
- setAutoCreateColumnsFromModel(false);
- setColumnSelectionAllowed(false);
- setRowSelectionAllowed(true);
- getTableHeader().setReorderingAllowed(false);
- setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-
-//Jccombobox items don't corresponds to the GEANT4 units.
-//They shall be translated into correct ones in making C++ source codes
-
- JComboBox stateCombo = new JComboBox();
- stateCombo.addItem("kStateUndefind");
- stateCombo.addItem("kStateSolid");
- stateCombo.addItem("kStateLiquid");
- stateCombo.addItem("kStateGas");
-// stateCombo.addItem("Vaccum"); //deleted 8.13
- JComboBox pressUnitCombo = new JComboBox();
- pressUnitCombo.addItem("pascal");
- pressUnitCombo.addItem("bar");
- pressUnitCombo.addItem("atmosphere");
- JComboBox denl = new JComboBox();
- denl.addItem("mg/cm3");
- denl.addItem("g/cm3");
- denl.addItem("kg/m3");
- JComboBox kl = new JComboBox();
- kl.addItem("kelvin");
-
-//Only used materials have C++ codes
- JComboBox use = new JComboBox();
- use.addItem(" ");
- use.addItem("Used");
-
- DefaultTableCellRenderer useCellRenderer = new DefaultTableCellRenderer();
- useCellRenderer.setForeground(Color.red);
-
- DefaultTableCellRenderer nameCellRenderer = new DefaultTableCellRenderer();
- nameCellRenderer.setBackground(Color.pink);
-
- TableColumn column = new TableColumn();
- column = getColumn("Use");
- column.setCellEditor(new DefaultCellEditor(use));
- column.setCellRenderer(useCellRenderer);
- column.setWidth(4);
-
- column = getColumn("Name");
- column.setCellEditor(new NameCellEditor());
- column.setCellRenderer(nameCellRenderer);
- column.sizeWidthToFit();
- column.setResizable(true);
-
- column = getColumn("Density");
- column.setCellEditor( new DoubleCellEditor());
- column.sizeWidthToFit();
- column.setResizable(true);
-
- column = getColumn("Unit");
- column.setWidth(5);
- column.setCellEditor( new DefaultCellEditor(denl));
-
- column = getColumn("State");
- column.setCellEditor(new DefaultCellEditor(stateCombo));
- column.setWidth(8);
- column.setResizable(true);
-
- column = getColumn("Temp");
- column.setCellEditor(new DoubleCellEditor());
- column.sizeWidthToFit();
- column.setResizable(true);
-
- column = getColumn(" Unit");
- column.setCellEditor(new DefaultCellEditor(kl));
- column.setWidth(6);
-
- column = getColumn("Press");
- column.setCellEditor(new DoubleCellEditor());
- column.sizeWidthToFit();
- column.setResizable(true);
-
- column = getColumn("Unit ");
- column.setCellEditor(new DefaultCellEditor(pressUnitCombo));
- column.setWidth(6);
- }
- public JPanel makeMaterialPanel(){
- JScrollPane scrollpane = new JScrollPane(this);
- scrollpane.setPreferredSize(new Dimension(780, 250));
- scrollpane.setMinimumSize(new Dimension(150, 50));
- JPanel tab = new JPanel();
- tab.setLayout(new BorderLayout(5,3));
-
- JLabel mtitle = new JLabel(tableTitle);
- mtitle.setFont(new Font("Serif", Font.BOLD, 12));
- Dimension tsize = mtitle.getPreferredSize();
- mtitle.setSize(tsize);
-
-//this method seems not working as intentioned 8.13
- JPanel buttonPanel = new JPanel();
- buttonPanel.setLayout(new BorderLayout(3,0));
- buttonPanel.add(mtitle, "West");
- ins = new JButton("Create");
- buttonPanel.add(ins, "Center");
- del = new JButton("Delete");
- buttonPanel.add(del, "East");
- tab.add(buttonPanel,"North");
- tab.add(scrollpane, "Center");
-
- ins.addActionListener(this);
- del.addActionListener(this);
- return tab;
-
- }
- public void actionPerformed(ActionEvent ae){
- Object o = ae.getSource();
- if (o == ins) {
- create();
- ins.setForeground(Color.red);
- return;
- }
- if (o == del){
- delete();
- del.setForeground(Color.red);
- return;
- }
- }
- public void dellMatCloseAct(){
- del.setForeground(Color.black);
- del.repaint();
- }
- public void createMatCloseAct(){
- ins.setForeground(Color.black);
- ins.repaint();
- }
-
- abstract void create();
- abstract void delete();
-
- void stopEditing(){
- if (isEditing()) cellEditor.stopCellEditing();
- clearSelection();
- }
- Object getSelectedName(){
- if (isEditing()) cellEditor.stopCellEditing();
- Vector data = model.getDataVector();
- int row = getSelectedRow();
- if (row < 0) return null;
- return ((Vector)data.elementAt(row)).elementAt(0);
- }
- public void valueChanged(ListSelectionEvent lse){
- super.valueChanged(lse);
- if (lse.getValueIsAdjusting()) return;
- if (lse.getFirstIndex() < 0) return;
- if (lse.getLastIndex() < 0) return;
-
- System.out.println(lse);
- selected();
- }
- protected abstract void selected();
-}
diff --git a/environments/Momo/java/Momo/GGE/MaterialCombiItem.class b/environments/Momo/java/Momo/GGE/MaterialCombiItem.class
deleted file mode 100644
index 0cdabae368..0000000000
Binary files a/environments/Momo/java/Momo/GGE/MaterialCombiItem.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/MaterialCombiItem.java b/environments/Momo/java/Momo/GGE/MaterialCombiItem.java
deleted file mode 100644
index 9667d2a99c..0000000000
--- a/environments/Momo/java/Momo/GGE/MaterialCombiItem.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// GGE (Geant4 Geometry Editor)
-// Material Combination Items
-// Toshiaki Kodama
-
-class MaterialCombiItem extends MaterialItem {
- ElementItem elements[];
- float ratios[];
- boolean byNum;
- MaterialCombiItem(String name, float density, int densityUnit,int state, float tempe,int tempeUnit, float pressure, ElementItem[] elements, boolean byNum, float[] ratios){
- this.name = name;
- this.density = density;
- this.densityUnit = densityUnit;
- this.state = state;
-// this.tempeOmit = tempeOmit;
- this.tempe = tempe;
- this.tempeUnit = tempeUnit;
- this.pressure = pressure;
- this.elements = elements;
- this.byNum = byNum;
- this.ratios = ratios;
- }
- MaterialCombiItem(ElementItem[] elements){
- ratios = new float[elements.length];
- this.elements = elements;
- }
- public String getRatioNum(int pos){
- if (byNum){
- return ""+(int)ratios[pos];
- }
- return ""+ratios[pos];
- }
-
-}
diff --git a/environments/Momo/java/Momo/GGE/MaterialCombiTable.class b/environments/Momo/java/Momo/GGE/MaterialCombiTable.class
deleted file mode 100644
index a084ce4150..0000000000
Binary files a/environments/Momo/java/Momo/GGE/MaterialCombiTable.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/MaterialCombiTable.java b/environments/Momo/java/Momo/GGE/MaterialCombiTable.java
deleted file mode 100644
index d944ffc7ab..0000000000
--- a/environments/Momo/java/Momo/GGE/MaterialCombiTable.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *
- */
-//7.3
-
-
-import com.sun.java.swing.*;
-//import com.sun.java.swing.event.*;
-import com.sun.java.swing.table.*;
-
-import java.util.*;
-import java.awt.*;
-//import java.awt.event.*;
-
-public class MaterialCombiTable extends MaterialAbstTable {
- MaterialCombiItem item;
- CreateMaterialCombi cmc;
- DellCombiDialog dcd;
-
- MaterialCombiTable(DefaultTableModel model, MaterialFrame parent) {
- super(model, parent);
- tableTitle = " Combination ";
- cmc = new CreateMaterialCombi(parent);
- dcd = new DellCombiDialog(parent);
- TableColumn column = getColumn("Elements");
- column.setCellEditor(new RatioCellEditor(parent));
- column.sizeWidthToFit();
- column.setWidth(200);
- }
- void create(){
- cmc.setVisible(true);
- parent.et.setVisible(true);
- }
- void delete(){
- dcd.setVisible(true);
- }
- protected void selected(){
- parent.combiSelected();
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/MaterialDB.g4mt b/environments/Momo/java/Momo/GGE/MaterialDB.g4mt
deleted file mode 100644
index 1359a1825f..0000000000
Binary files a/environments/Momo/java/Momo/GGE/MaterialDB.g4mt and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/MaterialFrame.class b/environments/Momo/java/Momo/GGE/MaterialFrame.class
deleted file mode 100644
index df5eff7829..0000000000
Binary files a/environments/Momo/java/Momo/GGE/MaterialFrame.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/MaterialFrame.java b/environments/Momo/java/Momo/GGE/MaterialFrame.java
deleted file mode 100644
index 7f2458c9cb..0000000000
--- a/environments/Momo/java/Momo/GGE/MaterialFrame.java
+++ /dev/null
@@ -1,494 +0,0 @@
-/*
- *
- */
-//7.3
-
-
-import com.sun.java.swing.*;
-import com.sun.java.swing.border.*;
-import com.sun.java.swing.event.*;
-import com.sun.java.swing.table.*;
-import com.sun.java.swing.preview.*;
-import com.sun.java.swing.preview.filechooser.*;
-import ExampleFileFilter;
-import java.io.*;
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
-
-
-public class MaterialFrame extends AbstractGGEFrame implements ActionListener {
- ElementsTable et;
- DellCombiDialog dellCombi;
- DellScratchDialog dellScratch;
- MaterialScratchTable msTable;
- MaterialCombiTable mcTable;
- DefaultTableModel msDataModel, mcDataModel;
-
- String msNames[] = {"Use","Name","A","Z","Density","Unit",
- "State","Temp"," Unit","Press","Unit "};
- String mcNames[] = {"Use","Name","Elements","Density","Unit",
- "State","Temp"," Unit","Press","Unit "};
-
- JLabel label;
- private JMenuItem load, save, append, clear, tOpen, tClose;
- private JFileChooser saveData, loadData;
- private String fileName, createFile, newFile;
- static String fileDir;
-
- /* For OptionPane */
- private JFrame frame1,frame2,frame3,frame4,frame5,frame6,frame7,frame8;
-
- public MaterialFrame() {
- super("Materials");
- et = new ElementsTable();
-
- msTable = new MaterialScratchTable(msDataModel =
- new DefaultTableModel(msNames,0), this);
- mcTable = new MaterialCombiTable(mcDataModel =
- new DefaultTableModel(mcNames,0), this);
- getContentPane().setLayout(new BorderLayout());
-
- JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,true,
- msTable.makeMaterialPanel(), mcTable.makeMaterialPanel());
-
- getContentPane().add(splitPane, "Center");
- setJMenuBar( createMenubar() );
- setSize(700,580);
- pack();
- setVisible(true);
-
- }
- private JMenuBar createMenubar(){
- JMenu file, element;
- JMenuBar mb = new JMenuBar();
-
- file = new JMenu("File");
- file.add(load = new JMenuItem("Load a Material File"));
- file.addSeparator();
- file.add(append = new JMenuItem("Append a Material File"));
- file.addSeparator();
- file.add(save = new JMenuItem("Save Material"));
- file.addSeparator();
- file.add(clear = new JMenuItem("Clear Material"));
-
- load.addActionListener(this);
- append.addActionListener(this);
- save.addActionListener(this);
- clear.addActionListener(this);
-
- mb.add(file);
-
- element = new JMenu("Elements");
- element.add(tOpen = new JMenuItem("Open Periodic Table"));
- element.addSeparator();
- element.add(tClose = new JMenuItem("Close Periodic Table"));
- tOpen.addActionListener(this);
- tClose.addActionListener(this);
-
- mb.add(element);
- return mb;
- }
-
- public void actionPerformed(ActionEvent ae){
- Object o = ae.getSource();
-
- if( o == load ){MaterialfileLoad();}
- if( o == append ){MaterialfileAppend();}
- if( o == save ){MaterialfileSave();}
- if( o == clear ){MaterialfileClear();}
- if( o == tOpen ){
- et.setVisible(true);
- }
- if( o == tClose ){
- et.setVisible(false);
- }
- }
-
- private synchronized void resume(){
- notify();
- }
-
-//DATA LOAD ,SAVE -------------------------------------------------
-//Append
- void MaterialfileAppend(){
- JFileChooser loadData = new JFileChooser(".");
- loadData.cancelSelection();
- loadData.resetChoosableFileFilters();
-
- ExampleFileFilter mtFile = new ExampleFileFilter("g4mt","MaterialSource");
- loadData.setFileFilter(mtFile);
- loadData.setDialogTitle("Load Material");
- loadData.setMultiSelectionEnabled(true);
- if (loadData.showOpenDialog(this) == -1 ) return;
- File fml = loadData.getSelectedFile();
- fileName = fml.getPath();
- if (fml.isFile()) {
- resume();
- try{
- FileInputStream filein = new FileInputStream(fileName);
- ObjectInputStream objin =new ObjectInputStream(filein);
- Vector mtData = (Vector)objin.readObject();
- Vector msData = (Vector)mtData.firstElement();
- Vector mcData = (Vector)mtData.lastElement();
-
- if(msDataModel.getRowCount()==0 && msData.size()==0){
- //--patern 1--
- }else{
- //--patern 2--
- for(int i=0; iAddElement( element" + elems[i].symbol + ", ");
- cpp.append(getRatioStr(i)+" );\n");
- }
- return cpp.toString();
- }
-}
diff --git a/environments/Momo/java/Momo/GGE/RepeatedRotateVolume.class b/environments/Momo/java/Momo/GGE/RepeatedRotateVolume.class
deleted file mode 100644
index 96b48f2894..0000000000
Binary files a/environments/Momo/java/Momo/GGE/RepeatedRotateVolume.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/RepeatedRotateVolume.java b/environments/Momo/java/Momo/GGE/RepeatedRotateVolume.java
deleted file mode 100644
index 86b57ed765..0000000000
--- a/environments/Momo/java/Momo/GGE/RepeatedRotateVolume.java
+++ /dev/null
@@ -1,424 +0,0 @@
-/* GGE
- * Axially symmetric arrangement of repeated volumes by rotation
- * Active rotation of Bodies or rotation of frames are available
- * See source/geometry/management/include/G4PVPlacement.hh
- */
-
-import java.awt.*;
-import java.awt.event.*;
-import com.sun.java.swing.table.*;
-import com.sun.java.swing.*;
-import com.sun.java.swing.event.*;
-import java.util.*;
-
-class RepeatedRotateVolume extends JFrame implements ActionListener {
- PhysicalItem phyItem;
- JTable pTable;
- private JFrame frame1, frame2;
- private JMenuItem close;
- private JButton create, ins, dell;
- DefaultTableModel pDataModel;
- // private CreateRepeatRotateDialog createRepeatDialog;
- private DellRepeatRotateDialog dellRepeat;
- private InsertRepeatRotateDialog insertRepeatDialog;
- private String move, name, log, type, many, x0, y0, z0;
- private String radius, rotAxis, startAng, incAng, elem;
- private String pValue;
- private String tableIdent[] = { "Move", "pName", "pLogic", "MomType",
- "pMother", "pMany", "X0", "Y0", "Z0",
- "Radius", "lengthUnit","RotAxis", "Phi_0", "dPhi",
- "angleUnit", "nElem" };
- RepeatedRotateVolume(){
- super("Repeated Placement Axial Symmetric");
- // createRepeatDialog =new CreateRepeatRotateDialog(this);
- dellRepeat =new DellRepeatRotateDialog(this);
- insertRepeatDialog =new InsertRepeatRotateDialog(this);
-
- JPanel panel = new JPanel();
-// phyPanel = new PhysicalPanel(parent);
- panel.setLayout(new BorderLayout(2, 1));
- pTable = new JTable(pDataModel = new DefaultTableModel(tableIdent,0));
- pTable.setAutoCreateColumnsFromModel(false);
- pTable.setColumnSelectionAllowed(false);
- pTable.setRowSelectionAllowed(true);
- pTable.getTableHeader().setReorderingAllowed(false);
- pTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- JComboBox moveCombo = new JComboBox(); // frame or body
- moveCombo.addItem("Frame");
- moveCombo.addItem("Body");
- JComboBox manyCombo = new JComboBox();
- manyCombo.addItem("true");
- manyCombo.addItem("false");
- JComboBox vectorCombo = new JComboBox();
- vectorCombo.addItem("X");
- vectorCombo.addItem("Y");
- vectorCombo.addItem("Z");
- JComboBox motherCombo = new JComboBox();
- motherCombo.addItem("logical");
- motherCombo.addItem("physical");
-// motherCombo.addItem("NULL");
- LenUnitCombo widthCombo = new LenUnitCombo();
- AngUnitCombo angCombo = new AngUnitCombo();
- TableColumn columns[] = new TableColumn[tableIdent.length];
- for (int i=0; iSet"+atbMethodName[i]+"("+atbsValue[i]+");\n");
- }
- }
- return cpp.toString();
- }
-
-}
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/VisAtbPanel$editVis.class b/environments/Momo/java/Momo/GGE/VisAtbPanel$editVis.class
deleted file mode 100644
index 305046808f..0000000000
Binary files a/environments/Momo/java/Momo/GGE/VisAtbPanel$editVis.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/VisAtbPanel.class b/environments/Momo/java/Momo/GGE/VisAtbPanel.class
deleted file mode 100644
index be7a6b5b87..0000000000
Binary files a/environments/Momo/java/Momo/GGE/VisAtbPanel.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/VisAtbPanel.java b/environments/Momo/java/Momo/GGE/VisAtbPanel.java
deleted file mode 100644
index 24d314b814..0000000000
--- a/environments/Momo/java/Momo/GGE/VisAtbPanel.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- *
- */
-
-import com.sun.java.swing.*;
-import com.sun.java.swing.plaf.basic.*;
-import com.sun.java.swing.border.*;
-import com.sun.java.swing.event.*;
-
-import java.util.*;
-import java.awt.*;
-import java.awt.event.*;
-
-class VisAtbPanel extends JPanel implements ActionListener, ListSelectionListener {
- private JButton addVis, delVis;
- JList visList;
- VisAtbItem visItem;
- DefaultListModel listModel;
- private VisAtbDialog visDialog;
- VisAtbPanel(VolumesFrame parent){
- setLayout(new BorderLayout());
- setBorder(new TitledBorder(LineBorder.createBlackLineBorder(),
- " VisAttrib "));
- add("Center",visList = new JList(listModel = new DefaultListModel()));
- JPanel buttons = new JPanel(new BorderLayout());
- buttons.add("Center", addVis = new JButton(" Create "));
- buttons.add("East", delVis = new JButton("Del"));
- delVis.setEnabled(false);
- add("North", buttons);
- visDialog = new VisAtbDialog(parent);
- addVis.addActionListener(this);
- delVis.addActionListener(this);
- visList.addListSelectionListener(this);
- visList.addMouseListener(new editVis());
- visList.setCellRenderer(new VisCellRenderer());
- }
- VisAtbItem getSelectedVis(){
- return (VisAtbItem)visList.getSelectedValue();
- }
- public void actionPerformed(ActionEvent ae){
- Object o = ae.getSource();
- if (o == addVis){
-
- addVis.setForeground(Color.red);
- VisAtbItem visItem = visDialog.getNewAtb();
- if (visItem == null) return;
- listModel.addElement(visItem);
- addVis.setForeground(Color.black);
- repaint();
- }else if (o == delVis){
- delVis.setForeground(Color.red);
- int index = visList.getSelectedIndex();
- if (index < 0) return;
- listModel.removeElementAt(index);
- }
- }
-
-
- public void visCloseAct(){addVis.setForeground(Color.black);}
-
- public void visClear(){
- visList.setModel(listModel = new DefaultListModel());
- repaint();
- }
-
- public void valueChanged(ListSelectionEvent le){
- if (le.getValueIsAdjusting()) return;
- System.out.println(le);
- delVis.setEnabled(!(visList.getSelectedIndex() < 0));
- }
- class editVis extends MouseAdapter {
- public void mouseClicked(MouseEvent e){
- if (e.getClickCount() == 2){
- int index = visList.locationToIndex(e.getPoint());
- if (index < 0) return;
- VisAtbItem newItem = visDialog.getChangedAtb((VisAtbItem)listModel.getElementAt(index));
- if (newItem == null) return;
- listModel.setElementAt(newItem, index);
- }
- }
- }
- String getCPP(){
- StringBuffer cpp = new StringBuffer("\n// Visualization attributes\n\n");
- if (listModel.getSize()==0){
- return cpp.toString();
- }else{
- for(int i=0; iSet"+vObject.atbMethodName[j]+"("+vObject.atbsValue[j]+");\n");
- }
- }
- }
- return cpp.toString();
- }
- }
-}
-
-class VisCellRenderer extends BasicListCellRenderer {
- //class VisCellRenderer extends JLabel implements ListCellRenderer {
- public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus){
- setIcon(new VisIcon(((VisAtbItem)value).color));
- return super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
- // return this;
- }
- class VisIcon implements Icon {
- Color color;
- VisIcon(Color color){
- this.color = color;
- }
- public void paintIcon(Component c, Graphics g, int x, int y){
- g.setColor(color);
- g.fillOval(0,0,10,10);
- }
- public int getIconWidth(){
- return 8;
- }
- public int getIconHeight(){
- return 8;
- }
- }
-}
-
-
-
-
-
diff --git a/environments/Momo/java/Momo/GGE/VisCellRenderer$VisIcon.class b/environments/Momo/java/Momo/GGE/VisCellRenderer$VisIcon.class
deleted file mode 100644
index e9a87b1a76..0000000000
Binary files a/environments/Momo/java/Momo/GGE/VisCellRenderer$VisIcon.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/VisCellRenderer.class b/environments/Momo/java/Momo/GGE/VisCellRenderer.class
deleted file mode 100644
index 2b82450eb2..0000000000
Binary files a/environments/Momo/java/Momo/GGE/VisCellRenderer.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/VisMethodPanel.class b/environments/Momo/java/Momo/GGE/VisMethodPanel.class
deleted file mode 100644
index a2cd487b35..0000000000
Binary files a/environments/Momo/java/Momo/GGE/VisMethodPanel.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/VolumesFrame.class b/environments/Momo/java/Momo/GGE/VolumesFrame.class
deleted file mode 100644
index 83b80e12e3..0000000000
Binary files a/environments/Momo/java/Momo/GGE/VolumesFrame.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/GGE/VolumesFrame.java b/environments/Momo/java/Momo/GGE/VolumesFrame.java
deleted file mode 100644
index d46235efef..0000000000
--- a/environments/Momo/java/Momo/GGE/VolumesFrame.java
+++ /dev/null
@@ -1,594 +0,0 @@
-/*
- *7.5
- */
-
-import com.sun.java.swing.*;
-import com.sun.java.swing.border.*;
-import com.sun.java.swing.event.*;
-
-import com.sun.java.swing.preview.filechooser.*;
-import ExampleFileFilter;
-import com.sun.java.swing.preview.*;
-import java.io.*;
-import java.util.*;
-import java.awt.*;
-import java.awt.event.*;
-
-class VolumesFrame extends AbstractGGEFrame implements ActionListener {
- MaterialFrame matFrame;
- SourceFrame sf;
- DAWNSourceFrame dawnSFrame;
- LogicalPanel logPanel;
- VisAtbPanel visPanel;
- PhysicalPanel phyPanel;
- private ReplicasFrame repFrame; //8.20 Replicas
- private RepeatedVolume repeatVol; //8.20 RepeatedVolume
- private RepeatedRotateVolume repeatRotVol; //9.14 Rotate
- private SingleVolume singleVol; //8.21 Single Positioned Volume
- private SlicingAxialFrame slicingFrame; //1998 10.26
- private JMenuItem load, append, save, clear, exit;
-
-//, mat;
-//Makes C++ code
- private JMenuItem CPP, closeCPP;
-//Preview
-// private JMenuItem dawn , david;
-//Elements Table
- private JMenuItem tOpen ,tClose;
-// private JCheckBoxMenuItem sourceWin, materialWin;
- JLabel label;
- private JFileChooser loadGGE, saveGGE;
- private String fileName;
- static String fileDir;
- VolumesFrame(){
- super("Volumes");
- getContentPane().setLayout(new BorderLayout());
- matFrame = new MaterialFrame();
- sf = new SourceFrame();
- dawnSFrame = new DAWNSourceFrame();
- repFrame = new ReplicasFrame(); //8.21 Replicas
- slicingFrame = new SlicingAxialFrame(); //1998 10.26 SlicingAxial
- repeatVol = new RepeatedVolume(); // 8.21 Repeated Volume
- repeatRotVol = new RepeatedRotateVolume(); // 9.14 Rotate
- singleVol = new SingleVolume(); // 8.21 SinglePositionedVolume
- logPanel = new LogicalPanel(this);
- visPanel = new VisAtbPanel(this);
- phyPanel = new PhysicalPanel(this);
- JPanel panel1 = new JPanel(new BorderLayout());
-
- JPanel panel2 = new JPanel(new BorderLayout());
-
- panel1.add("Center", logPanel);
- panel1.add("East", visPanel);
- panel2.add("Center", phyPanel);
- JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panel1, panel2);
- getContentPane().add("Center", splitPane);
- setJMenuBar( createMenubar() );
- setSize(780, 450);
-// pack();
- setVisible(true);
-// setBackground(Color.green);
-// setForeground(Color.black);
- }
- private JMenuBar createMenubar(){
- JMenu file ,mkCode;
- JMenuBar mb = new JMenuBar();
- file = new JMenu("File");
- file.add(load = new JMenuItem("Load a Volumes File"));
- file.add(append = new JMenuItem("Append a Volumes File"));
- file.add(save = new JMenuItem("Save Volumes"));
- file.add(clear = new JMenuItem("Clear Volumes"));
- file.addSeparator();
- file.add(exit = new JMenuItem("Exit"));
- load.addActionListener(this);
- append.addActionListener(this);
- save.addActionListener(this);
- clear.addActionListener(this);
- exit.addActionListener(this);
- mb.add(file);
- mkCode = new JMenu("MakeSource");
- mkCode.add(CPP = new JMenuItem("Make C++ code"));
- CPP.addActionListener(this);
- mb.add(mkCode);
- return mb;
- }
- public void actionPerformed(ActionEvent ae){
- Object o = ae.getSource();
- if( o == load ){GGEfileLoad();}
- if( o == append ){GGEfileAppend();}
- if( o == save ){GGEfileSave();}
- if( o == clear ){ volClear();}
- if( o == exit ){ System.exit(0); }
- if( o == CPP){
-//for debug System.out.println(makeCPP());
- sf.setVisible(true);
- sf.editor.setText(makeCPP());
- }
- }
-//------single, replica, repeated Volume -----open method---------
- public void singleOpen(){
- singleVol.setVisible(true);
- }
- public void replicaOpen(){
- repFrame.setVisible(true);
- }
- public void slicingOpen(){ // 1998 10.26 SlicingAxial
- slicingFrame.setVisible(true);
- }
- public void repeatOpen(){
- repeatVol.setVisible(true);
- }
- public void repeatRotateOpen(){
- repeatRotVol.setVisible(true);
- }
- public void parameOpen(){;}
-
-//Create C++ -------------------------------------------------
-
- String makeCPP(){
- StringBuffer smatcpp = new StringBuffer();
- smatcpp.append(headerCPP());
- smatcpp.append(matFrame.getCPP());
- smatcpp.append(visPanel.getCPP());
- smatcpp.append(logPanel.getCPP());
- smatcpp.append(phyPanel.getCPP());
- smatcpp.append(singleVol.getCPP());
- smatcpp.append(repeatVol.getCPP());
- smatcpp.append(repeatRotVol.getCPP());
- smatcpp.append(repFrame.getCPP());
- smatcpp.append(slicingFrame.getCPP()); //1998 10.26
- smatcpp.append(getCPP());
- return smatcpp.toString();
- }
- private synchronized void resume(){
- notify();
- }
-
- String getCPP(){
- StringBuffer cpp = new StringBuffer("\n// return the physical World\n\n");
- if(singleVol.singleTable.getRowCount()==0){
- return cpp.toString();
- }else{
- String mother;
- for (int i=0;i PRINT_PROGRESS)
- {
- spoolProgress = new Progress(parent,"Saving print copy ... ");
- spoolProgress.show();
- }
-
- for (i=0;i PRINT_PROGRESS)
- part++;
- if (part > tens)
- {
- spoolProgress.update( (int)(100 * i / max) );
- part = 0;
- }
- }
-
- if (spoolProgress != null)
- spoolProgress.dispose();
- }
-
- public void run()
- {
- pjob = parent.getToolkit().getPrintJob(parent, jobName, null);
-
- if (pjob == null)
- return;
-
- Graphics pg = pjob.getGraphics();
-
- if (pg != null)
- {
- String nextLine;
- int pageHeight = pjob.getPageDimension().height;
- pg.setFont(font);
- FontMetrics fm = pg.getFontMetrics(font);
- int fontHeight = fm.getHeight();
- int fontDescent = fm.getDescent();
- int curHeight = 0;
-
- for (int i = 0; i < spool.size(); i++ )
- {
- curHeight += fontHeight;
- if (curHeight > pageHeight)
- {
- pg.dispose();
- pg = pjob.getGraphics();
- if (pg == null)
- return;
- pg.setFont(font);
- curHeight = fontHeight;
- }
- nextLine = detabbed((String)spool.elementAt(i),tabsize);
- pg.drawString(nextLine, 0, curHeight - fontDescent);
- }
-
- pg.dispose();
- }
-
- pjob.end();
- }
-
- private String detabbed(String s, int tabSize)
- {
- if (s.indexOf('\t') < 0)
- return s;
-
- char c;
- String t = new String("");
- int j=0;
- int tabs;
- int max = s.length();
-
- for (int i=0; i 0) t = t + ' ';
- }
- else
- {
- t = t + c;
- j++;
- }
- }
-
- return t;
- }
-
-}
diff --git a/environments/Momo/java/Momo/TextEdit/Progress.class b/environments/Momo/java/Momo/TextEdit/Progress.class
deleted file mode 100644
index 545f682688..0000000000
Binary files a/environments/Momo/java/Momo/TextEdit/Progress.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/TextEdit/Progress.java b/environments/Momo/java/Momo/TextEdit/Progress.java
deleted file mode 100644
index b7a4b71af8..0000000000
--- a/environments/Momo/java/Momo/TextEdit/Progress.java
+++ /dev/null
@@ -1,67 +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
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.awt.event.*;
-
-// This extension of Dialog implements modal dialogs with a callback interface
-// to work around the "modal dialog problem" on Windows. The "NoteListener"
-// interface is used to return an action code to the parent when "continue" is
-// pressed.
-
-class Progress extends Dialog
-{
- Panel center;
-
- public Progress(Frame parent, String s)
- {
- super(parent);
-
- Panel north = new Panel();
- north.add(new Label(s));
- add("North", north);
-
- center = new Panel();
- add("Center", center);
-
- setSize(300, 100);
- }
-
- public void update( int percent )
- {
- Dimension d = center.getSize();
- Graphics g = center.getGraphics();
-
- int fifth = d.width / 5;
- int third = d.height / 3;
-
- g.fillRect( fifth, third, (fifth * 3 * percent) / 100, third);
- }
-
-}
diff --git a/environments/Momo/java/Momo/TextEdit/ReplaceDialog.class b/environments/Momo/java/Momo/TextEdit/ReplaceDialog.class
deleted file mode 100644
index 8e5b0fa599..0000000000
Binary files a/environments/Momo/java/Momo/TextEdit/ReplaceDialog.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/TextEdit/SizeMan.class b/environments/Momo/java/Momo/TextEdit/SizeMan.class
deleted file mode 100644
index aef239019e..0000000000
Binary files a/environments/Momo/java/Momo/TextEdit/SizeMan.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/TextEdit/TextCanvas.class b/environments/Momo/java/Momo/TextEdit/TextCanvas.class
deleted file mode 100644
index f2ec6edbd9..0000000000
Binary files a/environments/Momo/java/Momo/TextEdit/TextCanvas.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/TextEdit/TextCanvas.java b/environments/Momo/java/Momo/TextEdit/TextCanvas.java
deleted file mode 100644
index 97c0ac1d51..0000000000
--- a/environments/Momo/java/Momo/TextEdit/TextCanvas.java
+++ /dev/null
@@ -1,1407 +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
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.io.*;
-import java.util.*;
-import java.awt.event.*;
-
-class TextCanvas extends Canvas implements MouseMotionListener, MouseListener, ComponentListener, AdjustmentListener, KeyListener, FocusListener {
- final public int NOACTION = 0; // a null note action
- final private int EDGE = 10;
-
- private Scrollbar horiz; // control
- private Scrollbar vert; // control
-
- private boolean eactive,hactive; // is there currently a range?
- private boolean dirty; // document dirty flag
- private boolean mouseDown;
-
- private int sx,sy,ny; // current scroll positions
- private int line,column,pix; // the current column
- private int eline,ecolumn,epix; // the current end column
- private int widest,wpix; // the longest line
- private int oldlines; // repaint to old line count (if longer)
- private int fontHeight; // save time
- private int fontDescent; // save time
- private int tabSize = 4; // preference
-
- private String lineSeparator;
-
- private Font font; // preference
- private FontMetrics fontMetrics; // save time
- private Frame parent; // freindly object
- private TextCursor textCursor; // freindly object
- private EditMan editMan; // freindly object
- private Dimension dimension; // save time
- private Vector lines; // line buffer
- private TextJournal journal; // journal for "undo"
- private TextScroller textScroller = null;
-
- public TextCanvas(Frame p, Scrollbar h, Scrollbar v) {
- super();
-
- setBackground(Color.white);
- setForeground(Color.black);
-
- parent = p;
-
- lineSeparator = System.getProperty("line.separator");
-
- horiz = h;
- horiz.addAdjustmentListener(this);
- horiz.addKeyListener(this);
-
- vert = v;
- vert.addAdjustmentListener(this);
- vert.addKeyListener(this);
-
- lines = new Vector();
-
- journal = new TextJournal(this,lines,lineSeparator);
-
- addComponentListener(this);
- addMouseListener(this);
- addKeyListener(this);
- addFocusListener(this);
-
- clear();
- validate();
- requestFocus();
-
- textCursor = new TextCursor(this);
- textCursor.start();
- }
-
- //Toshiaki added
- public void writeString(String str){
- paste(str);
- journal.clear();
- }
- public void writeLine(String str){
- pause_cursor();
- textCursor.suspend();
- if (hactive) copy(true);
- String s = (String)lines.elementAt(line);
- lines.setElementAt(s + str, line);
- line++; column = 0;
- lines.insertElementAt("", line);
- if (editMan != null) {
- editMan.updateCopyItems(false);
- editMan.updateUndoItems(false, false);
- }
- journal.clear();
- if (dimension == null) dimension = getSize();
- shiftVert(line);
- shiftHoriz(EDGE);
- repaint();
- textCursor.resume();
- dirty = true;
- }
-
- private boolean gotFocus = false;
-
- public void focusGained(FocusEvent e) {
- gotFocus = true;
- release_cursor();
- }
-
- private void release_cursor()
- {
- if ((textCursor != null) && !eactive && gotFocus)
- textCursor.release_cursor(true);
- }
-
- public void focusLost(FocusEvent e)
- {
- pause_cursor();
- gotFocus = false;
- }
-
- private void pause_cursor()
- {
- if ((textCursor != null) && !eactive && gotFocus)
- textCursor.pause_cursor(true);
- }
-
- public void setEditMan(EditMan em)
- {
- editMan = em;
- }
-
- public void clear()
- {
- clear_area(null);
- hactive = eactive = dirty = false;
- if (editMan != null)
- {
- editMan.updateCopyItems(false);
- editMan.updateUndoItems(false, false);
- }
- oldlines = wpix = widest = line = column = sx = sy = 0;
- pix = EDGE;
- horiz.setValue(0);
- vert.setValue(0);
- lines.removeAllElements();
- journal.clear();
- }
-
- public void validate()
- {
- if (lines.size() == 0)
- appendLine(new String(""));
- redoCanvas();
- }
-
- public void setFont(String fs, int size)
- {
- font = new Font(fs, Font.PLAIN, size);
- Graphics g = getGraphics();
-
- if (g != null)
- {
- clear_area(g);
- updateFonts(g);
- resizeLines();
- redoCanvas();
- repaint();
- g.dispose();
- }
- else
- fontMetrics = null;
- }
-
- private void clear_area(Graphics g)
- {
- boolean foobar = false;
-
- pause_cursor();
-
- if (dimension == null)
- return;
-
- if (g == null)
- {
- g = getGraphics();
- foobar = true;
- }
-
- if (g != null)
- g.clearRect(0,0,dimension.width,dimension.height);
-
- if (foobar && (g != null))
- g.dispose();
- }
-
- public void setTab(int tab)
- {
- clear_area(null);
- tabSize = tab;
- resizeLines();
- repaint();
- }
-
- public void undo(boolean undo_it)
- {
- TextPosition tp;
-
- pause_cursor();
-
- if (undo_it)
- tp = journal.undo();
- else
- tp = journal.redo();
-
- if (tp == null)
- release_cursor();
- else
- {
- hactive = eactive = false;
- line = eline = tp.line;
- column = ecolumn = tp.column;
- pix = epix = pix_at(line,column);
- shiftVert(line);
- shiftHoriz(pix);
- repaint();
- }
- }
-
- public void updateUndoItems(boolean have_undo, boolean have_redo)
- {
- if (editMan != null)
- editMan.updateUndoItems(have_undo, have_redo);
- }
-
- private void updateFonts(Graphics g)
- {
- boolean foobar = false;
-
- if (g == null)
- {
- g = getGraphics();
- foobar = true;
- }
-
- if (g != null)
- {
- g.setFont(font);
- fontMetrics = g.getFontMetrics(font);
- fontHeight = fontMetrics.getHeight();
- fontDescent = fontMetrics.getDescent();
-
- if (foobar)
- g.dispose();
- }
- }
-
- public void print(String name)
- {
- PrintMan pm = new PrintMan(parent, name, lines, font, tabSize);
-
- if (pm != null)
- pm.start();
- }
-
- public boolean find( String pattern )
- {
- int i,max,ct,start,from;
- String whole;
-
- pause_cursor();
-
- max = lines.size();
- i = line;
- ct = 0;
-
- while (ct++ <= max)
- {
- whole = (String)lines.elementAt(i);
-
- if (( i == line ) && ( ct == 1 ))
- {
- if (eactive)
- from = column + 1;
- else
- from = column;
- }
- else
- from = 0;
-
- start = whole.indexOf(pattern,from);
-
- if (start >= 0)
- {
- line = eline = i;
- column = start;
- pix = stringLength(whole.substring(0,column)) + EDGE;
- ecolumn = start + pattern.length();
- epix = stringLength(whole.substring(0,ecolumn)) + EDGE;
- eactive = true;
- setup_h();
- save_h();
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- shiftVert(line);
- shiftHoriz(pix);
- shiftHoriz(epix);
- repaint();
- return true;
- }
-
- i++;
- if (i >= max)
- i = 0;
- }
-
- release_cursor();
- return false;
- }
-
- public synchronized void mousePressed(MouseEvent e)
- {
- Graphics g;
-
- requestFocus();
-
- if (mouseDown)
- return;
-
- mouseDown = true;
-
- pause_cursor();
- g = getGraphics();
- updateFonts(g);
-
- clickPosition( e.getX(), e.getY() );
-
- if ((cline < 0) || (cline >= lines.size()))
- return;
-
- eline = cline;
- ecolumn = ccolumn;
- epix = cpix;
-
- int clickCount = e.getClickCount();
-
- if (clickCount == 3)
- {
- eline = line = cline;
- column = 0;
- pix = EDGE;
- String whole = (String)lines.elementAt(cline);
- ecolumn = whole.length();
- epix = stringLength(whole) + EDGE;
- eactive = true;
- setup_h();
- save_h();
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- repaint();
- }
- else
- if (clickCount == 2)
- {
- char c;
- eline = line = cline;
- String whole = (String)lines.elementAt(cline);
- column = ecolumn = ccolumn;
- while (true)
- {
- if (column == 0)
- break;
-
- if (!Character.isLetterOrDigit(whole.charAt(column-1)))
- break;
-
- column--;
- }
- pix = stringLength(whole.substring(0,column)) + EDGE;
- int max = whole.length();
- while (true)
- {
- if (ecolumn >= max)
- break;
-
- if (!Character.isLetterOrDigit(whole.charAt(ecolumn)))
- break;
-
- ecolumn++;
- }
- epix = stringLength(whole.substring(0,ecolumn)) + EDGE;
- eactive = true;
- setup_h();
- save_h();
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- repaint();
- }
- else
- if (e.isShiftDown())
- {
- eline = cline;
- ecolumn = ccolumn;
- epix = cpix;
- eactive = true;
- setup_h();
- save_h();
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- repaint();
- }
- else
- {
- if (hactive)
- flip_h( g, oline, opix, oeline, oepix );
- eline = line = cline;
- ecolumn = column = ccolumn;
- epix = pix = cpix;
- hactive = false;
- eactive = true;
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- addMouseMotionListener(this);
- }
-
- g.dispose();
- }
-
- private int opix, oepix, oline, oeline;
- private int hpix, hepix, hline, heline, hcolumn, hecolumn;
- private int lastx,lasty;
-
- public synchronized void mouseDragged(MouseEvent e)
- {
- Graphics g;
-
- g = getGraphics();
- updateFonts(g);
-
- if (e != null)
- {
- lastx = e.getX();
- lasty = e.getY();
- }
-
- clickPosition( lastx, lasty );
-
- eline = cline;
- ecolumn = ccolumn;
- epix = cpix;
-
- eactive = ((eline != line) || (ecolumn != column));
- if (eactive || hactive)
- {
- setup_h();
-
- if ((eline < sy) ||
- (eline >= sy+ny) ||
- (epix < sx) ||
- (epix >= dimension.width))
- {
- if (textScroller == null)
- {
- textScroller = new TextScroller(this);
- textScroller.start();
- }
- shiftVert(eline);
- shiftHoriz(epix);
- setup_h();
- save_h();
- for (int i = 0; i < ny; i++)
- drawLine(g,sy+i);
- }
- else
- {
- if (textScroller != null)
- {
- textScroller.stop();
- textScroller = null;
- }
- if (hactive)
- {
- if ((hline < oline) || ((hline == oline) && (hpix < opix)))
- flip_h( g, hline, hpix, oline, opix );
- if ((hline > oline) || ((hline == oline) && (hpix > opix)))
- flip_h( g, oline, opix, hline, hpix );
- if ((heline < oeline) || ((heline == oeline) && (hepix < oepix)))
- flip_h( g, heline, hepix, oeline, oepix );
- if ((heline > oeline) || ((heline == oeline) && (hepix > oepix)))
- flip_h( g, oeline, oepix, heline, hepix );
- }
- else
- flip_h( g, hline, hpix, heline, hepix );
-
- hactive = eactive;
- save_h();
- }
- }
- g.dispose();
- }
-
- private int cline, ccolumn, cpix;
-
- void clickPosition( int x, int y )
- {
- cline = (y / fontHeight) + sy;
-
- if (cline < 0)
- {
- cline = ccolumn = cpix = 0;
- return;
- }
-
- if (cline >= lines.size())
- {
- cline = lines.size() - 1;
- String whole = (String)lines.elementAt(cline);
- ccolumn = whole.length();
- cpix = stringLength(whole) + EDGE;
- return;
- }
-
- x += sx;
-
- ccolumn = 0;
- cpix = 0;
-
- if (x > EDGE)
- {
- String whole = (String)lines.elementAt(cline);
- String part;
-
- ccolumn = whole.length();
-
- if (( ccolumn > 0 ) && ( x < (cpix = stringLength(whole) + EDGE) ))
- {
- if (ccolumn > 10)
- {
- int delta = ccolumn / 5;
-
- do {
- ccolumn -= delta;
- if (ccolumn < 0)
- {
- ccolumn = 0;
- part = null;
- }
- else
- part = whole.substring(0,ccolumn);
- } while (( ccolumn > 0 ) && ( x < (cpix = stringLength(part) + EDGE) ));
-
- ccolumn += delta;
- }
-
- while (( ccolumn > 0 ) && ( x < (cpix = stringLength(whole) + EDGE) ))
- whole = whole.substring(0,--ccolumn);
- }
- }
- }
-
- private void flip_h(Graphics g, int sline, int spix, int eline, int epix)
- {
- int i;
- int bx,ex,by;
-
- g.setXORMode(Color.white);
-
- if (eline >= sy + ny)
- {
- eline = sy + ny - 1;
- epix = 5000;
- }
-
- for (i = sline; i <= eline; i++)
- {
- by = (i - sy) * fontHeight;
- bx = 0;
- ex = 5000;
- if (i == sline)
- {
- bx = spix - sx;
- }
- if (i == eline)
- {
- ex = epix - sx;
- if (sline == eline)
- ex -= bx;
- }
- g.fillRect(bx,by,ex,fontHeight);
- }
- }
-
- private void setup_h()
- {
- if ((line < eline) || ((line == eline) && (column <= ecolumn)))
- {
- hline = line;
- hcolumn = column;
- hpix = pix;
- heline = eline;
- hecolumn = ecolumn;
- hepix = epix;
- }
- else
- {
- hline = eline;
- hcolumn = ecolumn;
- hpix = epix;
- heline = line;
- hecolumn = column;
- hepix = pix;
- }
- }
-
- private void save_h()
- {
- opix = hpix;
- oepix = hepix;
- oline = hline;
- oeline = heline;
- hactive = eactive;
- }
-
- public synchronized void mouseReleased(MouseEvent e)
- {
- if (!mouseDown)
- return;
-
- mouseDown = false;
-
- if (textScroller != null)
- {
- textScroller.stop();
- textScroller = null;
- }
- removeMouseMotionListener(this);
- eactive = ((eline != line) || (ecolumn != column));
- release_cursor();
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- }
-
- public void mouseEntered(MouseEvent e) {}
- public void mouseExited(MouseEvent e) {}
- public void mouseClicked(MouseEvent e) {}
- public void mouseMoved(MouseEvent e) {}
- public void keyTyped(KeyEvent e) {}
- public void keyReleased(KeyEvent e) {}
-
- private final int myMask = KeyEvent.CTRL_MASK | KeyEvent.META_MASK | KeyEvent.ALT_MASK;
-
- public void keyPressed(KeyEvent e)
- {
- int keyCode = e.getKeyCode();
- char keyChar;
- int max;
- String s;
-
- if (!gotFocus)
- return;
-
- if ((e.getModifiers() & myMask) != 0)
- return;
-
- if ((keyCode == e.VK_UP) && (line == 0))
- return;
-
- pause_cursor();
-
- switch (keyCode) {
- case e.VK_UP:
- line--;
- cursorAdjust();
- return;
- case e.VK_DOWN:
- line++;
- cursorAdjust();
- return;
- case e.VK_RIGHT:
- column++;
- cursorAdjust();
- return;
- case e.VK_LEFT:
- column--;
- cursorAdjust();
- return;
- default:
- keyChar = e.getKeyChar();
- if (keyChar != KeyEvent.CHAR_UNDEFINED)
- {
- if (keyCode == KeyEvent.VK_ENTER)
- {
- if (hactive)
- copy(true);
- journal.split_line(line,column);
- shiftVert(++line);
- column = 0;
- pix = EDGE;
- shiftHoriz(0);
- dirty = true;
- repaint();
- return;
- }
- else
- if (keyCode == KeyEvent.VK_BACK_SPACE)
- {
- if (hactive)
- {
- copy(true);
- return;
- }
- if (column > 0)
- {
- journal.delete_prev_char(line,column);
- column--;
- redoLine(line,column+1);
- return;
- }
- else
- if (line > 0)
- {
- line--;
- s = (String)lines.elementAt(line);
- column = s.length();
- shiftHoriz(stringLength(s) + EDGE);
- journal.join_line(line,column);
- shiftVert(line);
- dirty = true;
- repaint();
- return;
- }
- }
- else
- if (keyCode == KeyEvent.VK_DELETE)
- {
- if (hactive)
- {
- copy(true);
- return;
- }
- s = (String)lines.elementAt(line);
- max = s.length();
- if (column < max)
- {
- journal.delete_next_char(line,column);
- redoLine(line,column+1);
- return;
- }
- else
- if (line+1 < lines.size())
- {
- journal.join_line(line,column);
- dirty = true;
- repaint();
- return;
- }
- }
- else
- if (keyCode != KeyEvent.VK_ESCAPE &&
- keyChar != '\n' &&
- keyChar != '\b')
- {
- if (hactive)
- copy(true);
- journal.insert_char(line,column,keyChar);
- column++;
- redoLine(line,column);
- release_cursor();
- return;
- }
- }
- }
- release_cursor();
- }
-
- public void paste(String s)
- {
- int oldline;
- int oldcolumn;
- TextPosition tp;
-
- pause_cursor();
-
- if (hactive)
- copy(true);
-
- oldline = line;
- oldcolumn = column;
-
- tp = journal.insert_section(line,column,s);
- line = tp.line;
- column = tp.column;
-
- pix = pix_at( line, column );
- shiftVert(line);
- shiftHoriz(pix);
-
- if (oldline != line)
- {
- repaint();
- }
- else
- {
- redoLine(oldline,oldcolumn+1);
-// release_cursor();
- }
-
- dirty = true;
- }
-
- int pix_at(int line, int column)
- {
- if (column == 0)
- return EDGE;
- else
- return stringLength(((String)lines.elementAt(line)).substring(0, column)) + EDGE;
- }
-
- public String copy(boolean cut)
- {
- String s;
- int oldline;
- int oldcolumn;
- boolean paint = false;
-
- if (!hactive)
- return null;
-
- if (hline == heline)
- {
- oldline = hline;
- oldcolumn = hcolumn;
- }
- else
- paint = true;
-
- s = journal.delete_section(hline, hcolumn, heline, hecolumn, cut);
-
- if (cut)
- {
- dirty = true;
- line = hline;
- column = hcolumn;
- hactive = eactive = false;
-
- if (shiftVert(line))
- paint = true;
-
- pix = pix_at(line,column);
- if (shiftHoriz(pix))
- paint = true;
-
- if (paint)
- {
- repaint();
- }
- else
- {
- redoLine(line,column+1);
-// release_cursor();
- }
-
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- }
-
- return s;
- }
-
- private void cursorAdjust()
- {
- int min, max;
- boolean paint = false;
-
- if (eactive)
- {
- paint = true;
- hactive = eactive = false;
- if (editMan != null)
- editMan.updateCopyItems(eactive);
- }
-
- // straighten up lines first
-
- if (line < 0)
- line = 0;
- else
- {
- max = lines.size();
-
- if (line >= max )
- line = max - 1;
- }
-
- // straighten up columns
-
- if (column < 0)
- column = 0;
- else
- {
- max = ((String)lines.elementAt(line)).length();
- if (column > max)
- column = max;
- }
-
- // off page?
-
- if (shiftVert(line))
- paint = true;
-
- if (shiftHoriz(stringLength(((String)lines.elementAt(line)).substring(0, column)) + EDGE))
- paint = true;
-
- if (paint)
- repaint();
- else
- release_cursor();
- }
-
- private boolean shiftVert( int line )
- {
- if (line < sy)
- {
- sy = line;
- if (sy < 0)
- sy = 0;
- vert.setValue(sy);
- return true;
- }
-
- if (line >= sy+ny)
- {
- sy = line - ny + 1;
- vert.setValue(sy);
- return true;
- }
-
- return false;
- }
-
- private boolean shiftHoriz( int x )
- {
- if (x <= sx)
- {
- sx = x - (dimension.width / 5);
-
- if (sx < 0)
- sx = 0;
-
- horiz.setValue(sx);
- return true;
- }
-
- if (x >= sx + dimension.width)
- {
- sx = x - dimension.width + (dimension.width / 5);
- horiz.setValue(sx);
- return true;
- }
-
- return false;
- }
-
-
- private void redoLine(int line, int column)
- {
- String s;
- int x,y,height,width;
-
- s = (String)lines.elementAt(line);
-
- if (longest(s,line))
- redoControls(horiz.getValue(), vert.getValue(),false);
- dirty = true;
- updateFonts(null);
- height = fontHeight;
- y = (line - sy) * height;
- String sub = s.substring(0, column-1);
- x = stringLength(sub) + EDGE;
- if (shiftHoriz(x))
- {
- repaint();
- }
- else
- {
- x = x - sx - EDGE;
- width = dimension.width - x;
- repaint(10, x, y, width, height);
- }
-
- }
-
- public void componentHidden(ComponentEvent e) {}
- public void componentShown(ComponentEvent e) {}
- public void componentMoved(ComponentEvent e) {}
-
- public void componentResized(ComponentEvent e)
- {
- redoControls(horiz.getValue(), vert.getValue(),true);
- }
-
- private void redoCanvas()
- {
- redoControls(horiz.getValue(), vert.getValue(),false);
- }
-
- private void redoControls(int h, int v, boolean clear)
- {
- int maxline, maxpix, bubble;
-
- Graphics g = getGraphics();
-
- if (g == null)
- return;
-
- updateFonts(g);
-
- if (g != null)
- {
- dimension = getSize();
-
- if (clear)
- clear_area(g);
-
- maxpix = wpix;
- bubble = dimension.width;
-
- if ( bubble > maxpix)
- maxpix = bubble;
-
- if ( h > maxpix )
- h = maxpix;
-
- if ( maxpix > 0 )
- maxpix += 12;
-
- horiz.setValues(h, bubble, 0, maxpix);
-
- maxline = lines.size();
-
- if ( maxline <= 0 )
- maxline = 10;
-
- bubble = ny = dimension.height / fontHeight;
-
- if (bubble > maxline)
- bubble = maxline;
-
- if (v > maxline)
- v = maxline;
-
- vert.setValues(v, bubble, 0, maxline);
- repaint();
-
- g.dispose();
- }
- }
-
- private void appendLine(String s)
- {
- int count = lines.size();
- lines.insertElementAt( s, count );
- longest(s,count);
- }
-
- private boolean longest(String s, int line)
- {
- int len = stringLength(s);
- if (len > wpix)
- {
- wpix = (len * 5) / 4;
- widest = line;
- return true;
- }
- return false;
- }
-
- private void resizeLines()
- {
- if (widest < lines.size())
- {
- int len = stringLength((String)lines.elementAt(widest));
- if (len > wpix)
- {
- wpix = len;
- redoControls(horiz.getValue(), vert.getValue(),false);
- }
- }
-
- if ((hline >= 0) && (hline < lines.size()))
- opix = hpix = pix_at(hline,hcolumn);
-
- if ((heline >= 0) && (heline < lines.size()))
- oepix = hepix = pix_at(heline,hecolumn);
- }
-
- private int stringLength(String s)
- {
- if (fontMetrics == null)
- return -1;
-
- return fontMetrics.stringWidth(detabbed(s));
- }
-
- private String detabbed(String s)
- {
- if (s.indexOf('\t') < 0)
- return s;
-
- char c;
- String t = new String("");
- int j=0;
- int tabs;
- int max = s.length();
-
- for (int i=0; i 0) t = t + ' ';
- }
- else
- {
- t = t + c;
- j++;
- }
- }
-
- return t;
- }
-
- public boolean isDirty()
- {
- return dirty;
- }
-
- public void getCursorPos(Graphics g, Rectangle r)
- {
- updateFonts(g);
- r.width = 2;
- r.height = fontHeight;
- r.y = (line - sy) * r.height;
-
- if (column > 0)
- {
- String s = ((String)lines.elementAt(line)).substring(0, column);
- r.x = stringLength(s) + EDGE - sx;
- }
- else
- r.x = EDGE - sx;
- }
-
- public void adjustmentValueChanged(AdjustmentEvent e)
- {
- pause_cursor();
- if (e.getSource() == horiz)
- {
- sx = e.getValue();
- horiz.setValue(sx);
- }
- else
- if (e.getSource() == vert)
- {
- sy = e.getValue();
- vert.setValue(sy);
- }
- repaint();
- }
-
- private final int SLOW_READ = 2000;
- private final int SLOW_WRITE = 10000;
-
- public void read(File file)
- {
- Progress readProgress = null;
- boolean show_progress;
- long max,part,all,tens;
- String line;
-
- max = file.length();
- tens = max / 10;
- part = all = 0;
- show_progress = max > SLOW_READ;
-
- if (show_progress)
- {
- if (readProgress == null)
- readProgress = new Progress(parent,"Reading file ... ");
-
- readProgress.show();
- }
-
- clear();
-
- try
- {
- FileReader fr = new FileReader(file);
- BufferedReader br = new BufferedReader(fr);
-
- while ( (line=br.readLine()) != null)
- {
- if (show_progress)
- {
- part += line.length();
- if (part > tens)
- {
- all += part;
- readProgress.update( (int)(100 * all / max) );
- part = 0;
- }
- }
- appendLine(line);
- }
-
- br.close();
- fr.close();
- }
-
- catch (IOException e)
- {
- notify("Error - could not read file", NOACTION);
- }
- if (readProgress != null)
- readProgress.dispose();
- }
-
- public void write(File file)
- {
- Progress writeProgress = null;
- boolean show_progress;
- long max,part,all,tens;
- String line;
-
- max = lines.size();
- tens = max / 10;
- part = all = 0;
- show_progress = max > SLOW_WRITE;
-
- if (show_progress)
- {
- if (writeProgress == null)
- writeProgress = new Progress(parent,"Writing file ... ");
-
- writeProgress.show();
- }
-
- try
- {
- FileWriter fw = new FileWriter(file);
- BufferedWriter bw=new BufferedWriter(fw);
-
- for (int i=0;i tens)
- {
- all += part;
- writeProgress.update( (int)(100 * all / max) );
- part = 0;
- }
- }
- }
-
- bw.close();
- fw.close();
-
- dirty = false;
- }
-
- catch (IOException e)
- {
- notify("Error - could not write file", NOACTION);
- }
- if (writeProgress != null)
- writeProgress.dispose();
- }
-
- public void update(Graphics g)
- {
- paint(g);
- }
-
- public void paint(Graphics g)
- {
- int i;
- Rectangle clip;
- Rectangle curs = new Rectangle();
-
- pause_cursor();
-
- g.setPaintMode();
- updateFonts(g);
-
- i = lines.size();
- if (oldlines != i)
- {
- oldlines = i;
- redoControls(horiz.getValue(), vert.getValue(),true);
- }
-
- if (dimension == null)
- dimension = getSize();
-
- clip = g.getClipBounds();
-
- i = clip.y / fontHeight;
-
- if ( clip.height / fontHeight == 1)
- drawLine(g, sy + i);
- else
- for (i = 0; i < ny; i++)
- drawLine(g,sy+i);
-
- release_cursor();
- }
-
- private synchronized void drawLine(Graphics g, int i)
- {
- int x,y,m;
- int bx,ex;
- String s;
- Rectangle curs = null;
-
- g.setPaintMode();
- g.setColor(Color.black);
-
- x = EDGE-sx;
- y = (i - sy + 1) * fontHeight;
- m = fontHeight;// + fontDescent;
-
- if (hactive && (i > oline) && (i < oeline))
- g.fillRect(0,y-fontHeight,dimension.width,m);
- else
- g.clearRect(0,y-fontHeight,dimension.width,m);
-
- if (i >= lines.size())
- return;
-
- s = detabbed((String)lines.elementAt(i));
-
- if (hactive && (i > oline) && (i < oeline))
- {
- g.setColor(Color.white);
- g.drawString(s, x, y-fontDescent);
- g.setColor(Color.black);
- }
- else
- g.drawString(s, x, y-fontDescent);
-
- if (hactive && ((i == oline) || (i == oeline)))
- {
- g.setXORMode(Color.white);
- bx = 0;
- ex = 5000;
- if (i == oline)
- {
- bx = opix - sx;
- }
- if (i == oeline)
- {
- ex = oepix - sx;
- if (oline == oeline)
- ex -= bx;
- }
- g.fillRect(bx,y-fontHeight,ex,m);
- }
- }
-
- private void notify(String s, int action)
- {
- Note note = new Note(parent,s,action);
- note.setVisible(true);
- }
-}
diff --git a/environments/Momo/java/Momo/TextEdit/TextCursor.class b/environments/Momo/java/Momo/TextEdit/TextCursor.class
deleted file mode 100644
index f6fa8c3344..0000000000
Binary files a/environments/Momo/java/Momo/TextEdit/TextCursor.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/TextEdit/TextCursor.java b/environments/Momo/java/Momo/TextEdit/TextCursor.java
deleted file mode 100644
index 191df6b3a2..0000000000
--- a/environments/Momo/java/Momo/TextEdit/TextCursor.java
+++ /dev/null
@@ -1,100 +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
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.awt.event.*;
-
-class TextCursor extends Thread
-{
- private TextCanvas canvas;
- private boolean flash;
- private boolean undraw; // true when the next draw erases
- private Rectangle r;
-
- public TextCursor(TextCanvas c)
- {
- canvas = c;
- r = new Rectangle();
- }
-
- public void run()
- {
- while (true)
- {
- sync_draw();
- try { sleep(400); }
- catch(InterruptedException e) {}
- }
- }
-
- private synchronized void sync_draw()
- {
- if (flash)
- draw_or_undraw();
- }
-
- public boolean getUndraw()
- {
- return undraw;
- }
-
- public synchronized void pause_cursor(boolean draw)
- {
-// if (draw && undraw)
- if (undraw)
- draw_or_undraw();
- flash = false;
- }
-
- public synchronized void release_cursor(boolean draw)
- {
- if (!undraw)
- draw_or_undraw();
- flash = true;
- }
-
- private boolean draw_or_undraw()
- {
- Graphics g = canvas.getGraphics();
-
- if (g != null)
- {
- if (!undraw)
- canvas.getCursorPos(g,r);
- g.setXORMode(Color.white);
- g.drawLine(r.x, r.y, r.x, r.y+r.height);
- undraw = !undraw;
- g.dispose();
- }
- return undraw;
- }
-
-// public static void dumpStack() {new Exception("Stack trace").printStackTrace();}
-
-}
diff --git a/environments/Momo/java/Momo/TextEdit/TextEdit.class b/environments/Momo/java/Momo/TextEdit/TextEdit.class
deleted file mode 100644
index 55d873ba38..0000000000
Binary files a/environments/Momo/java/Momo/TextEdit/TextEdit.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/TextEdit/TextEdit.java b/environments/Momo/java/Momo/TextEdit/TextEdit.java
deleted file mode 100644
index 52c3673f04..0000000000
--- a/environments/Momo/java/Momo/TextEdit/TextEdit.java
+++ /dev/null
@@ -1,308 +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.
- *
- * CopyrightVersion 1.0
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.io.*;
-import java.util.*;
-import java.awt.event.*;
-
-import GAG.*;
-
-public class TextEdit extends Frame implements GAGtextEditor, NoteListener, WindowListener
-{
- // The NoteListen member fuction of NoteListener is overridded to support
- // the following actions.
-
- final private int NOACTION = 0;
- final private int NEWFILE = 1;
- final private int OPENFILE = 2;
- final private int QUITAPP = 3;
-
- // allocate standard components of TextEdit as part of initialization:
-
- public File file = new File("GEANT4 LOG");
-
- private String openPrompt = new String("Open text file");
- private String closePrompt = new String("Save file as");
-
- // initialize some state flags
-
- private boolean neverNamed = true;
- private boolean menuBusy = false;
-
- // these three .. no four! .. four objects form the main window
-
- private Scrollbar horiz;
- private Scrollbar vert;
- private TextCanvas textCanvas;
- private TextMenu textMenu;
-
- // font
-
- private String fontString = new String("Serif");
- private int fontSize = 14;
- private int tabSize = 4;
-
- // constructor puts together UI
-
- public TextEdit() {
- this.setTitle();
-
- vert = new Scrollbar(Scrollbar.VERTICAL);
- add("East", vert);
- horiz = new Scrollbar(Scrollbar.HORIZONTAL);
- add("South", horiz);
-
- textCanvas = new TextCanvas(this,horiz,vert);
- add("Center", textCanvas);
- textCanvas.setFont(fontString,fontSize);
- addKeyListener(textCanvas);
-
- textMenu = new TextMenu(this);
- setMenuBar(textMenu);
-
- addWindowListener(this);
-
- setSize(600, 600);
- setVisible(true);
- try { Thread.sleep(400); } catch(InterruptedException e) {}
- }
- public void writeString(String s){
- textCanvas.writeString(s);
- }
- public void writeLine(String s){
- textCanvas.writeLine(s);
- }
-
- // allow others to go straight to the canvas
- public TextCanvas getCanvas() {
- return textCanvas;
- }
-
- // add current filename to window title
-
- private void setTitle(){
- super.setTitle("TextEdit - " + file.getName());
- }
-
- // add the 1.1 WindowListener stuff
-
- public void windowDeiconified(WindowEvent event) {}
- public void windowIconified(WindowEvent event) {}
- public void windowActivated(WindowEvent event) {}
- public void windowDeactivated(WindowEvent event) {}
- public void windowOpened(WindowEvent event) {}
- public void windowClosed(WindowEvent event) {}
-
- public void windowClosing(WindowEvent event) {
- if (isItSafe(QUITAPP))
- System.exit(0);
- }
-
- // high level command processors (invoked my menu)
-
- public void setFont(String fs) {
- fontString = fs;
- textCanvas.setFont(fontString, fontSize);
- }
-
- public void setFontSize(int s) {
- fontSize = s;
- textCanvas.setFont(fontString, fontSize);
- }
-
- public void setTabSize(int s) {
- tabSize = s;
- textCanvas.setTab(tabSize);
- }
-
- public int getTabSize() {
- return tabSize;
- }
-
- public void cmdFileNew() {
- if (isItSafe(NEWFILE))
- newFile();
- }
-
- public void cmdFileOpen() {
- if (isItSafe(OPENFILE))
- openFile();
- }
-
- public void cmdFileSave() {
- saveFile(false);
- }
-
- public void cmdFileSaveAs() {
- saveFile(true);
- }
-
- public void cmdPrint() {
- textCanvas.print(file.getName());
- }
-
- public void cmdFileQuit() {
- if (isItSafe(QUITAPP))
- System.exit(0);
- }
-
- // if the file has been modified (dirty), fire off a notify dialog
- // and pass it the "action" you want returned to noteListen. This
- // dataflow beats the "modal dialog problem" on Windows
-
- // I believe isItSafe is what Laurence Olivier said repeatedly to
- // Dustan Hoffman in Marathon Man.
-
- private boolean isItSafe(int action) {
- if (textCanvas.isDirty())
- {
- notify( "The current file has not been saved. ", action );
- return false;
- }
- else
- return true;
- }
-
- // implementation of the NoteListener interface - it does whatever
- // action the user agreed to by pressing "Continue" on a modal dialog
-
- public void noteListen(int action)
- {
- switch (action)
- {
- case NOACTION:
- break;
- case NEWFILE:
- newFile();
- break;
- case OPENFILE:
- openFile();
- break;
- case QUITAPP:
- System.exit(0);
- break;
- }
- }
-
- // clear out the document
-
- private void newFile()
- {
- neverNamed = true;
- file = new File("Untitled");
- this.setTitle();
- textCanvas.clear();
- textCanvas.validate();
- }
-
- // call getFile to get a file path, and if you get one open it
-
- private void openFile()
- {
- if (getFile(FileDialog.LOAD))
- openTheFile();
- }
-
- public void openTheFile()
- {
- textCanvas.read(file);
- textCanvas.validate();
- neverNamed = false;
- this.setTitle();
- }
-
- // call getFile to get a file path, and if you get one save to it
-
- private void saveFile(boolean As)
- {
- boolean ok;
-
- if (neverNamed || As)
- {
- ok = getFile(FileDialog.SAVE);
- neverNamed = false;
- }
- else
- ok = true;
-
- if (ok)
- {
- textCanvas.write(file);
- neverNamed = false;
- this.setTitle();
- }
- }
-
- // use FileDialog to get a filepath
-
- private boolean getFile(int mode)
- {
- String prompt;
- String filename;
- String pathname;
-
- if (mode == FileDialog.LOAD)
- prompt = openPrompt;
- else
- prompt = closePrompt;
-
- FileDialog d = new FileDialog(this, prompt, mode);
-
- if (mode == FileDialog.LOAD)
- d.setFile("*");
- else
- d.setFile(file.getName());
-
- d.setDirectory(".");
- d.setVisible(true);
-
- filename = d.getFile();
-
- pathname = d.getDirectory() + filename;
-
- d.dispose();
-
- if (filename != null)
- {
- file = new File(pathname);
- return true;
- }
- else
- return false;
- }
-
- // launch a note
-
- private void notify(String s, int action) {
- Note note = new Note(this,s,action);
- note.setVisible(true);
- }
-
- // main declares the TextEdit frame which does everything
-
- public static void main(String[] args) {
- TextEdit f = new TextEdit();
- if (args.length > 0) {
- f.file = new File(args[0]);
- if (f.file.isFile())
- f.openTheFile();
- else
- f.notify("File not found: "+args[0],0);
- }
- }
-}
diff --git a/environments/Momo/java/Momo/TextEdit/TextEdit.java.bak b/environments/Momo/java/Momo/TextEdit/TextEdit.java.bak
deleted file mode 100644
index 1510fa618b..0000000000
--- a/environments/Momo/java/Momo/TextEdit/TextEdit.java.bak
+++ /dev/null
@@ -1,306 +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.
- *
- * CopyrightVersion 1.0
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.io.*;
-import java.util.*;
-import java.awt.event.*;
-
-public class TextEdit extends Frame implements NoteListener, WindowListener
-{
- // The NoteListen member fuction of NoteListener is overridded to support
- // the following actions.
-
- final private int NOACTION = 0;
- final private int NEWFILE = 1;
- final private int OPENFILE = 2;
- final private int QUITAPP = 3;
-
- // allocate standard components of TextEdit as part of initialization:
-
- public File file = new File("Untitled");
-
- private String openPrompt = new String("Open text file");
- private String closePrompt = new String("Save file as");
-
- // initialize some state flags
-
- private boolean neverNamed = true;
- private boolean menuBusy = false;
-
- // these three .. no four! .. four objects form the main window
-
- private Scrollbar horiz;
- private Scrollbar vert;
- private TextCanvas textCanvas;
- private TextMenu textMenu;
-
- // font
-
- private String fontString = new String("Courier");
- private int fontSize = 12;
- private int tabSize = 4;
-
- // constructor puts together UI
-
- public TextEdit() {
- this.setTitle();
-
- vert = new Scrollbar(Scrollbar.VERTICAL);
- add("East", vert);
- horiz = new Scrollbar(Scrollbar.HORIZONTAL);
- add("South", horiz);
-
- textCanvas = new TextCanvas(this,horiz,vert);
- add("Center", textCanvas);
- textCanvas.setFont(fontString,fontSize);
- addKeyListener(textCanvas);
-
- textMenu = new TextMenu(this);
- setMenuBar(textMenu);
-
- addWindowListener(this);
- }
- public void writeStr(String t){
- textCanvas.appendLine(t);
- }
- public void writeText(String t){
- textCanvas.appendLine(t);
- }
-
- // allow others to go straight to the canvas
-
- public TextCanvas getCanvas() {
- return textCanvas;
- }
-
- // add current filename to window title
-
- private void setTitle(){
- super.setTitle("TextEdit - " + file.getName());
- }
-
- // add the 1.1 WindowListener stuff
-
- public void windowDeiconified(WindowEvent event) {}
- public void windowIconified(WindowEvent event) {}
- public void windowActivated(WindowEvent event) {}
- public void windowDeactivated(WindowEvent event) {}
- public void windowOpened(WindowEvent event) {}
- public void windowClosed(WindowEvent event) {}
-
- public void windowClosing(WindowEvent event) {
- if (isItSafe(QUITAPP))
- System.exit(0);
- }
-
- // high level command processors (invoked my menu)
-
- public void setFont(String fs) {
- fontString = fs;
- textCanvas.setFont(fontString, fontSize);
- }
-
- public void setFontSize(int s) {
- fontSize = s;
- textCanvas.setFont(fontString, fontSize);
- }
-
- public void setTabSize(int s) {
- tabSize = s;
- textCanvas.setTab(tabSize);
- }
-
- public int getTabSize() {
- return tabSize;
- }
-
- public void cmdFileNew() {
- if (isItSafe(NEWFILE))
- newFile();
- }
-
- public void cmdFileOpen() {
- if (isItSafe(OPENFILE))
- openFile();
- }
-
- public void cmdFileSave() {
- saveFile(false);
- }
-
- public void cmdFileSaveAs() {
- saveFile(true);
- }
-
- public void cmdPrint() {
- textCanvas.print(file.getName());
- }
-
- public void cmdFileQuit() {
- if (isItSafe(QUITAPP))
- System.exit(0);
- }
-
- // if the file has been modified (dirty), fire off a notify dialog
- // and pass it the "action" you want returned to noteListen. This
- // dataflow beats the "modal dialog problem" on Windows
-
- // I believe isItSafe is what Laurence Olivier said repeatedly to
- // Dustan Hoffman in Marathon Man.
-
- private boolean isItSafe(int action) {
- if (textCanvas.isDirty())
- {
- notify( "The current file has not been saved. ", action );
- return false;
- }
- else
- return true;
- }
-
- // implementation of the NoteListener interface - it does whatever
- // action the user agreed to by pressing "Continue" on a modal dialog
-
- public void noteListen(int action)
- {
- switch (action)
- {
- case NOACTION:
- break;
- case NEWFILE:
- newFile();
- break;
- case OPENFILE:
- openFile();
- break;
- case QUITAPP:
- System.exit(0);
- break;
- }
- }
-
- // clear out the document
-
- private void newFile()
- {
- neverNamed = true;
- file = new File("Untitled");
- this.setTitle();
- textCanvas.clear();
- textCanvas.validate();
- }
-
- // call getFile to get a file path, and if you get one open it
-
- private void openFile()
- {
- if (getFile(FileDialog.LOAD))
- openTheFile();
- }
-
- public void openTheFile()
- {
- textCanvas.read(file);
- textCanvas.validate();
- neverNamed = false;
- this.setTitle();
- }
-
- // call getFile to get a file path, and if you get one save to it
-
- private void saveFile(boolean As)
- {
- boolean ok;
-
- if (neverNamed || As)
- {
- ok = getFile(FileDialog.SAVE);
- neverNamed = false;
- }
- else
- ok = true;
-
- if (ok)
- {
- textCanvas.write(file);
- neverNamed = false;
- this.setTitle();
- }
- }
-
- // use FileDialog to get a filepath
-
- private boolean getFile(int mode)
- {
- String prompt;
- String filename;
- String pathname;
-
- if (mode == FileDialog.LOAD)
- prompt = openPrompt;
- else
- prompt = closePrompt;
-
- FileDialog d = new FileDialog(this, prompt, mode);
-
- if (mode == FileDialog.LOAD)
- d.setFile("*");
- else
- d.setFile(file.getName());
-
- d.setDirectory(".");
- d.setVisible(true);
-
- filename = d.getFile();
-
- pathname = d.getDirectory() + filename;
-
- d.dispose();
-
- if (filename != null)
- {
- file = new File(pathname);
- return true;
- }
- else
- return false;
- }
-
- // launch a note
-
- private void notify(String s, int action) {
- Note note = new Note(this,s,action);
- note.setVisible(true);
- }
-
- // main declares the TextEdit frame which does everything
-
- public static void main(String[] args) {
- TextEdit f = new TextEdit();
- f.setSize(500, 400);
- f.setVisible(true);
- if (args.length > 0) {
- f.file = new File(args[0]);
- if (f.file.isFile())
- f.openTheFile();
- else
- f.notify("File not found: "+args[0],0);
- }
- }
-}
-
diff --git a/environments/Momo/java/Momo/TextEdit/TextJournal.class b/environments/Momo/java/Momo/TextEdit/TextJournal.class
deleted file mode 100644
index 09bdc3ca1a..0000000000
Binary files a/environments/Momo/java/Momo/TextEdit/TextJournal.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/TextEdit/TextJournal.java b/environments/Momo/java/Momo/TextEdit/TextJournal.java
deleted file mode 100644
index 22a11ffe2b..0000000000
--- a/environments/Momo/java/Momo/TextEdit/TextJournal.java
+++ /dev/null
@@ -1,463 +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
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.util.*;
-
-class TextJournal
-{
- private TextCanvas canvas; // the parent
- private Vector lines; // the document
- private TextJournalItem journal; // the journal
- private TextJournalItem undo_list; // where we are in undo
- private TextJournalItem redo_list; // where we are in redo
-
- private boolean had_undo;
- private boolean had_redo;
-
- private String lineSeparator;
-
- private final int REPLACE_LINE = 1;
- private final int SPLIT_LINE = 2;
- private final int JOIN_LINE = 3;
- private final int INSERT = 4;
- private final int DELETE = 5;
-
- public TextJournal(TextCanvas c, Vector v, String ls)
- {
- canvas = c;
- lines = v;
- lineSeparator = ls;
- undo_list = redo_list = null;
- had_undo = had_redo = false;
- }
-
- public void clear()
- {
- undo_list = redo_list = null;
- had_undo = had_redo = false;
- }
-
- private void updateMenus()
- {
- boolean got_undo;
- boolean got_redo;
-
- got_undo = undo_list != null;
- got_redo = redo_list != null;
-
- if ((had_undo != got_undo) || (had_redo != got_redo))
- canvas.updateUndoItems(got_undo, got_redo);
-
- had_undo = got_undo;
- had_redo = got_redo;
- }
-
- public TextPosition undo()
- {
- TextJournalItem temp;
- TextPosition tp = null;
-
- if (undo_list != null)
- {
- temp = undo_list;
- undo_list = temp.next;
-
- switch (temp.action)
- {
- case REPLACE_LINE:
- redo_line(temp);
- break;
- case SPLIT_LINE:
- split_or_join(temp,true);
- break;
- case JOIN_LINE:
- split_or_join(temp,false);
- break;
- case INSERT:
- copy_or_cut(temp,true);
- break;
- case DELETE:
- insert(temp);
- break;
- default:;
- }
-
- tp = new TextPosition(temp.line,temp.column);
-
- temp.next = redo_list;
- redo_list = temp;
- }
-
- updateMenus();
- return tp;
- }
-
- public TextPosition redo()
- {
- TextJournalItem temp;
- TextPosition tp = null;
- int line, column;
-
- if (redo_list != null)
- {
- temp = redo_list;
- redo_list = temp.next;
-
- line = temp.line;
- column = temp.column;
-
- switch (temp.action)
- {
- case REPLACE_LINE:
- column = temp.text.length();
- redo_line(temp);
- break;
- case SPLIT_LINE:
- split_or_join(temp,false);
- column = 0;
- break;
- case JOIN_LINE:
- split_or_join(temp,true);
- break;
- case INSERT:
- insert(temp);
- line = temp.eline;
- column = temp.ecolumn;
- break;
- case DELETE:
- copy_or_cut(temp,true);
- break;
- default:;
- }
-
- tp = new TextPosition(line,column);
-
- temp.next = undo_list;
- undo_list = temp;
- }
-
- updateMenus();
- return tp;
- }
-
- public void insert_char(int line, int column, char c)
- {
- String s;
-
- s = (String)lines.elementAt(line);
-
- remember_line(line,column,s);
-
- s = s.substring(0, column) + c + s.substring(column, s.length());
- lines.setElementAt(s,line);
- }
-
- public void delete_prev_char(int line, int column)
- {
- String s;
-
- s = (String)lines.elementAt(line);
-
- remember_line(line,column,s);
-
- s = s.substring(0, column-1) + s.substring(column, s.length());
- lines.setElementAt(s,line);
- }
-
- public void delete_next_char(int line, int column)
- {
- String s;
-
- s = (String)lines.elementAt(line);
-
- remember_line(line,column,s);
-
- s = s.substring(0, column) + s.substring(column+1, s.length());
- lines.setElementAt(s,line);
- }
-
- private void remember_line(int line, int column, String s)
- {
- boolean new_line = true;
-
- if (undo_list != null)
- new_line = (undo_list.action != REPLACE_LINE) || (undo_list.line != line);
-
- if (new_line)
- {
- TextJournalItem new_journal = new TextJournalItem();
- new_journal.action = REPLACE_LINE;
- new_journal.line = line;
- new_journal.column = column;
- new_journal.text = new String(s);
- new_journal.next = undo_list;
- undo_list = new_journal;
- }
-
- redo_list = null;
- updateMenus();
- }
-
- private void redo_line(TextJournalItem i)
- {
- String s;
- s = (String)lines.elementAt(i.line);
- lines.setElementAt(i.text,i.line);
- i.text = s;
- }
-
- public void split_line(int line, int column)
- {
- TextJournalItem new_journal = new TextJournalItem();
- new_journal.action = SPLIT_LINE;
- new_journal.line = line;
- new_journal.column = column;
-
- split_or_join(new_journal,false);
-
- new_journal.next = undo_list;
- undo_list = new_journal;
- redo_list = null;
- updateMenus();
- }
-
- public void join_line(int line, int column)
- {
- TextJournalItem new_journal = new TextJournalItem();
- new_journal.action = JOIN_LINE;
- new_journal.line = line;
- new_journal.column = column;
-
- split_or_join(new_journal,true);
-
- new_journal.next = undo_list;
- undo_list = new_journal;
- redo_list = null;
- updateMenus();
- }
-
- public void split_or_join(TextJournalItem i, boolean join)
- {
- String s;
- int line = i.line;
- int column = i.column;
-
- if (join)
- {
- s = (String)lines.elementAt(line);
- s = s.concat((String)lines.elementAt(line+1));
- lines.setElementAt(s,line);
- lines.removeElementAt(line+1);
- }
- else
- {
- s = (String)lines.elementAt(line);
- lines.setElementAt(s.substring(0,column),line);
- lines.insertElementAt(s.substring(column,s.length()),++line);
- }
- }
-
- public TextPosition insert_section(int line, int column, String s)
- {
- int charCt;
- int saveCt;
- int charMax;
- char c,c2;
- String s2 = null;
- TextPosition tp;
-
- // start creating journal item
-
- TextJournalItem new_journal = new TextJournalItem();
- new_journal.action = INSERT;
- new_journal.text = new String(s);
- new_journal.line = line; // starting line and column
- new_journal.column = column;
-
- // insert the text
-
- tp = insert(new_journal);
-
- // finish creating journal entry
-
- new_journal.eline = tp.line; // updated line and column
- new_journal.ecolumn = tp.column;
- new_journal.next = undo_list;
- undo_list = new_journal;
- redo_list = null;
- updateMenus();
-
- return tp;
- }
-
- public TextPosition insert(TextJournalItem i)
- {
- int line = i.line;
- int column = i.column;
- String s = i.text;
-
- int charCt;
- int saveCt;
- int charMax;
- char c,c2;
- String s2 = null;
-
- // insert the text
-
- charMax = s.length();
- charCt = saveCt = 0;
-
- while (charCt < charMax)
- {
- c = s.charAt(charCt);
- charCt++;
- if ((c == '\r') || (c == '\n'))
- {
- s2 = (String)lines.elementAt(line);
- lines.setElementAt(s2.substring(0,column) + s.substring(saveCt,charCt-1),line);
- lines.insertElementAt(s2.substring(column,s2.length()),++line);
- column = 0;
- if (charCt < charMax)
- {
- c2 = s.charAt(charCt);
- if (((c == '\r') && (c2 == '\n')) || ((c2 == '\r') && (c == '\n')))
- charCt++;
- }
- saveCt = charCt;
- }
- }
-
- if (saveCt < charCt)
- {
- s2 = (String)lines.elementAt(line);
- s = s.substring(saveCt,charCt);
- if (column == 0)
- s2 = s + s2;
- else
- s2 = s2.substring(0, column) + s + s2.substring(column, s2.length());
- column += s.length();
- lines.setElementAt(s2,line);
- }
-
- return new TextPosition(line,column);
- }
-
- public String delete_section(int line, int column, int eline, int ecolumn, boolean cut)
- {
- String text;
-
- TextJournalItem new_journal = new TextJournalItem();
- new_journal.action = DELETE;
- new_journal.line = line;
- new_journal.column = column;
- new_journal.eline = eline;
- new_journal.ecolumn = ecolumn;
-
- text = copy_or_cut(new_journal,cut);
-
- if (cut)
- {
- new_journal.text = new String(text);
- new_journal.next = undo_list;
- undo_list = new_journal;
- redo_list = null;
- updateMenus();
- }
-
- return text;
- }
-
- private String copy_or_cut(TextJournalItem i, boolean cut)
- {
- String s,s2;
- String text = null;
-
- int line = i.line;
- int column = i.column;
- int eline = i.eline;
- int ecolumn = i.ecolumn;
-
- if (line == eline)
- {
- s = (String)lines.elementAt(line);
- text = s.substring(column,ecolumn);
- if (cut)
- {
- s = s.substring(0, column) + s.substring(ecolumn, s.length());
- lines.setElementAt(s,line);
- }
- }
- else
- {
- s = (String)lines.elementAt(line);
- text = s.substring(column,s.length());
- s = s.substring(0, column);
-
- int diff = eline - line;
- int k = line + 1;
-
- for (int j = 1; j < diff; j++)
- {
- s2 = (String)lines.elementAt(k);
- text = text + lineSeparator + s2;
- if (cut)
- lines.removeElementAt(k);
- else
- k++;
- }
-
- if (k != lines.size())
- {
- s2 = (String)lines.elementAt(k);
- text = text + lineSeparator + s2.substring(0,ecolumn);
- s = s + s2.substring(ecolumn,s2.length());
- if (cut)
- lines.removeElementAt(k);
- }
-
- if (cut)
- lines.setElementAt(s,line);
- }
-
- return text;
- }
-
-}
-
-class TextJournalItem
-{
- public TextJournalItem next;
- public String text;
- public int action;
- public int line;
- public int column;
- public int eline;
- public int ecolumn;
-}
diff --git a/environments/Momo/java/Momo/TextEdit/TextJournalItem.class b/environments/Momo/java/Momo/TextEdit/TextJournalItem.class
deleted file mode 100644
index c1265cc788..0000000000
Binary files a/environments/Momo/java/Momo/TextEdit/TextJournalItem.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/TextEdit/TextMenu.class b/environments/Momo/java/Momo/TextEdit/TextMenu.class
deleted file mode 100644
index d5f1c99de4..0000000000
Binary files a/environments/Momo/java/Momo/TextEdit/TextMenu.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/TextEdit/TextMenu.java b/environments/Momo/java/Momo/TextEdit/TextMenu.java
deleted file mode 100644
index 19cb617ddf..0000000000
--- a/environments/Momo/java/Momo/TextEdit/TextMenu.java
+++ /dev/null
@@ -1,254 +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.
- *
- * CopyrightVersion 1.0
- */
-
-package TextEdit;
-
-import java.util.*;
-import java.awt.*;
-import java.awt.event.*;
-
-public class TextMenu extends MenuBar implements ActionListener {
- // menus
- private Menu fileMenu;
- private Menu editMenu;
- private Menu fontMenu;
- private Menu sizeMenu;
- private Menu helpMenu;
-
- // adaptors
- private EditMan editMan;
- private SizeMan sizeMan;
- private FontMan fontMan;
-
- // allocate standard components of TextEdit as part of initialization:
- private String newString = new String("New");
- private String openString = new String("Open");
- private String saveString = new String("Save");
- private String saveAsString = new String("Save As");
- private String printString = new String("Print");
- private String quitString = new String("Quit");
- private String aboutString = new String("About");
-
- // remember who our parents are
-
- private TextEdit textEdit;
- private TextCanvas textCanvas;
-
- // constructor puts together UI
-
- public TextMenu(TextEdit parent) {
- super();
-
- textEdit = parent;
- textCanvas = textEdit.getCanvas();
-
- CheckboxMenuItem cbi;
-
- editMan = new EditMan(parent);
- sizeMan = new SizeMan(parent);
- fontMan = new FontMan(parent);
-
- fileMenu = new Menu("File");
- fileMenu.add(new MenuItem(newString));
- fileMenu.add(new MenuItem(openString));
- fileMenu.add(new MenuItem(saveString));
- fileMenu.add(new MenuItem(saveAsString));
- fileMenu.addSeparator();
- fileMenu.add(new MenuItem(printString));
- //fileMenu.addSeparator();
- //fileMenu.add(new MenuItem(quitString));
- fileMenu.addActionListener(this);
- add(fileMenu);
-
- editMenu = new Menu("Edit");
- editMan.addItems(editMenu);
- add(editMenu);
-
- fontMenu = new Menu("Font");
- String[] fontNames = parent.getToolkit().getFontList();
- for (int i = 0; i < fontNames.length; i++) {
- if (fontNames[i].equals("Courier")){
- cbi = add_checked(fontMenu, fontMan, fontNames[i]);
- fontMan.remember(cbi);
- }else{
- add_unchecked(fontMenu, fontMan, fontNames[i]);
- }
- }
- add(fontMenu);
-
- sizeMenu = new Menu("Size");
- add_unchecked(sizeMenu, sizeMan, new String("10"));
- add_unchecked(sizeMenu, sizeMan, new String("11"));
- cbi = add_checked(sizeMenu, sizeMan, new String("12"));
- sizeMan.remember(cbi);
- add_unchecked(sizeMenu, sizeMan, new String("14"));
- add_unchecked(sizeMenu, sizeMan, new String("16"));
- add_unchecked(sizeMenu, sizeMan, new String("18"));
- add_unchecked(sizeMenu, sizeMan, new String("36"));
- add(sizeMenu);
-
- helpMenu = new Menu("Help");
- helpMenu.add(new MenuItem(aboutString));
- helpMenu.addActionListener(this);
- setHelpMenu(helpMenu);
- }
-
- private void add_unchecked( Menu menu, ItemListener adaptor, String string ) {
- CheckboxMenuItem cbi;
-
- cbi = new CheckboxMenuItem(string);
- cbi.addItemListener(adaptor);
- menu.add(cbi);
- }
-
- private CheckboxMenuItem add_checked( Menu menu, ItemListener adaptor, String string ) {
- CheckboxMenuItem cbi;
-
- cbi = new CheckboxMenuItem(string);
- cbi.addItemListener(adaptor);
- cbi.setState(true);
- menu.add(cbi);
- return cbi;
- }
-
- // action handler, part of std java event handling
-
- public void actionPerformed(ActionEvent evt) {
- int i;
-
- Object source = evt.getSource();
- String cmd = evt.getActionCommand();
-
- if (source == fileMenu)
- doFile(cmd);
- else
- if (source == helpMenu) {
- AboutDialog ab = new AboutDialog(textEdit);
- ab.show();
- }
- }
-
- private void doFile(String cmd){
- if (cmd.equals(newString))
- textEdit.cmdFileNew();
- else
- if (cmd.equals(openString))
- textEdit.cmdFileOpen();
- else
- if (cmd.equals(saveString))
- textEdit.cmdFileSave();
- else
- if (cmd.equals(saveAsString))
- textEdit.cmdFileSaveAs();
- else
- if (cmd.equals(printString))
- textEdit.cmdPrint();
- else
- if (cmd.equals(quitString))
- textEdit.cmdFileQuit();
- }
-}
-
-class AboutDialog extends Dialog implements WindowListener, ActionListener {
- Button ok;
- public AboutDialog(Frame parent) {
- super(parent,"About TextEdit",true);
-
- Panel center = new Panel(new GridLayout(0,1));
- center.add(new Label("GAG v0.1alpha", Label.CENTER));
- center.add(new Label("Copyright (c) 1997 Toshiaki Kodama"));
- center.add(new Label("Contact: toshiaki@naruto-u.ac.jp"));
- center.add(new Label("This GAG includs TextEditi. (c) 1997 John Jensen"));
- add("Center", center);
-
- Panel p = new Panel();
- ok = new Button("Ok");
- ok.addActionListener(this);
- p.add(ok);
- add("South",p);
- //setSize(240,240);
- pack();
- addWindowListener(this);
- }
-
- // dispose on 'ok'
- public void actionPerformed(ActionEvent event) {
- if (event.getSource() == ok)
- dispose();
- }
-
- // add the 1.1 WindowListener stuff
-
- public void windowDeiconified(WindowEvent event) {}
- public void windowIconified(WindowEvent event) {}
- public void windowActivated(WindowEvent event) {}
- public void windowDeactivated(WindowEvent event) {}
- public void windowOpened(WindowEvent event) {}
- public void windowClosed(WindowEvent event) {}
- public void windowClosing(WindowEvent event) {
- dispose();
- }
-}
-
-class SizeMan extends Object implements ItemListener {
- // remember stuff
-
- private TextEdit textEdit;
- private CheckboxMenuItem lastSize = null;
-
- // constructor puts together UI
-
- public SizeMan(TextEdit parent) {
- textEdit = parent;
- }
-
- public void remember( CheckboxMenuItem item ) {
- if (lastSize != null)
- lastSize.setState(false);
- lastSize = item;
- }
-
- public void itemStateChanged(ItemEvent evt) {
- remember((CheckboxMenuItem)evt.getSource());
- String cmd = (String)evt.getItem();
- Integer size = new Integer(cmd);
- textEdit.setFontSize(size.intValue());
- }
-}
-
-final class FontMan extends Object implements ItemListener {
- // remember stuff
-
- private TextEdit textEdit;
- private CheckboxMenuItem lastTab = null;
-
- // constructor puts together UI
-
- public FontMan(TextEdit parent) {
- textEdit = parent;
- }
-
- public void remember( CheckboxMenuItem item ) {
- if (lastTab != null)
- lastTab.setState(false);
- lastTab = item;
- }
-
- public void itemStateChanged(ItemEvent evt) {
- String cmd = (String)evt.getItem();
- remember((CheckboxMenuItem)evt.getSource());
- textEdit.setFont(cmd);
- }
-}
diff --git a/environments/Momo/java/Momo/TextEdit/TextPosition.class b/environments/Momo/java/Momo/TextEdit/TextPosition.class
deleted file mode 100644
index f38b4acca1..0000000000
Binary files a/environments/Momo/java/Momo/TextEdit/TextPosition.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/TextEdit/TextPosition.java b/environments/Momo/java/Momo/TextEdit/TextPosition.java
deleted file mode 100644
index 1a8e03f680..0000000000
--- a/environments/Momo/java/Momo/TextEdit/TextPosition.java
+++ /dev/null
@@ -1,40 +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
- */
-
-package TextEdit;
-
-class TextPosition
-{
- public int line;
- public int column;
-
- public TextPosition(int l, int c)
- {
- line = l;
- column = c;
- }
-}
diff --git a/environments/Momo/java/Momo/TextEdit/TextScroller.class b/environments/Momo/java/Momo/TextEdit/TextScroller.class
deleted file mode 100644
index 32998e0cb8..0000000000
Binary files a/environments/Momo/java/Momo/TextEdit/TextScroller.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/TextEdit/TextScroller.java b/environments/Momo/java/Momo/TextEdit/TextScroller.java
deleted file mode 100644
index 9001b762af..0000000000
--- a/environments/Momo/java/Momo/TextEdit/TextScroller.java
+++ /dev/null
@@ -1,53 +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
- */
-
-package TextEdit;
-
-import java.awt.*;
-import java.awt.event.*;
-
-class TextScroller extends Thread
-{
- private TextCanvas canvas;
-
- public TextScroller(TextCanvas c)
- {
- canvas = c;
- }
-
- public void run()
- {
- while (true)
- {
- try { sleep(10); }
- catch(InterruptedException e) {}
-
- canvas.mouseDragged(null);
- }
- }
-}
-
diff --git a/environments/Momo/java/Momo/g4.eps b/environments/Momo/java/Momo/g4.eps
deleted file mode 100644
index 17f6bb30aa..0000000000
--- a/environments/Momo/java/Momo/g4.eps
+++ /dev/null
@@ -1,316 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%BoundingBox: 56.6929134 56.6929134 538.582677 785.19685
-% FILE: g4.eps
-
-% DEFAULT FONT:
-/Times-Roman findfont 24 scalefont setfont
-
-% DEFAULT COLOR:
-0 0 0 setrgbcolor
-
-% DEFAULT LINE:
-0.283464567 setlinewidth
-[1.41732283] 0 setdash
-
-% DEFINE PostScript Functions:
-/PATH
-{/POINT 0 def
- /X 0 def
- newpath
- {X 1 eq{POINT 0 eq{moveto
- /POINT 1 def
- }{lineto }ifelse
- /X 0 def
- }{/X X 1 add def}ifelse
- }forall
-} def
-/FILLPOLYGON{ PATH closepath fill }def
-/DRAWFILLPOLYGON{ PATH closepath gsave stroke grestore fill }def
-/DRAWPOLYGON{ PATH closepath stroke }def
-/DRAWPATH { PATH stroke } def
-/BOXPATH
-{/X 0 def
- {X 0 eq{/LLX exch def}if
- X 1 eq{/LLY exch def}if
- X 2 eq{/URX exch def}if
- X 3 eq{/URY exch def}if
- /X X 1 add def
- }forall
- LLX LLY moveto
- URX LLY lineto
- URX URY lineto
- LLX URY lineto
- closepath
-}def
-
-% CLIPPING:
-[56.6929134 56.6929134 538.582677 785.19685] BOXPATH clip
-
-% PARAMETERS:
-% Generated by Fukui Renderer DAWN version 3.29a-GL
-% O.x = 0
-% O.y = 0
-% O.z = 0
-% camera_d = 1558850
-% v_angle = 60
-% h_angle = 30
-% focal_d = 3458.17
-% e_2d = 1e-07
-% e_3d = 0.001
-
-0 0.25 0.25 setrgbcolor
-0 setlinewidth
-[] 0 setdash
-[ 363.165918 408.693432 256.427578 377.879528 252.86612 375.752036 359.604152 406.565893 ] DRAWFILLPOLYGON
-0 0.343791747 0.343791747 setrgbcolor
-[ 342.407747 466.135989 235.669053 435.324424 239.816417 435.422276 346.555396 466.233966 ] DRAWFILLPOLYGON
-0 0.356663203 0.356663203 setrgbcolor
-[ 346.555396 466.233966 239.816417 435.422276 244.267157 433.483565 351.00638 464.295449 ] DRAWFILLPOLYGON
-0 0.25 0.25 setrgbcolor
-[ 365.899023 412.705817 259.160374 381.891948 256.427578 377.879528 363.165918 408.693432 ] DRAWFILLPOLYGON
-0 0.362265738 0.362265738 setrgbcolor
-[ 351.00638 464.295449 244.267157 433.483565 248.717958 429.640389 355.457366 460.452524 ] DRAWFILLPOLYGON
-0 0.25 0.25 setrgbcolor
-[ 367.617199 418.329626 260.878259 387.51587 259.160374 381.891948 365.899023 412.705817 ] DRAWFILLPOLYGON
-0 0.256866467 0.256866467 setrgbcolor
-[ 368.203339 425.181607 261.464149 394.368036 260.878259 387.51587 367.617199 418.329626 ] DRAWFILLPOLYGON
-0 0.360217548 0.360217548 setrgbcolor
-[ 355.457366 460.452524 248.717958 429.640389 252.865496 424.154646 359.605017 454.967071 ] DRAWFILLPOLYGON
-0 0.285689009 0.285689009 setrgbcolor
-[ 367.617491 432.794801 260.878106 401.981473 261.464149 394.368036 368.203339 425.181607 ] DRAWFILLPOLYGON
-0 0.350658214 0.350658214 setrgbcolor
-[ 359.605017 454.967071 252.865496 424.154646 256.427108 417.400182 363.166664 448.212916 ] DRAWFILLPOLYGON
-0 0.737185032 0.737185032 setrgbcolor
-[ 260.878259 387.51587 261.464149 394.368036 260.878106 401.981473 259.160064 409.837318 256.427108 417.400182 252.865496 424.154646 248.717958 429.640389 244.267157 433.483565 239.816417 435.422276 235.669053 435.324424 232.107697 433.196701 229.37504 429.184131 227.657293 423.560179 227.071504 416.708112 227.657584 409.094876 229.375589 401.23928 232.108444 393.676647 235.669918 386.922333 239.817317 381.436619 244.268017 377.593345 248.718719 375.654432 252.86612 375.752036 256.427578 377.879528 259.160374 381.891948 ] DRAWFILLPOLYGON
-0 0.33423919 0.33423919 setrgbcolor
-[ 363.166664 448.212916 256.427108 417.400182 259.160064 409.837318 365.899573 440.65036 ] DRAWFILLPOLYGON
-0 0.312079403 0.312079403 setrgbcolor
-[ 365.899573 440.65036 259.160064 409.837318 260.878106 401.981473 367.617491 432.794801 ] DRAWFILLPOLYGON
-0 0 0 setrgbcolor
-0.283464567 setlinewidth
-[ 256.427578 377.879528 252.86612 375.752036] DRAWPATH
-[ 252.86612 375.752036 359.604152 406.565893] DRAWPATH
-[ 359.604152 406.565893 363.165918 408.693432] DRAWPATH
-[ 342.407747 466.135989 235.669053 435.324424] DRAWPATH
-[ 235.669053 435.324424 239.816417 435.422276] DRAWPATH
-[ 346.555396 466.233966 342.407747 466.135989] DRAWPATH
-[ 239.816417 435.422276 244.267157 433.483565] DRAWPATH
-[ 351.00638 464.295449 346.555396 466.233966] DRAWPATH
-[ 259.160374 381.891948 256.427578 377.879528] DRAWPATH
-[ 363.165918 408.693432 365.899023 412.705817] DRAWPATH
-[ 244.267157 433.483565 248.717958 429.640389] DRAWPATH
-[ 355.457366 460.452524 351.00638 464.295449] DRAWPATH
-[ 260.878259 387.51587 259.160374 381.891948] DRAWPATH
-[ 365.899023 412.705817 367.617199 418.329626] DRAWPATH
-[ 261.464149 394.368036 260.878259 387.51587] DRAWPATH
-[ 367.617199 418.329626 368.203339 425.181607] DRAWPATH
-[ 248.717958 429.640389 252.865496 424.154646] DRAWPATH
-[ 359.605017 454.967071 355.457366 460.452524] DRAWPATH
-[ 260.878106 401.981473 261.464149 394.368036] DRAWPATH
-[ 368.203339 425.181607 367.617491 432.794801] DRAWPATH
-[ 252.865496 424.154646 256.427108 417.400182] DRAWPATH
-[ 363.166664 448.212916 359.605017 454.967071] DRAWPATH
-[ 260.878259 387.51587 261.464149 394.368036] DRAWPATH
-[ 261.464149 394.368036 260.878106 401.981473] DRAWPATH
-[ 260.878106 401.981473 259.160064 409.837318] DRAWPATH
-[ 259.160064 409.837318 256.427108 417.400182] DRAWPATH
-[ 256.427108 417.400182 252.865496 424.154646] DRAWPATH
-[ 252.865496 424.154646 248.717958 429.640389] DRAWPATH
-[ 248.717958 429.640389 244.267157 433.483565] DRAWPATH
-[ 244.267157 433.483565 239.816417 435.422276] DRAWPATH
-[ 239.816417 435.422276 235.669053 435.324424] DRAWPATH
-[ 235.669053 435.324424 232.107697 433.196701] DRAWPATH
-[ 232.107697 433.196701 229.37504 429.184131] DRAWPATH
-[ 229.37504 429.184131 227.657293 423.560179] DRAWPATH
-[ 227.657293 423.560179 227.071504 416.708112] DRAWPATH
-[ 227.071504 416.708112 227.657584 409.094876] DRAWPATH
-[ 227.657584 409.094876 229.375589 401.23928] DRAWPATH
-[ 229.375589 401.23928 232.108444 393.676647] DRAWPATH
-[ 232.108444 393.676647 235.669918 386.922333] DRAWPATH
-[ 235.669918 386.922333 239.817317 381.436619] DRAWPATH
-[ 239.817317 381.436619 244.268017 377.593345] DRAWPATH
-[ 244.268017 377.593345 248.718719 375.654432] DRAWPATH
-[ 248.718719 375.654432 252.86612 375.752036] DRAWPATH
-[ 252.86612 375.752036 256.427578 377.879528] DRAWPATH
-[ 256.427578 377.879528 259.160374 381.891948] DRAWPATH
-[ 259.160374 381.891948 260.878259 387.51587] DRAWPATH
-[ 256.427108 417.400182 259.160064 409.837318] DRAWPATH
-[ 365.899573 440.65036 363.166664 448.212916] DRAWPATH
-[ 259.160064 409.837318 260.878106 401.981473] DRAWPATH
-[ 367.617491 432.794801 365.899573 440.65036] DRAWPATH
-0 1 0 setrgbcolor
-[ 264.328583 443.597384 259.895233 643.551148] DRAWPATH
-[ 279.166803 383.472354 415.444902 99.051835] DRAWPATH
-[ 262.437441 443.05148 -24.086577 565.879451] DRAWPATH
-[ 229.117341 412.249044 64.3088635 153.960869] DRAWPATH
-[ 272.827096 446.050595 24.9274199 748.650859] DRAWPATH
-[ 258.466551 390.987192 258.466551 390.987192] DRAWPATH
-0 0 1 setrgbcolor
-[ 260.630197 389.493408 260.630197 389.493408] DRAWPATH
-1 0 0 setrgbcolor
-[ 193.862307 404.896273 229.443349 415.167457] DRAWPATH
-0 1 0 setrgbcolor
-[ 279.068678 383.677146 279.166803 383.472354] DRAWPATH
-1 0 0 setrgbcolor
-[ 229.443349 415.167457 229.443349 415.167457] DRAWPATH
-[ 231.38415 415.724252 231.413979 415.732659] DRAWPATH
-0 1 0 setrgbcolor
-[ 229.462547 415.154797 229.462547 415.154797] DRAWPATH
-[ 229.117341 412.249044 229.117341 412.249044] DRAWPATH
-[ 232.265397 419.631173 232.240701 419.678418] DRAWPATH
-1 0 0 setrgbcolor
-[ 232.265397 419.631173 232.242895 419.67184] DRAWPATH
-0 1 0 setrgbcolor
-[ 227.080395 416.812114 -88.0277439 381.44444] DRAWPATH
-[ 232.530793 433.449478 219.027456 833.512198] DRAWPATH
-[ 233.485721 405.157887 233.485721 405.157887] DRAWPATH
-[ 227.964937 424.567415 71.9497245 603.106657] DRAWPATH
-0 0 1 setrgbcolor
-[ 231.950035 416.688529 231.950035 416.688529] DRAWPATH
-0 1 0 setrgbcolor
-[ 229.414352 415.111112 229.414352 415.111112] DRAWPATH
-[ 228.56948 426.546707 159.16286 564.420323] DRAWPATH
-[ 235.10191 413.570282 235.10191 413.570282] DRAWPATH
-1 0 0 setrgbcolor
-[ 227.566556 422.498821 226.343667 423.088111] DRAWPATH
-[ 254.056151 409.73393 254.056151 409.73393] DRAWPATH
-0 1 0 setrgbcolor
-[ 229.432695 415.067496 229.432695 415.067496] DRAWPATH
-[ 229.397805 415.049856 229.397805 415.049856] DRAWPATH
-1 0 0 setrgbcolor
-[ 238.550244 417.264691 238.524123 417.290028] DRAWPATH
-0 1 0 setrgbcolor
-[ 229.541661 415.133287 229.541661 415.133287] DRAWPATH
-[ 229.443024 415.360964 229.443024 415.360964] DRAWPATH
-[ 229.557862 413.676111 229.557862 413.676111] DRAWPATH
-[ 229.474919 415.280559 229.474919 415.280559] DRAWPATH
-[ 243.206956 419.39126 243.200938 419.401456] DRAWPATH
-[ 229.833983 416.572518 229.833983 416.572518] DRAWPATH
-[ 243.510512 418.014941 243.537849 417.983114] DRAWPATH
-[ 229.277074 418.526291 229.277074 418.526291] DRAWPATH
-[ 229.362005 416.651469 229.362005 416.651469] DRAWPATH
-0 0 1 setrgbcolor
-[ 247.784449 420.679525 247.784449 420.679525] DRAWPATH
-1 0 0 setrgbcolor
-[ 248.338818 420.51525 248.329746 420.487606] DRAWPATH
-[ 247.940744 421.270645 247.953346 421.274654] DRAWPATH
-0 1 0 setrgbcolor
-[ 229.132734 415.202853 229.132734 415.202853] DRAWPATH
-[ 227.427963 416.932831 227.427963 416.932831] DRAWPATH
-[ 348.447035 448.404037 348.759509 448.787024] DRAWPATH
-1 0 0 setrgbcolor
-[ 249.017077 421.824763 249.017047 421.831449] DRAWPATH
-0 1 0 setrgbcolor
-[ 348.759509 448.787024 573.846362 724.658576] DRAWPATH
-0 0 1 setrgbcolor
-[ 249.518627 417.75022 249.518627 417.75022] DRAWPATH
-[ 249.498203 417.81173 249.518627 417.75022] DRAWPATH
-1 0 0 setrgbcolor
-[ 251.141383 419.74193 251.150158 419.698439] DRAWPATH
-0 1 0 setrgbcolor
-[ 228.972351 416.166003 228.972351 416.166003] DRAWPATH
-1 0 0 setrgbcolor
-[ 253.657471 422.652695 253.680414 422.657931] DRAWPATH
-[ 228.490117 416.908859 228.490117 416.908859] DRAWPATH
-[ 254.136266 420.756403 254.117884 420.752679] DRAWPATH
-0 1 0 setrgbcolor
-[ 231.435234 411.280743 231.435234 411.280743] DRAWPATH
-1 0 0 setrgbcolor
-[ 226.630692 421.821743 226.487144 422.856886] DRAWPATH
-[ 226.343667 423.088111 226.630692 421.821743] DRAWPATH
-[ 226.487144 422.856886 226.671553 423.064338] DRAWPATH
-[ 226.671553 423.064338 226.601259 422.859458] DRAWPATH
-[ 226.601259 422.859458 226.598915 422.884838] DRAWPATH
-[ 226.343667 423.088111 96.1632207 485.477746] DRAWPATH
-0 0 1 setrgbcolor
-[ 254.087015 418.842954 254.087015 418.842954] DRAWPATH
-0 1 0 setrgbcolor
-[ 228.854869 403.620282 -79.9841558 192.435383] DRAWPATH
-1 0 0 setrgbcolor
-[ 255.774357 419.827002 255.782155 419.830599] DRAWPATH
-0 1 0 setrgbcolor
-[ 227.962616 424.559816 -64.1673552 510.023397] DRAWPATH
-0 0 1 setrgbcolor
-[ 258.978899 423.615132 258.978899 423.615132] DRAWPATH
-[ 260.253232 421.981488 260.253232 421.981488] DRAWPATH
-1 0 0 setrgbcolor
-[ 264.779562 427.715258 264.777309 427.715654] DRAWPATH
-[ 266.93389 428.488954 267.016701 428.51101] DRAWPATH
-0 0 1 setrgbcolor
-[ 272.197483 428.099623 272.197483 428.099623] DRAWPATH
-[ 266.454545 424.031458 266.454545 424.031458] DRAWPATH
-0 1 0 setrgbcolor
-[ 278.22765 447.609537 476.061991 811.345174] DRAWPATH
-[ 230.689664 431.114494 -84.0170457 483.276715] DRAWPATH
-0 0 1 setrgbcolor
-[ 289.495085 432.665363 289.495085 432.665363] DRAWPATH
-0 1 0 setrgbcolor
-[ 360.567866 453.141165 501.779623 494.053404] DRAWPATH
-[ 274.81961 382.089718 281.507704 278.709227] DRAWPATH
-0 0 1 setrgbcolor
-[ 283.267243 433.30677 283.267243 433.30677] DRAWPATH
-0 1 0 setrgbcolor
-[ 352.646892 462.879051 523.597944 535.650842] DRAWPATH
-[ 294.629734 452.34422 426.845285 796.63278] DRAWPATH
-[ 272.832964 446.052288 70.2896649 608.782654] DRAWPATH
-[ 365.624887 441.410478 520.031697 460.512511] DRAWPATH
-0 0 1 setrgbcolor
-[ 293.898461 435.639168 293.898461 435.639168] DRAWPATH
-0 1 0 setrgbcolor
-[ 294.741327 452.376433 279.243037 807.586243] DRAWPATH
-[ 367.683413 431.938129 529.254118 435.985576] DRAWPATH
-[ 321.863328 460.205565 366.946012 499.352072] DRAWPATH
-[ 323.720815 460.741754 514.68594 621.48418] DRAWPATH
-0 0 1 setrgbcolor
-[ 303.642892 437.467347 303.642892 437.467347] DRAWPATH
-0 1 0 setrgbcolor
-[ 353.092179 462.494596 482.719741 525.752758] DRAWPATH
-0 0 1 setrgbcolor
-[ 318.759707 423.56244 318.759707 423.56244] DRAWPATH
-1 0 0 setrgbcolor
-[ 315.180079 458.276355 432.087389 682.733455] DRAWPATH
-0 1 0 setrgbcolor
-[ 315.088226 458.24984 440.26874 700.16838] DRAWPATH
-[ 351.0125 464.290165 530.525426 549.181302] DRAWPATH
-[ 364.889743 443.44478 525.442294 476.360298] DRAWPATH
-[ 319.695546 459.579805 480.094269 734.889045] DRAWPATH
-[ 350.758764 464.403292 543.776363 545.188437] DRAWPATH
-[ 296.626665 452.920661 286.817084 474.067408] DRAWPATH
-0 0 1 setrgbcolor
-[ 228.962805 403.12674 219.945446 394.483225] DRAWPATH
-1 0 0 setrgbcolor
-[ 235.976065 411.704248 236.002186 411.724193] DRAWPATH
-0 1 0 setrgbcolor
-[ 305.170023 390.85148 215.516274 196.797811] DRAWPATH
-[ 360.386023 453.486004 571.67512 510.756953] DRAWPATH
-[ 360.849831 452.606459 500.88611 527.200735] DRAWPATH
-0 0 1 setrgbcolor
-[ 219.945446 394.483225 103.734142 273.199056] DRAWPATH
-1 0 0 setrgbcolor
-[ 219.945446 394.483225 223.109363 392.98258] DRAWPATH
-[ 223.109363 392.98258 224.012389 390.623768] DRAWPATH
-[ 224.012389 390.623768 225.260273 389.63598] DRAWPATH
-[ 225.260273 389.63598 226.112176 386.927522] DRAWPATH
-[ 226.112176 386.927522 227.008066 385.971662] DRAWPATH
-[ 228.860937 380.110527 228.379431 378.702407] DRAWPATH
-[ 230.704864 380.981206 228.860937 380.110527] DRAWPATH
-[ 227.008066 385.971662 229.219277 384.992072] DRAWPATH
-[ 226.244777 379.24149 226.429013 378.94604] DRAWPATH
-[ 226.925635 379.459864 226.244777 379.24149] DRAWPATH
-[ 226.429013 378.94604 226.446446 378.904656] DRAWPATH
-[ 227.879853 379.54638 226.925635 379.459864] DRAWPATH
-[ 228.379431 378.702407 227.879853 379.54638] DRAWPATH
-[ 229.219277 384.992072 229.965354 384.227034] DRAWPATH
-[ 230.428695 382.924359 230.704864 380.981206] DRAWPATH
-[ 229.965354 384.227034 230.428695 382.924359] DRAWPATH
-[ 103.734142 273.199056 102.894987 274.236229] DRAWPATH
-0 0 1 setrgbcolor
-[ 103.734142 273.199056 26.9973037 206.282819] DRAWPATH
-1 0 0 setrgbcolor
-[ 102.894987 274.236229 102.51116 273.516345] DRAWPATH
-[ 102.560512 272.763499 102.923606 272.873917] DRAWPATH
-[ 102.923606 272.873917 103.206417 273.058928] DRAWPATH
-[ 103.206417 273.058928 103.131555 273.311725] DRAWPATH
-[ 103.131555 273.311725 103.132598 273.316082] DRAWPATH
-[ 102.51116 273.516345 102.026106 273.051121] DRAWPATH
-[ 102.026106 273.051121 102.560512 272.763499] DRAWPATH
diff --git a/environments/Momo/java/Momo/gag.class b/environments/Momo/java/Momo/gag.class
deleted file mode 100644
index db91d5c7cc..0000000000
Binary files a/environments/Momo/java/Momo/gag.class and /dev/null differ
diff --git a/environments/Momo/java/Momo/gag.java b/environments/Momo/java/Momo/gag.java
deleted file mode 100644
index faee532326..0000000000
--- a/environments/Momo/java/Momo/gag.java
+++ /dev/null
@@ -1,15 +0,0 @@
-// GAG (Geant4 Adaptive GUI)
-// Requires : JDK 1.1.3 (or later) + swing-1.0.2
-// Version : alpha 1998/Mar/30
-// GEANT4 GUI Group Toshiaki Kodama
-// 1998 July 6 GEANT4 Beta-01
-
-import GAG.GAG;
-
-public class gag {
- public static void main(String args[]){
- GAG gag = new GAG();
- gag.mainLoop(args);
- System.exit(0);
- }
-}
diff --git a/environments/Momo/java/README.JAVAGAG b/environments/Momo/java/README.JAVAGAG
deleted file mode 100644
index 2c8701a48a..0000000000
--- a/environments/Momo/java/README.JAVAGAG
+++ /dev/null
@@ -1,51 +0,0 @@
-README to use Java version of GAG.
-
-July 6 1998
-
-See the README_Momo.html to install Momo/GAG.
-
-The current Java GAG is implemented with Swing (Java Foundation Class)
-version 1.0.2.
-This README explains only the different point due to Swing-1.0.2.
-
-(Swing1.x will be included as a standard in the JDK1.2. At present
- under JDK1.1.x, however, Swing1.0 is provided as a separate kit.)
-
-You get the Swing1.0.2 jar file from http://java.sun.com.
-After defreezing(gunzip) the tar file, you put only "swingall.jar" file
-in your appropriate directory and set the CLASSPATH like;
-
- %setenv CLASSPATH .:$HOME/swing1.0/swingall.jar:$HOME/Momo/java/Momo/GAG.jar
-
-
-Then you can invoke Java GAG directly by typing
-
- %java gag
-
-
-You may see some warnings but they are the bugs in Java and
-may cause no harm to execute GEANT binaries.
-
-
-NOTICE!!
-
- Java GAG has been tested on JDK1.1.3 (Linux version) + Swing-1.0.2.
-We had problem on JDK1.1.5 for Linux. If you have installed JDK1.1.5,
-try
- %java -debug gag
-
-
- We have also tested on Solaris, with JDK-1.1.6 + Swing-1.0.2.
-It works.
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/environments/Momo/knownBugs_todoList b/environments/Momo/knownBugs_todoList
deleted file mode 100644
index b6002f1a39..0000000000
--- a/environments/Momo/knownBugs_todoList
+++ /dev/null
@@ -1,33 +0,0 @@
- knownBugs and To do list
-
- Hajime YOSHIDA
-----------------------------------------------------------------------
-
-
-December 4 1998
-- The problems below are solved.
- - GAG (Java, Tcl/Tk) are protected against G4 binary with G4UIsession
- - GAG has a simple interface to cin (@@Ask protocol).
- More sophisticated interactivity will be added, if required.
-July 22 1998
-- to accept GEANT4 executables which have been compiled with G4UIsession
- session instance. (batch and G4UIGAG sessions are OK)
-- to handle GEANT4's "cin" during its execution in a "canonical" way.
- Currently it is accepted bu @@Ask protocol, in exampleN02.
-- better treatment of path of macro files, specially in case of
- nested macro files
-- slowness of JAVA GAG
-- adaptation to the coming JDK1.2
-
-Apr 15, 98
-- With the current UI scheme, when two condition described below holds
- for some parameter, then the current value is used instead of the
- default value.
- (i) the currentAsDefault flag is set for a parameter
- (ii) a default value is not given for that parameter
- On the other hand, GAG is designed to display the default value
- when the "parameter input window" is displayed for the first time.
- The small bug described here is that GAG does not handle
- the special case of CurrentAsDefault described above.
- This bug will be fixed before the next tag.
-
diff --git a/environments/Momo/tcltk/.Momo b/environments/Momo/tcltk/.Momo
deleted file mode 100644
index c0fec64e2a..0000000000
--- a/environments/Momo/tcltk/.Momo
+++ /dev/null
@@ -1,4 +0,0 @@
-GUI_STYLE horizontal
-GUI_POSITION left
-FORE_GROUND_COLOR #000000000
-BACK_GROUND_COLOR #d90d90d90
diff --git a/environments/Momo/tcltk/.Momoext b/environments/Momo/tcltk/.Momoext
deleted file mode 100644
index 4ea0eb088b..0000000000
--- a/environments/Momo/tcltk/.Momoext
+++ /dev/null
@@ -1,26 +0,0 @@
-#Momo Plug-in example
-# An example of Momo/Tcl Plug-in
-#1998 July 20 H Yoshida
-
-# A line starting with # is a comment line.
-# An empty line is ignored.
-# Momoseparator is a separation line between menu items.
-# Any Unix X-window applications can be invoked by describing
-# the command name and associated arguments.
-# See the example below.
-# Commands are executed in the background.
-# But & is not necessary at the end of a line.
-
-#java GGE
-#java gag
-
-xclock
-
-Momoseparator
-xterm
-
-Momoseparator
-netscape
-
-
-
diff --git a/environments/Momo/tcltk/.Momorc b/environments/Momo/tcltk/.Momorc
deleted file mode 100644
index b193e187ce..0000000000
--- a/environments/Momo/tcltk/.Momorc
+++ /dev/null
@@ -1,5 +0,0 @@
-FONT -adobe-times-bold-r-normal--14-140-75-75-p-77-iso8859-1
-GUI_STYLE horizontal
-GUI_POSITION left
-FORE_GROUND_COLOR #000000000
-BACK_GROUND_COLOR #947fffc28
diff --git a/environments/Momo/tcltk/DefineColor.proc b/environments/Momo/tcltk/DefineColor.proc
deleted file mode 100644
index dfa495211d..0000000000
--- a/environments/Momo/tcltk/DefineColor.proc
+++ /dev/null
@@ -1,382 +0,0 @@
-## DefineColor
-## (Momo procedure)
-# Define foreground and background Color of all widgets
-##
-## k.ohtubo(Tubocky)
-##
-## 1997.3.16
-## Tcl/Tk version 8.0
-## 1998 July 5 GEANT4 Beta-01
-
-proc Define_Color {} {
- global env FC FR FG FB BC BR BG BB
-
- if {![info exists FC]} {
- if {[lsearch [array name env] FORE_GROUND_COLOR] >= 0} {
- set FC $env(FORE_GROUND_COLOR)
- Reset_Color F
- }
- }
-
- if {![info exists BC]} {
- if {[lsearch [array name env] BACK_GROUND_COLOR] >= 0} {
- set BC $env(BACK_GROUND_COLOR)
- Reset_Color B
- }
- }
-
- if [winfo exists .dc] {
- raise .dc
- return
- }
-
- toplevel .dc -highlightthickness 0
- wm title .dc "Define Colors"
-
- frame .dc.butt -highlightthickness 0
- pack .dc.butt -side top -fill x
-
- button .dc.butt.change -text "Change Color" -bd 3 \
- -highlightthickness 0 \
- -command {
- Change_Color $FC $BC .
- set env(FORE_GROUND_COLOR) $FC
- set env(BACK_GROUND_COLOR) $BC
- if [winfo exists .cf] {
- Change_Color $FC $BC .cf
- }
- if [winfo exists .se] {
- Change_Color $FC $BC .se
- Put_Env
- }
- Make_Color .dc.fg.main.color
- Make_Color .dc.bg.main.color
- }
- pack .dc.butt.change -side left
-
- button .dc.butt.default -text Default -bd 3 -highlightthickness 0 \
- -command {
- set FR 0
- set FG 0
- set FB 0
- Make_Color .dc.fg.main.color
- set BR 0.848
- set BG 0.848
- set BB 0.848
- Make_Color .dc.bg.main.color
- }
- pack .dc.butt.default -side left
-
- button .dc.butt.cancel -text Cancel -bd 3 -highlightthickness 0 \
- -command {
- destroy .dc
- }
- pack .dc.butt.cancel -side left
-
- frame .dc.space -height 10 -highlightthickness 0
- pack .dc.space -side top
-
-
- frame .dc.fg -highlightthickness 0
- pack .dc.fg -side top -fill both
-
-
- frame .dc.fg.input -relief raised -bd 1 -highlightthickness 0
- pack .dc.fg.input -side top -fill x
-
- label .dc.fg.input.label -text Foreground: -highlightthickness 0
- pack .dc.fg.input.label -side left
-
- entry .dc.fg.input.ent -textvariable FC -state disabled -relief flat \
- -highlightthickness 0
- pack .dc.fg.input.ent -side left -fill x -expand 1
-
-
- frame .dc.fg.main -relief raised -bd 1 -highlightthickness 0
- pack .dc.fg.main -side top -fill x
-
-
- frame .dc.fg.main.color -relief sunken -bd 1 -width 70 -height 40 \
- -highlightthickness 0
- pack .dc.fg.main.color -side left -padx 20 -pady 10
-
-
- frame .dc.fg.main.scale -highlightthickness 0
- pack .dc.fg.main.scale -side left -fill x -expand 1
-
-
- frame .dc.fg.main.scale.r -highlightthickness 0
- pack .dc.fg.main.scale.r -side top -fill x -expand 1
-
- label .dc.fg.main.scale.r.label -text R -anchor w \
- -highlightthickness 0
- pack .dc.fg.main.scale.r.label -side left
-
- entry .dc.fg.main.scale.r.ent -width 5 -relief flat \
- -textvariable FR -highlightthickness 0
- pack .dc.fg.main.scale.r.ent -side left
-
- scale .dc.fg.main.scale.r.scale -from 0 -to 1 -resolution 0.01 \
- -variable FR -orient horizontal -showvalue false \
- -activebackground #fff000000 -troughcolor #bcd000000 \
- -command {Make_Color .dc.fg.main.color} \
- -highlightthickness 0
- pack .dc.fg.main.scale.r.scale -side left -fill x -expand 1
-
-
- frame .dc.fg.main.scale.g -highlightthickness 0
- pack .dc.fg.main.scale.g -side top -fill x -expand 1
-
- label .dc.fg.main.scale.g.label -text G -anchor w \
- -highlightthickness 0
- pack .dc.fg.main.scale.g.label -side left
-
- entry .dc.fg.main.scale.g.ent -width 5 -relief flat \
- -textvariable FG -highlightthickness 0
- pack .dc.fg.main.scale.g.ent -side left
-
- scale .dc.fg.main.scale.g.scale -from 0 -to 1 -resolution 0.01 \
- -variable FG -orient horizontal -showvalue false \
- -activebackground #000fff000 -troughcolor #000bcd000 \
- -command {Make_Color .dc.fg.main.color} \
- -highlightthickness 0
- pack .dc.fg.main.scale.g.scale -side left -fill x -expand 1
-
-
- frame .dc.fg.main.scale.b -highlightthickness 0
- pack .dc.fg.main.scale.b -side top -fill x -expand 1
-
- label .dc.fg.main.scale.b.label -text B -anchor w \
- -highlightthickness 0
- pack .dc.fg.main.scale.b.label -side left
-
- entry .dc.fg.main.scale.b.ent -width 5 -relief flat \
- -textvariable FB -highlightthickness 0
- pack .dc.fg.main.scale.b.ent -side left
-
- scale .dc.fg.main.scale.b.scale -from 0 -to 1 -resolution 0.01 \
- -variable FB -orient horizontal -showvalue false \
- -activebackground #000000fff -troughcolor #000000bcd \
- -command {Make_Color .dc.fg.main.color} \
- -highlightthickness 0
- pack .dc.fg.main.scale.b.scale -side left -fill x -expand 1
-
-
- frame .dc.between -height 10 -highlightthickness 0
- pack .dc.between -side top -fill x
-
-
- frame .dc.bg -highlightthickness 0
- pack .dc.bg -side top -fill both
-
-
- frame .dc.bg.input -relief raised -bd 1 -highlightthickness 0
- pack .dc.bg.input -side top -fill x
-
- label .dc.bg.input.label -text Background: -highlightthickness 0
- pack .dc.bg.input.label -side left
-
- entry .dc.bg.input.ent -textvariable BC -state disabled \
- -relief flat -highlightthickness 0
- pack .dc.bg.input.ent -side left -fill x -expand 1
-
-
- frame .dc.bg.main -relief raised -bd 1 -highlightthickness 0
- pack .dc.bg.main -side top -fill x
-
-
- frame .dc.bg.main.color -relief sunken -bd 1 -width 70 -height 40 \
- -highlightthickness 0
- pack .dc.bg.main.color -side left -padx 20 -pady 10
-
-
- frame .dc.bg.main.scale -highlightthickness 0
- pack .dc.bg.main.scale -side left -fill x -expand 1
-
-
- frame .dc.bg.main.scale.r -highlightthickness 0
- pack .dc.bg.main.scale.r -side top -fill x -expand 1
-
- label .dc.bg.main.scale.r.label -text R -anchor w \
- -highlightthickness 0
- pack .dc.bg.main.scale.r.label -side left
-
- entry .dc.bg.main.scale.r.ent -width 5 -relief flat \
- -textvariable BR -highlightthickness 0
- pack .dc.bg.main.scale.r.ent -side left
-
- scale .dc.bg.main.scale.r.scale -from 0 -to 1 -resolution 0.01 \
- -variable BR -orient horizontal -showvalue false \
- -activebackground #fff000000 -troughcolor #bcd000000 \
- -command {Make_Color .dc.bg.main.color} \
- -highlightthickness 0
- pack .dc.bg.main.scale.r.scale -side left -fill x -expand 1
-
-
- frame .dc.bg.main.scale.g -highlightthickness 0
- pack .dc.bg.main.scale.g -side top -fill x -expand 1
-
- label .dc.bg.main.scale.g.label -text G -anchor w \
- -highlightthickness 0
- pack .dc.bg.main.scale.g.label -side left
-
- entry .dc.bg.main.scale.g.ent -width 5 -relief flat \
- -textvariable BG -highlightthickness 0
- pack .dc.bg.main.scale.g.ent -side left
-
- scale .dc.bg.main.scale.g.scale -from 0 -to 1 -resolution 0.01 \
- -variable BG -orient horizontal -showvalue false \
- -activebackground #000fff000 -troughcolor #000bcd000 \
- -command {Make_Color .dc.bg.main.color} \
- -highlightthickness 0
- pack .dc.bg.main.scale.g.scale -side left -fill x -expand 1
-
-
- frame .dc.bg.main.scale.b -highlightthickness 0
- pack .dc.bg.main.scale.b -side top -fill x -expand 1
-
- label .dc.bg.main.scale.b.label -text B -anchor w \
- -highlightthickness 0
- pack .dc.bg.main.scale.b.label -side left
-
- entry .dc.bg.main.scale.b.ent -width 5 -relief flat \
- -textvariable BB -highlightthickness 0
- pack .dc.bg.main.scale.b.ent -side left
-
- scale .dc.bg.main.scale.b.scale -from 0 -to 1 -resolution 0.01 \
- -variable BB -orient horizontal -showvalue false \
- -activebackground #000000fff -troughcolor #000000bcd \
- -command {Make_Color .dc.bg.main.color} \
- -highlightthickness 0
- pack .dc.bg.main.scale.b.scale -side left -fill x -expand 1
-
-
-# Binding
- foreach BIND {Return Tab Down Control-n} {
- bind .dc.fg.main.scale.r.ent <$BIND> {
- focus .dc.fg.main.scale.g.ent
- }
- bind .dc.fg.main.scale.g.ent <$BIND> {
- focus .dc.fg.main.scale.b.ent
- }
- bind .dc.fg.main.scale.b.ent <$BIND> {
- focus .dc.bg.main.scale.r.ent
- }
-
- bind .dc.bg.main.scale.r.ent <$BIND> {
- focus .dc.bg.main.scale.g.ent
- }
- bind .dc.bg.main.scale.g.ent <$BIND> {
- focus .dc.bg.main.scale.b.ent
- }
- bind .dc.bg.main.scale.b.ent <$BIND> {
- focus .dc.fg.main.scale.r.ent
- }
- }
-
- foreach BIND {Shift-Tab Up Control-p} {
- bind .dc.fg.main.scale.r.ent <$BIND> {
- focus .dc.bg.main.scale.b.ent
- }
- bind .dc.fg.main.scale.g.ent <$BIND> {
- focus .dc.fg.main.scale.r.ent
- }
- bind .dc.fg.main.scale.b.ent <$BIND> {
- focus .dc.fg.main.scale.g.ent
- }
-
- bind .dc.bg.main.scale.r.ent <$BIND> {
- focus .dc.fg.main.scale.b.ent
- }
- bind .dc.bg.main.scale.g.ent <$BIND> {
- focus .dc.bg.main.scale.r.ent
- }
- bind .dc.bg.main.scale.b.ent <$BIND> {
- focus .dc.bg.main.scale.g.ent
- }
- }
- if {[lsearch [array names env] FONT] >= 0} {
- Change_Font $env(FONT) .dc
- }
- Change_Color $env(FORE_GROUND_COLOR) $env(BACK_GROUND_COLOR) .dc
- Win_Size .dc
- wm resizable .dc 1 0
- Tab_off
- Control
-}
-
-# Make Color (RGB)
-proc Make_Color {w args} {
- switch $w {
- .dc.fg.main.color {
- global FC FR FG FB
- regexp {^[0-9]+} [expr $FR * 4095] red
- regexp {^[0-9]+} [expr $FG * 4095] green
- regexp {^[0-9]+} [expr $FB * 4095] blue
- set FC [format #%03x%03x%03x $red $green $blue]
- $w configure -bg $FC
- }
- .dc.bg.main.color {
- global BC BR BG BB
- regexp {^[0-9]+} [expr $BR * 4095] red
- regexp {^[0-9]+} [expr $BG * 4095] green
- regexp {^[0-9]+} [expr $BB * 4095] blue
- set BC [format #%03x%03x%03x $red $green $blue]
- $w configure -bg $BC
- }
- }
-}
-
-# Set Color(FG BG) value in environment variable
-proc Set_Color {} {
- global env FC BC
-
- set env(FORE_GROUND_COLOR) $FC
- set env(BACK_GROUND_COLOR) $BC
-}
-
-# Reset Color default value
-proc Reset_Color SWITCH {
- global FC FR FG FB BC BR BG BB
-
- switch $SWITCH {
- F {
- switch [string length $FC] {
- 4 { scan $FC #%01x%01x%01x red green blue
- set FR [expr [format %f $red] / 4095.0]
- set FG [expr [format %f $green] / 4095.0]
- set FB [expr [format %f $blue] / 4095.0]
- }
- 7 { scan $FC #%02x%02x%02x red green blue
- set FR [expr [format %f $red] / 4095.0]
- set FG [expr [format %f $green] / 4095.0]
- set FB [expr [format %f $blue] / 4095.0]
- }
- 10 { scan $FC #%03x%03x%03x red green blue
- set FR [expr [format %f $red] / 4095.0]
- set FG [expr [format %f $green] / 4095.0]
- set FB [expr [format %f $blue] / 4095.0]
- }
- }
- }
- B {
- switch [string length $BC] {
- 4 { scan $BC #%01x%01x%01x red green blue
- set BR [expr [format %f $red] / 4095.0]
- set BG [expr [format %f $green] / 4095.0]
- set BB [expr [format %f $blue] / 4095.0]
- }
- 7 { scan $BC #%02x%02x%02x red green blue
- set BR [expr [format %f $red] / 4095.0]
- set BG [expr [format %f $green] / 4095.0]
- set BB [expr [format %f $blue] / 4095.0]
- }
- 10 { scan $BC #%03x%03x%03x red green blue
- set BR [expr [format %f $red] / 4095.0]
- set BG [expr [format %f $green] / 4095.0]
- set BB [expr [format %f $blue] / 4095.0]
- }
- }
- }
- }
-}
diff --git a/environments/Momo/tcltk/FBmain.proc b/environments/Momo/tcltk/FBmain.proc
deleted file mode 100644
index e06ac0a57f..0000000000
--- a/environments/Momo/tcltk/FBmain.proc
+++ /dev/null
@@ -1,149 +0,0 @@
-## FBmain.proc
-## (Momo procedure)
-# File Browser main
-## assumes MOMOPATH/tcltk/Momo/FBtext directories
-# uses FBtext procs for file browser
-
-##
-## k.ohtubo(Tubocky)
-##
-## 1998.3.16
-## Tcl/Tk version 8.0
-## 1998 July 5 GEANT4 Beta-01
-
-proc FBmain {} {
- global env FONT F_COLOR B_COLOR WISH HOME
-
- if [winfo exists .fbm] {
- raise .fbm
- focus .fbm.name.ent
- return
- }
-
- if {[lsearch [array name env] FONT] >= 0} {
- set FONT $env(FONT)
- } else {
- set FONT ""
- }
- if {[lsearch [array name env] FORE_GROUND_COLOR] >= 0} {
- set F_COLOR $env(FORE_GROUND_COLOR)
- } else {
- set F_COLOR #000000000
- }
- if {[lsearch [array names env] BACK_GROUND_COLOR] >= 0} {
- set B_COLOR $env(BACK_GROUND_COLOR)
- } else {
- set B_COLOR #d90d90d90
- }
-
- toplevel .fbm -highlightthickness 0
-
- frame .fbm.butt -highlightthickness 0
- pack .fbm.butt -side top -fill x
-
- menubutton .fbm.butt.b0 -text Function -bd 3 -menu .fbm.butt.b0.func \
- -relief raised -highlightthickness 0
- pack .fbm.butt.b0 -side left -fill y
-
- menu .fbm.butt.b0.func -tearoff 0
- .fbm.butt.b0.func add command -label Clear -command {
- .fbm.select.list see 0
- .fbm.select.list selection clear 0 end
- focus .fbm.name.ent
- .fbm.name.ent delete 0 end
- set END [string length $env(HOME)]
- set Path ~[string range $env(G_PATH) $END end]
- .fbm.info.label1 configure -text $Path
- Put_File_List .fbm
- }
- .fbm.butt.b0.func add separator
- .fbm.butt.b0.func add command -label "Close File Browser" -command {destroy .fbm}
-
-
- frame .fbm.info -highlightthickness 0
- pack .fbm.info -side top -fill x
-
- label .fbm.info.label0 -text Directory: -anchor w -highlightthickness 0
- pack .fbm.info.label0 -side left
-
- set END [string length $env(HOME)]
- set Path ~[string range $env(G_PATH) $END end]
- label .fbm.info.label1 -text $Path -anchor w -highlightthickness 0
- pack .fbm.info.label1 -side left -fill x -expand 1
-
-
- frame .fbm.name -highlightthickness 0
- pack .fbm.name -side top -fill x
-
- label .fbm.name.label -text "File Name" -anchor w -highlightthickness 0
- pack .fbm.name.label -side left
-
- entry .fbm.name.ent -highlightthickness 0
- pack .fbm.name.ent -side left -fill x -expand 1
-
-
- frame .fbm.select -highlightthickness 0
- pack .fbm.select -side top -fill both
-
- listbox .fbm.select.list -width 20 -height 20 \
- -yscrollcommand ".fbm.select.scroll set" -highlightthickness 0
- pack .fbm.select.list -side left -fill both -expand 1
-
- scrollbar .fbm.select.scroll -command ".fbm.select.list yview" \
- -highlightthickness 0
- pack .fbm.select.scroll -side left -fill y
-
-
-## Binding
-
- bind .fbm.select.list {
- .fbm.name.ent delete 0 end
- .fbm.name.ent insert end [selection get]
-
- set NAME [.fbm.name.ent get]
- if [file isdirectory $env(G_PATH)/$NAME] {
- Change_Path $NAME
- set END [string length $env(HOME)]
- set Path ~[string range $env(G_PATH) $END end]
- .fbm.info.label1 configure -text $Path
- .fbm.butt.b0.func invoke 1
- Put_File_List .fbm
- }
- }
- bind .fbm.select.list {
- set NAME [.fbm.name.ent get]
- if {$NAME != ""} {
- if [file executable $env(G_PATH)/$NAME] {
- Message_Skeleton -icon warning -button O.K. \
- -message "Warning!\nCannot open."
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {destroy .msgskeleton}
- } elseif [file isfile $env(G_PATH)/$NAME] {
- set env(FB_Open_File_Name) $env(G_PATH)/$NAME
- exec $WISH $HOME/FBtext/FBtext.tcl &
- }
- }
- }
-
- focus .fbm.name.ent
-
- Put_File_List .fbm
-
-
- wm title .fbm "File Browser"
- if {$FONT != ""} {
- Change_Font $FONT .fbm
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .fbm
- }
- Win_Size .fbm
- Tab_off
- Del_Bind
- Control
-}
diff --git a/environments/Momo/tcltk/FBtext/FBclear.proc b/environments/Momo/tcltk/FBtext/FBclear.proc
deleted file mode 100644
index 4ecc8a084d..0000000000
--- a/environments/Momo/tcltk/FBtext/FBclear.proc
+++ /dev/null
@@ -1,61 +0,0 @@
-## FBclear
-## (FBtext procedure)
-# Clear Log
-
-##
-## k.ohtubo(Tubocky)
-##
-## 1997.11.10
-## Tcl/Tk version 8.0
-## 1998 July 5 GEANT4 Beta-01
-##
-
-proc Clear_Log {} {
- global FONT F_COLOR B_COLOR
- if {![winfo exists .fbt.text]} {
- Message_Skeleton -icon warning -button O.K. \
- -message "Warning!\nWhat's happen?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {destroy .msgskeleton}
- return
- }
-
- set RANGE [.fbt.text tag range sel]
- if {$RANGE == ""} {
- Message_Skeleton -icon question -button {Yes No} \
- -message "Check!\nClear all?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {
- destroy .msgskeleton
- .fbt.text delete 1.0 end
- }
- .msgskeleton.butt.1 configure -command {destroy .msgskeleton}
- return
- } else {
- Message_Skeleton -icon question -button {Yes No} \
- -message "Check!\nClear marked part?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {
- destroy .msgskeleton
- .fbt.text tag remove sel 1.0 end
- eval .fbt.text delete $RANGE
- }
- .msgskeleton.butt.1 configure -command {destroy .msgskeleton}
- return
- }
-}
diff --git a/environments/Momo/tcltk/FBtext/FBsavelog.proc b/environments/Momo/tcltk/FBtext/FBsavelog.proc
deleted file mode 100644
index 4cc7885cd4..0000000000
--- a/environments/Momo/tcltk/FBtext/FBsavelog.proc
+++ /dev/null
@@ -1,287 +0,0 @@
-## GAGsavelog
-## (FBtext procedure)
-# check Before Save
-
-##
-## k.ohtubo(Tubocky)
-##
-## 1998.3.16
-## Tcl/Tk version 8.0
-# 1998 July 5 GEANT4 Beta-01
-## Procedures
-
-proc Before_Save {} {
- global SAVE_RANGE FONT F_COLOR B_COLOR
-
- if {![winfo exists .fbt.text]} {
- Message_Skeleton -icon warning -button O.K. \
- -message "Warning!\nWhat's happen?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {destroy .msgskeleton}
- return
- }
-
- if {[.fbt.text tag range SEARCH_ALL_TAG] != ""} {
- Message_Skeleton -icon question -button {O.K. Cancel} \
- -message "Save only searched strings."
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {
- destroy .msgskeleton
- set SAVE_RANGE [.fbt.text tag range SEARCH_ALL_TAG]
- Save_Window
- }
- .msgskeleton.butt.1 configure -command {destroy .msgskeleton}
- } elseif {[.fbt.text tag range sel] != ""} {
- Message_Skeleton -icon question -button {O.K. Cancel} \
- -message "Save only marked part."
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {
- destroy .msgskeleton
- set SAVE_RANGE [.fbt.text tag range sel]
- Save_Window
- }
- .msgskeleton.butt.1 configure -command {destroy .msgskeleton}
- } else {
- set SAVE_RANGE [list 0.0 [.fbt.text index end]]
- Save_Window
- }
-}
-
-# make Save window
-proc Save_Window {} {
- if [winfo exists .sl] {
- raise .sl
- focus .sl.name.ent
- return
- }
-
- global FONT F_COLOR B_COLOR errorCode errorInfo env
-
- set DIR $env(G_PATH)
- File_List_Skeleton .sl
-
- .sl.butt.b0 configure -text "Save Text" -command {
- set Name [.sl.name.ent get]
- if {$Name != ""} {
- if [file isdirectory $env(G_PATH)/$Name] {
- cd $Name
- set END [string length $env(HOME)]
- set PATH ~[string range $env(G_PATH) $END end]
- .sl.info.label1 configure -text $PATH
- .sl.butt.b1 invoke
- Put_File_List .sl
- } elseif [file executable $env(G_PATH)/$Name] {
- Message_Skeleton -icon warning -button O.K. \
- -message "Warning!\n\"$Name\" is an executable file."
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {destroy .msgskeleton}
- } elseif [file isfile $env(G_PATH)/$Name] {
- Message_Skeleton -icon question -button {Yes No} \
- -message "$Name: Overwrite?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {
- destroy .msgskeleton
- Save
- }
- .msgskeleton.butt.1 configure -command {destroy .msgskeleton}
- } else {
- Message_Skeleton -icon question -button {Yes No} \
- -message "$Name: New file?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {
- destroy .msgskeleton
- Save
- }
- .msgskeleton.butt.1 configure -command {destroy .msgskeleton}
- }
- }
- }
-
- .sl.butt.b1 configure -text Clear -command {
- .sl.select.list see 0
- .sl.select.list selection clear 0 end
- focus .sl.name.ent
- .sl.name.ent delete 0 end
- set END [string length $env[HOME)]
- set PATH ~[string range [pwd] $END end]
- .sl.info.label1 configure -text $PATH
- Put_File_List .sl
- }
-
- .sl.butt.b2 configure -text Cancel -command {
- destroy .sl
- }
-
-
-# Binding
-
- bind .sl.select.list {
- if {![catch {selection get} GET]} {
- if [file isdirectory $env(G_PATH)/$GET] {
- Change_Path $GET
- set END [string length $env(HOME)]
- set PATH ~[string range $env(G_PATH) $END end]
- .sl.info.label1 configure -text $PATH
- .sl.butt.b1 invoke
- Put_File_List .sl
- } else {
- .sl.name.ent delete 0 end
- .sl.name.ent insert end $GET
- }
- }
- if {$errorCode != "NONE"} {
- set errorCode NONE
- }
- if {$errorInfo != ""} {
- set errorInfo ""
- }
- }
-
- bind .sl.select.list {
- set Name [.sl.name.ent get]
- if {$Name != ""} {
- if [file executable $env(G_PATH)/$Name] {
- Message_Skeleton -icon warning -button O.K. \
- -message "Warning!\n\"$Name\" is an executable file."
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {destroy .msgskeleton}
- } elseif [file isfile $env(G_PATH)/$Name] {
- Message_Skeleton -icon question -button {Yes No} \
- -message "$Name: Overwrite?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {
- destroy .msgskeleton
- Save
- }
- .msgskeleton.butt.1 configure -command {destroy .msgskeleton}
- } else {
- Message_Skeleton -icon question -button {Yes No} \
- -message "$Name: New file?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {
- destroy .msgskeleton
- Save
- }
- .msgskeleton.butt.1 configure -command {destroy .msgskeleton}
- }
- }
- }
-
- bind .sl.select.list {}
-
- bind .sl.name.ent {.sl.butt.b0 invoke}
-
- bind .sl {
- raise .sl
- focus .sl.name.ent
- }
-
-
- wm title .sl "Save Log"
- wm protocol .sl WM_DELETEWINDOW {
- grab release .sl
- Change_Path $DIR
- }
- Put_File_List .sl
- if {$FONT != ""} {
- Change_Font $FONT .sl
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .sl
- }
- Win_Size .sl
- Tab_off
- Control
- grab set .sl
-}
-
-# Save log
-proc Save {} {
- global SAVE_RANGE FONT F_COLOR B_COLOR errorCode errorInfo env
-
- if {![winfo exists .sl]} {
- Message_Skeleton -icon warning -button O.K. \
- -message "Warning!\nWhat's happen?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {destroy .msgskeleton}
- return
- }
-
- set Name [.sl.name.ent get]
-
- if {![catch {open $env(G_PATH)/$Name w} file_ID]} {
- set LENGTH [llength $SAVE_RANGE]
- for {set i 0} {$i < $LENGTH} {incr i} {
- puts $file_ID [.fbt.text get [lindex $SAVE_RANGE $i] [lindex $SAVE_RANGE [expr $i + 1]]]
- incr i
- }
- close $file_ID
- } else {
- Message_Skeleton -icon warning -button O.K. \
- -message "Cannot open."
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {destroy .msgskeleton}
- }
-
- if {$errorCode != "NONE"} {
- set errorCode NONE
- }
- if {$errorInfo != ""} {
- set errorInfo ""
- }
-}
diff --git a/environments/Momo/tcltk/FBtext/FBsearchstring.proc b/environments/Momo/tcltk/FBtext/FBsearchstring.proc
deleted file mode 100644
index 58e7fd699d..0000000000
--- a/environments/Momo/tcltk/FBtext/FBsearchstring.proc
+++ /dev/null
@@ -1,411 +0,0 @@
-## FBsearchstring
-## (FBtext procedure)
-# make Search String window
-
-##
-## k.ohtubo(Tubocky)
-##
-## 1997.3.16
-## Tcl/Tk version 8.0
-## 1998 July 5 GEANT4 Beta-01
-##
-proc Search_String {} {
- global FONT SEARCH REPLACE F_COLOR B_COLOR
-
- if {![winfo exists .fbt.text]} {
- Message_Skeleton -icon warning -button O.K. \
- -message "Warning!\nWhat's happen?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {destroy .msgskeleton}
- return
- }
-
-
- if [winfo exists .ss] {
- raise .ss
- focus .ss.ent.search
- return
- }
-
-
- toplevel .ss -highlightthickness 0
- wm title .ss "Search String"
- wm protocol .ss WM_DELETE_WINDOW {
- .fbt.text tag remove SEARCH_TAG 1.0 end
- .fbt.text tag remove SEARCH_ALL_TAG 1.0 end
- destroy .ss
- }
-
- frame .ss.butt -highlightthickness 0
- pack .ss.butt -side top -fill x
-
- button .ss.butt.b0 -text Search -bd 3 -highlightthickness 0 \
- -command {
- if {[.ss.ent.search get] != ""} {
- if {![Search]} {
- set STRING [.ss.ent.search get]
- Message_Skeleton -icon info -button O.K. \
- -message "$STRING:No match."
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {destroy .msgskeleton}
- }
- } else {
- Message_Skeleton -icon error -button O.K. \
- -message "Input String."
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {destroy .msgskeleton}
- }
- }
- button .ss.butt.b1 -text Replace -bd 3 -highlightthickness 0 \
- -command {
- if {[.ss.ent.search get] != ""} {
- if {[.ss.ent.replace get] != ""} {
- Message_Skeleton -icon question -button {Yes No} \
- -message "Chack!\nDelete [.ss.ent.search get]?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {
- destroy .msgskeleton
- Replace
- }
- .msgskeleton.butt.1 configure -command {destroy .msgskeleton}
- }
- } else {
- Message_Skeleton -icon error -button O.K. \
- -message "Input String."
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {destroy .msgskeleton}
- }
- }
-
- menubutton .ss.butt.b2 -text Option -menu .ss.butt.b2.set \
- -relief raised -bd 3 -highlightthickness 0
-
- menu .ss.butt.b2.set -tearoff 0
- .ss.butt.b2.set add cascade -label Search -menu .ss.butt.b2.set.search
- .ss.butt.b2.set add cascade -label Replace \
- -menu .ss.butt.b2.set.replace
-
- menu .ss.butt.b2.set.search -tearoff 0
- .ss.butt.b2.set.search add radiobutton -label Up \
- -variable SEARCH -value Up
- .ss.butt.b2.set.search add radiobutton -label Down \
- -variable SEARCH -value Down
-
- menu .ss.butt.b2.set.replace -tearoff 0
- .ss.butt.b2.set.replace add radiobutton -label "Only One" \
- -variable REPLACE -value One
- .ss.butt.b2.set.replace add radiobutton -label "About All" \
- -variable REPLACE -value All
-
- button .ss.butt.b3 -text Clear -bd 3 -highlightthickness 0 \
- -command {
- .ss.ent.search delete 0 end
- .ss.ent.replace delete 0 end
- .fbt.text tag remove SEARCH_TAG 1.0 end
- .fbt.text tag remove SEARCH_ALL_TAG 1.0 end
- focus .ss.ent.search
- .fbt.text see end
- }
- button .ss.butt.b4 -text Cancel -bd 3 -highlightthickness 0 \
- -command {
- if [winfo exists .ss] {destroy .ss}
- .fbt.text tag remove SEARCH_TAG 1.0 end
- .fbt.text tag remove SEARCH_ALL_TAG 1.0 end
- }
-
- pack .ss.butt.b0 .ss.butt.b1 .ss.butt.b2 .ss.butt.b3 .ss.butt.b4 \
- -side left -fill x
-
-
- frame .ss.space -highlightthickness 0
- pack .ss.space -side top -fill both -expand 1
-
-
- frame .ss.label -highlightthickness 0
- pack .ss.label -side left
-
- label .ss.label.search -text Search -anchor w \
- -highlightthickness 0
- pack .ss.label.search -side top -fill x
-
- label .ss.label.replace -text Replace -anchor w \
- -highlightthickness 0
- pack .ss.label.replace -side top -fill x
-
-
- frame .ss.ent -highlightthickness 0
- pack .ss.ent -side left -fill x -expand 1
-
- entry .ss.ent.search -highlightthickness 0
- pack .ss.ent.search -side top -fill x
-
- entry .ss.ent.replace -highlightthickness 0
- pack .ss.ent.replace -side top -fill x
-
-
- focus .ss.ent.search
- Tab_off
- Control
-
- foreach BIND {Return Tab Shift-Tab Down Control-n} {
- bind .ss.ent.search <$BIND> {focus .ss.ent.replace}
- }
- foreach BIND {Return Tab Shift-Tab Up Control-p} {
- bind .ss.ent.replace <$BIND> {focus .ss.ent.search}
- }
-
- if {$FONT != ""} {
- Change_Font $FONT .ss
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .ss
- }
- Win_Size .ss
- wm resizable .ss 1 0
-}
-
-# Search string on FBtext window
-proc Search {} {
- global SEARCH FONT F_COLOR B_COLOR
-
- if {![winfo exists .ss.ent.search]} {
- Message_Skeleton -icon warning -button O.K. \
- -message "Warning!\nWhat's happen?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {destroy .msgskeleton}
- return 1
- }
-
-
- .fbt.text tag remove SEARCH_ALL_TAG 1.0 end
- .fbt.text tag configure SEARCH_ALL_TAG \
- -foreground #fffffffff -background #000000000
- set CURSOL [.fbt.text index insert]
- set CUR 1.0
- set STRING [.ss.ent.search get]
- if {$STRING != ""} {
- while {[set CUR [.fbt.text search -count LENGTH -regexp --\
- $STRING $CUR end]] != ""} {
- .fbt.text tag add SEARCH_ALL_TAG \
- $CUR "$CUR + $LENGTH char"
- set CUR [.fbt.text index "$CUR + $LENGTH char"]
- }
- }
- .fbt.text index $CURSOL
-
- switch $SEARCH {
- Up {
- if [Search_Up] {
- return 1
- } else {
- return 0
- }
- }
- Down {
- if [Search_Down] {
- return 1
- } else {
- return 0
- }
- }
- default {
- Message_Skeleton -icon error -button O.K. \
- -message "Click \"Option\" button.\nAnd check search up or down."
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {destroy .msgskeleton}
- return 1
- }
- }
-}
-
-# Search mode is "up"
-proc Search_Up {} {
- .fbt.text tag remove SEARCH_TAG 1.0 end
- .fbt.text tag configure SEARCH_TAG \
- -foreground #fffffffff -background #ccc000000
-
- set CURSOL [.fbt.text index insert]
- set STRING [.ss.ent.search get]
- set STOP 1.0
-
- set INDEX [.fbt.text search -backwards \
- -count LENGTH -regexp -- $STRING $CURSOL $STOP]
-
- if {$INDEX != ""} {
- scan $INDEX %d.%d LINE HEAD
- set TAIL [expr $HEAD + $LENGTH]
- .fbt.text tag add SEARCH_TAG $LINE.$HEAD $LINE.$TAIL
- .fbt.text mark set insert $LINE.$HEAD
- .fbt.text yview -pickplace insert
- } else {
- .fbt.text mark set insert 1.0
- return 0
- }
- return 1
-}
-
-# Search mode is "down"
-proc Search_Down {} {
- .fbt.text tag remove SEARCH_TAG 1.0 end
- .fbt.text tag configure SEARCH_TAG \
- -foreground #fffffffff -background #ccc000000
-
- set CURSOL [.fbt.text index insert]
- set STRING [.ss.ent.search get]
- set STOP [.fbt.text index end]
-
- set INDEX [.fbt.text search -count LENGTH -regexp \
- -- $STRING $CURSOL $STOP]
-
- if {$INDEX != ""} {
- scan $INDEX %d.%d LINE HEAD
- set TAIL [expr $HEAD + $LENGTH]
- .fbt.text tag add SEARCH_TAG $LINE.$HEAD $LINE.$TAIL
- .fbt.text mark set insert $LINE.$TAIL
- .fbt.text yview -pickplace insert
- } else {
- .fbt.text mark set insert end
- return 0
- }
- return 1
-}
-
-# Replace string on FBtext window
-proc Replace {} {
- global REPLACE FONT F_COLOR B_COLOR errorCode errorInfo
-
- if {![winfo exists .ss.ent.replace]} {
- Message_Skeleton -icon warning -button O.K. \
- -message "Warning!\nWhat's happen?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {destroy .msgskeleton}
- return
- }
-
- set STRING [.ss.ent.search get]
-
- switch $REPLACE {
- One {
- if {![Replace_One]} {
- Message_Skeleton -icon info -button O.K. \
- -message "$STRING:No match."
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {destroy .msgskeleton}
- }
- }
- All {
- Message_Skeleton -icon question -button {Yes No} \
- -message "Check!\nReplace all?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {
- destroy .msgskeleton
- Replace_All
- }
- .msgskeleton.butt.1 configure -command {destroy .msgskeleton}
- }
- default {
- Message_Skeleton -icon warning -button O.K. \
- -message "Click \"Option\" button.\nAnd check replace one or all."
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 conigure -command {destroy .msgskeleton}
- }
- }
-}
-
-# Replace mode is "one"
-proc Replace_One {} {
- if {[set RANGE [.fbt.text tag range SEARCH_TAG]] == ""} {
- if {![Search]} {
- return 0
- } else {
- return 1
- }
- }
-
- if {[.ss.ent.search get] != [eval ".fbt.text get $RANGE"]} {
- if {![Search]} {
- return 0
- } else {
- set RANGE [.fbt.text tag range SEARCH_TAG]
- }
- }
-
- .fbt.text tag remove SEARCH_TAG 1.0 end
- eval .fbt.text delete $RANGE
- set INSERT [lindex [split $RANGE] 0]
-
- if {![catch {.ss.ent.replace get} STRING]} {
- .fbt.text insert $INSERT $STRING
- scan $INSERT %d.%d LINE HEAD
- set TAIL [expr [string length $STRING] + $HEAD]
- .fbt.text tag add SEARCH_TAG $LINE.$HEAD $LINE.$TAIL
- if {![Search]} {return 0}
- }
- if {$errorCode != "NONE"} {
- set errorCode NONE
- }
- if {$errorInfo != ""} {
- set errorInfo ""
- }
- return 1
-}
-
-# Replace mode is "all"
-proc Replace_All {} {
- while {[Replace_One] != 0} {}
-}
diff --git a/environments/Momo/tcltk/FBtext/FBtext.tcl b/environments/Momo/tcltk/FBtext/FBtext.tcl
deleted file mode 100644
index 095c773704..0000000000
--- a/environments/Momo/tcltk/FBtext/FBtext.tcl
+++ /dev/null
@@ -1,159 +0,0 @@
-## FBtext.tcl
-## Window Manager
-## called by FBmain.proc
-##
-## k.ohtubo(Tubocky)
-##
-## 1998.3.16
-## Tcl/Tk version 8.0
-## 1998 July 5 GEANT4 Beta-01
-
-wm title . "File Browser Text"
-
-## Set global variable
-if [info exists env(MOMOPATH)] {
- set END [expr [string length $env(MOMOPATH)] - 1]
- if {[string index $env(MOMOPATH) $END] == "/"} {
- set HOME [strinf range $env(MOMOPATH) 0 [expr $END - 1]]
- } else {
- set HOME $env(MOMOPATH)
- }
-} else {
- set HOME $env(HOME)/Momo/tcltk
-}
-set FILE $env(FB_Open_File_Name)
-if {[lsearch [array names env] FONT] >= 0} {
- set FONT $env(FONT)
-} else {
- set FONT ""
-}
-if {[lsearch [array names env] FORE_GROUND_COLOR] >= 0} {
- set F_COLOR $env(FORE_GROUND_COLOR)
-} else {
- set F_COLOR #000000000
-}
-if {[lsearch [array names env] BACK_GROUND_COLOR] >= 0} {
- set B_COLOR $env(BACK_GROUND_COLOR)
-} else {
- set B_COLOR #d90d90d90
-}
-set SEARCH Down
-set REPLACE One
-set errorCode NONE
-set errorInfo ""
-
-
-## tclIndex
-set auto_path [linsert $auto_path 0 $HOME/]
-set auto_path [linsert $auto_path 0 $HOME/FBtext/]
-
-
-## Source
-#source $HOME/FBtext/FBsearchstring.proc
-#source $HOME/FBtext/FBclear.proc
-#source $HOME/FBtext/FBsavelog.proc
-
-
-## Make window
-frame .butt -highlightthickness 0
-pack .butt -side top -fill x
-
-menubutton .butt.func -text Function -bd 3 -menu .butt.func.menu \
- -relief raised -highlightthickness 0
-pack .butt.func -side left -fill y
-
-menu .butt.func.menu -tearoff 0
-.butt.func.menu add command -label Clear -command Clear_Log
-.butt.func.menu add command -label Save -command Before_Save
-.butt.func.menu add command -label Search -command Search_String
-.butt.func.menu add separator
-.butt.func.menu add command -label "Exit File Browser Text" -command exit
-
-
-frame .dir -highlightthickness 0
-pack .dir -side top -fill x
-
-label .dir.lbl -text Directory: -anchor w -highlightthickness 0
-pack .dir.lbl -side left
-
-set END [string length $env(HOME)]
-set Path ~[string range [pwd] $END end]
-label .dir.lbr -text $Path -anchor w -highlightthickness 0
-pack .dir.lbr -side left -fill x -expand 1
-
-
-frame .file -highlightthickness 0
-pack .file -side top -fill x
-
-
-label .file.lb -text "Load File:" -anchor w -highlightthickness 0
-pack .file.lb -side left
-
-entry .file.ent -highlightthickness 0
-pack .file.ent -side left -fill x -expand 1
-
-
-frame .fbt -highlightthickness 0
-pack .fbt -side top -fill both -expand 1
-
-text .fbt.text -width 80 -height 15 -bd 2 -yscrollcommand {.fbt.scroll set} \
- -highlightthickness 0
-pack .fbt.text -side left -fill both -expand 1
-
-scrollbar .fbt.scroll -command {.fbt.text yview} -highlightthickness 0
-pack .fbt.scroll -side left -fill y
-
-
-frame .info -highlightthickness 0
-pack .info -side top -fill x
-
-
-frame .info.lbl -highlightthickness 0
-pack .info.lbl -side left
-
-label .info.lbl.info -text Information -anchor w \
- -highlightthickness 0
-pack .info.lbl.info -side top -fill x
-
-
-frame .info.lbr -highlightthickness 0
-pack .info.lbr -side left -fill x -expand 1
-
-label .info.lbr.info -relief sunken -anchor w -highlightthickness 0
-pack .info.lbr.info -side top -fill x -expand 1
-
-
-if {$FONT != ""} {
- Change_Font $FONT .
-}
-if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .
-}
-
-Tab_off
-Win_Size .
-Del_Bind
-Control
-
-
-if {[file readable $FILE] && [file writable $FILE]} {
- .info.lbr.info configure -text "This file is readable & writable."
- set FILE_ID [open $FILE r]
- .fbt.text insert end [read $FILE_ID]
- close $FILE_ID
-} elseif [file readable $FILE] {
- .info.lbr.info configure -text "This file is readable."
- set FILE_ID [open $FILE r]
- .fbt.text insert end [read $FILE_ID]
-
- .fbt.text configure -state disabled
- .butt.func.menu entryconfigure 0 -state disabled
- .butt.func.menu entryconfigure 1 -state disabled
-
- close $FILE_ID
-} else {
- .info.lbr.info configure -text "This file is not readable."
-}
-
-.file.ent insert end $FILE
-.file.ent configure -state disabled
diff --git a/environments/Momo/tcltk/FBtext/MEMO b/environments/Momo/tcltk/FBtext/MEMO
deleted file mode 100644
index 0d585ac234..0000000000
--- a/environments/Momo/tcltk/FBtext/MEMO
+++ /dev/null
@@ -1,29 +0,0 @@
-## global variable
-env
-FONT
-F_COLOR
-B_COLOR
-SAVE_RANGE
-SEARCH
-REPLACE
-errorCode
-errorInfo
-
-
-## procedures
-#FBclear.proc
-Clear_Log
-
-#FBsavelog.proc
-Before_Save
-Save_Window
-Save
-
-#FBsearchstring.proc
-Search_String
-Search
-Search_Up
-Search_Down
-Replace
-Replace_One
-Replace_All
diff --git a/environments/Momo/tcltk/FBtext/tclIndex b/environments/Momo/tcltk/FBtext/tclIndex
deleted file mode 100644
index ee509347c0..0000000000
--- a/environments/Momo/tcltk/FBtext/tclIndex
+++ /dev/null
@@ -1,19 +0,0 @@
-# Tcl autoload index file, version 2.0
-# This file is generated by the "auto_mkindex" command
-# and sourced to set up indexing information for one or
-# more commands. Typically each line is a command that
-# sets an element in the auto_index array, where the
-# element name is the name of a command and the value is
-# a script that loads the command.
-
-set auto_index(Clear_Log) [list source [file join $dir FBclear.proc]]
-set auto_index(Search_String) [list source [file join $dir FBsearchstring.proc]]
-set auto_index(Search) [list source [file join $dir FBsearchstring.proc]]
-set auto_index(Search_Up) [list source [file join $dir FBsearchstring.proc]]
-set auto_index(Search_Down) [list source [file join $dir FBsearchstring.proc]]
-set auto_index(Replace) [list source [file join $dir FBsearchstring.proc]]
-set auto_index(Replace_One) [list source [file join $dir FBsearchstring.proc]]
-set auto_index(Replace_All) [list source [file join $dir FBsearchstring.proc]]
-set auto_index(Before_Save) [list source [file join $dir FBsavelog.proc]]
-set auto_index(Save_Window) [list source [file join $dir FBsavelog.proc]]
-set auto_index(Save) [list source [file join $dir FBsavelog.proc]]
diff --git a/environments/Momo/tcltk/GAG/GAG.tcl b/environments/Momo/tcltk/GAG/GAG.tcl
deleted file mode 100644
index 2363465736..0000000000
--- a/environments/Momo/tcltk/GAG/GAG.tcl
+++ /dev/null
@@ -1,256 +0,0 @@
-## GAG.tcl
-## GAG Window Manager
-##
-## k.ohtubo(Tubocky)
-##
-## 1998.3.16
-
-## 1998 July 5 Hajime
-# added "Exit GEANT4" and "Kill GEANT4" menus
-# yet to debug for invokation of non-GEANT4 executables
-# which hangs the pipe.
-# Non GEANT4 command which is suspended can be killed by the
-# new "Kill GEANT4" menu.
-## 1998 July 20 Hajime
-# renamed Exec GEANT4 => Run GEANT4
-# added Continue GEANT4
-## Tcl/Tk version 8.0
-## 1998 July 5 GEANT4 Beta-01
-## 1998 December 3 Beta-03 Added protection against G4 binaries with
-# G4UIterminal session
-#
-# MOMOPATH/tcltk/Momo/GAG
-
-wm title . GAG
-wm protocol . WM_DELETE_WINDOW {
- .mbutt.function.command invoke last
-}
-
-## Set global variable
-if [info exists env(MOMOPATH)] {
- set END [expr [string length $env(MOMOPATH)] - 1]
- if {[string index $env(MOMOPATH) $END] == "/"} {
- set HOME [string range $env(MOMOPATH) 0 [expr $END - 1]]
- } else {
- set HOME $env(MOMOPATH)
- }
-} else {
- set HOME $env(HOME)/Momo/tcltk
-}
-if {[lsearch [array names env] FONT] >= 0} {
- set FONT $env(FONT)
-} else {
- set FONT ""
-}
-set PROMPT "GAG> "
-set Protocol "T1.0a"
-if {[lsearch [array names env] FORE_GROUND_COLOR] >= 0} {
- set F_COLOR $env(FORE_GROUND_COLOR)
-} else {
- set F_COLOR #000000000
-}
-if {[lsearch [array names env] BACK_GROUND_COLOR] >= 0} {
- set B_COLOR $env(BACK_GROUND_COLOR)
-} else {
- set B_COLOR #d90d90d90
-}
-if {![info exists env(G_PATH)]} {
- set env(G_PATH) $env(PWD)
-}
-set SEARCH Down
-set REPLACE One
-set HISTORY ""
-set errorCode NONE
-set errorInfo ""
-
-## Source
-#source $HOME/GAG/GAGclearlog.proc
-#source $HOME/GAG/GAGconnect.proc
-#source $HOME/GAG/GAGdirectory.proc
-#source $HOME/GAG/GAGparam.proc
-#source $HOME/GAG/GAGsavelog.proc
-#source $HOME/GAG/GAGsearchstring.proc
-#source $HOME/Public.proc
-
-## tclIndex
-set auto_path [linsert $auto_path 0 $HOME/]
-set auto_path [linsert $auto_path 0 $HOME/GAG/]
-
-## Make window
-. configure -highlightthickness 0
-
-frame .mbutt -relief raised -bd 1 -highlightthickness 0
-pack .mbutt -side top -fill x
-
-menubutton .mbutt.function -text Function -relief raised -bd 3 \
- -menu .mbutt.function.command -highlightthickness 0
-pack .mbutt.function -side left
-
-menu .mbutt.function.command -tearoff 0
-.mbutt.function.command add command -label "Run GEANT4" -command Directory
-.mbutt.function.command add command -label "Continue" -command {
- puts $GEANT_ID continue
- .log.text insert end continue\n}
-## GEANT4_ID is not yet checked 720
-
-.mbutt.function.command add command -label "Exit GEANT4" -command {
- Message_Skeleton -icon question -button {Yes No} \
- -message "Do you exit GEANT4?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {
- catch {puts $GEANT_ID exit}
- destroy .msgskeleton
-## exit
- }
- .msgskeleton.butt.1 configure -command {
- destroy .msgskeleton
- }
-}
-.mbutt.function.command add command -label "Kill GEANT4" -command {
- Message_Skeleton -icon question -button {Yes No} \
- -message "Do you really kill GEANT4?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {
-##test
- set PID [pid $GEANT_ID]
- catch {exec kill $PID}
- destroy .msgskeleton
-## exit
- }
- .msgskeleton.butt.1 configure -command {
- destroy .msgskeleton
- }
-}
-
-.mbutt.function.command add separator
-
-.mbutt.function.command add command -label "Command History" -command Command_History
-.mbutt.function.command add separator
-
-.mbutt.function.command add command -label "Save Log" -command Before_Save
-.mbutt.function.command add command -label "Search Log" \
- -command Search_String
-.mbutt.function.command add command -label "Clear Log" -command Clear_Log
-
-.mbutt.function.command add separator
-.mbutt.function.command add command -label "Exit GAG" -command {
- Message_Skeleton -icon question -button {Yes No} \
- -message "Do you exit GAG?"
- if {$FONT != ""} {
- Change_Font $FONT .msgskeleton
- }
- if {$F_COLOR != "" && $B_COLOR != ""} {
- Change_Color $F_COLOR $B_COLOR .msgskeleton
- }
- .msgskeleton.butt.0 configure -command {
- catch {puts $GEANT_ID exit}
- catch {close $GEANT_ID}
- destroy .msgskeleton
- exit
- }
- .msgskeleton.butt.1 configure -command {
- destroy .msgskeleton
- }
-}
-
-frame .space0 -height 15 -relief flat -highlightthickness 0
-pack .space0 -side top -fill x
-
-
-frame .log -highlightthickness 0
-pack .log -side top -fill both -expand 1
-
-text .log.text -width 85 -height 15 -bd 2 -relief raised \
- -yscrollcommand {.log.scroll set} -highlightthickness 0
-pack .log.text -side left -fill both -expand 1
-
-scrollbar .log.scroll -command {.log.text yview} -highlightthickness 0
-pack .log.scroll -side left -fill y
-
-
-frame .space1 -height 5 -relief flat -highlightthickness 0
-pack .space1 -side top -fill x
-
-
-frame .comm -highlightthickness 0
-pack .comm -side top -fill x
-
-label .comm.label -text Command -highlightthickness 0
-pack .comm.label -side left
-
-entry .comm.ent -highlightthickness 0
-pack .comm.ent -side left -fill x -expand 1
-
-
-label .help -relief sunken -anchor w -highlightthickness 0
-pack .help -side top -fill x
-
-## Dummy Button
-button .dummy -command {
- set PARA [.comm.ent get]
- if {$PARA != ""} {
- GAG_Connect $PARA
- } else {
- .log.text insert end \n>
- .log.text see end
- }
-}
-
-## Binding & Focus
-# Binding on command line
-bind .comm.ent {.dummy invoke}
-bind .comm.ent {}
-bind .comm.ent {.help configure -text "direct command typein"}
-bind .comm.ent {.help configure -text "setup phase"}
-focus .comm.ent
-
-# Binding on Log board
-bind .log {
- .help configure -text "editable log window"
-}
-bind .log {
- .help configure -text "setup phase"
- .log.text configure -relief raised
- focus .comm.ent
-}
-
-bind .log.text