diff --git a/.hgtags b/.hgtags
index ade8f85638bba8e6bae58858a9c601ec52d33621..58a3c99257627a40ca8d1a6159662be7a5068021 100644
--- a/.hgtags
+++ b/.hgtags
@@ -70,3 +70,5 @@ f2dce7210cc00453c23e53edeec7156f112ca382 jdk7-b92
219b84b9533ae4fe3c6c2083f8a8962cb579f1de jdk7-b93
cf44386c8fe3fbdb9da14346be25d19fd1092f71 jdk7-b94
db951e984ccf50756160fee3078c791300b0917e jdk7-b95
+51b9e5dbc2da0631414484b934ac3fb62e48a2c6 jdk7-b96
+b1903d7528d33b521df42bc9291bdcdd2f444a29 jdk7-b97
diff --git a/make/com/sun/Makefile b/make/com/sun/Makefile
index debb8d10cee07c4388eaa52e78111fedd36fcf34..c1b2164e7ec3743ac3158ff0c69934f0e99c8226 100644
--- a/make/com/sun/Makefile
+++ b/make/com/sun/Makefile
@@ -42,7 +42,7 @@ endif
SUBDIRS = java security net/ssl jarsigner
SUBDIRS_management = jmx
-SUBDIRS_desktop = image inputmethods
+SUBDIRS_desktop = image
SUBDIRS_enterprise = crypto/provider jndi \
org xml rowset net/httpserver
SUBDIRS_misc = $(SCRIPT_SUBDIR) tracing servicetag nio demo
diff --git a/make/com/sun/inputmethods/Makefile b/make/com/sun/inputmethods/Makefile
deleted file mode 100644
index 7df310a32bd2f424ef0d6ce22195925c10ff8279..0000000000000000000000000000000000000000
--- a/make/com/sun/inputmethods/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Makefile for building Java input methods
-#
-
-BUILDDIR = ../../..
-PRODUCT = sun
-include $(BUILDDIR)/common/Defs.gmk
-
-SUBDIRS = indicim thaiim
-include $(BUILDDIR)/common/Subdirs.gmk
-
-all build clean clobber::
- $(SUBDIRS-loop)
-
diff --git a/make/com/sun/inputmethods/indicim/Makefile b/make/com/sun/inputmethods/indicim/Makefile
deleted file mode 100644
index 12f43972eb91534b6ec8429c40d6e1a13f2aa853..0000000000000000000000000000000000000000
--- a/make/com/sun/inputmethods/indicim/Makefile
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Makefile for indic input method.
-#
-
-BUILDDIR = ../../../..
-
-PACKAGE = com.sun.inputmethods.internal.indicim
-PRODUCT = sun
-
-CLASSDESTDIR = $(TEMPDIR)/classes
-SERVICESDIR=META-INF/services
-IMJAR = $(IMJARDIR)/indicim.jar
-IMJARDIR=$(LIBDIR)/im
-include $(BUILDDIR)/common/Defs.gmk
-
-#
-# Files
-#
-AUTO_FILES_JAVA_DIRS = com/sun/inputmethods/internal/indicim
-
-FILES_copy = \
- $(CLASSDESTDIR)/com/sun/inputmethods/internal/indicim/resources/DisplayNames.properties
-
-PROVIDER_CONF_FILE = \
- $(CLASSDESTDIR)/$(SERVICESDIR)/java.awt.im.spi.InputMethodDescriptor
-
-#
-# Rules
-#
-include $(BUILDDIR)/common/Classes.gmk
-
-build: $(IMJAR)
-
-#
-# Extra rules to build im.
-#
-
-$(CLASSDESTDIR)/com/sun/inputmethods/internal/indicim/resources/% : $(SHARE_SRC)/classes/com/sun/inputmethods/internal/indicim/resources/%
- $(install-file)
-
-$(CLASSDESTDIR)/$(SERVICESDIR)/java.awt.im.spi.InputMethodDescriptor : $(SHARE_SRC)/classes/com/sun/inputmethods/internal/indicim/java.awt.im.spi.InputMethodDescriptor
- $(install-file)
-
-$(IMJAR): $(FILES_class) $(FILES_copy) $(PROVIDER_CONF_FILE)
- $(prep-target)
- $(BOOT_JAR_CMD) -cf $@ \
- -C $(CLASSDESTDIR) com \
- -C $(CLASSDESTDIR) $(SERVICESDIR) \
- $(BOOT_JAR_JFLAGS)
- @$(java-vm-cleanup)
-
-clean::
- $(RM) -r $(CLASSDESTDIR)
- $(RM) $(IMJAR)
diff --git a/make/com/sun/inputmethods/thaiim/Makefile b/make/com/sun/inputmethods/thaiim/Makefile
deleted file mode 100644
index 5a7e78d4227b91aa3bb0e8090b6b901cedffb763..0000000000000000000000000000000000000000
--- a/make/com/sun/inputmethods/thaiim/Makefile
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Makefile for thai input method.
-#
-
-BUILDDIR = ../../../..
-
-PACKAGE = com.sun.inputmethods.internal.thaiim
-PRODUCT = sun
-
-CLASSDESTDIR = $(TEMPDIR)/classes
-SERVICESDIR=META-INF/services
-IMJAR = $(IMJARDIR)/thaiim.jar
-IMJARDIR=$(LIBDIR)/im
-include $(BUILDDIR)/common/Defs.gmk
-
-#
-# Files
-#
-AUTO_FILES_JAVA_DIRS = com/sun/inputmethods/internal/thaiim
-
-FILES_copy = \
- $(CLASSDESTDIR)/com/sun/inputmethods/internal/thaiim/resources/DisplayNames.properties
-
-PROVIDER_CONF_FILE = \
- $(CLASSDESTDIR)/$(SERVICESDIR)/java.awt.im.spi.InputMethodDescriptor
-
-#
-# Rules
-#
-include $(BUILDDIR)/common/Classes.gmk
-
-build: $(IMJAR)
-
-#
-# Extra rules to build im.
-#
-
-$(CLASSDESTDIR)/com/sun/inputmethods/internal/thaiim/resources/% : $(SHARE_SRC)/classes/com/sun/inputmethods/internal/thaiim/resources/%
- $(install-file)
-
-$(CLASSDESTDIR)/$(SERVICESDIR)/java.awt.im.spi.InputMethodDescriptor : $(SHARE_SRC)/classes/com/sun/inputmethods/internal/thaiim/java.awt.im.spi.InputMethodDescriptor
- $(install-file)
-
-$(IMJAR): $(FILES_class) $(FILES_copy) $(PROVIDER_CONF_FILE)
- $(prep-target)
- $(BOOT_JAR_CMD) -cf $@ \
- -C $(CLASSDESTDIR) com \
- -C $(CLASSDESTDIR) $(SERVICESDIR) \
- $(BOOT_JAR_JFLAGS)
- @$(java-vm-cleanup)
-
-clean::
- $(RM) -r $(CLASSDESTDIR)
- $(RM) $(IMJAR)
diff --git a/make/common/Defs-linux.gmk b/make/common/Defs-linux.gmk
index e74272ded6e2f0dde75e31a91baf3e1d63d566fd..df8cba2ecedf8f76e8c41a0295509e05a5eae0c3 100644
--- a/make/common/Defs-linux.gmk
+++ b/make/common/Defs-linux.gmk
@@ -194,7 +194,16 @@ ifeq ($(FASTDEBUG), true)
CXXFLAGS_DBG += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
endif
-CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' -DLINUX $(VERSION_DEFINES) \
+CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"'
+
+# Alpha arch does not like "alpha" defined (potential general arch cleanup issue here)
+ifneq ($(ARCH),alpha)
+ CPP_ARCH_FLAGS += -D$(ARCH)
+else
+ CPP_ARCH_FLAGS += -D_$(ARCH)_
+endif
+
+CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -DLINUX $(VERSION_DEFINES) \
-D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT
ifeq ($(ARCH_DATA_MODEL), 64)
diff --git a/make/common/Defs-solaris.gmk b/make/common/Defs-solaris.gmk
index 2ea749a018f93e9de224aabc5f21be14a559836c..97b6a69e43dbf030c028c5264d3a93c1ee4aae9d 100644
--- a/make/common/Defs-solaris.gmk
+++ b/make/common/Defs-solaris.gmk
@@ -639,21 +639,8 @@ AWT_RUNPATH = -R/usr/dt/lib$(ISA_DIR) -R$(OPENWIN_RUNTIME_LIB)
# in general this is ok to continue to do.
LIBCXX = /usr/lib$(ISA_DIR)/libCrun.so.1
-# Math Library (libm.so), do not use -lm.
-# There might be two versions of libm.so on the build system:
-# libm.so.1 and libm.so.2, and we want libm.so.1.
-# Depending on the Solaris release being used to build with,
-# /usr/lib/libm.so could point at a libm.so.2, so we are
-# explicit here so that the libjvm.so you have built will work on an
-# older Solaris release that might not have libm.so.2.
-# This is a critical factor in allowing builds on Solaris 10 or newer
-# to run on Solaris 8 or 9.
-#
-# Note: Historically there was also a problem picking up a static version
-# of libm.a from the compiler area, but that problem has gone away
-# with the newer compilers. Use of libm.a would cause .so bloat.
-#
-LIBM = /usr/lib$(ISA_DIR)/libm.so.1
+# JDK now requires Solaris 10, so pick up libm.so.2
+LIBM = /usr/lib$(ISA_DIR)/libm.so.2
# Socket library
LIBSOCKET = -lsocket
diff --git a/make/common/Release.gmk b/make/common/Release.gmk
index 391ce2d09fd9c232f4c4bf402f255c163342333e..ab9f557eef28ec2db54ee3c51772095d1c6ca1ca 100644
--- a/make/common/Release.gmk
+++ b/make/common/Release.gmk
@@ -47,14 +47,20 @@ IMAGE_BINDIR = bin
# Swing has taken this approach only as a temporary measure to avoid
# the compiler warnings until we can properly document these packages.
# This is covered under 6491853.
-EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf \
- com.sun.java.swing.plaf.windows \
+EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf.windows \
com.sun.java.swing.plaf.motif \
com.sun.java.swing.plaf.gtk
# This is a stopgap until 6839872 is fixed.
EXCLUDE_PROPWARN_PKGS += sun.dyn
+#
+# Include the exported private packages in ct.sym.
+# This is an interim solution until the ct.sym is replaced
+# with a new module system (being discussed for JDK 7).
+#
+EXPORTED_PRIVATE_PKGS = com.sun.servicetag
+
# 64-bit solaris has a few special cases. We define the variable
# SOLARIS64 for use in this Makefile to easily test those cases
ifeq ($(PLATFORM), solaris)
@@ -543,6 +549,7 @@ DIRDIFF_JARFILE = $(BUILDTOOLJARDIR)/dirdiff.jar
######################################################
# List of directories in classes directory that should NOT be in rt.jar
+# sun/nio/cs/ext/ will go into charsets.jar
######################################################
NOT_RT_JAR_LIST = $(ABS_TEMPDIR)/not_rt_jar.list
@@ -565,6 +572,7 @@ $(NOT_RT_JAR_LIST): FRC
$(ECHO) "META-INF/services/com.sun.tools.xjc.Plugin" >> $@
$(ECHO) "com/sun/tools/" >> $@
$(ECHO) "sun/jvmstat/" >> $@
+ $(ECHO) "sun/nio/cs/ext/" >> $@
$(ECHO) "sun/rmi/rmic/" >> $@
$(ECHO) "sun/tools/asm/" >> $@
$(ECHO) "sun/tools/java/" >> $@
@@ -648,7 +656,9 @@ $(RT_JAR_FILELIST) + $(RES_JAR_FILELIST): \
JAR_MANIFEST_FILE=$(ABS_TEMPDIR)/manifest.tmp
$(JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
$(prep-target)
- $(SED) -e "s/@@RELEASE@@/$(RELEASE)/" $(MAINMANIFEST) >> $@
+ $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
+ -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
+ $(MAINMANIFEST) >> $@
$(ECHO) >> $@
$(CAT) $(BEANMANIFEST) >> $@
@@ -981,7 +991,7 @@ initial-image-jdk:: initial-image-jdk-setup \
-processor com.sun.tools.javac.sym.CreateSymbols \
-Acom.sun.tools.javac.sym.Jar=$(RT_JAR) \
-Acom.sun.tools.javac.sym.Dest=$(OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
- $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS)
+ $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) $(EXPORTED_PRIVATE_PKGS)
$(BOOT_JAR_CMD) c0f $(LIBDIR)/ct.sym \
-C $(OUTPUTDIR)/symbols META-INF $(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup)
diff --git a/make/common/Subdirs.gmk b/make/common/Subdirs.gmk
index 35515cf8dca89f1dd73fbcedfd73b9df4bdba96c..51d0c7f8e97d3f8f6c8995192603a46f70cdae7c 100644
--- a/make/common/Subdirs.gmk
+++ b/make/common/Subdirs.gmk
@@ -19,7 +19,7 @@
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
-# have any questions
+# questions.
#
#
diff --git a/make/common/shared/Defs-control.gmk b/make/common/shared/Defs-control.gmk
index b5f06e7524e55b6039455384bb0e2b86e81de152..4e545ca996b4fc8032b4aad6b9e183c5ef3eb9c1 100644
--- a/make/common/shared/Defs-control.gmk
+++ b/make/common/shared/Defs-control.gmk
@@ -35,9 +35,6 @@ ifndef JDK_MAKE_SHARED_DIR
JDK_MAKE_SHARED_DIR = $(JDK_TOPDIR)/make/common/shared
endif
-ifndef CONTROL_TOPDIR
- CONTROL_TOPDIR=$(TOPDIR)
-endif
ifndef HOTSPOT_TOPDIR
HOTSPOT_TOPDIR=$(TOPDIR)/hotspot
endif
diff --git a/make/common/shared/Defs-javadoc.gmk b/make/common/shared/Defs-javadoc.gmk
new file mode 100644
index 0000000000000000000000000000000000000000..83b3b4aa7066453ebe54c9462e4179611aaa6749
--- /dev/null
+++ b/make/common/shared/Defs-javadoc.gmk
@@ -0,0 +1,93 @@
+#
+# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# Copyright year for beginning of Java and some of the apis
+# (Needed when creating the javadocs)
+FIRST_COPYRIGHT_YEAR = 1993
+DOMAPI_FIRST_COPYRIGHT_YEAR = 2005
+MIRROR_FIRST_COPYRIGHT_YEAR = 2004
+DOCLETAPI_FIRST_COPYRIGHT_YEAR = 1993
+TAGLETAPI_FIRST_COPYRIGHT_YEAR = 1993
+JDI_FIRST_COPYRIGHT_YEAR = 1999
+JAAS_FIRST_COPYRIGHT_YEAR = 1998
+JGSS_FIRST_COPYRIGHT_YEAR = 2000
+SMARTCARDIO_FIRST_COPYRIGHT_YEAR = 2005
+HTTPSERVER_FIRST_COPYRIGHT_YEAR = 2005
+MGMT_FIRST_COPYRIGHT_YEAR = 2003
+ATTACH_FIRST_COPYRIGHT_YEAR = 2005
+JCONSOLE_FIRST_COPYRIGHT_YEAR = 2006
+SCTPAPI_FIRST_COPYRIGHT_YEAR = 2009
+TRACING_FIRST_COPYRIGHT_YEAR = 2008
+TREEAPI_FIRST_COPYRIGHT_YEAR = 2005
+JNLP_FIRST_COPYRIGHT_YEAR = 1998
+PLUGIN2_FIRST_COPYRIGHT_YEAR = 2007
+
+# Oracle name
+COMPANY_NAME = Oracle and/or its affiliates
+
+# Copyright address
+COMPANY_ADDRESS = 500 Oracle Parkway $(call CopyrightLine,,$1,) \
+$(call CopyrightLine,$(COPYRIGHT_URL),$(FIRST_COPYRIGHT_YEAR),)\
+
Redwood Shores, CA 94065 USA.
+
+# The trademark symbol
+TRADEMARK = ™
+
+# Common copyright lines used
+# The word "Copyright" might optionally be a link to the file cpyr.html.
+# The first year of copyright may vary or not be available.
+# The address to the company might be optional.
+COMMA:= ,
+EMPTY:=
+SPACE:=$(EMPTY) $(EMPTY)
+COPYRIGHT_SYMBOL = &\#x00a9;
+# Macros to handle the optional empty args.
+# (The GNU make 3.78.1 "if" conditional is broken, fixed in GNU make 3.81)
+define OptionalCopyrightUrl # url
+$(shell \
+ if [ "$1" != "" ] ; then \
+ printf "Copyright" "$1"; \
+ else \
+ printf "Copyright"; \
+ fi)
+endef
+define OptionalCopyrightFirstYear # year
+$(shell \
+ if [ "$1" != "" ] ; then \
+ printf "%s," "$1";\
+ fi)
+endef
+define OptionalCompanyAddress # address
+$(shell \
+ if [ "$1" != "" ] ; then \
+ printf "%s" "$1";\
+ fi)
+endef
+define CopyrightLine # optionalurl optionalfirstyear optionaladdress
+$(call OptionalCopyrightUrl,$1) $(COPYRIGHT_SYMBOL)\
+$(call OptionalCopyrightFirstYear,$2) $(COPYRIGHT_YEAR),\
+$(COMPANY_NAME).\
+$(call OptionalCompanyAddress,$3)\
+All rights reserved.
+endef
+
diff --git a/make/common/shared/Defs.gmk b/make/common/shared/Defs.gmk
index 19e05151af8dba253ae5440e41bed81c59e7424d..3ccab90196c901059982f30982753686ca2c4187 100644
--- a/make/common/shared/Defs.gmk
+++ b/make/common/shared/Defs.gmk
@@ -214,7 +214,7 @@ else
PRODUCT_NAME = Java(TM)
PRODUCT_SUFFIX = SE Runtime Environment
JDK_RC_PLATFORM_NAME = Platform SE
- COMPANY_NAME = Sun Microsystems, Inc.
+ COMPANY_NAME = Oracle
endif
RUNTIME_NAME = $(PRODUCT_NAME) $(PRODUCT_SUFFIX)
diff --git a/make/docs/CORE_PKGS.gmk b/make/docs/CORE_PKGS.gmk
index b1cb7e62d2654ac53255594dbd736eb0fc1081c0..31aaeb1b5d8194291460d4151e76e58334cf8ec5 100644
--- a/make/docs/CORE_PKGS.gmk
+++ b/make/docs/CORE_PKGS.gmk
@@ -234,6 +234,7 @@ CORE_PKGS = \
javax.xml.ws.http \
javax.xml.ws.soap \
javax.xml.ws.spi \
+ javax.xml.ws.spi.http \
javax.xml.ws.wsaddressing \
javax.xml.transform \
javax.xml.transform.sax \
diff --git a/make/docs/Makefile b/make/docs/Makefile
index a000aae2551058bfc57b994eddbe663e8cfe9f37..20150c81a473ac3103c494978ed3a9c8d567b805 100644
--- a/make/docs/Makefile
+++ b/make/docs/Makefile
@@ -1,5 +1,4 @@
-#
-# Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -30,6 +29,41 @@ BUILDDIR=..
PRODUCT=docs
include $(BUILDDIR)/common/Defs.gmk
+# Get CopyrightLine macro and other shared variables
+include $(BUILDDIR)/common/shared/Defs-javadoc.gmk
+
+# Url to root of documents
+DOCSDIR_URL = {@docroot}/$(GET2DOCSDIR)
+
+# Url to copyright html file
+COPYRIGHT_URL-7 = $(DOCSDIR_URL)/legal/cpyr.html
+COPYRIGHT_URL = $(COPYRIGHT_URL-$(JDK_MINOR_VERSION))
+
+# Url to bug filing site
+BUG_SUBMIT_URL = http://bugs.sun.com/services/bugreport/index.jsp
+
+# Common line for how to submit a bug or rfe
+BUG_SUBMIT_LINE = Submit a bug or feature
+
+# Url to devdocs page
+# Was: http://java.sun.com/javase/6/webnotes/devdocs-vs-specs.html
+DEV_DOCS_URL-5 = http://java.sun.com/j2se/1.5.0/docs
+DEV_DOCS_URL-6 = http://download.oracle.com/docs/cd/E17409_01/javase/6/docs
+DEV_DOCS_URL-7 = http://download.oracle.com/docs/cd/E17409_01/javase/7/docs
+DEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION))
+
+# Url to Java Language Spec
+JLS3_URL = http://java.sun.com/docs/books/jls/
+
+# Common Java trademark line
+JAVA_TRADEMARK_LINE = Java is a trademark or registered trademark of \
+$(COMPANY_NAME) in the US and other countries.
+
+#
+# Definitions for imported components
+#
+include $(BUILDDIR)/common/internal/ImportComponents.gmk
+
# We override whatever the max VM memory setting is here.
# NOTE: javadoc will not complete without these larger settings.
# WARNING: This could cause thrashing on low memory machines.
@@ -39,672 +73,1135 @@ else
MAX_VM_MEMORY = 512
endif
+# List of all possible directories for javadoc to look for sources
+# NOTE: Quotes are required around sourcepath argument only on Windows.
+# Otherwise, you get "No packages or classes specified." due
+# to $(CLASSPATH_SEPARATOR) being interpreted as an end of
+# command (newline or shell ; character)
+ALL_SOURCE_DIRS = $(SHARE_SRC)/classes \
+ $(IMPORTSRCDIR) \
+ $(GENSRCDIR) \
+ $(SHARE_SRC)/../solaris/classes \
+ $(SHARE_SRC)/../windows/classes \
+ $(SHARE_SRC)/doc/stub
+EMPTY:=
+SPACE:= $(EMPTY) $(EMPTY)
+RELEASEDOCS_SOURCEPATH = \
+ $(subst $(SPACE),$(CLASSPATH_SEPARATOR),$(strip $(ALL_SOURCE_DIRS)))
+
+# Prep for javadoc creation, assumes $@ is an index.html file
+define prep-javadoc
+@if [ -f "$@" -a "$?" != "" ] ; then \
+ $(ECHO) "# Dependencies have changed: $?"; \
+fi
+$(RM) -r $(@D)
+$(MKDIR) -p $(@D)
+endef
+
+# A cache of the directories in ALL_SOURCE_DIRS
+DIRECTORY_CACHE = $(DOCSTMPDIR)/directory.cache
+
+# Given a list of packages, return a list of files or dirs to be dependent on
+# (Currently only returning a list of directories)
+define PackageDependencies # packages
+$(shell \
+ if [ "$1" != "" -a -f $(DIRECTORY_CACHE) ] ; then \
+ for p in $1 ; do \
+ pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`; \
+ $(CAT) $(DIRECTORY_CACHE) | $(GREP) "/$${pd}/" ; \
+ done; \
+ fi \
+)
+endef
+
+# Given a list of packages, add packages that exist to $@, print summary
+define PackageFilter # packages
+@if [ "$1" != "" ] ; then \
+ for p in $1 ; do \
+ pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`; \
+ found="false"; \
+ for cp in $(ALL_SOURCE_DIRS) ; do \
+ if [ -d $${cp}/$${pd} ] ; then \
+ $(ECHO) "$${p}" >> $@; \
+ found="true"; \
+ break; \
+ fi; \
+ done; \
+ if [ "$${found}" = "false" ] ; then \
+ $(ECHO) "WARNING: Package not found: $${p}"; \
+ fi; \
+ done; \
+fi
+endef
+
+# Print out a summary of the javadoc command about to be run
+define JavadocSummary # optionsfile packagesfile
+@$(ECHO) "# Summary for $@";\
+ $(ECHO) "# Options (`$(BASENAME) $1`):"; $(SED) -e 's@^@# @' $1; \
+ $(ECHO) "# Packages (`$(BASENAME) $2`):";$(SED) -e 's@^@# @' $2
+endef
+
#
-# Variables used by docs target
+# Temporary directory for javadoc creation
#
-DOCSTMPDIR = $(TEMPDIR)/doctmp
+DOCSTMPDIR = $(TEMPDIR)/doctmp
+#
+# Different api directories created from root directory
+#
+COREAPI_DOCSDIR = $(DOCSDIR)/api
+JDK_API_DOCSDIR = $(DOCSDIR)/jdk/api
+JRE_API_DOCSDIR = $(DOCSDIR)/jre/api
+PLATFORM_DOCSDIR = $(DOCSDIR)/platform
+
+# The non-core api javadocs need to be able to access the root of the core
+# api directory, so for jdk/api or jre/api to get to the core api/
+# directory we would use this:
+JDKJRE2COREAPI = ../../api
+
+# Common bottom argument
+define CommonBottom # year
+
$(JAVA_TRADEMARK_LINE)
\
+$(call CopyrightLine,,$1,$(COMPANY_ADDRESS))\
+
+endef
+
+# Core api bottom argument (with special sauce)
+COREAPI_BOTTOM = $(BUG_SUBMIT_LINE)\
+
For further API reference and developer documentation, \
+see Java SE Documentation. \
+That documentation contains more detailed, developer-targeted descriptions, \
+with conceptual overviews, definitions of terms, workarounds, \
+and working code examples.
DRAFT '$(MILESTONE)-$(BUILD_NUMBER)''
-THIS_YEAR := $(shell $(DATE) | $(SED) -e 's/ / /g' | $(CUT) -d' ' -f6)
-TRADEMARK = &\#x2122;
+# Draft used for non-fcs documents
+JDK_IS_FCS = false
+DRAFT_HEADER =
+ifeq ($(JDK_MINOR_VERSION),5)
+ JDK_IS_FCS = true
+endif
+ifeq ($(JDK_MINOR_VERSION),6)
+ JDK_IS_FCS = true
+endif
+ifeq ($(JDK_IS_FCS),false)
+ ifneq ($(MILESTONE), fcs)
+ DRAFT_HEADER =
DRAFT $(MILESTONE)-$(BUILD_NUMBER)
+ DRAFT_BOTTOM =
DRAFT $(MILESTONE)-$(BUILD_NUMBER)
+ DRAFT_WINTITLE = $(BUILD_NUMBER)
+ # Early access top text (not used in FCS releases)
+ COREAPI_TOP_EARLYACCESS = \
+
Copyright $(THIS_YEAR) Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Also see the documentation redistribution policy.
' -JAVADOCOVERVIEW = $(SHARE_SRC)/classes/overview-core.html +# Create a file with the package names in it +$(COREAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(CORE_PKGS)) + $(prep-target) + $(call PackageFilter,$(CORE_PKGS)) +############################################################# # -# Early access top and bottom text (for snapshots, beta and rc) +# mirrordocs # -JAVADOCTOP_EARLYACCESS = 'Copyright $(THIS_YEAR) Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.
' -JAVADOCTITLE_EARLYACCESS = $(subst Specification,Documentation,$(JAVADOCTITLE)) +# Part of langtools +ifdef LANGTOOLS_DIST + ALL_OTHER_TARGETS += mirrordocs +endif + +MIRROR_DOCDIR := $(JDK_API_DOCSDIR)/apt/mirror +MIRROR2COREAPI := ../../$(JDKJRE2COREAPI) +MIRROR_DOCTITLE := Mirror API +MIRROR_WINDOWTITLE := Mirror API +MIRROR_HEADER := Mirror API +MIRROR_BOTTOM := $(call CommonBottom,$(MIRROR_FIRST_COPYRIGHT_YEAR)) +MIRROR_GROUPNAME := Packages +MIRROR_OVERVIEW := $(IMPORTSRCDIR)/com/sun/mirror/overview.html +MIRROR_REGEXP := com.sun.mirror.* +# MIRROR_PKGS is located in NON_CORE_PKGS.gmk + +# The index.html, options, and packages files +MIRROR_INDEX_FILE = $(MIRROR_DOCDIR)/index.html +MIRROR_OPTIONS_FILE = $(DOCSTMPDIR)/mirror.options +MIRROR_PACKAGES_FILE = $(DOCSTMPDIR)/mirror.packages + +mirrordocs: $(MIRROR_INDEX_FILE) + +# Set relative location to core api document root +$(MIRROR_INDEX_FILE): GET2DOCSDIR=$(MIRROR2COREAPI)/.. + +# Run javadoc if the index file is out of date or missing +$(MIRROR_INDEX_FILE): $(MIRROR_OPTIONS_FILE) $(MIRROR_PACKAGES_FILE) + $(prep-javadoc) + $(call JavadocSummary,$(MIRROR_OPTIONS_FILE),$(MIRROR_PACKAGES_FILE)) + $(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \ + @$(MIRROR_OPTIONS_FILE) @$(MIRROR_PACKAGES_FILE) + +# Create file with javadoc options in it +$(MIRROR_OPTIONS_FILE): $(MIRROR_OVERVIEW) + $(prep-target) + @($(ECHO) "$(COMMON_JAVADOCFLAGS)" ; \ + $(ECHO) "-sourcepath \"$(RELEASEDOCS_SOURCEPATH)\"" ; \ + $(ECHO) "-encoding ascii" ; \ + $(ECHO) "-overview $(MIRROR_OVERVIEW)" ; \ + $(ECHO) "-doctitle '$(MIRROR_DOCTITLE)'" ; \ + $(ECHO) "-windowtitle '$(MIRROR_WINDOWTITLE) $(DRAFT_WINTITLE)'";\ + $(ECHO) "-header '$(MIRROR_HEADER)$(DRAFT_HEADER)'" ; \ + $(ECHO) "-bottom '$(MIRROR_BOTTOM)$(DRAFT_BOTTOM)'" ; \ + $(ECHO) "-group $(MIRROR_GROUPNAME) $(MIRROR_REGEXP)" ; \ + $(ECHO) "-linkoffline $(MIRROR2COREAPI) $(COREAPI_DOCSDIR)/"; \ + ) >> $@ + +# Create a file with the package names in it +$(MIRROR_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(MIRROR_PKGS)) + $(prep-target) + $(call PackageFilter,$(MIRROR_PKGS)) + +############################################################# # -# Variables used by domapidocs target +# docletapidocs # -DOMAPI_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \ - -encoding ascii \ - -splitIndex \ - -doctitle $(DOMAPI_JAVADOCTITLE) \ - -windowtitle $(DOMAPI_JAVADOCWINDOWTITLE) \ - -header $(DOMAPI_JAVADOCHEADER) \ - -bottom $(DOMAPI_JAVADOCBOTTOM) \ - -group $(DOMAPI_GROUPNAME) $(DOMAPI_REGEXP) -DOMAPI_JAVADOCTITLE = 'Common DOM API' -DOMAPI_JAVADOCWINDOWTITLE = 'Common DOM API' -DOMAPI_JAVADOCHEADER = 'Common DOM API' -DOMAPI_JAVADOCBOTTOM = 'Submit a bug or feature
- * This method is called once immediately after instantiating this input
- * method.
- *
- * @param context the input method context for this input method
- * @exception NullPointerException if context is null
- */
- public void setInputMethodContext(InputMethodContext context) {
-
- impl.setInputMethodContext(context);
- }
-
- /**
- * Attempts to set the input locale. If the input method supports the
- * desired locale, it changes its behavior to support input for the locale
- * and returns true.
- * Otherwise, it returns false and does not change its behavior.
- *
- * This method is called - *
locale is null
- */
- public boolean setLocale(Locale locale) {
-
- if (locale.getLanguage().equals(this.locale.getLanguage())) {
- //System.out.println("returning true for locale " + locale);
- return true;
- }
- else {
- //System.out.println("returning false for locale " + locale);
- return false;
- }
- }
-
- /**
- * Returns the current input locale. Might return null in exceptional cases.
- * - * This method is called - *
- * This method is called - *
enable.
- * - * An input method that is enabled for composition interprets incoming - * events for both composition and control purposes, while a - * disabled input method does not interpret events for composition. - * Note however that events are passed on to the input method regardless - * whether it is enabled or not, and that an input method that is disabled - * for composition may still interpret events for control purposes, - * including to enable or disable itself for composition. - *
- * This method is called - *
- * This method is called - *
true if this input method is enabled for
- * composition; false otherwise.
- * @throws UnsupportedOperationException if this input method does not
- * support checking whether it is enabled for composition
- * @see #setCompositionEnabled
- */
- public boolean isCompositionEnabled() {
-
- return true;
- }
-
- /**
- * Starts the reconversion operation. The input method obtains the
- * text to be reconverted from the current client component using the
- * {@link java.awt.im.InputMethodRequests#getSelectedText InputMethodRequests.getSelectedText}
- * method. It can use other InputMethodRequests
- * methods to request additional information required for the
- * reconversion operation. The composed and committed text
- * produced by the operation is sent to the client component as a
- * sequence of InputMethodEvents. If the given text
- * cannot be reconverted, the same text should be sent to the
- * client component as committed text.
- *
- * This method is called by
- * {@link java.awt.im.InputContext#reconvert() InputContext.reconvert}.
- *
- * @throws UnsupportedOperationException if the input method does not
- * support the reconversion operation.
- */
- public void reconvert() {
-
- throw new UnsupportedOperationException("This input method does not reconvert.");
- }
-
- /**
- * Dispatches the event to the input method. If input method support is
- * enabled for the focussed component, incoming events of certain types
- * are dispatched to the current input method for this component before
- * they are dispatched to the component's methods or event listeners.
- * The input method decides whether it needs to handle the event. If it
- * does, it also calls the event's consume method; this
- * causes the event to not get dispatched to the component's event
- * processing methods or event listeners.
- *
- * Events are dispatched if they are instances of InputEvent or its - * subclasses. - * This includes instances of the AWT classes KeyEvent and MouseEvent. - *
- * This method is called by {@link java.awt.im.InputContext#dispatchEvent InputContext.dispatchEvent}.
- *
- * @param event the event being dispatched to the input method
- * @exception NullPointerException if event is null
- */
- public void dispatchEvent(AWTEvent event) {
-
- if (event instanceof KeyEvent) {
-
- KeyEvent keyEvent = (KeyEvent) event;
- if (event.getID() == KeyEvent.KEY_TYPED) {
- impl.handleKeyTyped(keyEvent);
- }
- //System.out.println("handled event " + event);
- }
- else {
- //System.out.println("did not handle event " + event);
- }
- }
-
- /**
- * Notifies this input method of changes in the client window
- * location or state. This method is called while this input
- * method is the current input method of its input context and
- * notifications for it are enabled (see {@link
- * InputMethodContext#enableClientWindowNotification
- * InputMethodContext.enableClientWindowNotification}). Calls
- * to this method are temporarily suspended if the input context's
- * {@link java.awt.im.InputContext#removeNotify removeNotify}
- * method is called, and resume when the input method is activated
- * for a new client component. It is called in the following
- * situations:
- *
enableClientWindowNotification(inputMethod,
- * true) if the current client component exists,enableClientWindowNotification(inputMethod,
- * true) if during the call no current client component was
- * available,- * If an input method provides its own windows, it should make sure - * at this point that all necessary windows are open and visible. - *
- * This method is called - *
- * If an input method provides its own windows, only windows that relate - * to the current composition (such as a lookup choice window) should be - * closed at this point. - * It is possible that the input method will be immediately activated again - * for a different client component, and closing and reopening more - * persistent windows (such as a control panel) would create unnecessary - * screen flicker. - * Before an instance of a different input method class is activated, - * {@link #hideWindows} is called on the current input method. - *
- * This method is called - *
- * This method is called - *
- * This method is called by {@link java.awt.im.InputContext#removeNotify InputContext.removeNotify}. - *
- * The method is only called when the input method is inactive. - */ - public void removeNotify() { - } - - /** - * Ends any input composition that may currently be going on in this - * context. Depending on the platform and possibly user preferences, - * this may commit or delete uncommitted text. Any changes to the text - * are communicated to the active component using an input method event. - * - *
- * A text editing component may call this in a variety of situations, - * for example, when the user moves the insertion point within the text - * (but outside the composed text), or when the component's text is - * saved to a file or copied to the clipboard. - *
- * This method is called - *
- * This method is called by {@link java.awt.im.InputContext#dispose InputContext.dispose}. - *
- * The method is only called when the input method is inactive. - * No method of this interface is called on this instance after dispose. - */ - public void dispose() { - } - - /** - * Returns a control object from this input method, or null. A - * control object provides methods that control the behavior of the - * input method or obtain information from the input method. The type - * of the object is an input method specific class. Clients have to - * compare the result against known input method control object - * classes and cast to the appropriate class to invoke the methods - * provided. - *
- * This method is called by - * {@link java.awt.im.InputContext#getInputMethodControlObject InputContext.getInputMethodControlObject}. - * - * @return a control object from this input method, or null - */ - public Object getControlObject() { - - return null; - } -} diff --git a/src/share/classes/com/sun/inputmethods/internal/indicim/IndicInputMethodImpl.java b/src/share/classes/com/sun/inputmethods/internal/indicim/IndicInputMethodImpl.java deleted file mode 100644 index 4da58d9afedefb2d756e8ce95860296ea0533095..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/indicim/IndicInputMethodImpl.java +++ /dev/null @@ -1,475 +0,0 @@ -/* - * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * (C) Copyright IBM Corp. 2000 - All Rights Reserved - * - * The original version of this source code and documentation is - * copyrighted and owned by IBM. These materials are provided - * under terms of a License Agreement between IBM and Sun. - * This technology is protected by multiple US and International - * patents. This notice and attribution to IBM may not be removed. - * - */ - -package com.sun.inputmethods.internal.indicim; - -import java.awt.im.spi.InputMethodContext; - -import java.awt.event.KeyEvent; -import java.awt.event.InputMethodEvent; -import java.awt.font.TextAttribute; -import java.awt.font.TextHitInfo; - -import java.text.AttributedCharacterIterator; - -import java.util.Hashtable; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -class IndicInputMethodImpl { - - protected char[] KBD_MAP; - - private static final char SUBSTITUTION_BASE = '\uff00'; - - // Indexed by map value - SUBSTITUTION_BASE - protected char[][] SUBSTITUTION_TABLE; - - // Invalid character. - private static final char INVALID_CHAR = '\uffff'; - - // Unmapped versions of some interesting characters. - private static final char KEY_SIGN_VIRAMA = '\u0064'; // or just 'd'?? - private static final char KEY_SIGN_NUKTA = '\u005d'; // or just ']'?? - - // Two succeeding viramas are replaced by one virama and one ZWNJ. - // Viram followed by Nukta is replaced by one VIRAMA and one ZWJ - private static final char ZWJ = '\u200d'; - private static final char ZWNJ = '\u200c'; - - // Backspace - private static final char BACKSPACE = '\u0008'; - - // Sorted list of characters which can be followed by Nukta - protected char[] JOIN_WITH_NUKTA; - - // Nukta form of the above characters - protected char[] NUKTA_FORM; - - private int log2; - private int power; - private int extra; - - // cached TextHitInfo. Only one type of TextHitInfo is required. - private static final TextHitInfo ZERO_TRAILING_HIT_INFO = TextHitInfo.trailing(0); - - /** - * Returns the index of the given character in the JOIN_WITH_NUKTA array. - * If character is not found, -1 is returned. - */ - private int nuktaIndex(char ch) { - - if (JOIN_WITH_NUKTA == null) { - return -1; - } - - int probe = power; - int index = 0; - - if (JOIN_WITH_NUKTA[extra] <= ch) { - index = extra; - } - - while (probe > (1 << 0)) { - probe >>= 1; - - if (JOIN_WITH_NUKTA[index + probe] <= ch) { - index += probe; - } - } - - if (JOIN_WITH_NUKTA[index] != ch) { - index = -1; - } - - return index; - } - - /** - * Returns the equivalent character for hindi locale. - * @param originalChar The original character. - */ - private char getMappedChar( char originalChar ) - { - if (originalChar <= KBD_MAP.length) { - return KBD_MAP[originalChar]; - } - - return originalChar; - }//getMappedChar() - - // Array used to hold the text to be sent. - // If the last character was not committed it is stored in text[0]. - // The variable totalChars give an indication of whether the last - // character was committed or not. If at any time ( but not within a - // a call to dispatchEvent ) totalChars is not equal to 0 ( it can - // only be 1 otherwise ) the last character was not committed. - private char [] text = new char[4]; - - // this is always 0 before and after call to dispatchEvent. This character assumes - // significance only within a call to dispatchEvent. - private int committedChars = 0;// number of committed characters - - // the total valid characters in variable text currently. - private int totalChars = 0;//number of total characters ( committed + composed ) - - private boolean lastCharWasVirama = false; - - private InputMethodContext context; - - // - // Finds the high bit by binary searching - // through the bits in n. - // - private static byte highBit(int n) - { - if (n <= 0) { - return -32; - } - - byte bit = 0; - - if (n >= 1 << 16) { - n >>= 16; - bit += 16; - } - - if (n >= 1 << 8) { - n >>= 8; - bit += 8; - } - - if (n >= 1 << 4) { - n >>= 4; - bit += 4; - } - - if (n >= 1 << 2) { - n >>= 2; - bit += 2; - } - - if (n >= 1 << 1) { - n >>= 1; - bit += 1; - } - - return bit; - } - - IndicInputMethodImpl(char[] keyboardMap, char[] joinWithNukta, char[] nuktaForm, - char[][] substitutionTable) { - KBD_MAP = keyboardMap; - JOIN_WITH_NUKTA = joinWithNukta; - NUKTA_FORM = nuktaForm; - SUBSTITUTION_TABLE = substitutionTable; - - if (JOIN_WITH_NUKTA != null) { - int log2 = highBit(JOIN_WITH_NUKTA.length); - - power = 1 << log2; - extra = JOIN_WITH_NUKTA.length - power; - } else { - power = extra = 0; - } - - } - - void setInputMethodContext(InputMethodContext context) { - - this.context = context; - } - - void handleKeyTyped(KeyEvent kevent) { - - char keyChar = kevent.getKeyChar(); - char currentChar = getMappedChar(keyChar); - - // The Explicit and Soft Halanta case. - if ( lastCharWasVirama ) { - switch (keyChar) { - case KEY_SIGN_NUKTA: - currentChar = ZWJ; - break; - case KEY_SIGN_VIRAMA: - currentChar = ZWNJ; - break; - default: - }//endSwitch - }//endif - - if (currentChar == INVALID_CHAR) { - kevent.consume(); - return; - } - - if (currentChar == BACKSPACE) { - lastCharWasVirama = false; - - if (totalChars > 0) { - totalChars = committedChars = 0; - } else { - return; - } - } - else if (keyChar == KEY_SIGN_NUKTA) { - int nuktaIndex = nuktaIndex(text[0]); - - if (nuktaIndex != -1) { - text[0] = NUKTA_FORM[nuktaIndex]; - } else { - // the last character was committed, commit just Nukta. - // Note : the lastChar must have been committed if it is not one of - // the characters which combine with nukta. - // the state must be totalChars = committedChars = 0; - text[totalChars++] = currentChar; - } - - committedChars += 1; - } - else { - int nuktaIndex = nuktaIndex(currentChar); - - if (nuktaIndex != -1) { - // Commit everything but currentChar - text[totalChars++] = currentChar; - committedChars = totalChars-1; - } else { - if (currentChar >= SUBSTITUTION_BASE) { - char[] sub = SUBSTITUTION_TABLE[currentChar - SUBSTITUTION_BASE]; - - System.arraycopy(sub, 0, text, totalChars, sub.length); - totalChars += sub.length; - } else { - text[totalChars++] = currentChar; - } - - committedChars = totalChars; - } - } - - ACIText aText = new ACIText( text, 0, totalChars, committedChars ); - int composedCharLength = totalChars - committedChars; - TextHitInfo caret=null,visiblePosition=null; - switch( composedCharLength ) { - case 0: - break; - case 1: - visiblePosition = caret = ZERO_TRAILING_HIT_INFO; - break; - default: - assert false : "The code should not reach here. There is no case where there can be more than one character pending."; - } - - context.dispatchInputMethodEvent(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, - aText, - committedChars, - caret, - visiblePosition); - - if (totalChars == 0) { - text[0] = INVALID_CHAR; - } else { - text[0] = text[totalChars - 1];// make text[0] hold the last character - } - - lastCharWasVirama = keyChar == KEY_SIGN_VIRAMA && !lastCharWasVirama; - - totalChars -= committedChars; - committedChars = 0; - // state now text[0] = last character - // totalChars = ( last character committed )? 0 : 1; - // committedChars = 0; - - kevent.consume();// prevent client from getting this event. - }//dispatchEvent() - - void endComposition() { - if( totalChars != 0 ) {// if some character is not committed. - ACIText aText = new ACIText( text, 0, totalChars, totalChars ); - context.dispatchInputMethodEvent( InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, - aText, totalChars, null, null ); - totalChars = committedChars = 0; - text[0] = INVALID_CHAR; - lastCharWasVirama = false; - }//end if - }//endComposition() - - // custom AttributedCharacterIterator -- much lightweight since currently there is no - // attribute defined on the text being generated by the input method. - private class ACIText implements AttributedCharacterIterator { - private char [] text = null; - private int committed = 0; - private int index = 0; - - ACIText( char [] chArray, int offset, int length, int committed ) { - this.text = new char[length]; - this.committed = committed; - System.arraycopy( chArray, offset, text, 0, length ); - }//c'tor - - // CharacterIterator methods. - public char first() { - return _setIndex( 0 ); - } - - public char last() { - if( text.length == 0 ) { - return _setIndex( text.length ); - } - return _setIndex( text.length - 1 ); - } - - public char current() { - if( index == text.length ) - return DONE; - return text[index]; - } - - public char next() { - if( index == text.length ) { - return DONE; - } - return _setIndex( index + 1 ); - } - - public char previous() { - if( index == 0 ) - return DONE; - return _setIndex( index - 1 ); - } - - public char setIndex(int position) { - if( position < 0 || position > text.length ) { - throw new IllegalArgumentException(); - } - return _setIndex( position ); - } - - public int getBeginIndex() { - return 0; - } - - public int getEndIndex() { - return text.length; - } - - public int getIndex() { - return index; - } - - public Object clone() { - try { - ACIText clone = (ACIText) super.clone(); - return clone; - } catch (CloneNotSupportedException e) { - throw new InternalError(); - } - } - - - // AttributedCharacterIterator methods. - public int getRunStart() { - return index >= committed ? committed : 0; - } - - public int getRunStart(AttributedCharacterIterator.Attribute attribute) { - return (index >= committed && - attribute == TextAttribute.INPUT_METHOD_UNDERLINE) ? committed : 0; - } - - public int getRunStart(Set extends Attribute> attributes) { - return (index >= committed && - attributes.contains(TextAttribute.INPUT_METHOD_UNDERLINE)) ? committed : 0; - } - - public int getRunLimit() { - return index < committed ? committed : text.length; - } - - public int getRunLimit(AttributedCharacterIterator.Attribute attribute) { - return (index < committed && - attribute == TextAttribute.INPUT_METHOD_UNDERLINE) ? committed : text.length; - } - - public int getRunLimit(Set extends Attribute> attributes) { - return (index < committed && - attributes.contains(TextAttribute.INPUT_METHOD_UNDERLINE)) ? committed : text.length; - } - - public Map getAttributes() { - Hashtable result = new Hashtable(); - if (index >= committed && committed < text.length) { - result.put(TextAttribute.INPUT_METHOD_UNDERLINE, - TextAttribute.UNDERLINE_LOW_ONE_PIXEL); - } - return result; - } - - public Object getAttribute(AttributedCharacterIterator.Attribute attribute) { - if (index >= committed && - committed < text.length && - attribute == TextAttribute.INPUT_METHOD_UNDERLINE) { - - return TextAttribute.UNDERLINE_LOW_ONE_PIXEL; - } - return null; - } - - public Set getAllAttributeKeys() { - HashSet result = new HashSet(); - if (committed < text.length) { - result.add(TextAttribute.INPUT_METHOD_UNDERLINE); - } - return result; - } - - // private methods - - /** - * This is always called with valid i ( 0 < i <= text.length ) - */ - private char _setIndex( int i ) { - index = i; - if( i == text.length ) { - return DONE; - } - return text[i]; - }//_setIndex() - - }//end of inner class -} diff --git a/src/share/classes/com/sun/inputmethods/internal/indicim/java.awt.im.spi.InputMethodDescriptor b/src/share/classes/com/sun/inputmethods/internal/indicim/java.awt.im.spi.InputMethodDescriptor deleted file mode 100644 index f06b181876d01bd350b14e905928fc43533b9312..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/indicim/java.awt.im.spi.InputMethodDescriptor +++ /dev/null @@ -1 +0,0 @@ -com.sun.inputmethods.internal.indicim.DevanagariInputMethodDescriptor diff --git a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames.properties b/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames.properties deleted file mode 100644 index f0feb6395c034f33c150f09061e2453ce4881610..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames.properties +++ /dev/null @@ -1,6 +0,0 @@ -# -# Default Input method display names for Indic input methods -# - -DisplayName.Devanagari = Devanagari Input Method - diff --git a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_de.properties b/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_de.properties deleted file mode 100644 index c460ffeb914a86975d10b15f8f53c23f5e7a74c7..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_de.properties +++ /dev/null @@ -1,5 +0,0 @@ -# -# Default Input method display names for Indic input methods -# - -DisplayName.Devanagari = Devanagari Input Method diff --git a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_es.properties b/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_es.properties deleted file mode 100644 index c460ffeb914a86975d10b15f8f53c23f5e7a74c7..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_es.properties +++ /dev/null @@ -1,5 +0,0 @@ -# -# Default Input method display names for Indic input methods -# - -DisplayName.Devanagari = Devanagari Input Method diff --git a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_fr.properties b/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_fr.properties deleted file mode 100644 index c460ffeb914a86975d10b15f8f53c23f5e7a74c7..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_fr.properties +++ /dev/null @@ -1,5 +0,0 @@ -# -# Default Input method display names for Indic input methods -# - -DisplayName.Devanagari = Devanagari Input Method diff --git a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_it.properties b/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_it.properties deleted file mode 100644 index c460ffeb914a86975d10b15f8f53c23f5e7a74c7..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_it.properties +++ /dev/null @@ -1,5 +0,0 @@ -# -# Default Input method display names for Indic input methods -# - -DisplayName.Devanagari = Devanagari Input Method diff --git a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_ja.properties b/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_ja.properties deleted file mode 100644 index e668c6e5c5a7766778a9b98b6360f3c1c8741622..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_ja.properties +++ /dev/null @@ -1,5 +0,0 @@ -# -# Default Input method display names for Indic input methods -# - -DisplayName.Devanagari = \u30c7\u30fc\u30f4\u30a1\u30ca\u30fc\u30ac\u30ea\u30fc\u30a4\u30f3\u30d7\u30c3\u30c8\u30e1\u30bd\u30c3\u30c9 diff --git a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_ko.properties b/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_ko.properties deleted file mode 100644 index 514b240ca4bb7588ec1a1a90ca02333b3fe4fc1e..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_ko.properties +++ /dev/null @@ -1,5 +0,0 @@ -# -# Default Input method display names for Indic input methods -# - -DisplayName.Devanagari = Devanagari \uc785\ub825 \uba54\uc18c\ub4dc diff --git a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_sv.properties b/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_sv.properties deleted file mode 100644 index c460ffeb914a86975d10b15f8f53c23f5e7a74c7..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_sv.properties +++ /dev/null @@ -1,5 +0,0 @@ -# -# Default Input method display names for Indic input methods -# - -DisplayName.Devanagari = Devanagari Input Method diff --git a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_zh_CN.properties b/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_zh_CN.properties deleted file mode 100644 index 895fd8f8e6d8237c3964731243f5fd3978d35420..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_zh_CN.properties +++ /dev/null @@ -1,5 +0,0 @@ -# -# Default Input method display names for Indic input methods -# - -DisplayName.Devanagari = Devanagari \u8f93\u5165\u6cd5 diff --git a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_zh_TW.properties b/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_zh_TW.properties deleted file mode 100644 index 6b228d84ce2d02dc6b6cb1a7484547f7e2969837..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames_zh_TW.properties +++ /dev/null @@ -1,5 +0,0 @@ -# -# Default Input method display names for Indic input methods -# - -DisplayName.Devanagari = Devanagari \u8f38\u5165\u6cd5 diff --git a/src/share/classes/com/sun/inputmethods/internal/thaiim/ThaiInputMethod.java b/src/share/classes/com/sun/inputmethods/internal/thaiim/ThaiInputMethod.java deleted file mode 100644 index 40e6cc8ff0f5deb9d7e3336a3b967ce827ddba14..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/thaiim/ThaiInputMethod.java +++ /dev/null @@ -1,437 +0,0 @@ -/* - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * - * (C) Copyright IBM Corp. 2000 - All Rights Reserved - * - * The original version of this source code and documentation is - * copyrighted and owned by IBM. These materials are provided - * under terms of a License Agreement between IBM and Sun. - * This technology is protected by multiple US and International - * patents. This notice and attribution to IBM may not be removed. - * - */ - -package com.sun.inputmethods.internal.thaiim; - -import java.awt.im.spi.InputMethod; -import java.awt.im.spi.InputMethodContext; - -import java.awt.AWTEvent; -import java.awt.Rectangle; - -import java.awt.event.KeyEvent; -import java.awt.event.MouseEvent; - -import java.lang.Character.Subset; - -import java.util.Locale; - -class ThaiInputMethod implements InputMethod { - - private ThaiInputMethodImpl impl; - private Locale locale; - - ThaiInputMethod(Locale theLocale, ThaiInputMethodImpl theImplementation) { - locale = theLocale; - impl = theImplementation; - } - - /** - * Sets the input method context, which is used to dispatch input method - * events to the client component and to request information from - * the client component. - *
- * This method is called once immediately after instantiating this input
- * method.
- *
- * @param context the input method context for this input method
- * @exception NullPointerException if context is null
- */
- public void setInputMethodContext(InputMethodContext context) {
-
- impl.setInputMethodContext(context);
- }
-
- /**
- * Attempts to set the input locale. If the input method supports the
- * desired locale, it changes its behavior to support input for the locale
- * and returns true.
- * Otherwise, it returns false and does not change its behavior.
- *
- * This method is called - *
locale is null
- */
- public boolean setLocale(Locale locale) {
-
- if (locale.getLanguage().equals(this.locale.getLanguage())) {
- //System.out.println("returning true for locale " + locale);
- return true;
- }
- else {
- //System.out.println("returning false for locale " + locale);
- return false;
- }
- }
-
- /**
- * Returns the current input locale. Might return null in exceptional cases.
- * - * This method is called - *
- * This method is called - *
enable.
- * - * An input method that is enabled for composition interprets incoming - * events for both composition and control purposes, while a - * disabled input method does not interpret events for composition. - * Note however that events are passed on to the input method regardless - * whether it is enabled or not, and that an input method that is disabled - * for composition may still interpret events for control purposes, - * including to enable or disable itself for composition. - *
- * This method is called - *
- * This method is called - *
true if this input method is enabled for
- * composition; false otherwise.
- * @throws UnsupportedOperationException if this input method does not
- * support checking whether it is enabled for composition
- * @see #setCompositionEnabled
- */
- public boolean isCompositionEnabled() {
-
- return true;
- }
-
- /**
- * Starts the reconversion operation. The input method obtains the
- * text to be reconverted from the current client component using the
- * {@link java.awt.im.InputMethodRequests#getSelectedText InputMethodRequests.getSelectedText}
- * method. It can use other InputMethodRequests
- * methods to request additional information required for the
- * reconversion operation. The composed and committed text
- * produced by the operation is sent to the client component as a
- * sequence of InputMethodEvents. If the given text
- * cannot be reconverted, the same text should be sent to the
- * client component as committed text.
- *
- * This method is called by
- * {@link java.awt.im.InputContext#reconvert() InputContext.reconvert}.
- *
- * @throws UnsupportedOperationException if the input method does not
- * support the reconversion operation.
- */
- public void reconvert() {
-
- throw new UnsupportedOperationException("This input method does not reconvert.");
- }
-
- /**
- * Dispatches the event to the input method. If input method support is
- * enabled for the focussed component, incoming events of certain types
- * are dispatched to the current input method for this component before
- * they are dispatched to the component's methods or event listeners.
- * The input method decides whether it needs to handle the event. If it
- * does, it also calls the event's consume method; this
- * causes the event to not get dispatched to the component's event
- * processing methods or event listeners.
- *
- * Events are dispatched if they are instances of InputEvent or its - * subclasses. - * This includes instances of the AWT classes KeyEvent and MouseEvent. - *
- * This method is called by {@link java.awt.im.InputContext#dispatchEvent InputContext.dispatchEvent}.
- *
- * @param event the event being dispatched to the input method
- * @exception NullPointerException if event is null
- */
- public void dispatchEvent(AWTEvent event) {
-
- if (event instanceof KeyEvent) {
-
- KeyEvent keyEvent = (KeyEvent) event;
- if (event.getID() == KeyEvent.KEY_TYPED) {
- //System.out.println("handled event " + event);
- impl.handleKeyTyped(keyEvent);
- }
- }
- else {
- //System.out.println("did not handle event " + event);
- }
- }
-
- /**
- * Notifies this input method of changes in the client window
- * location or state. This method is called while this input
- * method is the current input method of its input context and
- * notifications for it are enabled (see {@link
- * InputMethodContext#enableClientWindowNotification
- * InputMethodContext.enableClientWindowNotification}). Calls
- * to this method are temporarily suspended if the input context's
- * {@link java.awt.im.InputContext#removeNotify removeNotify}
- * method is called, and resume when the input method is activated
- * for a new client component. It is called in the following
- * situations:
- *
enableClientWindowNotification(inputMethod,
- * true) if the current client component exists,enableClientWindowNotification(inputMethod,
- * true) if during the call no current client component was
- * available,- * If an input method provides its own windows, it should make sure - * at this point that all necessary windows are open and visible. - *
- * This method is called - *
- * If an input method provides its own windows, only windows that relate - * to the current composition (such as a lookup choice window) should be - * closed at this point. - * It is possible that the input method will be immediately activated again - * for a different client component, and closing and reopening more - * persistent windows (such as a control panel) would create unnecessary - * screen flicker. - * Before an instance of a different input method class is activated, - * {@link #hideWindows} is called on the current input method. - *
- * This method is called - *
- * This method is called - *
- * This method is called by {@link java.awt.im.InputContext#removeNotify InputContext.removeNotify}. - *
- * The method is only called when the input method is inactive. - */ - public void removeNotify() { - } - - /** - * Ends any input composition that may currently be going on in this - * context. Depending on the platform and possibly user preferences, - * this may commit or delete uncommitted text. Any changes to the text - * are communicated to the active component using an input method event. - * - *
- * A text editing component may call this in a variety of situations, - * for example, when the user moves the insertion point within the text - * (but outside the composed text), or when the component's text is - * saved to a file or copied to the clipboard. - *
- * This method is called - *
- * This method is called by {@link java.awt.im.InputContext#dispose InputContext.dispose}. - *
- * The method is only called when the input method is inactive. - * No method of this interface is called on this instance after dispose. - */ - public void dispose() { - } - - /** - * Returns a control object from this input method, or null. A - * control object provides methods that control the behavior of the - * input method or obtain information from the input method. The type - * of the object is an input method specific class. Clients have to - * compare the result against known input method control object - * classes and cast to the appropriate class to invoke the methods - * provided. - *
- * This method is called by - * {@link java.awt.im.InputContext#getInputMethodControlObject InputContext.getInputMethodControlObject}. - * - * @return a control object from this input method, or null - */ - public Object getControlObject() { - - return null; - } -} diff --git a/src/share/classes/com/sun/inputmethods/internal/thaiim/ThaiInputMethodDescriptor.java b/src/share/classes/com/sun/inputmethods/internal/thaiim/ThaiInputMethodDescriptor.java deleted file mode 100644 index 4d12a728df168ae2d9fa51e6547adfc6311a6e38..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/thaiim/ThaiInputMethodDescriptor.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * - * (C) Copyright IBM Corp. 2000 - All Rights Reserved - * - * The original version of this source code and documentation is - * copyrighted and owned by IBM. These materials are provided - * under terms of a License Agreement between IBM and Sun. - * This technology is protected by multiple US and International - * patents. This notice and attribution to IBM may not be removed. - * - */ - -package com.sun.inputmethods.internal.thaiim; - -import java.awt.Image; -import java.awt.im.spi.InputMethod; -import java.awt.im.spi.InputMethodDescriptor; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -public class ThaiInputMethodDescriptor implements InputMethodDescriptor { - - static final Locale THAI = new Locale("th"); - - public ThaiInputMethodDescriptor() { - } - - /** - * @see java.awt.im.spi.InputMethodDescriptor#getAvailableLocales - */ - public Locale[] getAvailableLocales() { - return new Locale[] { THAI }; - } - - /** - * @see java.awt.im.spi.InputMethodDescriptor#hasDynamicLocaleList - */ - public boolean hasDynamicLocaleList() { - return false; - } - - /** - * @see java.awt.im.spi.InputMethodDescriptor#getInputMethodDisplayName - */ - public synchronized String getInputMethodDisplayName(Locale inputLocale, Locale displayLanguage) { - try { - ResourceBundle resources = ResourceBundle.getBundle( - "com.sun.inputmethods.internal.thaiim.resources.DisplayNames", displayLanguage); - return resources.getString("DisplayName.Thai"); - } catch (MissingResourceException mre) { - return "Thai Input Method"; - } - } - - /** - * @see java.awt.im.spi.InputMethodDescriptor#getInputMethodIcon - */ - public Image getInputMethodIcon(Locale inputLocale) { - return null; - } - - /** - * @see java.awt.im.spi.InputMethodDescriptor#createInputMethod - */ - public InputMethod createInputMethod() throws Exception { - ThaiInputMethodImpl impl = new ThaiInputMethodImpl(); - return new ThaiInputMethod(THAI, impl); - } - - public String toString() { - return getClass().getName(); - } -} diff --git a/src/share/classes/com/sun/inputmethods/internal/thaiim/ThaiInputMethodImpl.java b/src/share/classes/com/sun/inputmethods/internal/thaiim/ThaiInputMethodImpl.java deleted file mode 100644 index 5cc66d97b52e44643666616a7be0b760d85b0d85..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/thaiim/ThaiInputMethodImpl.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * - * (C) Copyright IBM Corp. 2000 - All Rights Reserved - * - * The original version of this source code and documentation is - * copyrighted and owned by IBM. These materials are provided - * under terms of a License Agreement between IBM and Sun. - * This technology is protected by multiple US and International - * patents. This notice and attribution to IBM may not be removed. - * - */ - -package com.sun.inputmethods.internal.thaiim; - -import java.awt.im.InputMethodRequests; -import java.awt.im.spi.InputMethodContext; - -import java.awt.Toolkit; -import java.awt.event.KeyEvent; -import java.awt.event.InputMethodEvent; -import java.awt.font.TextAttribute; -import java.awt.font.TextHitInfo; - -import java.text.AttributedCharacterIterator; -import java.text.AttributedString; - -class ThaiInputMethodImpl { - - private static final char[] keyboardMap = { - /* 00 */ '\u0000', - /* 01 */ '\u0001', - /* 02 */ '\u0002', - /* 03 */ '\u0003', - /* 04 */ '\u0004', - /* 05 */ '\u0005', - /* 06 */ '\u0006', - /* 07 */ '\u0007', - /* 08 */ '\u0008', - /* 09 */ '\u0009', - /* 0A */ '\012', - /* 0B */ '\u000B', - /* 0C */ '\u000C', - /* 0D */ '\015', - /* 0E */ '\u000E', - /* 0F */ '\u000F', - /* 10 */ '\u0010', - /* 11 */ '\u0011', - /* 12 */ '\u0012', - /* 13 */ '\u0013', - /* 14 */ '\u0014', - /* 15 */ '\u0015', - /* 16 */ '\u0016', - /* 17 */ '\u0017', - /* 18 */ '\u0018', - /* 19 */ '\u0019', - /* 1A */ '\u001A', - /* 1B */ '\u001B', - /* 1C */ '\u001C', - /* 1D */ '\u001D', - /* 1E */ '\u001E', - /* 1F */ '\u001F', - /* 20 */ '\u0020', - /* 21 */ '\u0e45', // '!' - /* 22 */ '\u002e', // '"' - /* 23 */ '\u0e52', // '#' - /* 24 */ '\u0e53', // '$' - /* 25 */ '\u0e54', // '%' - /* 26 */ '\u0e4e', // '&' - /* 27 */ '\u0e07', // ''' - /* 28 */ '\u0e56', // '(' - /* 29 */ '\u0e57', // ')' - /* 2A */ '\u0e55', // '*' - /* 2B */ '\u0e59', // '+' - /* 2C */ '\u0e21', // ',' - /* 2D */ '\u0e02', // '-' - /* 2E */ '\u0e43', // '.' - /* 2F */ '\u0e1d', // '/' - /* 30 */ '\u0e08', // '0' - /* 31 */ '\u0e3f', // '1' - /* 32 */ '\u002f', // '2' - /* 33 */ '\u002d', // '3' - /* 34 */ '\u0e20', // '4' - /* 35 */ '\u0e16', // '5' - /* 36 */ '\u0e38', // '6' - /* 37 */ '\u0e36', // '7' - /* 38 */ '\u0e04', // '8' - /* 39 */ '\u0e15', // '9' - /* 3A */ '\u0e0b', // ':' - /* 3B */ '\u0e27', // ';' - /* 3C */ '\u0e12', // '<' - /* 3D */ '\u0e0a', // '=' - /* 3E */ '\u0e2c', // '>' - /* 3F */ '\u0e26', // '?' - /* 40 */ '\u0e51', // '@' - /* 41 */ '\u0e24', // 'A' - /* 42 */ '\u0e3a', // 'B' - /* 43 */ '\u0e09', // 'C' - /* 44 */ '\u0e0f', // 'D' - /* 45 */ '\u0e0e', // 'E' - /* 46 */ '\u0e42', // 'F' - /* 47 */ '\u0e0c', // 'G' - /* 48 */ '\u0e47', // 'H' - /* 49 */ '\u0e13', // 'I' - /* 4A */ '\u0e4b', // 'J' - /* 4B */ '\u0e29', // 'K' - /* 4C */ '\u0e28', // 'L' - /* 4D */ '\u003f', // 'M' - /* 4E */ '\u0e4c', // 'N' - /* 4F */ '\u0e2f', // 'O' - /* 50 */ '\u0e0d', // 'P' - /* 51 */ '\u0e50', // 'Q' - /* 52 */ '\u0e11', // 'R' - /* 53 */ '\u0e06', // 'S' - /* 54 */ '\u0e18', // 'T' - /* 55 */ '\u0e4a', // 'U' - /* 56 */ '\u0e2e', // 'V' - /* 57 */ '\u0022', // 'W' - /* 58 */ '\u0029', // 'X' - /* 59 */ '\u0e4d', // 'Y' - /* 5A */ '\u0028', // 'Z' - /* 5B */ '\u0e1a', // '[' - /* 5C */ '\u0e05', // '\' - /* 5D */ '\u0e25', // ']' - /* 5E */ '\u0e39', // '^' - /* 5F */ '\u0e58', // '_' - /* 60 */ '\u0e4f', // '`' - /* 61 */ '\u0e1f', // 'a' - /* 62 */ '\u0e34', // 'b' - /* 63 */ '\u0e41', // 'c' - /* 64 */ '\u0e01', // 'd' - /* 65 */ '\u0e33', // 'e' - /* 66 */ '\u0e14', // 'f' - /* 67 */ '\u0e40', // 'g' - /* 68 */ '\u0e49', // 'h' - /* 69 */ '\u0e23', // 'i' - /* 6A */ '\u0e48', // 'j' - /* 6B */ '\u0e32', // 'k' - /* 6C */ '\u0e2a', // 'l' - /* 6D */ '\u0e17', // 'm' - /* 6E */ '\u0e37', // 'n' - /* 6F */ '\u0e19', // 'o' - /* 70 */ '\u0e22', // 'p' - /* 71 */ '\u0e46', // 'q' - /* 72 */ '\u0e1e', // 'r' - /* 73 */ '\u0e2b', // 's' - /* 74 */ '\u0e30', // 't' - /* 75 */ '\u0e35', // 'u' - /* 76 */ '\u0e2d', // 'v' - /* 77 */ '\u0e44', // 'w' - /* 78 */ '\u0e1b', // 'x' - /* 79 */ '\u0e31', // 'y' - /* 7A */ '\u0e1c', // 'z' - /* 7B */ '\u0e10', // '{' - /* 7C */ '\u0e03', // '|' - /* 7D */ '\u002c', // '}' - /* 7E */ '\u0e5b', // '~' - /* 7F */ '\u007F' // - }; - - // cached TextHitInfo. Only one type of TextHitInfo is required. - private static final TextHitInfo ZERO_TRAILING_HIT_INFO = TextHitInfo.trailing(0); - - private ThaiRules rules; - - /** - * Returns the equivalent character for thai locale. - * @param originalChar The original character. - */ - private char getMappedChar( char originalChar ) - { - if (originalChar <= keyboardMap.length) { - return keyboardMap[originalChar]; - } - - return originalChar; - }//getMappedChar() - - private InputMethodContext context; - - void setInputMethodContext(InputMethodContext context) { - this.context = context; - rules = new ThaiRules((InputMethodRequests)context); - } - - void handleKeyTyped(KeyEvent kevent) { - char keyChar = kevent.getKeyChar(); - char currentChar = getMappedChar(keyChar); - if (!Character.UnicodeBlock.THAI.equals(Character.UnicodeBlock.of(currentChar))) { - // don't care - return; - } else if (rules.isInputValid(currentChar)) { - Character tmp = new Character(currentChar); - String tmp2 = tmp.toString(); - context.dispatchInputMethodEvent(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, - (new AttributedString(tmp2)).getIterator(), - 1, - ZERO_TRAILING_HIT_INFO, - ZERO_TRAILING_HIT_INFO); - } else { - // input sequence is not allowed - Toolkit.getDefaultToolkit().beep(); - } - - kevent.consume();// prevent client from getting this event. - return; - }//dispatchEvent() - - void endComposition() { - }//endComposition() -} diff --git a/src/share/classes/com/sun/inputmethods/internal/thaiim/ThaiRules.java b/src/share/classes/com/sun/inputmethods/internal/thaiim/ThaiRules.java deleted file mode 100644 index 02e4b6ed47969709c02aa5bd6f4434660e17b861..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/thaiim/ThaiRules.java +++ /dev/null @@ -1,348 +0,0 @@ -/* - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.inputmethods.internal.thaiim; - -import java.awt.im.InputMethodRequests; - -public class ThaiRules { - - public static final char BASE = 0x0e00; - - public static final byte NON = 0; - public static final byte CONS = 1; - public static final byte LV = 2; - public static final byte FV1 = 3; - public static final byte FV2 = 4; - public static final byte FV3 = 5; - public static final byte FV4 = 6; - /* Note that FV4 is added. It is not in WTT. - * We need it for SARA AM since it has a - * weired characteristic to share the same - * cell with whatever consonant preceeds it. - */ - public static final byte BV1 = 7; - public static final byte BV2 = 8; - public static final byte BD = 9; - public static final byte TONE = 10; - public static final byte AD1 = 11; - public static final byte AD2 = 12; - public static final byte AD3 = 13; - public static final byte AV1 = 14; - public static final byte AV2 = 15; - public static final byte AV3 = 16; - - /** - * Constants for validity checking and auto correction - */ - public static final byte STRICT = 0; - public static final byte LOOSE = 1; - public static final byte NOREPLACE = 2; - - public static final byte[] CHARTYPE = { - /* 0e00 UNUSED */ NON, - /* THAI CHARACTER KO KAI */ CONS, - /* THAI CHARACTER KHO KHAI */ CONS, - /* THAI CHARACTER KHO KHUAT */ CONS, - /* THAI CHARACTER KHO KHWAI */ CONS, - /* THAI CHARACTER KHO KHON */ CONS, - /* THAI CHARACTER KHO RAKHANG */ CONS, - /* THAI CHARACTER NGO NGU */ CONS, - /* THAI CHARACTER CHO CHAN */ CONS, - /* THAI CHARACTER CHO CHING */ CONS, - /* THAI CHARACTER CHO CHANG */ CONS, - /* THAI CHARACTER SO SO */ CONS, - /* THAI CHARACTER CHO CHOE */ CONS, - /* THAI CHARACTER YO YING */ CONS, - /* THAI CHARACTER DO CHADA */ CONS, - /* THAI CHARACTER TO PATAK */ CONS, - /* THAI CHARACTER THO THAN */ CONS, - /* THAI CHARACTER THO NANGMONTHO */ CONS, - /* THAI CHARACTER THO PHUTHAO */ CONS, - /* THAI CHARACTER NO NEN */ CONS, - /* THAI CHARACTER DO DEK */ CONS, - /* THAI CHARACTER TO TAO */ CONS, - /* THAI CHARACTER THO THUNG */ CONS, - /* THAI CHARACTER THO THAHAN */ CONS, - /* THAI CHARACTER THO THONG */ CONS, - /* THAI CHARACTER NO NU */ CONS, - /* THAI CHARACTER BO BAIMAI */ CONS, - /* THAI CHARACTER PO PLA */ CONS, - /* THAI CHARACTER PHO PHUNG */ CONS, - /* THAI CHARACTER FO FA */ CONS, - /* THAI CHARACTER PHO PHAN */ CONS, - /* THAI CHARACTER FO FAN */ CONS, - /* THAI CHARACTER PHO SAMPHAO */ CONS, - /* THAI CHARACTER MO MA */ CONS, - /* THAI CHARACTER YO YAK */ CONS, - /* THAI CHARACTER RO RUA */ CONS, - /* THAI CHARACTER RU */ FV3, - /* THAI CHARACTER LO LING */ CONS, - /* THAI CHARACTER LU */ FV3, - /* THAI CHARACTER WO WAEN */ CONS, - /* THAI CHARACTER SO SALA */ CONS, - /* THAI CHARACTER SO RUSI */ CONS, - /* THAI CHARACTER SO SUA */ CONS, - /* THAI CHARACTER HO HIP */ CONS, - /* THAI CHARACTER LO CHULA */ CONS, - /* THAI CHARACTER O ANG */ CONS, - /* THAI CHARACTER HO NOKHUK */ CONS, - /* THAI CHARACTER PAIYANNOI */ NON, - /* THAI CHARACTER SARA A */ FV1, - /* THAI CHARACTER MAI HAN-AKAT */ AV2, - /* THAI CHARACTER SARA AA */ FV1, - /* THAI CHARACTER SARA AM */ FV4, - /* THAI CHARACTER SARA I */ AV1, - /* THAI CHARACTER SARA II */ AV3, - /* THAI CHARACTER SARA UE */ AV2, - /* THAI CHARACTER SARA UEE */ AV3, - /* THAI CHARACTER SARA U */ BV1, - /* THAI CHARACTER SARA UU */ BV2, - /* THAI CHARACTER PHINTHU */ BD, - /* 0e3b UNUSED */ NON, - /* 0e3c UNUSED */ NON, - /* 0e3d UNUSED */ NON, - /* 0e3e UNUSED */ NON, - /* THAI CURRENCY SYMBOL BAHT */ NON, - /* THAI CHARACTER SARA E */ LV, - /* THAI CHARACTER SARA AE */ LV, - /* THAI CHARACTER SARA O */ LV, - /* THAI CHARACTER SARA AI MAIMUAN */ LV, - /* THAI CHARACTER SARA AI MAIMALAI */ LV, - /* THAI CHARACTER LAKKHANGYAO */ FV2, - /* THAI CHARACTER MAIYAMOK */ NON, - /* THAI CHARACTER MAITAIKHU */ AD2, - /* THAI CHARACTER MAI EK */ TONE, - /* THAI CHARACTER MAI THO */ TONE, - /* THAI CHARACTER MAI TRI */ TONE, - /* THAI CHARACTER MAI CHATTAWA */ TONE, - /* THAI CHARACTER THANTHAKHAT */ AD1, - /* THAI CHARACTER NIKHAHIT */ AD3, - /* THAI CHARACTER YAMAKKAN */ AD3, - /* THAI CHARACTER FONGMAN */ NON, - /* THAI DIGIT ZERO */ NON, - /* THAI DIGIT ONE */ NON, - /* THAI DIGIT TWO */ NON, - /* THAI DIGIT THREE */ NON, - /* THAI DIGIT FOUR */ NON, - /* THAI DIGIT FIVE */ NON, - /* THAI DIGIT SIX */ NON, - /* THAI DIGIT SEVEN */ NON, - /* THAI DIGIT EIGHT */ NON, - /* THAI DIGIT NINE */ NON, - /* THAI CHARACTER ANGKHANKHU */ NON, - /* THAI CHARACTER KHOMUT */ NON - }; - - private InputMethodRequests requests; - - ThaiRules(InputMethodRequests requests) { - this.requests = requests; - } - - public static byte getCharType(char c) { - byte cType; - int ci = ((int) c) - (int) BASE; - if (ci < 0 || ci >= CHARTYPE.length) - cType = NON; - else - cType = CHARTYPE[ci]; - return cType; - } - - private static boolean isValid(char c1, char c2, int[] validityArray) { - return ((validityArray[getCharType(c1)] - & (1 << getCharType(c2))) != 0); - } - - /** - * VALIDITY is a bit matrix defining whether one - * character is allowed to be typed in after the - * previous one (array index). Determining the - * validity is done by bit-anding the 2nd char - * type's mask (obtained by 1 << chartype) with - * the array element indexed by the first char - * type. If the result is non-zero, the 2nd - * character is allowed to follow the first. - */ - - /* Please note that the bits in the comment below - * are displayed least significant bit first. - * The actual value reflexs this representation - * when the bits are swapped. - */ - - private static final int[] INPUTVALIDITY = { - /* NON 1110 010 0 0000 0000 0 */ 0x00027, - /* CONS 1111 111 1 1111 1111 1 */ 0x1ffff, - /* LV 0100 000 0 0000 0000 0 */ 0x00002, - /* FV1 1110 010 0 0000 0000 0 */ 0x00027, - /* FV2 1110 010 0 0000 0000 0 */ 0x00027, - /* FV3 1110 110 0 0000 0000 0 */ 0x00037, - /* FV4 1110 010 0 0000 0000 0 */ 0x00027, - /* BV1 1110 010 0 0011 0000 0 */ 0x00c27, - /* BV2 1110 010 0 0010 0000 0 */ 0x00427, - /* BD 1110 010 0 0000 0000 0 */ 0x00027, - /* TONE 1111 011 0 0000 0000 0 */ 0x0006f, - /* AD1 1110 010 0 0000 0000 0 */ 0x00027, - /* AD2 1110 010 0 0000 0000 0 */ 0x00027, - /* AD3 1110 010 0 0000 0000 0 */ 0x00027, - /* AV1 1110 010 0 0011 0000 0 */ 0x00c27, - /* AV2 1110 010 0 0010 0000 0 */ 0x00427, - /* AV3 1110 010 0 0010 0100 0 */ 0x02427 - }; - - private static final int[] COMPOSABLE = { - /* NON 0000 000 0 0000 0000 0 */ 0x00000, - /* CONS 0000 001 1 1111 1111 1 */ 0x1ffc0, - /* LV 0000 000 0 0000 0000 0 */ 0x00000, - /* FV1 0000 000 0 0000 0000 0 */ 0x00000, - /* FV2 0000 000 0 0000 0000 0 */ 0x00000, - /* FV3 0000 000 0 0000 0000 0 */ 0x00000, - /* FV4 0000 000 0 0000 0000 0 */ 0x00000, - /* BV1 0000 000 0 0011 0000 0 */ 0x00c00, - /* BV2 0000 000 0 0010 0000 0 */ 0x00400, - /* BD 0000 000 0 0000 0000 0 */ 0x00000, - /* TONE 0000 001 0 0000 0000 0 */ 0x00040, - /* AD1 0000 000 0 0000 0000 0 */ 0x00000, - /* AD2 0000 000 0 0000 0000 0 */ 0x00000, - /* AD3 0000 000 0 0000 0000 0 */ 0x00000, - /* AV1 0000 000 0 0011 0000 0 */ 0x00c00, - /* AV2 0000 000 0 0010 0000 0 */ 0x00400, - /* AV3 0000 000 0 0010 0100 0 */ 0x02400 - }; - - private static final int[] REPLACABLE = { - /* NON 0000 000 0 0000 0000 0 */ 0x00000, - /* CONS 0000 000 0 0000 0000 0 */ 0x00000, - /* LV 0000 000 0 0000 0000 0 */ 0x00000, - /* FV1 0000 000 0 0000 0000 0 */ 0x00000, - /* FV2 0000 000 0 0000 0000 0 */ 0x00000, - /* FV3 0000 000 0 0000 0000 0 */ 0x00000, - /* FV4 0000 001 1 1001 1111 1 */ 0x1f9c0, - /* BV1 0000 001 1 1100 1111 1 */ 0x1f3c0, - /* BV2 0000 001 1 1101 1111 1 */ 0x1fbc0, - /* BD 0000 001 1 1111 1111 1 */ 0x1ffc0, - /* TONE 0000 000 0 0111 1100 0 */ 0x03e00, - /* AD1 0000 001 0 1111 1101 1 */ 0x1bf40, - /* AD2 0000 001 1 1111 1111 1 */ 0x1ffc0, - /* AD3 0000 001 1 1111 1111 0 */ 0x0ffc0, - /* AV1 0000 001 1 1100 1111 1 */ 0x1f3c0, - /* AV2 0000 001 1 1101 1111 1 */ 0x1fbc0, - /* AV3 0000 001 1 1101 1011 1 */ 0x1dbc0 - }; - - private static final int[] SWAPPABLE = { - /* NON 0000 000 0 0000 0000 0 */ 0x00000, - /* CONS 0000 000 0 0000 0000 0 */ 0x00000, - /* LV 0000 000 0 0000 0000 0 */ 0x00000, - /* FV1 0000 000 0 0000 0000 0 */ 0x00000, - /* FV2 0000 000 0 0000 0000 0 */ 0x00000, - /* FV3 0000 000 0 0000 0000 0 */ 0x00000, - /* FV4 0000 000 0 0010 0000 0 */ 0x00400, - /* BV1 0000 000 0 0000 0000 0 */ 0x00000, - /* BV2 0000 000 0 0000 0000 0 */ 0x00000, - /* BD 0000 000 0 0000 0000 0 */ 0x00000, - /* TONE 0000 000 1 1000 0011 1 */ 0x1c180, - /* AD1 0000 000 1 0000 0010 0 */ 0x04080, - /* AD2 0000 000 0 0000 0000 0 */ 0x00000, - /* AD3 0000 000 0 0000 0000 1 */ 0x10000, - /* AV1 0000 000 0 0000 0000 0 */ 0x00000, - /* AV2 0000 000 0 0000 0000 0 */ 0x00000, - /* AV3 0000 000 0 0000 0000 0 */ 0x00000 - }; - - public static boolean isInputValid(char c1, char c2) { - return isValid(c1, c2, INPUTVALIDITY); - } - - public static boolean isComposable(char c1, char c2) { - return isValid(c1, c2, COMPOSABLE); - } - - public static boolean isSwappable(char c1, char c2) { - return isValid(c1, c2, SWAPPABLE); - } - - public static boolean isReplacable(char c1, char c2) { - return isValid(c1, c2, REPLACABLE); - } - - public static boolean isForward(char c) { - return (getCharType(c) < FV4); - } - - public static boolean isDead(char c) { - return (getCharType(c) > FV3); - } - - public boolean isInputValid(char current) { - int offset = requests.getInsertPositionOffset(); - if (offset == 0) { - byte charType = getCharType(current); - return ((charType < FV1) || (charType == FV3)); - } - else { - char prev = requests.getCommittedText(offset-1, offset, null).first(); - - if(isForward(current)) { - if (isInputValid(prev, current)) { - if (getCharType(prev) == TONE && - getCharType(current) == FV1) { - if (offset == 1) { - return true; - } else { - char pprev = - requests.getCommittedText(offset-2, offset-1, null).first(); - return isInputValid(pprev, current); - } - } else { - return true; - } - } else if (prev == '\u0e32' && // SARA AA - current == '\u0e30') { // SARA A - return true; - } else if (prev == '\u0e4d' && // NIKAHIT - current == '\u0e32') { // SARA AA - // Special compose to SARA AM - return true; - } else { - return false; - } - } else { - if(isInputValid(prev, current)) { - if (getCharType(prev) == TONE && - getCharType(current) == FV4) { - return (offset != 1); - } else { - return true; - } - } else { - return false; - } - } - } - } -} diff --git a/src/share/classes/com/sun/inputmethods/internal/thaiim/java.awt.im.spi.InputMethodDescriptor b/src/share/classes/com/sun/inputmethods/internal/thaiim/java.awt.im.spi.InputMethodDescriptor deleted file mode 100644 index 9f60bbe9909908c376fe4b7ea8aa58992abb626e..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/thaiim/java.awt.im.spi.InputMethodDescriptor +++ /dev/null @@ -1 +0,0 @@ -com.sun.inputmethods.internal.thaiim.ThaiInputMethodDescriptor diff --git a/src/share/classes/com/sun/inputmethods/internal/thaiim/resources/DisplayNames.properties b/src/share/classes/com/sun/inputmethods/internal/thaiim/resources/DisplayNames.properties deleted file mode 100644 index e4528a49a5337f0fe21ffbbe1b06062ac5708f4e..0000000000000000000000000000000000000000 --- a/src/share/classes/com/sun/inputmethods/internal/thaiim/resources/DisplayNames.properties +++ /dev/null @@ -1,6 +0,0 @@ -# -# Default Input method display names for Thai input methods -# - -DisplayName.Thai = Thai Input Method - diff --git a/src/share/classes/com/sun/jarsigner/package.html b/src/share/classes/com/sun/jarsigner/package.html index 80a84aa5a2487d554cd907038c24a20fbc2f4e07..b00d655d9a20a51c3da47c850bc904eb1eb0cfb3 100644 --- a/src/share/classes/com/sun/jarsigner/package.html +++ b/src/share/classes/com/sun/jarsigner/package.html @@ -20,9 +20,9 @@ You should have received a copy of the GNU General Public License version 2 along with this work; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -CA 95054 USA or visit www.sun.com if you need additional information or -have any questions. +Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +or visit www.oracle.com if you need additional information or have any +questions. -->