diff --git a/.hgtags b/.hgtags index 254ea2ed37a..1dc26b87945 100644 --- a/.hgtags +++ b/.hgtags @@ -477,3 +477,4 @@ dfa46cfe56346884a61efdc30dc50f7505d66761 jdk-11+1 e59941f7247d451fa7df9eaef3fce0f492f8420c jdk-11+4 d5c43e9f08fb9a7c74aae0d48daf17f2ad2afaef jdk-11+5 3acb379b86725c47e7f33358cb22efa8752ae532 jdk-11+6 +f7363de371c9a1f668bd0a01b7df3d1ddb9cc58b jdk-11+7 diff --git a/make/CompileDemos.gmk b/make/CompileDemos.gmk index 695a8c2d456..a224c9b9418 100644 --- a/make/CompileDemos.gmk +++ b/make/CompileDemos.gmk @@ -242,6 +242,13 @@ $(eval $(call SetupBuildDemo, FileChooserDemo, \ DEMO_SUBDIR := jfc, \ )) +$(eval $(call SetupBuildDemo, SwingSet2, \ + DEMO_SUBDIR := jfc, \ + EXTRA_COPY_TO_JAR := .java, \ + EXTRA_MANIFEST_ATTR := SplashScreen-Image: resources/images/splash.png, \ + DISABLE_SJAVAC := true, \ +)) + $(eval $(call SetupBuildDemo, Font2DTest, \ DEMO_SUBDIR := jfc, \ )) diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk index 6e11edad9d8..9d1d6cb7618 100644 --- a/make/CompileJavaModules.gmk +++ b/make/CompileJavaModules.gmk @@ -51,14 +51,6 @@ java.base_EXCLUDES += java/lang/doc-files # data files and shouldn't go in the product java.base_EXCLUDE_FILES += sun/text/resources/BreakIteratorRules.java -ifneq ($(filter solaris macosx linux windows,$(OPENJDK_TARGET_OS)), ) - java.base_EXCLUDE_FILES += \ - sun/nio/ch/AbstractPollSelectorImpl.java \ - sun/nio/ch/PollSelectorImpl.java \ - sun/nio/ch/PollSelectorProvider.java \ - # -endif - ifneq ($(OPENJDK_TARGET_OS), solaris) java.base_EXCLUDE_FILES += \ SolarisLoginModule.java \ diff --git a/make/Docs.gmk b/make/Docs.gmk index a14f7abc0b2..487f0500d3a 100644 --- a/make/Docs.gmk +++ b/make/Docs.gmk @@ -64,7 +64,7 @@ MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) \ JAVADOC_BASE_URL := http://www.oracle.com/pls/topic/lookup?ctx=javase10&id=homepage BUG_SUBMIT_URL := http://bugreport.java.com/bugreport/ COPYRIGHT_URL := {@docroot}/../legal/copyright.html -LICENSE_URL := http://www.oracle.com/technetwork/java/javase/terms/license/java10speclicense.html +LICENSE_URL := http://www.oracle.com/technetwork/java/javase/terms/license/java$(VERSION_NUMBER)speclicense.html REDISTRIBUTION_URL := http://www.oracle.com/technetwork/java/redist-137594.html # In order to get a specific ordering it's necessary to specify the total @@ -108,7 +108,7 @@ JAVADOC_DISABLED_DOCLINT := accessibility html missing syntax reference # The initial set of options for javadoc JAVADOC_OPTIONS := -use -keywords -notimestamp \ -serialwarn -encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \ - -splitIndex --system none -html5 -javafx --expand-requires transitive \ + -splitIndex --system none -javafx --expand-requires transitive \ --override-methods=summary # The reference options must stay stable to allow for comparisons across the diff --git a/make/Main.gmk b/make/Main.gmk index 904c1c29cdc..26d282db6c8 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -266,14 +266,11 @@ endef $(foreach v, $(JVM_VARIANTS), $(eval $(call DeclareHotspotLibsRecipe,$v))) -hotspot-jsig: - +($(CD) $(TOPDIR)/make/hotspot && $(MAKE) $(MAKE_ARGS) -f lib/CompileLibjsig.gmk) - hotspot-ide-project: +($(CD) $(TOPDIR)/make/hotspot && $(MAKE) $(MAKE_ARGS) -f ide/CreateVSProject.gmk) ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \ - $(HOTSPOT_VARIANT_LIBS_TARGETS) hotspot-jsig hotspot-ide-project + $(HOTSPOT_VARIANT_LIBS_TARGETS) hotspot-ide-project ################################################################################ # Build demos targets @@ -909,9 +906,7 @@ JVM_TOOLS_TARGETS ?= buildtools-hotspot buildtools: buildtools-langtools interim-langtools interim-rmic \ buildtools-jdk $(JVM_TOOLS_TARGETS) -hotspot: $(HOTSPOT_VARIANT_TARGETS) hotspot-jsig - -hotspot-libs: hotspot-jsig +hotspot: $(HOTSPOT_VARIANT_TARGETS) # Create targets hotspot-libs and hotspot-gensrc. $(foreach v, $(JVM_VARIANTS), \ diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 index 8bdb3c76ad3..b8e1f5214c7 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -394,8 +394,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER], CFLAGS_OS_DEF_JVM="-D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_" fi - # Setup target OS define. Use OS target name but in upper case. - OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` CFLAGS_OS_DEF_JDK="$CFLAGS_OS_DEF_JDK -D$OPENJDK_TARGET_OS_UPPERCASE" #### GLOBAL DEFINES diff --git a/make/autoconf/flags-ldflags.m4 b/make/autoconf/flags-ldflags.m4 index b6294084f40..2816fca3499 100644 --- a/make/autoconf/flags-ldflags.m4 +++ b/make/autoconf/flags-ldflags.m4 @@ -99,7 +99,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER], elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then BASIC_LDFLAGS="-nologo -opt:ref" BASIC_LDFLAGS_JDK_ONLY="-incremental:no" - BASIC_LDFLAGS_JVM_ONLY="-opt:icf,8 -subsystem:windows -base:0x8000000" + BASIC_LDFLAGS_JVM_ONLY="-opt:icf,8 -subsystem:windows" fi # Setup OS-dependent LDFLAGS diff --git a/make/autoconf/flags.m4 b/make/autoconf/flags.m4 index f16477278d7..bae8503b8c5 100644 --- a/make/autoconf/flags.m4 +++ b/make/autoconf/flags.m4 @@ -237,7 +237,11 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN], MACHINE_FLAG="-q${OPENJDK_TARGET_CPU_BITS}" elif test "x$TOOLCHAIN_TYPE" != xmicrosoft; then if test "x$OPENJDK_TARGET_CPU" != xaarch64 && - test "x$OPENJDK_TARGET_CPU" != xarm; then + test "x$OPENJDK_TARGET_CPU" != xarm && + test "x$OPENJDK_TARGET_CPU" != xmips && + test "x$OPENJDK_TARGET_CPU" != xmipsel && + test "x$OPENJDK_TARGET_CPU" != xmips64 && + test "x$OPENJDK_TARGET_CPU" != xmips64el; then MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}" fi fi diff --git a/make/autoconf/platform.m4 b/make/autoconf/platform.m4 index a6a1ba1a36a..e06c11af00c 100644 --- a/make/autoconf/platform.m4 +++ b/make/autoconf/platform.m4 @@ -262,9 +262,12 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD], OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH" OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS" OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN" + OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + AC_SUBST(OPENJDK_TARGET_OS) AC_SUBST(OPENJDK_TARGET_OS_TYPE) AC_SUBST(OPENJDK_TARGET_OS_ENV) + AC_SUBST(OPENJDK_TARGET_OS_UPPERCASE) AC_SUBST(OPENJDK_TARGET_CPU) AC_SUBST(OPENJDK_TARGET_CPU_ARCH) AC_SUBST(OPENJDK_TARGET_CPU_BITS) diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in index f4852a09c92..b7a278b7244 100644 --- a/make/autoconf/spec.gmk.in +++ b/make/autoconf/spec.gmk.in @@ -65,6 +65,7 @@ CONF_NAME:=@CONF_NAME@ OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@ OPENJDK_TARGET_OS_TYPE:=@OPENJDK_TARGET_OS_TYPE@ OPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@ +OPENJDK_TARGET_OS_UPPERCASE:=@OPENJDK_TARGET_OS_UPPERCASE@ OPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@ OPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@ diff --git a/make/autoconf/toolchain.m4 b/make/autoconf/toolchain.m4 index ea03071f3e3..a95759f4768 100644 --- a/make/autoconf/toolchain.m4 +++ b/make/autoconf/toolchain.m4 @@ -597,8 +597,9 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_LD_VERSION], # solstudio cc requires us to have an existing file to pass as argument, # but it need not be a syntactically correct C file, so just use - # ourself. :) - LINKER_VERSION_STRING=`$LD -Wl,-V $TOPDIR/configure 2>&1 | $HEAD -n 1 | $SED -e 's/ld: //'` + # ourself. :) The intermediate 'cat' is needed to stop ld from leaving + # a lingering a.out (!). + LINKER_VERSION_STRING=`$LD -Wl,-V $TOPDIR/configure 2>&1 | $CAT | $HEAD -n 1 | $SED -e 's/ld: //'` # Extract version number [ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \ $SED -e 's/.* \([0-9][0-9]*\.[0-9][0-9]*\)-\([0-9][0-9]*\.[0-9][0-9]*\)/\1.\2/'` ] diff --git a/make/autoconf/version-numbers b/make/autoconf/version-numbers index fc8e6b99f0c..e4e11ec31f5 100644 --- a/make/autoconf/version-numbers +++ b/make/autoconf/version-numbers @@ -29,7 +29,7 @@ DEFAULT_VERSION_FEATURE=11 DEFAULT_VERSION_INTERIM=0 DEFAULT_VERSION_UPDATE=0 DEFAULT_VERSION_PATCH=0 -DEFAULT_VERSION_DATE=2018-09-18 +DEFAULT_VERSION_DATE=2018-09-25 DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" DEFAULT_VERSION_CLASSFILE_MINOR=0 DEFAULT_ACCEPTABLE_BOOT_VERSIONS="9 10 11" diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk index 36697776aee..569ee1321b0 100644 --- a/make/common/NativeCompilation.gmk +++ b/make/common/NativeCompilation.gmk @@ -292,8 +292,7 @@ define SetupCompileNativeFileBody endif ifneq ($$(strip $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPTIMIZATION)), ) - $1_VARDEPS := $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPT_CFLAGS) \ - $$($1_OPT_CXXFLAGS) + $1_VARDEPS := $$($1_CFLAGS) $$($1_CXXFLAGS) $$($1_OPTIMIZATION) $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_OBJ).vardeps) endif diff --git a/make/conf/jib-profiles.js b/make/conf/jib-profiles.js index c97abaf8a16..6a7b51df644 100644 --- a/make/conf/jib-profiles.js +++ b/make/conf/jib-profiles.js @@ -816,7 +816,7 @@ var getJibProfilesProfiles = function (input, common, data) { var getJibProfilesDependencies = function (input, common) { var devkit_platform_revisions = { - linux_x64: "gcc4.9.2-OEL6.4+1.3", + linux_x64: "gcc7.3.0-OEL6.4+1.0", macosx_x64: "Xcode6.3-MacOSX10.9+1.0", solaris_x64: "SS12u4-Solaris11u1+1.0", solaris_sparcv9: "SS12u4-Solaris11u1+1.1", diff --git a/make/hotspot/lib/CompileLibjsig.gmk b/make/hotspot/lib/CompileLibjsig.gmk deleted file mode 100644 index 1ac4091574e..00000000000 --- a/make/hotspot/lib/CompileLibjsig.gmk +++ /dev/null @@ -1,160 +0,0 @@ -# -# Copyright (c) 2013, 2018, 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. -# - -################################################################################ -# Create the libjsig.so shared library - -default: all - -include $(SPEC) -include MakeBase.gmk -include NativeCompilation.gmk - -ifneq ($(OPENJDK_TARGET_OS), windows) - ifeq ($(STATIC_BUILD), false) - ifeq ($(OPENJDK_TARGET_OS), linux) - LIBJSIG_CFLAGS := -fPIC -D_GNU_SOURCE -D_REENTRANT $(EXTRA_CFLAGS) - LIBJSIG_LDFLAGS := $(LIBJSIG_HASHSTYLE_LDFLAGS) ${LIBJSIG_NOEXECSTACK_LDFLAGS} $(EXTRA_CFLAGS) - LIBJSIG_LIBS := $(LIBDL) - - # NOTE: The old build compiled this library without -soname. - # To emulate this, we need to clear out SET_SHARED_LIBRARY_NAME. - SET_SHARED_LIBRARY_NAME := - - # Flags for other CPUs can be provided in EXTRA_CFLAGS - ifeq ($(OPENJDK_TARGET_CPU), x86_64) - LIBJSIG_CPU_FLAGS := -m64 - else ifeq ($(OPENJDK_TARGET_CPU), x86) - LIBJSIG_CPU_FLAGS := -m32 -march=i586 - else ifeq ($(OPENJDK_TARGET_CPU), ppc64) - LIBJSIG_CPU_FLAGS := -mcpu=powerpc64 -mtune=power5 - else ifeq ($(OPENJDK_TARGET_CPU), ppc64le) - LIBJSIG_CPU_FLAGS := -DABI_ELFv2 -mcpu=power8 -mtune=power8 - else ifeq ($(OPENJDK_TARGET_CPU), s390x) - LIBJSIG_CPU_FLAGS := -mbackchain -march=z10 - endif - - else ifeq ($(OPENJDK_TARGET_OS), solaris) - LIBJSIG_CFLAGS := -m64 -KPIC -mt -I $(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include - LIBJSIG_LDFLAGS := -m64 -mt -xnolib - LIBJSIG_LIBS := $(LIBDL) - - # NOTE: The old build compiled this library without -soname. - # To emulate this, we need to clear out SET_SHARED_LIBRARY_NAME. - SET_SHARED_LIBRARY_NAME := - - else ifeq ($(OPENJDK_TARGET_OS), aix) - LIBJSIG_CFLAGS := -q64 -D_GNU_SOURCE -D_REENTRANT -qpic=large - LIBJSIG_LDFLAGS := -b64 -bexpall -G -bnoentry -qmkshrobj -brtl -bnolibpath -bernotok - LIBJSIG_LIBS := $(LIBDL) - - # NOTE: The old build compiled this library without -soname. - # To emulate this, we need to clear out SET_SHARED_LIBRARY_NAME. - SET_SHARED_LIBRARY_NAME := - - else ifeq ($(OPENJDK_TARGET_OS), macosx) - LIBJSIG_CFLAGS := -m64 -D_GNU_SOURCE -pthread -mno-omit-leaf-frame-pointer -mstack-alignment=16 -fPIC - LIBJSIG_LDFLAGS := $(LIBJSIG_HASHSTYLE_LDFLAGS) - else - $(error Unknown target OS $(OPENJDK_TARGET_OS) in CompileLibjsig.gmk) - endif - - LIBJSIG_SRC_DIR := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjsig - LIBJSIG_MAPFILE := $(wildcard $(TOPDIR)/make/mapfiles/libjsig/mapfile-vers-$(OPENJDK_TARGET_OS)) - LIBJSIG_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/libjsig - - LIBJSIG_LDFLAGS += $(SHARED_LIBRARY_FLAGS) - - LIB_OUTPUTDIR := $(call FindLibDirForModule, java.base) - - $(eval $(call SetupNativeCompilation, BUILD_LIBJSIG, \ - NAME := jsig, \ - SRC := $(LIBJSIG_SRC_DIR), \ - OUTPUT_DIR := $(LIB_OUTPUTDIR), \ - LANG := C, \ - CFLAGS := $(LIBJSIG_CFLAGS) $(LIBJSIG_CPU_FLAGS), \ - LDFLAGS := $(LIBJSIG_LDFLAGS) $(LIBJSIG_CPU_FLAGS), \ - LIBS := $(LIBJSIG_LIBS), \ - MAPFILE := $(LIBJSIG_MAPFILE), \ - OBJECT_DIR := $(LIBJSIG_OUTPUTDIR)/objs, \ - )) - - TARGETS += $(BUILD_LIBJSIG) - - ############################################################################ - # Create symlinks in each variant sub dir - ifeq ($(OPENJDK_TARGET_OS), macosx) - DEBUG_INFO_SUFFIX := $(SHARED_LIBRARY_SUFFIX).dSYM - else - DEBUG_INFO_SUFFIX := .debuginfo - endif - - # $1 variant subdir - define CreateSymlinks - # Always symlink from libdir/variant/libjsig.so -> ../libjsig.so and - # the corresponding debuginfo. - $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig): \ - $(LIB_OUTPUTDIR)/$(call SHARED_LIBRARY,jsig) - $$(call MakeDir, $$(@D)) - $(RM) $$@ - $(LN) -s ../$$(@F) $$@ - - TARGETS += $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig) - - ifeq ($(COPY_DEBUG_SYMBOLS), true) - $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig$(DEBUG_INFO_SUFFIX): \ - $(LIB_OUTPUTDIR)/$(call SHARED_LIBRARY,jsig) - $$(call MakeDir, $$(@D)) - $(RM) $$@ - $(LN) -s ../$$(@F) $$@ - - TARGETS += $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig$(DEBUG_INFO_SUFFIX) - - ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true) - $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig.diz: \ - $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig$(DEBUG_INFO_SUFFIX) - $(CD) $$(@D) && $(ZIPEXE) -q -y $$@ $$(basename $$(@F))$(DEBUG_INFO_SUFFIX) - - TARGETS += $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig.diz - endif - endif - endef - - # The subdir is the same as the variant for client and minimal, for all - # others it's server. - VARIANT_SUBDIRS := $(filter client minimal, $(JVM_VARIANTS)) \ - $(if $(filter-out client minimal, $(JVM_VARIANTS)), server) - $(foreach v, $(VARIANT_SUBDIRS), $(eval $(call CreateSymlinks,$v))) - - ############################################################################ - - include CopyToExplodedJdk.gmk - - endif -endif - -all: $(TARGETS) - -.PHONY: all diff --git a/make/lib/Awt2dLibraries.gmk b/make/lib/Awt2dLibraries.gmk index f2d14e5de08..c1d4f4c5820 100644 --- a/make/lib/Awt2dLibraries.gmk +++ b/make/lib/Awt2dLibraries.gmk @@ -36,7 +36,6 @@ BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \ -I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libmlib_image BUILD_LIBMLIB_LDLIBS := -BUILD_LIBMLIB_IMAGE_MAPFILE := $(TOPDIR)/make/mapfiles/libmlib_image/mapfile-vers BUILD_LIBMLIB_CFLAGS += -DMLIB_NO_LIBSUNMATH @@ -55,7 +54,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBMLIB_IMAGE, \ OPTIMIZATION := HIGHEST, \ CFLAGS := $(CFLAGS_JDKLIB) \ $(BUILD_LIBMLIB_CFLAGS), \ - MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(BUILD_LIBMLIB_LDLIBS) \ @@ -107,7 +105,6 @@ ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc) CFLAGS := -xarch=sparcvis \ $(LIBMLIB_IMAGE_V_CFLAGS) \ $(CFLAGS_JDKLIB), \ - MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := -ljava -ljvm $(BUILD_LIBMLIB_LDLIBS), \ @@ -202,9 +199,9 @@ ifeq ($(OPENJDK_TARGET_OS), windows) LIBAWT_VERSIONINFO_RESOURCE := $(TOPDIR)/src/java.desktop/windows/native/libawt/windows/awt.rc endif -LIBAWT_MAPFILE := $(TOPDIR)/make/mapfiles/libawt/mapfile-vers ifeq ($(OPENJDK_TARGET_OS), linux) - LIBAWT_MAPFILE := + # FIXME: This is probably not what we want to do, but keep it now for compatibility. + LIBAWT_CFLAGS += $(EXPORT_ALL_SYMBOLS) endif # Turn off all warnings for debug_mem.c This is needed because the specific warning @@ -229,7 +226,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \ DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \ DISABLED_WARNINGS_microsoft := 4297 4244 4267 4996, \ ASFLAGS := $(LIBAWT_ASFLAGS), \ - MAPFILE := $(LIBAWT_MAPFILE), \ LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \ LDFLAGS_windows := -delayload:user32.dll -delayload:gdi32.dll \ @@ -349,7 +345,6 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),) implicit-fallthrough, \ DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \ E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN) \ -L$(INSTALL_LIBRARIES_HERE), \ @@ -405,7 +400,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBLCMS, \ DISABLED_WARNINGS_clang := tautological-compare, \ DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \ DISABLED_WARNINGS_microsoft := 4819, \ - MAPFILE := $(TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \ @@ -421,28 +415,13 @@ $(BUILD_LIBLCMS): $(BUILD_LIBAWT) LIBJAVAJPEG_SRC += $(TOPDIR)/src/java.desktop/share/native/libjavajpeg -BUILD_LIBJAVAJPEG_REORDER := -ifeq ($(OPENJDK_TARGET_OS), solaris) - ifneq ($(OPENJDK_TARGET_CPU), x86_64) - BUILD_LIBJAVAJPEG_REORDER := $(TOPDIR)/make/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU) - endif -endif - - +# "DISABLED_WARNINGS_gcc := clobbered" rationale: # Suppress gcc warnings like "variable might be clobbered by 'longjmp' # or 'vfork'": this warning indicates that some variable is placed to # a register by optimized compiler and it's value might be lost on longjmp(). # Recommended way to avoid such warning is to declare the variable as # volatile to prevent the optimization. However, this approach does not # work because we have to declare all variables as volatile in result. -#ifndef CROSS_COMPILE_ARCH -# CC_43_OR_NEWER := \ -# $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \ -# \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) ) -# ifeq ($(CC_43_OR_NEWER), 1) -# BUILD_LIBJAVAJPEG_CFLAGS_linux += -Wno-clobbered -# endif -#endif ifeq ($(USE_EXTERNAL_LIBJPEG), true) LIBJPEG_LIBS := -ljpeg @@ -465,12 +444,10 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAVAJPEG, \ $(LIBJAVA_HEADER_FLAGS) \ -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \ DISABLED_WARNINGS_gcc := clobbered implicit-fallthrough shift-negative-value, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libjpeg/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(LIBJPEG_LIBS) $(JDKLIB_LIBS), \ LIBS_windows := $(WIN_JAVA_LIB) jvm.lib, \ - REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \ )) $(BUILD_LIBJAVAJPEG): $(call FindLib, java.base, java) @@ -506,13 +483,6 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),) $(LIBJAVA_HEADER_FLAGS) \ # - LIBAWT_HEADLESS_REORDER := - ifeq ($(OPENJDK_TARGET_OS), solaris) - ifneq ($(OPENJDK_TARGET_CPU), x86_64) - LIBAWT_HEADLESS_REORDER := $(TOPDIR)/make/mapfiles/libawt_headless/reorder-$(OPENJDK_TARGET_CPU) - endif - endif - $(eval $(call SetupJdkLibrary, BUILD_LIBAWT_HEADLESS, \ NAME := awt_headless, \ SRC := $(LIBAWT_HEADLESS_DIRS), \ @@ -527,11 +497,9 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),) $(LIBAWT_HEADLESS_CFLAGS), \ DISABLED_WARNINGS_xlc := 1506-356, \ DISABLED_WARNINGS_solstudio := E_EMPTY_TRANSLATION_UNIT, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \ - REORDER := $(LIBAWT_HEADLESS_REORDER), \ LIBS_unix := -lawt -ljvm -ljava, \ LIBS_linux := $(LIBM) $(LIBDL), \ LIBS_solaris := $(LIBM) $(LIBDL) $(LIBCXX), \ @@ -567,11 +535,11 @@ else SRC := $(LIBFREETYPE_SRC)/src, \ OPTIMIZATION := HIGHEST, \ CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBFREETYPE_HEADERS) \ - -DFT2_BUILD_LIBRARY, \ + -DFT2_BUILD_LIBRARY $(EXPORT_ALL_SYMBOLS), \ DISABLED_WARNINGS_solstudio := \ E_STATEMENT_NOT_REACHED \ E_END_OF_LOOP_CODE_NOT_REACHED, \ - DISABLED_WARNINGS_microsoft := 4267 2220 4244, \ + DISABLED_WARNINGS_microsoft := 4267 4244, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ )) @@ -622,8 +590,6 @@ LIBFONTMANAGER_CFLAGS += $(HARFBUZZ_CFLAGS) #### End harfbuzz configuration LIBFONTMANAGER_CFLAGS += $(LIBFREETYPE_CFLAGS) -# This may be overridden in a custom makefile -BUILD_LIBFONTMANAGER_MAPFILE ?= $(TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers BUILD_LIBFONTMANAGER_FONTLIB += $(LIBFREETYPE_LIBS) LIBFONTMANAGER_OPTIMIZATION := HIGH @@ -678,7 +644,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \ truncwarn wvarhidenmem wvarhidemem wbadlkginit identexpected \ hidevf w_novirtualdescr arrowrtn2, \ DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090 4996 4146 4334 4819 4101, \ - MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \ LDFLAGS := $(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \ @@ -782,7 +747,6 @@ else # OPENJDK_TARGET_OS not windows $(LIBJAWT_CFLAGS), \ CFLAGS_linux := $(HEADLESS_CFLAG), \ CFLAGS_macosx := $(LIBJAWT_CFLAGS_macosx), \ - MAPFILE := $(TOPDIR)/make/mapfiles/libjawt/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \ @@ -914,7 +878,6 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false) DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE \ E_STATEMENT_NOT_REACHED, \ DISABLED_WARNINGS_microsoft := 4018 4244 4267, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \ diff --git a/make/lib/CoreLibraries.gmk b/make/lib/CoreLibraries.gmk index b54151d6d1e..64124228b71 100644 --- a/make/lib/CoreLibraries.gmk +++ b/make/lib/CoreLibraries.gmk @@ -95,12 +95,6 @@ endif ########################################################################################## -ifeq ($(OPENJDK_TARGET_OS), solaris) - ifneq ($(OPENJDK_TARGET_CPU), x86_64) - BUILD_LIBVERIFY_REORDER := $(TOPDIR)/make/mapfiles/libverify/reorder-$(OPENJDK_TARGET_CPU) - endif -endif - LIBVERIFY_OPTIMIZATION := HIGH ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), ) ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true) @@ -115,12 +109,10 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBVERIFY, \ CFLAGS := $(CFLAGS_JDKLIB), \ DISABLED_WARNINGS_gcc := implicit-fallthrough, \ DISABLED_WARNINGS_microsoft := 4244 4267, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libverify/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS_unix := -ljvm, \ LIBS_windows := jvm.lib, \ - REORDER := $(BUILD_LIBVERIFY_REORDER), \ )) TARGETS += $(BUILD_LIBVERIFY) @@ -135,20 +127,11 @@ LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \ -I$(SUPPORT_OUTPUTDIR)/headers/java.base \ -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"' -# Make it possible to override this variable -LIBJAVA_MAPFILE ?= $(TOPDIR)/make/mapfiles/libjava/mapfile-vers - ifeq ($(OPENJDK_TARGET_OS), macosx) BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c endif -ifeq ($(OPENJDK_TARGET_OS), solaris) - ifneq ($(OPENJDK_TARGET_CPU), x86_64) - LIBJAVA_REORDER := $(TOPDIR)/make/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU) - endif -endif - $(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \ NAME := java, \ SRC := $(LIBJAVA_SRC_DIRS), \ @@ -160,13 +143,10 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \ WARNINGS_AS_ERRORS_xlc := false, \ DISABLED_WARNINGS_gcc := unused-result, \ DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \ - MAPFILE := $(LIBJAVA_MAPFILE), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \ - LDFLAGS_windows := -export:winFileHandleOpen -export:handleLseek \ - -export:getLastErrorString \ - -export:getErrorString -delayload:shell32.dll, \ + LDFLAGS_windows := -delayload:shell32.dll, \ LIBS_unix := -ljvm -lverify, \ LIBS_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \ LIBS_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM), \ @@ -178,7 +158,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \ LIBS_windows := jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \ shell32.lib delayimp.lib \ advapi32.lib version.lib, \ - REORDER := $(LIBJAVA_REORDER), \ )) TARGETS += $(BUILD_LIBJAVA) @@ -194,13 +173,6 @@ ifeq ($(USE_EXTERNAL_LIBZ), true) LIBZIP_EXCLUDES += zlib endif -BUILD_LIBZIP_REORDER := -ifeq ($(OPENJDK_TARGET_OS), solaris) - ifneq ($(OPENJDK_TARGET_CPU), x86_64) - BUILD_LIBZIP_REORDER := $(TOPDIR)/make/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU) - endif -endif - ifeq ($(LIBZIP_CAN_USE_MMAP), true) BUILD_LIBZIP_MMAP := -DUSE_MMAP endif @@ -217,13 +189,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBZIP, \ -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \ CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \ DISABLED_WARNINGS_gcc := implicit-fallthrough, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libzip/mapfile-vers, \ - REORDER := $(BUILD_LIBZIP_REORDER), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ - LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \ - -export:ZIP_ReadEntry -export:ZIP_GetNextEntry \ - -export:ZIP_InflateFully -export:ZIP_CRC32 -export:ZIP_FreeEntry, \ LIBS_unix := -ljvm -ljava $(LIBZ_LIBS), \ LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \ )) @@ -252,13 +219,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJIMAGE, \ CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \ DISABLED_WARNINGS_gcc := implicit-fallthrough, \ CFLAGS_unix := -UDEBUG, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ - LDFLAGS_windows := -export:JIMAGE_Open -export:JIMAGE_Close \ - -export:JIMAGE_PackageToModule \ - -export:JIMAGE_FindResource -export:JIMAGE_GetResource \ - -export:JIMAGE_ResourceIterator -export:JIMAGE_ResourcePath, \ LIBS_unix := -ljvm -ldl $(LIBCXX), \ LIBS_macosx := -lc++, \ LIBS_windows := jvm.lib, \ @@ -341,31 +303,10 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \ DISABLED_WARNINGS_solstudio := \ E_ASM_DISABLES_OPTIMIZATION \ E_STATEMENT_NOT_REACHED, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libjli/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ - LDFLAGS_windows := \ - -export:JLI_Launch \ - -export:JLI_ManifestIterate \ - -export:JLI_SetTraceLauncher \ - -export:JLI_ReportErrorMessage \ - -export:JLI_ReportErrorMessageSys \ - -export:JLI_ReportMessage \ - -export:JLI_ReportExceptionDescription \ - -export:JLI_MemAlloc \ - -export:JLI_CmdToArgs \ - -export:JLI_GetStdArgc \ - -export:JLI_GetStdArgs \ - -export:JLI_List_new \ - -export:JLI_List_add \ - -export:JLI_StringDup \ - -export:JLI_MemFree \ - -export:JLI_InitArgProcessing \ - -export:JLI_PreprocessArg \ - -export:JLI_AddArgsFromEnvVar \ - -export:JLI_GetAppArgIndex, \ LIBS_unix := $(LIBZ_LIBS), \ LIBS_linux := $(LIBDL) -lpthread, \ LIBS_solaris := $(LIBDL), \ diff --git a/make/lib/Lib-java.base.gmk b/make/lib/Lib-java.base.gmk index 9e5f14b4886..714e8d74fc9 100644 --- a/make/lib/Lib-java.base.gmk +++ b/make/lib/Lib-java.base.gmk @@ -53,7 +53,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBNET, \ DISABLED_WARNINGS_clang := parentheses-equality constant-logical-operand, \ DISABLED_WARNINGS_microsoft := 4244 4047 4133 4996, \ DISABLED_WARNINGS_solstudio := E_ARG_INCOMPATIBLE_WITH_ARG_L, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libnet/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_windows := -delayload:secur32.dll -delayload:iphlpapi.dll, \ @@ -90,22 +89,6 @@ BUILD_LIBNIO_CFLAGS := \ $(LIBJAVA_HEADER_FLAGS) \ $(addprefix -I, $(BUILD_LIBNET_SRC)) -ifeq ($(OPENJDK_TARGET_OS), linux) - BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) -endif - -ifeq ($(OPENJDK_TARGET_OS), macosx) - BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) -endif - -ifeq ($(OPENJDK_TARGET_OS), solaris) - BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) -endif - -ifeq ($(OPENJDK_TARGET_OS), aix) - BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) -endif - $(eval $(call SetupJdkLibrary, BUILD_LIBNIO, \ NAME := nio, \ SRC := $(BUILD_LIBNIO_SRC), \ @@ -114,7 +97,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBNIO, \ WARNINGS_AS_ERRORS_xlc := false, \ CFLAGS := $(CFLAGS_JDKLIB) \ $(BUILD_LIBNIO_CFLAGS), \ - MAPFILE := $(BUILD_LIBNIO_MAPFILE), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS_unix := -ljava -lnet, \ @@ -170,6 +152,61 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) endif endif +################################################################################ +# Create the jsig library + +ifneq ($(OPENJDK_TARGET_OS), windows) + ifeq ($(STATIC_BUILD), false) + + LIBJSIG_SRC_DIR := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjsig + LIBJSIG_MAPFILE := $(wildcard $(TOPDIR)/make/mapfiles/libjsig/mapfile-vers-$(OPENJDK_TARGET_OS)) + + ifeq ($(OPENJDK_TARGET_OS), linux) + # FIXME: This is probably not what we want to do, but keep it now for compatibility. + LIBJSIG_CFLAGS := $(EXPORT_ALL_SYMBOLS) + endif + + $(eval $(call SetupJdkLibrary, BUILD_LIBJSIG, \ + NAME := jsig, \ + SRC := $(LIBJSIG_SRC_DIR), \ + CFLAGS := $(CFLAGS_JDKLIB) $(LIBJSIG_CFLAGS), \ + LDFLAGS := $(LDFLAGS_JDKLIB) \ + $(call SET_SHARED_LIBRARY_ORIGIN), \ + LIBS_linux := $(LIBDL), \ + LIBS_solaris := $(LIBDL), \ + LIBS_aix := $(LIBDL), \ + MAPFILE := $(LIBJSIG_MAPFILE), \ + )) + + TARGETS += $(BUILD_LIBJSIG) + + ############################################################################ + # Create symlinks to libjsig in each JVM variant sub dir + LIB_OUTPUTDIR := $(call FindLibDirForModule, java.base) + + # $1 variant subdir + define CreateSymlinks + # Always symlink from libdir/variant/libjsig.so -> ../libjsig.so. + $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig): \ + $(LIB_OUTPUTDIR)/$(call SHARED_LIBRARY,jsig) + $$(call MakeDir, $$(@D)) + $(RM) $$@ + $(LN) -s ../$$(@F) $$@ + + TARGETS += $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig) + endef + + # The subdir is the same as the variant for client and minimal, for all + # others it's server. + VARIANT_SUBDIRS := $(filter client minimal, $(JVM_VARIANTS)) \ + $(if $(filter-out client minimal, $(JVM_VARIANTS)), server) + $(foreach v, $(VARIANT_SUBDIRS), $(eval $(call CreateSymlinks,$v))) + + ############################################################################ + + endif +endif + ################################################################################ # Create the symbols file for static builds. diff --git a/make/lib/Lib-java.desktop.gmk b/make/lib/Lib-java.desktop.gmk index 0c2dff4735a..2144c8b6e04 100644 --- a/make/lib/Lib-java.desktop.gmk +++ b/make/lib/Lib-java.desktop.gmk @@ -34,10 +34,63 @@ LIB_java.desktop_SRC_DIRS += $(TOPDIR)/src/java.desktop/*/native $(eval $(call FillCacheFind, $(wildcard $(LIB_java.desktop_SRC_DIRS)))) ################################################################################ -# Create the AWT/2D and sound libraries +# Create the AWT/2D libraries include Awt2dLibraries.gmk -include SoundLibraries.gmk + +################################################################################ +# Create the libjsound library + +ifneq ($(OPENJDK_TARGET_OS), aix) + + LIBJSOUND_SRC_DIRS := $(wildcard \ + $(TOPDIR)/src/java.desktop/share/native/libjsound \ + $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/libjsound \ + ) + + LIBJSOUND_CFLAGS := \ + -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \ + $(LIBJAVA_HEADER_FLAGS) \ + $(foreach dir, $(LIBJSOUND_SRC_DIRS), -I$(dir)) \ + -DX_PLATFORM=X_$(OPENJDK_TARGET_OS_UPPERCASE) \ + -DUSE_PORTS=TRUE \ + -DUSE_DAUDIO=TRUE \ + # + + ifneq ($(OPENJDK_TARGET_OS), solaris) + LIBJSOUND_CFLAGS += \ + -DUSE_PLATFORM_MIDI_OUT=TRUE \ + -DUSE_PLATFORM_MIDI_IN=TRUE \ + # + endif + + ifeq ($(OPENJDK_TARGET_OS), macosx) + LIBJSOUND_TOOLCHAIN := TOOLCHAIN_LINK_CXX + endif + + $(eval $(call SetupJdkLibrary, BUILD_LIBJSOUND, \ + NAME := jsound, \ + SRC := $(LIBJSOUND_SRC_DIRS), \ + TOOLCHAIN := $(LIBJSOUND_TOOLCHAIN), \ + OPTIMIZATION := LOW, \ + CFLAGS := $(CFLAGS_JDKLIB) \ + $(LIBJSOUND_CFLAGS), \ + CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \ + LDFLAGS := $(LDFLAGS_JDKLIB) \ + $(call SET_SHARED_LIBRARY_ORIGIN), \ + LIBS_unix := -ljava -ljvm, \ + LIBS_linux := $(ALSA_LIBS), \ + LIBS_macosx := -framework CoreAudio -framework CoreFoundation \ + -framework CoreServices -framework AudioUnit \ + -framework CoreMIDI -framework AudioToolbox $(LIBCXX), \ + LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib dsound.lib winmm.lib user32.lib ole32.lib, \ + )) + + $(BUILD_LIBJSOUND): $(call FindLib, java.base, java) + + TARGETS += $(BUILD_LIBJSOUND) + +endif ################################################################################ # Create the macosx specific osxapp and osx libraries diff --git a/make/lib/Lib-java.instrument.gmk b/make/lib/Lib-java.instrument.gmk index a02a1332795..3ec153ef462 100644 --- a/make/lib/Lib-java.instrument.gmk +++ b/make/lib/Lib-java.instrument.gmk @@ -56,7 +56,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBINSTRUMENT, \ CFLAGS := $(LIBINSTRUMENT_CFLAGS), \ CFLAGS_debug := -DJPLIS_LOGGING, \ CFLAGS_release := -DNO_JPLIS_LOGGING, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libinstrument/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN) \ $(LIBINSTRUMENT_LDFLAGS), \ diff --git a/make/lib/Lib-java.management.gmk b/make/lib/Lib-java.management.gmk index fd9510e8c09..6444feaa2f5 100644 --- a/make/lib/Lib-java.management.gmk +++ b/make/lib/Lib-java.management.gmk @@ -49,7 +49,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT, \ SRC := $(LIBMANAGEMENT_SRC), \ OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \ CFLAGS := $(CFLAGS_JDKLIB) $(LIBMANAGEMENT_CFLAGS), \ - MAPFILE := $(TOPDIR)/make/mapfiles/libmanagement/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(JDKLIB_LIBS), \ diff --git a/make/lib/Lib-java.prefs.gmk b/make/lib/Lib-java.prefs.gmk index 28872dba85e..6d72189d563 100644 --- a/make/lib/Lib-java.prefs.gmk +++ b/make/lib/Lib-java.prefs.gmk @@ -39,7 +39,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBPREFS, \ OPTIMIZATION := HIGH, \ CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBPREF_SRC_DIRS)) \ $(LIBJAVA_HEADER_FLAGS), \ - MAPFILE := $(TOPDIR)/make/mapfiles/libprefs/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS_unix := -ljvm, \ diff --git a/make/lib/Lib-java.rmi.gmk b/make/lib/Lib-java.rmi.gmk index 1be2595819f..f2c09c01829 100644 --- a/make/lib/Lib-java.rmi.gmk +++ b/make/lib/Lib-java.rmi.gmk @@ -32,7 +32,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBRMI, \ SRC := $(TOPDIR)/src/java.rmi/share/native/librmi, \ OPTIMIZATION := LOW, \ CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/java.rmi, \ - MAPFILE := $(TOPDIR)/make/mapfiles/librmi/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS_unix := -ljvm, \ diff --git a/make/lib/Lib-java.security.jgss.gmk b/make/lib/Lib-java.security.jgss.gmk index b0985a20040..90420b40e79 100644 --- a/make/lib/Lib-java.security.jgss.gmk +++ b/make/lib/Lib-java.security.jgss.gmk @@ -39,7 +39,6 @@ ifneq ($(OPENJDK_TARGET_OS), windows) CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2GSS_SRC)) \ $(LIBJAVA_HEADER_FLAGS) \ -I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libj2gss/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(LIBDL), \ diff --git a/make/lib/Lib-java.smartcardio.gmk b/make/lib/Lib-java.smartcardio.gmk index 9bc419d7b5b..337daa48e1e 100644 --- a/make/lib/Lib-java.smartcardio.gmk +++ b/make/lib/Lib-java.smartcardio.gmk @@ -39,7 +39,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2PCSC, \ CFLAGS_unix := -D__sun_jdk, \ OPTIMIZATION := LOW, \ CFLAGS := $(CFLAGS_JDKLIB) $(LIBJ2PCSC_CPPFLAGS), \ - MAPFILE := $(TOPDIR)/make/mapfiles/libj2pcsc/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS_unix := $(LIBDL), \ diff --git a/make/lib/Lib-jdk.attach.gmk b/make/lib/Lib-jdk.attach.gmk index ccf1803656c..827f1bf723e 100644 --- a/make/lib/Lib-jdk.attach.gmk +++ b/make/lib/Lib-jdk.attach.gmk @@ -42,10 +42,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBATTACH, \ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.attach \ $(LIBJAVA_HEADER_FLAGS) $(LIBATTACH_CFLAGS), \ CFLAGS_windows := /Gy, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ - LDFLAGS_windows := -order:@$(TOPDIR)/make/mapfiles/libattach/reorder-windows-$(OPENJDK_TARGET_CPU), \ LIBS := $(JDKLIB_LIBS), \ LIBS_solaris := -ldoor, \ LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \ diff --git a/make/lib/Lib-jdk.crypto.cryptoki.gmk b/make/lib/Lib-jdk.crypto.cryptoki.gmk index 5080a07ce21..847d5b356be 100644 --- a/make/lib/Lib-jdk.crypto.cryptoki.gmk +++ b/make/lib/Lib-jdk.crypto.cryptoki.gmk @@ -37,7 +37,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2PKCS11, \ CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2PKCS11_SRC)) \ $(LIBJAVA_HEADER_FLAGS) \ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.crypto.cryptoki, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libj2pkcs11/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS_unix := $(LIBDL), \ diff --git a/make/lib/Lib-jdk.crypto.ec.gmk b/make/lib/Lib-jdk.crypto.ec.gmk index b220bd7b23f..e30b57d4341 100644 --- a/make/lib/Lib-jdk.crypto.ec.gmk +++ b/make/lib/Lib-jdk.crypto.ec.gmk @@ -55,7 +55,6 @@ ifeq ($(ENABLE_INTREE_EC), true) $(BUILD_LIBSUNEC_FLAGS), \ DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough, \ DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \ LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(LIBCXX), \ diff --git a/make/lib/Lib-jdk.crypto.ucrypto.gmk b/make/lib/Lib-jdk.crypto.ucrypto.gmk index 958dec3a5a5..758491007d3 100644 --- a/make/lib/Lib-jdk.crypto.ucrypto.gmk +++ b/make/lib/Lib-jdk.crypto.ucrypto.gmk @@ -37,7 +37,6 @@ ifeq ($(OPENJDK_TARGET_OS), solaris) OPTIMIZATION := LOW, \ CFLAGS := $(CFLAGS_JDKLIB) \ $(addprefix -I, $(LIBJ2UCRYPTO_SRC)), \ - MAPFILE := $(TOPDIR)/make/mapfiles/libj2ucrypto/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB), \ LIBS := $(LIBDL), \ )) diff --git a/make/lib/Lib-jdk.hotspot.agent.gmk b/make/lib/Lib-jdk.hotspot.agent.gmk index 34b6ced8259..3f023dbd772 100644 --- a/make/lib/Lib-jdk.hotspot.agent.gmk +++ b/make/lib/Lib-jdk.hotspot.agent.gmk @@ -36,8 +36,6 @@ SA_SRC += \ $(SA_TOPDIR)/$(OPENJDK_TARGET_OS)/native/libsaproc \ # -SA_MAPFILE := $(TOPDIR)/make/mapfiles/libsaproc/mapfile-$(OPENJDK_TARGET_OS) - SA_INCLUDES := \ $(addprefix -I, $(SA_SRC)) \ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.hotspot.agent \ @@ -79,7 +77,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBSA, \ LIBS_macosx := -framework Foundation -framework JavaNativeFoundation \ -framework JavaRuntimeSupport -framework Security -framework CoreFoundation, \ LIBS_windows := dbgeng.lib, \ - MAPFILE := $(SA_MAPFILE), \ )) TARGETS += $(BUILD_LIBSA) diff --git a/make/lib/Lib-jdk.jdi.gmk b/make/lib/Lib-jdk.jdi.gmk index 21573ae8c05..ff0cd954b75 100644 --- a/make/lib/Lib-jdk.jdi.gmk +++ b/make/lib/Lib-jdk.jdi.gmk @@ -46,7 +46,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows) CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \ $(LIBDT_SHMEM_CPPFLAGS), \ LDFLAGS := $(LDFLAGS_JDKLIB), \ - LDFLAGS_windows := -export:jdwpTransport_OnLoad, \ LIBS := $(JDKLIB_LIBS), \ )) diff --git a/make/lib/Lib-jdk.jdwp.agent.gmk b/make/lib/Lib-jdk.jdwp.agent.gmk index 10e3c393ed9..f0dc9f3d01c 100644 --- a/make/lib/Lib-jdk.jdwp.agent.gmk +++ b/make/lib/Lib-jdk.jdwp.agent.gmk @@ -42,10 +42,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBDT_SOCKET, \ OPTIMIZATION := LOW, \ CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \ $(LIBDT_SOCKET_CPPFLAGS), \ - MAPFILE := $(TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ - LDFLAGS_windows := -export:jdwpTransport_OnLoad, \ LIBS_linux := -lpthread, \ LIBS_solaris := -lnsl -lsocket, \ LIBS_windows := $(JDKLIB_LIBS) ws2_32.lib, \ @@ -73,7 +71,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJDWP, \ CFLAGS := $(CFLAGS_JDKLIB) -DJDWP_LOGGING \ $(LIBJDWP_CPPFLAGS) \ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libjdwp/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(JDKLIB_LIBS), \ diff --git a/make/lib/Lib-jdk.management.agent.gmk b/make/lib/Lib-jdk.management.agent.gmk index 4c3237c7041..426e84d30d3 100644 --- a/make/lib/Lib-jdk.management.agent.gmk +++ b/make/lib/Lib-jdk.management.agent.gmk @@ -38,7 +38,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT_AGENT, \ SRC := $(LIBMANAGEMENT_AGENT_SRC), \ OPTIMIZATION := LOW, \ CFLAGS := $(CFLAGS_JDKLIB) $(LIBMANAGEMENT_AGENT_CFLAGS), \ - MAPFILE := $(TOPDIR)/make/mapfiles/libmanagement_agent/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(JDKLIB_LIBS), \ diff --git a/make/lib/Lib-jdk.management.gmk b/make/lib/Lib-jdk.management.gmk index d5ce0ece009..22a167e23b5 100644 --- a/make/lib/Lib-jdk.management.gmk +++ b/make/lib/Lib-jdk.management.gmk @@ -59,7 +59,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT_EXT, \ LANG := C, \ OPTIMIZATION := $(LIBMANAGEMENT_EXT_OPTIMIZATION), \ CFLAGS := $(CFLAGS_JDKLIB) $(LIBMANAGEMENT_EXT_CFLAGS), \ - MAPFILE := $(TOPDIR)/make/mapfiles/libmanagement_ext/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(JDKLIB_LIBS), \ diff --git a/make/lib/Lib-jdk.net.gmk b/make/lib/Lib-jdk.net.gmk index c146e5d2216..1ea1c2f543a 100644 --- a/make/lib/Lib-jdk.net.gmk +++ b/make/lib/Lib-jdk.net.gmk @@ -34,7 +34,6 @@ ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux), ) SRC := $(TOPDIR)/src/jdk.net/$(OPENJDK_TARGET_OS)/native/libextnet, \ OPTIMIZATION := LOW, \ CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/jdk.net, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libextnet/mapfile-$(OPENJDK_TARGET_OS), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := -ljava, \ diff --git a/make/lib/Lib-jdk.pack.gmk b/make/lib/Lib-jdk.pack.gmk index 036faac48ec..9884818852c 100644 --- a/make/lib/Lib-jdk.pack.gmk +++ b/make/lib/Lib-jdk.pack.gmk @@ -40,7 +40,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBUNPACK, \ $(LIBJAVA_HEADER_FLAGS), \ CFLAGS_release := -DPRODUCT, \ DISABLED_WARNINGS_gcc := implicit-fallthrough, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_windows := -map:$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpack.map -debug, \ diff --git a/make/lib/Lib-jdk.sctp.gmk b/make/lib/Lib-jdk.sctp.gmk index 72c15bb7ae9..c1d2e468e86 100644 --- a/make/lib/Lib-jdk.sctp.gmk +++ b/make/lib/Lib-jdk.sctp.gmk @@ -41,7 +41,6 @@ ifeq ($(OPENJDK_TARGET_OS_TYPE), unix) $(LIBJAVA_HEADER_FLAGS) \ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.sctp \ -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \ - MAPFILE := $(TOPDIR)/make/mapfiles/libsctp/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS_unix := -lnio -lnet -ljava -ljvm, \ diff --git a/make/lib/Lib-jdk.security.auth.gmk b/make/lib/Lib-jdk.security.auth.gmk index 130ae3d9410..de3332f1522 100644 --- a/make/lib/Lib-jdk.security.auth.gmk +++ b/make/lib/Lib-jdk.security.auth.gmk @@ -27,18 +27,11 @@ include LibCommon.gmk ################################################################################ -LIBJAAS_MAPFILE := -ifeq ($(OPENJDK_TARGET_OS), solaris) - # only on solaris...wonder why - LIBJAAS_MAPFILE := $(TOPDIR)/make/mapfiles/libjaas/mapfile-vers -endif - $(eval $(call SetupJdkLibrary, BUILD_LIBJAAS, \ NAME := jaas, \ SRC := $(call FindSrcDirsForLib, jdk.security.auth, jaas), \ OPTIMIZATION := LOW, \ CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/jdk.security.auth, \ - MAPFILE := $(LIBJAAS_MAPFILE), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS_windows := netapi32.lib user32.lib mpr.lib advapi32.lib $(JDKLIB_LIBS), \ diff --git a/make/lib/LibCommon.gmk b/make/lib/LibCommon.gmk index b90719f1794..982be3143da 100644 --- a/make/lib/LibCommon.gmk +++ b/make/lib/LibCommon.gmk @@ -36,8 +36,31 @@ GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/ve # elegant solution to this. WIN_JAVA_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib -ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx windows), ) - DISABLE_MAPFILES := true +# Tell the compiler not to export any functions unless declared so in +# the source code. On Windows, this is the default and cannot be changed. +# On Mac, we have always exported all symbols, probably due to oversight +# and/or misunderstanding. To emulate this, don't hide any symbols +# by default. +# Also provide an override for non-conformant libraries. +ifeq ($(TOOLCHAIN_TYPE), gcc) + CFLAGS_JDKLIB += -fvisibility=hidden + CXXFLAGS_JDKLIB += -fvisibility=hidden + LDFLAGS_JDKLIB += -Wl,--exclude-libs,ALL + EXPORT_ALL_SYMBOLS := -fvisibility=default +else ifeq ($(TOOLCHAIN_TYPE), clang) + ifneq ($(OPENJDK_TARGET_OS), macosx) + CFLAGS_JDKLIB += -fvisibility=hidden + CXXFLAGS_JDKLIB += -fvisibility=hidden + EXPORT_ALL_SYMBOLS := -fvisibility=default + endif +else ifeq ($(TOOLCHAIN_TYPE), solstudio) + CFLAGS_JDKLIB += -xldscope=hidden + CXXFLAGS_JDKLIB += -xldscope=hidden + EXPORT_ALL_SYMBOLS := -xldscope=global +else ifeq ($(TOOLCHAIN_TYPE), xlc) + CFLAGS_JDKLIB += -qvisibility=hidden + CXXFLAGS_JDKLIB += -qvisibility=hidden + EXPORT_ALL_SYMBOLS := -qvisibility=default endif ################################################################################ diff --git a/make/lib/SoundLibraries.gmk b/make/lib/SoundLibraries.gmk deleted file mode 100644 index 3fd9314c97e..00000000000 --- a/make/lib/SoundLibraries.gmk +++ /dev/null @@ -1,90 +0,0 @@ -# -# Copyright (c) 2011, 2018, 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. -# - -LIBJSOUND_SRC_DIRS := $(wildcard \ - $(TOPDIR)/src/java.desktop/share/native/libjsound \ - $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS)/native/libjsound \ - ) - -LIBJSOUND_CFLAGS := \ - -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \ - $(LIBJAVA_HEADER_FLAGS) \ - $(foreach dir, $(LIBJSOUND_SRC_DIRS), -I$(dir)) \ - -DUSE_PORTS=TRUE \ - -DUSE_DAUDIO=TRUE \ - # - -ifneq ($(OPENJDK_TARGET_OS), solaris) - LIBJSOUND_CFLAGS += \ - -DUSE_PLATFORM_MIDI_OUT=TRUE \ - -DUSE_PLATFORM_MIDI_IN=TRUE \ - # -endif - -ifeq ($(OPENJDK_TARGET_OS), windows) - LIBJSOUND_CFLAGS += -DX_PLATFORM=X_WINDOWS -endif - -ifeq ($(OPENJDK_TARGET_OS), linux) - LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX -endif - -ifeq ($(OPENJDK_TARGET_OS), aix) - LIBJSOUND_CFLAGS += -DX_PLATFORM=X_AIX -endif - -ifeq ($(OPENJDK_TARGET_OS), macosx) - LIBJSOUND_TOOLCHAIN := TOOLCHAIN_LINK_CXX - LIBJSOUND_CFLAGS += -DX_PLATFORM=X_MACOSX -endif - -ifeq ($(OPENJDK_TARGET_OS), solaris) - LIBJSOUND_CFLAGS += -DX_PLATFORM=X_SOLARIS -endif - -$(eval $(call SetupJdkLibrary, BUILD_LIBJSOUND, \ - NAME := jsound, \ - SRC := $(LIBJSOUND_SRC_DIRS), \ - TOOLCHAIN := $(LIBJSOUND_TOOLCHAIN), \ - OPTIMIZATION := LOW, \ - CFLAGS := $(CFLAGS_JDKLIB) \ - $(LIBJSOUND_CFLAGS), \ - CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \ - MAPFILE := $(TOPDIR)/make/mapfiles/libjsound/mapfile-vers, \ - LDFLAGS := $(LDFLAGS_JDKLIB) \ - $(call SET_SHARED_LIBRARY_ORIGIN), \ - LIBS_unix := -ljava -ljvm, \ - LIBS_linux := $(ALSA_LIBS), \ - LIBS_macosx := -framework CoreAudio -framework CoreFoundation \ - -framework CoreServices -framework AudioUnit \ - -framework CoreMIDI -framework AudioToolbox $(LIBCXX), \ - LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib dsound.lib winmm.lib user32.lib ole32.lib, \ -)) - -$(BUILD_LIBJSOUND): $(call FindLib, java.base, java) - -TARGETS += $(BUILD_LIBJSOUND) - -########################################################################################## diff --git a/make/mapfiles/libattach/mapfile-aix b/make/mapfiles/libattach/mapfile-aix deleted file mode 100644 index 10ca49534ba..00000000000 --- a/make/mapfiles/libattach/mapfile-aix +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright (c) 2005, 2012, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - Java_sun_tools_attach_VirtualMachineImpl_socket - Java_sun_tools_attach_VirtualMachineImpl_connect - Java_sun_tools_attach_VirtualMachineImpl_sendQuitTo - Java_sun_tools_attach_VirtualMachineImpl_checkPermissions - Java_sun_tools_attach_VirtualMachineImpl_close - Java_sun_tools_attach_VirtualMachineImpl_read - Java_sun_tools_attach_VirtualMachineImpl_write - local: - *; -}; diff --git a/make/mapfiles/libattach/mapfile-linux b/make/mapfiles/libattach/mapfile-linux deleted file mode 100644 index 1ffc29329a0..00000000000 --- a/make/mapfiles/libattach/mapfile-linux +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (c) 2005, 2013, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - Java_sun_tools_attach_VirtualMachineImpl_checkPermissions; - Java_sun_tools_attach_VirtualMachineImpl_close; - Java_sun_tools_attach_VirtualMachineImpl_connect; - Java_sun_tools_attach_VirtualMachineImpl_open; - Java_sun_tools_attach_VirtualMachineImpl_sendQuitTo; - Java_sun_tools_attach_VirtualMachineImpl_sendQuitToChildrenOf; - Java_sun_tools_attach_VirtualMachineImpl_socket; - Java_sun_tools_attach_VirtualMachineImpl_read; - Java_sun_tools_attach_VirtualMachineImpl_write; - local: - *; -}; diff --git a/make/mapfiles/libattach/mapfile-solaris b/make/mapfiles/libattach/mapfile-solaris deleted file mode 100644 index df71490fdb8..00000000000 --- a/make/mapfiles/libattach/mapfile-solaris +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright (c) 2005, 2013, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - Java_sun_tools_attach_VirtualMachineImpl_checkPermissions; - Java_sun_tools_attach_VirtualMachineImpl_enqueue; - Java_sun_tools_attach_VirtualMachineImpl_open; - Java_sun_tools_attach_VirtualMachineImpl_close; - Java_sun_tools_attach_VirtualMachineImpl_read; - Java_sun_tools_attach_VirtualMachineImpl_sigquit; - local: - *; -}; diff --git a/make/mapfiles/libattach/reorder-windows-x86 b/make/mapfiles/libattach/reorder-windows-x86 deleted file mode 100644 index d5e250febf2..00000000000 --- a/make/mapfiles/libattach/reorder-windows-x86 +++ /dev/null @@ -1,2 +0,0 @@ -jvm_attach_thread_func@4 -jvm_attach_thread_func_end diff --git a/make/mapfiles/libattach/reorder-windows-x86_64 b/make/mapfiles/libattach/reorder-windows-x86_64 deleted file mode 100644 index c7beea8eae5..00000000000 --- a/make/mapfiles/libattach/reorder-windows-x86_64 +++ /dev/null @@ -1,2 +0,0 @@ -jvm_attach_thread_func -jvm_attach_thread_func_end diff --git a/make/mapfiles/libawt/mapfile-mawt-vers b/make/mapfiles/libawt/mapfile-mawt-vers deleted file mode 100644 index fcca100da55..00000000000 --- a/make/mapfiles/libawt/mapfile-mawt-vers +++ /dev/null @@ -1,280 +0,0 @@ -# -# Copyright (c) 2001, 2016, 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. -# - -# Define public interface. -# These are the libmawt exports. See mapfile-vers for the libawt exports - -SUNWprivate_1.1 { - global: - JNI_OnLoad; - - Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords; - Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse; - Java_java_awt_AWTEvent_nativeSetSource; - Java_java_awt_Checkbox_initIDs; - Java_java_awt_Component_initIDs; - Java_java_awt_Dialog_initIDs; - Java_java_awt_Font_initIDs; - Java_java_awt_KeyboardFocusManager_initIDs; - Java_java_awt_Menu_initIDs; - Java_java_awt_MenuComponent_initIDs; - Java_java_awt_MenuItem_initIDs; - Java_java_awt_Scrollbar_initIDs; - Java_java_awt_ScrollPane_initIDs; - Java_java_awt_TextArea_initIDs; - Java_sun_awt_FontDescriptor_initIDs; - Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner; - Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner; - Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow; - Java_sun_awt_UNIXToolkit_check_1gtk; - Java_sun_awt_UNIXToolkit_load_1gtk; - Java_sun_awt_UNIXToolkit_unload_1gtk; - Java_sun_awt_UNIXToolkit_load_1stock_1icon; - Java_sun_awt_UNIXToolkit_load_1gtk_1icon; - Java_sun_awt_UNIXToolkit_nativeSync; - Java_sun_awt_X11InputMethod_disposeXIC; - Java_sun_awt_X11InputMethod_isCompositionEnabledNative; - Java_sun_awt_X11InputMethod_resetXIC; - Java_sun_awt_X11InputMethod_setCompositionEnabledNative; - Java_sun_awt_X11InputMethod_turnoffStatusWindow; - Java_sun_awt_SunToolkit_closeSplashScreen; - Java_sun_awt_PlatformFont_initIDs; - Java_sun_awt_X11GraphicsConfig_init; - Java_sun_awt_X11GraphicsConfig_dispose; - Java_sun_awt_X11GraphicsConfig_pGetBounds; - Java_sun_awt_X11GraphicsConfig_getNumColors; - Java_sun_awt_X11GraphicsConfig_getXResolution; - Java_sun_awt_X11GraphicsConfig_getYResolution; - Java_sun_awt_X11GraphicsConfig_createBackBuffer; - Java_sun_awt_X11GraphicsConfig_destroyBackBuffer; - Java_sun_awt_X11GraphicsConfig_swapBuffers; - Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable; - Java_sun_awt_X11GraphicsDevice_isDBESupported; - Java_sun_awt_X11GraphicsDevice_getDisplay; - Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals; - Java_sun_awt_X11GraphicsDevice_getNumConfigs; - Java_sun_awt_X11GraphicsDevice_initIDs; - Java_sun_awt_X11GraphicsDevice_initXrandrExtension; - Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive; - Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive; - Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode; - Java_sun_awt_X11GraphicsDevice_enumDisplayModes; - Java_sun_awt_X11GraphicsDevice_configDisplayMode; - Java_sun_awt_X11GraphicsDevice_resetNativeData; - Java_sun_awt_X11GraphicsEnvironment_checkShmExt; - Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum; - Java_sun_awt_X11GraphicsEnvironment_getDisplayString; - Java_sun_awt_X11GraphicsEnvironment_getNumScreens; - Java_sun_awt_X11GraphicsEnvironment_initDisplay; - Java_sun_awt_X11GraphicsEnvironment_initGLX; - Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama; - Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint; - Java_sun_awt_X11GraphicsEnvironment_initXRender; - Java_java_awt_AWTEvent_initIDs; - Java_java_awt_Button_initIDs; - Java_java_awt_Container_initIDs; - Java_java_awt_Cursor_finalizeImpl; - Java_java_awt_Cursor_initIDs; - Java_java_awt_Event_initIDs; - Java_java_awt_event_InputEvent_initIDs; - Java_java_awt_event_KeyEvent_initIDs; - Java_java_awt_FileDialog_initIDs; - Java_java_awt_Frame_initIDs; - Java_java_awt_Insets_initIDs; - Java_java_awt_TextField_initIDs; - Java_java_awt_Window_initIDs; - Java_sun_awt_X11GraphicsConfig_init; - Java_sun_awt_X11GraphicsConfig_initIDs; - Java_sun_awt_X11GraphicsConfig_makeColorModel; - Java_sun_awt_X11GraphicsDevice_getConfigVisualId; - Java_sun_awt_X11GraphicsDevice_getConfigColormap; - Java_sun_awt_X11GraphicsDevice_getConfigDepth; - - Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit; - Java_sun_java2d_x11_X11PMBlitLoops_updateBitmask; - Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg; - Java_sun_java2d_x11_X11Renderer_XFillSpans; - Java_sun_java2d_x11_X11Renderer_XDrawArc; - Java_sun_java2d_x11_X11Renderer_XDrawLine; - Java_sun_java2d_x11_X11Renderer_XDrawOval; - Java_sun_java2d_x11_X11Renderer_XDrawPoly; - Java_sun_java2d_x11_X11Renderer_XDrawRect; - Java_sun_java2d_x11_X11Renderer_XDrawRoundRect; - Java_sun_java2d_x11_X11Renderer_XDoPath; - Java_sun_java2d_x11_X11Renderer_XFillArc; - Java_sun_java2d_x11_X11Renderer_XFillOval; - Java_sun_java2d_x11_X11Renderer_XFillPoly; - Java_sun_java2d_x11_X11Renderer_XFillRect; - Java_sun_java2d_x11_X11Renderer_XFillRoundRect; - Java_sun_java2d_x11_X11Renderer_devCopyArea; - Java_sun_java2d_x11_X11SurfaceData_initIDs; - Java_sun_java2d_x11_X11SurfaceData_initOps; - Java_sun_java2d_x11_X11SurfaceData_initSurface; - Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable; - Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode; - Java_sun_java2d_x11_X11SurfaceData_XSetXorMode; - Java_sun_java2d_x11_X11SurfaceData_XSetForeground; - - Java_sun_java2d_x11_XSurfaceData_initOps; - Java_sun_java2d_x11_XSurfaceData_XCreateGC; - Java_sun_java2d_x11_XSurfaceData_XResetClip; - Java_sun_java2d_x11_XSurfaceData_XSetClip; - Java_sun_java2d_x11_XSurfaceData_flushNativeSurface; - Java_sun_java2d_x11_XSurfaceData_isDrawableValid; - Java_sun_java2d_x11_XSurfaceData_setInvalid; - Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures; - Java_sun_java2d_xr_XRSurfaceData_initXRPicture; - Java_sun_java2d_xr_XRSurfaceData_initIDs; - Java_sun_java2d_xr_XRSurfaceData_XRInitSurface; - Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture; - Java_sun_java2d_xr_XRBackendNative_initIDs; - Java_sun_java2d_xr_XIDGenerator_bufferXIDs; - Java_sun_java2d_xr_XRBackendNative_freeGC; - Java_sun_java2d_xr_XRBackendNative_createGC; - Java_sun_java2d_xr_XRBackendNative_createPixmap; - Java_sun_java2d_xr_XRBackendNative_createPictureNative; - Java_sun_java2d_xr_XRBackendNative_freePicture; - Java_sun_java2d_xr_XRBackendNative_freePixmap; - Java_sun_java2d_xr_XRBackendNative_setPictureRepeat; - Java_sun_java2d_xr_XRBackendNative_setGCExposures; - Java_sun_java2d_xr_XRBackendNative_setGCForeground; - Java_sun_java2d_xr_XRBackendNative_copyArea; - Java_sun_java2d_xr_XRBackendNative_renderComposite; - Java_sun_java2d_xr_XRBackendNative_renderRectangle; - Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative; - Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative; - Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative; - Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative; - Java_sun_java2d_xr_XRBackendNative_setFilter; - Java_sun_java2d_xr_XRBackendNative_XRSetClipNative; - Java_sun_java2d_xr_XRBackendNative_putMaskNative; - Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative; - Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative; - Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative; - Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative; - Java_sun_java2d_xr_XRBackendNative_setGCMode; - Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative; - Java_sun_java2d_xr_XRUtils_initFormatPtrs; - XRT_DrawGlyphList; - - Java_sun_java2d_opengl_OGLContext_getOGLIdString; - Java_sun_java2d_opengl_OGLMaskFill_maskFill; - Java_sun_java2d_opengl_OGLRenderer_drawPoly; - Java_sun_java2d_opengl_OGLRenderQueue_flushBuffer; - Java_sun_java2d_opengl_OGLSurfaceData_initTexture; - Java_sun_java2d_opengl_OGLSurfaceData_initFBObject; - Java_sun_java2d_opengl_OGLSurfaceData_initFlipBackbuffer; - Java_sun_java2d_opengl_OGLSurfaceData_getTextureID; - Java_sun_java2d_opengl_OGLSurfaceData_getTextureTarget; - Java_sun_java2d_opengl_OGLTextRenderer_drawGlyphList; - Java_sun_java2d_opengl_GLXGraphicsConfig_getGLXConfigInfo; - Java_sun_java2d_opengl_GLXGraphicsConfig_initConfig; - Java_sun_java2d_opengl_GLXGraphicsConfig_getOGLCapabilities; - Java_sun_java2d_opengl_GLXSurfaceData_initOps; - - Java_sun_print_CUPSPrinter_initIDs; - Java_sun_print_CUPSPrinter_getCupsServer; - Java_sun_print_CUPSPrinter_getCupsPort; - Java_sun_print_CUPSPrinter_getCupsDefaultPrinter; - Java_sun_print_CUPSPrinter_canConnect; - Java_sun_print_CUPSPrinter_getMedia; - Java_sun_print_CUPSPrinter_getPageSizes; - Java_sun_print_CUPSPrinter_getResolutions; - - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1arrow; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box_1gap; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1check; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1expander; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1extension; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1flat_1box; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1focus; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1handle; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1hline; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1option; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1shadow; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1slider; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1vline; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1background; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeStartPainting; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeFinishPainting; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1switch_1theme; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1get_1gtk_1setting; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeSetRangeValue; - Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetXThickness; - Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetYThickness; - Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetColorForState; - Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetClassValue; - Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetPangoFontName; - - awt_display; - awt_Lock; - awt_Unlock; - awt_GetDrawingSurface; - awt_FreeDrawingSurface; - awt_GetComponent; - awt_CreateEmbeddedFrame; - awt_SetBounds; - awt_SynthesizeWindowActivation; - - X11SurfaceData_GetOps; - getDefaultConfig; - Java_sun_font_FontConfigManager_getFontConfig; - Java_sun_font_FontConfigManager_getFontConfigAASettings; - Java_sun_awt_FcFontManager_getFontPathNative; - Java_sun_font_SunFontManager_populateFontFileNameMap; - - # CDE private entry point - Java_sun_awt_motif_XsessionWMcommand; - Java_sun_awt_motif_XsessionWMcommand_New; - - # libfontmanager entry points - AWTIsHeadless; - AWTCountFonts; - AWTLoadFont; - AWTFreeFont; - AWTFontAscent; - AWTFontDescent; - AWTFontMinByte1; - AWTFontMaxByte1; - AWTFontMinCharOrByte2; - AWTFontMaxCharOrByte2; - AWTFontDefaultChar; - AWTFontPerChar; - AWTFontMaxBounds; - AWTFontTextExtents16; - AWTFreeChar; - AWTFontGenerateImage; - AWTCharAdvance; - AWTCharLBearing; - AWTCharRBearing; - AWTCharAscent; - AWTCharDescent; - AWTDrawGlyphList; - AccelGlyphCache_RemoveAllCellInfos; - - local: - *; -}; diff --git a/make/mapfiles/libawt/mapfile-vers b/make/mapfiles/libawt/mapfile-vers deleted file mode 100644 index 9d8a34d3f37..00000000000 --- a/make/mapfiles/libawt/mapfile-vers +++ /dev/null @@ -1,189 +0,0 @@ -# -# Copyright (c) 1997, 2014, 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. -# - -# Define public interface. -# These are the libawt exports, mapfile-mawt-vers contains the libmawt exports. - -SUNWprivate_1.1 { - global: - JNI_OnLoad; - - Java_java_awt_CheckboxMenuItem_initIDs; - Java_java_awt_Color_initIDs; - Java_java_awt_FontMetrics_initIDs; - Java_java_awt_image_BufferedImage_initIDs; - Java_sun_awt_image_DataBufferNative_getElem; - Java_sun_awt_image_DataBufferNative_setElem; - Java_java_awt_image_ColorModel_initIDs; - Java_java_awt_image_IndexColorModel_initIDs; - Java_java_awt_image_Kernel_initIDs; - Java_java_awt_image_Raster_initIDs; - Java_java_awt_image_SampleModel_initIDs; - Java_java_awt_Label_initIDs; - Java_java_awt_MenuBar_initIDs; - Java_java_awt_ScrollPaneAdjustable_initIDs; - Java_java_awt_Toolkit_initIDs; - Java_sun_awt_DebugSettings_setCTracingOn__Z; - Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2; - Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I; - Java_sun_awt_image_ByteComponentRaster_initIDs; - Java_sun_awt_image_GifImageDecoder_initIDs; - Java_sun_awt_image_GifImageDecoder_parseImage; - Java_sun_awt_image_ImageRepresentation_initIDs; - Java_sun_awt_image_ImageRepresentation_setDiffICM; - Java_sun_awt_image_ImageRepresentation_setICMpixels; - Java_sun_awt_image_ImagingLib_convolveBI; - Java_sun_awt_image_ImagingLib_convolveRaster; - Java_sun_awt_image_ImagingLib_init; - Java_sun_awt_image_ImagingLib_transformBI; - Java_sun_awt_image_ImagingLib_transformRaster; - Java_sun_awt_image_IntegerComponentRaster_initIDs; - Java_sun_awt_image_ShortComponentRaster_initIDs; - Java_sun_java2d_pipe_BufferedMaskBlit_enqueueTile; - Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans; - Java_sun_java2d_pipe_SpanClipRenderer_eraseTile; - Java_sun_java2d_pipe_SpanClipRenderer_fillTile; - Java_sun_java2d_pipe_ShapeSpanIterator_addSegment; - Java_sun_java2d_pipe_ShapeSpanIterator_moveTo; - Java_sun_java2d_pipe_ShapeSpanIterator_lineTo; - Java_sun_java2d_pipe_ShapeSpanIterator_quadTo; - Java_sun_java2d_pipe_ShapeSpanIterator_curveTo; - Java_sun_java2d_pipe_ShapeSpanIterator_closePath; - Java_sun_java2d_pipe_ShapeSpanIterator_pathDone; - Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer; - Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly; - Java_sun_java2d_pipe_ShapeSpanIterator_dispose; - Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator; - Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox; - Java_sun_java2d_pipe_ShapeSpanIterator_initIDs; - Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox; - Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan; - Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize; - Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY; - Java_sun_java2d_pipe_ShapeSpanIterator_setRule; - Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo; - - Java_java_awt_Choice_initIDs; - Java_java_awt_Dimension_initIDs; - Java_java_awt_event_MouseEvent_initIDs; - Java_java_awt_image_SinglePixelPackedSampleModel_initIDs; - Java_java_awt_Rectangle_initIDs; - Java_sun_awt_image_BufImgSurfaceData_initIDs; - Java_sun_awt_image_BufImgSurfaceData_initRaster; - Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData; - Java_sun_awt_image_BytePackedRaster_initIDs; - Java_sun_awt_image_ImagingLib_lookupByteBI; - Java_sun_awt_image_ImagingLib_lookupByteRaster; - Java_sun_java2d_SurfaceData_initIDs; - Java_sun_java2d_SurfaceData_isOpaqueGray; - Java_sun_java2d_Disposer_initIDs; - Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose; - Java_sun_java2d_loops_BlitBg_BlitBg; - Java_sun_java2d_loops_Blit_Blit; - Java_sun_java2d_loops_ScaledBlit_Scale; - Java_sun_java2d_loops_DrawLine_DrawLine; - Java_sun_java2d_loops_DrawPolygons_DrawPolygons; - Java_sun_java2d_loops_DrawPath_DrawPath; - Java_sun_java2d_loops_FillPath_FillPath; - - Java_sun_java2d_loops_DrawRect_DrawRect; - Java_sun_java2d_loops_FillRect_FillRect; - Java_sun_java2d_loops_FillSpans_FillSpans; - Java_sun_java2d_loops_FillParallelogram_FillParallelogram; - Java_sun_java2d_loops_DrawParallelogram_DrawParallelogram; - Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs; - Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops; - Java_sun_java2d_loops_MaskBlit_MaskBlit; - Java_sun_java2d_loops_MaskFill_MaskFill; - Java_sun_java2d_loops_MaskFill_FillAAPgram; - Java_sun_java2d_loops_MaskFill_DrawAAPgram; - Java_sun_java2d_loops_TransformHelper_Transform; - Java_sun_java2d_pipe_Region_initIDs; - Java_sun_java2d_pipe_SpanClipRenderer_initIDs; - sun_awt_image_GifImageDecoder_initIDs; - - # libmawt entry points - SurfaceData_InitOps; - SurfaceData_ThrowInvalidPipeException; - SurfaceData_IntersectBlitBounds; - SurfaceData_IntersectBoundsXYXY; - Region_GetBounds; - Region_GetInfo; - Region_StartIteration; - Region_CountIterationRects; - Region_NextIteration; - Region_EndIteration; - RegionToYXBandedRectangles; - GrPrim_CompGetXorInfo; - GrPrim_CompGetAlphaInfo; - J2dTraceImpl; - J2dTraceInit; - img_makePalette; - initInverseGrayLut; - make_dither_arrays; - make_uns_ordered_dither_array; - - # variables exported to libmawt - std_img_oda_red; - std_img_oda_blue; - std_img_oda_green; - std_odas_computed; - g_CMpDataID; - colorValueID; - mul8table; - div8table; - jvm; - - # ProcessPath entry points and data - doDrawPath; - doFillPath; - path2DNumTypesID; - path2DTypesID; - path2DWindingRuleID; - path2DFloatCoordsID; - sg2dStrokeHintID; - sunHints_INTVAL_STROKE_PURE; - - # CDE private entry points - # These are in awt_LoadLibrary.c and falls through to libmawt. - # Evidently CDE needs this for backward compatability. - Java_sun_awt_motif_XsessionWMcommand; - Java_sun_awt_motif_XsessionWMcommand_New; - - # libfontmanager entry points - AWTIsHeadless; - GrPrim_Sg2dGetCompInfo; - GrPrim_Sg2dGetClip; - GetNativePrim; - SurfaceData_IntersectBounds; - SurfaceData_GetOps; - Disposer_AddRecord; - GrPrim_Sg2dGetEaRGB; - GrPrim_Sg2dGetPixel; - GrPrim_Sg2dGetLCDTextContrast; - - local: - *; -}; diff --git a/make/mapfiles/libawt/mapfile-vers-linux b/make/mapfiles/libawt/mapfile-vers-linux deleted file mode 100644 index 7627a891363..00000000000 --- a/make/mapfiles/libawt/mapfile-vers-linux +++ /dev/null @@ -1,303 +0,0 @@ -# -# Copyright (c) 2002, 2016, 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. -# - -# Define public interface for libawt.so on Linux. -# Linux port does not use mawt, all public symbols are in libawt.so - -SUNWprivate_1.1 { - global: - JNI_OnLoad; - - Java_java_awt_CheckboxMenuItem_initIDs; - Java_java_awt_Color_initIDs; - Java_java_awt_FontMetrics_initIDs; - Java_java_awt_image_BufferedImage_initIDs; - Java_sun_awt_image_DataBufferNative_getElem; - Java_sun_awt_image_DataBufferNative_setElem; - Java_java_awt_image_ColorModel_initIDs; - Java_java_awt_image_IndexColorModel_initIDs; - Java_java_awt_image_Kernel_initIDs; - Java_java_awt_image_Raster_initIDs; - Java_java_awt_image_SampleModel_initIDs; - Java_java_awt_Label_initIDs; - Java_java_awt_MenuBar_initIDs; - Java_java_awt_ScrollPaneAdjustable_initIDs; - Java_java_awt_Toolkit_initIDs; - Java_java_awt_TrayIcon_initIDs; - Java_sun_awt_DebugSettings_setCTracingOn__Z; - Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2; - Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I; - Java_sun_awt_image_ByteComponentRaster_initIDs; - Java_sun_awt_image_GifImageDecoder_initIDs; - Java_sun_awt_image_GifImageDecoder_parseImage; - Java_sun_awt_image_Image_initIDs; - Java_sun_awt_image_ImageRepresentation_initIDs; - Java_sun_awt_image_ImageRepresentation_setDiffICM; - Java_sun_awt_image_ImageRepresentation_setICMpixels; - Java_sun_awt_image_ImagingLib_convolveBI; - Java_sun_awt_image_ImagingLib_convolveRaster; - Java_sun_awt_image_ImagingLib_init; - Java_sun_awt_image_ImagingLib_transformBI; - Java_sun_awt_image_ImagingLib_transformRaster; - Java_sun_awt_image_IntegerComponentRaster_initIDs; - Java_sun_awt_image_ShortComponentRaster_initIDs; - Java_sun_java2d_pipe_SpanClipRenderer_eraseTile; - Java_sun_java2d_pipe_SpanClipRenderer_fillTile; - Java_sun_java2d_pipe_ShapeSpanIterator_addSegment; - Java_sun_java2d_pipe_ShapeSpanIterator_moveTo; - Java_sun_java2d_pipe_ShapeSpanIterator_lineTo; - Java_sun_java2d_pipe_ShapeSpanIterator_quadTo; - Java_sun_java2d_pipe_ShapeSpanIterator_curveTo; - Java_sun_java2d_pipe_ShapeSpanIterator_closePath; - Java_sun_java2d_pipe_ShapeSpanIterator_pathDone; - Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer; - Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly; - Java_sun_java2d_pipe_ShapeSpanIterator_dispose; - Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator; - Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox; - Java_sun_java2d_pipe_ShapeSpanIterator_initIDs; - Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox; - Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan; - Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize; - Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY; - Java_sun_java2d_pipe_ShapeSpanIterator_setRule; - Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo; - - Java_java_awt_Choice_initIDs; - Java_java_awt_Dimension_initIDs; - Java_java_awt_event_MouseEvent_initIDs; - Java_java_awt_image_SinglePixelPackedSampleModel_initIDs; - Java_java_awt_Rectangle_initIDs; - Java_sun_awt_image_BufImgSurfaceData_getSurfaceData; - Java_sun_awt_image_BufImgSurfaceData_initIDs; - Java_sun_awt_image_BufImgSurfaceData_initRaster; - Java_sun_awt_image_BufImgSurfaceData_setSurfaceData; - Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData; - Java_sun_awt_image_BytePackedRaster_initIDs; - Java_sun_awt_image_ImagingLib_lookupByteBI; - Java_sun_awt_image_ImagingLib_lookupByteRaster; - Java_sun_java2d_SurfaceData_initIDs; - Java_sun_java2d_SurfaceData_isOpaqueGray; - Java_sun_java2d_Disposer_initIDs; - Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose; - Java_sun_java2d_loops_BlitBg_BlitBg; - Java_sun_java2d_loops_Blit_Blit; - Java_sun_java2d_loops_ScaledBlit_Scale; - Java_sun_java2d_loops_DrawLine_DrawLine; - Java_sun_java2d_loops_DrawPolygons_DrawPolygons; - Java_sun_java2d_loops_DrawRect_DrawRect; - Java_sun_java2d_loops_FillRect_FillRect; - Java_sun_java2d_loops_FillSpans_FillSpans; - Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs; - Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops; - Java_sun_java2d_loops_MaskBlit_MaskBlit; - Java_sun_java2d_loops_MaskFill_MaskFill; - Java_sun_java2d_loops_MaskFill_FillAAPgram; - Java_sun_java2d_loops_MaskFill_DrawAAPgram; - Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans; - Java_sun_java2d_pipe_SpanClipRenderer_initIDs; - sun_awt_image_GifImageDecoder_initIDs; - - # libmawt entry points - SurfaceData_InitOps; - SurfaceData_ThrowInvalidPipeException; - Region_GetBounds; - Region_GetInfo; - Region_StartIteration; - Region_CountIterationRects; - Region_NextIteration; - Region_EndIteration; - GrPrim_CompGetXorInfo; - GrPrim_CompGetAlphaInfo; - img_makePalette; - initInverseGrayLut; - make_dither_arrays; - make_uns_ordered_dither_array; - - # variables exported to libmawt - std_img_oda_red; - std_img_oda_blue; - std_img_oda_green; - std_odas_computed; - g_CMpDataID; - colorValueID; - jvm; - - # CDE private entry point - # This is in awt_LoadLibrary.c and falls through to libmawt. - # Evidently CDE needs this for backward compatability. - Java_sun_awt_motif_XsessionWMcommand; - - # libfontmanager entry points - AWTIsHeadless; - GrPrim_Sg2dGetCompInfo; - GrPrim_Sg2dGetClip; - GetNativePrim; - SurfaceData_IntersectBounds; - SurfaceData_GetOps; - Disposer_AddRecord; - GrPrim_Sg2dGetEaRGB; - GrPrim_Sg2dGetPixel; - GrPrim_Sg2dGetLCDTextContrast; - - Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords; - Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse; - Java_java_awt_AWTEvent_nativeSetSource; - Java_java_awt_Checkbox_initIDs; - Java_java_awt_Component_initIDs; - Java_java_awt_Dialog_initIDs; - Java_java_awt_Font_initIDs; - Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner; - Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner; - Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow; - Java_java_awt_KeyboardFocusManager_initIDs; - Java_java_awt_Menu_initIDs; - Java_java_awt_MenuComponent_initIDs; - Java_java_awt_MenuItem_initIDs; - Java_java_awt_Scrollbar_initIDs; - Java_java_awt_ScrollPane_initIDs; - Java_java_awt_TextArea_initIDs; - Java_sun_awt_FontDescriptor_initIDs; - Java_sun_awt_X11InputMethod_disposeXIC; - Java_sun_awt_X11InputMethod_isCompositionEnabledNative; - Java_sun_awt_X11InputMethod_resetXIC; - Java_sun_awt_X11InputMethod_setCompositionEnabledNative; - Java_sun_awt_X11InputMethod_turnoffStatusWindow; - Java_sun_awt_SunToolkit_closeSplashScreen; - Java_sun_awt_PlatformFont_initIDs; - Java_sun_awt_X11GraphicsConfig_init; - Java_sun_awt_X11GraphicsConfig_dispose; - Java_sun_awt_X11GraphicsConfig_pGetBounds; - Java_sun_awt_X11GraphicsConfig_getNumColors; - Java_sun_awt_X11GraphicsConfig_getXResolution; - Java_sun_awt_X11GraphicsConfig_getYResolution; - Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable; - Java_sun_awt_X11GraphicsDevice_isDBESupported; - Java_sun_awt_X11GraphicsDevice_getDisplay; - Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals; - Java_sun_awt_X11GraphicsDevice_getNumConfigs; - Java_sun_awt_X11GraphicsDevice_initIDs; - Java_sun_awt_X11GraphicsDevice_initXrandrExtension; - Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive; - Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive; - Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode; - Java_sun_awt_X11GraphicsDevice_enumDisplayModes; - Java_sun_awt_X11GraphicsDevice_configDisplayMode; - Java_sun_awt_X11GraphicsDevice_resetNativeData; - Java_sun_awt_X11GraphicsDevice_getNativeScaleFactor; - Java_sun_awt_X11GraphicsEnvironment_checkShmExt; - Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum; - Java_sun_awt_X11GraphicsEnvironment_getDisplayString; - Java_sun_awt_X11GraphicsEnvironment_getNumScreens; - Java_sun_awt_X11GraphicsEnvironment_initDisplay; - Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama; - Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint; - Java_sun_awt_X11GraphicsEnvironment_initXRender; - - Java_java_awt_AWTEvent_initIDs; - Java_java_awt_Button_initIDs; - Java_java_awt_Container_initIDs; - Java_java_awt_Cursor_finalizeImpl; - Java_java_awt_Cursor_initIDs; - Java_java_awt_Event_initIDs; - Java_java_awt_event_InputEvent_initIDs; - Java_java_awt_event_KeyEvent_initIDs; - Java_java_awt_FileDialog_initIDs; - Java_java_awt_Frame_initIDs; - Java_java_awt_Insets_initIDs; - Java_java_awt_TextField_initIDs; - Java_java_awt_Window_initIDs; - Java_sun_awt_motif_X11OffScreenImage_updateBitmask; - Java_sun_awt_X11GraphicsConfig_init; - Java_sun_awt_X11GraphicsConfig_initIDs; - Java_sun_awt_X11GraphicsConfig_makeColorModel; - Java_sun_awt_X11GraphicsDevice_getConfigVisualId; - Java_sun_awt_X11PMBlitLoops_Blit; - Java_sun_awt_X11PMBlitBgLoops_nativeBlitBg; - Java_sun_awt_X11Renderer_devFillSpans; - Java_sun_awt_X11Renderer_doDrawArc; - Java_sun_awt_X11Renderer_doDrawLine; - Java_sun_awt_X11Renderer_doDrawOval; - Java_sun_awt_X11Renderer_doDrawPoly; - Java_sun_awt_X11Renderer_doDrawRect; - Java_sun_awt_X11Renderer_doDrawRoundRect; - Java_sun_awt_X11Renderer_doFillArc; - Java_sun_awt_X11Renderer_doFillOval; - Java_sun_awt_X11Renderer_doFillPoly; - Java_sun_awt_X11Renderer_doFillRect; - Java_sun_awt_X11Renderer_doFillRoundRect; - Java_sun_awt_X11Renderer_devCopyArea; - Java_sun_awt_X11SurfaceData_initIDs; - Java_sun_awt_X11SurfaceData_initOps; - Java_sun_awt_X11SurfaceData_initSurface; - Java_sun_awt_X11SurfaceData_setInvalid; - Java_sun_awt_X11SurfaceData_flushNativeSurface; - awt_display; - awt_lock; - awt_Lock; - awt_Unlock; - awt_GetDrawingSurface; - awt_FreeDrawingSurface; - awt_GetComponent; - awt_CreateEmbeddedFrame; - awt_SetBounds; - awt_SynthesizeWindowActivation; - - X11SurfaceData_GetOps; - getDefaultConfig; - Java_sun_font_FontConfigManager_getFontConfig; - Java_sun_font_FontConfigManager_getFontConfigAASettings; - Java_sun_awt_FcFontManager_getFontPathNative; - Java_sun_font_SunFontManager_populateFontFileNameMap; - - # CDE private entry point - Java_sun_awt_motif_XsessionWMcommand; - - # libfontmanager entry points - AWTIsHeadless; - AWTCountFonts; - AWTLoadFont; - AWTFreeFont; - AWTFontMinByte1; - AWTFontMaxByte1; - AWTFontMinCharOrByte2; - AWTFontMaxCharOrByte2; - AWTFontDefaultChar; - AWTFontPerChar; - AWTFontMaxBounds; - AWTFontTextExtents16; - AWTFreeChar; - AWTFontGenerateImage; - AWTCharAdvance; - AWTCharLBearing; - AWTCharRBearing; - AWTCharAscent; - AWTCharDescent; - AWTDrawGlyphList; - AccelGlyphCache_RemoveAllCellInfos; - - local: - *; -}; diff --git a/make/mapfiles/libawt_headless/mapfile-vers b/make/mapfiles/libawt_headless/mapfile-vers deleted file mode 100644 index 4ec723ffe0a..00000000000 --- a/make/mapfiles/libawt_headless/mapfile-vers +++ /dev/null @@ -1,109 +0,0 @@ -# -# Copyright (c) 2001, 2013, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - JNI_OnLoad; - - Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit; - Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg; - Java_sun_java2d_x11_X11Renderer_XFillSpans; - Java_sun_java2d_x11_X11Renderer_XDrawArc; - Java_sun_java2d_x11_X11Renderer_XDrawLine; - Java_sun_java2d_x11_X11Renderer_XDrawOval; - Java_sun_java2d_x11_X11Renderer_XDrawPoly; - Java_sun_java2d_x11_X11Renderer_XDrawRect; - Java_sun_java2d_x11_X11Renderer_XDrawRoundRect; - Java_sun_java2d_x11_X11Renderer_XDoPath; - Java_sun_java2d_x11_X11Renderer_XFillArc; - Java_sun_java2d_x11_X11Renderer_XFillOval; - Java_sun_java2d_x11_X11Renderer_XFillPoly; - Java_sun_java2d_x11_X11Renderer_XFillRect; - Java_sun_java2d_x11_X11Renderer_XFillRoundRect; - Java_sun_java2d_x11_X11Renderer_devCopyArea; - Java_sun_java2d_x11_X11SurfaceData_initIDs; - Java_sun_java2d_x11_X11SurfaceData_initSurface; - Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode; - Java_sun_java2d_x11_X11SurfaceData_XSetXorMode; - Java_sun_java2d_x11_X11SurfaceData_XSetForeground; - - Java_sun_java2d_x11_XSurfaceData_initOps; - Java_sun_java2d_x11_XSurfaceData_XCreateGC; - Java_sun_java2d_x11_XSurfaceData_XResetClip; - Java_sun_java2d_x11_XSurfaceData_XSetClip; - Java_sun_java2d_x11_XSurfaceData_flushNativeSurface; - Java_sun_java2d_x11_XSurfaceData_isDrawableValid; - Java_sun_java2d_x11_XSurfaceData_setInvalid; - Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures; - - X11SurfaceData_GetOps; - Java_java_awt_Font_initIDs; - Java_sun_font_FontConfigManager_getFontConfig; - Java_sun_font_FontConfigManager_getFontConfigAASettings; - Java_sun_font_FontConfigManager_getFontConfigVersion; - Java_sun_awt_FcFontManager_getFontPathNative; - - Java_sun_awt_FontDescriptor_initIDs; - Java_sun_awt_PlatformFont_initIDs; - - Java_sun_print_CUPSPrinter_initIDs; - Java_sun_print_CUPSPrinter_getCupsServer; - Java_sun_print_CUPSPrinter_getCupsPort; - Java_sun_print_CUPSPrinter_getCupsDefaultPrinter; - Java_sun_print_CUPSPrinter_canConnect; - Java_sun_print_CUPSPrinter_getMedia; - Java_sun_print_CUPSPrinter_getPageSizes; - Java_sun_print_CUPSPrinter_getResolutions; - - # libfontmanager entry points - AWTIsHeadless; - AWTCountFonts; - AWTLoadFont; - AWTFreeFont; - AWTFontAscent; - AWTFontDescent; - AWTFontMinByte1; - AWTFontMaxByte1; - AWTFontMinCharOrByte2; - AWTFontMaxCharOrByte2; - AWTFontDefaultChar; - AWTFontPerChar; - AWTFontMaxBounds; - AWTFontTextExtents16; - AWTFreeChar; - AWTFontGenerateImage; - AWTCharAdvance; - AWTCharLBearing; - AWTCharRBearing; - AWTCharAscent; - AWTCharDescent; - AWTDrawGlyphList; - AccelGlyphCache_RemoveAllCellInfos; - - local: - *; -}; diff --git a/make/mapfiles/libawt_headless/reorder-sparc b/make/mapfiles/libawt_headless/reorder-sparc deleted file mode 100644 index 84e923b586a..00000000000 --- a/make/mapfiles/libawt_headless/reorder-sparc +++ /dev/null @@ -1 +0,0 @@ -# Temporary file for headless diff --git a/make/mapfiles/libawt_headless/reorder-sparcv9 b/make/mapfiles/libawt_headless/reorder-sparcv9 deleted file mode 100644 index 84e923b586a..00000000000 --- a/make/mapfiles/libawt_headless/reorder-sparcv9 +++ /dev/null @@ -1 +0,0 @@ -# Temporary file for headless diff --git a/make/mapfiles/libawt_headless/reorder-x86 b/make/mapfiles/libawt_headless/reorder-x86 deleted file mode 100644 index 84e923b586a..00000000000 --- a/make/mapfiles/libawt_headless/reorder-x86 +++ /dev/null @@ -1 +0,0 @@ -# Temporary file for headless diff --git a/make/mapfiles/libawt_xawt/mapfile-vers b/make/mapfiles/libawt_xawt/mapfile-vers deleted file mode 100644 index e154ff60442..00000000000 --- a/make/mapfiles/libawt_xawt/mapfile-vers +++ /dev/null @@ -1,468 +0,0 @@ -# -# Copyright (c) 2002, 2016, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - JNI_OnLoad; - Java_sun_awt_X11_XlibWrapper_copyIntArray; - Java_sun_awt_X11_XlibWrapper_copyLongArray; - Java_sun_awt_X11_XlibWrapper_getAddress; - Java_sun_awt_X11_XlibWrapper_XConvertSelection; - Java_sun_awt_X11_XlibWrapper_XSetSelectionOwner; - Java_sun_awt_X11_XlibWrapper_XGetSelectionOwner; - Java_sun_awt_X11_XlibWrapper_XGetAtomName; - Java_sun_awt_X11_XlibWrapper_XMaxRequestSize; - Java_sun_awt_X11_XlibWrapper_XReparentWindow; - Java_sun_awt_X11_XlibWrapper_XAllocSizeHints; - Java_sun_awt_X11_XlibWrapper_XAllocWMHints; - Java_sun_awt_X11_XlibWrapper_XSetMinMaxHints; - Java_sun_awt_X11_XlibWrapper_XGetVisualInfo; - Java_sun_awt_X11_XlibWrapper_XOpenDisplay; - Java_sun_awt_X11_XlibWrapper_XCloseDisplay; - Java_sun_awt_X11_XlibWrapper_XDisplayString; - Java_sun_awt_X11_XlibWrapper_XSetCloseDownMode; - Java_sun_awt_X11_XlibWrapper_XCreateWindow; - Java_sun_awt_X11_XlibWrapper_XMapWindow; - Java_sun_awt_X11_XlibWrapper_XMapRaised; - Java_sun_awt_X11_XlibWrapper_XUnmapWindow; - Java_sun_awt_X11_XlibWrapper_XSelectInput; - Java_sun_awt_X11_XlibWrapper_XNextEvent; - Java_sun_awt_X11_XlibWrapper_XMaskEvent; - Java_sun_awt_X11_XlibWrapper_XWindowEvent; - Java_sun_awt_X11_XlibWrapper_XFilterEvent; - Java_sun_awt_X11_XlibWrapper_XSupportsLocale; - Java_sun_awt_X11_XlibWrapper_XSetLocaleModifiers; - Java_sun_awt_X11_XlibWrapper_XPeekEvent; - Java_sun_awt_X11_XlibWrapper_DefaultScreen; - Java_sun_awt_X11_XlibWrapper_ScreenOfDisplay; - Java_sun_awt_X11_XlibWrapper_DoesBackingStore; - Java_sun_awt_X11_XlibWrapper_RootWindow; - Java_sun_awt_X11_XlibWrapper_DisplayHeight; - Java_sun_awt_X11_XlibWrapper_DisplayWidthMM; - Java_sun_awt_X11_XlibWrapper_DisplayWidth; - Java_sun_awt_X11_XlibWrapper_DisplayHeightMM; - Java_sun_awt_X11_XlibWrapper_ScreenCount; - Java_sun_awt_X11_XlibWrapper_XMoveResizeWindow; - Java_sun_awt_X11_XlibWrapper_XResizeWindow; - Java_sun_awt_X11_XlibWrapper_XMoveWindow; - Java_sun_awt_X11_XlibWrapper_XGetWindowAttributes; - Java_sun_awt_X11_XlibWrapper_XGetGeometry; - Java_sun_awt_X11_XlibWrapper_XGrabPointer; - Java_sun_awt_X11_XlibWrapper_XUngrabPointer; - Java_sun_awt_X11_XlibWrapper_XGrabKeyboard; - Java_sun_awt_X11_XlibWrapper_XUngrabKeyboard; - Java_sun_awt_X11_XlibWrapper_XSetWindowBackground; - Java_sun_awt_X11_XlibWrapper_XFlush; - Java_sun_awt_X11_XlibWrapper_XSync; - Java_sun_awt_X11_XlibWrapper_XEventsQueued; - Java_sun_awt_X11_XlibWrapper_XRaiseWindow; - Java_sun_awt_X11_XlibWrapper_XLowerWindow; - Java_sun_awt_X11_XlibWrapper_XRestackWindows; - Java_sun_awt_X11_XlibWrapper_XSetInputFocus; - Java_sun_awt_X11_XlibWrapper_XSetInputFocus2; - Java_sun_awt_X11_XlibWrapper_XGetInputFocus; - Java_sun_awt_X11_XlibWrapper_XDestroyWindow; - Java_sun_awt_X11_XlibWrapper_XTranslateCoordinates; - Java_sun_awt_X11_XlibWrapper_XCreateFontCursor; - Java_sun_awt_X11_XlibWrapper_XSetTransientFor; - Java_sun_awt_X11_XlibWrapper_XSetWMHints; - Java_sun_awt_X11_XlibWrapper_XGetWMHints; - Java_sun_awt_X11_XlibWrapper_XShapeQueryExtension; - Java_sun_awt_X11_XlibWrapper_SetRectangularShape; - Java_sun_awt_X11_XlibWrapper_SetBitmapShape; - Java_sun_awt_X11_XlibWrapper_XConfigureWindow; - Java_sun_awt_X11_XlibWrapper_SetZOrder; - Java_sun_awt_X11_XToolkit_initIDs; - Java_sun_awt_X11_XWindow_getNativeColor; - Java_sun_awt_X11_XWindow_getWMInsets; - Java_sun_awt_X11_XWindow_getTopWindow; - Java_sun_awt_X11_XWindow_getWindowBounds; - Java_sun_awt_X11_XWindow_setSizeHints; - Java_sun_awt_X11_XWindow_getAWTKeyCodeForKeySym; - Java_sun_awt_X11_XWindow_getKeySymForAWTKeyCode; - Java_sun_awt_X11_XToolkit_nativeLoadSystemColors; - Java_sun_awt_X11_XToolkit_awt_1toolkit_1init; - Java_sun_awt_X11_XToolkit_awt_1output_1flush; - Java_sun_awt_X11_XToolkit_wakeup_1poll; - Java_java_awt_Cursor_finalizeImpl; - Java_sun_awt_X11_XlibWrapper_InternAtom; - Java_sun_awt_X11_XlibWrapper_GetProperty; - Java_sun_awt_X11_XlibWrapper_SetProperty; - Java_sun_awt_X11_XlibWrapper_XGetDefault; - Java_sun_awt_X11_XlibWrapper_XGetPointerMapping; - Java_sun_awt_X11_XlibWrapper_XScreenNumberOfScreen; - Java_sun_awt_X11_XlibWrapper_getScreenOfWindow; - Java_sun_awt_X11_XlibWrapper_XIconifyWindow; - Java_sun_awt_X11_XlibWrapper_XBell; - Java_sun_awt_X11_XlibWrapper_XChangePropertyImpl; - Java_sun_awt_X11_XlibWrapper_XChangePropertyS; - Java_sun_awt_X11_XlibWrapper_XGetWindowProperty; - Java_sun_awt_X11_XlibWrapper_getStringBytes; - Java_sun_awt_X11_XlibWrapper_XFree; - Java_sun_awt_X11_XlibWrapper_ServerVendor; - Java_sun_awt_X11_XlibWrapper_VendorRelease; - Java_sun_awt_X11_XlibWrapper_IsXsunKPBehavior; - Java_sun_awt_X11_XlibWrapper_IsSunKeyboard; - Java_sun_awt_X11_XlibWrapper_IsKanaKeyboard; - Java_sun_awt_X11_XlibWrapper_SetToolkitErrorHandler; - Java_sun_awt_X11_XlibWrapper_XSetErrorHandler; - Java_sun_awt_X11_XlibWrapper_CallErrorHandler; - Java_sun_awt_X11_XlibWrapper_PrintXErrorEvent; - Java_sun_awt_X11_XlibWrapper_XInternAtoms; - Java_sun_awt_X11_XlibWrapper_XChangeWindowAttributes; - Java_sun_awt_X11_XlibWrapper_XDeleteProperty; - Java_sun_awt_X11_XlibWrapper_XSetWMNormalHints; - Java_sun_awt_X11_XlibWrapper_XGetWMNormalHints; - Java_sun_awt_X11_XlibWrapper_XSendEvent; - Java_sun_awt_X11_XlibWrapper_XQueryTree; - Java_sun_awt_X11_XlibWrapper_memcpy; - Java_sun_awt_X11_XlibWrapper_XdbeQueryExtension; - Java_sun_awt_X11_XlibWrapper_XQueryExtension; - Java_sun_awt_X11_XlibWrapper_IsKeypadKey; - Java_sun_awt_X11_XlibWrapper_XdbeAllocateBackBufferName; - Java_sun_awt_X11_XlibWrapper_XdbeDeallocateBackBufferName; - Java_sun_awt_X11_XlibWrapper_XdbeSwapBuffers; - Java_sun_awt_X11_XlibWrapper_XdbeBeginIdiom; - Java_sun_awt_X11_XlibWrapper_XdbeEndIdiom; - Java_sun_awt_X11_XDesktopPeer_init; - Java_sun_awt_X11_XDesktopPeer_gnome_1url_1show; - Java_sun_awt_X11_XTaskbarPeer_init; - Java_sun_awt_X11_XTaskbarPeer_runloop; - Java_sun_awt_X11_XTaskbarPeer_setBadge; - Java_sun_awt_X11_XTaskbarPeer_setUrgent; - Java_sun_awt_X11_XTaskbarPeer_updateProgress; - Java_sun_awt_X11_XTaskbarPeer_setNativeMenu; - Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl; - Java_sun_awt_X11_XRobotPeer_keyPressImpl; - Java_sun_awt_X11_XRobotPeer_keyReleaseImpl; - Java_sun_awt_X11_XRobotPeer_mouseMoveImpl; - Java_sun_awt_X11_XRobotPeer_mousePressImpl; - Java_sun_awt_X11_XRobotPeer_mouseReleaseImpl; - Java_sun_awt_X11_XRobotPeer_mouseWheelImpl; - Java_sun_awt_X11_XRobotPeer_setup; - Java_sun_awt_X11_XRobotPeer_loadNativeLibraries; - Java_sun_awt_X11_XToolkit_getNumberOfButtonsImpl; - Java_java_awt_Component_initIDs; - Java_java_awt_Container_initIDs; - Java_java_awt_Button_initIDs; - Java_java_awt_Scrollbar_initIDs; - Java_java_awt_Window_initIDs; - Java_java_awt_Frame_initIDs; - Java_sun_awt_SunToolkit_closeSplashScreen; - Java_sun_awt_UNIXToolkit_check_1gtk; - Java_sun_awt_UNIXToolkit_load_1gtk; - Java_sun_awt_UNIXToolkit_unload_1gtk; - Java_sun_awt_UNIXToolkit_load_1stock_1icon; - Java_sun_awt_UNIXToolkit_load_1gtk_1icon; - Java_sun_awt_UNIXToolkit_nativeSync; - Java_sun_awt_UNIXToolkit_gtkCheckVersionImpl; - Java_sun_awt_UNIXToolkit_get_1gtk_1version; - Java_java_awt_AWTEvent_initIDs; - Java_java_awt_event_InputEvent_initIDs; - Java_java_awt_event_KeyEvent_initIDs; - Java_java_awt_MenuComponent_initIDs; - Java_java_awt_Cursor_initIDs; - Java_java_awt_MenuItem_initIDs; - Java_java_awt_Menu_initIDs; - Java_java_awt_TextArea_initIDs; - Java_java_awt_Checkbox_initIDs; - Java_java_awt_ScrollPane_initIDs; - Java_java_awt_TextField_initIDs; - Java_java_awt_TrayIcon_initIDs; - Java_sun_font_FontConfigManager_getFontConfig; - Java_sun_font_FontConfigManager_getFontConfigAASettings; - Java_sun_font_FontConfigManager_getFontConfigVersion; - Java_sun_awt_FcFontManager_getFontPathNative; - Java_sun_awt_X11GraphicsEnvironment_initDisplay; - Java_sun_awt_X11GraphicsEnvironment_initGLX; - Java_sun_awt_X11GraphicsEnvironment_initXRender; - Java_sun_awt_X11GraphicsEnvironment_checkShmExt; - Java_sun_awt_X11GraphicsEnvironment_getNumScreens; - Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum; - Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama; - Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint; - Java_sun_awt_X11GraphicsEnvironment_getDisplayString; - Java_sun_awt_X11GraphicsDevice_initIDs; - Java_sun_awt_X11GraphicsDevice_getConfigVisualId; - Java_sun_awt_X11GraphicsDevice_getConfigDepth; - Java_sun_awt_X11GraphicsDevice_getNumConfigs; - Java_sun_awt_X11GraphicsDevice_getConfigColormap; - Java_sun_awt_X11GraphicsDevice_isDBESupported; - Java_sun_awt_X11GraphicsDevice_getDisplay; - Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals; - Java_sun_awt_X11GraphicsDevice_initXrandrExtension; - Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive; - Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive; - Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode; - Java_sun_awt_X11GraphicsDevice_enumDisplayModes; - Java_sun_awt_X11GraphicsDevice_configDisplayMode; - Java_sun_awt_X11GraphicsDevice_resetNativeData; - Java_sun_awt_X11GraphicsDevice_getNativeScaleFactor; - Java_sun_awt_X11GraphicsConfig_initIDs; - Java_sun_awt_X11GraphicsConfig_getXResolution; - Java_sun_awt_X11GraphicsConfig_getYResolution; - Java_sun_awt_X11GraphicsConfig_init; - Java_sun_awt_X11GraphicsConfig_dispose; - Java_sun_awt_X11GraphicsConfig_makeColorModel; - Java_sun_awt_X11GraphicsConfig_pGetBounds; - Java_sun_awt_X11GraphicsConfig_createBackBuffer; - Java_sun_awt_X11GraphicsConfig_destroyBackBuffer; - Java_sun_awt_X11GraphicsConfig_swapBuffers; - Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable; - Java_sun_awt_X11_XToolkit_getTrayIconDisplayTimeout; - Java_java_awt_Insets_initIDs; - Java_java_awt_KeyboardFocusManager_initIDs; - Java_java_awt_Font_initIDs; - # libfontmanager entry points - AWTIsHeadless; - AWTCountFonts; - AWTLoadFont; - AWTFreeFont; - AWTFontAscent; - AWTFontDescent; - AWTFontMinByte1; - AWTFontMaxByte1; - AWTFontMinCharOrByte2; - AWTFontMaxCharOrByte2; - AWTFontDefaultChar; - AWTFontPerChar; - AWTFontMaxBounds; - AWTFontTextExtents16; - AWTFreeChar; - AWTFontGenerateImage; - AWTCharAdvance; - AWTCharLBearing; - AWTCharRBearing; - AWTCharAscent; - AWTCharDescent; - AWTDrawGlyphList; - AccelGlyphCache_RemoveAllCellInfos; - - Java_sun_awt_X11_XToolkit_waitForEvents; - Java_java_awt_Event_initIDs; - Java_sun_awt_X11_XWindow_x11inputMethodLookupString; - Java_sun_awt_X11_XWindow_haveCurrentX11InputMethodInstance; - Java_java_awt_AWTEvent_nativeSetSource; - Java_java_awt_Dialog_initIDs; - Java_sun_awt_PlatformFont_initIDs; - Java_sun_awt_FontDescriptor_initIDs; - Java_sun_awt_X11_XFontPeer_initIDs; - Java_sun_awt_X11InputMethod_initIDs; - Java_sun_awt_X11InputMethod_resetXIC; - Java_sun_awt_X11InputMethod_disposeXIC; - Java_sun_awt_X11InputMethod_setCompositionEnabledNative; - Java_sun_awt_X11InputMethod_isCompositionEnabledNative; - Java_sun_awt_X11InputMethod_turnoffStatusWindow; - Java_sun_awt_X11_XInputMethod_openXIMNative; - Java_sun_awt_X11_XInputMethod_createXICNative; - Java_sun_awt_X11_XInputMethod_setXICFocusNative; - Java_sun_awt_X11_XInputMethod_adjustStatusWindow; - Java_sun_awt_X11_XlibWrapper_XQueryPointer; - Java_sun_awt_X11_XlibWrapper_XFreeCursor; - Java_sun_awt_X11_XToolkit_getDefaultXColormap; - Java_sun_awt_X11_XToolkit_getDefaultScreenData; - Java_sun_awt_X11_XToolkit_getEnv; - Java_sun_awt_X11_XlibWrapper_XCreateBitmapFromData; - Java_sun_awt_X11_XlibWrapper_XFreePixmap; - Java_sun_awt_X11_XlibWrapper_XAllocColor; - Java_sun_awt_X11_XlibWrapper_XCreatePixmapCursor; - Java_sun_awt_X11_XlibWrapper_XQueryBestCursor; - Java_sun_awt_X11_XlibWrapper_XCreatePixmap; - Java_sun_awt_X11_XlibWrapper_XCreateImage; - Java_sun_awt_X11_XlibWrapper_XCreateGC; - Java_sun_awt_X11_XlibWrapper_XDestroyImage; - Java_sun_awt_X11_XlibWrapper_XPutImage; - Java_sun_awt_X11_XlibWrapper_XFreeGC; - Java_sun_awt_X11_XlibWrapper_XSetWindowBackgroundPixmap; - Java_sun_awt_X11_XlibWrapper_XClearWindow; - Java_sun_awt_X11_XlibWrapper_XGetIconSizes; - Java_sun_awt_X11_XlibWrapper_XKeycodeToKeysym; - Java_sun_awt_X11_XlibWrapper_XKeysymToKeycode; - Java_sun_awt_X11_XlibWrapper_XQueryKeymap; - Java_sun_awt_X11_XlibWrapper_XkbGetEffectiveGroup; - Java_sun_awt_X11_XlibWrapper_XkbSelectEvents; - Java_sun_awt_X11_XlibWrapper_XkbSelectEventDetails; - Java_sun_awt_X11_XlibWrapper_XkbKeycodeToKeysym; - Java_sun_awt_X11_XlibWrapper_XkbLibraryVersion; - Java_sun_awt_X11_XlibWrapper_XkbQueryExtension; - Java_sun_awt_X11_XlibWrapper_XkbGetMap; - Java_sun_awt_X11_XlibWrapper_XkbGetUpdatedMap; - Java_sun_awt_X11_XlibWrapper_XkbFreeKeyboard; - Java_sun_awt_X11_XlibWrapper_XkbTranslateKeyCode; - Java_sun_awt_X11_XlibWrapper_XkbSetDetectableAutoRepeat; - Java_sun_awt_X11_XlibWrapper_XGetModifierMapping; - Java_sun_awt_X11_XlibWrapper_XFreeModifiermap; - Java_sun_awt_X11_XlibWrapper_XRefreshKeyboardMapping; - Java_sun_awt_X11_XlibWrapper_XChangeActivePointerGrab; - Java_sun_awt_X11_XlibWrapper_XNextSecondaryLoopEvent; - Java_sun_awt_X11_XlibWrapper_ExitSecondaryLoop; - Java_sun_awt_X11_XlibWrapper_XTextPropertyToStringList; - Java_sun_awt_X11_XlibWrapper_XGrabServer; - Java_sun_awt_X11_XlibWrapper_XUngrabServer; - Java_sun_awt_X11_XlibWrapper_XPutBackEvent; - Java_sun_awt_X11_XlibWrapper_XConvertCase; - Java_sun_awt_X11_XlibWrapper_XSynchronize; - Java_java_awt_FileDialog_initIDs; - Java_sun_awt_X11_XWindow_initIDs; - Java_sun_awt_X11_XWindowPeer_getLocalHostname; - Java_sun_awt_X11_XWindowPeer_getJvmPID; - - Java_sun_java2d_opengl_OGLContext_getOGLIdString; - Java_sun_java2d_opengl_OGLMaskFill_maskFill; - Java_sun_java2d_opengl_OGLRenderer_drawPoly; - Java_sun_java2d_opengl_OGLRenderQueue_flushBuffer; - Java_sun_java2d_opengl_OGLSurfaceData_initTexture; - Java_sun_java2d_opengl_OGLSurfaceData_initFBObject; - Java_sun_java2d_opengl_OGLSurfaceData_initFlipBackbuffer; - Java_sun_java2d_opengl_OGLSurfaceData_getTextureID; - Java_sun_java2d_opengl_OGLSurfaceData_getTextureTarget; - Java_sun_java2d_opengl_OGLTextRenderer_drawGlyphList; - Java_sun_java2d_opengl_GLXGraphicsConfig_getGLXConfigInfo; - Java_sun_java2d_opengl_GLXGraphicsConfig_initConfig; - Java_sun_java2d_opengl_GLXGraphicsConfig_getOGLCapabilities; - Java_sun_java2d_opengl_GLXSurfaceData_initOps; - - Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg; - Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit; - Java_sun_java2d_x11_X11PMBlitLoops_updateBitmask; - Java_sun_java2d_x11_X11Renderer_XFillSpans; - Java_sun_java2d_x11_X11Renderer_XDrawArc; - Java_sun_java2d_x11_X11Renderer_XDrawLine; - Java_sun_java2d_x11_X11Renderer_XDrawOval; - Java_sun_java2d_x11_X11Renderer_XDrawPoly; - Java_sun_java2d_x11_X11Renderer_XDrawRect; - Java_sun_java2d_x11_X11Renderer_XDrawRoundRect; - Java_sun_java2d_x11_X11Renderer_XDoPath; - Java_sun_java2d_x11_X11Renderer_XFillArc; - Java_sun_java2d_x11_X11Renderer_XFillOval; - Java_sun_java2d_x11_X11Renderer_XFillPoly; - Java_sun_java2d_x11_X11Renderer_XFillRect; - Java_sun_java2d_x11_X11Renderer_XFillRoundRect; - Java_sun_java2d_x11_X11Renderer_devCopyArea; - Java_sun_java2d_x11_X11SurfaceData_initIDs; - Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable; - Java_sun_java2d_x11_X11SurfaceData_initSurface; - Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode; - Java_sun_java2d_x11_X11SurfaceData_XSetXorMode; - Java_sun_java2d_x11_X11SurfaceData_XSetForeground; - - Java_sun_java2d_x11_XSurfaceData_initOps; - Java_sun_java2d_x11_XSurfaceData_XCreateGC; - Java_sun_java2d_x11_XSurfaceData_XResetClip; - Java_sun_java2d_x11_XSurfaceData_XSetClip; - Java_sun_java2d_x11_XSurfaceData_flushNativeSurface; - Java_sun_java2d_x11_XSurfaceData_isDrawableValid; - Java_sun_java2d_x11_XSurfaceData_setInvalid; - Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures; - Java_sun_java2d_xr_XRSurfaceData_initXRPicture; - Java_sun_java2d_xr_XRSurfaceData_initIDs; - Java_sun_java2d_xr_XRSurfaceData_XRInitSurface; - Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture; - Java_sun_java2d_xr_XRBackendNative_initIDs; - Java_sun_java2d_xr_XRBackendNative_freeGC; - Java_sun_java2d_xr_XRBackendNative_createGC; - Java_sun_java2d_xr_XRBackendNative_createPixmap; - Java_sun_java2d_xr_XRBackendNative_createPictureNative; - Java_sun_java2d_xr_XRBackendNative_freePicture; - Java_sun_java2d_xr_XRBackendNative_freePixmap; - Java_sun_java2d_xr_XRBackendNative_setPictureRepeat; - Java_sun_java2d_xr_XRBackendNative_setGCExposures; - Java_sun_java2d_xr_XRBackendNative_setGCForeground; - Java_sun_java2d_xr_XRBackendNative_copyArea; - Java_sun_java2d_xr_XRBackendNative_renderComposite; - Java_sun_java2d_xr_XRBackendNative_renderRectangle; - Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative; - Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative; - Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative; - Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative; - Java_sun_java2d_xr_XRBackendNative_setFilter; - Java_sun_java2d_xr_XRBackendNative_XRSetClipNative; - Java_sun_java2d_xr_XRBackendNative_putMaskNative; - Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative; - Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative; - Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative; - Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative; - Java_sun_java2d_xr_XRBackendNative_setGCMode; - Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative; - - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1arrow; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box_1gap; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1check; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1expander; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1extension; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1flat_1box; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1focus; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1handle; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1hline; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1option; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1shadow; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1slider; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1vline; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1background; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeStartPainting; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeFinishPainting; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1switch_1theme; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1get_1gtk_1setting; - Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeSetRangeValue; - Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetXThickness; - Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetYThickness; - Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetColorForState; - Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetClassValue; - Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetPangoFontName; - - Java_sun_awt_X11_GtkFileDialogPeer_initIDs; - Java_sun_awt_X11_GtkFileDialogPeer_run; - Java_sun_awt_X11_GtkFileDialogPeer_quit; - Java_sun_awt_X11_GtkFileDialogPeer_toFront; - Java_sun_awt_X11_GtkFileDialogPeer_setBounds; - - Java_sun_print_CUPSPrinter_initIDs; - Java_sun_print_CUPSPrinter_getCupsServer; - Java_sun_print_CUPSPrinter_getCupsPort; - Java_sun_print_CUPSPrinter_getCupsDefaultPrinter; - Java_sun_print_CUPSPrinter_canConnect; - Java_sun_print_CUPSPrinter_getMedia; - Java_sun_print_CUPSPrinter_getPageSizes; - Java_sun_print_CUPSPrinter_getResolutions; - - awt_GetDrawingSurface; - awt_FreeDrawingSurface; - awt_Unlock; - awt_Lock; - awt_GetComponent; - awt_CreateEmbeddedFrame; - awt_SetBounds; - awt_SynthesizeWindowActivation; - - #XAWT entry point for CDE - Java_sun_awt_motif_XsessionWMcommand; - Java_sun_awt_motif_XsessionWMcommand_New; - - local: - *; -}; diff --git a/make/mapfiles/libdt_socket/mapfile-vers b/make/mapfiles/libdt_socket/mapfile-vers deleted file mode 100644 index a49917e495e..00000000000 --- a/make/mapfiles/libdt_socket/mapfile-vers +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright (c) 2004, 2013, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - jdwpTransport_OnLoad; - local: - *; -}; diff --git a/make/mapfiles/libextnet/mapfile-linux b/make/mapfiles/libextnet/mapfile-linux deleted file mode 100644 index 7e47c863824..00000000000 --- a/make/mapfiles/libextnet/mapfile-linux +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright (c) 2017, 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. -# - -SUNWprivate_1.1 { - global: - Java_jdk_net_LinuxSocketOptions_setQuickAck0; - Java_jdk_net_LinuxSocketOptions_getQuickAck0; - Java_jdk_net_LinuxSocketOptions_quickAckSupported0; - local: - *; -}; diff --git a/make/mapfiles/libextnet/mapfile-solaris b/make/mapfiles/libextnet/mapfile-solaris deleted file mode 100644 index d43f9280c26..00000000000 --- a/make/mapfiles/libextnet/mapfile-solaris +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (c) 2017, 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. -# - -SUNWprivate_1.1 { - global: - Java_jdk_net_SolarisSocketOptions_init; - Java_jdk_net_SolarisSocketOptions_setFlowOption; - Java_jdk_net_SolarisSocketOptions_getFlowOption; - Java_jdk_net_SolarisSocketOptions_flowSupported; - local: - *; -}; diff --git a/make/mapfiles/libfontmanager/mapfile-vers b/make/mapfiles/libfontmanager/mapfile-vers deleted file mode 100644 index 33860c2cd24..00000000000 --- a/make/mapfiles/libfontmanager/mapfile-vers +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (c) 1997, 2013, 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. -# - -# Define public interface. - -# In addition to regular symbols also include Freetype scaler - -SUNWprivate_1.1 { - global: - getSunFontIDs; - newLayoutTableCache; - freeLayoutTableCache; - isNullScalerContext; - Java_sun_font_NullFontScaler_getNullScalerContext; - Java_sun_font_NullFontScaler_getGlyphImage; - Java_sun_font_SunFontManager_initIDs; - Java_sun_font_StrikeCache_getGlyphCacheDescription; - Java_sun_font_StrikeCache_freeIntPointer; - Java_sun_font_StrikeCache_freeLongPointer; - Java_sun_font_StrikeCache_freeIntMemory; - Java_sun_font_StrikeCache_freeLongMemory; - Java_sun_font_SunLayoutEngine_shape; - Java_sun_font_X11TextRenderer_doDrawGlyphList; - Java_sun_java2d_loops_DrawGlyphListAA_DrawGlyphListAA; - Java_sun_java2d_loops_DrawGlyphListLCD_DrawGlyphListLCD; - Java_sun_java2d_loops_DrawGlyphList_DrawGlyphList; - Java_sun_font_NativeStrikeDisposer_freeNativeScalerContext; - Java_sun_font_NativeStrike_createNullScalerContext; - Java_sun_font_NativeStrike_createScalerContext; - Java_sun_font_NativeStrike_getMaxGlyph; - Java_sun_font_NativeFont_fontExists; - Java_sun_font_NativeFont_haveBitmapFonts; - Java_sun_font_NativeFont_countGlyphs; - Java_sun_font_NativeFont_getGlyphAdvance; - Java_sun_font_NativeFont_getGlyphImage; - Java_sun_font_NativeFont_getGlyphImageNoDefault; - Java_sun_font_NativeFont_getFontMetrics; - Java_sun_font_FreetypeFontScaler_initIDs; - Java_sun_font_FreetypeFontScaler_createScalerContextNative; - Java_sun_font_FreetypeFontScaler_disposeNativeScaler; - Java_sun_font_FreetypeFontScaler_getFontMetricsNative; - Java_sun_font_FreetypeFontScaler_getGlyphAdvanceNative; - Java_sun_font_FreetypeFontScaler_getGlyphCodeNative; - Java_sun_font_FreetypeFontScaler_getGlyphImageNative; - Java_sun_font_FreetypeFontScaler_getGlyphMetricsNative; - Java_sun_font_FreetypeFontScaler_getGlyphOutlineBoundsNative; - Java_sun_font_FreetypeFontScaler_getGlyphOutlineNative; - Java_sun_font_FreetypeFontScaler_getGlyphVectorOutlineNative; - Java_sun_font_FreetypeFontScaler_getLayoutTableCacheNative; - Java_sun_font_FreetypeFontScaler_getMissingGlyphCodeNative; - Java_sun_font_FreetypeFontScaler_getNumGlyphsNative; - Java_sun_font_FreetypeFontScaler_getUnitsPerEMNative; - Java_sun_font_FreetypeFontScaler_initNativeScaler; - Java_sun_font_FreetypeFontScaler_getGlyphPointNative; - local: - *; -}; diff --git a/make/mapfiles/libinstrument/mapfile-vers b/make/mapfiles/libinstrument/mapfile-vers deleted file mode 100644 index f89d009670a..00000000000 --- a/make/mapfiles/libinstrument/mapfile-vers +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2003, 2013, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - Agent_OnLoad; - Agent_OnAttach; - Java_sun_instrument_InstrumentationImpl_isModifiableClass0; - Java_sun_instrument_InstrumentationImpl_isRetransformClassesSupported0; - Java_sun_instrument_InstrumentationImpl_setHasTransformers; - Java_sun_instrument_InstrumentationImpl_setHasRetransformableTransformers; - Java_sun_instrument_InstrumentationImpl_retransformClasses0; - Java_sun_instrument_InstrumentationImpl_getAllLoadedClasses0; - Java_sun_instrument_InstrumentationImpl_getInitiatedClasses0; - Java_sun_instrument_InstrumentationImpl_redefineClasses0; - Java_sun_instrument_InstrumentationImpl_getObjectSize0; - Java_sun_instrument_InstrumentationImpl_appendToClassLoaderSearch0; - Java_sun_instrument_InstrumentationImpl_setNativeMethodPrefixes; - Java_sun_instrument_InstrumentationImpl_loadAgent0; - local: - *; -}; diff --git a/make/mapfiles/libj2gss/mapfile-vers b/make/mapfiles/libj2gss/mapfile-vers deleted file mode 100644 index 3124a2179bc..00000000000 --- a/make/mapfiles/libj2gss/mapfile-vers +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright (c) 2005, 2013, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - JNI_OnLoad; - JNI_OnUnload; - Java_sun_security_jgss_wrapper_GSSLibStub_releaseName; - Java_sun_security_jgss_wrapper_GSSLibStub_importName; - Java_sun_security_jgss_wrapper_GSSLibStub_compareName; - Java_sun_security_jgss_wrapper_GSSLibStub_canonicalizeName; - Java_sun_security_jgss_wrapper_GSSLibStub_exportName; - Java_sun_security_jgss_wrapper_GSSLibStub_displayName; - Java_sun_security_jgss_wrapper_GSSLibStub_acquireCred; - Java_sun_security_jgss_wrapper_GSSLibStub_releaseCred; - Java_sun_security_jgss_wrapper_GSSLibStub_getCredName; - Java_sun_security_jgss_wrapper_GSSLibStub_getCredTime; - Java_sun_security_jgss_wrapper_GSSLibStub_getCredUsage; - Java_sun_security_jgss_wrapper_GSSLibStub_importContext; - Java_sun_security_jgss_wrapper_GSSLibStub_initContext; - Java_sun_security_jgss_wrapper_GSSLibStub_acceptContext; - Java_sun_security_jgss_wrapper_GSSLibStub_getContextName; - Java_sun_security_jgss_wrapper_GSSLibStub_getContextMech; - Java_sun_security_jgss_wrapper_GSSLibStub_inquireContext; - Java_sun_security_jgss_wrapper_GSSLibStub_deleteContext; - Java_sun_security_jgss_wrapper_GSSLibStub_getContextTime; - Java_sun_security_jgss_wrapper_GSSLibStub_wrapSizeLimit; - Java_sun_security_jgss_wrapper_GSSLibStub_exportContext; - Java_sun_security_jgss_wrapper_GSSLibStub_getMic; - Java_sun_security_jgss_wrapper_GSSLibStub_verifyMic; - Java_sun_security_jgss_wrapper_GSSLibStub_wrap; - Java_sun_security_jgss_wrapper_GSSLibStub_unwrap; - Java_sun_security_jgss_wrapper_GSSLibStub_indicateMechs; - Java_sun_security_jgss_wrapper_GSSLibStub_inquireNamesForMech; - Java_sun_security_jgss_wrapper_GSSLibStub_init; - Java_sun_security_jgss_wrapper_GSSLibStub_getMechPtr; - local: - *; -}; diff --git a/make/mapfiles/libj2pcsc/mapfile-vers b/make/mapfiles/libj2pcsc/mapfile-vers deleted file mode 100644 index e0fa122b2ff..00000000000 --- a/make/mapfiles/libj2pcsc/mapfile-vers +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright (c) 2005, 2013, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - JNI_OnLoad; - Java_sun_security_smartcardio_PlatformPCSC_initialize; - Java_sun_security_smartcardio_PCSC_SCardEstablishContext; - Java_sun_security_smartcardio_PCSC_SCardListReaders; - Java_sun_security_smartcardio_PCSC_SCardConnect; - Java_sun_security_smartcardio_PCSC_SCardTransmit; - Java_sun_security_smartcardio_PCSC_SCardStatus; - Java_sun_security_smartcardio_PCSC_SCardDisconnect; - Java_sun_security_smartcardio_PCSC_SCardGetStatusChange; - Java_sun_security_smartcardio_PCSC_SCardBeginTransaction; - Java_sun_security_smartcardio_PCSC_SCardEndTransaction; - Java_sun_security_smartcardio_PCSC_SCardControl; - - local: - *; -}; diff --git a/make/mapfiles/libj2pkcs11/mapfile-vers b/make/mapfiles/libj2pkcs11/mapfile-vers deleted file mode 100644 index 6ca76c07047..00000000000 --- a/make/mapfiles/libj2pkcs11/mapfile-vers +++ /dev/null @@ -1,110 +0,0 @@ -# -# Copyright (c) 2003, 2013, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - JNI_OnLoad; - Java_sun_security_pkcs11_wrapper_PKCS11_initializeLibrary; - Java_sun_security_pkcs11_wrapper_PKCS11_finalizeLibrary; - Java_sun_security_pkcs11_wrapper_PKCS11_connect; - Java_sun_security_pkcs11_wrapper_PKCS11_disconnect; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1Initialize; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1Finalize; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetInfo; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetSlotList; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetSlotInfo; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetTokenInfo; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetMechanismList; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetMechanismInfo; -# Java_sun_security_pkcs11_wrapper_PKCS11_C_1InitToken; -# Java_sun_security_pkcs11_wrapper_PKCS11_C_1InitPIN; -# Java_sun_security_pkcs11_wrapper_PKCS11_C_1SetPIN; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1OpenSession; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1CloseSession; -# Java_sun_security_pkcs11_wrapper_PKCS11_C_1CloseAllSessions; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetSessionInfo; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetOperationState; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1SetOperationState; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1Login; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1Logout; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1CreateObject; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1CopyObject; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1DestroyObject; -# Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetObjectSize; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetAttributeValue; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1SetAttributeValue; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1FindObjectsInit; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1FindObjects; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1FindObjectsFinal; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1EncryptInit; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1Encrypt; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1EncryptUpdate; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1EncryptFinal; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptInit; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1Decrypt; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptUpdate; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptFinal; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestInit; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestSingle; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestUpdate; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestKey; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestFinal; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignInit; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1Sign; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignUpdate; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignFinal; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignRecoverInit; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignRecover; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1VerifyInit; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1Verify; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1VerifyUpdate; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1VerifyFinal; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1VerifyRecoverInit; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1VerifyRecover; -# Java_sun_security_pkcs11_wrapper_PKCS11_C_1DigestEncryptUpdate; -# Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptDigestUpdate; -# Java_sun_security_pkcs11_wrapper_PKCS11_C_1SignEncryptUpdate; -# Java_sun_security_pkcs11_wrapper_PKCS11_C_1DecryptVerifyUpdate; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1GenerateKey; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1GenerateKeyPair; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1WrapKey; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1UnwrapKey; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1DeriveKey; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1SeedRandom; - Java_sun_security_pkcs11_wrapper_PKCS11_C_1GenerateRandom; -# Java_sun_security_pkcs11_wrapper_PKCS11_C_1GetFunctionStatus; -# Java_sun_security_pkcs11_wrapper_PKCS11_C_1CancelFunction; -# Java_sun_security_pkcs11_wrapper_PKCS11_C_1WaitForSlotEvent; - Java_sun_security_pkcs11_Secmod_nssGetLibraryHandle; - Java_sun_security_pkcs11_Secmod_nssLoadLibrary; - Java_sun_security_pkcs11_Secmod_nssVersionCheck; - Java_sun_security_pkcs11_Secmod_nssInitialize; - Java_sun_security_pkcs11_Secmod_nssGetModuleList; - - local: - *; -}; diff --git a/make/mapfiles/libj2ucrypto/mapfile-vers b/make/mapfiles/libj2ucrypto/mapfile-vers deleted file mode 100644 index 2f2b8d6a4dd..00000000000 --- a/make/mapfiles/libj2ucrypto/mapfile-vers +++ /dev/null @@ -1,78 +0,0 @@ -# -# Copyright (c) 2012, 2016, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - JNI_OnLoad; - Java_com_oracle_security_ucrypto_UcryptoProvider_loadLibraries; - Java_com_oracle_security_ucrypto_UcryptoProvider_getMechList; - Java_com_oracle_security_ucrypto_NativeDigestMD_nativeInit; - Java_com_oracle_security_ucrypto_NativeDigestMD_nativeUpdate; - Java_com_oracle_security_ucrypto_NativeDigestMD_nativeDigest; - Java_com_oracle_security_ucrypto_NativeDigestMD_nativeClone; - Java_com_oracle_security_ucrypto_NativeDigestMD_nativeFree; - Java_com_oracle_security_ucrypto_NativeDigest_nativeInit; - Java_com_oracle_security_ucrypto_NativeDigest_nativeUpdate; - Java_com_oracle_security_ucrypto_NativeDigest_nativeDigest; - Java_com_oracle_security_ucrypto_NativeDigest_nativeFree; - Java_com_oracle_security_ucrypto_NativeCipher_nativeInit; - Java_com_oracle_security_ucrypto_NativeCipher_nativeUpdate; - Java_com_oracle_security_ucrypto_NativeCipher_nativeFinal; - Java_com_oracle_security_ucrypto_NativeKey_nativeFree; - Java_com_oracle_security_ucrypto_NativeKey_00024RSAPrivate_nativeInit; - Java_com_oracle_security_ucrypto_NativeKey_00024RSAPrivateCrt_nativeInit; - Java_com_oracle_security_ucrypto_NativeKey_00024RSAPublic_nativeInit; - Java_com_oracle_security_ucrypto_NativeRSASignature_nativeInit; - Java_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZ_3BII; - Java_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZJI; - Java_com_oracle_security_ucrypto_NativeRSASignature_nativeFinal; - Java_com_oracle_security_ucrypto_NativeRSACipher_nativeAtomic; - JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeInit; - JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeUpdate; - JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeDigest; - JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeClone; - JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeFree; - JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeInit; - JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeUpdate; - JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeDigest; - JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeFree; - JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeInit; - JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeUpdate; - JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeFinal; - JavaCritical_com_oracle_security_ucrypto_NativeKey_nativeFree; - JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPrivate_nativeInit; - JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPrivateCrt_nativeInit; - JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPublic_nativeInit; - JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeInit; - JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZ_3BII; - JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZJI; - JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeFinal; - JavaCritical_com_oracle_security_ucrypto_NativeRSACipher_nativeAtomic; - - local: - *; -}; diff --git a/make/mapfiles/libjaas/mapfile-vers b/make/mapfiles/libjaas/mapfile-vers deleted file mode 100644 index 815f88a6f38..00000000000 --- a/make/mapfiles/libjaas/mapfile-vers +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (c) 2005, 2017, 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. -# - -# Define library interface. - -SUNWprivate_1.1 { - global: - Java_com_sun_security_auth_module_UnixSystem_getUnixInfo; - local: - *; -}; - diff --git a/make/mapfiles/libjava/mapfile-vers b/make/mapfiles/libjava/mapfile-vers deleted file mode 100644 index 4bde361b148..00000000000 --- a/make/mapfiles/libjava/mapfile-vers +++ /dev/null @@ -1,300 +0,0 @@ -# -# Copyright (c) 1997, 2018, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - JNI_OnLoad; - JNU_ThrowNoSuchMethodException; - JNU_CallStaticMethodByName; - JNU_CallMethodByName; - JNU_CallMethodByNameV; - JNU_ClassClass; - JNU_ClassObject; - JNU_ClassString; - JNU_ClassThrowable; - JNU_CopyObjectArray; - JNU_Equals; - JNU_GetEnv; - JNU_GetFieldByName; - JNU_GetStaticFieldByName; - JNU_GetStringPlatformChars; - JNU_IsInstanceOfByName; - JNU_MonitorWait; - JNU_NewObjectByName; - JNU_NewStringPlatform; - JNU_Notify; - JNU_NotifyAll; - JNU_PrintClass; - JNU_PrintString; - JNU_ReleaseStringPlatformChars; - JNU_SetFieldByName; - JNU_SetStaticFieldByName; - JNU_ThrowArrayIndexOutOfBoundsException; - JNU_ThrowByName; - JNU_ThrowByNameWithLastError; - JNU_ThrowByNameWithMessageAndLastError; - JNU_ThrowClassNotFoundException; - JNU_ThrowIllegalAccessError; - JNU_ThrowIllegalAccessException; - JNU_ThrowIllegalArgumentException; - JNU_ThrowInstantiationException; - JNU_ThrowInternalError; - JNU_ThrowIOException; - JNU_ThrowIOExceptionWithLastError; - JNU_ThrowNoSuchFieldError; - JNU_ThrowNoSuchFieldException; - JNU_ThrowNoSuchMethodError; - JNU_ThrowNullPointerException; - JNU_ThrowNumberFormatException; - JNU_ThrowOutOfMemoryError; - JNU_ThrowStringIndexOutOfBoundsException; - JNU_ToString; - - Java_java_io_FileCleanable_cleanupClose0; - Java_java_io_FileDescriptor_close0; - Java_java_io_FileDescriptor_initIDs; - Java_java_io_FileDescriptor_sync; - Java_java_io_FileDescriptor_getAppend; - Java_java_io_FileDescriptor_getHandle; - Java_java_io_FileInputStream_available0; - Java_java_io_FileInputStream_initIDs; - Java_java_io_FileInputStream_open0; - Java_java_io_FileInputStream_read0; - Java_java_io_FileInputStream_readBytes; - Java_java_io_FileInputStream_skip0; - Java_java_io_FileOutputStream_initIDs; - Java_java_io_FileOutputStream_open0; - Java_java_io_FileOutputStream_write; - Java_java_io_FileOutputStream_writeBytes; - Java_java_io_ObjectInputStream_bytesToDoubles; - Java_java_io_ObjectInputStream_bytesToFloats; - Java_java_io_ObjectOutputStream_doublesToBytes; - Java_java_io_ObjectOutputStream_floatsToBytes; - Java_java_io_ObjectStreamClass_hasStaticInitializer; - Java_java_io_ObjectStreamClass_initNative; - Java_java_io_RandomAccessFile_getFilePointer; - Java_java_io_RandomAccessFile_initIDs; - Java_java_io_RandomAccessFile_length; - Java_java_io_RandomAccessFile_open0; - Java_java_io_RandomAccessFile_read0; - Java_java_io_RandomAccessFile_readBytes; - Java_java_io_RandomAccessFile_seek0; - Java_java_io_RandomAccessFile_setLength; - Java_java_io_RandomAccessFile_write0; - Java_java_io_RandomAccessFile_writeBytes; - Java_java_io_UnixFileSystem_canonicalize0; - Java_java_io_UnixFileSystem_checkAccess; - Java_java_io_UnixFileSystem_createDirectory; - Java_java_io_UnixFileSystem_createFileExclusively; - Java_java_io_UnixFileSystem_delete0; - Java_java_io_UnixFileSystem_getBooleanAttributes0; - Java_java_io_UnixFileSystem_getLastModifiedTime; - Java_java_io_UnixFileSystem_getLength; - Java_java_io_UnixFileSystem_getNameMax0; - Java_java_io_UnixFileSystem_getSpace; - Java_java_io_UnixFileSystem_initIDs; - Java_java_io_UnixFileSystem_list; - Java_java_io_UnixFileSystem_rename0; - Java_java_io_UnixFileSystem_setLastModifiedTime; - Java_java_io_UnixFileSystem_setReadOnly; - Java_java_io_UnixFileSystem_setPermission; - Java_java_lang_Class_forName0; - Java_java_lang_Class_getPrimitiveClass; - Java_java_lang_Class_isAssignableFrom; - Java_java_lang_Class_isInstance; - Java_java_lang_Class_registerNatives; - Java_java_lang_ClassLoader_findBootstrapClass; - Java_java_lang_ClassLoader_defineClass1; - Java_java_lang_ClassLoader_defineClass2; - Java_java_lang_ClassLoader_findBuiltinLib; - Java_java_lang_ClassLoader_findLoadedClass0; - Java_java_lang_ClassLoader_00024NativeLibrary_findEntry; - Java_java_lang_ClassLoader_00024NativeLibrary_load0; - Java_java_lang_ClassLoader_00024NativeLibrary_unload; - Java_java_lang_ClassLoader_registerNatives; - Java_java_lang_Double_longBitsToDouble; - Java_java_lang_Double_doubleToRawLongBits; - Java_java_lang_Float_intBitsToFloat; - Java_java_lang_Float_floatToRawIntBits; - Java_java_lang_StackStreamFactory_checkStackWalkModes; - Java_java_lang_StackStreamFactory_00024AbstractStackWalker_callStackWalk; - Java_java_lang_StackStreamFactory_00024AbstractStackWalker_fetchStackFrames; - Java_java_lang_StrictMath_IEEEremainder; - Java_java_lang_StrictMath_acos; - Java_java_lang_StrictMath_asin; - Java_java_lang_StrictMath_atan; - Java_java_lang_StrictMath_atan2; - Java_java_lang_StrictMath_cos; - Java_java_lang_StrictMath_log; - Java_java_lang_StrictMath_log10; - Java_java_lang_StrictMath_sin; - Java_java_lang_StrictMath_sqrt; - Java_java_lang_StrictMath_tan; - Java_java_lang_StrictMath_cosh; - Java_java_lang_StrictMath_sinh; - Java_java_lang_StrictMath_tanh; - Java_java_lang_StrictMath_log1p; - Java_java_lang_StrictMath_expm1; - Java_java_lang_Object_getClass; - Java_java_lang_Object_registerNatives; - Java_java_lang_ProcessEnvironment_environ; - Java_java_lang_ProcessHandleImpl_destroy0; - Java_java_lang_ProcessHandleImpl_getCurrentPid0; - Java_java_lang_ProcessHandleImpl_getProcessPids0; - Java_java_lang_ProcessHandleImpl_initNative; - Java_java_lang_ProcessHandleImpl_isAlive0; - Java_java_lang_ProcessHandleImpl_parent0; - Java_java_lang_ProcessHandleImpl_waitForProcessExit0; - Java_java_lang_ProcessHandleImpl_00024Info_initIDs; - Java_java_lang_ProcessHandleImpl_00024Info_info0; - Java_java_lang_ProcessImpl_init; - Java_java_lang_ProcessImpl_forkAndExec; - Java_java_lang_ref_Reference_getAndClearReferencePendingList; - Java_java_lang_ref_Reference_hasReferencePendingList; - Java_java_lang_ref_Reference_waitForReferencePendingList; - Java_java_lang_reflect_Array_get; - Java_java_lang_reflect_Array_getBoolean; - Java_java_lang_reflect_Array_getByte; - Java_java_lang_reflect_Array_getChar; - Java_java_lang_reflect_Array_getDouble; - Java_java_lang_reflect_Array_getFloat; - Java_java_lang_reflect_Array_getInt; - Java_java_lang_reflect_Array_getLength; - Java_java_lang_reflect_Array_getLong; - Java_java_lang_reflect_Array_getShort; - Java_java_lang_reflect_Array_multiNewArray; - Java_java_lang_reflect_Array_newArray; - Java_java_lang_reflect_Array_set; - Java_java_lang_reflect_Array_setBoolean; - Java_java_lang_reflect_Array_setByte; - Java_java_lang_reflect_Array_setChar; - Java_java_lang_reflect_Array_setDouble; - Java_java_lang_reflect_Array_setFloat; - Java_java_lang_reflect_Array_setInt; - Java_java_lang_reflect_Array_setLong; - Java_java_lang_reflect_Array_setShort; - Java_java_lang_reflect_Executable_getParameters0; - Java_java_lang_reflect_Executable_getTypeAnnotationBytes0; - Java_java_lang_reflect_Field_getTypeAnnotationBytes0; - Java_java_lang_Runtime_freeMemory; - Java_java_lang_Runtime_maxMemory; - Java_java_lang_Runtime_gc; - Java_java_lang_Runtime_totalMemory; - Java_java_lang_Runtime_availableProcessors; - Java_java_lang_SecurityManager_getClassContext; - Java_java_lang_Shutdown_beforeHalt; - Java_java_lang_Shutdown_halt0; - Java_java_lang_StackTraceElement_initStackTraceElement; - Java_java_lang_StackTraceElement_initStackTraceElements; - Java_java_lang_String_intern; - Java_java_lang_StringCoding_err; - Java_java_lang_StringUTF16_isBigEndian; - Java_java_lang_System_identityHashCode; - Java_java_lang_System_initProperties; - Java_java_lang_System_mapLibraryName; - Java_java_lang_System_registerNatives; - Java_java_lang_System_setErr0; - Java_java_lang_System_setIn0; - Java_java_lang_System_setOut0; - Java_java_lang_Thread_registerNatives; - Java_java_lang_Throwable_fillInStackTrace; - Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2; - Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2; - Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2; - Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2; - Java_java_security_AccessController_getStackAccessControlContext; - Java_java_security_AccessController_getInheritedAccessControlContext; - Java_java_util_TimeZone_getSystemTimeZoneID; - Java_java_util_TimeZone_getSystemGMTOffsetID; - Java_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8; - Java_jdk_internal_misc_Signal_findSignal0; - Java_jdk_internal_misc_Signal_handle0; - Java_jdk_internal_misc_Signal_raise0; - Java_jdk_internal_reflect_ConstantPool_getClassAt0; - Java_jdk_internal_reflect_ConstantPool_getClassAtIfLoaded0; - Java_jdk_internal_reflect_ConstantPool_getClassRefIndexAt0; - Java_jdk_internal_reflect_ConstantPool_getDoubleAt0; - Java_jdk_internal_reflect_ConstantPool_getFieldAt0; - Java_jdk_internal_reflect_ConstantPool_getFieldAtIfLoaded0; - Java_jdk_internal_reflect_ConstantPool_getFloatAt0; - Java_jdk_internal_reflect_ConstantPool_getIntAt0; - Java_jdk_internal_reflect_ConstantPool_getLongAt0; - Java_jdk_internal_reflect_ConstantPool_getMemberRefInfoAt0; - Java_jdk_internal_reflect_ConstantPool_getMethodAt0; - Java_jdk_internal_reflect_ConstantPool_getMethodAtIfLoaded0; - Java_jdk_internal_reflect_ConstantPool_getNameAndTypeRefIndexAt0; - Java_jdk_internal_reflect_ConstantPool_getNameAndTypeRefInfoAt0; - Java_jdk_internal_reflect_ConstantPool_getSize0; - Java_jdk_internal_reflect_ConstantPool_getStringAt0; - Java_jdk_internal_reflect_ConstantPool_getTagAt0; - Java_jdk_internal_reflect_ConstantPool_getUTF8At0; - Java_java_io_Console_istty; - Java_java_io_Console_encoding; - Java_java_io_Console_echo; - Java_jdk_internal_reflect_NativeConstructorAccessorImpl_newInstance0; - Java_jdk_internal_reflect_NativeMethodAccessorImpl_invoke0; - Java_jdk_internal_reflect_Reflection_getCallerClass__; - Java_jdk_internal_reflect_Reflection_getClassAccessFlags; - Java_jdk_internal_misc_VM_latestUserDefinedLoader0; - Java_jdk_internal_misc_VM_getuid; - Java_jdk_internal_misc_VM_geteuid; - Java_jdk_internal_misc_VM_getgid; - Java_jdk_internal_misc_VM_getegid; - Java_jdk_internal_misc_VM_getRuntimeArguments; - Java_jdk_internal_misc_VM_initialize; - - Java_java_lang_Module_defineModule0; - Java_java_lang_Module_addReads0; - Java_java_lang_Module_addExports0; - Java_java_lang_Module_addExportsToAll0; - Java_java_lang_Module_addExportsToAllUnnamed0; - - Java_jdk_internal_loader_BootLoader_getSystemPackageLocation; - Java_jdk_internal_loader_BootLoader_getSystemPackageNames; - Java_jdk_internal_loader_BootLoader_setBootLoaderUnnamedModule0; - - Java_jdk_internal_vm_VMSupport_initAgentProperties; - Java_jdk_internal_vm_VMSupport_getVMTemporaryDirectory; - - # ZipFile.c needs this one - throwFileNotFoundException; - # zip_util.c needs these - getLastErrorString; - getErrorString; - - # Outcalls from libjvm done using dlsym(). - - VerifyClassCodes; - VerifyClassCodesForMajorVersion; - NewStringPlatform; - GetStringPlatformChars; - Canonicalize; - JDK_GetVersionInfo0; - - local: - *; -}; diff --git a/make/mapfiles/libjava/reorder-sparc b/make/mapfiles/libjava/reorder-sparc deleted file mode 100644 index 20f54e51631..00000000000 --- a/make/mapfiles/libjava/reorder-sparc +++ /dev/null @@ -1,96 +0,0 @@ -data = R0x2000; -text = LOAD ?RXO; -# Test Null -text: .text%JNI_OnLoad; -text: .text%Canonicalize; -text: .text%canonicalize; -text: .text%collapse: OUTPUTDIR/canonicalize_md.o; -text: .text%Java_java_lang_Object_registerNatives; -text: .text%Java_java_lang_System_registerNatives; -text: .text%Java_java_lang_Thread_registerNatives; -text: .text%Java_java_security_AccessController_getStackAccessControlContext; -text: .text%Java_java_security_AccessController_getInheritedAccessControlContext; -text: .text%Java_java_lang_ClassLoader_registerNatives; -text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2; -text: .text%Java_java_lang_Class_registerNatives; -text: .text%Java_java_io_ObjectStreamClass_initNative; -text: .text%Java_java_lang_Class_getPrimitiveClass; -text: .text%Java_java_lang_System_initProperties; -text: .text%GetJavaProperties; -text: .text%JNU_NewStringPlatform; -text: .text%initializeEncoding: OUTPUTDIR/jni_util.o; -text: .text%JNU_CallStaticMethodByName; -text: .text%newString646_US: OUTPUTDIR/jni_util.o; -text: .text%NewStringPlatform; -text: .text%Java_java_io_FileInputStream_initIDs; -text: .text%Java_java_io_FileDescriptor_initIDs; -text: .text%Java_java_io_FileOutputStream_initIDs; -text: .text%Java_java_lang_System_setIn0; -text: .text%Java_java_lang_Class_forName0; -text: .text%Java_java_lang_Object_getClass; -text: .text%Java_sun_reflect_Reflection_getClassAccessFlags; -text: .text%Java_sun_reflect_NativeConstructorAccessorImpl_newInstance0; -text: .text%Java_java_lang_System_setOut0; -text: .text%Java_java_lang_System_setErr0; -text: .text%Java_java_lang_System_identityHashCode; -text: .text%JNU_NewObjectByName; -text: .text%Java_java_io_UnixFileSystem_initIDs; -text: .text%Java_java_io_UnixFileSystem_canonicalize0; -text: .text%JNU_GetStringPlatformChars; -text: .text%JNU_ReleaseStringPlatformChars; -text: .text%Java_java_io_FileInputStream_open0; -text: .text%fileOpen; -text: .text%Java_java_io_FileInputStream_readBytes; -text: .text%readBytes; -text: .text%Java_java_io_FileInputStream_available0; -text: .text%Java_java_io_FileInputStream_close0; -text: .text%Java_java_lang_System_mapLibraryName; -text: .text%Java_java_io_UnixFileSystem_getBooleanAttributes0; -text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_load0; -text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_findEntry; -text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2; -text: .text%Java_java_io_UnixFileSystem_list; -text: .text%JNU_ClassString; -text: .text%JNU_CopyObjectArray; -text: .text%Java_java_lang_String_intern; -text: .text%Java_java_lang_StringUTF16_isBigEndian; -text: .text%Java_java_lang_ClassLoader_findLoadedClass0; -text: .text%Java_java_lang_ClassLoader_findBootstrapClass; -text: .text%Java_java_lang_Throwable_fillInStackTrace; -text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2; -text: .text%Java_java_io_UnixFileSystem_getLastModifiedTime; -text: .text%Java_java_lang_Float_floatToRawIntBits; -text: .text%Java_java_lang_Double_doubleToRawLongBits; -text: .text%Java_java_io_UnixFileSystem_getLength; -text: .text%Java_java_lang_ClassLoader_defineClass0; -text: .text%VerifyClassCodes; -# Test Exit -text: .text%Java_java_lang_Shutdown_halt0; -# Test Hello -text: .text%Java_java_io_FileOutputStream_writeBytes; -text: .text%writeBytes; -# Test Sleep -# Test IntToString -# Test LoadToolkit -text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2; -text: .text%JNU_GetEnv; -text: .text%Java_java_io_UnixFileSystem_checkAccess; -text: .text%Java_java_lang_reflect_Array_newArray; -text: .text%Java_java_lang_StackTraceElement_initStackTraceElements; -text: .text%throwFileNotFoundException; -text: .text%JNU_NotifyAll; -# Test LoadFrame -text: .text%JNU_CallMethodByName; -text: .text%JNU_CallMethodByNameV; -text: .text%Java_java_io_UnixFileSystem_createDirectory; -text: .text%Java_java_io_UnixFileSystem_setLastModifiedTime; -# Test LoadJFrame -text: .text%Java_sun_reflect_NativeMethodAccessorImpl_invoke0; -text: .text%Java_java_lang_Class_isInstance; -# Test JHello -# SwingSet -text: .text%Java_java_lang_Class_isAssignableFrom; -text: .text%Java_java_util_TimeZone_getSystemTimeZoneID; -text: .text%findJavaTZ_md; -text: .text%Java_java_lang_StrictMath_log; -text: .text%Java_java_lang_StrictMath_sqrt; diff --git a/make/mapfiles/libjava/reorder-sparcv9 b/make/mapfiles/libjava/reorder-sparcv9 deleted file mode 100644 index eb2de474255..00000000000 --- a/make/mapfiles/libjava/reorder-sparcv9 +++ /dev/null @@ -1,92 +0,0 @@ -data = R0x2000; -text = LOAD ?RXO; -# Test Null -text: .text%JNI_OnLoad; -text: .text%Canonicalize; -text: .text%canonicalize; -text: .text%collapse: OUTPUTDIR/canonicalize_md.o; -text: .text%Java_java_lang_Object_registerNatives; -text: .text%Java_java_lang_System_registerNatives; -text: .text%Java_java_lang_Thread_registerNatives; -text: .text%Java_java_security_AccessController_getStackAccessControlContext; -text: .text%Java_java_security_AccessController_getInheritedAccessControlContext; -text: .text%Java_java_lang_ClassLoader_registerNatives; -text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2; -text: .text%Java_java_lang_Class_registerNatives; -text: .text%Java_java_lang_Class_getPrimitiveClass; -text: .text%Java_java_lang_System_initProperties; -text: .text%GetJavaProperties; -text: .text%JNU_NewStringPlatform; -text: .text%initializeEncoding: OUTPUTDIR/jni_util.o; -text: .text%JNU_CallStaticMethodByName; -text: .text%newString8859_1: OUTPUTDIR/jni_util.o; -text: .text%NewStringPlatform; -text: .text%Java_java_io_FileInputStream_initIDs; -text: .text%Java_java_io_FileDescriptor_initIDs; -text: .text%Java_java_io_FileOutputStream_initIDs; -text: .text%Java_java_lang_System_setIn0; -text: .text%Java_java_lang_Class_forName0; -text: .text%Java_java_lang_String_intern; -text: .text%Java_java_lang_StringUTF16_isBigEndian; -text: .text%Java_java_lang_Float_floatToRawIntBits; -text: .text%Java_java_lang_Double_doubleToRawLongBits; -text: .text%Java_java_lang_ClassLoader_findLoadedClass0; -text: .text%Java_java_lang_ClassLoader_findBootstrapClass; -text: .text%VerifyClassCodes; -text: .text%Java_java_lang_Throwable_fillInStackTrace; -text: .text%Java_java_lang_System_setOut0; -text: .text%Java_java_lang_System_setErr0; -text: .text%Java_java_lang_System_identityHashCode; -text: .text%JNU_NewObjectByName; -text: .text%Java_java_io_UnixFileSystem_initIDs; -text: .text%Java_java_io_UnixFileSystem_canonicalize0; -text: .text%JNU_GetStringPlatformChars; -text: .text%JNU_ReleaseStringPlatformChars; -text: .text%Java_java_io_FileInputStream_open0; -text: .text%fileOpen; -text: .text%Java_java_io_FileInputStream_readBytes; -text: .text%readBytes; -text: .text%Java_java_io_FileInputStream_available0; -text: .text%Java_java_io_FileInputStream_close0; -text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2; -text: .text%Java_java_io_UnixFileSystem_list; -text: .text%JNU_ClassString; -text: .text%JNU_CopyObjectArray; -text: .text%Java_java_io_UnixFileSystem_getBooleanAttributes0; -text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2; -text: .text%Java_java_lang_System_mapLibraryName; -text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_load0; -text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_findEntry; -text: .text%Java_java_io_UnixFileSystem_getLength; -text: .text%Java_java_lang_Object_getClass; -text: .text%Java_java_lang_ClassLoader_defineClass0; -# Test Exit -text: .text%Java_java_lang_Shutdown_halt0; -# Test Hello -text: .text%Java_java_io_FileOutputStream_writeBytes; -text: .text%writeBytes; -# Test Sleep -# Test IntToString -# Test LoadToolkit -text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2; -text: .text%JNU_GetEnv; -text: .text%Java_java_io_UnixFileSystem_checkAccess; -text: .text%Java_java_lang_reflect_Array_newArray; -text: .text%Java_java_lang_StackTraceElement_initStackTraceElements; -text: .text%throwFileNotFoundException: OUTPUTDIR/io_util.o; -text: .text%JNU_NotifyAll; -# Test LoadFrame -text: .text%JNU_CallMethodByName; -text: .text%JNU_CallMethodByNameV; -text: .text%Java_java_io_UnixFileSystem_createDirectory; -text: .text%Java_java_io_UnixFileSystem_getLastModifiedTime; -text: .text%Java_java_io_UnixFileSystem_setLastModifiedTime; -# Test LoadJFrame -text: .text%Java_java_lang_Class_isAssignableFrom; -text: .text%Java_java_lang_Class_isInstance; -# Test JHello -# SwingSet -text: .text%Java_java_util_TimeZone_getSystemTimeZoneID; -text: .text%findJavaTZ_md; -text: .text%Java_java_lang_StrictMath_log; -text: .text%Java_java_lang_StrictMath_sqrt; diff --git a/make/mapfiles/libjava/reorder-x86 b/make/mapfiles/libjava/reorder-x86 deleted file mode 100644 index 7eeb16b95cf..00000000000 --- a/make/mapfiles/libjava/reorder-x86 +++ /dev/null @@ -1,98 +0,0 @@ -data = R0x2000; -text = LOAD ?RXO; -# Test Null -text: .text%_init; -text: .text%JNI_OnLoad; -text: .text%Canonicalize; -text: .text%canonicalize; -text: .text%collapse: OUTPUTDIR/canonicalize_md.o; -text: .text%Java_java_lang_Object_registerNatives; -text: .text%Java_java_lang_System_registerNatives; -text: .text%Java_java_lang_Thread_registerNatives; -text: .text%Java_java_security_AccessController_getStackAccessControlContext; -text: .text%Java_java_security_AccessController_getInheritedAccessControlContext; -text: .text%Java_java_lang_ClassLoader_registerNatives; -text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2; -text: .text%Java_java_lang_Class_registerNatives; -text: .text%Java_java_lang_Class_getPrimitiveClass; -text: .text%Java_java_lang_System_initProperties; -text: .text%GetJavaProperties; -text: .text%uname: OUTPUTDIR/java_props_md.o; -text: .text%mapLookup: OUTPUTDIR/java_props_md.o; -text: .text%JNU_NewStringPlatform; -text: .text%JNU_CallStaticMethodByName; -text: .text%NewStringPlatform; -text: .text%Java_java_io_FileInputStream_initIDs; -text: .text%Java_java_io_FileDescriptor_initIDs; -text: .text%Java_java_io_FileOutputStream_initIDs; -text: .text%Java_java_lang_System_setIn0; -text: .text%Java_java_lang_Class_forName0; -text: .text%Java_java_lang_String_intern; -text: .text%Java_java_lang_StringUTF16_isBigEndian; -text: .text%Java_sun_reflect_NativeConstructorAccessorImpl_newInstance0; -text: .text%Java_java_lang_Throwable_fillInStackTrace; -text: .text%Java_java_lang_System_setOut0; -text: .text%Java_java_lang_System_setErr0; -text: .text%JNU_NewObjectByName; -text: .text%Java_java_io_UnixFileSystem_initIDs; -text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2; -text: .text%Java_java_io_UnixFileSystem_list; -text: .text%JNU_GetStringPlatformChars; -text: .text%JNU_ReleaseStringPlatformChars; -text: .text%JNU_ClassString; -text: .text%JNU_CopyObjectArray; -text: .text%Java_java_io_UnixFileSystem_canonicalize0; -text: .text%Java_java_io_UnixFileSystem_getBooleanAttributes0; -text: .text%Java_java_lang_ClassLoader_findLoadedClass0; -text: .text%Java_java_lang_ClassLoader_findBootstrapClass; -text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2; -text: .text%Java_java_lang_System_mapLibraryName; -text: .text%cpchars: OUTPUTDIR/System.o; -text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_load0; -text: .text%Java_java_lang_ClassLoader_00024NativeLibrary_findEntry; -text: .text%Java_java_lang_Float_floatToRawIntBits; -text: .text%Java_java_lang_Double_doubleToRawLongBits; -text: .text%Java_java_io_FileInputStream_open0; -text: .text%fileOpen; -text: .text%Java_java_io_UnixFileSystem_getLength; -text: .text%Java_java_io_FileInputStream_readBytes; -text: .text%readBytes; -text: .text%Java_java_io_FileInputStream_close0; -text: .text%Java_java_lang_Object_getClass; -text: .text%Java_java_lang_ClassLoader_defineClass0; -text: .text%VerifyClassCodes; -# Test Exit -text: .text%Java_java_lang_Shutdown_halt0; -# Test Hello -text: .text%Java_java_io_FileOutputStream_writeBytes; -text: .text%writeBytes; -# Test Sleep -# Test IntToString -# Test LoadToolkit -text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2; -text: .text%JNU_GetEnv; -text: .text%Java_java_io_UnixFileSystem_checkAccess; -text: .text%Java_sun_reflect_NativeMethodAccessorImpl_invoke0; -text: .text%Java_java_io_FileInputStream_available0; -text: .text%Java_java_lang_reflect_Array_newArray; -text: .text%Java_java_lang_StackTraceElement_initStackTraceElements; -text: .text%Java_java_lang_System_identityHashCode; -text: .text%JNU_NotifyAll; -# Test LoadFrame -text: .text%JNU_CallMethodByName; -text: .text%JNU_CallMethodByNameV; -text: .text%Java_java_util_logging_FileHandler_lockFile; -text: .text%Java_java_io_FileOutputStream_open0; -text: .text%Java_java_io_UnixFileSystem_createDirectory; -text: .text%Java_java_io_UnixFileSystem_getLastModifiedTime; -text: .text%Java_java_io_UnixFileSystem_setLastModifiedTime; -text: .text%Java_java_io_FileOutputStream_close0; -text: .text%Java_java_util_logging_FileHandler_unlockFile; -# Test LoadJFrame -text: .text%Java_java_lang_Class_isAssignableFrom; -text: .text%Java_java_lang_Class_isInstance; -# Test JHello -# SwingSet -text: .text%Java_java_util_TimeZone_getSystemTimeZoneID; -text: .text%findJavaTZ_md; -text: .text%Java_java_lang_StrictMath_log; diff --git a/make/mapfiles/libjawt/mapfile-vers b/make/mapfiles/libjawt/mapfile-vers deleted file mode 100644 index ee0ef4202cc..00000000000 --- a/make/mapfiles/libjawt/mapfile-vers +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright (c) 2005, 2013, 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. -# - -# Define library interface. - -SUNWprivate_1.1 { - global: - JAWT_GetAWT; - local: - *; -}; diff --git a/make/mapfiles/libjdwp/mapfile-vers b/make/mapfiles/libjdwp/mapfile-vers deleted file mode 100644 index 77ae0c88af7..00000000000 --- a/make/mapfiles/libjdwp/mapfile-vers +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (c) 2003, 2013, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - Agent_OnLoad; - Agent_OnUnload; - local: - *; -}; diff --git a/make/mapfiles/libjimage/mapfile-vers b/make/mapfiles/libjimage/mapfile-vers deleted file mode 100644 index a4de5f82f3c..00000000000 --- a/make/mapfiles/libjimage/mapfile-vers +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright (c) 2015, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - Java_jdk_internal_jimage_NativeImageBuffer_getNativeMap; - JIMAGE_Open; - JIMAGE_Close; - JIMAGE_PackageToModule; - JIMAGE_FindResource; - JIMAGE_GetResource; - JIMAGE_ResourceIterator; - JIMAGE_ResourcePath; - local: - *; -}; diff --git a/make/mapfiles/libjli/mapfile-vers b/make/mapfiles/libjli/mapfile-vers deleted file mode 100644 index d3b87b49a44..00000000000 --- a/make/mapfiles/libjli/mapfile-vers +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (c) 2005, 2013, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - JLI_Launch; - JLI_ManifestIterate; - JLI_SetTraceLauncher; - JLI_ReportErrorMessage; - JLI_ReportErrorMessageSys; - JLI_ReportMessage; - JLI_ReportExceptionDescription; - JLI_GetStdArgs; - JLI_GetStdArgc; - JLI_List_new; - JLI_List_add; - JLI_StringDup; - JLI_MemFree; - JLI_InitArgProcessing; - JLI_PreprocessArg; - JLI_AddArgsFromEnvVar; - JLI_GetAppArgIndex; - - local: - *; -}; diff --git a/make/mapfiles/libjpeg/mapfile-vers b/make/mapfiles/libjpeg/mapfile-vers deleted file mode 100644 index 22c132fbd72..00000000000 --- a/make/mapfiles/libjpeg/mapfile-vers +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (c) 1997, 2013, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - JNI_OnLoad; - - Java_sun_awt_image_JPEGImageDecoder_initIDs; - Java_sun_awt_image_JPEGImageDecoder_readImage; - - Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initReaderIDs; - Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initJPEGImageReader; - Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setSource; - Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImageHeader; - Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setOutColorSpace; - Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage; - Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_abortRead; - Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetReader; - Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_disposeReader; - Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetLibraryState; - Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_clearNativeReadAbortFlag; - Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initWriterIDs; - Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initJPEGImageWriter; - Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_setDest; - Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeTables; - Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage; - Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_abortWrite; - Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_resetWriter; - Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_disposeWriter; - local: - *; -}; diff --git a/make/mapfiles/libjpeg/reorder-sparc b/make/mapfiles/libjpeg/reorder-sparc deleted file mode 100644 index e771347cead..00000000000 --- a/make/mapfiles/libjpeg/reorder-sparc +++ /dev/null @@ -1,119 +0,0 @@ -data = R0x2000; -text = LOAD ?RXO; -# Test Null -# Test Exit -# Test Hello -# Test Sleep -# Test IntToString -# Test LoadToolkit -# Test LoadFrame -# Test LoadJFrame -# Test JHello -# SwingSet -text: .text%JNI_OnLoad; -text: .text%Java_sun_awt_image_JPEGImageDecoder_initIDs; -text: .text%Java_sun_awt_image_JPEGImageDecoder_readImage; -text: .text%jStdError; -text: .text%jCreaDecompress; -text: .text%jIMemMgr; -text: .text%jMemInit; -text: .text%jGetSmall; -text: .text%jIMReader; -text: .text%alloc_small: OUTPUTDIR/jmemmgr.o; -text: .text%reset_marker_reader: OUTPUTDIR/jdmarker.o; -text: .text%jIInCtlr; -text: .text%GET_ARRAYS: OUTPUTDIR/jpegdecoder.o; -text: .text%jReadHeader; -text: .text%jConsumeInput; -text: .text%reset_input_controller: OUTPUTDIR/jdinput.o; -text: .text%reset_error_mgr: OUTPUTDIR/jerror.o; -text: .text%sun_jpeg_init_source; -text: .text%consume_markers: OUTPUTDIR/jdinput.o; -text: .text%read_markers: OUTPUTDIR/jdmarker.o; -# text: .text%first_marker: OUTPUTDIR/jdmarker.o; -text: .text%sun_jpeg_fill_input_buffer; -text: .text%RELEASE_ARRAYS: OUTPUTDIR/jpegdecoder.o; -# text: .text%get_soi: OUTPUTDIR/jdmarker.o; -text: .text%emit_message: OUTPUTDIR/jerror.o; -text: .text%next_marker: OUTPUTDIR/jdmarker.o; -text: .text%get_interesting_appn: OUTPUTDIR/jdmarker.o; -text: .text%examine_app0: OUTPUTDIR/jdmarker.o; -text: .text%skip_variable: OUTPUTDIR/jdmarker.o; -text: .text%sun_jpeg_skip_input_data; -text: .text%examine_app14: OUTPUTDIR/jdmarker.o; -text: .text%get_dqt: OUTPUTDIR/jdmarker.o; -text: .text%jAlcQTable; -text: .text%get_sof: OUTPUTDIR/jdmarker.o; -# text: .text%get_dri: OUTPUTDIR/jdmarker.o; -text: .text%get_dht: OUTPUTDIR/jdmarker.o; -text: .text%jAlcHTable; -text: .text%get_sos: OUTPUTDIR/jdmarker.o; -text: .text%initial_setup: OUTPUTDIR/jdinput.o; -text: .text%jDivRound; -text: .text%default_decompress_parms: OUTPUTDIR/jdapimin.o; -text: .text%jHasMultScn; -text: .text%jStrtDecompress; -text: .text%jIDMaster; -text: .text%master_selection: OUTPUTDIR/jdmaster.o; -text: .text%jCalcDimensions; -# text: .text%use_merged_upsample: OUTPUTDIR/jdmaster.o; -# text: .text%prepare_range_limit_table: OUTPUTDIR/jdmaster.o; -text: .text%jIDColor; -# text: .text%build_ycc_rgb_table: OUTPUTDIR/jdcolor.o; -text: .text%jIUpsampler; -text: .text%jRound; -text: .text%alloc_sarray: OUTPUTDIR/jmemmgr.o; -text: .text%alloc_large: OUTPUTDIR/jmemmgr.o; -text: .text%jGetLarge; -text: .text%jIDPostC; -text: .text%jIIDCT; -text: .text%jIHDecoder; -text: .text%jIDCoefC; -text: .text%jIDMainC; -text: .text%alloc_funny_pointers: OUTPUTDIR/jdmainct.o; -text: .text%realize_virt_arrays: OUTPUTDIR/jmemmgr.o; -text: .text%start_input_pass: OUTPUTDIR/jdinput.o; -text: .text%per_scan_setup: OUTPUTDIR/jdinput.o; -text: .text%latch_quant_tables: OUTPUTDIR/jdinput.o; -text: .text%start_pass_huff_decoder: OUTPUTDIR/jdhuff.o; -text: .text%jMkDDerived; -text: .text%start_input_pass: OUTPUTDIR/jdcoefct.o; -# text: .text%start_iMCU_row: OUTPUTDIR/jdcoefct.o; -text: .text%output_pass_setup: OUTPUTDIR/jdapistd.o; -text: .text%prepare_for_output_pass: OUTPUTDIR/jdmaster.o; -text: .text%start_pass: OUTPUTDIR/jddctmgr.o; -text: .text%start_output_pass: OUTPUTDIR/jdcoefct.o; -text: .text%start_pass_dcolor: OUTPUTDIR/jdcolor.o; -text: .text%start_pass_upsample: OUTPUTDIR/jdsample.o; -text: .text%start_pass_dpost: OUTPUTDIR/jdpostct.o; -text: .text%start_pass_main: OUTPUTDIR/jdmainct.o; -text: .text%make_funny_pointers: OUTPUTDIR/jdmainct.o; -text: .text%jReadScanlines; -text: .text%process_data_context_main: OUTPUTDIR/jdmainct.o; -text: .text%decompress_onepass: OUTPUTDIR/jdcoefct.o; -text: .text%jZeroFar; -text: .text%decode_mcu: OUTPUTDIR/jdhuff.o; -text: .text%jFilBitBuf; -text: .text%jHufDecode; -text: .text%jRDislow; -text: .text%sep_upsample: OUTPUTDIR/jdsample.o; -text: .text%fullsize_upsample: OUTPUTDIR/jdsample.o; -text: .text%h2v2_fancy_upsample: OUTPUTDIR/jdsample.o; -text: .text%ycc_rgb_convert: OUTPUTDIR/jdcolor.o; -# text: .text%set_wraparound_pointers: OUTPUTDIR/jdmainct.o; -#text: .text%process_restart: OUTPUTDIR/jdhuff.o; -text: .text%read_restart_marker: OUTPUTDIR/jdmarker.o; -text: .text%finish_input_pass: OUTPUTDIR/jdinput.o; -# text: .text%set_bottom_pointers: OUTPUTDIR/jdmainct.o; -text: .text%jFinDecompress; -text: .text%finish_output_pass: OUTPUTDIR/jdmaster.o; -text: .text%sun_jpeg_term_source; -text: .text%jAbort; -text: .text%free_pool: OUTPUTDIR/jmemmgr.o; -text: .text%jFreeLarge; -text: .text%jFreeSmall; -text: .text%jDestDecompress; -text: .text%jDestroy; -text: .text%self_destruct: OUTPUTDIR/jmemmgr.o; -text: .text%jMemTerm; -text: .text%process_data_simple_main: OUTPUTDIR/jdmainct.o; diff --git a/make/mapfiles/libjpeg/reorder-sparcv9 b/make/mapfiles/libjpeg/reorder-sparcv9 deleted file mode 100644 index 5c01872c381..00000000000 --- a/make/mapfiles/libjpeg/reorder-sparcv9 +++ /dev/null @@ -1,119 +0,0 @@ -data = R0x2000; -text = LOAD ?RXO; -# Test Null -# Test Exit -# Test Hello -# Test Sleep -# Test IntToString -# Test LoadToolkit -# Test LoadFrame -# Test LoadJFrame -# Test JHello -# SwingSet -text: .text%JNI_OnLoad; -text: .text%Java_sun_awt_image_JPEGImageDecoder_initIDs; -text: .text%Java_sun_awt_image_JPEGImageDecoder_readImage; -text: .text%jStdError; -text: .text%jCreaDecompress; -text: .text%jIMemMgr; -text: .text%jMemInit; -text: .text%jGetSmall; -text: .text%jIMReader; -text: .text%alloc_small: OUTPUTDIR/jmemmgr.o; -text: .text%reset_marker_reader: OUTPUTDIR/jdmarker.o; -text: .text%jIInCtlr; -text: .text%GET_ARRAYS: OUTPUTDIR/jpegdecoder.o; -text: .text%jReadHeader; -text: .text%jConsumeInput; -text: .text%reset_input_controller: OUTPUTDIR/jdinput.o; -text: .text%reset_error_mgr: OUTPUTDIR/jerror.o; -text: .text%sun_jpeg_init_source; -text: .text%consume_markers: OUTPUTDIR/jdinput.o; -text: .text%read_markers: OUTPUTDIR/jdmarker.o; -# text: .text%first_marker: OUTPUTDIR/jdmarker.o; -text: .text%sun_jpeg_fill_input_buffer; -text: .text%RELEASE_ARRAYS: OUTPUTDIR/jpegdecoder.o; -# text: .text%get_soi: OUTPUTDIR/jdmarker.o; -text: .text%emit_message: OUTPUTDIR/jerror.o; -text: .text%next_marker: OUTPUTDIR/jdmarker.o; -text: .text%get_interesting_appn: OUTPUTDIR/jdmarker.o; -text: .text%examine_app0: OUTPUTDIR/jdmarker.o; -text: .text%skip_variable: OUTPUTDIR/jdmarker.o; -text: .text%sun_jpeg_skip_input_data; -text: .text%examine_app14: OUTPUTDIR/jdmarker.o; -text: .text%get_dqt: OUTPUTDIR/jdmarker.o; -text: .text%jAlcQTable; -text: .text%get_sof: OUTPUTDIR/jdmarker.o; -# text: .text%get_dri: OUTPUTDIR/jdmarker.o; -text: .text%get_dht: OUTPUTDIR/jdmarker.o; -text: .text%jAlcHTable; -text: .text%get_sos: OUTPUTDIR/jdmarker.o; -text: .text%initial_setup: OUTPUTDIR/jdinput.o; -text: .text%jDivRound; -text: .text%default_decompress_parms: OUTPUTDIR/jdapimin.o; -text: .text%jHasMultScn; -text: .text%jStrtDecompress; -text: .text%jIDMaster; -text: .text%master_selection: OUTPUTDIR/jdmaster.o; -text: .text%jCalcDimensions; -# text: .text%use_merged_upsample: OUTPUTDIR/jdmaster.o; -# text: .text%prepare_range_limit_table: OUTPUTDIR/jdmaster.o; -text: .text%jIDColor; -# text: .text%build_ycc_rgb_table: OUTPUTDIR/jdcolor.o; -text: .text%jIUpsampler; -text: .text%jRound; -text: .text%alloc_sarray: OUTPUTDIR/jmemmgr.o; -text: .text%alloc_large: OUTPUTDIR/jmemmgr.o; -text: .text%jGetLarge; -text: .text%jIDPostC; -text: .text%jIIDCT; -text: .text%jIHDecoder; -text: .text%jIDCoefC; -text: .text%jIDMainC; -text: .text%alloc_funny_pointers: OUTPUTDIR/jdmainct.o; -text: .text%realize_virt_arrays: OUTPUTDIR/jmemmgr.o; -text: .text%start_input_pass: OUTPUTDIR/jdinput.o; -text: .text%per_scan_setup: OUTPUTDIR/jdinput.o; -text: .text%latch_quant_tables: OUTPUTDIR/jdinput.o; -text: .text%start_pass_huff_decoder: OUTPUTDIR/jdhuff.o; -text: .text%jMkDDerived; -text: .text%start_input_pass: OUTPUTDIR/jdcoefct.o; -# text: .text%start_iMCU_row: OUTPUTDIR/jdcoefct.o; -text: .text%output_pass_setup: OUTPUTDIR/jdapistd.o; -text: .text%prepare_for_output_pass: OUTPUTDIR/jdmaster.o; -text: .text%start_pass: OUTPUTDIR/jddctmgr.o; -text: .text%start_output_pass: OUTPUTDIR/jdcoefct.o; -text: .text%start_pass_dcolor: OUTPUTDIR/jdcolor.o; -text: .text%start_pass_upsample: OUTPUTDIR/jdsample.o; -text: .text%start_pass_dpost: OUTPUTDIR/jdpostct.o; -text: .text%start_pass_main: OUTPUTDIR/jdmainct.o; -text: .text%make_funny_pointers: OUTPUTDIR/jdmainct.o; -text: .text%jReadScanlines; -text: .text%process_data_context_main: OUTPUTDIR/jdmainct.o; -text: .text%decompress_onepass: OUTPUTDIR/jdcoefct.o; -text: .text%jZeroFar; -text: .text%decode_mcu: OUTPUTDIR/jdhuff.o; -text: .text%jFilBitBuf; -text: .text%jHufDecode; -text: .text%jRDislow; -text: .text%sep_upsample: OUTPUTDIR/jdsample.o; -text: .text%fullsize_upsample: OUTPUTDIR/jdsample.o; -text: .text%h2v2_fancy_upsample: OUTPUTDIR/jdsample.o; -text: .text%ycc_rgb_convert: OUTPUTDIR/jdcolor.o; -# text: .text%set_wraparound_pointers: OUTPUTDIR/jdmainct.o; -text: .text%process_restart: OUTPUTDIR/jdhuff.o; -text: .text%read_restart_marker: OUTPUTDIR/jdmarker.o; -text: .text%finish_input_pass: OUTPUTDIR/jdinput.o; -# text: .text%set_bottom_pointers: OUTPUTDIR/jdmainct.o; -text: .text%jFinDecompress; -text: .text%finish_output_pass: OUTPUTDIR/jdmaster.o; -text: .text%sun_jpeg_term_source; -text: .text%jAbort; -text: .text%free_pool: OUTPUTDIR/jmemmgr.o; -text: .text%jFreeLarge; -text: .text%jFreeSmall; -text: .text%jDestDecompress; -text: .text%jDestroy; -text: .text%self_destruct: OUTPUTDIR/jmemmgr.o; -text: .text%jMemTerm; -text: .text%process_data_simple_main: OUTPUTDIR/jdmainct.o; diff --git a/make/mapfiles/libjpeg/reorder-x86 b/make/mapfiles/libjpeg/reorder-x86 deleted file mode 100644 index 328c6dcd782..00000000000 --- a/make/mapfiles/libjpeg/reorder-x86 +++ /dev/null @@ -1,119 +0,0 @@ -data = R0x2000; -text = LOAD ?RXO; -# Test Null -# Test Exit -# Test Hello -# Test Sleep -# Test IntToString -# Test LoadToolkit -# Test LoadFrame -# Test LoadJFrame -# Test JHello -# SwingSet -text: .text%JNI_OnLoad; -text: .text%Java_sun_awt_image_JPEGImageDecoder_initIDs; -text: .text%Java_sun_awt_image_JPEGImageDecoder_readImage; -text: .text%jStdError; -text: .text%jCreaDecompress; -text: .text%jIMemMgr; -text: .text%jMemInit; -text: .text%jGetSmall; -text: .text%jIMReader; -text: .text%alloc_small: OUTPUTDIR/jmemmgr.o; -text: .text%reset_marker_reader: OUTPUTDIR/jdmarker.o; -text: .text%jIInCtlr; -# text: .text%GET_ARRAYS: OUTPUTDIR/jpegdecoder.o; -text: .text%jReadHeader; -text: .text%jConsumeInput; -text: .text%reset_input_controller: OUTPUTDIR/jdinput.o; -text: .text%reset_error_mgr: OUTPUTDIR/jerror.o; -text: .text%sun_jpeg_init_source; -text: .text%consume_markers: OUTPUTDIR/jdinput.o; -text: .text%read_markers: OUTPUTDIR/jdmarker.o; -# text: .text%first_marker: OUTPUTDIR/jdmarker.o; -text: .text%sun_jpeg_fill_input_buffer; -# text: .text%RELEASE_ARRAYS: OUTPUTDIR/jpegdecoder.o; -# text: .text%get_soi: OUTPUTDIR/jdmarker.o; -text: .text%emit_message: OUTPUTDIR/jerror.o; -# text: .text%next_marker: OUTPUTDIR/jdmarker.o; -text: .text%get_interesting_appn: OUTPUTDIR/jdmarker.o; -# text: .text%examine_app0: OUTPUTDIR/jdmarker.o; -text: .text%skip_variable: OUTPUTDIR/jdmarker.o; -text: .text%sun_jpeg_skip_input_data; -# text: .text%examine_app14: OUTPUTDIR/jdmarker.o; -text: .text%get_dqt: OUTPUTDIR/jdmarker.o; -text: .text%jAlcQTable; -text: .text%get_sof: OUTPUTDIR/jdmarker.o; -# text: .text%get_dri: OUTPUTDIR/jdmarker.o; -text: .text%get_dht: OUTPUTDIR/jdmarker.o; -text: .text%jAlcHTable; -text: .text%get_sos: OUTPUTDIR/jdmarker.o; -# text: .text%initial_setup: OUTPUTDIR/jdinput.o; -text: .text%jDivRound; -# text: .text%default_decompress_parms: OUTPUTDIR/jdapimin.o; -text: .text%jHasMultScn; -text: .text%jStrtDecompress; -text: .text%jIDMaster; -# text: .text%master_selection: OUTPUTDIR/jdmaster.o; -text: .text%jCalcDimensions; -# text: .text%use_merged_upsample: OUTPUTDIR/jdmaster.o; -# text: .text%prepare_range_limit_table: OUTPUTDIR/jdmaster.o; -text: .text%jIDColor; -# text: .text%build_ycc_rgb_table: OUTPUTDIR/jdcolor.o; -text: .text%jIUpsampler; -text: .text%jRound; -text: .text%alloc_sarray: OUTPUTDIR/jmemmgr.o; -text: .text%alloc_large: OUTPUTDIR/jmemmgr.o; -text: .text%jGetLarge; -text: .text%jIDPostC; -text: .text%jIIDCT; -text: .text%jIHDecoder; -text: .text%jIDCoefC; -text: .text%jIDMainC; -# text: .text%alloc_funny_pointers: OUTPUTDIR/jdmainct.o; -text: .text%realize_virt_arrays: OUTPUTDIR/jmemmgr.o; -text: .text%start_input_pass: OUTPUTDIR/jdinput.o; -# text: .text%per_scan_setup: OUTPUTDIR/jdinput.o; -# text: .text%latch_quant_tables: OUTPUTDIR/jdinput.o; -text: .text%start_pass_huff_decoder: OUTPUTDIR/jdhuff.o; -text: .text%jMkDDerived; -text: .text%start_input_pass: OUTPUTDIR/jdcoefct.o; -# text: .text%start_iMCU_row: OUTPUTDIR/jdcoefct.o; -# text: .text%output_pass_setup: OUTPUTDIR/jdapistd.o; -text: .text%prepare_for_output_pass: OUTPUTDIR/jdmaster.o; -text: .text%start_pass: OUTPUTDIR/jddctmgr.o; -text: .text%start_output_pass: OUTPUTDIR/jdcoefct.o; -text: .text%start_pass_dcolor: OUTPUTDIR/jdcolor.o; -text: .text%start_pass_upsample: OUTPUTDIR/jdsample.o; -text: .text%start_pass_dpost: OUTPUTDIR/jdpostct.o; -text: .text%start_pass_main: OUTPUTDIR/jdmainct.o; -# text: .text%make_funny_pointers: OUTPUTDIR/jdmainct.o; -text: .text%jReadScanlines; -text: .text%process_data_context_main: OUTPUTDIR/jdmainct.o; -text: .text%decompress_onepass: OUTPUTDIR/jdcoefct.o; -text: .text%jZeroFar; -text: .text%decode_mcu: OUTPUTDIR/jdhuff.o; -text: .text%jFilBitBuf; -text: .text%jHufDecode; -text: .text%jRDislow; -text: .text%sep_upsample: OUTPUTDIR/jdsample.o; -text: .text%fullsize_upsample: OUTPUTDIR/jdsample.o; -text: .text%h2v2_fancy_upsample: OUTPUTDIR/jdsample.o; -text: .text%ycc_rgb_convert: OUTPUTDIR/jdcolor.o; -# text: .text%set_wraparound_pointers: OUTPUTDIR/jdmainct.o; -# text: .text%process_restart: OUTPUTDIR/jdhuff.o; -text: .text%read_restart_marker: OUTPUTDIR/jdmarker.o; -text: .text%finish_input_pass: OUTPUTDIR/jdinput.o; -# text: .text%set_bottom_pointers: OUTPUTDIR/jdmainct.o; -text: .text%jFinDecompress; -text: .text%finish_output_pass: OUTPUTDIR/jdmaster.o; -text: .text%sun_jpeg_term_source; -text: .text%jAbort; -text: .text%free_pool: OUTPUTDIR/jmemmgr.o; -text: .text%jFreeLarge; -text: .text%jFreeSmall; -text: .text%jDestDecompress; -text: .text%jDestroy; -text: .text%self_destruct: OUTPUTDIR/jmemmgr.o; -text: .text%jMemTerm; -text: .text%process_data_simple_main: OUTPUTDIR/jdmainct.o; diff --git a/make/mapfiles/libjsdt/mapfile-vers b/make/mapfiles/libjsdt/mapfile-vers deleted file mode 100644 index 5ea5bce0a85..00000000000 --- a/make/mapfiles/libjsdt/mapfile-vers +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright (c) 2008, 2013, 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. -# - -# Define library interface. - -SUNWprivate_1.1 { - global: - Java_sun_tracing_dtrace_JVM_isSupported0; - Java_sun_tracing_dtrace_JVM_activate0; - Java_sun_tracing_dtrace_JVM_dispose0; - Java_sun_tracing_dtrace_JVM_isEnabled0; - Java_sun_tracing_dtrace_JVM_defineClass0; - local: - *; -}; diff --git a/make/mapfiles/liblcms/mapfile-vers b/make/mapfiles/liblcms/mapfile-vers deleted file mode 100644 index 1a71eed3e54..00000000000 --- a/make/mapfiles/liblcms/mapfile-vers +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright (c) 2007, 2013, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - Java_sun_java2d_cmm_lcms_LCMS_loadProfileNative; - Java_sun_java2d_cmm_lcms_LCMS_getProfileSizeNative; - Java_sun_java2d_cmm_lcms_LCMS_getProfileDataNative; - Java_sun_java2d_cmm_lcms_LCMS_getTagNative; - Java_sun_java2d_cmm_lcms_LCMS_setTagDataNative; - Java_sun_java2d_cmm_lcms_LCMS_colorConvert; - Java_sun_java2d_cmm_lcms_LCMS_getProfileID; - Java_sun_java2d_cmm_lcms_LCMS_initLCMS; - Java_sun_java2d_cmm_lcms_LCMS_createNativeTransform; - JNI_OnLoad; - - local: - *; -}; diff --git a/make/mapfiles/libmanagement/mapfile-vers b/make/mapfiles/libmanagement/mapfile-vers deleted file mode 100644 index 2b3a81302ba..00000000000 --- a/make/mapfiles/libmanagement/mapfile-vers +++ /dev/null @@ -1,97 +0,0 @@ -# -# Copyright (c) 2005, 2015, 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. -# - -# Define library interface. - -SUNWprivate_1.1 { - global: - Java_sun_management_ClassLoadingImpl_setVerboseClass; - Java_sun_management_GarbageCollectorImpl_getCollectionCount; - Java_sun_management_GarbageCollectorImpl_getCollectionTime; - Java_sun_management_HotspotThread_getInternalThreadCount; - Java_sun_management_HotspotThread_getInternalThreadTimes0; - Java_sun_management_MemoryImpl_getMemoryManagers0; - Java_sun_management_MemoryImpl_getMemoryPools0; - Java_sun_management_MemoryImpl_getMemoryUsage0; - Java_sun_management_MemoryImpl_setVerboseGC; - Java_sun_management_MemoryManagerImpl_getMemoryPools0; - Java_sun_management_MemoryPoolImpl_getCollectionUsage0; - Java_sun_management_MemoryPoolImpl_getMemoryManagers0; - Java_sun_management_MemoryPoolImpl_getPeakUsage0; - Java_sun_management_MemoryPoolImpl_getUsage0; - Java_sun_management_MemoryPoolImpl_resetPeakUsage0; - Java_sun_management_MemoryPoolImpl_setCollectionThreshold0; - Java_sun_management_MemoryPoolImpl_setPoolCollectionSensor; - Java_sun_management_MemoryPoolImpl_setPoolUsageSensor; - Java_sun_management_MemoryPoolImpl_setUsageThreshold0; - Java_sun_management_ThreadImpl_dumpThreads0; - Java_sun_management_ThreadImpl_findDeadlockedThreads0; - Java_sun_management_ThreadImpl_findMonitorDeadlockedThreads0; - Java_sun_management_ThreadImpl_getThreadInfo1; - Java_sun_management_ThreadImpl_getThreads; - Java_sun_management_ThreadImpl_getThreadTotalCpuTime0; - Java_sun_management_ThreadImpl_getThreadTotalCpuTime1; - Java_sun_management_ThreadImpl_getThreadUserCpuTime0; - Java_sun_management_ThreadImpl_getThreadUserCpuTime1; - Java_sun_management_ThreadImpl_getThreadAllocatedMemory1; - Java_sun_management_ThreadImpl_resetContentionTimes0; - Java_sun_management_ThreadImpl_resetPeakThreadCount0; - Java_sun_management_ThreadImpl_setThreadContentionMonitoringEnabled0; - Java_sun_management_ThreadImpl_setThreadCpuTimeEnabled0; - Java_sun_management_ThreadImpl_setThreadAllocatedMemoryEnabled0; - Java_sun_management_VMManagementImpl_getAvailableProcessors; - Java_sun_management_VMManagementImpl_getClassInitializationTime; - Java_sun_management_VMManagementImpl_getClassLoadingTime; - Java_sun_management_VMManagementImpl_getClassVerificationTime; - Java_sun_management_VMManagementImpl_getDaemonThreadCount; - Java_sun_management_VMManagementImpl_getInitializedClassCount; - Java_sun_management_VMManagementImpl_getLiveThreadCount; - Java_sun_management_VMManagementImpl_getLoadedClassSize; - Java_sun_management_VMManagementImpl_getMethodDataSize; - Java_sun_management_VMManagementImpl_getPeakThreadCount; - Java_sun_management_VMManagementImpl_getProcessId; - Java_sun_management_VMManagementImpl_getSafepointCount; - Java_sun_management_VMManagementImpl_getSafepointSyncTime; - Java_sun_management_VMManagementImpl_getStartupTime; - Java_sun_management_VMManagementImpl_getUptime0; - Java_sun_management_VMManagementImpl_getTotalApplicationNonStoppedTime; - Java_sun_management_VMManagementImpl_getTotalClassCount; - Java_sun_management_VMManagementImpl_getTotalCompileTime; - Java_sun_management_VMManagementImpl_getTotalSafepointTime; - Java_sun_management_VMManagementImpl_getTotalThreadCount; - Java_sun_management_VMManagementImpl_getUnloadedClassCount; - Java_sun_management_VMManagementImpl_getUnloadedClassSize; - Java_sun_management_VMManagementImpl_getVerboseClass; - Java_sun_management_VMManagementImpl_getVerboseGC; - Java_sun_management_VMManagementImpl_getVersion0; - Java_sun_management_VMManagementImpl_getVmArguments0; - Java_sun_management_VMManagementImpl_initOptionalSupportFields; - Java_sun_management_VMManagementImpl_isThreadContentionMonitoringEnabled; - Java_sun_management_VMManagementImpl_isThreadCpuTimeEnabled; - Java_sun_management_VMManagementImpl_isThreadAllocatedMemoryEnabled; - JNI_OnLoad; - local: - *; -}; diff --git a/make/mapfiles/libmanagement_agent/mapfile-vers b/make/mapfiles/libmanagement_agent/mapfile-vers deleted file mode 100644 index 935690c3b64..00000000000 --- a/make/mapfiles/libmanagement_agent/mapfile-vers +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (c) 2017, 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. -# - -# Define library interface. - -SUNWprivate_1.1 { - global: - Java_jdk_internal_agent_FileSystemImpl_isAccessUserOnly0; - JNI_OnLoad; - local: - *; -}; diff --git a/make/mapfiles/libmanagement_ext/mapfile-vers b/make/mapfiles/libmanagement_ext/mapfile-vers deleted file mode 100644 index b8397bf9c1b..00000000000 --- a/make/mapfiles/libmanagement_ext/mapfile-vers +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) 2015, 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. -# - -# Define library interface. - -SUNWprivate_1.1 { - global: - Java_com_sun_management_internal_OperatingSystemImpl_getCommittedVirtualMemorySize0; - Java_com_sun_management_internal_OperatingSystemImpl_getFreePhysicalMemorySize0; - Java_com_sun_management_internal_OperatingSystemImpl_getFreeSwapSpaceSize0; - Java_com_sun_management_internal_OperatingSystemImpl_getMaxFileDescriptorCount0; - Java_com_sun_management_internal_OperatingSystemImpl_getOpenFileDescriptorCount0; - Java_com_sun_management_internal_OperatingSystemImpl_getProcessCpuLoad0; - Java_com_sun_management_internal_OperatingSystemImpl_getProcessCpuTime0; - Java_com_sun_management_internal_OperatingSystemImpl_getSystemCpuLoad0; - Java_com_sun_management_internal_OperatingSystemImpl_getTotalPhysicalMemorySize0; - Java_com_sun_management_internal_OperatingSystemImpl_getTotalSwapSpaceSize0; - Java_com_sun_management_internal_OperatingSystemImpl_initialize0; - Java_com_sun_management_internal_DiagnosticCommandImpl_executeDiagnosticCommand; - Java_com_sun_management_internal_DiagnosticCommandImpl_getDiagnosticCommands; - Java_com_sun_management_internal_DiagnosticCommandImpl_getDiagnosticCommandInfo; - Java_com_sun_management_internal_DiagnosticCommandImpl_setNotificationEnabled; - Java_com_sun_management_internal_Flag_getAllFlagNames; - Java_com_sun_management_internal_Flag_getFlags; - Java_com_sun_management_internal_Flag_getInternalFlagCount; - Java_com_sun_management_internal_Flag_initialize; - Java_com_sun_management_internal_Flag_setLongValue; - Java_com_sun_management_internal_Flag_setBooleanValue; - Java_com_sun_management_internal_Flag_setStringValue; - Java_com_sun_management_internal_GarbageCollectorExtImpl_setNotificationEnabled; - Java_com_sun_management_internal_GcInfoBuilder_fillGcAttributeInfo; - Java_com_sun_management_internal_GcInfoBuilder_getLastGcInfo0; - Java_com_sun_management_internal_GcInfoBuilder_getNumGcExtAttributes; - Java_com_sun_management_internal_HotSpotDiagnostic_dumpHeap0; - JNI_OnLoad; - local: - *; -}; diff --git a/make/mapfiles/libmlib_image/mapfile-vers b/make/mapfiles/libmlib_image/mapfile-vers deleted file mode 100644 index e8fddbbc67d..00000000000 --- a/make/mapfiles/libmlib_image/mapfile-vers +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright (c) 2005, 2013, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - j2d_mlib_ImageDelete; - j2d_mlib_ImageCreateStruct; - j2d_mlib_ImageLookUp; - j2d_mlib_ImageCreate; - j2d_mlib_ImageConvMxN; - j2d_mlib_ImageAffine; - j2d_mlib_ImageConvKernelConvert; - local: - *; -}; diff --git a/make/mapfiles/libnet/mapfile-vers b/make/mapfiles/libnet/mapfile-vers deleted file mode 100644 index ccf2736e6e2..00000000000 --- a/make/mapfiles/libnet/mapfile-vers +++ /dev/null @@ -1,119 +0,0 @@ -# -# Copyright (c) 1997, 2018, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - JNI_OnLoad; - Java_java_net_PlainDatagramSocketImpl_dataAvailable; - Java_java_net_PlainSocketImpl_socketListen; - Java_java_net_PlainDatagramSocketImpl_getTTL; - Java_java_net_PlainDatagramSocketImpl_init; - Java_java_net_SocketOutputStream_socketWrite0; - Java_java_net_PlainSocketImpl_socketCreate; - Java_java_net_PlainSocketImpl_socketAvailable; - Java_java_net_PlainDatagramSocketImpl_join; - Java_java_net_PlainDatagramSocketImpl_socketGetOption; - Java_java_net_InetAddress_init; - Java_java_net_Inet4Address_init; - Java_java_net_Inet6Address_init; - Java_java_net_PlainDatagramSocketImpl_setTTL; - Java_java_net_PlainDatagramSocketImpl_socketSetOption0; - Java_java_net_PlainDatagramSocketImpl_bind0; - Java_java_net_PlainSocketImpl_socketAccept; - Java_java_net_DatagramPacket_init; - Java_java_net_PlainDatagramSocketImpl_leave; - Java_java_net_SocketInputStream_socketRead0; - Java_java_net_InetAddressImplFactory_isIPv6Supported; - Java_java_net_Inet4AddressImpl_getLocalHostName; - Java_java_net_Inet4AddressImpl_lookupAllHostAddr; - Java_java_net_Inet4AddressImpl_getHostByAddr; - Java_java_net_Inet4AddressImpl_isReachable0; - Java_java_net_Inet6AddressImpl_getLocalHostName; - Java_java_net_Inet6AddressImpl_lookupAllHostAddr; - Java_java_net_Inet6AddressImpl_getHostByAddr; - Java_java_net_Inet6AddressImpl_isReachable0; - Java_java_net_NetworkInterface_init; - Java_java_net_NetworkInterface_getByName0; - Java_java_net_NetworkInterface_getByIndex0; - Java_java_net_NetworkInterface_getByInetAddress0; - Java_java_net_NetworkInterface_getAll; - Java_java_net_NetworkInterface_isUp0; - Java_java_net_NetworkInterface_isLoopback0; - Java_java_net_NetworkInterface_isP2P0; - Java_java_net_NetworkInterface_supportsMulticast0; - Java_java_net_NetworkInterface_getMacAddr0; - Java_java_net_NetworkInterface_getMTU0; - Java_java_net_PlainDatagramSocketImpl_send; - Java_java_net_PlainSocketImpl_socketClose0; - Java_java_net_SocketOutputStream_init; - Java_java_net_PlainDatagramSocketImpl_peek; - Java_java_net_PlainDatagramSocketImpl_peekData; - Java_java_net_PlainSocketImpl_socketSetOption0; - Java_java_net_PlainSocketImpl_socketSendUrgentData; - Java_java_net_PlainDatagramSocketImpl_datagramSocketCreate; - Java_java_net_PlainSocketImpl_socketGetOption; - Java_java_net_PlainDatagramSocketImpl_receive0; - Java_java_net_PlainDatagramSocketImpl_connect0; - Java_java_net_PlainDatagramSocketImpl_disconnect0; - Java_java_net_PlainDatagramSocketImpl_datagramSocketClose; - Java_java_net_PlainSocketImpl_initProto; - Java_java_net_PlainSocketImpl_socketBind; - Java_java_net_PlainSocketImpl_socketShutdown; - Java_java_net_SocketInputStream_init; - Java_java_net_PlainSocketImpl_socketConnect; - Java_java_net_PlainDatagramSocketImpl_getTimeToLive; - Java_java_net_PlainDatagramSocketImpl_setTimeToLive; - Java_java_net_AbstractPlainSocketImpl_isReusePortAvailable0; - Java_java_net_AbstractPlainDatagramSocketImpl_isReusePortAvailable0; - Java_java_net_SocketCleanable_cleanupClose0; - Java_jdk_net_Sockets_isReusePortAvailable0; - Java_sun_net_PortConfig_getUpper0; - Java_sun_net_PortConfig_getLower0; - Java_sun_net_dns_ResolverConfigurationImpl_localDomain0; - Java_sun_net_dns_ResolverConfigurationImpl_fallbackDomain0; - Java_sun_net_sdp_SdpSupport_convert0; - Java_sun_net_sdp_SdpSupport_create0; - Java_sun_net_spi_DefaultProxySelector_init; - Java_sun_net_spi_DefaultProxySelector_getSystemProxies; - NET_SockaddrToInetAddress; - NET_SockaddrEqualsInetAddress; - NET_InetAddressToSockaddr; - NET_GetPortFromSockaddr; - NET_SetSockOpt; - NET_GetSockOpt; - NET_Bind; - NET_MapSocketOption; - NET_Wait; - NET_EnableFastTcpLoopback; - NET_ThrowNew; - ipv6_available; - reuseport_available; - initInetAddressIDs; - - local: - *; -}; diff --git a/make/mapfiles/libnio/mapfile-aix b/make/mapfiles/libnio/mapfile-aix deleted file mode 100644 index 72f54cf93d7..00000000000 --- a/make/mapfiles/libnio/mapfile-aix +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright (c) 2001, 2012, 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. -# - -# TODO: implement for AIX - -SUNWprivate_1.1 { - global: - - local: - *; -}; diff --git a/make/mapfiles/libnio/mapfile-linux b/make/mapfiles/libnio/mapfile-linux deleted file mode 100644 index e3d02592e19..00000000000 --- a/make/mapfiles/libnio/mapfile-linux +++ /dev/null @@ -1,198 +0,0 @@ -# -# Copyright (c) 2001, 2018, 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. -# - -SUNWprivate_1.1 { - global: - JNI_OnLoad; - Java_java_nio_MappedByteBuffer_force0; - Java_java_nio_MappedByteBuffer_isLoaded0; - Java_java_nio_MappedByteBuffer_load0; - Java_sun_nio_ch_DatagramChannelImpl_disconnect0; - Java_sun_nio_ch_DatagramChannelImpl_initIDs; - Java_sun_nio_ch_DatagramChannelImpl_receive0; - Java_sun_nio_ch_DatagramChannelImpl_send0; - Java_sun_nio_ch_DatagramDispatcher_read0; - Java_sun_nio_ch_DatagramDispatcher_readv0; - Java_sun_nio_ch_DatagramDispatcher_write0; - Java_sun_nio_ch_DatagramDispatcher_writev0; - Java_sun_nio_ch_EPoll_eventSize; - Java_sun_nio_ch_EPoll_eventsOffset; - Java_sun_nio_ch_EPoll_dataOffset; - Java_sun_nio_ch_EPoll_create; - Java_sun_nio_ch_EPoll_ctl; - Java_sun_nio_ch_EPoll_wait; - Java_sun_nio_ch_FileChannelImpl_initIDs; - Java_sun_nio_ch_FileChannelImpl_map0; - Java_sun_nio_ch_FileChannelImpl_position0; - Java_sun_nio_ch_FileChannelImpl_transferTo0; - Java_sun_nio_ch_FileChannelImpl_unmap0; - Java_sun_nio_ch_FileDispatcherImpl_allocate0; - Java_sun_nio_ch_FileDispatcherImpl_close0; - Java_sun_nio_ch_FileDispatcherImpl_closeIntFD; - Java_sun_nio_ch_FileDispatcherImpl_force0; - Java_sun_nio_ch_FileDispatcherImpl_init; - Java_sun_nio_ch_FileDispatcherImpl_lock0; - Java_sun_nio_ch_FileDispatcherImpl_preClose0; - Java_sun_nio_ch_FileDispatcherImpl_pread0; - Java_sun_nio_ch_FileDispatcherImpl_pwrite0; - Java_sun_nio_ch_FileDispatcherImpl_read0; - Java_sun_nio_ch_FileDispatcherImpl_readv0; - Java_sun_nio_ch_FileDispatcherImpl_release0; - Java_sun_nio_ch_FileDispatcherImpl_size0; - Java_sun_nio_ch_FileDispatcherImpl_truncate0; - Java_sun_nio_ch_FileDispatcherImpl_write0; - Java_sun_nio_ch_FileDispatcherImpl_writev0; - Java_sun_nio_ch_FileDispatcherImpl_setDirect0; - Java_sun_nio_ch_FileKey_init; - Java_sun_nio_ch_FileKey_initIDs; - Java_sun_nio_ch_InheritedChannel_close0; - Java_sun_nio_ch_InheritedChannel_dup; - Java_sun_nio_ch_InheritedChannel_dup2; - Java_sun_nio_ch_InheritedChannel_initIDs; - Java_sun_nio_ch_InheritedChannel_open0; - Java_sun_nio_ch_InheritedChannel_peerAddress0; - Java_sun_nio_ch_InheritedChannel_peerPort0; - Java_sun_nio_ch_InheritedChannel_soType0; - Java_sun_nio_ch_IOUtil_configureBlocking; - Java_sun_nio_ch_IOUtil_drain; - Java_sun_nio_ch_IOUtil_fdVal; - Java_sun_nio_ch_IOUtil_fdLimit; - Java_sun_nio_ch_IOUtil_initIDs; - Java_sun_nio_ch_IOUtil_iovMax; - Java_sun_nio_ch_IOUtil_makePipe; - Java_sun_nio_ch_IOUtil_randomBytes; - Java_sun_nio_ch_IOUtil_setfdVal; - Java_sun_nio_ch_IOUtil_write1; - Java_sun_nio_ch_NativeThread_current; - Java_sun_nio_ch_NativeThread_init; - Java_sun_nio_ch_NativeThread_signal; - Java_sun_nio_ch_Net_canIPv6SocketJoinIPv4Group0; - Java_sun_nio_ch_Net_canJoin6WithIPv4Group0; - Java_sun_nio_ch_Net_socket0; - Java_sun_nio_ch_Net_bind0; - Java_sun_nio_ch_Net_connect0; - Java_sun_nio_ch_Net_listen; - Java_sun_nio_ch_Net_localPort; - Java_sun_nio_ch_Net_localInetAddress; - Java_sun_nio_ch_Net_getIntOption0; - Java_sun_nio_ch_Net_setIntOption0; - Java_sun_nio_ch_Net_initIDs; - Java_sun_nio_ch_Net_isIPv6Available0; - Java_sun_nio_ch_Net_isReusePortAvailable0; - Java_sun_nio_ch_Net_joinOrDrop4; - Java_sun_nio_ch_Net_blockOrUnblock4; - Java_sun_nio_ch_Net_joinOrDrop6; - Java_sun_nio_ch_Net_blockOrUnblock6; - Java_sun_nio_ch_Net_setInterface4; - Java_sun_nio_ch_Net_getInterface4; - Java_sun_nio_ch_Net_setInterface6; - Java_sun_nio_ch_Net_getInterface6; - Java_sun_nio_ch_Net_shutdown; - Java_sun_nio_ch_Net_poll; - Java_sun_nio_ch_Net_pollinValue; - Java_sun_nio_ch_Net_polloutValue; - Java_sun_nio_ch_Net_pollerrValue; - Java_sun_nio_ch_Net_pollhupValue; - Java_sun_nio_ch_Net_pollnvalValue; - Java_sun_nio_ch_Net_pollconnValue; - Java_sun_nio_ch_Net_isExclusiveBindAvailable; - Java_sun_nio_ch_PollArrayWrapper_interrupt; - Java_sun_nio_ch_PollArrayWrapper_poll0; - Java_sun_nio_ch_ServerSocketChannelImpl_accept0; - Java_sun_nio_ch_ServerSocketChannelImpl_initIDs; - Java_sun_nio_ch_SocketChannelImpl_checkConnect; - Java_sun_nio_ch_SocketChannelImpl_sendOutOfBandData; - Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_accept0; - Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs; - Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect; - Java_sun_nio_fs_LinuxWatchService_eventSize; - Java_sun_nio_fs_LinuxWatchService_eventOffsets; - Java_sun_nio_fs_LinuxWatchService_inotifyInit; - Java_sun_nio_fs_LinuxWatchService_inotifyAddWatch; - Java_sun_nio_fs_LinuxWatchService_inotifyRmWatch; - Java_sun_nio_fs_LinuxWatchService_configureBlocking; - Java_sun_nio_fs_LinuxWatchService_socketpair; - Java_sun_nio_fs_LinuxWatchService_poll; - Java_sun_nio_fs_LinuxNativeDispatcher_init; - Java_sun_nio_fs_LinuxNativeDispatcher_fgetxattr0; - Java_sun_nio_fs_LinuxNativeDispatcher_flistxattr; - Java_sun_nio_fs_LinuxNativeDispatcher_fsetxattr0; - Java_sun_nio_fs_LinuxNativeDispatcher_fremovexattr0; - Java_sun_nio_fs_LinuxNativeDispatcher_setmntent0; - Java_sun_nio_fs_LinuxNativeDispatcher_getmntent; - Java_sun_nio_fs_LinuxNativeDispatcher_endmntent; - Java_sun_nio_fs_UnixNativeDispatcher_init; - Java_sun_nio_fs_UnixNativeDispatcher_getcwd; - Java_sun_nio_fs_UnixNativeDispatcher_strerror; - Java_sun_nio_fs_UnixNativeDispatcher_dup; - Java_sun_nio_fs_UnixNativeDispatcher_access0; - Java_sun_nio_fs_UnixNativeDispatcher_exists0; - Java_sun_nio_fs_UnixNativeDispatcher_stat0; - Java_sun_nio_fs_UnixNativeDispatcher_stat1; - Java_sun_nio_fs_UnixNativeDispatcher_lstat0; - Java_sun_nio_fs_UnixNativeDispatcher_fstat; - Java_sun_nio_fs_UnixNativeDispatcher_fstatat0; - Java_sun_nio_fs_UnixNativeDispatcher_chmod0; - Java_sun_nio_fs_UnixNativeDispatcher_fchmod; - Java_sun_nio_fs_UnixNativeDispatcher_chown0; - Java_sun_nio_fs_UnixNativeDispatcher_lchown0; - Java_sun_nio_fs_UnixNativeDispatcher_fchown; - Java_sun_nio_fs_UnixNativeDispatcher_utimes0; - Java_sun_nio_fs_UnixNativeDispatcher_futimes; - Java_sun_nio_fs_UnixNativeDispatcher_open0; - Java_sun_nio_fs_UnixNativeDispatcher_openat0; - Java_sun_nio_fs_UnixNativeDispatcher_close0; - Java_sun_nio_fs_UnixNativeDispatcher_read; - Java_sun_nio_fs_UnixNativeDispatcher_write; - Java_sun_nio_fs_UnixNativeDispatcher_fopen0; - Java_sun_nio_fs_UnixNativeDispatcher_fclose; - Java_sun_nio_fs_UnixNativeDispatcher_opendir0; - Java_sun_nio_fs_UnixNativeDispatcher_fdopendir; - Java_sun_nio_fs_UnixNativeDispatcher_readdir; - Java_sun_nio_fs_UnixNativeDispatcher_closedir; - Java_sun_nio_fs_UnixNativeDispatcher_link0; - Java_sun_nio_fs_UnixNativeDispatcher_unlink0; - Java_sun_nio_fs_UnixNativeDispatcher_unlinkat0; - Java_sun_nio_fs_UnixNativeDispatcher_rename0; - Java_sun_nio_fs_UnixNativeDispatcher_renameat0; - Java_sun_nio_fs_UnixNativeDispatcher_mkdir0; - Java_sun_nio_fs_UnixNativeDispatcher_rmdir0; - Java_sun_nio_fs_UnixNativeDispatcher_symlink0; - Java_sun_nio_fs_UnixNativeDispatcher_readlink0; - Java_sun_nio_fs_UnixNativeDispatcher_realpath0; - Java_sun_nio_fs_UnixNativeDispatcher_statvfs0; - Java_sun_nio_fs_UnixNativeDispatcher_pathconf0; - Java_sun_nio_fs_UnixNativeDispatcher_fpathconf; - Java_sun_nio_fs_UnixNativeDispatcher_mknod0; - Java_sun_nio_fs_UnixNativeDispatcher_getpwuid; - Java_sun_nio_fs_UnixNativeDispatcher_getgrgid; - Java_sun_nio_fs_UnixNativeDispatcher_getpwnam0; - Java_sun_nio_fs_UnixNativeDispatcher_getgrnam0; - Java_sun_nio_fs_UnixCopyFile_transfer; - handleSocketError; - - local: - *; -}; diff --git a/make/mapfiles/libnio/mapfile-macosx b/make/mapfiles/libnio/mapfile-macosx deleted file mode 100644 index 08f59083793..00000000000 --- a/make/mapfiles/libnio/mapfile-macosx +++ /dev/null @@ -1,186 +0,0 @@ -# -# Copyright (c) 2001, 2018, 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. -# - -SUNWprivate_1.1 { - global: - JNI_OnLoad; - Java_java_nio_MappedByteBuffer_force0; - Java_java_nio_MappedByteBuffer_isLoaded0; - Java_java_nio_MappedByteBuffer_load0; - Java_sun_nio_ch_DatagramChannelImpl_disconnect0; - Java_sun_nio_ch_DatagramChannelImpl_initIDs; - Java_sun_nio_ch_DatagramChannelImpl_receive0; - Java_sun_nio_ch_DatagramChannelImpl_send0; - Java_sun_nio_ch_DatagramDispatcher_read0; - Java_sun_nio_ch_DatagramDispatcher_readv0; - Java_sun_nio_ch_DatagramDispatcher_write0; - Java_sun_nio_ch_DatagramDispatcher_writev0; - Java_sun_nio_ch_FileChannelImpl_initIDs; - Java_sun_nio_ch_FileChannelImpl_map0; - Java_sun_nio_ch_FileChannelImpl_position0; - Java_sun_nio_ch_FileChannelImpl_transferTo0; - Java_sun_nio_ch_FileChannelImpl_unmap0; - Java_sun_nio_ch_FileDispatcherImpl_allocate0; - Java_sun_nio_ch_FileDispatcherImpl_close0; - Java_sun_nio_ch_FileDispatcherImpl_closeIntFD; - Java_sun_nio_ch_FileDispatcherImpl_force0; - Java_sun_nio_ch_FileDispatcherImpl_init; - Java_sun_nio_ch_FileDispatcherImpl_lock0; - Java_sun_nio_ch_FileDispatcherImpl_preClose0; - Java_sun_nio_ch_FileDispatcherImpl_pread0; - Java_sun_nio_ch_FileDispatcherImpl_pwrite0; - Java_sun_nio_ch_FileDispatcherImpl_read0; - Java_sun_nio_ch_FileDispatcherImpl_readv0; - Java_sun_nio_ch_FileDispatcherImpl_release0; - Java_sun_nio_ch_FileDispatcherImpl_size0; - Java_sun_nio_ch_FileDispatcherImpl_truncate0; - Java_sun_nio_ch_FileDispatcherImpl_write0; - Java_sun_nio_ch_FileDispatcherImpl_writev0; - Java_sun_nio_ch_FileKey_init; - Java_sun_nio_ch_FileKey_initIDs; - Java_sun_nio_ch_InheritedChannel_close0; - Java_sun_nio_ch_InheritedChannel_dup; - Java_sun_nio_ch_InheritedChannel_dup2; - Java_sun_nio_ch_InheritedChannel_initIDs; - Java_sun_nio_ch_InheritedChannel_open0; - Java_sun_nio_ch_InheritedChannel_peerAddress0; - Java_sun_nio_ch_InheritedChannel_peerPort0; - Java_sun_nio_ch_InheritedChannel_soType0; - Java_sun_nio_ch_IOUtil_configureBlocking; - Java_sun_nio_ch_IOUtil_drain; - Java_sun_nio_ch_IOUtil_fdVal; - Java_sun_nio_ch_IOUtil_fdLimit; - Java_sun_nio_ch_IOUtil_initIDs; - Java_sun_nio_ch_IOUtil_iovMax; - Java_sun_nio_ch_IOUtil_makePipe; - Java_sun_nio_ch_IOUtil_randomBytes; - Java_sun_nio_ch_IOUtil_setfdVal; - Java_sun_nio_ch_IOUtil_write1; - Java_sun_nio_ch_KQueue_create; - Java_sun_nio_ch_KQueue_register; - Java_sun_nio_ch_KQueue_poll; - Java_sun_nio_ch_KQueue_keventSize; - Java_sun_nio_ch_KQueue_identOffset; - Java_sun_nio_ch_KQueue_filterOffset; - Java_sun_nio_ch_KQueue_flagsOffset; - Java_sun_nio_ch_NativeThread_current; - Java_sun_nio_ch_NativeThread_init; - Java_sun_nio_ch_NativeThread_signal; - Java_sun_nio_ch_Net_canIPv6SocketJoinIPv4Group0; - Java_sun_nio_ch_Net_canJoin6WithIPv4Group0; - Java_sun_nio_ch_Net_socket0; - Java_sun_nio_ch_Net_bind0; - Java_sun_nio_ch_Net_connect0; - Java_sun_nio_ch_Net_listen; - Java_sun_nio_ch_Net_localPort; - Java_sun_nio_ch_Net_localInetAddress; - Java_sun_nio_ch_Net_getIntOption0; - Java_sun_nio_ch_Net_setIntOption0; - Java_sun_nio_ch_Net_initIDs; - Java_sun_nio_ch_Net_isIPv6Available0; - Java_sun_nio_ch_Net_isReusePortAvailable0; - Java_sun_nio_ch_Net_joinOrDrop4; - Java_sun_nio_ch_Net_blockOrUnblock4; - Java_sun_nio_ch_Net_joinOrDrop6; - Java_sun_nio_ch_Net_blockOrUnblock6; - Java_sun_nio_ch_Net_setInterface4; - Java_sun_nio_ch_Net_getInterface4; - Java_sun_nio_ch_Net_setInterface6; - Java_sun_nio_ch_Net_getInterface6; - Java_sun_nio_ch_Net_shutdown; - Java_sun_nio_ch_Net_poll; - Java_sun_nio_ch_Net_pollinValue; - Java_sun_nio_ch_Net_polloutValue; - Java_sun_nio_ch_Net_pollerrValue; - Java_sun_nio_ch_Net_pollhupValue; - Java_sun_nio_ch_Net_pollnvalValue; - Java_sun_nio_ch_Net_pollconnValue; - Java_sun_nio_ch_Net_isExclusiveBindAvailable; - Java_sun_nio_ch_PollArrayWrapper_interrupt; - Java_sun_nio_ch_PollArrayWrapper_poll0; - Java_sun_nio_ch_ServerSocketChannelImpl_accept0; - Java_sun_nio_ch_ServerSocketChannelImpl_initIDs; - Java_sun_nio_ch_SocketChannelImpl_checkConnect; - Java_sun_nio_ch_SocketChannelImpl_sendOutOfBandData; - Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_accept0; - Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs; - Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect; - Java_sun_nio_fs_BsdNativeDispatcher_initIDs; - Java_sun_nio_fs_BsdNativeDispatcher_getfsstat; - Java_sun_nio_fs_BsdNativeDispatcher_fsstatEntry; - Java_sun_nio_fs_BsdNativeDispatcher_endfsstat; - Java_sun_nio_fs_UnixNativeDispatcher_init; - Java_sun_nio_fs_UnixNativeDispatcher_getcwd; - Java_sun_nio_fs_UnixNativeDispatcher_strerror; - Java_sun_nio_fs_UnixNativeDispatcher_dup; - Java_sun_nio_fs_UnixNativeDispatcher_access0; - Java_sun_nio_fs_UnixNativeDispatcher_exists0; - Java_sun_nio_fs_UnixNativeDispatcher_stat0; - Java_sun_nio_fs_UnixNativeDispatcher_stat1; - Java_sun_nio_fs_UnixNativeDispatcher_lstat0; - Java_sun_nio_fs_UnixNativeDispatcher_fstat; - Java_sun_nio_fs_UnixNativeDispatcher_fstatat0; - Java_sun_nio_fs_UnixNativeDispatcher_chmod0; - Java_sun_nio_fs_UnixNativeDispatcher_fchmod; - Java_sun_nio_fs_UnixNativeDispatcher_chown0; - Java_sun_nio_fs_UnixNativeDispatcher_lchown0; - Java_sun_nio_fs_UnixNativeDispatcher_fchown; - Java_sun_nio_fs_UnixNativeDispatcher_utimes0; - Java_sun_nio_fs_UnixNativeDispatcher_futimes; - Java_sun_nio_fs_UnixNativeDispatcher_open0; - Java_sun_nio_fs_UnixNativeDispatcher_openat0; - Java_sun_nio_fs_UnixNativeDispatcher_close0; - Java_sun_nio_fs_UnixNativeDispatcher_read; - Java_sun_nio_fs_UnixNativeDispatcher_write; - Java_sun_nio_fs_UnixNativeDispatcher_fopen0; - Java_sun_nio_fs_UnixNativeDispatcher_fclose; - Java_sun_nio_fs_UnixNativeDispatcher_opendir0; - Java_sun_nio_fs_UnixNativeDispatcher_fdopendir; - Java_sun_nio_fs_UnixNativeDispatcher_readdir; - Java_sun_nio_fs_UnixNativeDispatcher_closedir; - Java_sun_nio_fs_UnixNativeDispatcher_link0; - Java_sun_nio_fs_UnixNativeDispatcher_unlink0; - Java_sun_nio_fs_UnixNativeDispatcher_unlinkat0; - Java_sun_nio_fs_UnixNativeDispatcher_rename0; - Java_sun_nio_fs_UnixNativeDispatcher_renameat0; - Java_sun_nio_fs_UnixNativeDispatcher_mkdir0; - Java_sun_nio_fs_UnixNativeDispatcher_rmdir0; - Java_sun_nio_fs_UnixNativeDispatcher_symlink0; - Java_sun_nio_fs_UnixNativeDispatcher_readlink0; - Java_sun_nio_fs_UnixNativeDispatcher_realpath0; - Java_sun_nio_fs_UnixNativeDispatcher_statvfs0; - Java_sun_nio_fs_UnixNativeDispatcher_pathconf0; - Java_sun_nio_fs_UnixNativeDispatcher_fpathconf; - Java_sun_nio_fs_UnixNativeDispatcher_mknod0; - Java_sun_nio_fs_UnixNativeDispatcher_getpwuid; - Java_sun_nio_fs_UnixNativeDispatcher_getgrgid; - Java_sun_nio_fs_UnixNativeDispatcher_getpwnam0; - Java_sun_nio_fs_UnixNativeDispatcher_getgrnam0; - Java_sun_nio_fs_UnixCopyFile_transfer; - handleSocketError; - - local: - *; -}; diff --git a/make/mapfiles/libnio/mapfile-solaris b/make/mapfiles/libnio/mapfile-solaris deleted file mode 100644 index dc53024cf3d..00000000000 --- a/make/mapfiles/libnio/mapfile-solaris +++ /dev/null @@ -1,196 +0,0 @@ -# -# Copyright (c) 2001, 2018, 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. -# - -SUNWprivate_1.1 { - global: - JNI_OnLoad; - Java_java_nio_MappedByteBuffer_force0; - Java_java_nio_MappedByteBuffer_isLoaded0; - Java_java_nio_MappedByteBuffer_load0; - Java_sun_nio_ch_DatagramChannelImpl_disconnect0; - Java_sun_nio_ch_DatagramChannelImpl_initIDs; - Java_sun_nio_ch_DatagramChannelImpl_receive0; - Java_sun_nio_ch_DatagramChannelImpl_send0; - Java_sun_nio_ch_DatagramDispatcher_read0; - Java_sun_nio_ch_DatagramDispatcher_readv0; - Java_sun_nio_ch_DatagramDispatcher_write0; - Java_sun_nio_ch_DatagramDispatcher_writev0; - Java_sun_nio_ch_DevPollArrayWrapper_init; - Java_sun_nio_ch_DevPollArrayWrapper_poll0; - Java_sun_nio_ch_DevPollArrayWrapper_register; - Java_sun_nio_ch_DevPollArrayWrapper_registerMultiple; - Java_sun_nio_ch_FileChannelImpl_initIDs; - Java_sun_nio_ch_FileChannelImpl_map0; - Java_sun_nio_ch_FileChannelImpl_position0; - Java_sun_nio_ch_FileChannelImpl_transferTo0; - Java_sun_nio_ch_FileChannelImpl_unmap0; - Java_sun_nio_ch_FileDispatcherImpl_allocate0; - Java_sun_nio_ch_FileDispatcherImpl_close0; - Java_sun_nio_ch_FileDispatcherImpl_closeIntFD; - Java_sun_nio_ch_FileDispatcherImpl_force0; - Java_sun_nio_ch_FileDispatcherImpl_init; - Java_sun_nio_ch_FileDispatcherImpl_lock0; - Java_sun_nio_ch_FileDispatcherImpl_preClose0; - Java_sun_nio_ch_FileDispatcherImpl_pread0; - Java_sun_nio_ch_FileDispatcherImpl_pwrite0; - Java_sun_nio_ch_FileDispatcherImpl_read0; - Java_sun_nio_ch_FileDispatcherImpl_readv0; - Java_sun_nio_ch_FileDispatcherImpl_release0; - Java_sun_nio_ch_FileDispatcherImpl_size0; - Java_sun_nio_ch_FileDispatcherImpl_truncate0; - Java_sun_nio_ch_FileDispatcherImpl_write0; - Java_sun_nio_ch_FileDispatcherImpl_writev0; - Java_sun_nio_ch_FileDispatcherImpl_setDirect0; - Java_sun_nio_ch_FileKey_init; - Java_sun_nio_ch_FileKey_initIDs; - Java_sun_nio_ch_InheritedChannel_close0; - Java_sun_nio_ch_InheritedChannel_dup; - Java_sun_nio_ch_InheritedChannel_dup2; - Java_sun_nio_ch_InheritedChannel_initIDs; - Java_sun_nio_ch_InheritedChannel_open0; - Java_sun_nio_ch_InheritedChannel_peerAddress0; - Java_sun_nio_ch_InheritedChannel_peerPort0; - Java_sun_nio_ch_InheritedChannel_soType0; - Java_sun_nio_ch_IOUtil_configureBlocking; - Java_sun_nio_ch_IOUtil_drain; - Java_sun_nio_ch_IOUtil_fdLimit; - Java_sun_nio_ch_IOUtil_fdVal; - Java_sun_nio_ch_IOUtil_initIDs; - Java_sun_nio_ch_IOUtil_iovMax; - Java_sun_nio_ch_IOUtil_makePipe; - Java_sun_nio_ch_IOUtil_randomBytes; - Java_sun_nio_ch_IOUtil_setfdVal; - Java_sun_nio_ch_IOUtil_write1; - Java_sun_nio_ch_NativeThread_current; - Java_sun_nio_ch_NativeThread_init; - Java_sun_nio_ch_NativeThread_signal; - Java_sun_nio_ch_Net_canIPv6SocketJoinIPv4Group0; - Java_sun_nio_ch_Net_canJoin6WithIPv4Group0; - Java_sun_nio_ch_Net_socket0; - Java_sun_nio_ch_Net_bind0; - Java_sun_nio_ch_Net_connect0; - Java_sun_nio_ch_Net_listen; - Java_sun_nio_ch_Net_localPort; - Java_sun_nio_ch_Net_localInetAddress; - Java_sun_nio_ch_Net_getIntOption0; - Java_sun_nio_ch_Net_setIntOption0; - Java_sun_nio_ch_Net_initIDs; - Java_sun_nio_ch_Net_isIPv6Available0; - Java_sun_nio_ch_Net_isReusePortAvailable0; - Java_sun_nio_ch_Net_joinOrDrop4; - Java_sun_nio_ch_Net_blockOrUnblock4; - Java_sun_nio_ch_Net_joinOrDrop6; - Java_sun_nio_ch_Net_blockOrUnblock6; - Java_sun_nio_ch_Net_setInterface4; - Java_sun_nio_ch_Net_getInterface4; - Java_sun_nio_ch_Net_setInterface6; - Java_sun_nio_ch_Net_getInterface6; - Java_sun_nio_ch_Net_shutdown; - Java_sun_nio_ch_Net_poll; - Java_sun_nio_ch_Net_pollinValue; - Java_sun_nio_ch_Net_polloutValue; - Java_sun_nio_ch_Net_pollerrValue; - Java_sun_nio_ch_Net_pollhupValue; - Java_sun_nio_ch_Net_pollnvalValue; - Java_sun_nio_ch_Net_pollconnValue; - Java_sun_nio_ch_Net_isExclusiveBindAvailable; - Java_sun_nio_ch_PollArrayWrapper_interrupt; - Java_sun_nio_ch_PollArrayWrapper_poll0; - Java_sun_nio_ch_ServerSocketChannelImpl_accept0; - Java_sun_nio_ch_ServerSocketChannelImpl_initIDs; - Java_sun_nio_ch_SocketChannelImpl_checkConnect; - Java_sun_nio_ch_SocketChannelImpl_sendOutOfBandData; - Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_accept0; - Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs; - Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect; - Java_sun_nio_ch_SolarisEventPort_port_1create; - Java_sun_nio_ch_SolarisEventPort_port_1close; - Java_sun_nio_ch_SolarisEventPort_port_1associate; - Java_sun_nio_ch_SolarisEventPort_port_1dissociate; - Java_sun_nio_ch_SolarisEventPort_port_1get; - Java_sun_nio_ch_SolarisEventPort_port_1getn; - Java_sun_nio_ch_SolarisEventPort_port_1send; - Java_sun_nio_fs_UnixNativeDispatcher_init; - Java_sun_nio_fs_UnixNativeDispatcher_getcwd; - Java_sun_nio_fs_UnixNativeDispatcher_strerror; - Java_sun_nio_fs_UnixNativeDispatcher_dup; - Java_sun_nio_fs_UnixNativeDispatcher_access0; - Java_sun_nio_fs_UnixNativeDispatcher_exists0; - Java_sun_nio_fs_UnixNativeDispatcher_stat0; - Java_sun_nio_fs_UnixNativeDispatcher_stat1; - Java_sun_nio_fs_UnixNativeDispatcher_lstat0; - Java_sun_nio_fs_UnixNativeDispatcher_fstat; - Java_sun_nio_fs_UnixNativeDispatcher_fstatat0; - Java_sun_nio_fs_UnixNativeDispatcher_chmod0; - Java_sun_nio_fs_UnixNativeDispatcher_fchmod; - Java_sun_nio_fs_UnixNativeDispatcher_chown0; - Java_sun_nio_fs_UnixNativeDispatcher_lchown0; - Java_sun_nio_fs_UnixNativeDispatcher_fchown; - Java_sun_nio_fs_UnixNativeDispatcher_utimes0; - Java_sun_nio_fs_UnixNativeDispatcher_futimes; - Java_sun_nio_fs_UnixNativeDispatcher_open0; - Java_sun_nio_fs_UnixNativeDispatcher_openat0; - Java_sun_nio_fs_UnixNativeDispatcher_close0; - Java_sun_nio_fs_UnixNativeDispatcher_read; - Java_sun_nio_fs_UnixNativeDispatcher_write; - Java_sun_nio_fs_UnixNativeDispatcher_fopen0; - Java_sun_nio_fs_UnixNativeDispatcher_fclose; - Java_sun_nio_fs_UnixNativeDispatcher_opendir0; - Java_sun_nio_fs_UnixNativeDispatcher_fdopendir; - Java_sun_nio_fs_UnixNativeDispatcher_readdir; - Java_sun_nio_fs_UnixNativeDispatcher_closedir; - Java_sun_nio_fs_UnixNativeDispatcher_link0; - Java_sun_nio_fs_UnixNativeDispatcher_unlink0; - Java_sun_nio_fs_UnixNativeDispatcher_unlinkat0; - Java_sun_nio_fs_UnixNativeDispatcher_rename0; - Java_sun_nio_fs_UnixNativeDispatcher_renameat0; - Java_sun_nio_fs_UnixNativeDispatcher_mkdir0; - Java_sun_nio_fs_UnixNativeDispatcher_rmdir0; - Java_sun_nio_fs_UnixNativeDispatcher_symlink0; - Java_sun_nio_fs_UnixNativeDispatcher_readlink0; - Java_sun_nio_fs_UnixNativeDispatcher_realpath0; - Java_sun_nio_fs_UnixNativeDispatcher_statvfs0; - Java_sun_nio_fs_UnixNativeDispatcher_pathconf0; - Java_sun_nio_fs_UnixNativeDispatcher_fpathconf; - Java_sun_nio_fs_UnixNativeDispatcher_mknod0; - Java_sun_nio_fs_UnixNativeDispatcher_getpwuid; - Java_sun_nio_fs_UnixNativeDispatcher_getgrgid; - Java_sun_nio_fs_UnixNativeDispatcher_getpwnam0; - Java_sun_nio_fs_UnixNativeDispatcher_getgrnam0; - Java_sun_nio_fs_UnixCopyFile_transfer; - Java_sun_nio_fs_SolarisNativeDispatcher_init; - Java_sun_nio_fs_SolarisNativeDispatcher_facl; - Java_sun_nio_fs_SolarisNativeDispatcher_getextmntent; - Java_sun_nio_fs_SolarisWatchService_init; - Java_sun_nio_fs_SolarisWatchService_portCreate; - Java_sun_nio_fs_SolarisWatchService_portAssociate; - Java_sun_nio_fs_SolarisWatchService_portDissociate; - Java_sun_nio_fs_SolarisWatchService_portSend; - Java_sun_nio_fs_SolarisWatchService_portGetn; - handleSocketError; - - local: - *; -}; diff --git a/make/mapfiles/libnio/reorder-sparc b/make/mapfiles/libnio/reorder-sparc deleted file mode 100644 index 621b6c45ca2..00000000000 --- a/make/mapfiles/libnio/reorder-sparc +++ /dev/null @@ -1,12 +0,0 @@ -data = R0x2000; -text = LOAD ?RXO; -# Test Null -# Test Exit -# Test Hello -# Test Sleep -# Test IntToString -# Test LoadToolkit -# Test LoadFrame -# Test LoadJFrame -# Test JHello -# SwingSet diff --git a/make/mapfiles/libnio/reorder-sparcv9 b/make/mapfiles/libnio/reorder-sparcv9 deleted file mode 100644 index b1ef113c1d9..00000000000 --- a/make/mapfiles/libnio/reorder-sparcv9 +++ /dev/null @@ -1,17 +0,0 @@ -data = R0x2000; -text = LOAD ?RXO; -# Test Null -# Test Exit -# Test Hello -# Test Sleep -# Test IntToString -# Test LoadToolkit -text: .text%Java_sun_nio_ch_FileChannelImpl_initIDs; -text: .text%Java_sun_nio_ch_FileDispatcher_initIDs; -text: .text%Java_sun_nio_ch_IOUtil_initIDs; -text: .text%Java_sun_nio_ch_FileDispatcher_read0; -text: .text%convertReturnVal; -# Test LoadFrame -# Test LoadJFrame -# Test JHello -# SwingSet diff --git a/make/mapfiles/libnio/reorder-x86 b/make/mapfiles/libnio/reorder-x86 deleted file mode 100644 index b1ef113c1d9..00000000000 --- a/make/mapfiles/libnio/reorder-x86 +++ /dev/null @@ -1,17 +0,0 @@ -data = R0x2000; -text = LOAD ?RXO; -# Test Null -# Test Exit -# Test Hello -# Test Sleep -# Test IntToString -# Test LoadToolkit -text: .text%Java_sun_nio_ch_FileChannelImpl_initIDs; -text: .text%Java_sun_nio_ch_FileDispatcher_initIDs; -text: .text%Java_sun_nio_ch_IOUtil_initIDs; -text: .text%Java_sun_nio_ch_FileDispatcher_read0; -text: .text%convertReturnVal; -# Test LoadFrame -# Test LoadJFrame -# Test JHello -# SwingSet diff --git a/make/mapfiles/libprefs/mapfile-vers b/make/mapfiles/libprefs/mapfile-vers deleted file mode 100644 index 395d175080b..00000000000 --- a/make/mapfiles/libprefs/mapfile-vers +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright (c) 2014, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - Java_java_util_prefs_FileSystemPreferences_chmod; - Java_java_util_prefs_FileSystemPreferences_lockFile0; - Java_java_util_prefs_FileSystemPreferences_unlockFile0; - - local: - *; -}; diff --git a/make/mapfiles/librmi/mapfile-vers b/make/mapfiles/librmi/mapfile-vers deleted file mode 100644 index af060c62331..00000000000 --- a/make/mapfiles/librmi/mapfile-vers +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (c) 2016, 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. -# - -SUNWprivate_1.1 { - global: - Java_sun_rmi_transport_GC_maxObjectInspectionAge; - local: - *; -}; diff --git a/make/mapfiles/libsaproc/mapfile-linux b/make/mapfiles/libsaproc/mapfile-linux deleted file mode 100644 index d81696d4db4..00000000000 --- a/make/mapfiles/libsaproc/mapfile-linux +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright (c) 2003, 2012, 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. -# -# 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - - # native methods of LinuxDebuggerLocal class - Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_init0; - Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getAddressSize; - Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_attach0__I; - Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_attach0__Ljava_lang_String_2Ljava_lang_String_2; - Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_detach0; - Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_lookupByName0; - Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_lookupByAddress0; - Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_readBytesFromProcess0; - Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0; - - # Disassembler interface - Java_sun_jvm_hotspot_asm_Disassembler_decode; - Java_sun_jvm_hotspot_asm_Disassembler_load_1library; - - # proc_service.h functions - to be used by libthread_db - ps_getpid; - ps_pglobal_lookup; - ps_pdread; - ps_pdwrite; - ps_lsetfpregs; - ps_lsetregs; - ps_lgetfpregs; - ps_lgetregs; - ps_get_thread_area; - - # used by attach test program - init_libproc; - Pgrab; - Pgrab_core; - Prelease; - - local: - *; -}; diff --git a/make/mapfiles/libsaproc/mapfile-macosx b/make/mapfiles/libsaproc/mapfile-macosx deleted file mode 100644 index 36b4334f03b..00000000000 --- a/make/mapfiles/libsaproc/mapfile-macosx +++ /dev/null @@ -1,66 +0,0 @@ -# - -# -# Copyright (c) 2003, 2006, 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. -# -# 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. -# -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - - # native methods of BsdDebuggerLocal class - Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_init0; - Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getAddressSize; - Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_attach0__I; - Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_attach0__Ljava_lang_String_2Ljava_lang_String_2; - Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_detach0; - Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_lookupByName0; - Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_lookupByAddress0; - Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_readBytesFromProcess0; - Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getThreadIntegerRegisterSet0; - - # proc_service.h functions - to be used by libthread_db - ps_getpid; - ps_pglobal_lookup; - ps_pread; - ps_pwrite; - ps_lsetfpregs; - ps_lsetregs; - ps_lgetfpregs; - ps_lgetregs; - ps_lcontinue; - ps_lgetxmmregs; - ps_lsetxmmregs; - ps_lstop; - ps_linfo; - - # used by attach test program - init_libproc; - Pgrab; - Pgrab_core; - Prelease; - - local: - *; -}; diff --git a/make/mapfiles/libsaproc/mapfile-solaris b/make/mapfiles/libsaproc/mapfile-solaris deleted file mode 100644 index 2144c48ed0b..00000000000 --- a/make/mapfiles/libsaproc/mapfile-solaris +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (c) 2003, 2012, 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. -# -# 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. -# - -# Define public interface. -SUNWprivate_1.1 { - global: - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_attach0__Ljava_lang_String_2; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_attach0__Ljava_lang_String_2Ljava_lang_String_2; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_demangle0; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_detach0; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_fillCFrameList0; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_fillLoadObjectList0; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_fillThreadList0; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_getPageSize0; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_getRemoteProcessAddressSize0; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_getThreadIntegerRegisterSet0; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_initIDs; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_lookupByAddress0; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_lookupByName0; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_readBytesFromProcess0; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_resume0; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_suspend0; - Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_writeBytesToProcess0; - # this is needed by saproc_audit.c to redirect opens in libproc.so - libsaproc_open; - # Disassembler interface - Java_sun_jvm_hotspot_asm_Disassembler_decode; - Java_sun_jvm_hotspot_asm_Disassembler_load_1library; - local: - *; -}; diff --git a/make/mapfiles/libsctp/mapfile-vers b/make/mapfiles/libsctp/mapfile-vers deleted file mode 100644 index 362a5e44ee4..00000000000 --- a/make/mapfiles/libsctp/mapfile-vers +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright (c) 2009, 2013, 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. -# - -SUNWprivate_1.1 { - global: - Java_sun_nio_ch_sctp_SctpNet_init; - Java_sun_nio_ch_sctp_SctpNet_socket0; - Java_sun_nio_ch_sctp_SctpNet_bindx; - Java_sun_nio_ch_sctp_SctpNet_branch0; - Java_sun_nio_ch_sctp_SctpNet_listen0; - Java_sun_nio_ch_sctp_SctpNet_connect0; - Java_sun_nio_ch_sctp_SctpNet_close0; - Java_sun_nio_ch_sctp_SctpNet_preClose0; - Java_sun_nio_ch_sctp_SctpNet_getLocalAddresses0; - Java_sun_nio_ch_sctp_SctpNet_getRemoteAddresses0; - Java_sun_nio_ch_sctp_SctpNet_getPrimAddrOption0; - Java_sun_nio_ch_sctp_SctpNet_setPrimAddrOption0; - Java_sun_nio_ch_sctp_SctpNet_setPeerPrimAddrOption0; - Java_sun_nio_ch_sctp_SctpNet_getInitMsgOption0; - Java_sun_nio_ch_sctp_SctpNet_setInitMsgOption0; - Java_sun_nio_ch_sctp_SctpNet_getIntOption0; - Java_sun_nio_ch_sctp_SctpNet_setIntOption0; - Java_sun_nio_ch_sctp_SctpNet_shutdown0; - Java_sun_nio_ch_sctp_SctpChannelImpl_initIDs; - Java_sun_nio_ch_sctp_SctpChannelImpl_checkConnect; - Java_sun_nio_ch_sctp_SctpChannelImpl_receive0; - Java_sun_nio_ch_sctp_SctpChannelImpl_send0; - Java_sun_nio_ch_sctp_SctpServerChannelImpl_initIDs; - Java_sun_nio_ch_sctp_SctpServerChannelImpl_accept0; - JNI_OnLoad; - local: - *; -}; diff --git a/make/mapfiles/libsplashscreen/mapfile-vers b/make/mapfiles/libsplashscreen/mapfile-vers deleted file mode 100644 index 088cb4d2896..00000000000 --- a/make/mapfiles/libsplashscreen/mapfile-vers +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (c) 2005, 2013, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - Java_java_awt_SplashScreen__1update; - Java_java_awt_SplashScreen__1isVisible; - Java_java_awt_SplashScreen__1getBounds; - Java_java_awt_SplashScreen__1getInstance; - Java_java_awt_SplashScreen__1close; - Java_java_awt_SplashScreen__1getImageFileName; - Java_java_awt_SplashScreen__1getImageJarName; - Java_java_awt_SplashScreen__1setImageData; - Java_java_awt_SplashScreen__1getScaleFactor; - - SplashLoadMemory; - SplashLoadFile; - SplashInit; - SplashClose; - SplashSetFileJarName; - SplashSetScaleFactor; - SplashGetScaledImageName; - SplashGetScaledImgNameMaxPstfixLen; - local: - *; -}; diff --git a/make/mapfiles/libsunec/mapfile-vers b/make/mapfiles/libsunec/mapfile-vers deleted file mode 100644 index 7ba855202cd..00000000000 --- a/make/mapfiles/libsunec/mapfile-vers +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright (c) 2009, 2017, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - Java_sun_security_ec_ECKeyPairGenerator_isCurveSupported; - Java_sun_security_ec_ECKeyPairGenerator_generateECKeyPair; - Java_sun_security_ec_ECDSASignature_signDigest; - Java_sun_security_ec_ECDSASignature_verifySignedDigest; - Java_sun_security_ec_ECDHKeyAgreement_deriveKey; - local: - *; -}; diff --git a/make/mapfiles/libunpack/mapfile-vers b/make/mapfiles/libunpack/mapfile-vers deleted file mode 100644 index 8f5f41b5563..00000000000 --- a/make/mapfiles/libunpack/mapfile-vers +++ /dev/null @@ -1,40 +0,0 @@ - -# -# Copyright (c) 2005, 2013, 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. -# - -# Define library interface. - -SUNWprivate_1.1 { - global: - Java_com_sun_java_util_jar_pack_NativeUnpack_finish; - Java_com_sun_java_util_jar_pack_NativeUnpack_getNextFile; - Java_com_sun_java_util_jar_pack_NativeUnpack_getOption; - Java_com_sun_java_util_jar_pack_NativeUnpack_getUnusedInput; - Java_com_sun_java_util_jar_pack_NativeUnpack_initIDs; - Java_com_sun_java_util_jar_pack_NativeUnpack_setOption; - Java_com_sun_java_util_jar_pack_NativeUnpack_start; - local: - *; -}; diff --git a/make/mapfiles/libverify/mapfile-vers b/make/mapfiles/libverify/mapfile-vers deleted file mode 100644 index 1af978dfdea..00000000000 --- a/make/mapfiles/libverify/mapfile-vers +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (c) 2000, 2013, 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. -# - -SUNWprivate_1.1 { - global: - VerifyClass; - VerifyClassForMajorVersion; - VerifyClassname; - VerifyFixClassname; - local: - *; -}; diff --git a/make/mapfiles/libverify/reorder-sparc b/make/mapfiles/libverify/reorder-sparc deleted file mode 100644 index 58056cfe1a6..00000000000 --- a/make/mapfiles/libverify/reorder-sparc +++ /dev/null @@ -1,44 +0,0 @@ -data = R0x2000; -text = LOAD ?RXO; -# Test Null -text: .text%VerifyFixClassname; -text: .text%VerifyClassname; -text: .text%skip_over_fieldname: OUTPUTDIR/check_format.o; -text: .text%VerifyClass; -text: .text%CCinit: OUTPUTDIR/check_code.o; -text: .text%initialize_class_hash; -text: .text%make_class_info_from_name: OUTPUTDIR/check_code.o; -text: .text%make_class_info: OUTPUTDIR/check_code.o; -text: .text%verify_method: OUTPUTDIR/check_code.o; -text: .text%instruction_length: OUTPUTDIR/check_code.o; -text: .text%verify_opcode_operands: OUTPUTDIR/check_code.o; -text: .text%initialize_exception_table: OUTPUTDIR/check_code.o; -text: .text%initialize_dataflow: OUTPUTDIR/check_code.o; -text: .text%signature_to_fieldtype: OUTPUTDIR/check_code.o; -text: .text%check_register_values: OUTPUTDIR/check_code.o; -text: .text%pop_stack: OUTPUTDIR/check_code.o; -text: .text%update_registers: OUTPUTDIR/check_code.o; -text: .text%push_stack: OUTPUTDIR/check_code.o; -text: .text%merge_into_successors: OUTPUTDIR/check_code.o; -text: .text%pop_and_free: OUTPUTDIR/check_code.o; -text: .text%cp_index_to_class_fullinfo: OUTPUTDIR/check_code.o; -text: .text%set_protected: OUTPUTDIR/check_code.o; -text: .text%merge_into_one_successor: OUTPUTDIR/check_code.o; -text: .text%merge_stack: OUTPUTDIR/check_code.o; -text: .text%merge_registers: OUTPUTDIR/check_code.o; -text: .text%finalize_class_hash: OUTPUTDIR/check_code.o; -text: .text%CCdestroy: OUTPUTDIR/check_code.o; -# Test Exit -# Test Hello -text: .text%merge_fullinfo_types: OUTPUTDIR/check_code.o; -# Test Sleep -# Test IntToString -# Test LoadToolkit -# Test LoadFrame -text: .text%verify_constant_pool_type: OUTPUTDIR/check_code.o; -# Test LoadJFrame -# Test JHello -# SwingSet -text: .text%verify_field: OUTPUTDIR/check_code.o; -text: .text%check_and_push: OUTPUTDIR/check_code.o; -text: .text%signature_to_args_size: OUTPUTDIR/check_code.o; diff --git a/make/mapfiles/libverify/reorder-sparcv9 b/make/mapfiles/libverify/reorder-sparcv9 deleted file mode 100644 index c0185f66769..00000000000 --- a/make/mapfiles/libverify/reorder-sparcv9 +++ /dev/null @@ -1,45 +0,0 @@ -data = R0x2000; -text = LOAD ?RXO; -# Test Null -text: .text%VerifyFixClassname; -text: .text%next_utf2unicode: OUTPUTDIR/check_format.o; -text: .text%VerifyClassname; -text: .text%skip_over_fieldname: OUTPUTDIR/check_format.o; -text: .text%VerifyClass; -text: .text%CCinit: OUTPUTDIR/check_code.o; -text: .text%initialize_class_hash; -text: .text%make_class_info_from_name: OUTPUTDIR/check_code.o; -text: .text%make_class_info: OUTPUTDIR/check_code.o; -text: .text%verify_method: OUTPUTDIR/check_code.o; -text: .text%instruction_length: OUTPUTDIR/check_code.o; -text: .text%verify_opcode_operands: OUTPUTDIR/check_code.o; -text: .text%verify_constant_pool_type: OUTPUTDIR/check_code.o; -text: .text%cp_index_to_class_fullinfo: OUTPUTDIR/check_code.o; -text: .text%check_and_push: OUTPUTDIR/check_code.o; -text: .text%pop_and_free: OUTPUTDIR/check_code.o; -text: .text%set_protected: OUTPUTDIR/check_code.o; -text: .text%initialize_exception_table: OUTPUTDIR/check_code.o; -text: .text%merge_fullinfo_types: OUTPUTDIR/check_code.o; -text: .text%initialize_dataflow: OUTPUTDIR/check_code.o; -text: .text%signature_to_fieldtype: OUTPUTDIR/check_code.o; -text: .text%check_register_values: OUTPUTDIR/check_code.o; -text: .text%pop_stack: OUTPUTDIR/check_code.o; -text: .text%update_registers: OUTPUTDIR/check_code.o; -text: .text%push_stack: OUTPUTDIR/check_code.o; -text: .text%merge_into_successors: OUTPUTDIR/check_code.o; -text: .text%merge_into_one_successor: OUTPUTDIR/check_code.o; -text: .text%merge_stack: OUTPUTDIR/check_code.o; -text: .text%merge_registers: OUTPUTDIR/check_code.o; -text: .text%finalize_class_hash: OUTPUTDIR/check_code.o; -text: .text%CCdestroy: OUTPUTDIR/check_code.o; -# Test Exit -# Test Hello -# Test Sleep -# Test IntToString -# Test LoadToolkit -# Test LoadFrame -# Test LoadJFrame -# Test JHello -# SwingSet -text: .text%verify_field: OUTPUTDIR/check_code.o; -text: .text%signature_to_args_size: OUTPUTDIR/check_code.o; diff --git a/make/mapfiles/libverify/reorder-x86 b/make/mapfiles/libverify/reorder-x86 deleted file mode 100644 index 72f02543150..00000000000 --- a/make/mapfiles/libverify/reorder-x86 +++ /dev/null @@ -1,40 +0,0 @@ -data = R0x2000; -text = LOAD ?RXO; -# Test Null -text: .text%VerifyFixClassname; -text: .text%VerifyClassname; -text: .text%skip_over_fieldname: OUTPUTDIR/check_format.o; -text: .text%skip_over_field_signature: OUTPUTDIR/check_format.o; -text: .text%VerifyClass; -text: .text%make_class_info_from_name: OUTPUTDIR/check_code.o; -text: .text%class_name_to_ID: OUTPUTDIR/check_code.o; -text: .text%make_class_info: OUTPUTDIR/check_code.o; -text: .text%free_block: OUTPUTDIR/check_code.o; -text: .text%verify_method: OUTPUTDIR/check_code.o; -text: .text%verify_opcode_operands: OUTPUTDIR/check_code.o; -text: .text%initialize_dataflow: OUTPUTDIR/check_code.o; -text: .text%signature_to_fieldtype: OUTPUTDIR/check_code.o; -text: .text%check_register_values: OUTPUTDIR/check_code.o; -text: .text%pop_stack: OUTPUTDIR/check_code.o; -text: .text%update_registers: OUTPUTDIR/check_code.o; -text: .text%push_stack: OUTPUTDIR/check_code.o; -text: .text%merge_into_successors: OUTPUTDIR/check_code.o; -text: .text%cp_index_to_class_fullinfo: OUTPUTDIR/check_code.o; -text: .text%set_protected: OUTPUTDIR/check_code.o; -text: .text%merge_into_one_successor: OUTPUTDIR/check_code.o; -text: .text%merge_registers: OUTPUTDIR/check_code.o; -# Test Exit -# Test Hello -text: .text%merge_fullinfo_types: OUTPUTDIR/check_code.o; -text: .text%isAssignableTo: OUTPUTDIR/check_code.o; -# Test Sleep -text: .text%isLegalTarget: OUTPUTDIR/check_code.o; -text: .text%verify_constant_pool_type: OUTPUTDIR/check_code.o; -# Test IntToString -# Test LoadToolkit -# Test LoadFrame -# Test LoadJFrame -# Test JHello -# SwingSet -text: .text%copy_stack: OUTPUTDIR/check_code.o; -text: .text%ntohl: OUTPUTDIR/check_code.o; diff --git a/make/mapfiles/libzip/mapfile-vers b/make/mapfiles/libzip/mapfile-vers deleted file mode 100644 index d711d8e17f4..00000000000 --- a/make/mapfiles/libzip/mapfile-vers +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (c) 1997, 2016, 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. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - Java_java_util_zip_Adler32_update; - Java_java_util_zip_Adler32_updateBytes; - Java_java_util_zip_Adler32_updateByteBuffer; - Java_java_util_zip_CRC32_update; - Java_java_util_zip_CRC32_updateBytes0; - Java_java_util_zip_CRC32_updateByteBuffer0; - Java_java_util_zip_Deflater_deflateBytes; - Java_java_util_zip_Deflater_end; - Java_java_util_zip_Deflater_getAdler; - Java_java_util_zip_Deflater_init; - Java_java_util_zip_Deflater_initIDs; - Java_java_util_zip_Deflater_reset; - Java_java_util_zip_Deflater_setDictionary; - Java_java_util_zip_Inflater_end; - Java_java_util_zip_Inflater_getAdler; - Java_java_util_zip_Inflater_inflateBytes; - Java_java_util_zip_Inflater_init; - Java_java_util_zip_Inflater_initIDs; - Java_java_util_zip_Inflater_reset; - Java_java_util_zip_Inflater_setDictionary; - ZIP_Close; - ZIP_CRC32; - ZIP_FreeEntry; - ZIP_FindEntry; - ZIP_GetEntry; - ZIP_GetNextEntry; - ZIP_InflateFully; - ZIP_Lock; - ZIP_Open; - ZIP_Read; - ZIP_ReadEntry; - ZIP_Unlock; - - local: - *; -}; diff --git a/make/mapfiles/libzip/reorder-sparc b/make/mapfiles/libzip/reorder-sparc deleted file mode 100644 index 63b2ad6fc28..00000000000 --- a/make/mapfiles/libzip/reorder-sparc +++ /dev/null @@ -1,29 +0,0 @@ -data = R0x2000; -text = LOAD ?RXO; -# Test Null -text: .text%ZIP_Open; -text: .text%ZIP_Open_Generic; -text: .text%InitializeZip; -text: .text%allocZip; -text: .text%readCEN: OUTPUTDIR/zip_util.o; -text: .text%findEND: OUTPUTDIR/zip_util.o; -text: .text%hash: OUTPUTDIR/zip_util.o; -text: .text%isMetaName: OUTPUTDIR/zip_util.o; -text: .text%addMetaName: OUTPUTDIR/zip_util.o; -text: .text%ZIP_FindEntry; -text: .text%ZIP_GetEntry; -text: .text%ZIP_InflateFully; -text: .text%ZIP_Lock; -text: .text%ZIP_Unlock; -text: .text%ZIP_FreeEntry; -text: .text%Java_java_util_zip_Inflater_initIDs; -text: .text%Java_java_util_zip_Inflater_init; -text: .text%inflateInit2_; -text: .text%zcalloc; -text: .text%Java_java_util_zip_Inflater_inflateBytes; -text: .text%ZIP_Read; -text: .text%zcfree; -text: .text%Java_java_util_zip_Inflater_reset; -text: .text%Java_java_util_zip_Inflater_end; -text: .text%inflateEnd; -text: .text%ZIP_Close; diff --git a/make/mapfiles/libzip/reorder-sparcv9 b/make/mapfiles/libzip/reorder-sparcv9 deleted file mode 100644 index caca118de98..00000000000 --- a/make/mapfiles/libzip/reorder-sparcv9 +++ /dev/null @@ -1,33 +0,0 @@ -data = R0x2000; -text = LOAD ?RXO; -text: .text%ZIP_Open; -text: .text%ZIP_Open_Generic; -text: .text%InitializeZip; -text: .text%allocZip; -text: .text%readCEN: OUTPUTDIR/zip_util.o; -text: .text%findEND: OUTPUTDIR/zip_util.o; -text: .text%hash: OUTPUTDIR/zip_util.o; -text: .text%isMetaName: OUTPUTDIR/zip_util.o; -text: .text%addMetaName: OUTPUTDIR/zip_util.o; -text: .text%ZIP_FindEntry; -text: .text%ZIP_GetEntry; -text: .text%ZIP_InflateFully; -text: .text%ZIP_Lock; -text: .text%ZIP_Unlock; -text: .text%ZIP_FreeEntry; -text: .text%Java_java_util_zip_Inflater_initIDs; -text: .text%Java_java_util_zip_Inflater_init; -text: .text%inflateInit2_; -text: .text%zcalloc; -text: .text%inflateReset; -text: .text%Java_java_util_zip_Inflater_inflateBytes; -text: .text%inflate; -text: .text%ZIP_Read; -text: .text%zcfree; -text: .text%Java_java_util_jar_JarFile_getMetaInfEntryNames; -text: .text%ZIP_ReadEntry; -text: .text%InflateFully; -text: .text%inflateEnd; -text: .text%Java_java_util_zip_Inflater_reset; -text: .text%ZIP_Close; -text: .text%Java_java_util_zip_Inflater_end; diff --git a/make/mapfiles/libzip/reorder-x86 b/make/mapfiles/libzip/reorder-x86 deleted file mode 100644 index dfd57c7752e..00000000000 --- a/make/mapfiles/libzip/reorder-x86 +++ /dev/null @@ -1,31 +0,0 @@ -data = R0x2000; -text = LOAD ?RXO; -# Test Null -text: .text%ZIP_Open; -text: .text%ZIP_Open_Generic; -text: .text%InitializeZip; -text: .text%allocZip; -text: .text%readCEN: OUTPUTDIR/zip_util.o; -text: .text%findEND: OUTPUTDIR/zip_util.o; -text: .text%hash: OUTPUTDIR/zip_util.o; -text: .text%isMetaName: OUTPUTDIR/zip_util.o; -text: .text%addMetaName: OUTPUTDIR/zip_util.o; -text: .text%ZIP_FindEntry; -text: .text%ZIP_GetEntry; -text: .text%ZIP_InflateFully; -text: .text%ZIP_Lock; -text: .text%ZIP_Unlock; -text: .text%ZIP_FreeEntry; -text: .text%inflateInit2_; -text: .text%zcalloc; -text: .text%inflateReset; -text: .text%Java_java_util_zip_Inflater_inflateBytes; -text: .text%inflate; -text: .text%ZIP_Read; -text: .text%zcfree; -text: .text%ZIP_ReadEntry; -text: .text%InflateFully; -text: .text%inflateEnd; -text: .text%Java_java_util_zip_Inflater_reset; -text: .text%ZIP_Close; -text: .text%Java_java_util_zip_Inflater_end; diff --git a/src/bsd/doc/man/ja/javah.1 b/src/bsd/doc/man/ja/javah.1 deleted file mode 100644 index 0e9fe0cf06c..00000000000 --- a/src/bsd/doc/man/ja/javah.1 +++ /dev/null @@ -1,24 +0,0 @@ -." Copyright (c) 1994, 2012, 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. -." -." 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. -." -.TH javah 1 "07 May 2011" - -.LP diff --git a/src/bsd/doc/man/java.1 b/src/bsd/doc/man/java.1 index b75bcf1a6e2..6c7121fddc3 100644 --- a/src/bsd/doc/man/java.1 +++ b/src/bsd/doc/man/java.1 @@ -3713,17 +3713,6 @@ jdb(1) .sp -1 .IP \(bu 2.3 .\} -javah(1) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} jar(1) .RE .sp diff --git a/src/bsd/doc/man/javac.1 b/src/bsd/doc/man/javac.1 index 62ef22d2782..39a8c9f1e96 100644 --- a/src/bsd/doc/man/javac.1 +++ b/src/bsd/doc/man/javac.1 @@ -1353,9 +1353,6 @@ java(1) jdb(1) .TP 0.2i \(bu -javah(1) -.TP 0.2i -\(bu javadoc(1) .TP 0.2i \(bu diff --git a/src/bsd/doc/man/javadoc.1 b/src/bsd/doc/man/javadoc.1 index 202bd989f22..2528308ecfd 100644 --- a/src/bsd/doc/man/javadoc.1 +++ b/src/bsd/doc/man/javadoc.1 @@ -2978,9 +2978,6 @@ java(1) jdb(1) .TP 0.2i \(bu -javah(1) -.TP 0.2i -\(bu javap(1) .SH RELATED\ DOCUMENTS .TP 0.2i diff --git a/src/bsd/doc/man/javah.1 b/src/bsd/doc/man/javah.1 deleted file mode 100644 index 4074c9954ba..00000000000 --- a/src/bsd/doc/man/javah.1 +++ /dev/null @@ -1,158 +0,0 @@ -'\" t -.\" Copyright (c) 1994, 2013, 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. -.\" -.\" 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. -.\" -.\" Arch: generic -.\" Software: JDK 8 -.\" Date: 21 November 2013 -.\" SectDesc: Basic Tools -.\" Title: javah.1 -.\" -.if n .pl 99999 -.TH javah 1 "21 November 2013" "JDK 8" "Basic Tools" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- - -.SH NAME -javah \- Generates C header and source files from a Java class\&. -.SH SYNOPSIS -.sp -.nf - -\fBjavah\fR [ \fIoptions\fR ] f\fIully\-qualified\-class\-name \&.\&.\&.\fR -.fi -.sp -.TP -\fIoptions\fR -The command-line options\&. See Options\&. -.TP -\fIfully-qualified-class-name\fR -The fully qualified location of the classes to be converted to C header and source files\&. -.SH DESCRIPTION -The \f3javah\fR command generates C header and source files that are needed to implement native methods\&. The generated header and source files are used by C programs to reference an object\&'s instance variables from native source code\&. The \f3\&.h\fR file contains a \f3struct\fR definition with a layout that parallels the layout of the corresponding class\&. The fields in the \f3struct\fR correspond to instance variables in the class\&. -.PP -The name of the header file and the structure declared within it are derived from the name of the class\&. When the class passed to the \f3javah\fR command is inside a package, the package name is added to the beginning of both the header file name and the structure name\&. Underscores (_) are used as name delimiters\&. -.PP -By default the \f3javah\fR command creates a header file for each class listed on the command line and puts the files in the current directory\&. Use the \f3-stubs\fR option to create source files\&. Use the \f3-o\fR option to concatenate the results for all listed classes into a single file\&. -.PP -The Java Native Interface (JNI) does not require header information or stub files\&. The \f3javah\fR command can still be used to generate native method function prototypes needed for JNI-style native methods\&. The \f3javah\fR command produces JNI-style output by default and places the result in the \f3\&.h\fR file\&. -.SH OPTIONS -.TP --o \fIoutputfile\fR -.br -Concatenates the resulting header or source files for all the classes listed on the command line into an output file\&. Only one of \f3-o\fR or \f3-d\fR can be used\&. -.TP --d \fIdirectory\fR -.br -Sets the directory where the \f3javah\fR command saves the header files or the stub files\&. Only one of \f3-d\fR or \f3-o\fR can be used\&. -.TP --stubs -.br -Causes the \f3javah\fR command to generate C declarations from the Java object file\&. -.TP --verbose -.br -Indicates verbose output and causes the \f3javah\fR command to print a message to \f3stdout\fR about the status of the generated files\&. -.TP --help -.br -Prints a help message for \f3javah\fR usage\&. -.TP --version -.br -Prints \f3javah\fR command release information\&. -.TP --jni -.br -Causes the \f3javah\fR command to create an output file containing JNI-style native method function prototypes\&. This is the default output; use of \f3-jni\fR is optional\&. -.TP --classpath \fIpath\fR -.br -Specifies the path the \f3javah\fR command uses to look up classes\&. Overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&. Directories are separated by colons on Oracle Solaris and semicolons on Windows\&. The general format for path is: - -\fIOracle Solaris\fR: - -\&.:\fIyour-path\fR - -Example: \f3\&.:/home/avh/classes:/usr/local/java/classes\fR - -\fIWindows\fR: - -\&.;\fIyour-path\fR - -Example: \f3\&.;C:\eusers\edac\eclasses;C:\etools\ejava\eclasses\fR - -As a special convenience, a class path element that contains a base name of * is considered equivalent to specifying a list of all the files in the directory with the extension \f3\&.jar\fR or \f3\&.JAR\fR\&. - -For example, if directory \f3mydir\fR contains \f3a\&.jar\fR and \f3b\&.JAR\fR, then the class path element \f3mydir/*\fR is expanded to a \f3A\fR\f3\&.jar:b\&.JAR\fR, except that the order of jar files is unspecified\&. All JAR files in the specified directory, including hidden ones, are included in the list\&. A class path entry that consists of * expands to a list of all the JAR files in the current directory\&. The \f3CLASSPATH\fR environment variable, where defined, is similarly expanded\&. Any class path wild card expansion occurs before the Java Virtual Machine (JVM) is started\&. A Java program will never see unexpanded wild cards except by querying the environment\&. For example, by calling \f3System\&.getenv("CLASSPATH")\fR\&. -.TP --bootclasspath \fIpath\fR -.br -Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in \f3jre\elib\ert\&.jar\fR and several other JAR files\&. -.TP --old -.br -Specifies that old JDK 1\&.0-style header files should be generated\&. -.TP --force -.br -Specifies that output files should always be written\&. -.TP --J\fIoption\fR -.br -Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&. -.SH SEE\ ALSO -.TP 0.2i -\(bu -javah(1) -.TP 0.2i -\(bu -java(1) -.TP 0.2i -\(bu -jdb(1) -.TP 0.2i -\(bu -javap(1) -.TP 0.2i -\(bu -javadoc(1) -.RE -.br -'pl 8.5i -'bp diff --git a/src/bsd/doc/man/javap.1 b/src/bsd/doc/man/javap.1 index ca84b901cf5..9793ccd3ba1 100644 --- a/src/bsd/doc/man/javap.1 +++ b/src/bsd/doc/man/javap.1 @@ -362,17 +362,6 @@ javadoc(1) .sp -1 .IP \(bu 2.3 .\} -javah(1) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} jdb(1) .RE .sp diff --git a/src/bsd/doc/man/jdb.1 b/src/bsd/doc/man/jdb.1 index 1842836f1b7..a06c3ed0411 100644 --- a/src/bsd/doc/man/jdb.1 +++ b/src/bsd/doc/man/jdb.1 @@ -260,9 +260,6 @@ javac(1) java(1) .TP 0.2i \(bu -javah(1) -.TP 0.2i -\(bu javap(1) .RE .br diff --git a/src/demo/share/jfc/SwingSet2/AquaTheme.java b/src/demo/share/jfc/SwingSet2/AquaTheme.java new file mode 100644 index 00000000000..c28bb7e1d39 --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/AquaTheme.java @@ -0,0 +1,57 @@ +/* + * + * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * - Neither the name of Oracle nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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. + */ + + +import javax.swing.plaf.*; +import javax.swing.plaf.metal.*; +import javax.swing.*; +import javax.swing.border.*; +import java.awt.*; + +/** + * This class describes a theme using "blue-green" colors. + * + * @author Steve Wilson + */ +public class AquaTheme extends DefaultMetalTheme { + + public String getName() { return "Aqua"; } + + private final ColorUIResource primary1 = new ColorUIResource(102, 153, 153); + private final ColorUIResource primary2 = new ColorUIResource(128, 192, 192); + private final ColorUIResource primary3 = new ColorUIResource(159, 235, 235); + + protected ColorUIResource getPrimary1() { return primary1; } + protected ColorUIResource getPrimary2() { return primary2; } + protected ColorUIResource getPrimary3() { return primary3; } + +} diff --git a/src/demo/share/jfc/SwingSet2/BezierAnimationPanel.java b/src/demo/share/jfc/SwingSet2/BezierAnimationPanel.java new file mode 100644 index 00000000000..9cfd7d008cf --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/BezierAnimationPanel.java @@ -0,0 +1,331 @@ +/* + * + * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * - Neither the name of Oracle nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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. + */ + + +import javax.swing.*; +import javax.swing.event.*; +import javax.swing.text.*; +import javax.swing.border.*; +import javax.swing.colorchooser.*; +import javax.swing.filechooser.*; +import javax.accessibility.*; + +import java.awt.*; +import java.awt.font.*; +import java.awt.geom.*; +import java.awt.image.*; +import java.awt.event.*; + +/** + * BezierAnimationPanel + * + * @author Jim Graham + * @author Jeff Dinkins (removed dynamic setting changes, made swing friendly) + */ +class BezierAnimationPanel extends JPanel implements Runnable { + + Color backgroundColor = new Color(0, 0, 153); + Color outerColor = new Color(255, 255, 255); + Color gradientColorA = new Color(255, 0, 101); + Color gradientColorB = new Color(255, 255, 0); + + boolean bgChanged = false; + + GradientPaint gradient = null; + + public final int NUMPTS = 6; + + float animpts[] = new float[NUMPTS * 2]; + + float deltas[] = new float[NUMPTS * 2]; + + float staticpts[] = { + 50.0f, 0.0f, + 150.0f, 0.0f, + 200.0f, 75.0f, + 150.0f, 150.0f, + 50.0f, 150.0f, + 0.0f, 75.0f, + }; + + float movepts[] = new float[staticpts.length]; + + BufferedImage img; + + Rectangle bounds = null; + + Thread anim; + + private final Object lock = new Object(); + + /** + * BezierAnimationPanel Constructor + */ + public BezierAnimationPanel() { + addHierarchyListener( + new HierarchyListener() { + public void hierarchyChanged(HierarchyEvent e) { + if(isShowing()) { + start(); + } else { + stop(); + } + } + } + ); + setBackground(getBackgroundColor()); + } + + public boolean isOpaque() { + return true; + } + + public Color getGradientColorA() { + return gradientColorA; + } + + public void setGradientColorA(Color c) { + if(c != null) { + gradientColorA = c; + } + } + + public Color getGradientColorB() { + return gradientColorB; + } + + public void setGradientColorB(Color c) { + if(c != null) { + gradientColorB = c; + } + } + + public Color getOuterColor() { + return outerColor; + } + + public void setOuterColor(Color c) { + if(c != null) { + outerColor = c; + } + } + + public Color getBackgroundColor() { + return backgroundColor; + } + + public void setBackgroundColor(Color c) { + if(c != null) { + backgroundColor = c; + setBackground(c); + bgChanged = true; + } + } + + public void start() { + Dimension size = getSize(); + for (int i = 0; i < animpts.length; i += 2) { + animpts[i + 0] = (float) (Math.random() * size.width); + animpts[i + 1] = (float) (Math.random() * size.height); + deltas[i + 0] = (float) (Math.random() * 4.0 + 2.0); + deltas[i + 1] = (float) (Math.random() * 4.0 + 2.0); + if (animpts[i + 0] > size.width / 6.0f) { + deltas[i + 0] = -deltas[i + 0]; + } + if (animpts[i + 1] > size.height / 6.0f) { + deltas[i + 1] = -deltas[i + 1]; + } + } + anim = new Thread(this); + anim.setPriority(Thread.MIN_PRIORITY); + anim.start(); + } + + public synchronized void stop() { + anim = null; + notify(); + } + + public void animate(float[] pts, float[] deltas, int index, int limit) { + float newpt = pts[index] + deltas[index]; + if (newpt <= 0) { + newpt = -newpt; + deltas[index] = (float) (Math.random() * 3.0 + 2.0); + } else if (newpt >= (float) limit) { + newpt = 2.0f * limit - newpt; + deltas[index] = - (float) (Math.random() * 3.0 + 2.0); + } + pts[index] = newpt; + } + + public void run() { + Thread me = Thread.currentThread(); + while (getSize().width <= 0) { + try { + anim.sleep(500); + } catch (InterruptedException e) { + return; + } + } + + Graphics2D g2d = null; + Graphics2D BufferG2D = null; + Graphics2D ScreenG2D = null; + BasicStroke solid = new BasicStroke(9.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND, 9.0f); + GeneralPath gp = new GeneralPath(GeneralPath.WIND_NON_ZERO); + int rule = AlphaComposite.SRC_OVER; + AlphaComposite opaque = AlphaComposite.SrcOver; + AlphaComposite blend = AlphaComposite.getInstance(rule, 0.9f); + AlphaComposite set = AlphaComposite.Src; + int frame = 0; + int frametmp = 0; + Dimension oldSize = getSize(); + Shape clippath = null; + while (anim == me) { + Dimension size = getSize(); + if (size.width != oldSize.width || size.height != oldSize.height) { + img = null; + clippath = null; + if (BufferG2D != null) { + BufferG2D.dispose(); + BufferG2D = null; + } + if (ScreenG2D != null) { + ScreenG2D.dispose(); + ScreenG2D = null; + } + } + oldSize = size; + + if (img == null) { + img = (BufferedImage) createImage(size.width, size.height); + } + + if (BufferG2D == null) { + BufferG2D = img.createGraphics(); + BufferG2D.setRenderingHint(RenderingHints.KEY_RENDERING, + RenderingHints.VALUE_RENDER_DEFAULT); + BufferG2D.setClip(clippath); + } + g2d = BufferG2D; + + float[] ctrlpts; + for (int i = 0; i < animpts.length; i += 2) { + animate(animpts, deltas, i + 0, size.width); + animate(animpts, deltas, i + 1, size.height); + } + ctrlpts = animpts; + int len = ctrlpts.length; + gp.reset(); + int dir = 0; + float prevx = ctrlpts[len - 2]; + float prevy = ctrlpts[len - 1]; + float curx = ctrlpts[0]; + float cury = ctrlpts[1]; + float midx = (curx + prevx) / 2.0f; + float midy = (cury + prevy) / 2.0f; + gp.moveTo(midx, midy); + for (int i = 2; i <= ctrlpts.length; i += 2) { + float x1 = (midx + curx) / 2.0f; + float y1 = (midy + cury) / 2.0f; + prevx = curx; + prevy = cury; + if (i < ctrlpts.length) { + curx = ctrlpts[i + 0]; + cury = ctrlpts[i + 1]; + } else { + curx = ctrlpts[0]; + cury = ctrlpts[1]; + } + midx = (curx + prevx) / 2.0f; + midy = (cury + prevy) / 2.0f; + float x2 = (prevx + midx) / 2.0f; + float y2 = (prevy + midy) / 2.0f; + gp.curveTo(x1, y1, x2, y2, midx, midy); + } + gp.closePath(); + + synchronized(lock) { + g2d.setComposite(set); + g2d.setBackground(backgroundColor); + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_OFF); + + if(bgChanged || bounds == null) { + bounds = new Rectangle(0, 0, getWidth(), getHeight()); + bgChanged = false; + } + + // g2d.clearRect(bounds.x-5, bounds.y-5, bounds.x + bounds.width + 5, bounds.y + bounds.height + 5); + g2d.clearRect(0, 0, getWidth(), getHeight()); + + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON); + g2d.setColor(outerColor); + g2d.setComposite(opaque); + g2d.setStroke(solid); + g2d.draw(gp); + g2d.setPaint(gradient); + + if(!bgChanged) { + bounds = gp.getBounds(); + } else { + bounds = new Rectangle(0, 0, getWidth(), getHeight()); + bgChanged = false; + } + gradient = new GradientPaint(bounds.x, bounds.y, gradientColorA, + bounds.x + bounds.width, bounds.y + bounds.height, + gradientColorB, true); + g2d.setComposite(blend); + g2d.fill(gp); + } + if (g2d == BufferG2D) { + repaint(); + } + ++frame; + Thread.yield(); + } + if (g2d != null) { + g2d.dispose(); + } + } + + public void paint(Graphics g) { + synchronized (lock) { + Graphics2D g2d = (Graphics2D) g; + if (img != null) { + g2d.setComposite(AlphaComposite.Src); + g2d.drawImage(img, null, 0, 0); + } + } + } +} diff --git a/src/demo/share/jfc/SwingSet2/ButtonDemo.java b/src/demo/share/jfc/SwingSet2/ButtonDemo.java new file mode 100644 index 00000000000..0ba9574b67c --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/ButtonDemo.java @@ -0,0 +1,555 @@ +/* + * + * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * - Neither the name of Oracle nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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. + */ + + +import javax.swing.*; +import javax.swing.event.*; +import javax.swing.text.*; +import javax.swing.border.*; +import javax.swing.colorchooser.*; +import javax.swing.filechooser.*; +import javax.accessibility.*; + +import java.awt.*; +import java.awt.event.*; +import java.beans.*; +import java.util.*; +import java.io.*; +import java.applet.*; +import java.net.*; + +/** + * JButton, JRadioButton, JToggleButton, JCheckBox Demos + * + * @author Jeff Dinkins + */ +public class ButtonDemo extends DemoModule implements ChangeListener { + + JTabbedPane tab; + + JPanel buttonPanel = new JPanel(); + JPanel checkboxPanel = new JPanel(); + JPanel radioButtonPanel = new JPanel(); + JPanel toggleButtonPanel = new JPanel(); + + Vector buttons = new Vector(); + Vector checkboxes = new Vector(); + Vector radiobuttons = new Vector(); + Vector togglebuttons = new Vector(); + + Vector currentControls = buttons; + + JButton button; + JCheckBox check; + JRadioButton radio; + JToggleButton toggle; + + EmptyBorder border5 = new EmptyBorder(5,5,5,5); + EmptyBorder border10 = new EmptyBorder(10,10,10,10); + + ItemListener buttonDisplayListener = null; + ItemListener buttonPadListener = null; + + Insets insets0 = new Insets(0,0,0,0); + Insets insets10 = new Insets(10,10,10,10); + + /** + * main method allows us to run as a standalone demo. + */ + public static void main(String[] args) { + ButtonDemo demo = new ButtonDemo(null); + demo.mainImpl(); + } + + /** + * ButtonDemo Constructor + */ + public ButtonDemo(SwingSet2 swingset) { + // Set the title for this demo, and an icon used to represent this + // demo inside the SwingSet2 app. + super(swingset, "ButtonDemo", "toolbar/JButton.gif"); + + tab = new JTabbedPane(); + tab.getModel().addChangeListener(this); + + JPanel demo = getDemoPanel(); + demo.setLayout(new BoxLayout(demo, BoxLayout.Y_AXIS)); + demo.add(tab); + + addButtons(); + addRadioButtons(); + addCheckBoxes(); + // addToggleButtons(); + currentControls = buttons; + } + + public void addButtons() { + tab.addTab(getString("ButtonDemo.buttons"), buttonPanel); + buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS)); + buttonPanel.setBorder(border5); + + JPanel p1 = createVerticalPanel(true); + p1.setAlignmentY(TOP_ALIGNMENT); + buttonPanel.add(p1); + + // Text Buttons + JPanel p2 = createHorizontalPanel(false); + p1.add(p2); + p2.setBorder(new CompoundBorder(new TitledBorder(null, getString("ButtonDemo.textbuttons"), + TitledBorder.LEFT, TitledBorder.TOP), border5)); + + buttons.add(p2.add(new JButton(getString("ButtonDemo.button1")))); + p2.add(Box.createRigidArea(HGAP10)); + + buttons.add(p2.add(new JButton(getString("ButtonDemo.button2")))); + p2.add(Box.createRigidArea(HGAP10)); + + buttons.add(p2.add(new JButton(getString("ButtonDemo.button3")))); + + + // Image Buttons + p1.add(Box.createRigidArea(VGAP30)); + JPanel p3 = createHorizontalPanel(false); + p1.add(p3); + p3.setLayout(new BoxLayout(p3, BoxLayout.X_AXIS)); + p3.setBorder(new TitledBorder(null, getString("ButtonDemo.imagebuttons"), + TitledBorder.LEFT, TitledBorder.TOP)); + + // home image button + String description = getString("ButtonDemo.phone"); + button = new JButton(createImageIcon("buttons/b1.gif", description)); + button.setPressedIcon(createImageIcon("buttons/b1p.gif", description)); + button.setRolloverIcon(createImageIcon("buttons/b1r.gif", description)); + button.setDisabledIcon(createImageIcon("buttons/b1d.gif", description)); + button.setMargin(new Insets(0,0,0,0)); + p3.add(button); + buttons.add(button); + p3.add(Box.createRigidArea(HGAP10)); + + // write image button + description = getString("ButtonDemo.write"); + button = new JButton(createImageIcon("buttons/b2.gif", description)); + button.setPressedIcon(createImageIcon("buttons/b2p.gif", description)); + button.setRolloverIcon(createImageIcon("buttons/b2r.gif", description)); + button.setDisabledIcon(createImageIcon("buttons/b2d.gif", description)); + button.setMargin(new Insets(0,0,0,0)); + p3.add(button); + buttons.add(button); + p3.add(Box.createRigidArea(HGAP10)); + + // write image button + description = getString("ButtonDemo.peace"); + button = new JButton(createImageIcon("buttons/b3.gif", description)); + button.setPressedIcon(createImageIcon("buttons/b3p.gif", description)); + button.setRolloverIcon(createImageIcon("buttons/b3r.gif", description)); + button.setDisabledIcon(createImageIcon("buttons/b3d.gif", description)); + button.setMargin(new Insets(0,0,0,0)); + p3.add(button); + buttons.add(button); + + p1.add(Box.createVerticalGlue()); + + buttonPanel.add(Box.createHorizontalGlue()); + currentControls = buttons; + buttonPanel.add(createControls()); + } + + public void addRadioButtons() { + ButtonGroup group = new ButtonGroup(); + + tab.addTab(getString("ButtonDemo.radiobuttons"), radioButtonPanel); + radioButtonPanel.setLayout(new BoxLayout(radioButtonPanel, BoxLayout.X_AXIS)); + radioButtonPanel.setBorder(border5); + + JPanel p1 = createVerticalPanel(true); + p1.setAlignmentY(TOP_ALIGNMENT); + radioButtonPanel.add(p1); + + // Text Radio Buttons + JPanel p2 = createHorizontalPanel(false); + p1.add(p2); + p2.setBorder(new CompoundBorder( + new TitledBorder( + null, getString("ButtonDemo.textradiobuttons"), + TitledBorder.LEFT, TitledBorder.TOP), border5) + ); + + radio = (JRadioButton)p2.add( + new JRadioButton(getString("ButtonDemo.radio1"))); + group.add(radio); + radiobuttons.add(radio); + p2.add(Box.createRigidArea(HGAP10)); + + radio = (JRadioButton)p2.add( + new JRadioButton(getString("ButtonDemo.radio2"))); + group.add(radio); + radiobuttons.add(radio); + p2.add(Box.createRigidArea(HGAP10)); + + radio = (JRadioButton)p2.add( + new JRadioButton(getString("ButtonDemo.radio3"))); + group.add(radio); + radiobuttons.add(radio); + + // Image Radio Buttons + group = new ButtonGroup(); + p1.add(Box.createRigidArea(VGAP30)); + JPanel p3 = createHorizontalPanel(false); + p1.add(p3); + p3.setLayout(new BoxLayout(p3, BoxLayout.X_AXIS)); + p3.setBorder(new TitledBorder(null, getString("ButtonDemo.imageradiobuttons"), + TitledBorder.LEFT, TitledBorder.TOP)); + + // image radio button 1 + String description = getString("ButtonDemo.customradio"); + String text = getString("ButtonDemo.radio1"); + radio = new JRadioButton(text, createImageIcon("buttons/rb.gif", description)); + radio.setPressedIcon(createImageIcon("buttons/rbp.gif", description)); + radio.setRolloverIcon(createImageIcon("buttons/rbr.gif", description)); + radio.setRolloverSelectedIcon(createImageIcon("buttons/rbrs.gif", description)); + radio.setSelectedIcon(createImageIcon("buttons/rbs.gif", description)); + radio.setMargin(new Insets(0,0,0,0)); + group.add(radio); + p3.add(radio); + radiobuttons.add(radio); + p3.add(Box.createRigidArea(HGAP20)); + + // image radio button 2 + text = getString("ButtonDemo.radio2"); + radio = new JRadioButton(text, createImageIcon("buttons/rb.gif", description)); + radio.setPressedIcon(createImageIcon("buttons/rbp.gif", description)); + radio.setRolloverIcon(createImageIcon("buttons/rbr.gif", description)); + radio.setRolloverSelectedIcon(createImageIcon("buttons/rbrs.gif", description)); + radio.setSelectedIcon(createImageIcon("buttons/rbs.gif", description)); + radio.setMargin(new Insets(0,0,0,0)); + group.add(radio); + p3.add(radio); + radiobuttons.add(radio); + p3.add(Box.createRigidArea(HGAP20)); + + // image radio button 3 + text = getString("ButtonDemo.radio3"); + radio = new JRadioButton(text, createImageIcon("buttons/rb.gif", description)); + radio.setPressedIcon(createImageIcon("buttons/rbp.gif", description)); + radio.setRolloverIcon(createImageIcon("buttons/rbr.gif", description)); + radio.setRolloverSelectedIcon(createImageIcon("buttons/rbrs.gif", description)); + radio.setSelectedIcon(createImageIcon("buttons/rbs.gif", description)); + radio.setMargin(new Insets(0,0,0,0)); + group.add(radio); + radiobuttons.add(radio); + p3.add(radio); + + // verticaly glue fills out the rest of the box + p1.add(Box.createVerticalGlue()); + + radioButtonPanel.add(Box.createHorizontalGlue()); + currentControls = radiobuttons; + radioButtonPanel.add(createControls()); + } + + + public void addCheckBoxes() { + tab.addTab(getString("ButtonDemo.checkboxes"), checkboxPanel); + checkboxPanel.setLayout(new BoxLayout(checkboxPanel, BoxLayout.X_AXIS)); + checkboxPanel.setBorder(border5); + + JPanel p1 = createVerticalPanel(true); + p1.setAlignmentY(TOP_ALIGNMENT); + checkboxPanel.add(p1); + + // Text Radio Buttons + JPanel p2 = createHorizontalPanel(false); + p1.add(p2); + p2.setBorder(new CompoundBorder( + new TitledBorder( + null, getString("ButtonDemo.textcheckboxes"), + TitledBorder.LEFT, TitledBorder.TOP), border5) + ); + + checkboxes.add(p2.add(new JCheckBox(getString("ButtonDemo.check1")))); + p2.add(Box.createRigidArea(HGAP10)); + + checkboxes.add(p2.add(new JCheckBox(getString("ButtonDemo.check2")))); + p2.add(Box.createRigidArea(HGAP10)); + + checkboxes.add(p2.add(new JCheckBox(getString("ButtonDemo.check3")))); + + // Image Radio Buttons + p1.add(Box.createRigidArea(VGAP30)); + JPanel p3 = createHorizontalPanel(false); + p1.add(p3); + p3.setLayout(new BoxLayout(p3, BoxLayout.X_AXIS)); + p3.setBorder(new TitledBorder(null, getString("ButtonDemo.imagecheckboxes"), + TitledBorder.LEFT, TitledBorder.TOP)); + + // image checkbox 1 + String description = getString("ButtonDemo.customcheck"); + String text = getString("ButtonDemo.check1"); + check = new JCheckBox(text, createImageIcon("buttons/cb.gif", description)); + check.setRolloverIcon(createImageIcon("buttons/cbr.gif", description)); + check.setRolloverSelectedIcon(createImageIcon("buttons/cbrs.gif", description)); + check.setSelectedIcon(createImageIcon("buttons/cbs.gif", description)); + check.setMargin(new Insets(0,0,0,0)); + p3.add(check); + checkboxes.add(check); + p3.add(Box.createRigidArea(HGAP20)); + + // image checkbox 2 + text = getString("ButtonDemo.check2"); + check = new JCheckBox(text, createImageIcon("buttons/cb.gif", description)); + check.setRolloverIcon(createImageIcon("buttons/cbr.gif", description)); + check.setRolloverSelectedIcon(createImageIcon("buttons/cbrs.gif", description)); + check.setSelectedIcon(createImageIcon("buttons/cbs.gif", description)); + check.setMargin(new Insets(0,0,0,0)); + p3.add(check); + checkboxes.add(check); + p3.add(Box.createRigidArea(HGAP20)); + + // image checkbox 3 + text = getString("ButtonDemo.check3"); + check = new JCheckBox(text, createImageIcon("buttons/cb.gif", description)); + check.setRolloverIcon(createImageIcon("buttons/cbr.gif", description)); + check.setRolloverSelectedIcon(createImageIcon("buttons/cbrs.gif", description)); + check.setSelectedIcon(createImageIcon("buttons/cbs.gif", description)); + check.setMargin(new Insets(0,0,0,0)); + p3.add(check); + checkboxes.add(check); + + // verticaly glue fills out the rest of the box + p1.add(Box.createVerticalGlue()); + + checkboxPanel.add(Box.createHorizontalGlue()); + currentControls = checkboxes; + checkboxPanel.add(createControls()); + } + + public void addToggleButtons() { + tab.addTab(getString("ButtonDemo.togglebuttons"), toggleButtonPanel); + } + + public JPanel createControls() { + JPanel controls = new JPanel() { + public Dimension getMaximumSize() { + return new Dimension(300, super.getMaximumSize().height); + } + }; + controls.setLayout(new BoxLayout(controls, BoxLayout.Y_AXIS)); + controls.setAlignmentY(TOP_ALIGNMENT); + controls.setAlignmentX(LEFT_ALIGNMENT); + + JPanel buttonControls = createHorizontalPanel(true); + buttonControls.setAlignmentY(TOP_ALIGNMENT); + buttonControls.setAlignmentX(LEFT_ALIGNMENT); + + JPanel leftColumn = createVerticalPanel(false); + leftColumn.setAlignmentX(LEFT_ALIGNMENT); + leftColumn.setAlignmentY(TOP_ALIGNMENT); + + JPanel rightColumn = new LayoutControlPanel(this); + + buttonControls.add(leftColumn); + buttonControls.add(Box.createRigidArea(HGAP20)); + buttonControls.add(rightColumn); + buttonControls.add(Box.createRigidArea(HGAP20)); + + controls.add(buttonControls); + + createListeners(); + + // Display Options + JLabel l = new JLabel(getString("ButtonDemo.controlpanel_label")); + leftColumn.add(l); + + JCheckBox bordered = new JCheckBox(getString("ButtonDemo.paintborder")); + bordered.setActionCommand("PaintBorder"); + bordered.setToolTipText(getString("ButtonDemo.paintborder_tooltip")); + bordered.setMnemonic(getMnemonic("ButtonDemo.paintborder_mnemonic")); + if (currentControls == buttons) { + bordered.setSelected(true); + } + bordered.addItemListener(buttonDisplayListener); + leftColumn.add(bordered); + + JCheckBox focused = new JCheckBox(getString("ButtonDemo.paintfocus")); + focused.setActionCommand("PaintFocus"); + focused.setToolTipText(getString("ButtonDemo.paintfocus_tooltip")); + focused.setMnemonic(getMnemonic("ButtonDemo.paintfocus_mnemonic")); + focused.setSelected(true); + focused.addItemListener(buttonDisplayListener); + leftColumn.add(focused); + + JCheckBox enabled = new JCheckBox(getString("ButtonDemo.enabled")); + enabled.setActionCommand("Enabled"); + enabled.setToolTipText(getString("ButtonDemo.enabled_tooltip")); + enabled.setSelected(true); + enabled.addItemListener(buttonDisplayListener); + enabled.setMnemonic(getMnemonic("ButtonDemo.enabled_mnemonic")); + leftColumn.add(enabled); + + JCheckBox filled = new JCheckBox(getString("ButtonDemo.contentfilled")); + filled.setActionCommand("ContentFilled"); + filled.setToolTipText(getString("ButtonDemo.contentfilled_tooltip")); + filled.setSelected(true); + filled.addItemListener(buttonDisplayListener); + filled.setMnemonic(getMnemonic("ButtonDemo.contentfilled_mnemonic")); + leftColumn.add(filled); + + leftColumn.add(Box.createRigidArea(VGAP20)); + + l = new JLabel(getString("ButtonDemo.padamount_label")); + leftColumn.add(l); + ButtonGroup group = new ButtonGroup(); + JRadioButton defaultPad = new JRadioButton(getString("ButtonDemo.default")); + defaultPad.setToolTipText(getString("ButtonDemo.default_tooltip")); + defaultPad.setMnemonic(getMnemonic("ButtonDemo.default_mnemonic")); + defaultPad.addItemListener(buttonPadListener); + group.add(defaultPad); + defaultPad.setSelected(true); + leftColumn.add(defaultPad); + + JRadioButton zeroPad = new JRadioButton(getString("ButtonDemo.zero")); + zeroPad.setActionCommand("ZeroPad"); + zeroPad.setToolTipText(getString("ButtonDemo.zero_tooltip")); + zeroPad.addItemListener(buttonPadListener); + zeroPad.setMnemonic(getMnemonic("ButtonDemo.zero_mnemonic")); + group.add(zeroPad); + leftColumn.add(zeroPad); + + JRadioButton tenPad = new JRadioButton(getString("ButtonDemo.ten")); + tenPad.setActionCommand("TenPad"); + tenPad.setMnemonic(getMnemonic("ButtonDemo.ten_mnemonic")); + tenPad.setToolTipText(getString("ButtonDemo.ten_tooltip")); + tenPad.addItemListener(buttonPadListener); + group.add(tenPad); + leftColumn.add(tenPad); + + leftColumn.add(Box.createRigidArea(VGAP20)); + return controls; + } + + public void createListeners() { + buttonDisplayListener = new ItemListener() { + Component c; + AbstractButton b; + + public void itemStateChanged(ItemEvent e) { + JCheckBox cb = (JCheckBox) e.getSource(); + String command = cb.getActionCommand(); + if(command == "Enabled") { + for(int i = 0; i < currentControls.size(); i++) { + c = (Component) currentControls.elementAt(i); + c.setEnabled(cb.isSelected()); + c.invalidate(); + } + } else if(command == "PaintBorder") { + c = (Component) currentControls.elementAt(0); + if(c instanceof AbstractButton) { + for(int i = 0; i < currentControls.size(); i++) { + b = (AbstractButton) currentControls.elementAt(i); + b.setBorderPainted(cb.isSelected()); + b.invalidate(); + } + } + } else if(command == "PaintFocus") { + c = (Component) currentControls.elementAt(0); + if(c instanceof AbstractButton) { + for(int i = 0; i < currentControls.size(); i++) { + b = (AbstractButton) currentControls.elementAt(i); + b.setFocusPainted(cb.isSelected()); + b.invalidate(); + } + } + } else if(command == "ContentFilled") { + c = (Component) currentControls.elementAt(0); + if(c instanceof AbstractButton) { + for(int i = 0; i < currentControls.size(); i++) { + b = (AbstractButton) currentControls.elementAt(i); + b.setContentAreaFilled(cb.isSelected()); + b.invalidate(); + } + } + } + invalidate(); + validate(); + repaint(); + } + }; + + buttonPadListener = new ItemListener() { + Component c; + AbstractButton b; + + public void itemStateChanged(ItemEvent e) { + // *** pad = 0 + int pad = -1; + JRadioButton rb = (JRadioButton) e.getSource(); + String command = rb.getActionCommand(); + if(command == "ZeroPad" && rb.isSelected()) { + pad = 0; + } else if(command == "TenPad" && rb.isSelected()) { + pad = 10; + } + + for(int i = 0; i < currentControls.size(); i++) { + b = (AbstractButton) currentControls.elementAt(i); + if(pad == -1) { + b.setMargin(null); + } else if(pad == 0) { + b.setMargin(insets0); + } else { + b.setMargin(insets10); + } + } + invalidate(); + validate(); + repaint(); + } + }; + } + + public void stateChanged(ChangeEvent e) { + SingleSelectionModel model = (SingleSelectionModel) e.getSource(); + if(model.getSelectedIndex() == 0) { + currentControls = buttons; + } else if(model.getSelectedIndex() == 1) { + currentControls = radiobuttons; + } else if(model.getSelectedIndex() == 2) { + currentControls = checkboxes; + } else { + currentControls = togglebuttons; + } + } + + public Vector getCurrentControls() { + return currentControls; + } +} diff --git a/src/demo/share/jfc/SwingSet2/CharcoalTheme.java b/src/demo/share/jfc/SwingSet2/CharcoalTheme.java new file mode 100644 index 00000000000..af2c1e882d2 --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/CharcoalTheme.java @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * - Neither the name of Oracle nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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. + */ + + +import javax.swing.plaf.*; +import javax.swing.plaf.metal.*; +import javax.swing.*; +import javax.swing.border.*; +import java.awt.*; + +/** + * This class describes a theme using gray colors. + * + * @author Steve Wilson + */ +public class CharcoalTheme extends DefaultMetalTheme { + + public String getName() { return "Charcoal"; } + + private final ColorUIResource primary1 = new ColorUIResource(66, 33, 66); + private final ColorUIResource primary2 = new ColorUIResource(90, 86, 99); + private final ColorUIResource primary3 = new ColorUIResource(99, 99, 99); + + private final ColorUIResource secondary1 = new ColorUIResource(0, 0, 0); + private final ColorUIResource secondary2 = new ColorUIResource(51, 51, 51); + private final ColorUIResource secondary3 = new ColorUIResource(102, 102, 102); + + private final ColorUIResource black = new ColorUIResource(222, 222, 222); + private final ColorUIResource white = new ColorUIResource(0, 0, 0); + + protected ColorUIResource getPrimary1() { return primary1; } + protected ColorUIResource getPrimary2() { return primary2; } + protected ColorUIResource getPrimary3() { return primary3; } + + protected ColorUIResource getSecondary1() { return secondary1; } + protected ColorUIResource getSecondary2() { return secondary2; } + protected ColorUIResource getSecondary3() { return secondary3; } + + protected ColorUIResource getBlack() { return black; } + protected ColorUIResource getWhite() { return white; } + +} diff --git a/src/demo/share/jfc/SwingSet2/ColorChooserDemo.java b/src/demo/share/jfc/SwingSet2/ColorChooserDemo.java new file mode 100644 index 00000000000..2a4b7314139 --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/ColorChooserDemo.java @@ -0,0 +1,209 @@ +/* + * + * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * - Neither the name of Oracle nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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. + */ + + +import javax.swing.*; +import javax.swing.event.*; +import javax.swing.text.*; +import javax.swing.border.*; +import javax.swing.colorchooser.*; +import javax.swing.filechooser.*; +import javax.accessibility.*; + +import java.awt.*; +import java.awt.event.*; +import java.beans.*; +import java.util.*; +import java.io.*; +import java.applet.*; +import java.net.*; + +/** + * JColorChooserDemo + * + * @author Jeff Dinkins + */ +public class ColorChooserDemo extends DemoModule { + + BezierAnimationPanel bezAnim; + JButton outerColorButton = null; + JButton backgroundColorButton = null; + JButton gradientAButton = null; + JButton gradientBButton = null; + + // to store the color chosen from the JColorChooser + private Color chosen; + + /** + * main method allows us to run as a standalone demo. + */ + public static void main(String[] args) { + ColorChooserDemo demo = new ColorChooserDemo(null); + demo.mainImpl(); + } + + + /** + * ColorChooserDemo Constructor + */ + public ColorChooserDemo(SwingSet2 swingset) { + // Set the title for this demo, and an icon used to represent this + // demo inside the SwingSet2 app. + super(swingset, "ColorChooserDemo", "toolbar/JColorChooser.gif"); + + // Create the bezier animation panel to put in the center of the panel. + bezAnim = new BezierAnimationPanel(); + + outerColorButton = new JButton(getString("ColorChooserDemo.outer_line")); + outerColorButton.setIcon(new ColorSwatch("OuterLine", bezAnim)); + + backgroundColorButton = new JButton(getString("ColorChooserDemo.background")); + backgroundColorButton.setIcon(new ColorSwatch("Background", bezAnim)); + + gradientAButton = new JButton(getString("ColorChooserDemo.grad_a")); + gradientAButton.setIcon(new ColorSwatch("GradientA", bezAnim)); + + gradientBButton = new JButton(getString("ColorChooserDemo.grad_b")); + gradientBButton.setIcon(new ColorSwatch("GradientB", bezAnim)); + + ActionListener l = new ActionListener() { + public void actionPerformed(ActionEvent e) { + Color current = bezAnim.getOuterColor(); + + if(e.getSource() == backgroundColorButton) { + current = bezAnim.getBackgroundColor(); + } else if(e.getSource() == gradientAButton) { + current = bezAnim.getGradientColorA(); + } else if(e.getSource() == gradientBButton) { + current = bezAnim.getGradientColorB(); + } + + final JColorChooser chooser = new JColorChooser(current != null ? + current : + Color.WHITE); + if (getSwingSet2() != null && getSwingSet2().isDragEnabled()) { + chooser.setDragEnabled(true); + } + + chosen = null; + ActionListener okListener = new ActionListener() { + public void actionPerformed(ActionEvent ae) { + chosen = chooser.getColor(); + } + }; + + JDialog dialog = JColorChooser.createDialog(getDemoPanel(), + getString("ColorChooserDemo.chooser_title"), + true, + chooser, + okListener, + null); + + dialog.show(); + + if(e.getSource() == outerColorButton) { + bezAnim.setOuterColor(chosen); + } else if(e.getSource() == backgroundColorButton) { + bezAnim.setBackgroundColor(chosen); + } else if(e.getSource() == gradientAButton) { + bezAnim.setGradientColorA(chosen); + } else { + bezAnim.setGradientColorB(chosen); + } + } + }; + + outerColorButton.addActionListener(l); + backgroundColorButton.addActionListener(l); + gradientAButton.addActionListener(l); + gradientBButton.addActionListener(l); + + // Add everything to the panel + JPanel p = getDemoPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); + + // Add control buttons + JPanel buttonPanel = new JPanel(); + buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS)); + + buttonPanel.add(backgroundColorButton); + buttonPanel.add(Box.createRigidArea(new Dimension(15, 1))); + + buttonPanel.add(gradientAButton); + buttonPanel.add(Box.createRigidArea(new Dimension(15, 1))); + + buttonPanel.add(gradientBButton); + buttonPanel.add(Box.createRigidArea(new Dimension(15, 1))); + + buttonPanel.add(outerColorButton); + + // Add the panel midway down the panel + p.add(Box.createRigidArea(new Dimension(1, 10))); + p.add(buttonPanel); + p.add(Box.createRigidArea(new Dimension(1, 5))); + p.add(bezAnim); + } + + class ColorSwatch implements Icon { + String gradient; + BezierAnimationPanel bez; + + public ColorSwatch(String g, BezierAnimationPanel b) { + bez = b; + gradient = g; + } + + public int getIconWidth() { + return 11; + } + + public int getIconHeight() { + return 11; + } + + public void paintIcon(Component c, Graphics g, int x, int y) { + g.setColor(Color.black); + g.fillRect(x, y, getIconWidth(), getIconHeight()); + if(gradient.equals("GradientA")) { + g.setColor(bez.getGradientColorA()); + } else if(gradient.equals("GradientB")) { + g.setColor(bez.getGradientColorB()); + } else if(gradient.equals("Background")) { + g.setColor(bez.getBackgroundColor()); + } else if(gradient.equals("OuterLine")) { + g.setColor(bez.getOuterColor()); + } + g.fillRect(x+2, y+2, getIconWidth()-4, getIconHeight()-4); + } + } + +} diff --git a/src/demo/share/jfc/SwingSet2/ComboBoxDemo.java b/src/demo/share/jfc/SwingSet2/ComboBoxDemo.java new file mode 100644 index 00000000000..faed889623b --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/ComboBoxDemo.java @@ -0,0 +1,400 @@ +/* + * + * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * - Neither the name of Oracle nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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. + */ + + +import javax.swing.*; +import javax.swing.event.*; +import javax.swing.text.*; +import javax.swing.border.*; +import javax.swing.colorchooser.*; +import javax.swing.filechooser.*; +import javax.accessibility.*; + +import java.awt.*; +import java.awt.event.*; +import java.beans.*; +import java.util.*; +import java.io.*; +import java.applet.*; +import java.net.*; + +/** + * JComboBox Demo + * + * @author Jeff Dinkins + */ +public class ComboBoxDemo extends DemoModule implements ActionListener { + + Face face; + JLabel faceLabel; + + JComboBox hairCB; + JComboBox eyesCB; + JComboBox mouthCB; + + JComboBox presetCB; + + Hashtable parts = new Hashtable(); + + /** + * main method allows us to run as a standalone demo. + */ + public static void main(String[] args) { + ComboBoxDemo demo = new ComboBoxDemo(null); + demo.mainImpl(); + } + + /** + * ComboBoxDemo Constructor + */ + public ComboBoxDemo(SwingSet2 swingset) { + // Set the title for this demo, and an icon used to represent this + // demo inside the SwingSet2 app. + super(swingset, "ComboBoxDemo", "toolbar/JComboBox.gif"); + + createComboBoxDemo(); + } + + public void createComboBoxDemo() { + JPanel demo = getDemoPanel(); + + JPanel demoPanel = getDemoPanel(); + demoPanel.setLayout(new BoxLayout(demoPanel, BoxLayout.Y_AXIS)); + + JPanel innerPanel = new JPanel(); + innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.X_AXIS)); + + demoPanel.add(Box.createRigidArea(VGAP20)); + demoPanel.add(innerPanel); + demoPanel.add(Box.createRigidArea(VGAP20)); + + innerPanel.add(Box.createRigidArea(HGAP20)); + + // Create a panel to hold buttons + JPanel comboBoxPanel = new JPanel() { + public Dimension getMaximumSize() { + return new Dimension(getPreferredSize().width, super.getMaximumSize().height); + } + }; + comboBoxPanel.setLayout(new BoxLayout(comboBoxPanel, BoxLayout.Y_AXIS)); + + comboBoxPanel.add(Box.createRigidArea(VGAP15)); + + JLabel l = (JLabel) comboBoxPanel.add(new JLabel(getString("ComboBoxDemo.presets"))); + l.setAlignmentX(JLabel.LEFT_ALIGNMENT); + presetCB = (JComboBox) comboBoxPanel.add(createPresetComboBox()); + presetCB.setAlignmentX(JComboBox.LEFT_ALIGNMENT); + l.setLabelFor(presetCB); + comboBoxPanel.add(Box.createRigidArea(VGAP30)); + + l = (JLabel) comboBoxPanel.add(new JLabel(getString("ComboBoxDemo.hair_description"))); + l.setAlignmentX(JLabel.LEFT_ALIGNMENT); + hairCB = (JComboBox) comboBoxPanel.add(createHairComboBox()); + hairCB.setAlignmentX(JComboBox.LEFT_ALIGNMENT); + l.setLabelFor(hairCB); + comboBoxPanel.add(Box.createRigidArea(VGAP15)); + + l = (JLabel) comboBoxPanel.add(new JLabel(getString("ComboBoxDemo.eyes_description"))); + l.setAlignmentX(JLabel.LEFT_ALIGNMENT); + eyesCB = (JComboBox) comboBoxPanel.add(createEyesComboBox()); + eyesCB.setAlignmentX(JComboBox.LEFT_ALIGNMENT); + l.setLabelFor(eyesCB); + comboBoxPanel.add(Box.createRigidArea(VGAP15)); + + l = (JLabel) comboBoxPanel.add(new JLabel(getString("ComboBoxDemo.mouth_description"))); + l.setAlignmentX(JLabel.LEFT_ALIGNMENT); + mouthCB = (JComboBox) comboBoxPanel.add(createMouthComboBox()); + mouthCB.setAlignmentX(JComboBox.LEFT_ALIGNMENT); + l.setLabelFor(mouthCB); + comboBoxPanel.add(Box.createRigidArea(VGAP15)); + + // Fill up the remaining space + comboBoxPanel.add(new JPanel(new BorderLayout())); + + // Create and place the Face. + + face = new Face(); + JPanel facePanel = new JPanel(); + facePanel.setLayout(new BorderLayout()); + facePanel.setBorder(new BevelBorder(BevelBorder.LOWERED)); + + faceLabel = new JLabel(face); + facePanel.add(faceLabel, BorderLayout.CENTER); + // Indicate that the face panel is controlled by the hair, eyes and + // mouth combo boxes. + Object [] controlledByObjects = new Object[3]; + controlledByObjects[0] = hairCB; + controlledByObjects[1] = eyesCB; + controlledByObjects[2] = mouthCB; + AccessibleRelation controlledByRelation = + new AccessibleRelation(AccessibleRelation.CONTROLLED_BY_PROPERTY, + controlledByObjects); + facePanel.getAccessibleContext().getAccessibleRelationSet().add(controlledByRelation); + + // Indicate that the hair, eyes and mouth combo boxes are controllers + // for the face panel. + AccessibleRelation controllerForRelation = + new AccessibleRelation(AccessibleRelation.CONTROLLER_FOR_PROPERTY, + facePanel); + hairCB.getAccessibleContext().getAccessibleRelationSet().add(controllerForRelation); + eyesCB.getAccessibleContext().getAccessibleRelationSet().add(controllerForRelation); + mouthCB.getAccessibleContext().getAccessibleRelationSet().add(controllerForRelation); + + // add buttons and image panels to inner panel + innerPanel.add(comboBoxPanel); + innerPanel.add(Box.createRigidArea(HGAP30)); + innerPanel.add(facePanel); + innerPanel.add(Box.createRigidArea(HGAP20)); + + // load up the face parts + addFace("brent", getString("ComboBoxDemo.brent")); + addFace("georges", getString("ComboBoxDemo.georges")); + addFace("hans", getString("ComboBoxDemo.hans")); + addFace("howard", getString("ComboBoxDemo.howard")); + addFace("james", getString("ComboBoxDemo.james")); + addFace("jeff", getString("ComboBoxDemo.jeff")); + addFace("jon", getString("ComboBoxDemo.jon")); + addFace("lara", getString("ComboBoxDemo.lara")); + addFace("larry", getString("ComboBoxDemo.larry")); + addFace("lisa", getString("ComboBoxDemo.lisa")); + addFace("michael", getString("ComboBoxDemo.michael")); + addFace("philip", getString("ComboBoxDemo.philip")); + addFace("scott", getString("ComboBoxDemo.scott")); + + // set the default face + presetCB.setSelectedIndex(0); + } + + void addFace(String name, String i18n_name) { + ImageIcon i; + String i18n_hair = getString("ComboBoxDemo.hair"); + String i18n_eyes = getString("ComboBoxDemo.eyes"); + String i18n_mouth = getString("ComboBoxDemo.mouth"); + + parts.put(i18n_name, name); // i18n name lookup + parts.put(name, i18n_name); // reverse name lookup + + i = createImageIcon("combobox/" + name + "hair.jpg", i18n_name + i18n_hair); + parts.put(name + "hair", i); + + i = createImageIcon("combobox/" + name + "eyes.jpg", i18n_name + i18n_eyes); + parts.put(name + "eyes", i); + + i = createImageIcon("combobox/" + name + "mouth.jpg", i18n_name + i18n_mouth); + parts.put(name + "mouth", i); + } + + Face getFace() { + return face; + } + + JComboBox createHairComboBox() { + JComboBox cb = new JComboBox(); + fillComboBox(cb); + cb.addActionListener(this); + return cb; + } + + JComboBox createEyesComboBox() { + JComboBox cb = new JComboBox(); + fillComboBox(cb); + cb.addActionListener(this); + return cb; + } + + JComboBox createNoseComboBox() { + JComboBox cb = new JComboBox(); + fillComboBox(cb); + cb.addActionListener(this); + return cb; + } + + JComboBox createMouthComboBox() { + JComboBox cb = new JComboBox(); + fillComboBox(cb); + cb.addActionListener(this); + return cb; + } + + JComboBox createPresetComboBox() { + JComboBox cb = new JComboBox(); + cb.addItem(getString("ComboBoxDemo.preset1")); + cb.addItem(getString("ComboBoxDemo.preset2")); + cb.addItem(getString("ComboBoxDemo.preset3")); + cb.addItem(getString("ComboBoxDemo.preset4")); + cb.addItem(getString("ComboBoxDemo.preset5")); + cb.addItem(getString("ComboBoxDemo.preset6")); + cb.addItem(getString("ComboBoxDemo.preset7")); + cb.addItem(getString("ComboBoxDemo.preset8")); + cb.addItem(getString("ComboBoxDemo.preset9")); + cb.addItem(getString("ComboBoxDemo.preset10")); + cb.addActionListener(this); + return cb; + } + + void fillComboBox(JComboBox cb) { + cb.addItem(getString("ComboBoxDemo.brent")); + cb.addItem(getString("ComboBoxDemo.georges")); + cb.addItem(getString("ComboBoxDemo.hans")); + cb.addItem(getString("ComboBoxDemo.howard")); + cb.addItem(getString("ComboBoxDemo.james")); + cb.addItem(getString("ComboBoxDemo.jeff")); + cb.addItem(getString("ComboBoxDemo.jon")); + cb.addItem(getString("ComboBoxDemo.lara")); + cb.addItem(getString("ComboBoxDemo.larry")); + cb.addItem(getString("ComboBoxDemo.lisa")); + cb.addItem(getString("ComboBoxDemo.michael")); + cb.addItem(getString("ComboBoxDemo.philip")); + cb.addItem(getString("ComboBoxDemo.scott")); + } + + public void actionPerformed(ActionEvent e) { + if(e.getSource() == hairCB) { + String name = (String) parts.get((String) hairCB.getSelectedItem()); + face.setHair((ImageIcon) parts.get(name + "hair")); + faceLabel.repaint(); + } else if(e.getSource() == eyesCB) { + String name = (String) parts.get((String) eyesCB.getSelectedItem()); + face.setEyes((ImageIcon) parts.get(name + "eyes")); + faceLabel.repaint(); + } else if(e.getSource() == mouthCB) { + String name = (String) parts.get((String) mouthCB.getSelectedItem()); + face.setMouth((ImageIcon) parts.get(name + "mouth")); + faceLabel.repaint(); + } else if(e.getSource() == presetCB) { + String hair = null; + String eyes = null; + String mouth = null; + switch(presetCB.getSelectedIndex()) { + case 0: + hair = (String) parts.get("philip"); + eyes = (String) parts.get("howard"); + mouth = (String) parts.get("jeff"); + break; + case 1: + hair = (String) parts.get("jeff"); + eyes = (String) parts.get("larry"); + mouth = (String) parts.get("philip"); + break; + case 2: + hair = (String) parts.get("howard"); + eyes = (String) parts.get("scott"); + mouth = (String) parts.get("hans"); + break; + case 3: + hair = (String) parts.get("philip"); + eyes = (String) parts.get("jeff"); + mouth = (String) parts.get("hans"); + break; + case 4: + hair = (String) parts.get("brent"); + eyes = (String) parts.get("jon"); + mouth = (String) parts.get("scott"); + break; + case 5: + hair = (String) parts.get("lara"); + eyes = (String) parts.get("larry"); + mouth = (String) parts.get("lisa"); + break; + case 6: + hair = (String) parts.get("james"); + eyes = (String) parts.get("philip"); + mouth = (String) parts.get("michael"); + break; + case 7: + hair = (String) parts.get("philip"); + eyes = (String) parts.get("lisa"); + mouth = (String) parts.get("brent"); + break; + case 8: + hair = (String) parts.get("james"); + eyes = (String) parts.get("philip"); + mouth = (String) parts.get("jon"); + break; + case 9: + hair = (String) parts.get("lara"); + eyes = (String) parts.get("jon"); + mouth = (String) parts.get("scott"); + break; + } + if(hair != null) { + hairCB.setSelectedItem(hair); + eyesCB.setSelectedItem(eyes); + mouthCB.setSelectedItem(mouth); + faceLabel.repaint(); + } + } + } + + class Face implements Icon { + ImageIcon hair; + ImageIcon eyes; + ImageIcon mouth; + + void setHair(ImageIcon i) { + hair = i; + } + + void setEyes(ImageIcon i) { + eyes = i; + } + + void setMouth(ImageIcon i) { + mouth = i; + } + + public void paintIcon(Component c, Graphics g, int x, int y) { + int height = y; + x = c.getWidth()/2 - getIconWidth()/2; + + if(hair != null) { + hair.paintIcon(c, g, x, height); height += hair.getIconHeight(); + } + + if(eyes != null) { + eyes.paintIcon(c, g, x, height); height += eyes.getIconHeight(); + } + + if(mouth != null) { + mouth.paintIcon(c, g, x, height); + } + } + + public int getIconWidth() { + return 344; + } + + public int getIconHeight() { + return 455; + } + } +} diff --git a/src/demo/share/jfc/SwingSet2/ContrastTheme.java b/src/demo/share/jfc/SwingSet2/ContrastTheme.java new file mode 100644 index 00000000000..ff61fc82740 --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/ContrastTheme.java @@ -0,0 +1,100 @@ +/* + * + * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * - Neither the name of Oracle nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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. + */ + + +import javax.swing.plaf.*; +import javax.swing.plaf.basic.*; +import javax.swing.plaf.metal.*; +import javax.swing.*; +import javax.swing.border.*; +import java.awt.*; + +/** + * This class describes a higher-contrast Metal Theme. + * + * @author Michael C. Albers + */ + +public class ContrastTheme extends DefaultMetalTheme { + + public String getName() { return "Contrast"; } + + private final ColorUIResource primary1 = new ColorUIResource(0, 0, 0); + private final ColorUIResource primary2 = new ColorUIResource(204, 204, 204); + private final ColorUIResource primary3 = new ColorUIResource(255, 255, 255); + private final ColorUIResource primaryHighlight = new ColorUIResource(102,102,102); + + private final ColorUIResource secondary2 = new ColorUIResource(204, 204, 204); + private final ColorUIResource secondary3 = new ColorUIResource(255, 255, 255); + private final ColorUIResource controlHighlight = new ColorUIResource(102,102,102); + + protected ColorUIResource getPrimary1() { return primary1; } + protected ColorUIResource getPrimary2() { return primary2; } + protected ColorUIResource getPrimary3() { return primary3; } + public ColorUIResource getPrimaryControlHighlight() { return primaryHighlight;} + + protected ColorUIResource getSecondary2() { return secondary2; } + protected ColorUIResource getSecondary3() { return secondary3; } + public ColorUIResource getControlHighlight() { return super.getSecondary3(); } + + public ColorUIResource getFocusColor() { return getBlack(); } + + public ColorUIResource getTextHighlightColor() { return getBlack(); } + public ColorUIResource getHighlightedTextColor() { return getWhite(); } + + public ColorUIResource getMenuSelectedBackground() { return getBlack(); } + public ColorUIResource getMenuSelectedForeground() { return getWhite(); } + public ColorUIResource getAcceleratorForeground() { return getBlack(); } + public ColorUIResource getAcceleratorSelectedForeground() { return getWhite(); } + + + public void addCustomEntriesToTable(UIDefaults table) { + + Border blackLineBorder = new BorderUIResource(new LineBorder( getBlack() )); + + Object textBorder = new BorderUIResource( new CompoundBorder( + blackLineBorder, + new BasicBorders.MarginBorder())); + + table.put( "ToolTip.border", blackLineBorder); + table.put( "TitledBorder.border", blackLineBorder); + + table.put( "TextField.border", textBorder); + table.put( "PasswordField.border", textBorder); + table.put( "TextArea.border", textBorder); + table.put( "TextPane.border", textBorder); + table.put( "EditorPane.border", textBorder); + + + } + +} diff --git a/src/demo/share/jfc/SwingSet2/DemoModule.java b/src/demo/share/jfc/SwingSet2/DemoModule.java new file mode 100644 index 00000000000..8fb6042bb0b --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/DemoModule.java @@ -0,0 +1,229 @@ +/* + * + * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * - Neither the name of Oracle nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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. + */ + +import javax.swing.*; +import javax.swing.event.*; +import javax.swing.text.*; +import javax.swing.border.*; +import javax.swing.colorchooser.*; +import javax.swing.filechooser.*; +import javax.accessibility.*; + +import java.awt.*; +import java.awt.event.*; +import java.beans.*; +import java.util.*; +import java.io.*; +import java.applet.*; +import java.net.*; + +/** + * A generic SwingSet2 demo module + * + * @author Jeff Dinkins + */ +public class DemoModule extends JApplet { + + // The preferred size of the demo + private int PREFERRED_WIDTH = 680; + private int PREFERRED_HEIGHT = 600; + + Border loweredBorder = new CompoundBorder(new SoftBevelBorder(SoftBevelBorder.LOWERED), + new EmptyBorder(5,5,5,5)); + + // Premade convenience dimensions, for use wherever you need 'em. + public static Dimension HGAP2 = new Dimension(2,1); + public static Dimension VGAP2 = new Dimension(1,2); + + public static Dimension HGAP5 = new Dimension(5,1); + public static Dimension VGAP5 = new Dimension(1,5); + + public static Dimension HGAP10 = new Dimension(10,1); + public static Dimension VGAP10 = new Dimension(1,10); + + public static Dimension HGAP15 = new Dimension(15,1); + public static Dimension VGAP15 = new Dimension(1,15); + + public static Dimension HGAP20 = new Dimension(20,1); + public static Dimension VGAP20 = new Dimension(1,20); + + public static Dimension HGAP25 = new Dimension(25,1); + public static Dimension VGAP25 = new Dimension(1,25); + + public static Dimension HGAP30 = new Dimension(30,1); + public static Dimension VGAP30 = new Dimension(1,30); + + private SwingSet2 swingset = null; + private JPanel panel = null; + private String resourceName = null; + private String iconPath = null; + private String sourceCode = null; + + public DemoModule(SwingSet2 swingset) { + this(swingset, null, null); + } + + public DemoModule(SwingSet2 swingset, String resourceName, String iconPath) { + UIManager.put("swing.boldMetal", Boolean.FALSE); + panel = new JPanel(); + panel.setLayout(new BorderLayout()); + + this.resourceName = resourceName; + this.iconPath = iconPath; + this.swingset = swingset; + + loadSourceCode(); + } + + public String getResourceName() { + return resourceName; + } + + public JPanel getDemoPanel() { + return panel; + } + + public SwingSet2 getSwingSet2() { + return swingset; + } + + + public String getString(String key) { + + if (getSwingSet2() != null) { + return getSwingSet2().getString(key); + }else{ + return "nada"; + } + } + + public char getMnemonic(String key) { + return (getString(key)).charAt(0); + } + + public ImageIcon createImageIcon(String filename, String description) { + if(getSwingSet2() != null) { + return getSwingSet2().createImageIcon(filename, description); + } else { + String path = "/resources/images/" + filename; + return new ImageIcon(getClass().getResource(path), description); + } + } + + + public String getSourceCode() { + return sourceCode; + } + + public void loadSourceCode() { + if(getResourceName() != null) { + String filename = getResourceName() + ".java"; + sourceCode = new String("
");
+ InputStream is;
+ InputStreamReader isr;
+ URL url;
+
+ try {
+ url = getClass().getResource(filename);
+ is = url.openStream();
+ isr = new InputStreamReader(is, "UTF-8");
+ BufferedReader reader = new BufferedReader(isr);
+
+ // Read one line at a time, htmlize using super-spiffy
+ // html java code formating utility from www.CoolServlets.com
+ String line = reader.readLine();
+ while(line != null) {
+ sourceCode += line + " \n ";
+ line = reader.readLine();
+ }
+ sourceCode += new String("");
+ } catch (Exception ex) {
+ sourceCode = "Could not load file: " + filename;
+ }
+ }
+ }
+
+ public String getName() {
+ return getString(getResourceName() + ".name");
+ };
+
+ public Icon getIcon() {
+ return createImageIcon(iconPath, getResourceName() + ".name");
+ };
+
+ public String getToolTip() {
+ return getString(getResourceName() + ".tooltip");
+ };
+
+ public void mainImpl() {
+ JFrame frame = new JFrame(getName());
+ frame.getContentPane().setLayout(new BorderLayout());
+ frame.getContentPane().add(getDemoPanel(), BorderLayout.CENTER);
+ getDemoPanel().setPreferredSize(new Dimension(PREFERRED_WIDTH, PREFERRED_HEIGHT));
+ frame.pack();
+ frame.show();
+ }
+
+ public JPanel createHorizontalPanel(boolean threeD) {
+ JPanel p = new JPanel();
+ p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
+ p.setAlignmentY(TOP_ALIGNMENT);
+ p.setAlignmentX(LEFT_ALIGNMENT);
+ if(threeD) {
+ p.setBorder(loweredBorder);
+ }
+ return p;
+ }
+
+ public JPanel createVerticalPanel(boolean threeD) {
+ JPanel p = new JPanel();
+ p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
+ p.setAlignmentY(TOP_ALIGNMENT);
+ p.setAlignmentX(LEFT_ALIGNMENT);
+ if(threeD) {
+ p.setBorder(loweredBorder);
+ }
+ return p;
+ }
+
+ public static void main(String[] args) {
+ DemoModule demo = new DemoModule(null);
+ demo.mainImpl();
+ }
+
+ public void init() {
+ getContentPane().setLayout(new BorderLayout());
+ getContentPane().add(getDemoPanel(), BorderLayout.CENTER);
+ }
+
+ void updateDragEnabled(boolean dragEnabled) {}
+}
diff --git a/src/demo/share/jfc/SwingSet2/DirectionPanel.java b/src/demo/share/jfc/SwingSet2/DirectionPanel.java
new file mode 100644
index 00000000000..1411aafbd46
--- /dev/null
+++ b/src/demo/share/jfc/SwingSet2/DirectionPanel.java
@@ -0,0 +1,159 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Oracle nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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.
+ */
+
+import javax.swing.*;
+import javax.swing.border.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.*;
+
+
+/**
+ * @author Jeff Dinkins
+ * @author Chester Rose
+ * @author Brian Beck
+ */
+
+public class DirectionPanel extends JPanel {
+
+ private ButtonGroup group;
+
+ public DirectionPanel(boolean enable, String selection, ActionListener l) {
+ setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
+ setAlignmentY(TOP_ALIGNMENT);
+ setAlignmentX(LEFT_ALIGNMENT);
+
+ Box firstThree = Box.createHorizontalBox();
+ Box secondThree = Box.createHorizontalBox();
+ Box thirdThree = Box.createHorizontalBox();
+
+ if(!enable) {
+ selection = "None";
+ }
+
+ group = new ButtonGroup();
+ DirectionButton b;
+ b = (DirectionButton) firstThree.add(new DirectionButton( tl_dot, tldn_dot, "NW", "Sets the orientation to the North-West", l, group, selection.equals("NW")));
+ b.setEnabled(enable);
+ b = (DirectionButton) firstThree.add(new DirectionButton( tm_dot, tmdn_dot, "N", "Sets the orientation to the North", l, group, selection.equals("N")));
+ b.setEnabled(enable);
+ b = (DirectionButton) firstThree.add(new DirectionButton( tr_dot, trdn_dot, "NE", "Sets the orientation to the North-East", l, group, selection.equals("NE")));
+ b.setEnabled(enable);
+ b = (DirectionButton) secondThree.add(new DirectionButton( ml_dot, mldn_dot, "W", "Sets the orientation to the West", l, group, selection.equals("W")));
+ b.setEnabled(enable);
+ b = (DirectionButton) secondThree.add(new DirectionButton( c_dot, cdn_dot, "C", "Sets the orientation to the Center", l, group, selection.equals("C")));
+ b.setEnabled(enable);
+ b = (DirectionButton) secondThree.add(new DirectionButton( mr_dot, mrdn_dot, "E", "Sets the orientation to the East", l, group, selection.equals("E")));
+ b.setEnabled(enable);
+ b = (DirectionButton) thirdThree.add(new DirectionButton( bl_dot, bldn_dot, "SW", "Sets the orientation to the South-West", l, group, selection.equals("SW")));
+ b.setEnabled(enable);
+ b = (DirectionButton) thirdThree.add(new DirectionButton( bm_dot, bmdn_dot, "S", "Sets the orientation to the South", l, group, selection.equals("S")));
+ b.setEnabled(enable);
+ b = (DirectionButton) thirdThree.add(new DirectionButton( br_dot, brdn_dot, "SE", "Sets the orientation to the South-East", l, group, selection.equals("SE")));
+ b.setEnabled(enable);
+
+ add(firstThree);
+ add(secondThree);
+ add(thirdThree);
+ }
+
+ public String getSelection() {
+ return group.getSelection().getActionCommand();
+ }
+
+ public void setSelection( String selection ) {
+ Enumeration e = group.getElements();
+ while( e.hasMoreElements() ) {
+ JRadioButton b = (JRadioButton)e.nextElement();
+ if( b.getActionCommand().equals(selection) ) {
+ b.setSelected(true);
+ }
+ }
+ }
+
+ // Chester's way cool layout buttons
+ public ImageIcon bl_dot = loadImageIcon("bl.gif","bottom left layout button");
+ public ImageIcon bldn_dot = loadImageIcon("bldn.gif","selected bottom left layout button");
+ public ImageIcon bm_dot = loadImageIcon("bm.gif","bottom middle layout button");
+ public ImageIcon bmdn_dot = loadImageIcon("bmdn.gif","selected bottom middle layout button");
+ public ImageIcon br_dot = loadImageIcon("br.gif","bottom right layout button");
+ public ImageIcon brdn_dot = loadImageIcon("brdn.gif","selected bottom right layout button");
+ public ImageIcon c_dot = loadImageIcon("c.gif","center layout button");
+ public ImageIcon cdn_dot = loadImageIcon("cdn.gif","selected center layout button");
+ public ImageIcon ml_dot = loadImageIcon("ml.gif","middle left layout button");
+ public ImageIcon mldn_dot = loadImageIcon("mldn.gif","selected middle left layout button");
+ public ImageIcon mr_dot = loadImageIcon("mr.gif","middle right layout button");
+ public ImageIcon mrdn_dot = loadImageIcon("mrdn.gif","selected middle right layout button");
+ public ImageIcon tl_dot = loadImageIcon("tl.gif","top left layout button");
+ public ImageIcon tldn_dot = loadImageIcon("tldn.gif","selected top left layout button");
+ public ImageIcon tm_dot = loadImageIcon("tm.gif","top middle layout button");
+ public ImageIcon tmdn_dot = loadImageIcon("tmdn.gif","selected top middle layout button");
+ public ImageIcon tr_dot = loadImageIcon("tr.gif","top right layout button");
+ public ImageIcon trdn_dot = loadImageIcon("trdn.gif","selected top right layout button");
+
+ public ImageIcon loadImageIcon(String filename, String description) {
+ String path = "/resources/images/buttons/" + filename;
+ return new ImageIcon(getClass().getResource(path), description);
+ }
+
+
+ public class DirectionButton extends JRadioButton {
+
+ /**
+ * A layout direction button
+ */
+ public DirectionButton(Icon icon, Icon downIcon, String direction,
+ String description, ActionListener l,
+ ButtonGroup group, boolean selected)
+ {
+ super();
+ this.addActionListener(l);
+ setFocusPainted(false);
+ setHorizontalTextPosition(CENTER);
+ group.add(this);
+ setIcon(icon);
+ setSelectedIcon(downIcon);
+ setActionCommand(direction);
+ getAccessibleContext().setAccessibleName(direction);
+ getAccessibleContext().setAccessibleDescription(description);
+ setSelected(selected);
+ }
+
+ public boolean isFocusTraversable() {
+ return false;
+ }
+
+ public void setBorder(Border b) {
+ }
+ }
+}
diff --git a/src/demo/share/jfc/SwingSet2/EmeraldTheme.java b/src/demo/share/jfc/SwingSet2/EmeraldTheme.java
new file mode 100644
index 00000000000..849cbb0d058
--- /dev/null
+++ b/src/demo/share/jfc/SwingSet2/EmeraldTheme.java
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Oracle nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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.
+ */
+
+import javax.swing.plaf.*;
+import javax.swing.plaf.metal.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import java.awt.*;
+
+/**
+ * This class describes a theme using glowing green colors.
+ *
+ * @author Jeff Dinkins
+ */
+public class EmeraldTheme extends DefaultMetalTheme {
+
+ public String getName() { return "Emerald"; }
+
+ private final ColorUIResource primary1 = new ColorUIResource(51, 142, 71);
+ private final ColorUIResource primary2 = new ColorUIResource(102, 193, 122);
+ private final ColorUIResource primary3 = new ColorUIResource(153, 244, 173);
+
+ protected ColorUIResource getPrimary1() { return primary1; }
+ protected ColorUIResource getPrimary2() { return primary2; }
+ protected ColorUIResource getPrimary3() { return primary3; }
+
+}
diff --git a/src/demo/share/jfc/SwingSet2/ExampleFileView.java b/src/demo/share/jfc/SwingSet2/ExampleFileView.java
new file mode 100644
index 00000000000..9e6670581d0
--- /dev/null
+++ b/src/demo/share/jfc/SwingSet2/ExampleFileView.java
@@ -0,0 +1,176 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Oracle nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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.
+ */
+
+import javax.swing.*;
+import javax.swing.filechooser.*;
+
+import java.io.File;
+import java.util.Hashtable;
+
+/**
+ * A convenience implementation of the FileView interface that
+ * manages name, icon, traversable, and file type information.
+ *
+ * This this implemention will work well with file systems that use
+ * "dot" extensions to indicate file type. For example: "picture.gif"
+ * as a gif image.
+ *
+ * If the java.io.File ever contains some of this information, such as
+ * file type, icon, and hidden file inforation, this implementation may
+ * become obsolete. At minimum, it should be rewritten at that time to
+ * use any new type information provided by java.io.File
+ *
+ * Example:
+ * JFileChooser chooser = new JFileChooser();
+ * fileView = new ExampleFileView();
+ * fileView.putIcon("jpg", new ImageIcon("images/jpgIcon.jpg"));
+ * fileView.putIcon("gif", new ImageIcon("images/gifIcon.gif"));
+ * chooser.setFileView(fileView);
+ *
+ * @author Jeff Dinkins
+ */
+public class ExampleFileView extends FileView {
+ private Hashtable icons = new Hashtable(5);
+ private Hashtable fileDescriptions = new Hashtable(5);
+ private Hashtable typeDescriptions = new Hashtable(5);
+
+ /**
+ * The name of the file. Do nothing special here. Let
+ * the system file view handle this.
+ * @see FileView#getName
+ */
+ public String getName(File f) {
+ return null;
+ }
+
+ /**
+ * Adds a human readable description of the file.
+ */
+ public void putDescription(File f, String fileDescription) {
+ fileDescriptions.put(f, fileDescription);
+ }
+
+ /**
+ * A human readable description of the file.
+ *
+ * @see FileView#getDescription
+ */
+ public String getDescription(File f) {
+ return (String) fileDescriptions.get(f);
+ };
+
+ /**
+ * Adds a human readable type description for files. Based on "dot"
+ * extension strings, e.g: ".gif". Case is ignored.
+ */
+ public void putTypeDescription(String extension, String typeDescription) {
+ typeDescriptions.put(extension, typeDescription);
+ }
+
+ /**
+ * Adds a human readable type description for files of the type of
+ * the passed in file. Based on "dot" extension strings, e.g: ".gif".
+ * Case is ignored.
+ */
+ public void putTypeDescription(File f, String typeDescription) {
+ putTypeDescription(getExtension(f), typeDescription);
+ }
+
+ /**
+ * A human readable description of the type of the file.
+ *
+ * @see FileView#getTypeDescription
+ */
+ public String getTypeDescription(File f) {
+ return (String) typeDescriptions.get(getExtension(f));
+ }
+
+ /**
+ * Convenience method that returns the "dot" extension for the
+ * given file.
+ */
+ public String getExtension(File f) {
+ String name = f.getName();
+ if(name != null) {
+ int extensionIndex = name.lastIndexOf('.');
+ if(extensionIndex < 0) {
+ return null;
+ }
+ return name.substring(extensionIndex+1).toLowerCase();
+ }
+ return null;
+ }
+
+ /**
+ * Adds an icon based on the file type "dot" extension
+ * string, e.g: ".gif". Case is ignored.
+ */
+ public void putIcon(String extension, Icon icon) {
+ icons.put(extension, icon);
+ }
+
+ /**
+ * Icon that reperesents this file. Default implementation returns
+ * null. You might want to override this to return something more
+ * interesting.
+ *
+ * @see FileView#getIcon
+ */
+ public Icon getIcon(File f) {
+ Icon icon = null;
+ String extension = getExtension(f);
+ if(extension != null) {
+ icon = (Icon) icons.get(extension);
+ }
+ return icon;
+ }
+
+ /**
+ * Whether the directory is traversable or not. Generic implementation
+ * returns true for all directories and special folders.
+ *
+ * You might want to subtype ExampleFileView to do somethimg more interesting,
+ * such as recognize compound documents directories; in such a case you might
+ * return a special icon for the directory that makes it look like a regular
+ * document, and return false for isTraversable to not allow users to
+ * descend into the directory.
+ *
+ * @see FileView#isTraversable
+ */
+ public Boolean isTraversable(File f) {
+ // if (some_reason) {
+ // return Boolean.FALSE;
+ // }
+ return null; // Use default from FileSystemView
+ };
+
+}
diff --git a/src/demo/share/jfc/SwingSet2/FileChooserDemo.java b/src/demo/share/jfc/SwingSet2/FileChooserDemo.java
new file mode 100644
index 00000000000..297e5cb7f54
--- /dev/null
+++ b/src/demo/share/jfc/SwingSet2/FileChooserDemo.java
@@ -0,0 +1,436 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Oracle nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * JFileChooserDemo
+ *
+ * @author Jeff Dinkins
+ */
+public class FileChooserDemo extends DemoModule {
+ JLabel theImage;
+ Icon jpgIcon;
+ Icon gifIcon;
+
+ /**
+ * main method allows us to run as a standalone demo.
+ */
+ public static void main(String[] args) {
+ FileChooserDemo demo = new FileChooserDemo(null);
+ demo.mainImpl();
+ }
+
+ /**
+ * FileChooserDemo Constructor
+ */
+ public FileChooserDemo(SwingSet2 swingset) {
+ // Set the title for this demo, and an icon used to represent this
+ // demo inside the SwingSet2 app.
+ super(swingset, "FileChooserDemo", "toolbar/JFileChooser.gif");
+ createFileChooserDemo();
+ }
+
+ public void createFileChooserDemo() {
+ theImage = new JLabel("");
+ jpgIcon = createImageIcon("filechooser/jpgIcon.jpg", "jpg image");
+ gifIcon = createImageIcon("filechooser/gifIcon.gif", "gif image");
+
+ JPanel demoPanel = getDemoPanel();
+ demoPanel.setLayout(new BoxLayout(demoPanel, BoxLayout.Y_AXIS));
+
+ JPanel innerPanel = new JPanel();
+ innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.X_AXIS));
+
+ demoPanel.add(Box.createRigidArea(VGAP20));
+ demoPanel.add(innerPanel);
+ demoPanel.add(Box.createRigidArea(VGAP20));
+
+ innerPanel.add(Box.createRigidArea(HGAP20));
+
+ // Create a panel to hold buttons
+ JPanel buttonPanel = new JPanel() {
+ public Dimension getMaximumSize() {
+ return new Dimension(getPreferredSize().width, super.getMaximumSize().height);
+ }
+ };
+ buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.Y_AXIS));
+
+ buttonPanel.add(Box.createRigidArea(VGAP15));
+ buttonPanel.add(createPlainFileChooserButton());
+ buttonPanel.add(Box.createRigidArea(VGAP15));
+ buttonPanel.add(createPreviewFileChooserButton());
+ buttonPanel.add(Box.createRigidArea(VGAP15));
+ buttonPanel.add(createCustomFileChooserButton());
+ buttonPanel.add(Box.createVerticalGlue());
+
+ // Create a panel to hold the image
+ JPanel imagePanel = new JPanel();
+ imagePanel.setLayout(new BorderLayout());
+ imagePanel.setBorder(new BevelBorder(BevelBorder.LOWERED));
+ JScrollPane scroller = new JScrollPane(theImage);
+ scroller.getVerticalScrollBar().setUnitIncrement(10);
+ scroller.getHorizontalScrollBar().setUnitIncrement(10);
+ imagePanel.add(scroller, BorderLayout.CENTER);
+
+ // add buttons and image panels to inner panel
+ innerPanel.add(buttonPanel);
+ innerPanel.add(Box.createRigidArea(HGAP30));
+ innerPanel.add(imagePanel);
+ innerPanel.add(Box.createRigidArea(HGAP20));
+ }
+
+ public JFileChooser createFileChooser() {
+ // create a filechooser
+ JFileChooser fc = new JFileChooser();
+ if (getSwingSet2() != null && getSwingSet2().isDragEnabled()) {
+ fc.setDragEnabled(true);
+ }
+
+ // set the current directory to be the images directory
+ File swingFile = new File("resources/images/About.jpg");
+ if(swingFile.exists()) {
+ fc.setCurrentDirectory(swingFile);
+ fc.setSelectedFile(swingFile);
+ }
+
+ return fc;
+ }
+
+
+ public JButton createPlainFileChooserButton() {
+ Action a = new AbstractAction(getString("FileChooserDemo.plainbutton")) {
+ public void actionPerformed(ActionEvent e) {
+ JFileChooser fc = createFileChooser();
+
+ // show the filechooser
+ int result = fc.showOpenDialog(getDemoPanel());
+
+ // if we selected an image, load the image
+ if(result == JFileChooser.APPROVE_OPTION) {
+ loadImage(fc.getSelectedFile().getPath());
+ }
+ }
+ };
+ return createButton(a);
+ }
+
+ public JButton createPreviewFileChooserButton() {
+ Action a = new AbstractAction(getString("FileChooserDemo.previewbutton")) {
+ public void actionPerformed(ActionEvent e) {
+ JFileChooser fc = createFileChooser();
+
+ // Add filefilter & fileview
+ javax.swing.filechooser.FileFilter filter = createFileFilter(
+ getString("FileChooserDemo.filterdescription"),
+ "jpg", "gif");
+ ExampleFileView fileView = new ExampleFileView();
+ fileView.putIcon("jpg", jpgIcon);
+ fileView.putIcon("gif", gifIcon);
+ fc.setFileView(fileView);
+ fc.addChoosableFileFilter(filter);
+ fc.setFileFilter(filter);
+
+ // add preview accessory
+ fc.setAccessory(new FilePreviewer(fc));
+
+ // show the filechooser
+ int result = fc.showOpenDialog(getDemoPanel());
+
+ // if we selected an image, load the image
+ if(result == JFileChooser.APPROVE_OPTION) {
+ loadImage(fc.getSelectedFile().getPath());
+ }
+ }
+ };
+ return createButton(a);
+ }
+
+ JDialog dialog;
+ JFileChooser fc;
+
+ private javax.swing.filechooser.FileFilter createFileFilter(
+ String description, String...extensions) {
+ description = createFileNameFilterDescriptionFromExtensions(
+ description, extensions);
+ return new FileNameExtensionFilter(description, extensions);
+ }
+
+ private String createFileNameFilterDescriptionFromExtensions(
+ String description, String[] extensions) {
+ String fullDescription = (description == null) ?
+ "(" : description + " (";
+ // build the description from the extension list
+ fullDescription += "." + extensions[0];
+ for (int i = 1; i < extensions.length; i++) {
+ fullDescription += ", .";
+ fullDescription += extensions[i];
+ }
+ fullDescription += ")";
+ return fullDescription;
+ }
+
+ public JButton createCustomFileChooserButton() {
+ Action a = new AbstractAction(getString("FileChooserDemo.custombutton")) {
+ public void actionPerformed(ActionEvent e) {
+ fc = createFileChooser();
+
+ // Add filefilter & fileview
+ javax.swing.filechooser.FileFilter filter = createFileFilter(
+ getString("FileChooserDemo.filterdescription"),
+ "jpg", "gif");
+ ExampleFileView fileView = new ExampleFileView();
+ fileView.putIcon("jpg", jpgIcon);
+ fileView.putIcon("gif", gifIcon);
+ fc.setFileView(fileView);
+ fc.addChoosableFileFilter(filter);
+
+ // add preview accessory
+ fc.setAccessory(new FilePreviewer(fc));
+
+ // remove the approve/cancel buttons
+ fc.setControlButtonsAreShown(false);
+
+ // make custom controls
+ //wokka
+ JPanel custom = new JPanel();
+ custom.setLayout(new BoxLayout(custom, BoxLayout.Y_AXIS));
+ custom.add(Box.createRigidArea(VGAP10));
+ JLabel description = new JLabel(getString("FileChooserDemo.description"));
+ description.setAlignmentX(JLabel.CENTER_ALIGNMENT);
+ custom.add(description);
+ custom.add(Box.createRigidArea(VGAP10));
+ custom.add(fc);
+
+ Action okAction = createOKAction();
+ fc.addActionListener(okAction);
+
+ JPanel buttons = new JPanel();
+ buttons.setLayout(new BoxLayout(buttons, BoxLayout.X_AXIS));
+ buttons.add(Box.createRigidArea(HGAP10));
+ buttons.add(createImageButton(createFindAction()));
+ buttons.add(Box.createRigidArea(HGAP10));
+ buttons.add(createButton(createAboutAction()));
+ buttons.add(Box.createRigidArea(HGAP10));
+ buttons.add(createButton(okAction));
+ buttons.add(Box.createRigidArea(HGAP10));
+ buttons.add(createButton(createCancelAction()));
+ buttons.add(Box.createRigidArea(HGAP10));
+ buttons.add(createImageButton(createHelpAction()));
+ buttons.add(Box.createRigidArea(HGAP10));
+
+ custom.add(buttons);
+ custom.add(Box.createRigidArea(VGAP10));
+
+ // show the filechooser
+ Frame parent = (Frame) SwingUtilities.getAncestorOfClass(Frame.class, getDemoPanel());
+ dialog = new JDialog(parent, getString("FileChooserDemo.dialogtitle"), true);
+ dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+ dialog.getContentPane().add(custom, BorderLayout.CENTER);
+ dialog.pack();
+ dialog.setLocationRelativeTo(getDemoPanel());
+ dialog.show();
+ }
+ };
+ return createButton(a);
+ }
+
+ public Action createAboutAction() {
+ return new AbstractAction(getString("FileChooserDemo.about")) {
+ public void actionPerformed(ActionEvent e) {
+ File file = fc.getSelectedFile();
+ String text;
+ if(file == null) {
+ text = getString("FileChooserDemo.nofileselected");
+ } else {
+ text = "" + getString("FileChooserDemo.thefile");
+ text += "TextAndMnemonicUtils allows to extract text and mnemonic values
+ * from the unified text & mnemonic strings. For example:
+ * LafMenu.laf.labelAndMnemonic=&Look && Feel
+ * The extracted text is "Look & Feel" and the extracted mnemonic mnemonic is "L".
+ *
+ * There are several patterns for the text and mnemonic suffixes which are used
+ * in the resource file. The patterns format is:
+ * (resource key -> unified text & mnemonic resource key).
+ *
+ * Keys that have label suffixes:
+ * (xxx_label -> xxx.labelAndMnemonic)
+ *
+ * Keys that have mnemonic suffixes:
+ * (xxx_mnemonic -> xxx.labelAndMnemonic)
+ *
+ * Keys that do not have definite suffixes:
+ * (xxx -> xxx.labelAndMnemonic)
+ *
+ * @author Alexander Scherbatiy
+ */
+public class TextAndMnemonicUtils {
+
+ // Label suffix for the text & mnemonic resource
+ private static final String LABEL_SUFFIX = ".labelAndMnemonic";
+
+ // Resource bundle for internationalized and accessible text
+ private static ResourceBundle bundle = null;
+
+ // Resource properties for the mnemonic key defenition
+ private static Properties properties = null;
+
+ static {
+ bundle = ResourceBundle.getBundle("resources.swingset");
+ properties = new Properties();
+ try {
+ properties.load(TextAndMnemonicUtils.class.getResourceAsStream("resources/swingset.properties"));
+ } catch (IOException ex) {
+ System.out.println("java.io.IOException: Couldn't load properties from: resources/swingset.properties");
+ }
+ }
+
+ /**
+ * Returns accessible and internationalized strings or mnemonics from the
+ * resource bundle. The key is converted to the text & mnemonic key.
+ *
+ * The following patterns are checked:
+ * Keys that have label suffixes:
+ * (xxx_label -> xxx.labelAndMnemonic)
+ *
+ * Keys that have mnemonic suffixes:
+ * (xxx_mnemonic -> xxx.labelAndMnemonic)
+ *
+ * Keys that do not have definite suffixes:
+ * (xxx -> xxx.labelAndMnemonic)
+ *
+ * Properties class is used to check if a key created for mnemonic exists.
+ */
+ public static String getTextAndMnemonicString(String key) {
+
+ if (key.endsWith("_label")) {
+ String compositeKey = composeKey(key, 6, LABEL_SUFFIX);
+ String textAndMnemonic = bundle.getString(compositeKey);
+ return getTextFromTextAndMnemonic(textAndMnemonic);
+ }
+
+ if (key.endsWith("_mnemonic")) {
+
+ String compositeKey = composeKey(key, 9, LABEL_SUFFIX);
+ Object value = properties.getProperty(compositeKey);
+
+ if (value != null) {
+ String textAndMnemonic = bundle.getString(compositeKey);
+ return getMnemonicFromTextAndMnemonic(textAndMnemonic);
+ }
+
+ }
+
+ String compositeKey = composeKey(key, 0, LABEL_SUFFIX);
+ Object value = properties.getProperty(compositeKey);
+
+ if (value != null) {
+ String textAndMnemonic = bundle.getString(compositeKey);
+ return getTextFromTextAndMnemonic(textAndMnemonic);
+ }
+
+ String textAndMnemonic = bundle.getString(key);
+ return getTextFromTextAndMnemonic(textAndMnemonic);
+ }
+
+ /**
+ * Convert the text & mnemonic string to text string
+ *
+ * The '&' symbol is treated as the mnemonic pointer
+ * The double "&&" symbols are treated as the single '&'
+ *
+ * For example the string "&Look && Feel" is converted to "Look & Feel"
+ */
+ public static String getTextFromTextAndMnemonic(String text) {
+
+ StringBuilder sb = new StringBuilder();
+
+ int prevIndex = 0;
+ int nextIndex = text.indexOf('&');
+ int len = text.length();
+
+ while (nextIndex != -1) {
+
+ String s = text.substring(prevIndex, nextIndex);
+ sb.append(s);
+
+ nextIndex++;
+
+ if (nextIndex != len && text.charAt(nextIndex) == '&') {
+ sb.append('&');
+ nextIndex++;
+ }
+
+ prevIndex = nextIndex;
+ nextIndex = text.indexOf('&', nextIndex + 1);
+ }
+
+ sb.append(text.substring(prevIndex, text.length()));
+ return sb.toString();
+ }
+
+ /**
+ * Convert the text & mnemonic string to mnemonic
+ *
+ * The '&' symbol is treated the mnemonic pointer
+ * The double "&&" symbols are treated as the single '&'
+ *
+ * For example the string "&Look && Feel" is converted to "L"
+ */
+ public static String getMnemonicFromTextAndMnemonic(String text) {
+ int len = text.length();
+ int index = text.indexOf('&');
+
+ while (0 <= index && index < text.length() - 1) {
+ index++;
+ if (text.charAt(index) == '&') {
+ index = text.indexOf('&', index + 1);
+ } else {
+ char c = text.charAt(index);
+ return String.valueOf(Character.toUpperCase(c));
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Removes the last n characters and adds the suffix
+ */
+ private static String composeKey(String key, int reduce, String sufix) {
+ return key.substring(0, key.length() - reduce) + sufix;
+ }
+}
diff --git a/src/demo/share/jfc/SwingSet2/ToolTipDemo.java b/src/demo/share/jfc/SwingSet2/ToolTipDemo.java
new file mode 100644
index 00000000000..c91af2d3bbe
--- /dev/null
+++ b/src/demo/share/jfc/SwingSet2/ToolTipDemo.java
@@ -0,0 +1,160 @@
+/*
+ *
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Oracle nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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.
+ */
+
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.text.*;
+import javax.swing.border.*;
+import javax.swing.colorchooser.*;
+import javax.swing.filechooser.*;
+import javax.accessibility.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.beans.*;
+import java.util.*;
+import java.io.*;
+import java.applet.*;
+import java.net.*;
+
+/**
+ * ToolTip Demo
+ *
+ * @author Jeff Dinkins
+ */
+public class ToolTipDemo extends DemoModule {
+
+ /**
+ * main method allows us to run as a standalone demo.
+ */
+ public static void main(String[] args) {
+ ToolTipDemo demo = new ToolTipDemo(null);
+ demo.mainImpl();
+ }
+
+ /**
+ * ToolTipDemo Constructor
+ */
+ public ToolTipDemo(SwingSet2 swingset) {
+ // Set the title for this demo, and an icon used to represent this
+ // demo inside the SwingSet2 app.
+ super(swingset, "ToolTipDemo", "toolbar/ToolTip.gif");
+
+ // Set the layout manager.
+ JPanel p = getDemoPanel();
+ p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
+ p.setBackground(Color.white);
+
+ // Create a Cow to put in the center of the panel.
+ Cow cow = new Cow();
+ cow.getAccessibleContext().setAccessibleName(getString("ToolTipDemo.accessible_cow"));
+
+ // Set the tooltip text. Note, for fun, we also set more tooltip text
+ // descriptions for the cow down below in the Cow.contains() method.
+ cow.setToolTipText(getString("ToolTipDemo.cow"));
+
+ // Add the cow midway down the panel
+ p.add(Box.createRigidArea(new Dimension(1, 150)));
+ p.add(cow);
+ }
+
+
+ class Cow extends JLabel {
+ Polygon cowgon = new Polygon();
+
+ public Cow() {
+ super(createImageIcon("tooltip/cow.gif", getString("ToolTipDemo.bessie")));
+ setAlignmentX(CENTER_ALIGNMENT);
+
+ // Set polygon points that define the outline of the cow.
+ cowgon.addPoint(3,20); cowgon.addPoint(44,4);
+ cowgon.addPoint(79,15); cowgon.addPoint(130,11);
+ cowgon.addPoint(252,5); cowgon.addPoint(181,17);
+ cowgon.addPoint(301,45); cowgon.addPoint(292,214);
+ cowgon.addPoint(269,209); cowgon.addPoint(266,142);
+ cowgon.addPoint(250,161); cowgon.addPoint(235,218);
+ cowgon.addPoint(203,206); cowgon.addPoint(215,137);
+ cowgon.addPoint(195,142); cowgon.addPoint(143,132);
+ cowgon.addPoint(133,189); cowgon.addPoint(160,200);
+ cowgon.addPoint(97,196); cowgon.addPoint(107,182);
+ cowgon.addPoint(118,185); cowgon.addPoint(110,144);
+ cowgon.addPoint(59,77); cowgon.addPoint(30,82);
+ cowgon.addPoint(30,35); cowgon.addPoint(15,36);
+ }
+
+ boolean moo = false;
+ boolean milk = false;
+ boolean tail = false;
+
+ // Use the contains method to set the tooltip text depending
+ // on where the mouse is over the cow.
+ public boolean contains(int x, int y) {
+ if(!cowgon.contains(new Point(x, y))) {
+ return false;
+ }
+
+ if((x > 30) && (x < 60) && (y > 60) && (y < 85)) {
+ if(!moo) {
+ setToolTipText("
+
++ + diff --git a/src/demo/share/jfc/SwingSet2/resources/bug.html b/src/demo/share/jfc/SwingSet2/resources/bug.html new file mode 100644 index 00000000000..bf3b159112f --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/resources/bug.html @@ -0,0 +1,128 @@ + + +++This was a creature, more troublesom to be drawn, then any + of the rest, for I could not, for a good while, think of a way to make it + suffer its body to ly quiet in a natural posture; but whil'st it was alive, + if its feet were fetter'd in Wax or Glew, it would so twist and wind its body, + that I could not any wayes get a good view of it; and if I killed it, its + body was so little, that I did often spoile the shape of it, before I could + throughly view it: for this is the nature of these minute Bodies, that as + soon, almost, as ever their life is destroy'd, their parts immediately shrivel, + and lose their beauty; and so is it also with small Plants, as I instanced + before, in the description of Moss.
+And thence also is the reason of the variations in the beards + of wild Oats, and in those of Muskgrass seed, that their bodies, being exceeding + small, those small variations which are made in the surfaces of all bodies, + almost upon every change of Air, especially if the body be porous, do here + become sensible, where the whole body is so small, that it is almost nothing + but surface; for as in vegetable substances, I see no great reason to think, + that the moisture of the Aire (that, sticking to a wreath'd beard, does make + it untwist) should evaporate, or exhale away, any faster then the moisture + of other bodies, but rather that the avolation from, or access of moisture + to, the surfaces of bodies being much the same, those bodies become most + sensible of it, which have the least proportion of body to their surface. +
+So is it also with Animal substances; the dead body of an + Ant, or such little creature, does almost instantly shrivel and dry, and + your object shall be quite another thing, before you can half delineate + it, which proceeds not from the extraordinary exhalation, but from the small + proportion of body and juices, to the usual drying of bodies in the Air, + especially if warm.
+For which inconvenience, where I could not otherwise remove + it, I thought of this expedient. I took the creature, I had design'd to delineate, + and put it into a drop of very well rectified spirit of Wine, this I found + would presently dispatch, as it were, the Animal, and being taken out of + it, and lay'd on a paper,the spirit of Wine would immediately fly away, + and leave the Animal dry, in its natural posture, or at least, in a constitution, + that it might easily with a pin be plac'd, in what posture you desired to + draw it, and the limbs would so remain, without either moving, or shriveling. +
+And thus I dealt with this Ant, which I have here delineated, + which was one of many, of a very large kind, that inhabited under the Roots + of a Tree, from whence they would sally out in great parties, and make most + grievous havock of the Flowers and Fruits, in the ambient Garden, and return back + again very expertly, by the same wayes and paths they went.
+It was more then half the bigness of an Earwig, of a dark + brown, or reddish colour, with long legs, on the hinder of which it would + stand up, and raise its head as high as it could above the ground, that it + might stare the further about it, just after the same manner as I have also + observ'd a hunting Spider to do: and putting my finger towards them, they + have at first all run towards it, till almost at it; and then they would stand + round about it, at a certain distance, and smell, as it were, and consider + whether they should any of them venture any further, till one more bold then + the rest venturing to climb it, all the rest, if I would have suffered them, + would have immediately followed : much such other seemingly rational actions + I have observ'd in this little Vermine with much pleasure, which would be + too long to be here related; those that desire more of them may satisfie + their curiosity in Ligons History of the Barbadoes.
+Having insnar'd several of these into a small Box, I made + choice of the tallest grown among them, and separating it from the rest, + I gave it a Gill of Brandy, or Spirit of Wine, which after a while e'en knock'd + him down dead drunk, so that he became moveless, though at first putting + in he struggled for a pretty while very much, till at last, certain bubbles + issuing out of his mouth, it ceased to move; this (because I had before found + them quickly to recover again, if they were taken out presently) I suffered + to lye above an hour in the Spirit; and after I had taken it out, and put + its body and legs into a natural posture, remained moveless about an hour; + but then, upon a sudden, as if it had been awaken out of a drunken sleep, + it suddenly reviv'd and ran away; being caught, and serv'd as before, he + for a while continued struggling and striving, till at last there issued + several bubbles out of its mouth, and then, tanquam animam expirasset, he + remained moveless for a good while ; but at length again recovering, it was + again redipt, and suffered to lye some hours in the Spirit; notwithstanding + which, after it had layen dry some three or four hours, it again recovered + life and motion: Which kind of Experiments, if prosecuted, which they highly + deserve, seem to me of no inconsiderable use towards the invention of the + Latent Scheme, (as the Noble Ve rulam calls it) or the hidden, unknown Texture + of Bodies.
+Of what Figure this Creature appear'd through the Microscope, + the 32. Scheme (though not so carefully graven as it ought) will represent + to the eye, namely, That it had a large head A A, at the upper end of which + were two protuberant eyes, pearl'd like those of a Fly, but smaller B B; + of the Nose, or foremost part, issued two horns C C, of a shape sufficiently + differing from those of a blew Fly, though indeed they seem to be both the + same kind of Organ, and to serve for a kind of smelling; beyond these were + two indented jaws D D, which he open'd sideways, and was able to gape them + asunder very wide; and the ends of them being armed with teeth, which meeting + went between each other, it was able to grasp and hold a heavy body, three + or four times the bulk and weight of its own body: It had only six legs, + shap'd like those of a Fly, which, as I shewed before, is an Argument that + it is a winged Insect, and though I could not perceive any sign of them in + the middle part of its body (which seem'd to consist of three joints or pieces + E F G, out of which sprung two legs, yet 'tis known that there are of them + that have long wings, and fly up and down in the air.
+The third and last part of its body I I I was bigger and + larger then the other two, unto which it was joyn'd by a very small middle, + and had a kind of loose shell, or another distinct part of its body H, which + seem'd to be interpos'd, and to keep the thorax and belly from touching. + The whole body was cas'd over with a very strong armour, and the belly I + I I was covered likewise with multitudes of small white shining brisles; + the legs, horns, head, and middle parts of its body were bestruck with hairs + also, but smaller and darker.
++ +
+
+

+
++ + diff --git a/src/demo/share/jfc/SwingSet2/resources/images/About.jpg b/src/demo/share/jfc/SwingSet2/resources/images/About.jpg new file mode 100644 index 00000000000..272173c6746 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/About.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/Octavo/CREDITS b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/CREDITS new file mode 100644 index 00000000000..1d9e0b1415c --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/CREDITS @@ -0,0 +1,2 @@ +Images and text in the SwingSet html demo are used by permission of Octavo +Corporation and are sourced from Rare Book Room (rarebookroom.org). diff --git a/src/demo/share/jfc/SwingSet2/resources/images/Octavo/ant.jpg b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/ant.jpg new file mode 100644 index 00000000000..5ec735079fb Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/ant.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/Octavo/book.jpg b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/book.jpg new file mode 100644 index 00000000000..001baa8cb09 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/book.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/Octavo/bug.jpg b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/bug.jpg new file mode 100644 index 00000000000..7df9c1e37da Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/bug.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/Octavo/bug2.jpg b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/bug2.jpg new file mode 100644 index 00000000000..18adf731f64 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/bug2.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/Octavo/crest.jpg b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/crest.jpg new file mode 100644 index 00000000000..46f68f1be9c Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/crest.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/Octavo/king.jpg b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/king.jpg new file mode 100644 index 00000000000..dfed8526922 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/king.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/Octavo/micro.jpg b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/micro.jpg new file mode 100644 index 00000000000..8b7f19753bc Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/micro.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/Octavo/seaweed.jpg b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/seaweed.jpg new file mode 100644 index 00000000000..340bae3671b Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/seaweed.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/b1.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b1.gif new file mode 100644 index 00000000000..24a7dea299f Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b1.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/b1d.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b1d.gif new file mode 100644 index 00000000000..383404e7646 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b1d.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/b1p.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b1p.gif new file mode 100644 index 00000000000..1f3fd66328b Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b1p.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/b1r.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b1r.gif new file mode 100644 index 00000000000..2a669a24988 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b1r.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/b2.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b2.gif new file mode 100644 index 00000000000..af6d626058a Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b2.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/b2d.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b2d.gif new file mode 100644 index 00000000000..b745943ed6c Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b2d.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/b2p.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b2p.gif new file mode 100644 index 00000000000..0f4abf37992 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b2p.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/b2r.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b2r.gif new file mode 100644 index 00000000000..21becb949f4 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b2r.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/b3.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b3.gif new file mode 100644 index 00000000000..67876264d8f Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b3.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/b3d.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b3d.gif new file mode 100644 index 00000000000..4d397a394f4 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b3d.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/b3p.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b3p.gif new file mode 100644 index 00000000000..0db029f56c3 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b3p.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/b3r.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b3r.gif new file mode 100644 index 00000000000..7ddd2f9dc74 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/b3r.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/bl.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/bl.gif new file mode 100644 index 00000000000..75fd0b9198d Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/bl.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/bldn.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/bldn.gif new file mode 100644 index 00000000000..546f06fee6b Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/bldn.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/bm.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/bm.gif new file mode 100644 index 00000000000..80f7352332b Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/bm.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/bmdn.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/bmdn.gif new file mode 100644 index 00000000000..3d42d0b9e15 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/bmdn.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/br.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/br.gif new file mode 100644 index 00000000000..b02e4484fd0 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/br.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/brdn.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/brdn.gif new file mode 100644 index 00000000000..58cf892514b Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/brdn.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/c.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/c.gif new file mode 100644 index 00000000000..66d0276d98a Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/c.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/cb.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/cb.gif new file mode 100644 index 00000000000..f3acd971132 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/cb.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/cbr.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/cbr.gif new file mode 100644 index 00000000000..278dab92f38 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/cbr.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/cbrs.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/cbrs.gif new file mode 100644 index 00000000000..0cd04d731b4 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/cbrs.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/cbs.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/cbs.gif new file mode 100644 index 00000000000..dbbd338a207 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/cbs.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/cdn.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/cdn.gif new file mode 100644 index 00000000000..8a2ca4b696e Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/cdn.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/ml.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/ml.gif new file mode 100644 index 00000000000..d8ad5804623 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/ml.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/mldn.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/mldn.gif new file mode 100644 index 00000000000..0902554010b Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/mldn.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/mr.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/mr.gif new file mode 100644 index 00000000000..c94cc82db54 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/mr.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/mrdn.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/mrdn.gif new file mode 100644 index 00000000000..3b700779b1e Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/mrdn.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/rb.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/rb.gif new file mode 100644 index 00000000000..f6ff994ceee Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/rb.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/rbp.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/rbp.gif new file mode 100644 index 00000000000..e82d607a265 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/rbp.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/rbr.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/rbr.gif new file mode 100644 index 00000000000..9836e0c450d Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/rbr.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/rbrs.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/rbrs.gif new file mode 100644 index 00000000000..f48e799f448 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/rbrs.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/rbs.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/rbs.gif new file mode 100644 index 00000000000..5c11fce0329 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/rbs.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/tl.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/tl.gif new file mode 100644 index 00000000000..5d7a11c7357 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/tl.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/tldn.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/tldn.gif new file mode 100644 index 00000000000..5db2fc1a402 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/tldn.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/tm.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/tm.gif new file mode 100644 index 00000000000..c69edc99e5c Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/tm.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/tmdn.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/tmdn.gif new file mode 100644 index 00000000000..8f765b99f5f Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/tmdn.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/toggle.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/toggle.gif new file mode 100644 index 00000000000..a06ccc4e306 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/toggle.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/toggledn.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/toggledn.gif new file mode 100644 index 00000000000..d7159325c1b Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/toggledn.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/tr.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/tr.gif new file mode 100644 index 00000000000..42e601738f4 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/tr.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/buttons/trdn.gif b/src/demo/share/jfc/SwingSet2/resources/images/buttons/trdn.gif new file mode 100644 index 00000000000..8f3c186f2ad Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/buttons/trdn.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/brenteyes.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/brenteyes.jpg new file mode 100644 index 00000000000..6f7d0f4fee2 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/brenteyes.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/brenthair.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/brenthair.jpg new file mode 100644 index 00000000000..cfde575e7ce Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/brenthair.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/brentmouth.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/brentmouth.jpg new file mode 100644 index 00000000000..6b3c5259b37 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/brentmouth.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/georgeseyes.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/georgeseyes.jpg new file mode 100644 index 00000000000..224cef61da1 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/georgeseyes.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/georgeshair.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/georgeshair.jpg new file mode 100644 index 00000000000..7071dde0adb Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/georgeshair.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/georgesmouth.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/georgesmouth.jpg new file mode 100644 index 00000000000..b917e515d48 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/georgesmouth.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/hanseyes.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/hanseyes.jpg new file mode 100644 index 00000000000..e7001add02b Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/hanseyes.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/hanshair.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/hanshair.jpg new file mode 100644 index 00000000000..bf46bb63ed0 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/hanshair.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/hansmouth.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/hansmouth.jpg new file mode 100644 index 00000000000..09eb9e014d4 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/hansmouth.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/howardeyes.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/howardeyes.jpg new file mode 100644 index 00000000000..b5f1ba50bb1 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/howardeyes.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/howardhair.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/howardhair.jpg new file mode 100644 index 00000000000..b0cdb19a8d9 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/howardhair.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/howardmouth.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/howardmouth.jpg new file mode 100644 index 00000000000..ebc85f021d2 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/howardmouth.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/jameseyes.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jameseyes.jpg new file mode 100644 index 00000000000..a53f9224760 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jameseyes.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/jameshair.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jameshair.jpg new file mode 100644 index 00000000000..52d2ca53ba9 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jameshair.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/jamesmouth.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jamesmouth.jpg new file mode 100644 index 00000000000..7b0e35c1872 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jamesmouth.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffeyes.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffeyes.jpg new file mode 100644 index 00000000000..0608e070772 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffeyes.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffhair.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffhair.jpg new file mode 100644 index 00000000000..b67834a5c01 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffhair.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffmouth.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffmouth.jpg new file mode 100644 index 00000000000..8a313496d45 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffmouth.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/joneyes.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/joneyes.jpg new file mode 100644 index 00000000000..f7440841e6f Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/joneyes.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/jonhair.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jonhair.jpg new file mode 100644 index 00000000000..59a182451e2 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jonhair.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/jonmouth.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jonmouth.jpg new file mode 100644 index 00000000000..9f39f0b1e4d Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/jonmouth.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/laraeyes.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/laraeyes.jpg new file mode 100644 index 00000000000..24c8778e5f9 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/laraeyes.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/larahair.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/larahair.jpg new file mode 100644 index 00000000000..8c23d01953d Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/larahair.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/laramouth.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/laramouth.jpg new file mode 100644 index 00000000000..b00407c9213 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/laramouth.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/larryeyes.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/larryeyes.jpg new file mode 100644 index 00000000000..a2b771ec709 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/larryeyes.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/larryhair.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/larryhair.jpg new file mode 100644 index 00000000000..5366c15d599 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/larryhair.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/larrymouth.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/larrymouth.jpg new file mode 100644 index 00000000000..d0642d274ba Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/larrymouth.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/lisaeyes.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/lisaeyes.jpg new file mode 100644 index 00000000000..4a9cc86a1b8 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/lisaeyes.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/lisahair.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/lisahair.jpg new file mode 100644 index 00000000000..3eb7d4f3084 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/lisahair.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/lisamouth.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/lisamouth.jpg new file mode 100644 index 00000000000..ac565029910 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/lisamouth.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/michaeleyes.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/michaeleyes.jpg new file mode 100644 index 00000000000..ae8487facdf Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/michaeleyes.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/michaelhair.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/michaelhair.jpg new file mode 100644 index 00000000000..271d20c2c56 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/michaelhair.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/michaelmouth.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/michaelmouth.jpg new file mode 100644 index 00000000000..02119ed0202 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/michaelmouth.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/philipeyes.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/philipeyes.jpg new file mode 100644 index 00000000000..1d308070cd2 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/philipeyes.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/philiphair.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/philiphair.jpg new file mode 100644 index 00000000000..18988dfc5cc Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/philiphair.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/philipmouth.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/philipmouth.jpg new file mode 100644 index 00000000000..dcf4b96bc74 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/philipmouth.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/scotteyes.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/scotteyes.jpg new file mode 100644 index 00000000000..fa7ead76cb2 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/scotteyes.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/scotthair.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/scotthair.jpg new file mode 100644 index 00000000000..ef237cb248b Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/scotthair.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/combobox/scottmouth.jpg b/src/demo/share/jfc/SwingSet2/resources/images/combobox/scottmouth.jpg new file mode 100644 index 00000000000..9eea453afaf Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/combobox/scottmouth.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/filechooser/find.gif b/src/demo/share/jfc/SwingSet2/resources/images/filechooser/find.gif new file mode 100644 index 00000000000..c60430cbe26 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/filechooser/find.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/filechooser/gifIcon.gif b/src/demo/share/jfc/SwingSet2/resources/images/filechooser/gifIcon.gif new file mode 100644 index 00000000000..915e184ac1d Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/filechooser/gifIcon.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/filechooser/help.gif b/src/demo/share/jfc/SwingSet2/resources/images/filechooser/help.gif new file mode 100644 index 00000000000..a2848d880e7 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/filechooser/help.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/filechooser/jpgIcon.jpg b/src/demo/share/jfc/SwingSet2/resources/images/filechooser/jpgIcon.jpg new file mode 100644 index 00000000000..7294f360376 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/filechooser/jpgIcon.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/apple.jpeg b/src/demo/share/jfc/SwingSet2/resources/images/food/apple.jpeg new file mode 100644 index 00000000000..c847ba99f4c Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/apple.jpeg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/apple.jpg b/src/demo/share/jfc/SwingSet2/resources/images/food/apple.jpg new file mode 100644 index 00000000000..c847ba99f4c Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/apple.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/asparagus.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/asparagus.gif new file mode 100644 index 00000000000..47ec78eb0b5 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/asparagus.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/banana.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/banana.gif new file mode 100644 index 00000000000..0c3d3a10806 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/banana.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/broccoli.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/broccoli.gif new file mode 100644 index 00000000000..f40c90e2474 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/broccoli.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/cantaloupe.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/cantaloupe.gif new file mode 100644 index 00000000000..9531008234c Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/cantaloupe.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/carrot.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/carrot.gif new file mode 100644 index 00000000000..9ee52964a95 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/carrot.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/corn.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/corn.gif new file mode 100644 index 00000000000..3fb12a63fc8 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/corn.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/grapefruit.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/grapefruit.gif new file mode 100644 index 00000000000..2a16a70fc39 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/grapefruit.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/grapes.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/grapes.gif new file mode 100644 index 00000000000..b53ed3f2349 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/grapes.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/kiwi.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/kiwi.gif new file mode 100644 index 00000000000..ae1e5437950 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/kiwi.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/onion.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/onion.gif new file mode 100644 index 00000000000..ced441cba25 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/onion.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/peach.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/peach.gif new file mode 100644 index 00000000000..b97ba989794 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/peach.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/pear.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/pear.gif new file mode 100644 index 00000000000..8fd5467fe13 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/pear.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/pepper.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/pepper.gif new file mode 100644 index 00000000000..48bf4ec65fc Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/pepper.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/pickle.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/pickle.gif new file mode 100644 index 00000000000..2c000239992 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/pickle.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/pineapple.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/pineapple.gif new file mode 100644 index 00000000000..6f00830307c Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/pineapple.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/raspberry.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/raspberry.gif new file mode 100644 index 00000000000..2c774a99e77 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/raspberry.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/strawberry.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/strawberry.gif new file mode 100644 index 00000000000..7e1f510bb35 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/strawberry.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/tomato.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/tomato.gif new file mode 100644 index 00000000000..822c0298d52 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/tomato.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/food/watermelon.gif b/src/demo/share/jfc/SwingSet2/resources/images/food/watermelon.gif new file mode 100644 index 00000000000..c92e8229fe8 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/food/watermelon.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/htmldemo/back.jpg b/src/demo/share/jfc/SwingSet2/resources/images/htmldemo/back.jpg new file mode 100644 index 00000000000..eb20ab7d6b1 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/htmldemo/back.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/htmldemo/forward.jpg b/src/demo/share/jfc/SwingSet2/resources/images/htmldemo/forward.jpg new file mode 100644 index 00000000000..465b9967286 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/htmldemo/forward.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/htmldemo/header.jpg b/src/demo/share/jfc/SwingSet2/resources/images/htmldemo/header.jpg new file mode 100644 index 00000000000..d69cc0f1f28 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/htmldemo/header.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/list/blue.gif b/src/demo/share/jfc/SwingSet2/resources/images/list/blue.gif new file mode 100644 index 00000000000..0cbfc10f3c5 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/list/blue.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/list/cyan.gif b/src/demo/share/jfc/SwingSet2/resources/images/list/cyan.gif new file mode 100644 index 00000000000..1a15194edaa Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/list/cyan.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/list/gray.gif b/src/demo/share/jfc/SwingSet2/resources/images/list/gray.gif new file mode 100644 index 00000000000..7e168315415 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/list/gray.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/list/green.gif b/src/demo/share/jfc/SwingSet2/resources/images/list/green.gif new file mode 100644 index 00000000000..5613d8dbe1c Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/list/green.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/list/magenta.gif b/src/demo/share/jfc/SwingSet2/resources/images/list/magenta.gif new file mode 100644 index 00000000000..e3741ab69ee Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/list/magenta.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/list/red.gif b/src/demo/share/jfc/SwingSet2/resources/images/list/red.gif new file mode 100644 index 00000000000..c197ffce1bc Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/list/red.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/list/yellow.gif b/src/demo/share/jfc/SwingSet2/resources/images/list/yellow.gif new file mode 100644 index 00000000000..9baeebfe585 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/list/yellow.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/misc/cab.gif b/src/demo/share/jfc/SwingSet2/resources/images/misc/cab.gif new file mode 100644 index 00000000000..8bede6b1bfb Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/misc/cab.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/misc/cab_small.gif b/src/demo/share/jfc/SwingSet2/resources/images/misc/cab_small.gif new file mode 100644 index 00000000000..3c9e1f4167d Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/misc/cab_small.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/misc/duchess.gif b/src/demo/share/jfc/SwingSet2/resources/images/misc/duchess.gif new file mode 100644 index 00000000000..7812df2b460 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/misc/duchess.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/misc/duchess_small.gif b/src/demo/share/jfc/SwingSet2/resources/images/misc/duchess_small.gif new file mode 100644 index 00000000000..83adebbe973 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/misc/duchess_small.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/misc/duke.gif b/src/demo/share/jfc/SwingSet2/resources/images/misc/duke.gif new file mode 100644 index 00000000000..0734dd92cfa Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/misc/duke.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/misc/duke_small.gif b/src/demo/share/jfc/SwingSet2/resources/images/misc/duke_small.gif new file mode 100644 index 00000000000..bbe748b9134 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/misc/duke_small.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/misc/toast.gif b/src/demo/share/jfc/SwingSet2/resources/images/misc/toast.gif new file mode 100644 index 00000000000..667a7c32a53 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/misc/toast.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/misc/toast_small.gif b/src/demo/share/jfc/SwingSet2/resources/images/misc/toast_small.gif new file mode 100644 index 00000000000..2d048379d5a Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/misc/toast_small.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/optionpane/bottle.gif b/src/demo/share/jfc/SwingSet2/resources/images/optionpane/bottle.gif new file mode 100644 index 00000000000..e706c0c2fb9 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/optionpane/bottle.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/optionpane/ibd.gif b/src/demo/share/jfc/SwingSet2/resources/images/optionpane/ibd.gif new file mode 100644 index 00000000000..8969ece7627 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/optionpane/ibd.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/optionpane/ibu.gif b/src/demo/share/jfc/SwingSet2/resources/images/optionpane/ibu.gif new file mode 100644 index 00000000000..5644e70da2d Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/optionpane/ibu.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/COPYRIGHT b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/COPYRIGHT new file mode 100644 index 00000000000..66332566ae3 --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/COPYRIGHT @@ -0,0 +1,7 @@ + + All images in this directory are copyright 1995 by Jeff Dinkins. + Unauthorized reproduction is prohibited. + + For more information about Jeff's photographs, please see: + http://www.theFixx.org/Jeff + diff --git a/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/colheader.jpg b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/colheader.jpg new file mode 100644 index 00000000000..774deed99a9 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/colheader.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/crayons.jpg b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/crayons.jpg new file mode 100644 index 00000000000..922171db310 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/crayons.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/lowerleft.jpg b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/lowerleft.jpg new file mode 100644 index 00000000000..b9e60474b99 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/lowerleft.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/rowheader.jpg b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/rowheader.jpg new file mode 100644 index 00000000000..c791147c9f2 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/rowheader.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/upperleft.jpg b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/upperleft.jpg new file mode 100644 index 00000000000..69e2a00c6f9 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/upperleft.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/upperright.jpg b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/upperright.jpg new file mode 100644 index 00000000000..a40a1284923 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/upperright.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/splash.png b/src/demo/share/jfc/SwingSet2/resources/images/splash.png new file mode 100644 index 00000000000..af5d4bd5df6 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/splash.png differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/splitpane/README b/src/demo/share/jfc/SwingSet2/resources/images/splitpane/README new file mode 100644 index 00000000000..e76b60abc1b --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/resources/images/splitpane/README @@ -0,0 +1,4 @@ + + All images in this directory were obtained from NASA at: + http://www.nasa.gov + diff --git a/src/demo/share/jfc/SwingSet2/resources/images/splitpane/earth.jpg b/src/demo/share/jfc/SwingSet2/resources/images/splitpane/earth.jpg new file mode 100644 index 00000000000..ed087b19363 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/splitpane/earth.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/splitpane/moon.jpg b/src/demo/share/jfc/SwingSet2/resources/images/splitpane/moon.jpg new file mode 100644 index 00000000000..c7edb10966a Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/splitpane/moon.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/blake.gif b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/blake.gif new file mode 100644 index 00000000000..679639edf77 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/blake.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/brooke.gif b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/brooke.gif new file mode 100644 index 00000000000..815ce772553 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/brooke.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/david.gif b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/david.gif new file mode 100644 index 00000000000..46de559a228 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/david.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/ewan.gif b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/ewan.gif new file mode 100644 index 00000000000..82c8e58f524 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/ewan.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/ewan.jpg b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/ewan.jpg new file mode 100644 index 00000000000..d19210eea28 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/ewan.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/hania.jpg b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/hania.jpg new file mode 100644 index 00000000000..7e51907fc48 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/hania.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/laine.jpg b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/laine.jpg new file mode 100644 index 00000000000..b72cdb76d14 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/laine.jpg differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/matthew.gif b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/matthew.gif new file mode 100644 index 00000000000..812775e2b8a Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/matthew.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/stephen.gif b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/stephen.gif new file mode 100644 index 00000000000..470c3bcb2e0 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/stephen.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JButton.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JButton.gif new file mode 100644 index 00000000000..35099bb894f Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JButton.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JColorChooser.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JColorChooser.gif new file mode 100644 index 00000000000..64a05309453 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JColorChooser.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JComboBox.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JComboBox.gif new file mode 100644 index 00000000000..f8e971f19ce Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JComboBox.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JDesktop.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JDesktop.gif new file mode 100644 index 00000000000..882a052bdf2 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JDesktop.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JDialog.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JDialog.gif new file mode 100644 index 00000000000..0ab80b23f5c Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JDialog.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JEditorPane.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JEditorPane.gif new file mode 100644 index 00000000000..ce007e2e581 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JEditorPane.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JFileChooser.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JFileChooser.gif new file mode 100644 index 00000000000..80ac6b4adfa Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JFileChooser.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JList.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JList.gif new file mode 100644 index 00000000000..d50e74f75ee Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JList.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JMenu.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JMenu.gif new file mode 100644 index 00000000000..ed1a0d97404 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JMenu.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JOptionPane.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JOptionPane.gif new file mode 100644 index 00000000000..114e1ab7bd3 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JOptionPane.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JProgressBar.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JProgressBar.gif new file mode 100644 index 00000000000..1aa706d257c Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JProgressBar.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JRadioButton.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JRadioButton.gif new file mode 100644 index 00000000000..7348f3276ab Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JRadioButton.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JScrollBar.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JScrollBar.gif new file mode 100644 index 00000000000..b7949b3a924 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JScrollBar.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JScrollPane.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JScrollPane.gif new file mode 100644 index 00000000000..95fcc12da47 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JScrollPane.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JSlider.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JSlider.gif new file mode 100644 index 00000000000..61924f50ea5 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JSlider.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JSplitPane.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JSplitPane.gif new file mode 100644 index 00000000000..83efc387720 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JSplitPane.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTabbedPane.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTabbedPane.gif new file mode 100644 index 00000000000..9be6463cd04 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTabbedPane.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTable.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTable.gif new file mode 100644 index 00000000000..51ce69e863a Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTable.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTree.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTree.gif new file mode 100644 index 00000000000..0f72dca4edf Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTree.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/toolbar/ToolTip.gif b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/ToolTip.gif new file mode 100644 index 00000000000..eb5b1259f99 Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/toolbar/ToolTip.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/images/tooltip/cow.gif b/src/demo/share/jfc/SwingSet2/resources/images/tooltip/cow.gif new file mode 100644 index 00000000000..70da732d2fb Binary files /dev/null and b/src/demo/share/jfc/SwingSet2/resources/images/tooltip/cow.gif differ diff --git a/src/demo/share/jfc/SwingSet2/resources/index.html b/src/demo/share/jfc/SwingSet2/resources/index.html new file mode 100644 index 00000000000..0aa73c410ef --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/resources/index.html @@ -0,0 +1,42 @@ + + +++This is a Creature so officious, that 'twill be known to + every one at one time or other, so busie, and so impudent, that it will + be intruding it self in every ones company, and so proud and aspiring withall, + that it fears not to trample on the best, and affects nothing so much as + a Crown; feeds and lives very high, and that makes it so saucy, as to pull + any one by the ears that comes in its way, and will never be quiet till + it has drawn blood: it is troubled at nothing so much as at a man that scratches + his head, as knowing that man is plotting and contriving some mischief against + it, and that makes it oftentime sculk into some meaner and lower place, and + run behind a mans back, though it go very much against the hair; which ill + conditions of it having made it better known then trusted, would exempt me + from making any further description of it, did not my faithful Mercury, my + Microscope, bring me other information of it.
+For this has discovered to me, by means of a very bright light + cast on it, that it is a Creature of a very odd shape ; it has a head shap'd + like that exprest in 35. Scheme marked with A, which seems almost Conical, + but is a little flatted on the upper and under sides, at the biggest part + of which, on either side behind the head (as it were, being the place where + other Creatures ears stand) are placed its two black shining goggle eyes + B B, looking backwards, and fenced round with several small cilia or hairs + that incompass it, so that it seems this Creature has no very good foresight: + It does not seem to have any eyelids, and therefore perhaps its eyes were + so placed, that it might the better cleanse them with its forelegs; and perhaps + this may be the reason, why they so much avoid and run from the light behind + them, for being made to live in the shady and dark recesses of the hair, + and thence probably their eye having a great aperture, the open and clear + light, especially that of the Sun, must needs very much offend them; to secure + these eyes from receiving any injury from the hairs through which it passes, + it has two horns that grow before it, in the place where one would have thought + the eyes should be; each of these C C have four joynts, which are fringed, + as 'twere, with small brisles, from which to the tip of its snout D, the + head seems very round and tapering, ending in a very sharp nose D, which + seems to have a small hole, and to be the passage through which he sucks + the blood.
++
+
Now whereas it if be plac'd on its back, with its belly + upwards, as it is in the 35. Scheme, it seems in several Positions to have + a resemblance of chaps, or jaws, as is represented in the Figure by E E, + yet in other postures those dark strokes disappear; and having kept several + of them in a box for two or three dayes, so that for all that time they had + nothing to feed on, I found, upon letting onecreep on my hand, that it immediately + fell to sucking, and did neither seem to thrust its nose very deep into the + skin, nor to open any kind of mouth, but I could plainly perceive a small + current of blood, which came directly from its snout, and past into its belly; + and about A there seem'd a contrivance, somewhat resembling a Pump, pair + of Bellows, or Heart, for by a very swift systole and diastole the blood + seem'd drawn from the nose, and forced into the body.
+It did not seem at all, though I viewed it a good while as + it was sucking, to thrust more of its nose into the skin then the very snout + D, nor did it cause the least discernable pain, and yet the blood seem'd + to run through its head very quick and freely, so that it seems there is + no part of the skin but the blood is dispers'd into, nay, even into the + cuticula; for had it thrust its whole nose in from D to C C, it would not + have amounted to the supposed thickness of that tegument, the length of + the nose being not more then a three hundredth part of an inch.
+It has six legs, covered with a very transparent shell, + and joynted exactly like a Crab's, or Lobster's; each leg is divided into + six parts by these joynts, and those have here and there several small hairs; + and at the end of each leg it has two claws, very properly adapted for its + peculiar use, being thereby inabled to walk very securely both on the skin + and hair; and indeed this contrivance of the feet is very curious, and could + not be made more commodiously and compendiously, for performing both these + requisite motions, of walking and climbing up the hair of a mans head, then + it is : for, by having the lesser claw (a) set so much short of the bigger + (b) when it walks on the skin the shorter touches not, and then the feet + are the same with those of a Mite, and several other small Insects, but by + means of the small joynts of the longer claw it can bend it round, and so + with both claws take hold of a hair, in the manner represented in the Figure, + the long transparent Cylinder F F F, being a Man's hair held by it.
+The Thorax seem'd cas'd with another kind of substance then + the belly, namely, with a thin transparent horny substance, which upon the fasting + of the Creature did not grow flaccid; through this I could plainly see the + blood, suck'd from my hand, to be variously distributed, and mov'd to and + fro; and about G there seem'd a pretty big white substance, which seem'd + to be moved within its thorax; besides, there appear'd very many small milk-white + vessels, which crost over the breast between the legs, out of which, on + either side, are many small branchings, these seem'd to be the veins and + arteries, for that which is analogus to blood in all Insects is milk-white. +
+The belly is covered with a transparent substance likewise, + but more resembling a skin then a shell, for 'tis grain'd all over the belly + just like the skin in the palms of a man's hand, and when the belly is empty, + grows very flaccid and wrinkled ; at the upper end of this is placed the + stomach H H, and perhaps also the white spot I I may be the liver, or pancreas, + which by the peristaltick motion of the guts, is a little mov'd to and fro, + not with a systole and diastole, but rather with a thronging or justling + motion.
+Viewing one of these Creatures, after it had fasted two + dayes, all the hinder part was lank and flaccid, and the white spot I I + hardly mov'd, most of the white branchings disappear'd, and most also of + the redness or sucked blood in the guts, the peristaltick motion of which + was scarce discernable; but upon the suffering it to suck, it presently + fill'd the skin of the belly, and of the six scolop'd embosments on either side, + as full as it could be stuft ; the stomach and guts were as full as they + could hold; the peristaltick motion of the gut grew quick, and the justling + motion of I I accordingly ; multitudes of milk-white vessels seem'd quickly + filled, and turgid, which were perhaps the veins and arteries, and the Creature + was so greedy, that though it could not contain more, yet it continued sucking + as fast as ever, and as fast emptying it self behind : the digestion of this + Creature must needs be very quick, for though I perceiv'd the blood thicker + and blacker when suck'd, yet, when in the guts, it was of a very lovely + ruby colour, and that part of it, which was digested into the veins, seemed + white; whence it appears, that a further digestion of blood may make it + milk, at least of a resembling colour : What is else observable in the figure + of this Creature, maybe seen by the 35. Scheme.
++ +
+
+
+


+
+
++Title Page
+To The King
+The Preface
+Of the curious texture of Sea-weeds
+Of an Ant or Pismire
+Of a Louse
+
+
+
+Images and text used by permission of Octavo + Corporation (www.octavo.com),
+
+ (c) 1999 Octavo Corporation. All + rights reserved.
+
+
+ Octavo Corporation is a publisher of rare + books and manuscripts with digital tools and formats through partnerships + with libraries, museums, and individuals. Using high-resolution digital imaging + technology, Octavo releases digital rare books on CD-ROM as Adobe PDF files + which can be viewed on and printed from almost any computing platform. You + can view each page and the binding on your computer screen, zoom in to view + detail up to 800% in some cases, and search, copy and paste the "live" text + placed invisibly behind the page images which is available for selected Editions. + Also included in each edition is the work's collation and provenance, as well + as commentary by a noted expert in its field.
+ + diff --git a/src/demo/share/jfc/SwingSet2/resources/king.html b/src/demo/share/jfc/SwingSet2/resources/king.html new file mode 100644 index 00000000000..a6f458af419 --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/resources/king.html @@ -0,0 +1,45 @@ + + +
+
+
Do here most humbly lay this small Present at Your + Majesties Royal feet. And though it comes accompany'd with two disadvantages, + the meanness of the Author, and of the Subject; yet in both I am incouraged + by the greatness of your Mercy and your Knowledge. ++ + diff --git a/src/demo/share/jfc/SwingSet2/resources/preface.html b/src/demo/share/jfc/SwingSet2/resources/preface.html new file mode 100644 index 00000000000..8138b288a18 --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/resources/preface.html @@ -0,0 +1,115 @@ + + +By the one I am taught , that you can forgive the most presumptuous + Offendors: And by the other, that you will not esteem the least work of Nature, + or Art, unworthy your Observation.
+Amidst the many felicities that have accompani'd your Majesties + happy Restauration and Government, it is none of the least considerable, that + Philosophy and Experimental Learning have prosper'd under your Royal Patronage.
+And as the calm prosperity of your Reign has given us the + leisure to follow these Studies of quiet and retirement, so it is just, that + the Fruits of them should, by way of acknowledgement, be return'd to your + Majesty. There are, Sir, several other of your Subjects, of your Royal Society, + now busie about Nobler matters: The Improvement of Manufactures and Agriculture, + the Increase of Commerce, the Advantage of Navigation: In all which they are + assisted by your Majesties Incouragement and Example.
+Amidst all those greater Designs, I here presume to bring + in that which is more proportionable to the smalness of my Abilities, and + to offer some of the least of all visible things, to that Mighty King, that + has establisht an Empire over the best of all Invisible things of this World, + the Minds o f Men.
++++
Your Majesties most humble
+and most obedient
+Subject and Servant,
++
ROBERT HOOKE .
++ +
+
+
+
++ + diff --git a/src/demo/share/jfc/SwingSet2/resources/seaweed.html b/src/demo/share/jfc/SwingSet2/resources/seaweed.html new file mode 100644 index 00000000000..fd2a9433630 --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/resources/seaweed.html @@ -0,0 +1,62 @@ + + +++It is the great prerogative of Mankind above + other Creatures, that we are not only able to behold the works of Nature, + or barely to sustein our lives by them, but we have also the power of considering, + comparing, altering, assisting, and improving them to various uses.
+And as this is the peculiar priviledge of humane Nature + in general, so is it capable of being so far advanced by the helps of Art, + and Experience, as to make some Men excel others in their Observations, + and Deductions, almost as much as they do Beasts.
+By the addition of such artificial Instruments and methods, + there may be, in some manner, a reparation made for the mischiefs, and imperfection, + mankind has drawn upon itself, by negligence, and intemperance, and a wilful + and superstitious deserting the Prescripts and Rules of Nature, whereby + every man, both from a deriv'd corruption, innate and born with him, and + from his breeding and converse with men, is very subject to slip into all + sorts of errors.
+The only way which now remains for us to recover some degree + of those former perfections, seems to be, by rectifying the operations of + the Sense, the Memory, and Reason, since upon the evidence, the strength, + the integrity, and the right correspondence of all these, all the light, + by which our actions are to be guided, is to be renewed, and all our command + over things is to be establisht.
+It is therefore most worthy of our consideration, to recollect + their several defects, that so we may the better understand how to supply + them, and by what assistances we may inlarge their power, and secure them + in performing their particular duties.
+As for the actions of our Senses, we cannot but observe + them to be in many particulars much outdone by those of other Creatures, + and when at best, to be far short of the perfection they seem capable of + : And these infirmities of the Senses arise from a double cause, either + from the disproportion of the Object to the Organ, whereby an infinite number + of things can never enter into them, or else from error in the Perception, + that many things, which come within their reach, are not received in a right + manner.
+The like frailties are to be found in the Memory; we often + let many things slip away from us, which deserve to be retain'd; and of + those which we treasure up, a great part is either frivolous or false ; + and if good, and substantial, either in tract of time obliterated, or at + best so overwhelmed and buried under more frothy notions, that when there + is need of them, they are in vain sought for.
+The two main foundations being so deceivable, it is no wonder, + that all the succeeding works which we build upon them, of arguing, concluding, + defining, judging, and all the other degrees of Reason, are lyable to the + same imperfection, being, at best, either vain, or uncertain: So that the + errors of the understanding are answerable to the two other, being defective + both in the quantity and goodness of its knowledge; for the limits, to which + our thoughts are confind, are small in respect of the vast extent of Nature + it self; some parts of it are too large to be comprehended, and some too + little to be perceived.
+And from thence it must follow, that not having a full sensation + of the Object, we must be very lame and imperfect in our conceptions about + it, and in all the propositions which we build upon it; hence we often take + the shadow of things for the substance, small appearances for good similitudes, + similitudes for definitions; and even many of those, which we think to be + the most solid definitions, are rather expressions of our own misguided + apprehensions then of the true nature of the things themselves.
+The effects of these imperfections are manifested in different + ways, according to the temper and disposition of the several minds of men, + some they incline to gross ignorance and stupidity, and others to a presumptuous + imposing on other mens Opinions, and a confident dogmatizing on matters, + whereof there is no assurance to be given.
+Thus all the uncertainty, and mistakes of humane actions, + proceed either from the narrowness and wandring of our Senses, from the + slipperiness or delusion of our Memory, from the confinement or rashness + of our Understanding, so that 'tis no wonder, that our power over natural + causes and effects is so slowly improvd, seeing we are not only to contend + with the obscurity and difficulty of the things whereon we work and think, + but even the forces of our own minds conspire to betray us.
+These being the dangers in the process of humane Reason, + the remedies of them all can only proceed from the real, the mechanical, + the experimental Philosophy, which has this advantage over the Philosophy + of discourse and disputation, that whereas that chiefly aims at the subtilty + of its Deductions and Conclusions, without much regard to the first groundwork, + which ought to be well laid on the Sense and Memory ; so this intends the + right ordering of them all, and the making them serviceable to each other. +
+The first thing to be undertaken in this weighty work, is + a watchfulness over the failings and an inlargement of the dominion, of + the Senses. To which end it is requisite, first, That there should be a + scrupulous choice, and a strict examination, of the reality, constancy, + and certainty of the Particulars that we admit: This is the first rise whereon + truth is to begin, and here the most severe, and most impartial diligence, + must be imployed ; the storing up of all, without any regard to evidence + or use, will only tend to darkness and confusion.
+We must not therefore esteem the riches of our Philosophical + treasure by the number only, but chiefly by the weight; the most vulgar + Instances are not to be neglected, but above all, the most instructive are + to be entertain'd: the footsteps of Nature are to be trac'd, not only in + her ordinary course,but when she seems to be put to her shifts, to make + many doublings and turnings, and to use some kind of art in indeavouring + to avoid our discovery.
++ +
+
+

+
++ + diff --git a/src/demo/share/jfc/SwingSet2/resources/swingset.properties b/src/demo/share/jfc/SwingSet2/resources/swingset.properties new file mode 100644 index 00000000000..8bf7a4e8e44 --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/resources/swingset.properties @@ -0,0 +1,677 @@ +# This properties file is used to create a PropertyResourceBundle +# It contains Locale specific strings used in the SwingSet demo. +# +# @author Jeff Dinkins + +################################# +### SwingSet Infrastructure ### +################################# + +### About Box ### + +AboutBox.title=About Swing! +AboutBox.ok_button_text=OK +AboutBox.accessible_description=SwingSet2 demo is Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + +### Source Code ### +SourceCode.loading=Loading and formatting source code, please wait... + +### Status ### + +Status.loading=Loading: +Status.popupMenuAccessible=Press Shift-F10 to activate popup menu + +### Menu Bar ### + +MenuBar.accessible_description=Swing demo menu bar + + +### Frame ### + +Frame.title=SwingSet2 + + +### Tabbed Pane ### + +TabbedPane.src.labelAndMnemonic=Source Code +TabbedPane.src_tooltip=Look at the source code for this demo + + +### Look & Feel Menu ### + +LafMenu.laf.labelAndMnemonic=&Look && Feel +LafMenu.laf_accessible_description=Menu that allows Look && Feel switching + +LafMenu.java.labelAndMnemonic=&Java Look && Feel +LafMenu.java_accessible_description=The Java Look && Feel + +LafMenu.nimbus.labelAndMnemonic=&Nimbus Look && Feel +LafMenu.nimbus_accessible_description=The Nimbus Look && Feel + +LafMenu.mac.labelAndMnemonic=&Mac OS X Look && Feel +LafMenu.mac_accessible_description=The Mac OS X Look && Feel + +LafMenu.motif.labelAndMnemonic=M&otif Look && Feel +LafMenu.motif_accessible_description=The Motif Look && Feel + +LafMenu.windows.labelAndMnemonic=&Windows Style Look && Feel +LafMenu.windows_accessible_description=Windows Style Look && Feel + +LafMenu.gtk.labelAndMnemonic=>K Style Look && Feel +LafMenu.gtk_accessible_description=GTK Style Look && Feel + + +### Themes Menu ### + +ThemesMenu.themes.labelAndMnemonic=&Themes +ThemesMenu.themes_accessible_description=Menu to switch Metal color themes + +ThemesMenu.aqua.labelAndMnemonic=A&qua +ThemesMenu.aqua_accessible_description=A Metal Theme that uses bluish-green colors + +ThemesMenu.charcoal.labelAndMnemonic=&Charcoal +ThemesMenu.charcoal_accessible_description=A Metal Theme that uses dark grey colors + +ThemesMenu.contrast.labelAndMnemonic=&High Contrast +ThemesMenu.contrast_accessible_description=A High Contrast Theme + +ThemesMenu.ocean.labelAndMnemonic=&Ocean +ThemesMenu.ocean_accessible_description=The Ocean Metal Theme + +ThemesMenu.steel.labelAndMnemonic=&Steel +ThemesMenu.steel_accessible_description=The blue/purple Metal Theme + +ThemesMenu.emerald.labelAndMnemonic=&Emerald +ThemesMenu.emerald_accessible_description=A Metal Theme that uses green colors + +ThemesMenu.ruby.labelAndMnemonic=&Ruby +ThemesMenu.ruby_accessible_description=A Metal Theme that uses red colors + + +### Font SubMenu (under Themes) +FontMenu.fonts.labelAndMnemonic=&Fonts +FontMenu.fonts_accessible_description=Menu to choose fonts for the Java look and feel + +FontMenu.bold.labelAndMnemonic=&Bold +FontMenu.bold_accessible_description=Turns on bold fonts for the Java look and feel + +FontMenu.plain.labelAndMnemonic=&Plain +FontMenu.plain_accessible_description=Turns on plain fonts for the Java look and feel + + +### Audio SubMenu (under Themes) ### + +AudioMenu.audio.labelAndMnemonic=&Audio +AudioMenu.audio_accessible_description=Menu to switch the amount of auditory feedback available within the Java look and feel + +AudioMenu.on.labelAndMnemonic=&On +AudioMenu.on_accessible_description=Turn on all auditory feedback for the Java look and feel + +AudioMenu.default.labelAndMnemonic=&Default +AudioMenu.default_accessible_description=Turn on the standard amount of auditory feedback for the Java look and feel + +AudioMenu.off.labelAndMnemonic=O&ff +AudioMenu.off_accessible_description=Turn off all auditory feedback for the Java look and feel + +### Options Menu ### + +OptionsMenu.options.labelAndMnemonic=O&ptions +OptionsMenu.options_accessible_description=Menu containing other options + +OptionsMenu.tooltip.labelAndMnemonic=Enable &Tool Tips +OptionsMenu.tooltip_accessible_description=Enable or disable tool tips + +OptionsMenu.dragEnabled.labelAndMnemonic=Enable &Drag Support +OptionsMenu.dragEnabled_accessible_description=Enable or disable drag support + +### File Menu ### + +FileMenu.file.labelAndMnemonic=&File +FileMenu.accessible_description=File Menu +FileMenu.about.labelAndMnemonic=A&bout +FileMenu.about_accessible_description=Find out about the SwingSet2 application +FileMenu.open.labelAndMnemonic=&Open +FileMenu.open_accessible_description=Placeholder menu item for opening a file +FileMenu.save.labelAndMnemonic=&Save +FileMenu.save_accessible_description=Placeholder menu item for saving a file +FileMenu.save_as.labelAndMnemonic=Save &As... +FileMenu.save_as_accessible_description=Placeholder menu item for saving a file with a new name +FileMenu.exit.labelAndMnemonic=E&xit +FileMenu.exit_accessible_description=Exit the SwingSet2 application + +### Multi-Screen menu ### +MultiMenu.multi.labelAndMnemonic=&Multiscreen +MultiMenu.multi_accessible_description=Multiscreen Menu +MultiMenu.all.labelAndMnemonic=Cre&ate SwingSet2 on all screens +MultiMenu.all_accessible_description=Create a SwingSet2 window on every screen +MultiMenu.single.labelAndMnemonic=Create SwingSet2 on screen +MultiMenu.single_accessible_description=Create a SwingSet2 window on screen + + +################################ +### DEMOS ### +################################ + +### Button Demo ### + +ButtonDemo.accessible_description=The ButtonDemo shows examples of using JButton, JRadioButton, JToggleButton, and JCheckBox +ButtonDemo.tooltip=JButton, JRadioButton, JToggleButton, JCheckbox demos +ButtonDemo.name=Button Demo + +ButtonDemo.buttons=Buttons +ButtonDemo.checkboxes=Check Boxes +ButtonDemo.radiobuttons=Radio Buttons +ButtonDemo.togglebuttons=Toggle Buttons + +ButtonDemo.textbuttons=Text Buttons +ButtonDemo.imagebuttons=Image Buttons +ButtonDemo.textradiobuttons=Text Radio Buttons +ButtonDemo.imageradiobuttons=Image Radio Buttons +ButtonDemo.texttogglebuttons=Text Toggle Buttons +ButtonDemo.imagetogglebuttons=Image Toggle Buttons +ButtonDemo.textcheckboxes=Text CheckBoxes +ButtonDemo.imagecheckboxes=Image CheckBoxes + +ButtonDemo.button1=One +ButtonDemo.button2=Two +ButtonDemo.button3=For curiosity and beauty, I have not among all the Plants + or Vegetables I have yet observ'd, seen any one comparable to this Sea-weed + I have here describ'd, of which I am able to say very little more then what + is represented by the second Figure of the ninth Scheme: Namely, that it is + a Plant which grows upon the Rocks under the water, and increases and spreads + it self into a great tuft, which is not onely handsomely branch'd into several + leaves, but the whole surface of the Plant is cover'd over with a most curious + kind of carv'd work, which consists of a texture much resembling a Honeycomb; + for the whole surface on both sides is cover'd over with a multitude of very + small holes, being no bigger then so many holes made with the point of a small + Pinn, and rang'd in the neatest and most delicate order imaginable, they being + plac'd in the manner of a Quincunx, or very much like the rows of the eyes + of a Fly, the rows or orders being very regular, which way soever they are + observ'd: what the texture was, as it appear'd through a pretty bigg Magnifying + Microscope, I have here adjoin'd in the first Figure of the 14. Scheme. which + round Area A B C D represents a part of the surface about one eighth part + of an Inch in Diameter: Those little holes, which to the eye look'd round, + like so many little spots, here appear'd very regularly shap'd holes, representing + almost the shape of the sole of a round toed shoe, the hinder part of which, + is, as it were, trod on or cover'd by the toe of that next below it; these + holes seem'd wall'd about with a very thin and transparent substance, looking + of a pale straw-colour; from the edge of which, against the middle of each + hole, were sprouted out four small transparent straw-colour'd Thorns, which + seem'd to protect and cover those cavities, from either side two; neer the + root of this Plant, were sprouted out several small branches of a kind of + bastard Coralline, curiously branch'd, though small.
+And to confirm this, having lately the opportunity of viewing + the large Plant (if I may so call it) of a Sponge petrify'd, of which I made + mention in the last Observation, I found, that each of the Branches or Figures + of it, did, by the range of its pores, exhibit just such a texture, the rows + of pores crossing one another, much after the manner as the rows of eyes do + which are describ'd in the 26. Scheme : Coralline also, and several sorts of + white Coral, I have with a Microscope observ'd very curiously shap'd. And + I doubt not, but that he that shall observe these several kinds of Plants that + grow upon Rocks, which the Sea sometimes overflows, and those heaps of others + which are vomited out of it upon the shore, may find multitudes of little + Plants, and other bodies, which like this will afford very beautifull objects + for the Microscope ; and this Specimen here is adjoin'd onely to excite their + curiosities who have opportunity of observing to examine and collect what + they find worthy their notice; for the Sea, among terrestrial bodies, is also + a prolifick mother, and affords as many Instances of spontaneous generations + as either the Air or Earth.
++ +
+
+
This demo shows how to present lists of data in two different ways. On the left is a JList component whose list items consist of the permutations of the checked prefixes and suffixes. The prefix and suffix checkbox columns on the right are created by using a JPanel with a Y Axis BoxLayout inside a JScrollPane.
+ + +### OptionPane Demo ### + +OptionPaneDemo.accessible_description=The OptionPane Demo shows examples of using JOptionPane to generate different common option dialog boxes +OptionPaneDemo.tooltip=JOptionPane Demo +OptionPaneDemo.name=Option Pane Demo + +OptionPaneDemo.warningbutton=Show Warning Dialog +OptionPaneDemo.componentbutton=Show Component Dialog +OptionPaneDemo.inputbutton=Show Input Dialog +OptionPaneDemo.confirmbutton=Show Confirmation Dialog +OptionPaneDemo.messagebutton=Show Message Dialog + +OptionPaneDemo.warningtitle=Warning Dialog Example +OptionPaneDemo.warningtext=This is a test of the Emergency Broadcast System. This is
only a test. The webmaster of your local intranet, in voluntary
cooperation with the Federal and State authorities, have
developed this system to keep you informed in the event of an
emergency. If this had been an actual emergency, the signal you
just heard would have been followed by official information, news
or instructions. This concludes this test of the Emergency
Broadcast System.
Developer Note: This dialog demo used HTML for text formatting.
boring, one line descriptions, the Swing! team
is happy to shatter your illusions.
In Swing, they can use HTML to
\u3053\u306E\u30C7\u30E2\u3067\u306F\u30012\u3064\u306E\u7570\u306A\u308B\u65B9\u6CD5\u3067\u4F5C\u6210\u3057\u305F\u30EA\u30B9\u30C8\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002\u5DE6\u5074\u306B\u3042\u308BJList\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u30EA\u30B9\u30C8\u9805\u76EE\u306F\u3001\u30C1\u30A7\u30C3\u30AF\u30FB\u30DE\u30FC\u30AF\u306E\u4ED8\u3051\u3089\u308C\u305F\u63A5\u982D\u8F9E\u304A\u3088\u3073\u63A5\u5C3E\u8F9E\u306E\u9806\u5217\u3067\u69CB\u6210\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u53F3\u5074\u306E\u63A5\u982D\u8F9E\u304A\u3088\u3073\u63A5\u5C3E\u8F9E\u306E\u30C1\u30A7\u30C3\u30AF\u30FB\u30DC\u30C3\u30AF\u30B9\u306E\u5217\u306F\u3001\u5782\u76F4\u914D\u7F6E\u306EBoxLayout\u3092\u6301\u3064JPanel\u3092\u4F7F\u7528\u3057\u3066JScrollPane\u5185\u306B\u4F5C\u6210\u3055\u308C\u307E\u3059\u3002
+ + +### OptionPane Demo ### + +OptionPaneDemo.accessible_description=OptionPane\u30C7\u30E2\u3067\u306F\u3001\u69D8\u3005\u306A\u5171\u901A\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u30FB\u30C0\u30A4\u30A2\u30ED\u30B0\u30FB\u30DC\u30C3\u30AF\u30B9\u3092\u751F\u6210\u3059\u308B\u305F\u3081\u306EJOptionPane\u306E\u4F7F\u7528\u4F8B\u3092\u7D39\u4ECB\u3057\u307E\u3059 +OptionPaneDemo.tooltip=JOptionPane\u30C7\u30E2 +OptionPaneDemo.name=Option Pane\u30C7\u30E2 + +OptionPaneDemo.warningbutton=\u8B66\u544A\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u8868\u793A +OptionPaneDemo.componentbutton=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30FB\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u8868\u793A +OptionPaneDemo.inputbutton=\u5165\u529B\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u8868\u793A +OptionPaneDemo.confirmbutton=\u78BA\u8A8D\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u8868\u793A +OptionPaneDemo.messagebutton=\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u8868\u793A + +OptionPaneDemo.warningtitle=\u8B66\u544A\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u4F8B +OptionPaneDemo.warningtext=\u3053\u308C\u306F\u7DCA\u6025\u653E\u9001\u30B7\u30B9\u30C6\u30E0\u306E\u30C6\u30B9\u30C8\u3067\u3059\u3002\u3053\u308C\u306F\u5358\u306A\u308B
\u30C6\u30B9\u30C8\u3067\u3059\u3002\u30ED\u30FC\u30AB\u30EB\u30FB\u30A4\u30F3\u30C8\u30E9\u30CD\u30C3\u30C8\u306EWeb\u30DE\u30B9\u30BF\u30FC\u304C
\u9023\u90A6\u653F\u5E9C\u304A\u3088\u3073\u5DDE\u5F53\u5C40\u3068\u81EA\u4E3B\u7684\u306B\u5354\u529B\u3057\u3001\u7DCA\u6025\u4E8B\u614B\u306E
\u767A\u751F\u6642\u306B\u901A\u5831\u3092\u884C\u3046\u305F\u3081\u306B\u3053\u306E\u30B7\u30B9\u30C6\u30E0\u3092\u958B\u767A\u3057\u307E\u3057\u305F\u3002
\u5B9F\u969B\u306E\u7DCA\u6025\u6642\u306B\u306F\u3001\u304A\u805E\u304D\u306B\u306A\u3063\u305F\u4FE1\u53F7\u306B\u7D9A\u3044\u3066\u5F53\u5C40\u304B\u3089\u306E
\u60C5\u5831\u3001\u30CB\u30E5\u30FC\u30B9\u307E\u305F\u306F\u6307\u793A\u304C\u901A\u77E5\u3055\u308C\u307E\u3059\u3002\u3053\u308C\u3067\u3001
\u7DCA\u6025\u653E\u9001\u30B7\u30B9\u30C6\u30E0\u306E\u30C6\u30B9\u30C8\u3092
\u7D42\u4E86\u3057\u307E\u3059\u3002
\u958B\u767A\u8005\u5411\u3051\u306E\u6CE8\u610F: \u3053\u306E\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u30C7\u30E2\u3067\u306F\u3001\u30C6\u30AD\u30B9\u30C8\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u306BHTML\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002
\u8868\u793A\u3067\u304D\u306A\u3044\u9000\u5C48\u306A\u3082\u306E\u3060\u306A\u3093\u3066\u601D\u3063\u3066\u3084\u3057\u307E\u305B\u3093\u304B\u3002
\u3060\u3068\u3057\u305F\u3089\u3001\u79C1\u305F\u3061Swing!\u30C1\u30FC\u30E0\u304C\u305D\u306E\u8AA4\u89E3\u3092\u89E3\u3044\u3066\u3042\u3052\u307E\u3057\u3087\u3046\u3002
Swing\u306EToolTip\u306F\u3001HTML\u3092\u4F7F\u7528\u3057\u3066
\u672C\u6F14\u793A\u8BF4\u660E\u5982\u4F55\u7528\u4E24\u79CD\u4E0D\u540C\u7684\u65B9\u6CD5\u6765\u5448\u73B0\u6570\u636E\u7684\u5217\u8868\u3002\u5DE6\u4FA7\u662F\u4E00\u4E2A JList \u7EC4\u4EF6, \u5176\u4E2D\u7684\u5217\u8868\u9879\u7531\u9009\u4E2D\u7684\u524D\u7F00\u548C\u540E\u7F00\u7EC4\u6210\u3002\u53F3\u4FA7\u7684\u524D\u7F00\u548C\u540E\u7F00\u590D\u9009\u6846\u5217\u662F\u5728 JScrollPane \u4E2D\u4F7F\u7528\u5E26\u6709 Y \u8F74 BoxLayout \u7684 JPanel \u521B\u5EFA\u7684\u3002
+ + +### OptionPane Demo ### + +OptionPaneDemo.accessible_description=OptionPane \u6F14\u793A\u663E\u793A\u4E86\u4F7F\u7528 JOptionPane \u751F\u6210\u4E0D\u540C\u7684\u5E38\u7528\u9009\u9879\u5BF9\u8BDD\u6846\u7684\u793A\u4F8B +OptionPaneDemo.tooltip=JOptionPane \u6F14\u793A +OptionPaneDemo.name=\u9009\u9879\u7A97\u683C\u6F14\u793A + +OptionPaneDemo.warningbutton=\u663E\u793A\u8B66\u544A\u5BF9\u8BDD\u6846 +OptionPaneDemo.componentbutton=\u663E\u793A\u7EC4\u4EF6\u5BF9\u8BDD\u6846 +OptionPaneDemo.inputbutton=\u663E\u793A\u8F93\u5165\u5BF9\u8BDD\u6846 +OptionPaneDemo.confirmbutton=\u663E\u793A\u786E\u8BA4\u5BF9\u8BDD\u6846 +OptionPaneDemo.messagebutton=\u663E\u793A\u6D88\u606F\u5BF9\u8BDD\u6846 + +OptionPaneDemo.warningtitle=\u8B66\u544A\u5BF9\u8BDD\u6846\u793A\u4F8B +OptionPaneDemo.warningtext=\u8FD9\u662F\u4E00\u6B21\u7D27\u6025\u5E7F\u64AD\u7CFB\u7EDF\u6D4B\u8BD5\u3002\u8FD9\u53EA\u662F
\u4E00\u6B21\u6D4B\u8BD5\u3002\u81EA\u613F
\u4E0E\u7F8E\u56FD\u8054\u90A6\u653F\u5E9C\u548C\u5DDE\u6388\u6743\u673A\u6784\u534F\u4F5C\u7684\u672C\u5730 Intranet \u7684\u7F51\u7EDC\u7BA1\u7406\u5458
\u5F00\u53D1\u51FA\u4E86\u6B64\u7CFB\u7EDF, \u4EE5\u4FBF\u5728\u53D1\u751F\u7D27\u6025\u4E8B\u4EF6\u65F6\u901A\u77E5
\u60A8\u3002\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u771F\u5B9E\u7684\u7D27\u6025\u4E8B\u4EF6, \u5219\u521A\u521A
\u542C\u5230\u7684\u4FE1\u53F7\u4E4B\u540E\u5C06\u4F1A\u8DDF\u6709\u5B98\u65B9\u4FE1\u606F, \u65B0\u95FB
\u6216\u6307\u4EE4\u3002\u8FD9\u5C06\u7EC8\u6B62\u6B64\u6B21\u7D27\u6025
\u5E7F\u64AD\u7CFB\u7EDF\u6D4B\u8BD5\u3002
\u5F00\u53D1\u8005\u8BF7\u6CE8\u610F: \u6B64\u5BF9\u8BDD\u6846\u6F14\u793A\u4E86\u4F7F\u7528 HTML \u8BBE\u7F6E\u6587\u672C\u683C\u5F0F\u3002
\u975E\u5E38\u4E4F\u5473\u7684\u5355\u884C\u8BF4\u660E, \u90A3\u4E48 Swing! \u5C0F\u7EC4
\u4F1A\u8BA9\u60A8\u5BF9\u5DE5\u5177\u63D0\u793A\u6709\u4E00\u79CD\u5168\u65B0\u7684\u8BA4\u8BC6\u3002
\u5728 Swing \u4E2D, \u53EF\u4EE5\u4F7F\u7528 HTML \u6765\u5B9E\u73B0:
OR SOME
+Physiological Descriptions
+O F
+MINUTE BODIES
+MADE BY
+MAGNIFYING GLASSES.
+WITH
+OBSERVATIONS and INQUIRIES + thereupon.
+By R. HOOKE + , Fellow of the ROYAL SOCIETY .
+
++ + diff --git a/src/demo/share/jfc/SwingSet2/resources/tree.txt b/src/demo/share/jfc/SwingSet2/resources/tree.txt new file mode 100644 index 00000000000..2c92fcab4b7 --- /dev/null +++ b/src/demo/share/jfc/SwingSet2/resources/tree.txt @@ -0,0 +1,628 @@ +################################################################################ +# Note: do not add blank lines, the data parser in TreeDemo.java cannot # +# handle them. # +# # +# Key: # +# Popular / Classical # +# ---------------------------- # +# A = Artist / Composer # +# R = Record / Style # +# S = Song Name / Composition # +# C = Catagory # +# # +################################################################################ +C Classical +A Beethoven +R concertos +S No. 1 - C +S No. 2 - B-Flat Major +S No. 3 - C Minor +S No. 4 - G Major +S No. 5 - E-Flat Major +R Quartets +S Six String Quartets +S Three String Quartets +S Grosse Fugue for String Quartets +R Sonatas +S Sonata in A Minor +S Sonata in F Major +R Symphonies +S No. 1 - C Major +S No. 2 - D Major +S No. 3 - E-Flat Major +S No. 4 - B-Flat Major +S No. 5 - C Minor +S No. 6 - F Major +S No. 7 - A Major +S No. 8 - F Major +S No. 9 - D Minor +A Brahms +R Concertos +S Violin Concerto +S Double Concerto - A Minor +S Piano Concerto No. 1 - D Minor +S Piano Concerto No. 2 - B-Flat Major +R Quartets +S Piano Quartet No. 1 - G Minor +S Piano Quartet No. 2 - A Major +S Piano Quartet No. 3 - C Minor +S String Quartet No. 3 - B-Flat Minor +R Sonatas +S Two Sonatas for Clarinet - F Minor +S Two Sonatas for Clarinet - E-Flat Major +R Symphonies +S No. 1 - C Minor +S No. 2 - D Minor +S No. 3 - F Major +S No. 4 - E Minor +A Mozart +R Concertos +S Piano Concerto No. 12 +S Piano Concerto No. 17 +S Clarinet Concerto +S Violin Concerto No. 5 +S Violin Concerto No. 4 +C Jazz +A Albert Ayler +R My Name is Albert Ayler +S Bye Bye Blackbird +S Billie's Bounce +S Summertime +S On Green Dolphin Street +S C.T. +R Swing Low Sweet Spiritual +S Goin' Home +S Old Man River +S When The Saints Go Marching In +S Deep River +S Down By The Riverside +S Spirits +S Witches and Devils +S Holy, Holy +S Saints +R Prophesy +S Spirits +S Wizard +S Ghosts +S Prophecy +R New Grass +S Free At Last +S Everybody's Movin' +S New Generation +S Heart Love +S Sun Watcher +A Chet Baker +R Sings and Plays +S Let's Get Lost +S This Is Always +S Long Ago and Far Away +S I Wish I Knew +S Daybreak +S Grey December +S I Remember You +R My Funny Valentine +S My Funny Valentine +S Someone To Watch Over Me +S Moonlight Becomes You +S I'm Glad There is You +S This is Always +S Time After Time +S Sweet Lorraine +S It's Always You +S Moon Love +S Like Someone In Love +S I've Never Been In Love Before +S Isn't it Romantic +S I Fall In Love Too Easily +R Grey December +S Grey December +S I Wish I Knew +S Someone To Watch Over Me +S Headline +S Bockhanal +S A Dandy Line +S Pro Defunctus +S Little Old Lady +S Goodbye +R The Route +S Tynan Time +S The Route +S Minor Yours +S Little Girl +S Ol' Croix +S The Great Lie +S Sweet Lorrain +S If I Should Lose You +A John Coltrane +R Blue Train +S Blue Train +S Moment's Notice +S Locomotion +S I'm Old Fashioned +S Lazy Bird +R Giant Steps +S Giant Steps +S Cousin Mary Steps +S Countdown +S Spiral +S Syeeda's Song Flute +S Naima +S Mr. P.C. +R My Favorite Things +S My Favorite Things +S Everytime We Say Goodbye +S Summertime +S But Not For Me +R Crescent +S Crescent +S Wise One +S Bessie's Blues +S Lonnie's Lament +S The Drum Thing +R Interstellar Space +S Mars +S Leo +S Venus +S Jupiter Variation +S Jupiter +S Saturn +A Miles Davis +R Transition +S Autumn Leaves +S Two Bass Hit +S Love, I've Found You +S I Thought About You +S All Blues +S Seven Steps To Heaven +R Quiet Nights +S Once Upon a Summertime +S Aos Pes Da Cruz +S Wait Till You See Her +S Corcovado +S Summer Nights +R My Funny Valentine +S All of You +S Stella By Starlight +S All Blues +S I Thought About You +R Voodoo Down +S Automn Leaves +S Footprints +S Directions +S Bitches Brew +S Hush +C Rock +A The Beatles +R A Hard Day's Night +S A Hard Day's Night +S I Should Have Known Better +S If I Fell +S I'm Happy Just To Dance With You +S And I Love Her +S Tell Me Why +S Can't Buy Me Love +S Any Time At All +S I'll Cry Instead +S Things We Said Today +S When I Get Home +S You Can't Do That +R Beatles For Sale +S No Reply +S I'm a Loser +S Baby's In Black +S Rock And Roll Music +S I'll Follow the Sun +S Mr. Moonlight +S Kansas City/Hey Hey Hey Hey +S Eight Days a Week +S Words Of Love +S Honey Don't +S Every Little Thing +S I Don't Want To Spoil the Party +S What You're Doing +S Everybody's Trying To Be My Baby +R Help! +S Help! +S The Night Before +S You've Got To Hide Your Love Away +S I Need You +S Another Girl +S You're Going To Lose That Girl +S Ticket To Ride +S Act Naturally +S It's Only Love +S You Like Me Too Much +S Tell Me What You See +S I've Just Seen a Face +S Yesterday +S Dizzy Miss Lizzie +R Rubber Soul +S Drive My Car +S Norwegian Wood +S You Won't See Me +S Nowhere Man +S Think For Yourself +S The Word +S Michelle +S What Goes On? +S Girl +S I'm Looking Through You +S In My Life +S Wait +S If I Needed Someone +S Run For Your Life +R Revolver +S Taxman +S Rigby +S I'm Only Sleeping +S For You To +S Here There And Everywhere +S Yellow Submarine +S She Said She Said +S Good Day Sunshine +S And Your Bird Can Sing +S For No One +S Doctor Robert +S I Want To Tell You +S Got To Get You Into My Life +S Tomorrow Never Knows +R Sgt. Pepper's Lonely Hearts Club Band +S Sgt. Pepper's Lonely Hearts Club Band +S With a Little Help From My Friends +S Lucy in the Sky With Diamonds +S Getting Better +S Fixing a Hole +S She's Leaving Home +S Being For the Benefit of Mr. Kite +S Within You Without You +S When I'm Sixty Four +S Lovely Rita +S Good Morning +S Sgt. Pepper's Reprise +S A Day In The Life +R Magical Mystery Tour +S Magical Mystery Tour +S Fool on the Hill +S Flying +S Blue Jay Way +S Your Mother Should Know +S I Am The Walrus +S Hello Goodbye +S Strawberry Fields Forever +S Penny Lane +S Baby You're a Rich Man +S All You Need Is Love +R The White Album +S Back in the USSR +S Dear Prudence +S Glass Onion +S Wild Honey Pie +S Bungalow Bill +S While My Guitar Gently Weeps +S Martha My Dear +S I'm So Tired +S Blackbird +S Piggies +S Rocky Raccoon +S Don't Pass Me By +S Why Don't We Do It In The Road +S I Will +S Julia +S Birthday +S Yer Blues +S Mother Nature's Son +S Sexy Sadie +S Helter Skelter +S Long Long Long +S Revolution 1 +S Honey Pie +S Savoy Truffle +S Cry Baby Cry +S Revolution 9 +S Good Night +R Abbey Road +S Come Together +S Something +S Maxwell's Silver Hammer +S Octopus's Garden +S She's So Heavy +S Here Comes The Sun +S Because +S You Never Give Me Your Money +S Sun King +S Mean Mr. Mustard +S Polythene Pam +S She Came In Through The Bathroom Window +S Golden Slumbers +S Carry That Weight +S The End +S Her Majesty +R Let It Be +S Two of Us +S Dig A Pony +S Across the Universe +S I Me Mine +S Dig It +S Let It Be +S Maggie Mae +S I've Got A Feeling +S One After 909 +S The Long and Winding Road +S For You Blue +S Get Back +A Crowded House +R Crowded House +S Mean To Me +S World Where You Live +S Now We're Getting Somewhere +S Don't Dream It's Over +S Love You Til The Day I Die +S Something So Strong +S Hole In The River +S Can't Carry On +S I Walk Away +S Tombstone +S That's What I Call Live +R Temple of Low Men +S I Feel Possessed +S Kill Eye +S Into Temptation +S Mansion In The Slums +S When You Come +S Never Be The Same +S Love This Life +S Sister Madly +S In The Lowlands +S Better Be Home Soon +R Woodface +S Chocolate Cake +S It's Only Natural +S Fall At Your Feet +S Tall Trees +S Weather With You +S Whispers and Moans +S Four Seasons in One Day +S There Goes God +S Fame Is +S All I Ask +S As Sure As I Am +S Italian Plastic +S She Goes On +S How Will You Go +R Together Alone +S Kare Kare +S In My Command +S Nails In My Feet +S Black & White Boy +S Fingers of Love +S Pineapple Head +S Locked Out +S Private Universe +S Walking on the Spot +S Distant Sun +S Catherine Wheels +S Skin Feeling +S Together Alone +A The Fixx +R Shuttered Room +S Some People +S Stand or Fall +S Cameras In Paris +S Shuttered Room +S The Fool +S Lost Planes +S I Live +S Sinking Island +S Time in a Glass +S Red Skies +R Reach The Beach +S One Thing Leads To Another +S The Sign of Fire +S Running +S Saved By Zero +S Opinions +S Reach The Beach +S Changing +S Liner +S Privilege +S Outside +R Phantoms +S Lose Face +S Less Cities, More Moving People +S Sunshine in the Shade +S Woman on a Train +S Wish +S Lost in Battle Overseas +S Question +S In Suspense +S Facing the Wind +S Are We Ourselves +S I Will +S Phantom Living +R Walkabout +S Secret Separation +S Built for the Future +S Treasure It +S Can't Finish +S Walkabout +S One Look Up +S Read Between The Lines +S Sense The Adventure +S Camphor +S Peace On Earth/Do What You Can +R Calm Animals +S I'm Life +S Driven Out +S Subterranean +S Precious Stone +S Gypsy Feet +S Calm Animals +S Shred of Evidence +S The Flow +S World Weary +S Caused To Be Alarmed +R Ink +S All is Fair +S How much Is Enough +S No One Has To Cry +S Crucified +S Falling In Love +S Shut It Out +S Still Around +S All The Best Things +S Yesterday, Today +S One Jungle +S Climb The Hill +S Make No Plans +R Elemental +S Two Different Views +S Going Without +S Is That It? +S Happy Landings +S Silent House +S Fatal Shore +S Ocean Blue +S You Know Me +S We Once Held Hands +S Life's What's Killing Me +A Harvin Garvel +R Harvin Garvel I +S Body +S What You Said +S All Rights Reserved +S High Purity +S Lies +S Get Real +S Gradma Cries +S First Feel +S Somethings wrong +S Shoes +S Spice Rack +S Dark Feel +S Tug of War +S Ant Song +R Harvin Garvel II +S We Ain't Through +S Trash and Spend +S Kick +S The Garden +S One & Only +S Squid Frenzy +S Soul In Soul +S The Desert +S He Grew Up +S Talk +S Image +S Tomorrow +S R70 +R Full Grown Dog +S I Am +S Say +S Is This Real +S What She Said +S Mirror Lies +S Girls +S Your Will +S Slow Motion Sunday +S Simple Life +S The Road Song +S The Same Way +S Stop Tryin +R Persia +S Exonic +S Drift +S Cruise +S MugWump +S Smear +S Everything +S Keep +S Circle +R Sensative Beak +S Whatcha Gotta Do +S Somewhere In This World +S Awaken +S Just A Dog +S I Can Dance +S Tomorrow +S Love Who? +S Is There Something +S I Like It +S Easy Chair +S As We Are One +S Far Away +S Leaving Science +S What A Life +A Komeda +R Plan 714 Till +S Fuego De La Vida +S Herbamore +S Som I Fjol +S En Spricka I Taket +R Genius Of +S More Is More +S Fire +S Rocket Plane (Music On The Moon) +S Boogie Woogie/Rock 'N' Roll +S Disko +S Top Star +S Light O' My Life +S If +S Frolic +S In Orbit +S Arbogast +S New New No +R What Makes It Go +S Binario +S It's Alright, Baby +S Curious +S Cul de Sac +S Living Things +S Flabbergast +S Campfire +S Happyment +S Our Hospitality +S Focus +S A Simple Formality +A Steve Miller Band +R Circle Of Love +S Heart Like A Wheel +S Get On Home +S Baby Wanna Dance +S Circle Of Love +S Macho City +R Fly Like An Eagle +S Space Intro +S Fly Like An Eagle +S Wild Mountain Honey +S Serenade +S Dance, Dance, Dance +S Mercury Blues +S Take the Money and Run +S Rockin' Me +S You Send Me +S Blue Odyssey +S Sweet Maree +S The Window +R Book Of Dreams +S Threshold +S Jet Airliner +S Winter Time +S Swingtown +S True Fine Love +S Wish Upon A Star +S Jungle Love +S Electrolux Imbroglio +S Sacrifice +S The Stake +S My Own Space +S Babes In The Wood +R Joker +S Sugar, Babe +S Mary Lou +S Shu Ba Da Du Ma +S Your Cash Ain't Nothin' But Trash +S The Joker +S The Lovin' Cup +S Come On In My Kitchen +S Evil +S Something To Believe In diff --git a/src/java.base/aix/native/libjsig/jsig.c b/src/java.base/aix/native/libjsig/jsig.c index 001255ab365..8914e2881a9 100644 --- a/src/java.base/aix/native/libjsig/jsig.c +++ b/src/java.base/aix/native/libjsig/jsig.c @@ -37,6 +37,7 @@ #include++++ +LONDON, Printed by Jo. + Martyn, and Ja. Allestry, + Printers to the ROYAL SOCIETY , and are to + be sold at their Shop at the Bell in S. Paul's Church-yard. M + D C L X V.
++
+
Warning: Deserialization of untrusted data is inherently dangerous + * and should be avoided. Untrusted data should be carefully validated according to the + * "Serialization and Deserialization" section of the + * {@extLink secure_coding_guidelines_javase Secure Coding Guidelines for Java SE}. + * {@extLink serialization_filter_guide Serialization Filtering} describes best + * practices for defensive use of serial filters. + *
+ * * If set on an {@link ObjectInputStream}, the {@link #checkInput checkInput(FilterInfo)} * method is called to validate classes, the length of each array, * the number of objects being read from the stream, the depth of the graph, diff --git a/src/java.base/share/classes/java/io/ObjectInputStream.java b/src/java.base/share/classes/java/io/ObjectInputStream.java index 2552247a1c9..637d314fcae 100644 --- a/src/java.base/share/classes/java/io/ObjectInputStream.java +++ b/src/java.base/share/classes/java/io/ObjectInputStream.java @@ -52,6 +52,14 @@ import sun.reflect.misc.ReflectUtil; * An ObjectInputStream deserializes primitive data and objects previously * written using an ObjectOutputStream. * + *Warning: Deserialization of untrusted data is inherently dangerous + * and should be avoided. Untrusted data should be carefully validated according to the + * "Serialization and Deserialization" section of the + * {@extLink secure_coding_guidelines_javase Secure Coding Guidelines for Java SE}. + * {@extLink serialization_filter_guide Serialization Filtering} describes best + * practices for defensive use of serial filters. + *
+ * *ObjectOutputStream and ObjectInputStream can provide an application with * persistent storage for graphs of objects when used with a FileOutputStream * and FileInputStream respectively. ObjectInputStream is used to recover diff --git a/src/java.base/share/classes/java/io/Serializable.java b/src/java.base/share/classes/java/io/Serializable.java index 1ad884fdcf2..87fb0485513 100644 --- a/src/java.base/share/classes/java/io/Serializable.java +++ b/src/java.base/share/classes/java/io/Serializable.java @@ -27,7 +27,17 @@ package java.io; /** * Serializability of a class is enabled by the class implementing the - * java.io.Serializable interface. Classes that do not implement this + * java.io.Serializable interface. + * + *
Warning: Deserialization of untrusted data is inherently dangerous + * and should be avoided. Untrusted data should be carefully validated according to the + * "Serialization and Deserialization" section of the + * {@extLink secure_coding_guidelines_javase Secure Coding Guidelines for Java SE}. + * {@extLink serialization_filter_guide Serialization Filtering} describes best + * practices for defensive use of serial filters. + *
+ * + * Classes that do not implement this * interface will not have any of their state serialized or * deserialized. All subtypes of a serializable class are themselves * serializable. The serialization interface has no methods or fields diff --git a/src/java.base/share/classes/java/io/package-info.java b/src/java.base/share/classes/java/io/package-info.java index 3d9685886cb..61c5babf016 100644 --- a/src/java.base/share/classes/java/io/package-info.java +++ b/src/java.base/share/classes/java/io/package-info.java @@ -31,19 +31,17 @@ * method in any class or interface in this package will cause a * {@code NullPointerException} to be thrown. * - *Warning: Deserialization of untrusted data is inherently dangerous + * and should be avoided. Untrusted data should be carefully validated according to the + * "Serialization and Deserialization" section of the + * {@extLink secure_coding_guidelines_javase Secure Coding Guidelines for Java SE}. + *
* - * - *If the {@code char} value specified by the index is a - * surrogate, the surrogate + * surrogate, the surrogate * value is returned. * * @param index the index of the {@code char} value to be returned @@ -119,7 +119,7 @@ public interface CharSequence { /** * Returns a stream of {@code int} zero-extending the {@code char} values * from this sequence. Any char which maps to a surrogate code + * href="{@docRoot}/java.base/java/lang/Character.html#unicode">surrogate code * point is passed through uninterpreted. * *
The stream binds to this sequence when the terminal stream operation diff --git a/src/java.base/share/classes/java/lang/ClassLoader.java b/src/java.base/share/classes/java/lang/ClassLoader.java index f0d41f425dd..cb6193f2b1f 100644 --- a/src/java.base/share/classes/java/lang/ClassLoader.java +++ b/src/java.base/share/classes/java/lang/ClassLoader.java @@ -73,7 +73,7 @@ import sun.security.util.SecurityConstants; /** * A class loader is an object that is responsible for loading classes. The * class {@code ClassLoader} is an abstract class. Given the binary name of a class, a class loader should attempt to + * href="#binary-name">binary name of a class, a class loader should attempt to * locate or generate data that constitutes a definition for the class. A * typical strategy is to transform the name into a file name and then read a * "class file" of that name from a file system. @@ -202,7 +202,7 @@ import sun.security.util.SecurityConstants; * } * * - *
Any class name provided as a {@code String} parameter to methods in * {@code ClassLoader} must be a binary name as defined by @@ -480,7 +480,7 @@ public abstract class ClassLoader { // -- Class -- /** - * Loads the class with the specified binary name. + * Loads the class with the specified binary name. * This method searches for classes in the same manner as the {@link * #loadClass(String, boolean)} method. It is invoked by the Java virtual * machine to resolve class references. Invoking this method is equivalent @@ -488,7 +488,7 @@ public abstract class ClassLoader { * false)}. * * @param name - * The binary name of the class + * The binary name of the class * * @return The resulting {@code Class} object * @@ -500,7 +500,7 @@ public abstract class ClassLoader { } /** - * Loads the class with the specified binary name. The + * Loads the class with the specified binary name. The * default implementation of this method searches for classes in the * following order: * @@ -530,7 +530,7 @@ public abstract class ClassLoader { * during the entire class loading process. * * @param name - * The binary name of the class + * The binary name of the class * * @param resolve * If {@code true} then resolve the class @@ -579,7 +579,7 @@ public abstract class ClassLoader { } /** - * Loads the class with the specified binary name + * Loads the class with the specified binary name * in a module defined to this class loader. This method returns {@code null} * if the class could not be found. * @@ -598,7 +598,7 @@ public abstract class ClassLoader { * @param module * The module * @param name - * The binary name of the class + * The binary name of the class * * @return The resulting {@code Class} object in a module defined by * this class loader, or {@code null} if the class could not be found. @@ -674,7 +674,7 @@ public abstract class ClassLoader { } /** - * Finds the class with the specified binary name. + * Finds the class with the specified binary name. * This method should be overridden by class loader implementations that * follow the delegation model for loading classes, and will be invoked by * the {@link #loadClass loadClass} method after checking the @@ -683,7 +683,7 @@ public abstract class ClassLoader { * @implSpec The default implementation throws {@code ClassNotFoundException}. * * @param name - * The binary name of the class + * The binary name of the class * * @return The resulting {@code Class} object * @@ -697,7 +697,7 @@ public abstract class ClassLoader { } /** - * Finds the class with the given binary name + * Finds the class with the given binary name * in a module defined to this class loader. * Class loader implementations that support the loading from modules * should override this method. @@ -715,7 +715,7 @@ public abstract class ClassLoader { * class loader * @param name - * The binary name of the class + * The binary name of the class * * @return The resulting {@code Class} object, or {@code null} * if the class could not be found. @@ -737,7 +737,7 @@ public abstract class ClassLoader { * Converts an array of bytes into an instance of class {@code Class}. * Before the {@code Class} can be used it must be resolved. This method * is deprecated in favor of the version that takes a binary name as its first argument, and is more secure. + * href="#binary-name">binary name as its first argument, and is more secure. * * @param b * The bytes that make up the class data. The bytes in positions @@ -804,12 +804,12 @@ public abstract class ClassLoader { * This method defines a package in this class loader corresponding to the * package of the {@code Class} (if such a package has not already been defined * in this class loader). The name of the defined package is derived from - * the binary name of the class specified by + * the binary name of the class specified by * the byte array {@code b}. * Other properties of the defined package are as specified by {@link Package}. * * @param name - * The expected binary name of the class, or + * The expected binary name of the class, or * {@code null} if not known * * @param b @@ -923,7 +923,7 @@ public abstract class ClassLoader { * package must contain the same set of certificates or a * {@code SecurityException} will be thrown. Note that if * {@code name} is {@code null}, this check is not performed. - * You should always pass in the binary name of the + * You should always pass in the binary name of the * class you are defining as well as the bytes. This ensures that the * class you are defining is indeed the class you think it is. * @@ -931,19 +931,19 @@ public abstract class ClassLoader { * only be defined by the {@linkplain #getPlatformClassLoader() * platform class loader} or its ancestors; otherwise {@code SecurityException} * will be thrown. If {@code name} is not {@code null}, it must be equal to - * the binary name of the class + * the binary name of the class * specified by the byte array {@code b}, otherwise a {@link * NoClassDefFoundError NoClassDefFoundError} will be thrown. * *
This method defines a package in this class loader corresponding to the * package of the {@code Class} (if such a package has not already been defined * in this class loader). The name of the defined package is derived from - * the binary name of the class specified by + * the binary name of the class specified by * the byte array {@code b}. * Other properties of the defined package are as specified by {@link Package}. * * @param name - * The expected binary name of the class, or + * The expected binary name of the class, or * {@code null} if not known * * @param b @@ -969,7 +969,7 @@ public abstract class ClassLoader { * * @throws NoClassDefFoundError * If {@code name} is not {@code null} and not equal to the - * binary name of the class specified by {@code b} + * binary name of the class specified by {@code b} * * @throws IndexOutOfBoundsException * If either {@code off} or {@code len} is negative, or if @@ -1027,7 +1027,7 @@ public abstract class ClassLoader { *
* * @param name - * The expected binary name. of the class, or + * The expected binary name. of the class, or * {@code null} if not known * * @param b @@ -1047,7 +1047,7 @@ public abstract class ClassLoader { * * @throws NoClassDefFoundError * If {@code name} is not {@code null} and not equal to the - * binary name of the class specified by {@code b} + * binary name of the class specified by {@code b} * * @throws SecurityException * If an attempt is made to add this class to a package that @@ -1198,7 +1198,7 @@ public abstract class ClassLoader { } /** - * Finds a class with the specified binary name, + * Finds a class with the specified binary name, * loading it if necessary. * *This method loads the class through the system class loader (see @@ -1209,7 +1209,7 @@ public abstract class ClassLoader { * #findClass(String)}.
* * @param name - * The binary name of the class + * The binary name of the class * * @return The {@code Class} object for the specified {@code name} * @@ -1239,13 +1239,13 @@ public abstract class ClassLoader { private native Class> findBootstrapClass(String name); /** - * Returns the class with the given binary name if this + * Returns the class with the given binary name if this * loader has been recorded by the Java virtual machine as an initiating - * loader of a class with that binary name. Otherwise + * loader of a class with that binary name. Otherwise * {@code null} is returned. * * @param name - * The binary name of the class + * The binary name of the class * * @return The {@code Class} object, or {@code null} if the class has * not been loaded @@ -2087,9 +2087,9 @@ public abstract class ClassLoader { } /** - * Defines a package by name in this {@code ClassLoader}. + * Defines a package by name in this {@code ClassLoader}. *- * Package names must be unique within a class loader and + * Package names must be unique within a class loader and * cannot be redefined or changed once created. *
* If a class loader wishes to define a package with specific properties, @@ -2123,7 +2123,7 @@ public abstract class ClassLoader { * in a named module may be for example sealed with different seal base. * * @param name - * The package name + * The package name * * @param specTitle * The specification title @@ -2185,10 +2185,10 @@ public abstract class ClassLoader { } /** - * Returns a {@code Package} of the given name that + * Returns a {@code Package} of the given name that * has been defined by this class loader. * - * @param name The package name + * @param name The package name * * @return The {@code Package} of the given name that has been defined * by this class loader, or {@code null} if not found @@ -2233,7 +2233,7 @@ public abstract class ClassLoader { } /** - * Finds a package by name in this class loader and its ancestors. + * Finds a package by name in this class loader and its ancestors. *
* If this class loader defines a {@code Package} of the given name, * the {@code Package} is returned. Otherwise, the ancestors of @@ -2247,7 +2247,7 @@ public abstract class ClassLoader { * class loader. * * @param name - * The package name + * The package name * * @return The {@code Package} of the given name that has been defined by * this class loader or its ancestors, or {@code null} if not found. diff --git a/src/java.base/share/classes/java/lang/Comparable.java b/src/java.base/share/classes/java/lang/Comparable.java index f9be4c440ca..0b5075c5e5f 100644 --- a/src/java.base/share/classes/java/lang/Comparable.java +++ b/src/java.base/share/classes/java/lang/Comparable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2018, 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 @@ -84,7 +84,7 @@ import java.util.*; * {(x, y) such that x.equals(y)}.
*
* This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @param
* The {@code ProcessHandle} static factory methods return instances that are
- * value-based,
+ * value-based,
* immutable and thread-safe.
* Use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on these instances of
diff --git a/src/java.base/share/classes/java/lang/Runtime.java b/src/java.base/share/classes/java/lang/Runtime.java
index d3d49ba120b..e11eaacbf5d 100644
--- a/src/java.base/share/classes/java/lang/Runtime.java
+++ b/src/java.base/share/classes/java/lang/Runtime.java
@@ -1140,7 +1140,7 @@ public class Runtime {
* number is not the major-release number but the feature-release
* counter, incremented for every time-based release. Use the {@link
* #feature()} method in preference to this method. For compatibility,
- * this method returns the value of the feature
+ * this method returns the value of the feature
* element.
*
* @return The value of the feature element
@@ -1158,7 +1158,7 @@ public class Runtime {
* number is not the minor-release number but the interim-release
* counter, incremented for every interim release. Use the {@link
* #interim()} method in preference to this method. For compatibility,
- * this method returns the value of the interim
+ * this method returns the value of the interim
* element, or zero if it is absent.
*
* @return The value of the interim element, or zero
@@ -1176,7 +1176,7 @@ public class Runtime {
* number is not the security level but the update-release counter,
* incremented for every update release. Use the {@link #update()}
* method in preference to this method. For compatibility, this method
- * returns the value of the update element, or
+ * returns the value of the update element, or
* zero if it is absent.
*
* @return The value of the update element, or zero
@@ -1188,9 +1188,9 @@ public class Runtime {
/**
* Returns an unmodifiable {@link java.util.List List} of the integers
- * represented in the version number. The {@code
- * List} always contains at least one element corresponding to the feature version number.
+ * represented in the version number.
+ * The {@code List} always contains at least one element corresponding to
+ * the feature version number.
*
* @return An unmodifiable list of the integers
* represented in the version number
diff --git a/src/java.base/share/classes/java/lang/SecurityManager.java b/src/java.base/share/classes/java/lang/SecurityManager.java
index 35e30c06cb1..74da4daeda5 100644
--- a/src/java.base/share/classes/java/lang/SecurityManager.java
+++ b/src/java.base/share/classes/java/lang/SecurityManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, 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
@@ -235,19 +235,6 @@ public class SecurityManager {
*/
private boolean initialized = false;
-
- /**
- * returns true if the current context has been granted AllPermission
- */
- private boolean hasAllPermission() {
- try {
- checkPermission(SecurityConstants.ALL_PERMISSION);
- return true;
- } catch (SecurityException se) {
- return false;
- }
- }
-
/**
* Constructs a new
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Josh Bloch
diff --git a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java
index e9f1061d9be..e0d078dcc1f 100644
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java
@@ -2035,11 +2035,26 @@ return mh1;
ReflectiveOperationException.class);
}
+ MemberName resolveOrNull(byte refKind, MemberName member) {
+ // do this before attempting to resolve
+ if (!isClassAccessible(member.getDeclaringClass())) {
+ return null;
+ }
+ Objects.requireNonNull(member.getName());
+ Objects.requireNonNull(member.getType());
+ return IMPL_NAMES.resolveOrNull(refKind, member, lookupClassOrNull());
+ }
+
void checkSymbolicClass(Class> refc) throws IllegalAccessException {
+ if (!isClassAccessible(refc)) {
+ throw new MemberName(refc).makeAccessException("symbolic reference class is not accessible", this);
+ }
+ }
+
+ boolean isClassAccessible(Class> refc) {
Objects.requireNonNull(refc);
Class> caller = lookupClassOrNull();
- if (caller != null && !VerifyAccess.isClassAccessible(refc, caller, allowedModes))
- throw new MemberName(refc).makeAccessException("symbolic reference class is not accessible", this);
+ return caller == null || VerifyAccess.isClassAccessible(refc, caller, allowedModes);
}
/** Check name for an illegal leading "<" character. */
@@ -2482,10 +2497,13 @@ return mh1;
}
}
try {
- MemberName resolved2 = publicLookup().resolveOrFail(refKind,
+ MemberName resolved2 = publicLookup().resolveOrNull(refKind,
new MemberName(refKind, defc, member.getName(), member.getType()));
+ if (resolved2 == null) {
+ return false;
+ }
checkSecurityManager(defc, resolved2);
- } catch (ReflectiveOperationException | SecurityException ex) {
+ } catch (SecurityException ex) {
return false;
}
return true;
diff --git a/src/java.base/share/classes/java/lang/module/Configuration.java b/src/java.base/share/classes/java/lang/module/Configuration.java
index 988d5c7a40a..24bf3349b85 100644
--- a/src/java.base/share/classes/java/lang/module/Configuration.java
+++ b/src/java.base/share/classes/java/lang/module/Configuration.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, 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
@@ -48,7 +48,7 @@ import jdk.internal.module.ModuleTarget;
/**
* A configuration that is the result of
* resolution or resolution with
- * service binding.
+ * service binding.
*
* A configuration encapsulates the readability graph that is the
* output of resolution. A readability graph is a directed graph whose vertices
diff --git a/src/java.base/share/classes/java/lang/package-info.java b/src/java.base/share/classes/java/lang/package-info.java
index 5868aee8fcf..882a610c1a0 100644
--- a/src/java.base/share/classes/java/lang/package-info.java
+++ b/src/java.base/share/classes/java/lang/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, 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
@@ -58,7 +58,7 @@
* represent errors and exceptions.
*
*
- * Many operating systems and file systems support for symbolic links.
* A symbolic link is a special file that serves as a reference to another file.
* For the most part, symbolic links are transparent to applications and
@@ -45,7 +45,7 @@
* that are semantically close but support for these other types of links is
* not included in this package. The {@link java.io.File} class defines the {@link java.io.File#toPath
* toPath} method to construct a {@link java.nio.file.Path} by converting
* the abstract path represented by the {@code java.io.File} object. The resulting
@@ -54,7 +54,7 @@
* on the interoperability between {@code Path}
* and {@code java.io.File} objects. The view of the files and file system provided by classes in this package are
* guaranteed to be consistent with other views provided by other instances in the
* same Java virtual machine. The view may or may not, however, be consistent with
@@ -65,7 +65,7 @@
* or on some other machine. The exact nature of any such inconsistencies are
* system-dependent and are therefore unspecified. The {@link java.nio.file.StandardOpenOption#SYNC SYNC} and {@link
* java.nio.file.StandardOpenOption#DSYNC DSYNC} options are used when opening a file
* to require that updates to the file are written synchronously to the underlying
@@ -82,7 +82,7 @@
* java.nio.file.spi.FileSystemProvider provider} implementations is provider
* specific. Unless otherwise noted, passing a {@code null} argument to a constructor
* or method of any class or interface in this package will cause a {@link
* java.lang.NullPointerException NullPointerException} to be thrown. Additionally,
@@ -103,7 +103,7 @@
* provider} with a parameter that is an object created by another provider,
* will throw {@link java.nio.file.ProviderMismatchException}.
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code Duration} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/Instant.java b/src/java.base/share/classes/java/time/Instant.java
index 27dd3fdf2c8..1aefddfffce 100644
--- a/src/java.base/share/classes/java/time/Instant.java
+++ b/src/java.base/share/classes/java/time/Instant.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -193,7 +193,7 @@ import java.util.Objects;
* {@code ZonedDateTime} and {@code Duration}.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code Instant} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/LocalDate.java b/src/java.base/share/classes/java/time/LocalDate.java
index 7e73856ecbb..0a89ec070c4 100644
--- a/src/java.base/share/classes/java/time/LocalDate.java
+++ b/src/java.base/share/classes/java/time/LocalDate.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -125,7 +125,7 @@ import java.util.stream.Stream;
* to be accurate will find the ISO-8601 approach unsuitable.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code LocalDate} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/LocalDateTime.java b/src/java.base/share/classes/java/time/LocalDateTime.java
index e10c9c842b2..9a9ca87ddc3 100644
--- a/src/java.base/share/classes/java/time/LocalDateTime.java
+++ b/src/java.base/share/classes/java/time/LocalDateTime.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -121,7 +121,7 @@ import java.util.Objects;
* to be accurate will find the ISO-8601 approach unsuitable.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code LocalDateTime} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/LocalTime.java b/src/java.base/share/classes/java/time/LocalTime.java
index 4b0456adea0..76b5fed0367 100644
--- a/src/java.base/share/classes/java/time/LocalTime.java
+++ b/src/java.base/share/classes/java/time/LocalTime.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -111,7 +111,7 @@ import java.util.Objects;
* representation, this class, for time-of-day.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code LocalTime} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/MonthDay.java b/src/java.base/share/classes/java/time/MonthDay.java
index 7411f45bd87..c34a4f9c978 100644
--- a/src/java.base/share/classes/java/time/MonthDay.java
+++ b/src/java.base/share/classes/java/time/MonthDay.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -113,7 +113,7 @@ import java.util.Objects;
* to be accurate will find the ISO-8601 approach unsuitable.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code MonthDay} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/OffsetDateTime.java b/src/java.base/share/classes/java/time/OffsetDateTime.java
index 0e1c47c8a10..39b80bc1fc6 100644
--- a/src/java.base/share/classes/java/time/OffsetDateTime.java
+++ b/src/java.base/share/classes/java/time/OffsetDateTime.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -114,7 +114,7 @@ import java.util.Objects;
* more detail, or when communicating to a database or in a network protocol.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code OffsetDateTime} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/OffsetTime.java b/src/java.base/share/classes/java/time/OffsetTime.java
index 36a22e6d4c1..b4e52743ba5 100644
--- a/src/java.base/share/classes/java/time/OffsetTime.java
+++ b/src/java.base/share/classes/java/time/OffsetTime.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -104,7 +104,7 @@ import java.util.Objects;
* in an {@code OffsetTime}.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code OffsetTime} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/Period.java b/src/java.base/share/classes/java/time/Period.java
index 667a7bf04f8..726c52b742b 100644
--- a/src/java.base/share/classes/java/time/Period.java
+++ b/src/java.base/share/classes/java/time/Period.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -119,7 +119,7 @@ import java.util.regex.Pattern;
* period may be negative.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code Period} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/Year.java b/src/java.base/share/classes/java/time/Year.java
index e76e2a0a949..27dc53dae6e 100644
--- a/src/java.base/share/classes/java/time/Year.java
+++ b/src/java.base/share/classes/java/time/Year.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -121,7 +121,7 @@ import java.util.Objects;
* to be accurate will find the ISO-8601 approach unsuitable.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code Year} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/YearMonth.java b/src/java.base/share/classes/java/time/YearMonth.java
index 31c6a5a46eb..d1fa05b6243 100644
--- a/src/java.base/share/classes/java/time/YearMonth.java
+++ b/src/java.base/share/classes/java/time/YearMonth.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -117,7 +117,7 @@ import java.util.Objects;
* to be accurate will find the ISO-8601 approach unsuitable.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code YearMonth} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/ZoneId.java b/src/java.base/share/classes/java/time/ZoneId.java
index d3aa95b6443..8bd135ab611 100644
--- a/src/java.base/share/classes/java/time/ZoneId.java
+++ b/src/java.base/share/classes/java/time/ZoneId.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -162,7 +162,7 @@ import static java.util.Map.entry;
* queried, but not modified, on a Java Runtime with incomplete time-zone information.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code ZoneId} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/ZoneOffset.java b/src/java.base/share/classes/java/time/ZoneOffset.java
index 9f2e9c2d356..29b5909a57d 100644
--- a/src/java.base/share/classes/java/time/ZoneOffset.java
+++ b/src/java.base/share/classes/java/time/ZoneOffset.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -116,7 +116,7 @@ import java.util.concurrent.ConcurrentMap;
* applications must not rely on such caching.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code ZoneOffset} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/ZonedDateTime.java b/src/java.base/share/classes/java/time/ZonedDateTime.java
index fa79b971eef..7d50644a3f7 100644
--- a/src/java.base/share/classes/java/time/ZonedDateTime.java
+++ b/src/java.base/share/classes/java/time/ZonedDateTime.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -144,7 +144,7 @@ import java.util.Objects;
* represents an instant, especially during a daylight savings overlap.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code ZonedDateTime} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/chrono/HijrahDate.java b/src/java.base/share/classes/java/time/chrono/HijrahDate.java
index 8e34703e4b0..48b506044c0 100644
--- a/src/java.base/share/classes/java/time/chrono/HijrahDate.java
+++ b/src/java.base/share/classes/java/time/chrono/HijrahDate.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -105,7 +105,7 @@ import java.time.temporal.ValueRange;
* to a new HijrahChronology.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code HijrahDate} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/chrono/JapaneseDate.java b/src/java.base/share/classes/java/time/chrono/JapaneseDate.java
index ccf3dcc3144..92437c3d714 100644
--- a/src/java.base/share/classes/java/time/chrono/JapaneseDate.java
+++ b/src/java.base/share/classes/java/time/chrono/JapaneseDate.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -112,7 +112,7 @@ import sun.util.calendar.LocalGregorianCalendar;
* {@code JapaneseChronology.ERA_HEISEI}.
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code JapaneseDate} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/chrono/MinguoDate.java b/src/java.base/share/classes/java/time/chrono/MinguoDate.java
index ba25c8da018..c827b662871 100644
--- a/src/java.base/share/classes/java/time/chrono/MinguoDate.java
+++ b/src/java.base/share/classes/java/time/chrono/MinguoDate.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -92,7 +92,7 @@ import java.util.Objects;
* Dates are aligned such that {@code 0001-01-01 (Minguo)} is {@code 1912-01-01 (ISO)}.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code MinguoDate} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/chrono/ThaiBuddhistDate.java b/src/java.base/share/classes/java/time/chrono/ThaiBuddhistDate.java
index f403317b11e..276905c0f37 100644
--- a/src/java.base/share/classes/java/time/chrono/ThaiBuddhistDate.java
+++ b/src/java.base/share/classes/java/time/chrono/ThaiBuddhistDate.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -92,7 +92,7 @@ import java.util.Objects;
* Dates are aligned such that {@code 2484-01-01 (Buddhist)} is {@code 1941-01-01 (ISO)}.
*
*
- * This is a value-based
+ * This is a value-based
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code ThaiBuddhistDate} may have unpredictable results and should be avoided.
diff --git a/src/java.base/share/classes/java/time/chrono/package-info.java b/src/java.base/share/classes/java/time/chrono/package-info.java
index d829700dd8f..c382fb12101 100644
--- a/src/java.base/share/classes/java/time/chrono/package-info.java
+++ b/src/java.base/share/classes/java/time/chrono/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -95,7 +95,7 @@
*
* This example lists todays date for all of the available calendars.
*
* Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
* in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
diff --git a/src/java.base/share/classes/java/time/format/package-info.java b/src/java.base/share/classes/java/time/format/package-info.java
index 3b5d0964a07..d4f1ce784f5 100644
--- a/src/java.base/share/classes/java/time/format/package-info.java
+++ b/src/java.base/share/classes/java/time/format/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -79,7 +79,7 @@
* {@link java.time.format.DecimalStyle DecimalStyle}.
*
* Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
* in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
diff --git a/src/java.base/share/classes/java/time/package-info.java b/src/java.base/share/classes/java/time/package-info.java
index f078a08306d..be783ba9481 100644
--- a/src/java.base/share/classes/java/time/package-info.java
+++ b/src/java.base/share/classes/java/time/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -90,7 +90,7 @@
* The calendar neutral API should be reserved for interactions with users.
*
* {@link java.time.Instant} is essentially a numeric timestamp.
* The current Instant can be retrieved from a {@link java.time.Clock}.
@@ -118,7 +118,7 @@
* The widespread use of time-zones tends to add considerable complexity to an application.
*
* Beyond dates and times, the API also allows the storage of periods and durations of time.
* A {@link java.time.Duration} is a simple measure of time along the time-line in nanoseconds.
@@ -126,7 +126,7 @@
* to humans, such as years or days.
*
* {@link java.time.Month} stores a month on its own.
* This stores a single month-of-year in isolation, such as 'DECEMBER'.
@@ -160,7 +160,7 @@
* but contains less information than a full time-zone.
*
* Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
* in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
@@ -172,7 +172,7 @@
* or a {@link java.time.DateTimeException}.
*
* The API has been designed to reject null early and to be clear about this behavior.
* A key exception is any method that takes an object and returns a boolean, for the purpose
diff --git a/src/java.base/share/classes/java/time/temporal/package-info.java b/src/java.base/share/classes/java/time/temporal/package-info.java
index 1cb16dd7b7d..25b228fee73 100644
--- a/src/java.base/share/classes/java/time/temporal/package-info.java
+++ b/src/java.base/share/classes/java/time/temporal/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -75,7 +75,7 @@
*
* Dates and times are expressed in terms of fields and units.
* A unit is used to measure an amount of time, such as years, days or minutes.
@@ -106,7 +106,7 @@
* The fields also provide access to the range of valid values.
*
* A key part of the date-time problem space is adjusting a date to a new, related value,
* such as the "last day of the month", or "next Wednesday".
@@ -131,7 +131,7 @@
* Applications can also define queries by implementing {@link java.time.temporal.TemporalQuery}.
*
* Different locales have different definitions of the week.
* For example, in Europe the week typically starts on a Monday, while in the US it starts on a Sunday.
@@ -143,7 +143,7 @@
* This is modeled in {@link java.time.temporal.IsoFields}.
*
* Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
* in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
diff --git a/src/java.base/share/classes/java/time/zone/package-info.java b/src/java.base/share/classes/java/time/zone/package-info.java
index 06256bc960d..e5c6a75becb 100644
--- a/src/java.base/share/classes/java/time/zone/package-info.java
+++ b/src/java.base/share/classes/java/time/zone/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -70,7 +70,7 @@
* gaps and overlaps in the local time-line typically caused by Daylight Saving Time.
*
* Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
* in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
diff --git a/src/java.base/share/classes/java/util/AbstractCollection.java b/src/java.base/share/classes/java/util/AbstractCollection.java
index 9845c0f031b..0fa05a268fd 100644
--- a/src/java.base/share/classes/java/util/AbstractCollection.java
+++ b/src/java.base/share/classes/java/util/AbstractCollection.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -49,7 +49,7 @@ package java.util;
* the collection being implemented admits a more efficient implementation.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Josh Bloch
diff --git a/src/java.base/share/classes/java/util/AbstractList.java b/src/java.base/share/classes/java/util/AbstractList.java
index 6d819368a24..848e80c5535 100644
--- a/src/java.base/share/classes/java/util/AbstractList.java
+++ b/src/java.base/share/classes/java/util/AbstractList.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -62,7 +62,7 @@ import java.util.function.Consumer;
* collection being implemented admits a more efficient implementation.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Josh Bloch
diff --git a/src/java.base/share/classes/java/util/AbstractMap.java b/src/java.base/share/classes/java/util/AbstractMap.java
index ed39bcacbca..7109d31813b 100644
--- a/src/java.base/share/classes/java/util/AbstractMap.java
+++ b/src/java.base/share/classes/java/util/AbstractMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -52,7 +52,7 @@ import java.util.Map.Entry;
* map being implemented admits a more efficient implementation.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @param This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.5
diff --git a/src/java.base/share/classes/java/util/AbstractSequentialList.java b/src/java.base/share/classes/java/util/AbstractSequentialList.java
index 0e7cb01938a..91ce7401413 100644
--- a/src/java.base/share/classes/java/util/AbstractSequentialList.java
+++ b/src/java.base/share/classes/java/util/AbstractSequentialList.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -54,7 +54,7 @@ package java.util;
* specification.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Josh Bloch
diff --git a/src/java.base/share/classes/java/util/AbstractSet.java b/src/java.base/share/classes/java/util/AbstractSet.java
index 0a35861aa2a..80d4c5e91d2 100644
--- a/src/java.base/share/classes/java/util/AbstractSet.java
+++ b/src/java.base/share/classes/java/util/AbstractSet.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -42,7 +42,7 @@ package java.util;
* for {@code equals} and {@code hashCode}.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @param This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Josh Bloch and Doug Lea
diff --git a/src/java.base/share/classes/java/util/ArrayList.java b/src/java.base/share/classes/java/util/ArrayList.java
index c57ccf73778..bde88449be5 100644
--- a/src/java.base/share/classes/java/util/ArrayList.java
+++ b/src/java.base/share/classes/java/util/ArrayList.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -92,7 +92,7 @@ import jdk.internal.misc.SharedSecrets;
* should be used only to detect bugs.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @param This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Josh Bloch
diff --git a/src/java.base/share/classes/java/util/Collection.java b/src/java.base/share/classes/java/util/Collection.java
index d016f8c374b..7735af16572 100644
--- a/src/java.base/share/classes/java/util/Collection.java
+++ b/src/java.base/share/classes/java/util/Collection.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -188,7 +188,7 @@ import java.util.stream.StreamSupport;
* unmodifiable view, the view can be considered effectively immutable.
*
* This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @implSpec
@@ -247,10 +247,10 @@ public interface Collection This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Josh Bloch
diff --git a/src/java.base/share/classes/java/util/Comparator.java b/src/java.base/share/classes/java/util/Comparator.java
index 1e95e6279bb..05165595744 100644
--- a/src/java.base/share/classes/java/util/Comparator.java
+++ b/src/java.base/share/classes/java/util/Comparator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -94,7 +94,7 @@ import java.util.Comparators;
* an equivalence relation.
*
* This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @param This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Doug Lea
@@ -363,10 +363,10 @@ public interface Deque This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Josh Bloch
diff --git a/src/java.base/share/classes/java/util/EnumSet.java b/src/java.base/share/classes/java/util/EnumSet.java
index 88c3cb9056a..70da034a8b3 100644
--- a/src/java.base/share/classes/java/util/EnumSet.java
+++ b/src/java.base/share/classes/java/util/EnumSet.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, 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
@@ -69,7 +69,7 @@ import jdk.internal.misc.SharedSecrets;
* constant time if their argument is also an enum set.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Josh Bloch
diff --git a/src/java.base/share/classes/java/util/HashMap.java b/src/java.base/share/classes/java/util/HashMap.java
index 5a87c5820cc..daa2b65b47b 100644
--- a/src/java.base/share/classes/java/util/HashMap.java
+++ b/src/java.base/share/classes/java/util/HashMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -118,7 +118,7 @@ import jdk.internal.misc.SharedSecrets;
* should be used only to detect bugs.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @param This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @param As of the Java 2 platform v1.2, this class was retrofitted to
* implement the {@link Map} interface, making it a member of the
- *
+ *
*
* Java Collections Framework. Unlike the new collection
* implementations, {@code Hashtable} is synchronized. If a
diff --git a/src/java.base/share/classes/java/util/IdentityHashMap.java b/src/java.base/share/classes/java/util/IdentityHashMap.java
index e48cb354c6e..b9585395317 100644
--- a/src/java.base/share/classes/java/util/IdentityHashMap.java
+++ b/src/java.base/share/classes/java/util/IdentityHashMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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
@@ -123,7 +123,7 @@ import jdk.internal.misc.SharedSecrets;
* {@link HashMap} (which uses chaining rather than linear-probing).
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @see System#identityHashCode(Object)
diff --git a/src/java.base/share/classes/java/util/Iterator.java b/src/java.base/share/classes/java/util/Iterator.java
index 5f7b1de8b85..aaf6a0497f4 100644
--- a/src/java.base/share/classes/java/util/Iterator.java
+++ b/src/java.base/share/classes/java/util/Iterator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -40,7 +40,7 @@ import java.util.function.Consumer;
*
*
* This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @apiNote
diff --git a/src/java.base/share/classes/java/util/LinkedHashMap.java b/src/java.base/share/classes/java/util/LinkedHashMap.java
index 252a5437353..6bc029e8ab3 100644
--- a/src/java.base/share/classes/java/util/LinkedHashMap.java
+++ b/src/java.base/share/classes/java/util/LinkedHashMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -140,7 +140,7 @@ import java.io.IOException;
* fail-fast, and additionally report {@link Spliterator#ORDERED}.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @implNote
diff --git a/src/java.base/share/classes/java/util/LinkedHashSet.java b/src/java.base/share/classes/java/util/LinkedHashSet.java
index 0d0f927166e..48b1e4f3326 100644
--- a/src/java.base/share/classes/java/util/LinkedHashSet.java
+++ b/src/java.base/share/classes/java/util/LinkedHashSet.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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
@@ -100,7 +100,7 @@ package java.util;
* should be used only to detect bugs.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @param This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Josh Bloch
diff --git a/src/java.base/share/classes/java/util/List.java b/src/java.base/share/classes/java/util/List.java
index 05428b75942..79df5961382 100644
--- a/src/java.base/share/classes/java/util/List.java
+++ b/src/java.base/share/classes/java/util/List.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -115,7 +115,7 @@ import java.util.function.UnaryOperator;
*
*
* This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @param This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Josh Bloch
diff --git a/src/java.base/share/classes/java/util/Map.java b/src/java.base/share/classes/java/util/Map.java
index 94e67a453bd..1148e638922 100644
--- a/src/java.base/share/classes/java/util/Map.java
+++ b/src/java.base/share/classes/java/util/Map.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -141,7 +141,7 @@ import java.io.Serializable;
*
*
* This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @param This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Doug Lea
diff --git a/src/java.base/share/classes/java/util/NavigableSet.java b/src/java.base/share/classes/java/util/NavigableSet.java
index 4f1f0d510a9..49cd130243b 100644
--- a/src/java.base/share/classes/java/util/NavigableSet.java
+++ b/src/java.base/share/classes/java/util/NavigableSet.java
@@ -79,7 +79,7 @@ package java.util;
* {@code NavigableSet}.
*
* This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Doug Lea
diff --git a/src/java.base/share/classes/java/util/PriorityQueue.java b/src/java.base/share/classes/java/util/PriorityQueue.java
index a75b68d023e..8558d51eac1 100644
--- a/src/java.base/share/classes/java/util/PriorityQueue.java
+++ b/src/java.base/share/classes/java/util/PriorityQueue.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, 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
@@ -74,7 +74,7 @@ import jdk.internal.misc.SharedSecrets;
* ({@code peek}, {@code element}, and {@code size}).
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.5
diff --git a/src/java.base/share/classes/java/util/Queue.java b/src/java.base/share/classes/java/util/Queue.java
index 54d450b8041..34bf33fb57f 100644
--- a/src/java.base/share/classes/java/util/Queue.java
+++ b/src/java.base/share/classes/java/util/Queue.java
@@ -128,7 +128,7 @@ package java.util;
* ordering properties.
*
* This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.5
diff --git a/src/java.base/share/classes/java/util/RandomAccess.java b/src/java.base/share/classes/java/util/RandomAccess.java
index 09793e633f6..52de56d9fa9 100644
--- a/src/java.base/share/classes/java/util/RandomAccess.java
+++ b/src/java.base/share/classes/java/util/RandomAccess.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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
@@ -59,7 +59,7 @@ package java.util;
*
*
* This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.4
diff --git a/src/java.base/share/classes/java/util/ResourceBundle.java b/src/java.base/share/classes/java/util/ResourceBundle.java
index 324edafc4a6..55647cd7c61 100644
--- a/src/java.base/share/classes/java/util/ResourceBundle.java
+++ b/src/java.base/share/classes/java/util/ResourceBundle.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, 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
@@ -251,7 +251,7 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
* or "{@code java.properties}" format are searched.
*
* If the caller module is a
- *
+ *
* resource bundle provider, it does not fall back to the
* class loader search.
*
@@ -260,7 +260,7 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
* A common format of resource bundles is in {@linkplain PropertyResourceBundle
* .properties} file format. Typically {@code .properties} resource bundles
* are packaged in a JAR file. Resource bundle only JAR file can be readily
- * deployed as an
+ * deployed as an
* automatic module. For example, if the JAR file contains the
* entry "{@code p/q/Foo_ja.properties}" and no {@code .class} entry,
* when resolved and defined as an automatic module, no package is derived
diff --git a/src/java.base/share/classes/java/util/Set.java b/src/java.base/share/classes/java/util/Set.java
index aadae49a880..504904f2263 100644
--- a/src/java.base/share/classes/java/util/Set.java
+++ b/src/java.base/share/classes/java/util/Set.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -92,7 +92,7 @@ package java.util;
*
*
* This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @param This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @param This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @param This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @param This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @param As of the Java 2 platform v1.2, this class was retrofitted to
* implement the {@link List} interface, making it a member of the
- *
+ *
* Java Collections Framework. Unlike the new collection
* implementations, {@code Vector} is synchronized. If a thread-safe
* implementation is not needed, it is recommended to use {@link
diff --git a/src/java.base/share/classes/java/util/WeakHashMap.java b/src/java.base/share/classes/java/util/WeakHashMap.java
index 183b4c39729..81d870bdc9e 100644
--- a/src/java.base/share/classes/java/util/WeakHashMap.java
+++ b/src/java.base/share/classes/java/util/WeakHashMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, 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
@@ -120,7 +120,7 @@ import java.util.function.Consumer;
* should be used only to detect bugs.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @param This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.5
diff --git a/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java b/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java
index 3d68fd831a6..8043510b375 100644
--- a/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java
+++ b/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java
@@ -188,7 +188,7 @@ import java.util.NoSuchElementException;
* the {@code BlockingDeque} in another thread.
*
* This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.6
@@ -399,9 +399,9 @@ public interface BlockingDeque This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.5
@@ -302,9 +302,9 @@ public interface BlockingQueue All arguments to all task methods must be non-null.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.5
diff --git a/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java b/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java
index 64b6bf1fa80..0d7a0ebb159 100644
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java
@@ -85,7 +85,7 @@ import java.util.function.Predicate;
* the {@code ConcurrentLinkedDeque} in another thread.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.7
diff --git a/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java b/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java
index ac70f00bac6..701806e848e 100644
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java
@@ -99,7 +99,7 @@ import java.util.function.Predicate;
* the {@code ConcurrentLinkedQueue} in another thread.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.5
diff --git a/src/java.base/share/classes/java/util/concurrent/ConcurrentMap.java b/src/java.base/share/classes/java/util/concurrent/ConcurrentMap.java
index d80ec3c6c91..2037e31bb66 100644
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentMap.java
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentMap.java
@@ -60,7 +60,7 @@ import java.util.function.Function;
* the {@code ConcurrentMap} in another thread.
*
* This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.5
@@ -180,10 +180,10 @@ public interface ConcurrentMap This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Doug Lea
diff --git a/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java b/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java
index b0db2794026..822dde81df3 100644
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java
@@ -101,7 +101,7 @@ import java.util.concurrent.atomic.LongAdder;
* elements.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Doug Lea
diff --git a/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java b/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java
index 9b6330238d7..140bde46661 100644
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java
@@ -85,7 +85,7 @@ import java.util.Spliterator;
* distinguished from the absence of elements.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @author Doug Lea
@@ -324,7 +324,7 @@ public class ConcurrentSkipListSet This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.5
@@ -645,10 +645,10 @@ public class CopyOnWriteArrayList This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @see CopyOnWriteArrayList
@@ -340,10 +340,10 @@ public class CopyOnWriteArraySet This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.5
diff --git a/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java b/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java
index 9bac335693c..f55998e2157 100644
--- a/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java
+++ b/src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java
@@ -68,7 +68,7 @@ import java.util.function.Predicate;
* methods of the {@link Collection} and {@link Iterator} interfaces.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.6
diff --git a/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java b/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java
index 96029f670b0..4ba6c1e3314 100644
--- a/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java
+++ b/src/java.base/share/classes/java/util/concurrent/LinkedBlockingQueue.java
@@ -71,7 +71,7 @@ import java.util.function.Predicate;
* methods of the {@link Collection} and {@link Iterator} interfaces.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.5
diff --git a/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java b/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java
index 137bd872a87..5522f7b401b 100644
--- a/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java
+++ b/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java
@@ -81,7 +81,7 @@ import java.util.function.Predicate;
* the {@code LinkedTransferQueue} in another thread.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.7
diff --git a/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java b/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java
index ae2927c96f9..388c75d36fd 100644
--- a/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java
+++ b/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java
@@ -101,7 +101,7 @@ import java.util.function.Consumer;
* }}
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.5
diff --git a/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java b/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java
index 33cb88ff023..7f9c7375495 100644
--- a/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java
+++ b/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java
@@ -80,7 +80,7 @@ import java.util.concurrent.locks.ReentrantLock;
* methods of the {@link Collection} and {@link Iterator} interfaces.
*
* This class is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.5
diff --git a/src/java.base/share/classes/java/util/concurrent/TransferQueue.java b/src/java.base/share/classes/java/util/concurrent/TransferQueue.java
index 0621bce2b76..72a4108e61b 100644
--- a/src/java.base/share/classes/java/util/concurrent/TransferQueue.java
+++ b/src/java.base/share/classes/java/util/concurrent/TransferQueue.java
@@ -58,7 +58,7 @@ package java.util.concurrent;
* and {@code transfer} are effectively synonymous.
*
* This interface is a member of the
- *
+ *
* Java Collections Framework.
*
* @since 1.7
diff --git a/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java b/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java
index e786e791fc9..b3ef8d05096 100644
--- a/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java
+++ b/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java
@@ -412,11 +412,11 @@ public class LockSupport {
/**
* Returns the thread id for the given thread. We must access
* this directly rather than via method Thread.getId() because
- * getId() is not final, and has been known to be overridden in
- * ways that do not preserve unique mappings.
+ * getId() has been known to be overridden in ways that do not
+ * preserve unique mappings.
*/
static final long getThreadId(Thread thread) {
- return U.getLongVolatile(thread, TID);
+ return U.getLong(thread, TID);
}
// Hotspot implementation via intrinsics API
diff --git a/src/java.base/share/classes/java/util/jar/Manifest.java b/src/java.base/share/classes/java/util/jar/Manifest.java
index d34d718a5d0..18f6831a71b 100644
--- a/src/java.base/share/classes/java/util/jar/Manifest.java
+++ b/src/java.base/share/classes/java/util/jar/Manifest.java
@@ -148,7 +148,7 @@ public class Manifest implements Cloneable {
DataOutputStream dos = new DataOutputStream(out);
// Write out the main attributes for the manifest
attr.writeMain(dos);
- // Now write out the pre-entry attributes
+ // Now write out the per-entry attributes
for (Map.Entry
- * This method calls {@code checkPermission} with the
- * {@code AWTPermission("accessEventQueue")} permission.
- *
- * @since 1.1
- * @exception SecurityException if the caller does not have
- * permission to access the AWT event queue.
- */
- @SuppressWarnings({"deprecation",
- "removal"}) // SecurityManager.checkAwtEventQueueAccess
- public void checkAwtEventQueueAccess() {
- AppContext appContext = AppContext.getAppContext();
- AppletClassLoader appletClassLoader = currentAppletClassLoader();
-
- if (AppContext.isMainContext(appContext) && (appletClassLoader != null)) {
- // If we're about to allow access to the main EventQueue,
- // and anything untrusted is on the class context stack,
- // disallow access.
- super.checkPermission(AWTPermissions.CHECK_AWT_EVENTQUEUE_PERMISSION);
- }
- } // checkAwtEventQueueAccess()
-
/**
* Returns the thread group of the applet. We consult the classloader
* if there is one.
diff --git a/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer.java b/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer.java
index d9ba0253213..70e87bd0353 100644
--- a/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer.java
+++ b/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, 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
@@ -188,10 +188,7 @@ public class MsgAppletViewer extends ListResourceBundle {
{"appletsecurityexception.checkpackageaccess", "Security Exception: cannot access package: {0}"},
{"appletsecurityexception.checkpackagedefinition", "Security Exception: cannot define package: {0}"},
{"appletsecurityexception.cannotsetfactory", "Security Exception: cannot set factory"},
- {"appletsecurityexception.checkmemberaccess", "Security Exception: check member access"},
{"appletsecurityexception.checkgetprintjob", "Security Exception: getPrintJob"},
- {"appletsecurityexception.checksystemclipboardaccess", "Security Exception: getSystemClipboard"},
- {"appletsecurityexception.checkawteventqueueaccess", "Security Exception: getEventQueue"},
{"appletsecurityexception.checksecurityaccess", "Security Exception: security operation: {0}"},
{"appletsecurityexception.getsecuritycontext.unknown", "unknown class loader type. unable to check for getContext"},
{"appletsecurityexception.checkread.unknown", "unknown class loader type. unable to check for checking read {0}"},
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/ByteArrayCache.java b/src/java.desktop/share/classes/sun/java2d/marlin/ByteArrayCache.java
index 8bdf3a2e9bf..885ec84ea04 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/ByteArrayCache.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/ByteArrayCache.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -99,7 +99,7 @@ final class ByteArrayCache implements MarlinConst {
Reference(final ByteArrayCache cache, final int initialSize) {
this.cache = cache;
this.clean = cache.clean;
- this.initial = createArray(initialSize, clean);
+ this.initial = createArray(initialSize);
if (DO_STATS) {
cache.stats.totalInitial += initialSize;
}
@@ -116,7 +116,7 @@ final class ByteArrayCache implements MarlinConst {
logInfo(getLogPrefix(clean) + "ByteArrayCache: "
+ "getArray[oversize]: length=\t" + length);
}
- return createArray(length, clean);
+ return createArray(length);
}
byte[] widenArray(final byte[] array, final int usedSize,
@@ -202,7 +202,7 @@ final class ByteArrayCache implements MarlinConst {
if (DO_STATS) {
stats.createOp++;
}
- return createArray(arraySize, clean);
+ return createArray(arraySize);
}
void putArray(final byte[] array)
@@ -229,12 +229,8 @@ final class ByteArrayCache implements MarlinConst {
}
}
- static byte[] createArray(final int length, final boolean clean) {
- if (clean) {
- return new byte[length];
- }
- // use JDK9 Unsafe.allocateUninitializedArray(class, length):
- return (byte[]) OffHeapArray.UNSAFE.allocateUninitializedArray(byte.class, length);
+ static byte[] createArray(final int length) {
+ return new byte[length];
}
static void fill(final byte[] array, final int fromIndex,
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/Curve.java b/src/java.desktop/share/classes/sun/java2d/marlin/Curve.java
index 92a0b478407..c904f3eec18 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/Curve.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/Curve.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -33,86 +33,94 @@ final class Curve {
Curve() {
}
- void set(float[] points, int type) {
- switch(type) {
- case 8:
+ void set(final float[] points, final int type) {
+ // if instead of switch (perf + most probable cases first)
+ if (type == 8) {
set(points[0], points[1],
points[2], points[3],
points[4], points[5],
points[6], points[7]);
- return;
- case 6:
+ } else if (type == 4) {
+ set(points[0], points[1],
+ points[2], points[3]);
+ } else {
set(points[0], points[1],
points[2], points[3],
points[4], points[5]);
- return;
- default:
- throw new InternalError("Curves can only be cubic or quadratic");
}
}
- void set(float x1, float y1,
- float x2, float y2,
- float x3, float y3,
- float x4, float y4)
+ void set(final float x1, final float y1,
+ final float x2, final float y2,
+ final float x3, final float y3,
+ final float x4, final float y4)
{
final float dx32 = 3.0f * (x3 - x2);
final float dy32 = 3.0f * (y3 - y2);
final float dx21 = 3.0f * (x2 - x1);
final float dy21 = 3.0f * (y2 - y1);
- ax = (x4 - x1) - dx32;
+ ax = (x4 - x1) - dx32; // A = P3 - P0 - 3 (P2 - P1) = (P3 - P0) + 3 (P1 - P2)
ay = (y4 - y1) - dy32;
- bx = (dx32 - dx21);
+ bx = (dx32 - dx21); // B = 3 (P2 - P1) - 3(P1 - P0) = 3 (P2 + P0) - 6 P1
by = (dy32 - dy21);
- cx = dx21;
+ cx = dx21; // C = 3 (P1 - P0)
cy = dy21;
- dx = x1;
+ dx = x1; // D = P0
dy = y1;
- dax = 3.0f * ax; day = 3.0f * ay;
- dbx = 2.0f * bx; dby = 2.0f * by;
+ dax = 3.0f * ax;
+ day = 3.0f * ay;
+ dbx = 2.0f * bx;
+ dby = 2.0f * by;
}
- void set(float x1, float y1,
- float x2, float y2,
- float x3, float y3)
+ void set(final float x1, final float y1,
+ final float x2, final float y2,
+ final float x3, final float y3)
{
final float dx21 = (x2 - x1);
final float dy21 = (y2 - y1);
- ax = 0.0f; ay = 0.0f;
- bx = (x3 - x2) - dx21;
+ ax = 0.0f; // A = 0
+ ay = 0.0f;
+ bx = (x3 - x2) - dx21; // B = P3 - P0 - 2 P2
by = (y3 - y2) - dy21;
- cx = 2.0f * dx21;
+ cx = 2.0f * dx21; // C = 2 (P2 - P1)
cy = 2.0f * dy21;
- dx = x1;
+ dx = x1; // D = P1
dy = y1;
- dax = 0.0f; day = 0.0f;
- dbx = 2.0f * bx; dby = 2.0f * by;
+ dax = 0.0f;
+ day = 0.0f;
+ dbx = 2.0f * bx;
+ dby = 2.0f * by;
}
- float xat(float t) {
- return t * (t * (t * ax + bx) + cx) + dx;
- }
- float yat(float t) {
- return t * (t * (t * ay + by) + cy) + dy;
+ void set(final float x1, final float y1,
+ final float x2, final float y2)
+ {
+ final float dx21 = (x2 - x1);
+ final float dy21 = (y2 - y1);
+ ax = 0.0f; // A = 0
+ ay = 0.0f;
+ bx = 0.0f; // B = 0
+ by = 0.0f;
+ cx = dx21; // C = (P2 - P1)
+ cy = dy21;
+ dx = x1; // D = P1
+ dy = y1;
+ dax = 0.0f;
+ day = 0.0f;
+ dbx = 0.0f;
+ dby = 0.0f;
}
- float dxat(float t) {
- return t * (t * dax + dbx) + cx;
- }
-
- float dyat(float t) {
- return t * (t * day + dby) + cy;
- }
-
- int dxRoots(float[] roots, int off) {
+ int dxRoots(final float[] roots, final int off) {
return Helpers.quadraticRoots(dax, dbx, cx, roots, off);
}
- int dyRoots(float[] roots, int off) {
+ int dyRoots(final float[] roots, final int off) {
return Helpers.quadraticRoots(day, dby, cy, roots, off);
}
- int infPoints(float[] pts, int off) {
+ int infPoints(final float[] pts, final int off) {
// inflection point at t if -f'(t)x*f''(t)y + f'(t)y*f''(t)x == 0
// Fortunately, this turns out to be quadratic, so there are at
// most 2 inflection points.
@@ -123,19 +131,30 @@ final class Curve {
return Helpers.quadraticRoots(a, b, c, pts, off);
}
+ int xPoints(final float[] ts, final int off, final float x)
+ {
+ return Helpers.cubicRootsInAB(ax, bx, cx, dx - x, ts, off, 0.0f, 1.0f);
+ }
+
+ int yPoints(final float[] ts, final int off, final float y)
+ {
+ return Helpers.cubicRootsInAB(ay, by, cy, dy - y, ts, off, 0.0f, 1.0f);
+ }
+
// finds points where the first and second derivative are
// perpendicular. This happens when g(t) = f'(t)*f''(t) == 0 (where
// * is a dot product). Unfortunately, we have to solve a cubic.
- private int perpendiculardfddf(float[] pts, int off) {
+ private int perpendiculardfddf(final float[] pts, final int off) {
assert pts.length >= off + 4;
// these are the coefficients of some multiple of g(t) (not g(t),
// because the roots of a polynomial are not changed after multiplication
// by a constant, and this way we save a few multiplications).
- final float a = 2.0f * (dax*dax + day*day);
- final float b = 3.0f * (dax*dbx + day*dby);
- final float c = 2.0f * (dax*cx + day*cy) + dbx*dbx + dby*dby;
- final float d = dbx*cx + dby*cy;
+ final float a = 2.0f * (dax * dax + day * day);
+ final float b = 3.0f * (dax * dbx + day * dby);
+ final float c = 2.0f * (dax * cx + day * cy) + dbx * dbx + dby * dby;
+ final float d = dbx * cx + dby * cy;
+
return Helpers.cubicRootsInAB(a, b, c, d, pts, off, 0.0f, 1.0f);
}
@@ -152,22 +171,24 @@ final class Curve {
// at most 4 sub-intervals of (0,1). ROC has asymptotes at inflection
// points, so roc-w can have at least 6 roots. This shouldn't be a
// problem for what we're trying to do (draw a nice looking curve).
- int rootsOfROCMinusW(float[] roots, int off, final float w, final float err) {
+ int rootsOfROCMinusW(final float[] roots, final int off, final float w2, final float err) {
// no OOB exception, because by now off<=6, and roots.length >= 10
assert off <= 6 && roots.length >= 10;
+
int ret = off;
- int numPerpdfddf = perpendiculardfddf(roots, off);
- float t0 = 0.0f, ft0 = ROCsq(t0) - w*w;
- roots[off + numPerpdfddf] = 1.0f; // always check interval end points
- numPerpdfddf++;
- for (int i = off; i < off + numPerpdfddf; i++) {
- float t1 = roots[i], ft1 = ROCsq(t1) - w*w;
+ final int end = off + perpendiculardfddf(roots, off);
+ roots[end] = 1.0f; // always check interval end points
+
+ float t0 = 0.0f, ft0 = ROCsq(t0) - w2;
+
+ for (int i = off; i <= end; i++) {
+ float t1 = roots[i], ft1 = ROCsq(t1) - w2;
if (ft0 == 0.0f) {
roots[ret++] = t0;
} else if (ft1 * ft0 < 0.0f) { // have opposite signs
// (ROC(t)^2 == w^2) == (ROC(t) == w) is true because
// ROC(t) >= 0 for all t.
- roots[ret++] = falsePositionROCsqMinusX(t0, t1, w*w, err);
+ roots[ret++] = falsePositionROCsqMinusX(t0, t1, w2, err);
}
t0 = t1;
ft0 = ft1;
@@ -176,9 +197,9 @@ final class Curve {
return ret - off;
}
- private static float eliminateInf(float x) {
+ private static float eliminateInf(final float x) {
return (x == Float.POSITIVE_INFINITY ? Float.MAX_VALUE :
- (x == Float.NEGATIVE_INFINITY ? Float.MIN_VALUE : x));
+ (x == Float.NEGATIVE_INFINITY ? Float.MIN_VALUE : x));
}
// A slight modification of the false position algorithm on wikipedia.
@@ -188,17 +209,18 @@ final class Curve {
// expressions make it into the language), depending on how closures
// and turn out. Same goes for the newton's method
// algorithm in Helpers.java
- private float falsePositionROCsqMinusX(float x0, float x1,
- final float x, final float err)
+ private float falsePositionROCsqMinusX(final float t0, final float t1,
+ final float w2, final float err)
{
final int iterLimit = 100;
int side = 0;
- float t = x1, ft = eliminateInf(ROCsq(t) - x);
- float s = x0, fs = eliminateInf(ROCsq(s) - x);
+ float t = t1, ft = eliminateInf(ROCsq(t) - w2);
+ float s = t0, fs = eliminateInf(ROCsq(s) - w2);
float r = s, fr;
+
for (int i = 0; i < iterLimit && Math.abs(t - s) > err * Math.abs(t + s); i++) {
r = (fs * t - ft * s) / (fs - ft);
- fr = ROCsq(r) - x;
+ fr = ROCsq(r) - w2;
if (sameSign(fr, ft)) {
ft = fr; t = r;
if (side < 0) {
@@ -207,7 +229,7 @@ final class Curve {
} else {
side = -1;
}
- } else if (fr * fs > 0) {
+ } else if (fr * fs > 0.0f) {
fs = fr; s = r;
if (side > 0) {
ft /= (1 << side);
@@ -222,7 +244,7 @@ final class Curve {
return r;
}
- private static boolean sameSign(float x, float y) {
+ private static boolean sameSign(final float x, final float y) {
// another way is to test if x*y > 0. This is bad for small x, y.
return (x < 0.0f && y < 0.0f) || (x > 0.0f && y > 0.0f);
}
@@ -230,14 +252,13 @@ final class Curve {
// returns the radius of curvature squared at t of this curve
// see http://en.wikipedia.org/wiki/Radius_of_curvature_(applications)
private float ROCsq(final float t) {
- // dx=xat(t) and dy=yat(t). These calls have been inlined for efficiency
final float dx = t * (t * dax + dbx) + cx;
final float dy = t * (t * day + dby) + cy;
final float ddx = 2.0f * dax * t + dbx;
final float ddy = 2.0f * day * t + dby;
- final float dx2dy2 = dx*dx + dy*dy;
- final float ddx2ddy2 = ddx*ddx + ddy*ddy;
- final float ddxdxddydy = ddx*dx + ddy*dy;
- return dx2dy2*((dx2dy2*dx2dy2) / (dx2dy2 * ddx2ddy2 - ddxdxddydy*ddxdxddydy));
+ final float dx2dy2 = dx * dx + dy * dy;
+ final float ddx2ddy2 = ddx * ddx + ddy * ddy;
+ final float ddxdxddydy = ddx * dx + ddy * dy;
+ return dx2dy2 * ((dx2dy2 * dx2dy2) / (dx2dy2 * ddx2ddy2 - ddxdxddydy * ddxdxddydy));
}
}
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/DCurve.java b/src/java.desktop/share/classes/sun/java2d/marlin/DCurve.java
index de295aeb207..7e06031453c 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DCurve.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DCurve.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -33,86 +33,94 @@ final class DCurve {
DCurve() {
}
- void set(double[] points, int type) {
- switch(type) {
- case 8:
+ void set(final double[] points, final int type) {
+ // if instead of switch (perf + most probable cases first)
+ if (type == 8) {
set(points[0], points[1],
points[2], points[3],
points[4], points[5],
points[6], points[7]);
- return;
- case 6:
+ } else if (type == 4) {
+ set(points[0], points[1],
+ points[2], points[3]);
+ } else {
set(points[0], points[1],
points[2], points[3],
points[4], points[5]);
- return;
- default:
- throw new InternalError("Curves can only be cubic or quadratic");
}
}
- void set(double x1, double y1,
- double x2, double y2,
- double x3, double y3,
- double x4, double y4)
+ void set(final double x1, final double y1,
+ final double x2, final double y2,
+ final double x3, final double y3,
+ final double x4, final double y4)
{
final double dx32 = 3.0d * (x3 - x2);
final double dy32 = 3.0d * (y3 - y2);
final double dx21 = 3.0d * (x2 - x1);
final double dy21 = 3.0d * (y2 - y1);
- ax = (x4 - x1) - dx32;
+ ax = (x4 - x1) - dx32; // A = P3 - P0 - 3 (P2 - P1) = (P3 - P0) + 3 (P1 - P2)
ay = (y4 - y1) - dy32;
- bx = (dx32 - dx21);
+ bx = (dx32 - dx21); // B = 3 (P2 - P1) - 3(P1 - P0) = 3 (P2 + P0) - 6 P1
by = (dy32 - dy21);
- cx = dx21;
+ cx = dx21; // C = 3 (P1 - P0)
cy = dy21;
- dx = x1;
+ dx = x1; // D = P0
dy = y1;
- dax = 3.0d * ax; day = 3.0d * ay;
- dbx = 2.0d * bx; dby = 2.0d * by;
+ dax = 3.0d * ax;
+ day = 3.0d * ay;
+ dbx = 2.0d * bx;
+ dby = 2.0d * by;
}
- void set(double x1, double y1,
- double x2, double y2,
- double x3, double y3)
+ void set(final double x1, final double y1,
+ final double x2, final double y2,
+ final double x3, final double y3)
{
final double dx21 = (x2 - x1);
final double dy21 = (y2 - y1);
- ax = 0.0d; ay = 0.0d;
- bx = (x3 - x2) - dx21;
+ ax = 0.0d; // A = 0
+ ay = 0.0d;
+ bx = (x3 - x2) - dx21; // B = P3 - P0 - 2 P2
by = (y3 - y2) - dy21;
- cx = 2.0d * dx21;
+ cx = 2.0d * dx21; // C = 2 (P2 - P1)
cy = 2.0d * dy21;
- dx = x1;
+ dx = x1; // D = P1
dy = y1;
- dax = 0.0d; day = 0.0d;
- dbx = 2.0d * bx; dby = 2.0d * by;
+ dax = 0.0d;
+ day = 0.0d;
+ dbx = 2.0d * bx;
+ dby = 2.0d * by;
}
- double xat(double t) {
- return t * (t * (t * ax + bx) + cx) + dx;
- }
- double yat(double t) {
- return t * (t * (t * ay + by) + cy) + dy;
+ void set(final double x1, final double y1,
+ final double x2, final double y2)
+ {
+ final double dx21 = (x2 - x1);
+ final double dy21 = (y2 - y1);
+ ax = 0.0d; // A = 0
+ ay = 0.0d;
+ bx = 0.0d; // B = 0
+ by = 0.0d;
+ cx = dx21; // C = (P2 - P1)
+ cy = dy21;
+ dx = x1; // D = P1
+ dy = y1;
+ dax = 0.0d;
+ day = 0.0d;
+ dbx = 0.0d;
+ dby = 0.0d;
}
- double dxat(double t) {
- return t * (t * dax + dbx) + cx;
- }
-
- double dyat(double t) {
- return t * (t * day + dby) + cy;
- }
-
- int dxRoots(double[] roots, int off) {
+ int dxRoots(final double[] roots, final int off) {
return DHelpers.quadraticRoots(dax, dbx, cx, roots, off);
}
- int dyRoots(double[] roots, int off) {
+ int dyRoots(final double[] roots, final int off) {
return DHelpers.quadraticRoots(day, dby, cy, roots, off);
}
- int infPoints(double[] pts, int off) {
+ int infPoints(final double[] pts, final int off) {
// inflection point at t if -f'(t)x*f''(t)y + f'(t)y*f''(t)x == 0
// Fortunately, this turns out to be quadratic, so there are at
// most 2 inflection points.
@@ -123,19 +131,30 @@ final class DCurve {
return DHelpers.quadraticRoots(a, b, c, pts, off);
}
+ int xPoints(final double[] ts, final int off, final double x)
+ {
+ return DHelpers.cubicRootsInAB(ax, bx, cx, dx - x, ts, off, 0.0d, 1.0d);
+ }
+
+ int yPoints(final double[] ts, final int off, final double y)
+ {
+ return DHelpers.cubicRootsInAB(ay, by, cy, dy - y, ts, off, 0.0d, 1.0d);
+ }
+
// finds points where the first and second derivative are
// perpendicular. This happens when g(t) = f'(t)*f''(t) == 0 (where
// * is a dot product). Unfortunately, we have to solve a cubic.
- private int perpendiculardfddf(double[] pts, int off) {
+ private int perpendiculardfddf(final double[] pts, final int off) {
assert pts.length >= off + 4;
// these are the coefficients of some multiple of g(t) (not g(t),
// because the roots of a polynomial are not changed after multiplication
// by a constant, and this way we save a few multiplications).
- final double a = 2.0d * (dax*dax + day*day);
- final double b = 3.0d * (dax*dbx + day*dby);
- final double c = 2.0d * (dax*cx + day*cy) + dbx*dbx + dby*dby;
- final double d = dbx*cx + dby*cy;
+ final double a = 2.0d * (dax * dax + day * day);
+ final double b = 3.0d * (dax * dbx + day * dby);
+ final double c = 2.0d * (dax * cx + day * cy) + dbx * dbx + dby * dby;
+ final double d = dbx * cx + dby * cy;
+
return DHelpers.cubicRootsInAB(a, b, c, d, pts, off, 0.0d, 1.0d);
}
@@ -152,22 +171,24 @@ final class DCurve {
// at most 4 sub-intervals of (0,1). ROC has asymptotes at inflection
// points, so roc-w can have at least 6 roots. This shouldn't be a
// problem for what we're trying to do (draw a nice looking curve).
- int rootsOfROCMinusW(double[] roots, int off, final double w, final double err) {
+ int rootsOfROCMinusW(final double[] roots, final int off, final double w2, final double err) {
// no OOB exception, because by now off<=6, and roots.length >= 10
assert off <= 6 && roots.length >= 10;
+
int ret = off;
- int numPerpdfddf = perpendiculardfddf(roots, off);
- double t0 = 0.0d, ft0 = ROCsq(t0) - w*w;
- roots[off + numPerpdfddf] = 1.0d; // always check interval end points
- numPerpdfddf++;
- for (int i = off; i < off + numPerpdfddf; i++) {
- double t1 = roots[i], ft1 = ROCsq(t1) - w*w;
+ final int end = off + perpendiculardfddf(roots, off);
+ roots[end] = 1.0d; // always check interval end points
+
+ double t0 = 0.0d, ft0 = ROCsq(t0) - w2;
+
+ for (int i = off; i <= end; i++) {
+ double t1 = roots[i], ft1 = ROCsq(t1) - w2;
if (ft0 == 0.0d) {
roots[ret++] = t0;
} else if (ft1 * ft0 < 0.0d) { // have opposite signs
// (ROC(t)^2 == w^2) == (ROC(t) == w) is true because
// ROC(t) >= 0 for all t.
- roots[ret++] = falsePositionROCsqMinusX(t0, t1, w*w, err);
+ roots[ret++] = falsePositionROCsqMinusX(t0, t1, w2, err);
}
t0 = t1;
ft0 = ft1;
@@ -176,9 +197,9 @@ final class DCurve {
return ret - off;
}
- private static double eliminateInf(double x) {
+ private static double eliminateInf(final double x) {
return (x == Double.POSITIVE_INFINITY ? Double.MAX_VALUE :
- (x == Double.NEGATIVE_INFINITY ? Double.MIN_VALUE : x));
+ (x == Double.NEGATIVE_INFINITY ? Double.MIN_VALUE : x));
}
// A slight modification of the false position algorithm on wikipedia.
@@ -188,17 +209,18 @@ final class DCurve {
// expressions make it into the language), depending on how closures
// and turn out. Same goes for the newton's method
// algorithm in DHelpers.java
- private double falsePositionROCsqMinusX(double x0, double x1,
- final double x, final double err)
+ private double falsePositionROCsqMinusX(final double t0, final double t1,
+ final double w2, final double err)
{
final int iterLimit = 100;
int side = 0;
- double t = x1, ft = eliminateInf(ROCsq(t) - x);
- double s = x0, fs = eliminateInf(ROCsq(s) - x);
+ double t = t1, ft = eliminateInf(ROCsq(t) - w2);
+ double s = t0, fs = eliminateInf(ROCsq(s) - w2);
double r = s, fr;
+
for (int i = 0; i < iterLimit && Math.abs(t - s) > err * Math.abs(t + s); i++) {
r = (fs * t - ft * s) / (fs - ft);
- fr = ROCsq(r) - x;
+ fr = ROCsq(r) - w2;
if (sameSign(fr, ft)) {
ft = fr; t = r;
if (side < 0) {
@@ -207,7 +229,7 @@ final class DCurve {
} else {
side = -1;
}
- } else if (fr * fs > 0) {
+ } else if (fr * fs > 0.0d) {
fs = fr; s = r;
if (side > 0) {
ft /= (1 << side);
@@ -222,7 +244,7 @@ final class DCurve {
return r;
}
- private static boolean sameSign(double x, double y) {
+ private static boolean sameSign(final double x, final double y) {
// another way is to test if x*y > 0. This is bad for small x, y.
return (x < 0.0d && y < 0.0d) || (x > 0.0d && y > 0.0d);
}
@@ -230,14 +252,13 @@ final class DCurve {
// returns the radius of curvature squared at t of this curve
// see http://en.wikipedia.org/wiki/Radius_of_curvature_(applications)
private double ROCsq(final double t) {
- // dx=xat(t) and dy=yat(t). These calls have been inlined for efficiency
final double dx = t * (t * dax + dbx) + cx;
final double dy = t * (t * day + dby) + cy;
final double ddx = 2.0d * dax * t + dbx;
final double ddy = 2.0d * day * t + dby;
- final double dx2dy2 = dx*dx + dy*dy;
- final double ddx2ddy2 = ddx*ddx + ddy*ddy;
- final double ddxdxddydy = ddx*dx + ddy*dy;
- return dx2dy2*((dx2dy2*dx2dy2) / (dx2dy2 * ddx2ddy2 - ddxdxddydy*ddxdxddydy));
+ final double dx2dy2 = dx * dx + dy * dy;
+ final double ddx2ddy2 = ddx * ddx + ddy * ddy;
+ final double ddxdxddydy = ddx * dx + ddy * dy;
+ return dx2dy2 * ((dx2dy2 * dx2dy2) / (dx2dy2 * ddx2ddy2 - ddxdxddydy * ddxdxddydy));
}
}
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/DDasher.java b/src/java.desktop/share/classes/sun/java2d/marlin/DDasher.java
index 677c5df9f61..923d6ef9a26 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DDasher.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DDasher.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -26,6 +26,8 @@
package sun.java2d.marlin;
import java.util.Arrays;
+import sun.java2d.marlin.DTransformingPathConsumer2D.CurveBasicMonotonizer;
+import sun.java2d.marlin.DTransformingPathConsumer2D.CurveClipSplitter;
/**
* The
* The API allows a concrete {@link javax.xml.transform.TransformerFactory}
@@ -46,7 +46,7 @@
* {@link javax.xml.transform.TransformerFactory#newInstance}.
*
*
- *
* This API defines two interface objects called {@link javax.xml.transform.Source}
@@ -77,9 +77,7 @@
*
*
*
- *
* Namespaces present something
@@ -112,7 +110,7 @@
* prefix is lost.
*
*
- *
* Serialization of the result tree to a stream can be controlled with the
@@ -141,7 +139,7 @@
* the source to the result. This method may be used to create a DOM from SAX
* events or to create an XML or HTML stream from a DOM or SAX events.
*
- *
* The transformation API throw three types of specialized exceptions. A
@@ -192,7 +190,7 @@
* errors.
*
*
- *
* The API provides a way for URIs referenced from within the stylesheet
diff --git a/src/java.xml/share/classes/javax/xml/xpath/package-info.java b/src/java.xml/share/classes/javax/xml/xpath/package-info.java
index 6a8e8200634..d4f1ab33f74 100644
--- a/src/java.xml/share/classes/javax/xml/xpath/package-info.java
+++ b/src/java.xml/share/classes/javax/xml/xpath/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -50,7 +50,7 @@
*
*
* The XPath language provides a simple, concise syntax for selecting
@@ -69,7 +69,7 @@
*
*
*
- *
* An XPath expression is composed of a location
@@ -211,7 +211,7 @@
*
*
*
- *
* While XPath expressions select nodes in the XML document, the XPath
@@ -225,7 +225,7 @@
*
*
*
- *
* XPath location paths may be relative to a particular node in the
@@ -301,7 +301,7 @@
* {@link org.w3c.dom.Node} for example, in the JDK implementation.
*
*
- * SecurityManager.
*
@@ -1080,28 +1067,6 @@ public class SecurityManager {
SecurityConstants.PROPERTY_READ_ACTION));
}
- /**
- * Returns {@code true} if the calling thread has {@code AllPermission}.
- *
- * @param window not used except to check if it is {@code null}.
- * @return {@code true} if the calling thread has {@code AllPermission}.
- * @exception NullPointerException if the {@code window} argument is
- * {@code null}.
- * @deprecated This method was originally used to check if the calling thread
- * was trusted to bring up a top-level window. The method has been
- * obsoleted and code should instead use {@link #checkPermission}
- * to check {@code AWTPermission("showWindowWithoutWarningBanner")}.
- * This method is subject to removal in a future version of Java SE.
- * @see #checkPermission(java.security.Permission) checkPermission
- */
- @Deprecated(since="1.8", forRemoval=true)
- public boolean checkTopLevelWindow(Object window) {
- if (window == null) {
- throw new NullPointerException("window can't be null");
- }
- return hasAllPermission();
- }
-
/**
* Throws a SecurityException if the
* calling thread is not allowed to initiate a print job request.
@@ -1124,44 +1089,6 @@ public class SecurityManager {
checkPermission(new RuntimePermission("queuePrintJob"));
}
- /**
- * Throws {@code SecurityException} if the calling thread does
- * not have {@code AllPermission}.
- *
- * @since 1.1
- * @exception SecurityException if the calling thread does not have
- * {@code AllPermission}
- * @deprecated This method was originally used to check if the calling
- * thread could access the system clipboard. The method has been
- * obsoleted and code should instead use {@link #checkPermission}
- * to check {@code AWTPermission("accessClipboard")}.
- * This method is subject to removal in a future version of Java SE.
- * @see #checkPermission(java.security.Permission) checkPermission
- */
- @Deprecated(since="1.8", forRemoval=true)
- public void checkSystemClipboardAccess() {
- checkPermission(SecurityConstants.ALL_PERMISSION);
- }
-
- /**
- * Throws {@code SecurityException} if the calling thread does
- * not have {@code AllPermission}.
- *
- * @since 1.1
- * @exception SecurityException if the calling thread does not have
- * {@code AllPermission}
- * @deprecated This method was originally used to check if the calling
- * thread could access the AWT event queue. The method has been
- * obsoleted and code should instead use {@link #checkPermission}
- * to check {@code AWTPermission("accessEventQueue")}.
- * This method is subject to removal in a future version of Java SE.
- * @see #checkPermission(java.security.Permission) checkPermission
- */
- @Deprecated(since="1.8", forRemoval=true)
- public void checkAwtEventQueueAccess() {
- checkPermission(SecurityConstants.ALL_PERMISSION);
- }
-
/*
* We have an initial invalid bit (initially false) for the class
* variables which tell if the cache is valid. If the underlying
@@ -1474,35 +1401,6 @@ public class SecurityManager {
checkPermission(new RuntimePermission("setFactory"));
}
- /**
- * Throws a {@code SecurityException} if the calling thread does
- * not have {@code AllPermission}.
- *
- * @param clazz the class that reflection is to be performed on.
- * @param which type of access, PUBLIC or DECLARED.
- * @throws SecurityException if the caller does not have
- * {@code AllPermission}
- * @throws NullPointerException if the {@code clazz} argument is
- * {@code null}
- * @deprecated This method was originally used to check if the calling
- * thread was allowed to access members. It relied on the
- * caller being at a stack depth of 4 which is error-prone and
- * cannot be enforced by the runtime. The method has been
- * obsoleted and code should instead use
- * {@link #checkPermission} to check
- * {@code RuntimePermission("accessDeclaredMembers")}. This
- * method is subject to removal in a future version of Java SE.
- * @since 1.1
- * @see #checkPermission(java.security.Permission) checkPermission
- */
- @Deprecated(since="1.8", forRemoval=true)
- public void checkMemberAccess(Class> clazz, int which) {
- if (clazz == null) {
- throw new NullPointerException("class can't be null");
- }
- checkPermission(SecurityConstants.ALL_PERMISSION);
- }
-
/**
* Determines whether the permission with the specified permission target
* name should be granted or denied.
diff --git a/src/java.base/share/classes/java/lang/String.java b/src/java.base/share/classes/java/lang/String.java
index d9ab1dc4662..81f057b9a87 100644
--- a/src/java.base/share/classes/java/lang/String.java
+++ b/src/java.base/share/classes/java/lang/String.java
@@ -2647,7 +2647,7 @@ public final class String
/**
* Returns a stream of {@code int} zero-extending the {@code char} values
* from this sequence. Any char which maps to a surrogate code
+ * href="{@docRoot}/java.base/java/lang/Character.html#unicode">surrogate code
* point is passed through uninterpreted.
*
* @return an IntStream of char values from this sequence
diff --git a/src/java.base/share/classes/java/lang/StringCoding.java b/src/java.base/share/classes/java/lang/StringCoding.java
index 11ba41d62b8..32af7076752 100644
--- a/src/java.base/share/classes/java/lang/StringCoding.java
+++ b/src/java.base/share/classes/java/lang/StringCoding.java
@@ -52,6 +52,9 @@ import static java.lang.Character.highSurrogate;
import static java.lang.Character.lowSurrogate;
import static java.lang.Character.isSupplementaryCodePoint;
import static java.lang.StringUTF16.putChar;
+import static java.nio.charset.StandardCharsets.ISO_8859_1;
+import static java.nio.charset.StandardCharsets.US_ASCII;
+import static java.nio.charset.StandardCharsets.UTF_8;
/**
* Utility class for string encoding and decoding.
@@ -67,10 +70,6 @@ class StringCoding {
private static final ThreadLocalCharacter Encodings
+ * Character Encodings
*
* The specification of the {@link java.nio.charset.Charset
* java.nio.charset.Charset} class describes the naming conventions
diff --git a/src/java.base/share/classes/java/nio/charset/Charset.java b/src/java.base/share/classes/java/nio/charset/Charset.java
index f1ddfaf363b..f77650e1c08 100644
--- a/src/java.base/share/classes/java/nio/charset/Charset.java
+++ b/src/java.base/share/classes/java/nio/charset/Charset.java
@@ -26,7 +26,6 @@
package java.nio.charset;
import jdk.internal.misc.VM;
-import sun.nio.cs.StandardCharsets;
import sun.nio.cs.ThreadLocalCoders;
import sun.security.action.GetPropertyAction;
@@ -311,7 +310,8 @@ public abstract class Charset
}
/* The standard set of charsets */
- private static final CharsetProvider standardProvider = new StandardCharsets();
+ private static final CharsetProvider standardProvider
+ = new sun.nio.cs.StandardCharsets();
private static final String[] zeroAliases = new String[0];
@@ -609,7 +609,7 @@ public abstract class Charset
if (cs != null)
defaultCharset = cs;
else
- defaultCharset = sun.nio.cs.UTF_8.INSTANCE;
+ defaultCharset = StandardCharsets.UTF_8;
}
}
return defaultCharset;
diff --git a/src/java.base/share/classes/java/nio/charset/StandardCharsets.java b/src/java.base/share/classes/java/nio/charset/StandardCharsets.java
index 4bedfa410df..47f1236c893 100644
--- a/src/java.base/share/classes/java/nio/charset/StandardCharsets.java
+++ b/src/java.base/share/classes/java/nio/charset/StandardCharsets.java
@@ -41,26 +41,26 @@ public final class StandardCharsets {
* Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the
* Unicode character set
*/
- public static final Charset US_ASCII = sun.nio.cs.US_ASCII.INSTANCE;
+ public static final Charset US_ASCII = new sun.nio.cs.US_ASCII();
/**
* ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
*/
- public static final Charset ISO_8859_1 = sun.nio.cs.ISO_8859_1.INSTANCE;
+ public static final Charset ISO_8859_1 = new sun.nio.cs.ISO_8859_1();
/**
* Eight-bit UCS Transformation Format
*/
- public static final Charset UTF_8 = sun.nio.cs.UTF_8.INSTANCE;
+ public static final Charset UTF_8 = new sun.nio.cs.UTF_8();
/**
* Sixteen-bit UCS Transformation Format, big-endian byte order
*/
- public static final Charset UTF_16BE = Charset.forName("UTF-16BE");
+ public static final Charset UTF_16BE = new sun.nio.cs.UTF_16BE();
/**
* Sixteen-bit UCS Transformation Format, little-endian byte order
*/
- public static final Charset UTF_16LE = Charset.forName("UTF-16LE");
+ public static final Charset UTF_16LE = new sun.nio.cs.UTF_16LE();
/**
* Sixteen-bit UCS Transformation Format, byte order identified by an
* optional byte-order mark
*/
- public static final Charset UTF_16 = Charset.forName("UTF-16");
+ public static final Charset UTF_16 = new sun.nio.cs.UTF_16();
}
diff --git a/src/java.base/share/classes/java/nio/file/package-info.java b/src/java.base/share/classes/java/nio/file/package-info.java
index 611138eef8e..4efb848d4aa 100644
--- a/src/java.base/share/classes/java/nio/file/package-info.java
+++ b/src/java.base/share/classes/java/nio/file/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -33,7 +33,7 @@
* package is used by service provider implementors wishing to extend the
* platform default provider, or to construct other provider implementations. Symbolic Links
+ * Symbolic Links
* Interoperability
+ * Interoperability
* Visibility
+ * Visibility
* Synchronized I/O File Integrity
+ * Synchronized I/O File Integrity
* General Exceptions
+ * General Exceptions
* Optional Specific Exceptions
+ * Optional Specific Exceptions
* Most of the methods defined by classes in this package that access the
* file system specify that {@link java.io.IOException} be thrown when an I/O
* error occurs. In some cases, these methods define specific I/O exceptions
diff --git a/src/java.base/share/classes/java/text/ChoiceFormat.java b/src/java.base/share/classes/java/text/ChoiceFormat.java
index 014e646971c..e4739f89b38 100644
--- a/src/java.base/share/classes/java/text/ChoiceFormat.java
+++ b/src/java.base/share/classes/java/text/ChoiceFormat.java
@@ -212,7 +212,7 @@ public class ChoiceFormat extends NumberFormat {
} else if (tempBuffer.equals("-\u221E")) {
startValue = Double.NEGATIVE_INFINITY;
} else {
- startValue = Double.valueOf(tempBuffer);
+ startValue = Double.parseDouble(tempBuffer);
}
if (ch == '<' && startValue != Double.POSITIVE_INFINITY &&
diff --git a/src/java.base/share/classes/java/time/Duration.java b/src/java.base/share/classes/java/time/Duration.java
index 875b9e07761..cf44f93978d 100644
--- a/src/java.base/share/classes/java/time/Duration.java
+++ b/src/java.base/share/classes/java/time/Duration.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -119,7 +119,7 @@ import java.util.regex.Pattern;
* See {@link Instant} for a discussion as to the meaning of the second and time-scales.
*
*
*
* Example
+ * Example
* Package specification
+ * Package specification
* Package specification
+ * Package specification
* Dates and Times
+ * Dates and Times
* Duration and Period
+ * Duration and Period
* Additional value types
+ * Additional value types
* Package specification
+ * Package specification
* Design notes (non normative)
+ * Design notes (non normative)
* Fields and Units
+ * Fields and Units
* Adjustment and Query
+ * Adjustment and Query
* Weeks
+ * Weeks
* Package specification
+ * Package specification
* Package specification
+ * Package specification
* DDasher class takes a series of linear commands
@@ -40,8 +42,9 @@ import java.util.Arrays;
*/
final class DDasher implements DPathConsumer2D, MarlinConst {
- static final int REC_LIMIT = 4;
- static final double ERR = 0.01d;
+ /* huge circle with radius ~ 2E9 only needs 12 subdivision levels */
+ static final int REC_LIMIT = 16;
+ static final double CURVE_LEN_ERR = MarlinProperties.getCurveLengthError(); // 0.01 initial
static final double MIN_T_INC = 1.0d / (1 << REC_LIMIT);
// More than 24 bits of mantissa means we can no longer accurately
@@ -63,8 +66,10 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
private boolean dashOn;
private double phase;
- private double sx, sy;
- private double x0, y0;
+ // The starting point of the path
+ private double sx0, sy0;
+ // the current point
+ private double cx0, cy0;
// temporary storage for the current curve
private final double[] curCurvepts;
@@ -75,11 +80,34 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
// flag to recycle dash array copy
boolean recycleDashes;
+ // We don't emit the first dash right away. If we did, caps would be
+ // drawn on it, but we need joins to be drawn if there's a closePath()
+ // So, we store the path elements that make up the first dash in the
+ // buffer below.
+ private double[] firstSegmentsBuffer; // dynamic array
+ private int firstSegidx;
+
// dashes ref (dirty)
final DoubleArrayCache.Reference dashes_ref;
// firstSegmentsBuffer ref (dirty)
final DoubleArrayCache.Reference firstSegmentsBuffer_ref;
+ // Bounds of the drawing region, at pixel precision.
+ private double[] clipRect;
+
+ // the outcode of the current point
+ private int cOutCode = 0;
+
+ private boolean subdivide = DO_CLIP_SUBDIVIDER;
+
+ private final LengthIterator li = new LengthIterator();
+
+ private final CurveClipSplitter curveSplitter;
+
+ private double cycleLen;
+ private boolean outside;
+ private double totalSkipLen;
+
/**
* Constructs a DDasher.
* @param rdrCtx per-thread renderer context
@@ -95,6 +123,8 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
// we need curCurvepts to be able to contain 2 curves because when
// dashing curves, we need to subdivide it
curCurvepts = new double[8 * 2];
+
+ this.curveSplitter = rdrCtx.curveClipSplitter;
}
/**
@@ -115,10 +145,13 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
// Normalize so 0 <= phase < dash[0]
int sidx = 0;
dashOn = true;
+
double sum = 0.0d;
for (double d : dash) {
sum += d;
}
+ this.cycleLen = sum;
+
double cycles = phase / sum;
if (phase < 0.0d) {
if (-cycles >= MAX_CYCLES) {
@@ -167,6 +200,12 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
this.recycleDashes = recycleDashes;
+ if (rdrCtx.doClip) {
+ this.clipRect = rdrCtx.clipRect;
+ } else {
+ this.clipRect = null;
+ this.cOutCode = 0;
+ }
return this; // fluent API
}
@@ -204,33 +243,42 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
@Override
public void moveTo(final double x0, final double y0) {
if (firstSegidx != 0) {
- out.moveTo(sx, sy);
+ out.moveTo(sx0, sy0);
emitFirstSegments();
}
- needsMoveTo = true;
+ this.needsMoveTo = true;
this.idx = startIdx;
this.dashOn = this.startDashOn;
this.phase = this.startPhase;
- this.sx = x0;
- this.sy = y0;
- this.x0 = x0;
- this.y0 = y0;
+ this.cx0 = x0;
+ this.cy0 = y0;
+
+ // update starting point:
+ this.sx0 = x0;
+ this.sy0 = y0;
this.starting = true;
+
+ if (clipRect != null) {
+ final int outcode = DHelpers.outcode(x0, y0, clipRect);
+ this.cOutCode = outcode;
+ this.outside = false;
+ this.totalSkipLen = 0.0d;
+ }
}
private void emitSeg(double[] buf, int off, int type) {
switch (type) {
case 8:
- out.curveTo(buf[off+0], buf[off+1],
- buf[off+2], buf[off+3],
- buf[off+4], buf[off+5]);
+ out.curveTo(buf[off ], buf[off + 1],
+ buf[off + 2], buf[off + 3],
+ buf[off + 4], buf[off + 5]);
return;
case 6:
- out.quadTo(buf[off+0], buf[off+1],
- buf[off+2], buf[off+3]);
+ out.quadTo(buf[off ], buf[off + 1],
+ buf[off + 2], buf[off + 3]);
return;
case 4:
- out.lineTo(buf[off], buf[off+1]);
+ out.lineTo(buf[off], buf[off + 1]);
return;
default:
}
@@ -246,12 +294,6 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
}
firstSegidx = 0;
}
- // We don't emit the first dash right away. If we did, caps would be
- // drawn on it, but we need joins to be drawn if there's a closePath()
- // So, we store the path elements that make up the first dash in the
- // buffer below.
- private double[] firstSegmentsBuffer; // dynamic array
- private int firstSegidx;
// precondition: pts must be in relative coordinates (relative to x0,y0)
private void goTo(final double[] pts, final int off, final int type,
@@ -267,7 +309,7 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
} else {
if (needsMoveTo) {
needsMoveTo = false;
- out.moveTo(x0, y0);
+ out.moveTo(cx0, cy0);
}
emitSeg(pts, off, type);
}
@@ -278,8 +320,8 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
}
needsMoveTo = true;
}
- this.x0 = x;
- this.y0 = y;
+ this.cx0 = x;
+ this.cy0 = y;
}
private void goTo_starting(final double[] pts, final int off, final int type) {
@@ -305,10 +347,56 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
@Override
public void lineTo(final double x1, final double y1) {
- final double dx = x1 - x0;
- final double dy = y1 - y0;
+ final int outcode0 = this.cOutCode;
- double len = dx*dx + dy*dy;
+ if (clipRect != null) {
+ final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
+
+ // Should clip
+ final int orCode = (outcode0 | outcode1);
+
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1;
+
+ // basic rejection criteria:
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => callback with subdivided parts:
+ boolean ret = curveSplitter.splitLine(cx0, cy0, x1, y1,
+ orCode, this);
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode1;
+ skipLineTo(x1, y1);
+ return;
+ }
+ }
+
+ this.cOutCode = outcode1;
+
+ if (this.outside) {
+ this.outside = false;
+ // Adjust current index, phase & dash:
+ skipLen();
+ }
+ }
+ _lineTo(x1, y1);
+ }
+
+ private void _lineTo(final double x1, final double y1) {
+ final double dx = x1 - cx0;
+ final double dy = y1 - cy0;
+
+ double len = dx * dx + dy * dy;
if (len == 0.0d) {
return;
}
@@ -327,8 +415,7 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
boolean _dashOn = dashOn;
double _phase = phase;
- double leftInThisDashSegment;
- double d, dashdx, dashdy, p;
+ double leftInThisDashSegment, d;
while (true) {
d = _dash[_idx];
@@ -349,24 +436,15 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
_idx = (_idx + 1) % _dashLen;
_dashOn = !_dashOn;
}
-
- // Save local state:
- idx = _idx;
- dashOn = _dashOn;
- phase = _phase;
- return;
+ break;
}
- dashdx = d * cx;
- dashdy = d * cy;
-
if (_phase == 0.0d) {
- _curCurvepts[0] = x0 + dashdx;
- _curCurvepts[1] = y0 + dashdy;
+ _curCurvepts[0] = cx0 + d * cx;
+ _curCurvepts[1] = cy0 + d * cy;
} else {
- p = leftInThisDashSegment / d;
- _curCurvepts[0] = x0 + p * dashdx;
- _curCurvepts[1] = y0 + p * dashdy;
+ _curCurvepts[0] = cx0 + leftInThisDashSegment * cx;
+ _curCurvepts[1] = cy0 + leftInThisDashSegment * cy;
}
goTo(_curCurvepts, 0, 4, _dashOn);
@@ -377,19 +455,95 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
_dashOn = !_dashOn;
_phase = 0.0d;
}
+ // Save local state:
+ idx = _idx;
+ dashOn = _dashOn;
+ phase = _phase;
}
- // shared instance in DDasher
- private final LengthIterator li = new LengthIterator();
+ private void skipLineTo(final double x1, final double y1) {
+ final double dx = x1 - cx0;
+ final double dy = y1 - cy0;
+
+ double len = dx * dx + dy * dy;
+ if (len != 0.0d) {
+ len = Math.sqrt(len);
+ }
+
+ // Accumulate skipped length:
+ this.outside = true;
+ this.totalSkipLen += len;
+
+ // Fix initial move:
+ this.needsMoveTo = true;
+ this.starting = false;
+
+ this.cx0 = x1;
+ this.cy0 = y1;
+ }
+
+ public void skipLen() {
+ double len = this.totalSkipLen;
+ this.totalSkipLen = 0.0d;
+
+ final double[] _dash = dash;
+ final int _dashLen = this.dashLen;
+
+ int _idx = idx;
+ boolean _dashOn = dashOn;
+ double _phase = phase;
+
+ // -2 to ensure having 2 iterations of the post-loop
+ // to compensate the remaining phase
+ final long fullcycles = (long)Math.floor(len / cycleLen) - 2L;
+
+ if (fullcycles > 0L) {
+ len -= cycleLen * fullcycles;
+
+ final long iterations = fullcycles * _dashLen;
+ _idx = (int) (iterations + _idx) % _dashLen;
+ _dashOn = (iterations + (_dashOn ? 1L : 0L) & 1L) == 1L;
+ }
+
+ double leftInThisDashSegment, d;
+
+ while (true) {
+ d = _dash[_idx];
+ leftInThisDashSegment = d - _phase;
+
+ if (len <= leftInThisDashSegment) {
+ // Advance phase within current dash segment
+ _phase += len;
+
+ // TODO: compare double values using epsilon:
+ if (len == leftInThisDashSegment) {
+ _phase = 0.0d;
+ _idx = (_idx + 1) % _dashLen;
+ _dashOn = !_dashOn;
+ }
+ break;
+ }
+
+ len -= leftInThisDashSegment;
+ // Advance to next dash segment
+ _idx = (_idx + 1) % _dashLen;
+ _dashOn = !_dashOn;
+ _phase = 0.0d;
+ }
+ // Save local state:
+ idx = _idx;
+ dashOn = _dashOn;
+ phase = _phase;
+ }
// preconditions: curCurvepts must be an array of length at least 2 * type,
// that contains the curve we want to dash in the first type elements
private void somethingTo(final int type) {
- if (pointCurve(curCurvepts, type)) {
+ final double[] _curCurvepts = curCurvepts;
+ if (pointCurve(_curCurvepts, type)) {
return;
}
final LengthIterator _li = li;
- final double[] _curCurvepts = curCurvepts;
final double[] _dash = dash;
final int _dashLen = this.dashLen;
@@ -401,17 +555,16 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
// initially the current curve is at curCurvepts[0...type]
int curCurveoff = 0;
- double lastSplitT = 0.0d;
+ double prevT = 0.0d;
double t;
double leftInThisDashSegment = _dash[_idx] - _phase;
while ((t = _li.next(leftInThisDashSegment)) < 1.0d) {
if (t != 0.0d) {
- DHelpers.subdivideAt((t - lastSplitT) / (1.0d - lastSplitT),
+ DHelpers.subdivideAt((t - prevT) / (1.0d - prevT),
_curCurvepts, curCurveoff,
- _curCurvepts, 0,
- _curCurvepts, type, type);
- lastSplitT = t;
+ _curCurvepts, 0, type);
+ prevT = t;
goTo(_curCurvepts, 2, type, _dashOn);
curCurveoff = type;
}
@@ -439,7 +592,29 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
_li.reset();
}
- private static boolean pointCurve(double[] curve, int type) {
+ private void skipSomethingTo(final int type) {
+ final double[] _curCurvepts = curCurvepts;
+ if (pointCurve(_curCurvepts, type)) {
+ return;
+ }
+ final LengthIterator _li = li;
+
+ _li.initializeIterationOnCurve(_curCurvepts, type);
+
+ // In contrary to somethingTo(),
+ // just estimate properly the curve length:
+ final double len = _li.totalLength();
+
+ // Accumulate skipped length:
+ this.outside = true;
+ this.totalSkipLen += len;
+
+ // Fix initial move:
+ this.needsMoveTo = true;
+ this.starting = false;
+ }
+
+ private static boolean pointCurve(final double[] curve, final int type) {
for (int i = 2; i < type; i++) {
if (curve[i] != curve[i-2]) {
return false;
@@ -462,15 +637,14 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
// tree; however, the trees we are interested in have the property that
// every non leaf node has exactly 2 children
static final class LengthIterator {
- private enum Side {LEFT, RIGHT}
// Holds the curves at various levels of the recursion. The root
// (i.e. the original curve) is at recCurveStack[0] (but then it
// gets subdivided, the left half is put at 1, so most of the time
// only the right half of the original curve is at 0)
private final double[][] recCurveStack; // dirty
- // sides[i] indicates whether the node at level i+1 in the path from
+ // sidesRight[i] indicates whether the node at level i+1 in the path from
// the root to the current leaf is a left or right child of its parent.
- private final Side[] sides; // dirty
+ private final boolean[] sidesRight; // dirty
private int curveType;
// lastT and nextT delimit the current leaf.
private double nextT;
@@ -491,7 +665,7 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
LengthIterator() {
this.recCurveStack = new double[REC_LIMIT + 1][8];
- this.sides = new Side[REC_LIMIT];
+ this.sidesRight = new boolean[REC_LIMIT];
// if any methods are called without first initializing this object
// on a curve, we want it to fail ASAP.
this.nextT = Double.MAX_VALUE;
@@ -513,7 +687,7 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
for (int i = recLimit; i >= 0; i--) {
Arrays.fill(recCurveStack[i], 0.0d);
}
- Arrays.fill(sides, Side.LEFT);
+ Arrays.fill(sidesRight, false);
Arrays.fill(curLeafCtrlPolyLengths, 0.0d);
Arrays.fill(nextRoots, 0.0d);
Arrays.fill(flatLeafCoefCache, 0.0d);
@@ -521,7 +695,7 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
}
}
- void initializeIterationOnCurve(double[] pts, int type) {
+ void initializeIterationOnCurve(final double[] pts, final int type) {
// optimize arraycopy (8 values faster than 6 = type):
System.arraycopy(pts, 0, recCurveStack[0], 0, 8);
this.curveType = type;
@@ -533,11 +707,11 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
goLeft(); // initializes nextT and lenAtNextT properly
this.lenAtLastSplit = 0.0d;
if (recLevel > 0) {
- this.sides[0] = Side.LEFT;
+ this.sidesRight[0] = false;
this.done = false;
} else {
// the root of the tree is a leaf so we're done.
- this.sides[0] = Side.RIGHT;
+ this.sidesRight[0] = true;
this.done = true;
}
this.lastSegLen = 0.0d;
@@ -546,7 +720,7 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
// 0 == false, 1 == true, -1 == invalid cached value.
private int cachedHaveLowAcceleration = -1;
- private boolean haveLowAcceleration(double err) {
+ private boolean haveLowAcceleration(final double err) {
if (cachedHaveLowAcceleration == -1) {
final double len1 = curLeafCtrlPolyLengths[0];
final double len2 = curLeafCtrlPolyLengths[1];
@@ -613,7 +787,7 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
if (_flatLeafCoefCache[2] < 0.0d) {
double x = curLeafCtrlPolyLengths[0],
- y = x + curLeafCtrlPolyLengths[1];
+ y = x + curLeafCtrlPolyLengths[1];
if (curveType == 8) {
double z = y + curLeafCtrlPolyLengths[2];
_flatLeafCoefCache[0] = 3.0d * (x - y) + z;
@@ -635,7 +809,7 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
// we use cubicRootsInAB here, because we want only roots in 0, 1,
// and our quadratic root finder doesn't filter, so it's just a
// matter of convenience.
- int n = DHelpers.cubicRootsInAB(a, b, c, d, nextRoots, 0, 0.0d, 1.0d);
+ final int n = DHelpers.cubicRootsInAB(a, b, c, d, nextRoots, 0, 0.0d, 1.0d);
if (n == 1 && !Double.isNaN(nextRoots[0])) {
t = nextRoots[0];
}
@@ -656,6 +830,16 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
return t;
}
+ double totalLength() {
+ while (!done) {
+ goToNextLeaf();
+ }
+ // reset LengthIterator:
+ reset();
+
+ return lenAtNextT;
+ }
+
double lastSegLen() {
return lastSegLen;
}
@@ -665,11 +849,11 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
private void goToNextLeaf() {
// We must go to the first ancestor node that has an unvisited
// right child.
+ final boolean[] _sides = sidesRight;
int _recLevel = recLevel;
- final Side[] _sides = sides;
-
_recLevel--;
- while(_sides[_recLevel] == Side.RIGHT) {
+
+ while(_sides[_recLevel]) {
if (_recLevel == 0) {
recLevel = 0;
done = true;
@@ -678,19 +862,17 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
_recLevel--;
}
- _sides[_recLevel] = Side.RIGHT;
+ _sides[_recLevel] = true;
// optimize arraycopy (8 values faster than 6 = type):
- System.arraycopy(recCurveStack[_recLevel], 0,
- recCurveStack[_recLevel+1], 0, 8);
- _recLevel++;
-
+ System.arraycopy(recCurveStack[_recLevel++], 0,
+ recCurveStack[_recLevel], 0, 8);
recLevel = _recLevel;
goLeft();
}
// go to the leftmost node from the current node. Return its length.
private void goLeft() {
- double len = onLeaf();
+ final double len = onLeaf();
if (len >= 0.0d) {
lastT = nextT;
lenAtLastT = lenAtNextT;
@@ -700,10 +882,11 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
flatLeafCoefCache[2] = -1.0d;
cachedHaveLowAcceleration = -1;
} else {
- DHelpers.subdivide(recCurveStack[recLevel], 0,
- recCurveStack[recLevel+1], 0,
- recCurveStack[recLevel], 0, curveType);
- sides[recLevel] = Side.LEFT;
+ DHelpers.subdivide(recCurveStack[recLevel],
+ recCurveStack[recLevel + 1],
+ recCurveStack[recLevel], curveType);
+
+ sidesRight[recLevel] = false;
recLevel++;
goLeft();
}
@@ -718,7 +901,7 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
double x0 = curve[0], y0 = curve[1];
for (int i = 2; i < _curveType; i += 2) {
- final double x1 = curve[i], y1 = curve[i+1];
+ final double x1 = curve[i], y1 = curve[i + 1];
final double len = DHelpers.linelen(x0, y0, x1, y1);
polyLen += len;
curLeafCtrlPolyLengths[(i >> 1) - 1] = len;
@@ -726,10 +909,9 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
y0 = y1;
}
- final double lineLen = DHelpers.linelen(curve[0], curve[1],
- curve[_curveType-2],
- curve[_curveType-1]);
- if ((polyLen - lineLen) < ERR || recLevel == REC_LIMIT) {
+ final double lineLen = DHelpers.linelen(curve[0], curve[1], x0, y0);
+
+ if ((polyLen - lineLen) < CURVE_LEN_ERR || recLevel == REC_LIMIT) {
return (polyLen + lineLen) / 2.0d;
}
return -1.0d;
@@ -740,42 +922,191 @@ final class DDasher implements DPathConsumer2D, MarlinConst {
public void curveTo(final double x1, final double y1,
final double x2, final double y2,
final double x3, final double y3)
+ {
+ final int outcode0 = this.cOutCode;
+
+ if (clipRect != null) {
+ final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
+ final int outcode2 = DHelpers.outcode(x2, y2, clipRect);
+ final int outcode3 = DHelpers.outcode(x3, y3, clipRect);
+
+ // Should clip
+ final int orCode = (outcode0 | outcode1 | outcode2 | outcode3);
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1 & outcode2 & outcode3;
+
+ // basic rejection criteria:
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => callback with subdivided parts:
+ boolean ret = curveSplitter.splitCurve(cx0, cy0, x1, y1, x2, y2, x3, y3,
+ orCode, this);
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode3;
+ skipCurveTo(x1, y1, x2, y2, x3, y3);
+ return;
+ }
+ }
+
+ this.cOutCode = outcode3;
+
+ if (this.outside) {
+ this.outside = false;
+ // Adjust current index, phase & dash:
+ skipLen();
+ }
+ }
+ _curveTo(x1, y1, x2, y2, x3, y3);
+ }
+
+ private void _curveTo(final double x1, final double y1,
+ final double x2, final double y2,
+ final double x3, final double y3)
{
final double[] _curCurvepts = curCurvepts;
- _curCurvepts[0] = x0; _curCurvepts[1] = y0;
- _curCurvepts[2] = x1; _curCurvepts[3] = y1;
- _curCurvepts[4] = x2; _curCurvepts[5] = y2;
- _curCurvepts[6] = x3; _curCurvepts[7] = y3;
- somethingTo(8);
+
+ // monotonize curve:
+ final CurveBasicMonotonizer monotonizer
+ = rdrCtx.monotonizer.curve(cx0, cy0, x1, y1, x2, y2, x3, y3);
+
+ final int nSplits = monotonizer.nbSplits;
+ final double[] mid = monotonizer.middle;
+
+ for (int i = 0, off = 0; i <= nSplits; i++, off += 6) {
+ // optimize arraycopy (8 values faster than 6 = type):
+ System.arraycopy(mid, off, _curCurvepts, 0, 8);
+
+ somethingTo(8);
+ }
+ }
+
+ private void skipCurveTo(final double x1, final double y1,
+ final double x2, final double y2,
+ final double x3, final double y3)
+ {
+ final double[] _curCurvepts = curCurvepts;
+ _curCurvepts[0] = cx0; _curCurvepts[1] = cy0;
+ _curCurvepts[2] = x1; _curCurvepts[3] = y1;
+ _curCurvepts[4] = x2; _curCurvepts[5] = y2;
+ _curCurvepts[6] = x3; _curCurvepts[7] = y3;
+
+ skipSomethingTo(8);
+
+ this.cx0 = x3;
+ this.cy0 = y3;
}
@Override
public void quadTo(final double x1, final double y1,
final double x2, final double y2)
+ {
+ final int outcode0 = this.cOutCode;
+
+ if (clipRect != null) {
+ final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
+ final int outcode2 = DHelpers.outcode(x2, y2, clipRect);
+
+ // Should clip
+ final int orCode = (outcode0 | outcode1 | outcode2);
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1 & outcode2;
+
+ // basic rejection criteria:
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => call lineTo() with subdivided curves:
+ boolean ret = curveSplitter.splitQuad(cx0, cy0, x1, y1,
+ x2, y2, orCode, this);
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode2;
+ skipQuadTo(x1, y1, x2, y2);
+ return;
+ }
+ }
+
+ this.cOutCode = outcode2;
+
+ if (this.outside) {
+ this.outside = false;
+ // Adjust current index, phase & dash:
+ skipLen();
+ }
+ }
+ _quadTo(x1, y1, x2, y2);
+ }
+
+ private void _quadTo(final double x1, final double y1,
+ final double x2, final double y2)
{
final double[] _curCurvepts = curCurvepts;
- _curCurvepts[0] = x0; _curCurvepts[1] = y0;
- _curCurvepts[2] = x1; _curCurvepts[3] = y1;
- _curCurvepts[4] = x2; _curCurvepts[5] = y2;
- somethingTo(6);
+
+ // monotonize quad:
+ final CurveBasicMonotonizer monotonizer
+ = rdrCtx.monotonizer.quad(cx0, cy0, x1, y1, x2, y2);
+
+ final int nSplits = monotonizer.nbSplits;
+ final double[] mid = monotonizer.middle;
+
+ for (int i = 0, off = 0; i <= nSplits; i++, off += 4) {
+ // optimize arraycopy (8 values faster than 6 = type):
+ System.arraycopy(mid, off, _curCurvepts, 0, 8);
+
+ somethingTo(6);
+ }
+ }
+
+ private void skipQuadTo(final double x1, final double y1,
+ final double x2, final double y2)
+ {
+ final double[] _curCurvepts = curCurvepts;
+ _curCurvepts[0] = cx0; _curCurvepts[1] = cy0;
+ _curCurvepts[2] = x1; _curCurvepts[3] = y1;
+ _curCurvepts[4] = x2; _curCurvepts[5] = y2;
+
+ skipSomethingTo(6);
+
+ this.cx0 = x2;
+ this.cy0 = y2;
}
@Override
public void closePath() {
- lineTo(sx, sy);
+ if (cx0 != sx0 || cy0 != sy0) {
+ lineTo(sx0, sy0);
+ }
if (firstSegidx != 0) {
if (!dashOn || needsMoveTo) {
- out.moveTo(sx, sy);
+ out.moveTo(sx0, sy0);
}
emitFirstSegments();
}
- moveTo(sx, sy);
+ moveTo(sx0, sy0);
}
@Override
public void pathDone() {
if (firstSegidx != 0) {
- out.moveTo(sx, sy);
+ out.moveTo(sx0, sy0);
emitFirstSegments();
}
out.pathDone();
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/DHelpers.java b/src/java.desktop/share/classes/sun/java2d/marlin/DHelpers.java
index 865d5289f2a..b5ef8904acd 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DHelpers.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DHelpers.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -25,7 +25,6 @@
package sun.java2d.marlin;
-import static java.lang.Math.PI;
import java.util.Arrays;
import sun.java2d.marlin.stats.Histogram;
import sun.java2d.marlin.stats.StatLong;
@@ -41,13 +40,25 @@ final class DHelpers implements MarlinConst {
return (d <= err && d >= -err);
}
- static int quadraticRoots(final double a, final double b,
- final double c, double[] zeroes, final int off)
+ static double evalCubic(final double a, final double b,
+ final double c, final double d,
+ final double t)
+ {
+ return t * (t * (t * a + b) + c) + d;
+ }
+
+ static double evalQuad(final double a, final double b,
+ final double c, final double t)
+ {
+ return t * (t * a + b) + c;
+ }
+
+ static int quadraticRoots(final double a, final double b, final double c,
+ final double[] zeroes, final int off)
{
int ret = off;
- double t;
if (a != 0.0d) {
- final double dis = b*b - 4*a*c;
+ final double dis = b*b - 4.0d * a * c;
if (dis > 0.0d) {
final double sqrtDis = Math.sqrt(dis);
// depending on the sign of b we use a slightly different
@@ -62,34 +73,34 @@ final class DHelpers implements MarlinConst {
zeroes[ret++] = (2.0d * c) / (-b + sqrtDis);
}
} else if (dis == 0.0d) {
- t = (-b) / (2.0d * a);
- zeroes[ret++] = t;
- }
- } else {
- if (b != 0.0d) {
- t = (-c) / b;
- zeroes[ret++] = t;
+ zeroes[ret++] = -b / (2.0d * a);
}
+ } else if (b != 0.0d) {
+ zeroes[ret++] = -c / b;
}
return ret - off;
}
// find the roots of g(t) = d*t^3 + a*t^2 + b*t + c in [A,B)
- static int cubicRootsInAB(double d, double a, double b, double c,
- double[] pts, final int off,
+ static int cubicRootsInAB(final double d, double a, double b, double c,
+ final double[] pts, final int off,
final double A, final double B)
{
if (d == 0.0d) {
- int num = quadraticRoots(a, b, c, pts, off);
+ final int num = quadraticRoots(a, b, c, pts, off);
return filterOutNotInAB(pts, off, num, A, B) - off;
}
// From Graphics Gems:
- // http://tog.acm.org/resources/GraphicsGems/gems/Roots3And4.c
+ // https://github.com/erich666/GraphicsGems/blob/master/gems/Roots3And4.c
// (also from awt.geom.CubicCurve2D. But here we don't need as
// much accuracy and we don't want to create arrays so we use
// our own customized version).
// normal form: x^3 + ax^2 + bx + c = 0
+
+ /*
+ * TODO: cleanup all that code after reading Roots3And4.c
+ */
a /= d;
b /= d;
c /= d;
@@ -102,63 +113,45 @@ final class DHelpers implements MarlinConst {
// p = P/3
// q = Q/2
// instead and use those values for simplicity of the code.
- double sq_A = a * a;
- double p = (1.0d/3.0d) * ((-1.0d/3.0d) * sq_A + b);
- double q = (1.0d/2.0d) * ((2.0d/27.0d) * a * sq_A - (1.0d/3.0d) * a * b + c);
+ final double sub = (1.0d / 3.0d) * a;
+ final double sq_A = a * a;
+ final double p = (1.0d / 3.0d) * ((-1.0d / 3.0d) * sq_A + b);
+ final double q = (1.0d / 2.0d) * ((2.0d / 27.0d) * a * sq_A - sub * b + c);
// use Cardano's formula
- double cb_p = p * p * p;
- double D = q * q + cb_p;
+ final double cb_p = p * p * p;
+ final double D = q * q + cb_p;
int num;
if (D < 0.0d) {
// see: http://en.wikipedia.org/wiki/Cubic_function#Trigonometric_.28and_hyperbolic.29_method
- final double phi = (1.0d/3.0d) * Math.acos(-q / Math.sqrt(-cb_p));
+ final double phi = (1.0d / 3.0d) * Math.acos(-q / Math.sqrt(-cb_p));
final double t = 2.0d * Math.sqrt(-p);
- pts[ off+0 ] = ( t * Math.cos(phi));
- pts[ off+1 ] = (-t * Math.cos(phi + (PI / 3.0d)));
- pts[ off+2 ] = (-t * Math.cos(phi - (PI / 3.0d)));
+ pts[off ] = ( t * Math.cos(phi) - sub);
+ pts[off + 1] = (-t * Math.cos(phi + (Math.PI / 3.0d)) - sub);
+ pts[off + 2] = (-t * Math.cos(phi - (Math.PI / 3.0d)) - sub);
num = 3;
} else {
final double sqrt_D = Math.sqrt(D);
final double u = Math.cbrt(sqrt_D - q);
final double v = - Math.cbrt(sqrt_D + q);
- pts[ off ] = (u + v);
+ pts[off ] = (u + v - sub);
num = 1;
if (within(D, 0.0d, 1e-8d)) {
- pts[off+1] = -(pts[off] / 2.0d);
+ pts[off + 1] = ((-1.0d / 2.0d) * (u + v) - sub);
num = 2;
}
}
- final double sub = (1.0d/3.0d) * a;
-
- for (int i = 0; i < num; ++i) {
- pts[ off+i ] -= sub;
- }
-
return filterOutNotInAB(pts, off, num, A, B) - off;
}
- static double evalCubic(final double a, final double b,
- final double c, final double d,
- final double t)
- {
- return t * (t * (t * a + b) + c) + d;
- }
-
- static double evalQuad(final double a, final double b,
- final double c, final double t)
- {
- return t * (t * a + b) + c;
- }
-
// returns the index 1 past the last valid element remaining after filtering
- static int filterOutNotInAB(double[] nums, final int off, final int len,
+ static int filterOutNotInAB(final double[] nums, final int off, final int len,
final double a, final double b)
{
int ret = off;
@@ -170,35 +163,189 @@ final class DHelpers implements MarlinConst {
return ret;
}
- static double linelen(double x1, double y1, double x2, double y2) {
- final double dx = x2 - x1;
- final double dy = y2 - y1;
- return Math.sqrt(dx*dx + dy*dy);
+ static double fastLineLen(final double x0, final double y0,
+ final double x1, final double y1)
+ {
+ final double dx = x1 - x0;
+ final double dy = y1 - y0;
+
+ // use manhattan norm:
+ return Math.abs(dx) + Math.abs(dy);
}
- static void subdivide(double[] src, int srcoff, double[] left, int leftoff,
- double[] right, int rightoff, int type)
+ static double linelen(final double x0, final double y0,
+ final double x1, final double y1)
+ {
+ final double dx = x1 - x0;
+ final double dy = y1 - y0;
+ return Math.sqrt(dx * dx + dy * dy);
+ }
+
+ static double fastQuadLen(final double x0, final double y0,
+ final double x1, final double y1,
+ final double x2, final double y2)
+ {
+ final double dx1 = x1 - x0;
+ final double dx2 = x2 - x1;
+ final double dy1 = y1 - y0;
+ final double dy2 = y2 - y1;
+
+ // use manhattan norm:
+ return Math.abs(dx1) + Math.abs(dx2)
+ + Math.abs(dy1) + Math.abs(dy2);
+ }
+
+ static double quadlen(final double x0, final double y0,
+ final double x1, final double y1,
+ final double x2, final double y2)
+ {
+ return (linelen(x0, y0, x1, y1)
+ + linelen(x1, y1, x2, y2)
+ + linelen(x0, y0, x2, y2)) / 2.0d;
+ }
+
+ static double fastCurvelen(final double x0, final double y0,
+ final double x1, final double y1,
+ final double x2, final double y2,
+ final double x3, final double y3)
+ {
+ final double dx1 = x1 - x0;
+ final double dx2 = x2 - x1;
+ final double dx3 = x3 - x2;
+ final double dy1 = y1 - y0;
+ final double dy2 = y2 - y1;
+ final double dy3 = y3 - y2;
+
+ // use manhattan norm:
+ return Math.abs(dx1) + Math.abs(dx2) + Math.abs(dx3)
+ + Math.abs(dy1) + Math.abs(dy2) + Math.abs(dy3);
+ }
+
+ static double curvelen(final double x0, final double y0,
+ final double x1, final double y1,
+ final double x2, final double y2,
+ final double x3, final double y3)
+ {
+ return (linelen(x0, y0, x1, y1)
+ + linelen(x1, y1, x2, y2)
+ + linelen(x2, y2, x3, y3)
+ + linelen(x0, y0, x3, y3)) / 2.0d;
+ }
+
+ // finds values of t where the curve in pts should be subdivided in order
+ // to get good offset curves a distance of w away from the middle curve.
+ // Stores the points in ts, and returns how many of them there were.
+ static int findSubdivPoints(final DCurve c, final double[] pts,
+ final double[] ts, final int type,
+ final double w2)
+ {
+ final double x12 = pts[2] - pts[0];
+ final double y12 = pts[3] - pts[1];
+ // if the curve is already parallel to either axis we gain nothing
+ // from rotating it.
+ if ((y12 != 0.0d && x12 != 0.0d)) {
+ // we rotate it so that the first vector in the control polygon is
+ // parallel to the x-axis. This will ensure that rotated quarter
+ // circles won't be subdivided.
+ final double hypot = Math.sqrt(x12 * x12 + y12 * y12);
+ final double cos = x12 / hypot;
+ final double sin = y12 / hypot;
+ final double x1 = cos * pts[0] + sin * pts[1];
+ final double y1 = cos * pts[1] - sin * pts[0];
+ final double x2 = cos * pts[2] + sin * pts[3];
+ final double y2 = cos * pts[3] - sin * pts[2];
+ final double x3 = cos * pts[4] + sin * pts[5];
+ final double y3 = cos * pts[5] - sin * pts[4];
+
+ switch(type) {
+ case 8:
+ final double x4 = cos * pts[6] + sin * pts[7];
+ final double y4 = cos * pts[7] - sin * pts[6];
+ c.set(x1, y1, x2, y2, x3, y3, x4, y4);
+ break;
+ case 6:
+ c.set(x1, y1, x2, y2, x3, y3);
+ break;
+ default:
+ }
+ } else {
+ c.set(pts, type);
+ }
+
+ int ret = 0;
+ // we subdivide at values of t such that the remaining rotated
+ // curves are monotonic in x and y.
+ ret += c.dxRoots(ts, ret);
+ ret += c.dyRoots(ts, ret);
+
+ // subdivide at inflection points.
+ if (type == 8) {
+ // quadratic curves can't have inflection points
+ ret += c.infPoints(ts, ret);
+ }
+
+ // now we must subdivide at points where one of the offset curves will have
+ // a cusp. This happens at ts where the radius of curvature is equal to w.
+ ret += c.rootsOfROCMinusW(ts, ret, w2, 0.0001d);
+
+ ret = filterOutNotInAB(ts, 0, ret, 0.0001d, 0.9999d);
+ isort(ts, ret);
+ return ret;
+ }
+
+ // finds values of t where the curve in pts should be subdivided in order
+ // to get intersections with the given clip rectangle.
+ // Stores the points in ts, and returns how many of them there were.
+ static int findClipPoints(final DCurve curve, final double[] pts,
+ final double[] ts, final int type,
+ final int outCodeOR,
+ final double[] clipRect)
+ {
+ curve.set(pts, type);
+
+ // clip rectangle (ymin, ymax, xmin, xmax)
+ int ret = 0;
+
+ if ((outCodeOR & OUTCODE_LEFT) != 0) {
+ ret += curve.xPoints(ts, ret, clipRect[2]);
+ }
+ if ((outCodeOR & OUTCODE_RIGHT) != 0) {
+ ret += curve.xPoints(ts, ret, clipRect[3]);
+ }
+ if ((outCodeOR & OUTCODE_TOP) != 0) {
+ ret += curve.yPoints(ts, ret, clipRect[0]);
+ }
+ if ((outCodeOR & OUTCODE_BOTTOM) != 0) {
+ ret += curve.yPoints(ts, ret, clipRect[1]);
+ }
+ isort(ts, ret);
+ return ret;
+ }
+
+ static void subdivide(final double[] src,
+ final double[] left, final double[] right,
+ final int type)
{
switch(type) {
- case 6:
- DHelpers.subdivideQuad(src, srcoff, left, leftoff, right, rightoff);
- return;
case 8:
- DHelpers.subdivideCubic(src, srcoff, left, leftoff, right, rightoff);
+ subdivideCubic(src, left, right);
+ return;
+ case 6:
+ subdivideQuad(src, left, right);
return;
default:
throw new InternalError("Unsupported curve type");
}
}
- static void isort(double[] a, int off, int len) {
- for (int i = off + 1, end = off + len; i < end; i++) {
- double ai = a[i];
- int j = i - 1;
- for (; j >= off && a[j] > ai; j--) {
- a[j+1] = a[j];
+ static void isort(final double[] a, final int len) {
+ for (int i = 1, j; i < len; i++) {
+ final double ai = a[i];
+ j = i - 1;
+ for (; j >= 0 && a[j] > ai; j--) {
+ a[j + 1] = a[j];
}
- a[j+1] = ai;
+ a[j + 1] = ai;
}
}
@@ -221,206 +368,216 @@ final class DHelpers implements MarlinConst {
* equals (leftoff + 6), in order
* to avoid allocating extra storage for this common point.
* @param src the array holding the coordinates for the source curve
- * @param srcoff the offset into the array of the beginning of the
- * the 6 source coordinates
* @param left the array for storing the coordinates for the first
* half of the subdivided curve
- * @param leftoff the offset into the array of the beginning of the
- * the 6 left coordinates
* @param right the array for storing the coordinates for the second
* half of the subdivided curve
- * @param rightoff the offset into the array of the beginning of the
- * the 6 right coordinates
* @since 1.7
*/
- static void subdivideCubic(double[] src, int srcoff,
- double[] left, int leftoff,
- double[] right, int rightoff)
+ static void subdivideCubic(final double[] src,
+ final double[] left,
+ final double[] right)
{
- double x1 = src[srcoff + 0];
- double y1 = src[srcoff + 1];
- double ctrlx1 = src[srcoff + 2];
- double ctrly1 = src[srcoff + 3];
- double ctrlx2 = src[srcoff + 4];
- double ctrly2 = src[srcoff + 5];
- double x2 = src[srcoff + 6];
- double y2 = src[srcoff + 7];
- if (left != null) {
- left[leftoff + 0] = x1;
- left[leftoff + 1] = y1;
- }
- if (right != null) {
- right[rightoff + 6] = x2;
- right[rightoff + 7] = y2;
- }
- x1 = (x1 + ctrlx1) / 2.0d;
- y1 = (y1 + ctrly1) / 2.0d;
- x2 = (x2 + ctrlx2) / 2.0d;
- y2 = (y2 + ctrly2) / 2.0d;
- double centerx = (ctrlx1 + ctrlx2) / 2.0d;
- double centery = (ctrly1 + ctrly2) / 2.0d;
- ctrlx1 = (x1 + centerx) / 2.0d;
- ctrly1 = (y1 + centery) / 2.0d;
- ctrlx2 = (x2 + centerx) / 2.0d;
- ctrly2 = (y2 + centery) / 2.0d;
- centerx = (ctrlx1 + ctrlx2) / 2.0d;
- centery = (ctrly1 + ctrly2) / 2.0d;
- if (left != null) {
- left[leftoff + 2] = x1;
- left[leftoff + 3] = y1;
- left[leftoff + 4] = ctrlx1;
- left[leftoff + 5] = ctrly1;
- left[leftoff + 6] = centerx;
- left[leftoff + 7] = centery;
- }
- if (right != null) {
- right[rightoff + 0] = centerx;
- right[rightoff + 1] = centery;
- right[rightoff + 2] = ctrlx2;
- right[rightoff + 3] = ctrly2;
- right[rightoff + 4] = x2;
- right[rightoff + 5] = y2;
- }
+ double x1 = src[0];
+ double y1 = src[1];
+ double cx1 = src[2];
+ double cy1 = src[3];
+ double cx2 = src[4];
+ double cy2 = src[5];
+ double x2 = src[6];
+ double y2 = src[7];
+
+ left[0] = x1;
+ left[1] = y1;
+
+ right[6] = x2;
+ right[7] = y2;
+
+ x1 = (x1 + cx1) / 2.0d;
+ y1 = (y1 + cy1) / 2.0d;
+ x2 = (x2 + cx2) / 2.0d;
+ y2 = (y2 + cy2) / 2.0d;
+
+ double cx = (cx1 + cx2) / 2.0d;
+ double cy = (cy1 + cy2) / 2.0d;
+
+ cx1 = (x1 + cx) / 2.0d;
+ cy1 = (y1 + cy) / 2.0d;
+ cx2 = (x2 + cx) / 2.0d;
+ cy2 = (y2 + cy) / 2.0d;
+ cx = (cx1 + cx2) / 2.0d;
+ cy = (cy1 + cy2) / 2.0d;
+
+ left[2] = x1;
+ left[3] = y1;
+ left[4] = cx1;
+ left[5] = cy1;
+ left[6] = cx;
+ left[7] = cy;
+
+ right[0] = cx;
+ right[1] = cy;
+ right[2] = cx2;
+ right[3] = cy2;
+ right[4] = x2;
+ right[5] = y2;
}
-
- static void subdivideCubicAt(double t, double[] src, int srcoff,
- double[] left, int leftoff,
- double[] right, int rightoff)
+ static void subdivideCubicAt(final double t,
+ final double[] src, final int offS,
+ final double[] pts, final int offL, final int offR)
{
- double x1 = src[srcoff + 0];
- double y1 = src[srcoff + 1];
- double ctrlx1 = src[srcoff + 2];
- double ctrly1 = src[srcoff + 3];
- double ctrlx2 = src[srcoff + 4];
- double ctrly2 = src[srcoff + 5];
- double x2 = src[srcoff + 6];
- double y2 = src[srcoff + 7];
- if (left != null) {
- left[leftoff + 0] = x1;
- left[leftoff + 1] = y1;
- }
- if (right != null) {
- right[rightoff + 6] = x2;
- right[rightoff + 7] = y2;
- }
- x1 = x1 + t * (ctrlx1 - x1);
- y1 = y1 + t * (ctrly1 - y1);
- x2 = ctrlx2 + t * (x2 - ctrlx2);
- y2 = ctrly2 + t * (y2 - ctrly2);
- double centerx = ctrlx1 + t * (ctrlx2 - ctrlx1);
- double centery = ctrly1 + t * (ctrly2 - ctrly1);
- ctrlx1 = x1 + t * (centerx - x1);
- ctrly1 = y1 + t * (centery - y1);
- ctrlx2 = centerx + t * (x2 - centerx);
- ctrly2 = centery + t * (y2 - centery);
- centerx = ctrlx1 + t * (ctrlx2 - ctrlx1);
- centery = ctrly1 + t * (ctrly2 - ctrly1);
- if (left != null) {
- left[leftoff + 2] = x1;
- left[leftoff + 3] = y1;
- left[leftoff + 4] = ctrlx1;
- left[leftoff + 5] = ctrly1;
- left[leftoff + 6] = centerx;
- left[leftoff + 7] = centery;
- }
- if (right != null) {
- right[rightoff + 0] = centerx;
- right[rightoff + 1] = centery;
- right[rightoff + 2] = ctrlx2;
- right[rightoff + 3] = ctrly2;
- right[rightoff + 4] = x2;
- right[rightoff + 5] = y2;
- }
+ double x1 = src[offS ];
+ double y1 = src[offS + 1];
+ double cx1 = src[offS + 2];
+ double cy1 = src[offS + 3];
+ double cx2 = src[offS + 4];
+ double cy2 = src[offS + 5];
+ double x2 = src[offS + 6];
+ double y2 = src[offS + 7];
+
+ pts[offL ] = x1;
+ pts[offL + 1] = y1;
+
+ pts[offR + 6] = x2;
+ pts[offR + 7] = y2;
+
+ x1 = x1 + t * (cx1 - x1);
+ y1 = y1 + t * (cy1 - y1);
+ x2 = cx2 + t * (x2 - cx2);
+ y2 = cy2 + t * (y2 - cy2);
+
+ double cx = cx1 + t * (cx2 - cx1);
+ double cy = cy1 + t * (cy2 - cy1);
+
+ cx1 = x1 + t * (cx - x1);
+ cy1 = y1 + t * (cy - y1);
+ cx2 = cx + t * (x2 - cx);
+ cy2 = cy + t * (y2 - cy);
+ cx = cx1 + t * (cx2 - cx1);
+ cy = cy1 + t * (cy2 - cy1);
+
+ pts[offL + 2] = x1;
+ pts[offL + 3] = y1;
+ pts[offL + 4] = cx1;
+ pts[offL + 5] = cy1;
+ pts[offL + 6] = cx;
+ pts[offL + 7] = cy;
+
+ pts[offR ] = cx;
+ pts[offR + 1] = cy;
+ pts[offR + 2] = cx2;
+ pts[offR + 3] = cy2;
+ pts[offR + 4] = x2;
+ pts[offR + 5] = y2;
}
- static void subdivideQuad(double[] src, int srcoff,
- double[] left, int leftoff,
- double[] right, int rightoff)
+ static void subdivideQuad(final double[] src,
+ final double[] left,
+ final double[] right)
{
- double x1 = src[srcoff + 0];
- double y1 = src[srcoff + 1];
- double ctrlx = src[srcoff + 2];
- double ctrly = src[srcoff + 3];
- double x2 = src[srcoff + 4];
- double y2 = src[srcoff + 5];
- if (left != null) {
- left[leftoff + 0] = x1;
- left[leftoff + 1] = y1;
- }
- if (right != null) {
- right[rightoff + 4] = x2;
- right[rightoff + 5] = y2;
- }
- x1 = (x1 + ctrlx) / 2.0d;
- y1 = (y1 + ctrly) / 2.0d;
- x2 = (x2 + ctrlx) / 2.0d;
- y2 = (y2 + ctrly) / 2.0d;
- ctrlx = (x1 + x2) / 2.0d;
- ctrly = (y1 + y2) / 2.0d;
- if (left != null) {
- left[leftoff + 2] = x1;
- left[leftoff + 3] = y1;
- left[leftoff + 4] = ctrlx;
- left[leftoff + 5] = ctrly;
- }
- if (right != null) {
- right[rightoff + 0] = ctrlx;
- right[rightoff + 1] = ctrly;
- right[rightoff + 2] = x2;
- right[rightoff + 3] = y2;
- }
+ double x1 = src[0];
+ double y1 = src[1];
+ double cx = src[2];
+ double cy = src[3];
+ double x2 = src[4];
+ double y2 = src[5];
+
+ left[0] = x1;
+ left[1] = y1;
+
+ right[4] = x2;
+ right[5] = y2;
+
+ x1 = (x1 + cx) / 2.0d;
+ y1 = (y1 + cy) / 2.0d;
+ x2 = (x2 + cx) / 2.0d;
+ y2 = (y2 + cy) / 2.0d;
+ cx = (x1 + x2) / 2.0d;
+ cy = (y1 + y2) / 2.0d;
+
+ left[2] = x1;
+ left[3] = y1;
+ left[4] = cx;
+ left[5] = cy;
+
+ right[0] = cx;
+ right[1] = cy;
+ right[2] = x2;
+ right[3] = y2;
}
- static void subdivideQuadAt(double t, double[] src, int srcoff,
- double[] left, int leftoff,
- double[] right, int rightoff)
+ static void subdivideQuadAt(final double t,
+ final double[] src, final int offS,
+ final double[] pts, final int offL, final int offR)
{
- double x1 = src[srcoff + 0];
- double y1 = src[srcoff + 1];
- double ctrlx = src[srcoff + 2];
- double ctrly = src[srcoff + 3];
- double x2 = src[srcoff + 4];
- double y2 = src[srcoff + 5];
- if (left != null) {
- left[leftoff + 0] = x1;
- left[leftoff + 1] = y1;
- }
- if (right != null) {
- right[rightoff + 4] = x2;
- right[rightoff + 5] = y2;
- }
- x1 = x1 + t * (ctrlx - x1);
- y1 = y1 + t * (ctrly - y1);
- x2 = ctrlx + t * (x2 - ctrlx);
- y2 = ctrly + t * (y2 - ctrly);
- ctrlx = x1 + t * (x2 - x1);
- ctrly = y1 + t * (y2 - y1);
- if (left != null) {
- left[leftoff + 2] = x1;
- left[leftoff + 3] = y1;
- left[leftoff + 4] = ctrlx;
- left[leftoff + 5] = ctrly;
- }
- if (right != null) {
- right[rightoff + 0] = ctrlx;
- right[rightoff + 1] = ctrly;
- right[rightoff + 2] = x2;
- right[rightoff + 3] = y2;
- }
+ double x1 = src[offS ];
+ double y1 = src[offS + 1];
+ double cx = src[offS + 2];
+ double cy = src[offS + 3];
+ double x2 = src[offS + 4];
+ double y2 = src[offS + 5];
+
+ pts[offL ] = x1;
+ pts[offL + 1] = y1;
+
+ pts[offR + 4] = x2;
+ pts[offR + 5] = y2;
+
+ x1 = x1 + t * (cx - x1);
+ y1 = y1 + t * (cy - y1);
+ x2 = cx + t * (x2 - cx);
+ y2 = cy + t * (y2 - cy);
+ cx = x1 + t * (x2 - x1);
+ cy = y1 + t * (y2 - y1);
+
+ pts[offL + 2] = x1;
+ pts[offL + 3] = y1;
+ pts[offL + 4] = cx;
+ pts[offL + 5] = cy;
+
+ pts[offR ] = cx;
+ pts[offR + 1] = cy;
+ pts[offR + 2] = x2;
+ pts[offR + 3] = y2;
}
- static void subdivideAt(double t, double[] src, int srcoff,
- double[] left, int leftoff,
- double[] right, int rightoff, int size)
+ static void subdivideLineAt(final double t,
+ final double[] src, final int offS,
+ final double[] pts, final int offL, final int offR)
{
- switch(size) {
- case 8:
- subdivideCubicAt(t, src, srcoff, left, leftoff, right, rightoff);
- return;
- case 6:
- subdivideQuadAt(t, src, srcoff, left, leftoff, right, rightoff);
- return;
+ double x1 = src[offS ];
+ double y1 = src[offS + 1];
+ double x2 = src[offS + 2];
+ double y2 = src[offS + 3];
+
+ pts[offL ] = x1;
+ pts[offL + 1] = y1;
+
+ pts[offR + 2] = x2;
+ pts[offR + 3] = y2;
+
+ x1 = x1 + t * (x2 - x1);
+ y1 = y1 + t * (y2 - y1);
+
+ pts[offL + 2] = x1;
+ pts[offL + 3] = y1;
+
+ pts[offR ] = x1;
+ pts[offR + 1] = y1;
+ }
+
+ static void subdivideAt(final double t,
+ final double[] src, final int offS,
+ final double[] pts, final int offL, final int type)
+ {
+ // if instead of switch (perf + most probable cases first)
+ if (type == 8) {
+ subdivideCubicAt(t, src, offS, pts, offL, offL + type);
+ } else if (type == 4) {
+ subdivideLineAt(t, src, offS, pts, offL, offL + type);
+ } else {
+ subdivideQuadAt(t, src, offS, pts, offL, offL + type);
}
}
@@ -608,12 +765,12 @@ final class DHelpers implements MarlinConst {
e += 2;
continue;
case TYPE_QUADTO:
- io.quadTo(_curves[e+0], _curves[e+1],
+ io.quadTo(_curves[e], _curves[e+1],
_curves[e+2], _curves[e+3]);
e += 4;
continue;
case TYPE_CUBICTO:
- io.curveTo(_curves[e+0], _curves[e+1],
+ io.curveTo(_curves[e], _curves[e+1],
_curves[e+2], _curves[e+3],
_curves[e+4], _curves[e+5]);
e += 6;
@@ -651,12 +808,12 @@ final class DHelpers implements MarlinConst {
continue;
case TYPE_QUADTO:
e -= 4;
- io.quadTo(_curves[e+0], _curves[e+1],
+ io.quadTo(_curves[e], _curves[e+1],
_curves[e+2], _curves[e+3]);
continue;
case TYPE_CUBICTO:
e -= 6;
- io.curveTo(_curves[e+0], _curves[e+1],
+ io.curveTo(_curves[e], _curves[e+1],
_curves[e+2], _curves[e+3],
_curves[e+4], _curves[e+5]);
continue;
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/DMarlinRenderingEngine.java b/src/java.desktop/share/classes/sun/java2d/marlin/DMarlinRenderingEngine.java
index bed473dd5dc..10738753e50 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DMarlinRenderingEngine.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DMarlinRenderingEngine.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -31,6 +31,7 @@ import java.awt.geom.AffineTransform;
import java.awt.geom.Path2D;
import java.awt.geom.PathIterator;
import java.security.AccessController;
+import sun.awt.geom.PathConsumer2D;
import static sun.java2d.marlin.MarlinUtils.logInfo;
import sun.java2d.ReentrantContextProvider;
import sun.java2d.ReentrantContextProviderCLQ;
@@ -46,7 +47,21 @@ import sun.security.action.GetPropertyAction;
public final class DMarlinRenderingEngine extends RenderingEngine
implements MarlinConst
{
- private static enum NormMode {
+ // slightly slower ~2% if enabled stroker clipping (lines) but skipping cap / join handling is few percents faster in specific cases
+ static final boolean DISABLE_2ND_STROKER_CLIPPING = true;
+
+ static final boolean DO_TRACE_PATH = false;
+
+ static final boolean DO_CLIP = MarlinProperties.isDoClip();
+ static final boolean DO_CLIP_FILL = true;
+ static final boolean DO_CLIP_RUNTIME_ENABLE = MarlinProperties.isDoClipRuntimeFlag();
+
+ private static final float MIN_PEN_SIZE = 1.0f / MIN_SUBPIXELS;
+
+ static final double UPPER_BND = Float.MAX_VALUE / 2.0d;
+ static final double LOWER_BND = -UPPER_BND;
+
+ private enum NormMode {
ON_WITH_AA {
@Override
PathIterator getNormalizingPathIterator(final DRendererContext rdrCtx,
@@ -79,18 +94,6 @@ public final class DMarlinRenderingEngine extends RenderingEngine
PathIterator src);
}
- private static final float MIN_PEN_SIZE = 1.0f / NORM_SUBPIXELS;
-
- static final double UPPER_BND = Float.MAX_VALUE / 2.0d;
- static final double LOWER_BND = -UPPER_BND;
-
- static final boolean DO_CLIP = MarlinProperties.isDoClip();
- static final boolean DO_CLIP_FILL = true;
-
- static final boolean DO_TRACE_PATH = false;
-
- static final boolean DO_CLIP_RUNTIME_ENABLE = MarlinProperties.isDoClipRuntimeFlag();
-
/**
* Public constructor
*/
@@ -186,7 +189,7 @@ public final class DMarlinRenderingEngine extends RenderingEngine
boolean thin,
boolean normalize,
boolean antialias,
- final sun.awt.geom.PathConsumer2D consumer)
+ final PathConsumer2D consumer)
{
final NormMode norm = (normalize) ?
((antialias) ? NormMode.ON_WITH_AA : NormMode.ON_NO_AA)
@@ -424,11 +427,24 @@ public final class DMarlinRenderingEngine extends RenderingEngine
pc2d = transformerPC2D.deltaTransformConsumer(pc2d, strokerat);
// stroker will adjust the clip rectangle (width / miter limit):
- pc2d = rdrCtx.stroker.init(pc2d, width, caps, join, miterlimit, scale);
+ pc2d = rdrCtx.stroker.init(pc2d, width, caps, join, miterlimit, scale,
+ (dashesD == null));
+
+ // Curve Monotizer:
+ rdrCtx.monotonizer.init(width);
if (dashesD != null) {
+ if (DO_TRACE_PATH) {
+ pc2d = transformerPC2D.traceDasher(pc2d);
+ }
pc2d = rdrCtx.dasher.init(pc2d, dashesD, dashLen, dashphase,
recycleDashes);
+
+ if (DISABLE_2ND_STROKER_CLIPPING) {
+ // disable stoker clipping:
+ rdrCtx.stroker.disableClipping();
+ }
+
} else if (rdrCtx.doClip && (caps != Stroker.CAP_BUTT)) {
if (DO_TRACE_PATH) {
pc2d = transformerPC2D.traceClosedPathDetector(pc2d);
@@ -627,6 +643,12 @@ public final class DMarlinRenderingEngine extends RenderingEngine
private static void pathTo(final DRendererContext rdrCtx, final PathIterator pi,
DPathConsumer2D pc2d)
{
+ if (USE_PATH_SIMPLIFIER) {
+ // Use path simplifier at the first step
+ // to remove useless points
+ pc2d = rdrCtx.pathSimplifier.init(pc2d);
+ }
+
// mark context as DIRTY:
rdrCtx.dirty = true;
@@ -851,8 +873,6 @@ public final class DMarlinRenderingEngine extends RenderingEngine
// trace Input:
pc2d = rdrCtx.transformerPC2D.traceInput(pc2d);
}
-
- // TODO: subdivide quad/cubic curves into monotonic curves ?
pathTo(rdrCtx, pi, pc2d);
} else {
@@ -1002,14 +1022,17 @@ public final class DMarlinRenderingEngine extends RenderingEngine
final String refType = AccessController.doPrivileged(
new GetPropertyAction("sun.java2d.renderer.useRef",
"soft"));
-
- // Java 1.6 does not support strings in switch:
- if ("hard".equalsIgnoreCase(refType)) {
- REF_TYPE = ReentrantContextProvider.REF_HARD;
- } else if ("weak".equalsIgnoreCase(refType)) {
- REF_TYPE = ReentrantContextProvider.REF_WEAK;
- } else {
- REF_TYPE = ReentrantContextProvider.REF_SOFT;
+ switch (refType) {
+ default:
+ case "soft":
+ REF_TYPE = ReentrantContextProvider.REF_SOFT;
+ break;
+ case "weak":
+ REF_TYPE = ReentrantContextProvider.REF_WEAK;
+ break;
+ case "hard":
+ REF_TYPE = ReentrantContextProvider.REF_HARD;
+ break;
}
if (USE_THREAD_LOCAL) {
@@ -1069,8 +1092,10 @@ public final class DMarlinRenderingEngine extends RenderingEngine
logInfo("sun.java2d.renderer.edges = "
+ MarlinConst.INITIAL_EDGES_COUNT);
- logInfo("sun.java2d.renderer.pixelsize = "
- + MarlinConst.INITIAL_PIXEL_DIM);
+ logInfo("sun.java2d.renderer.pixelWidth = "
+ + MarlinConst.INITIAL_PIXEL_WIDTH);
+ logInfo("sun.java2d.renderer.pixelHeight = "
+ + MarlinConst.INITIAL_PIXEL_HEIGHT);
logInfo("sun.java2d.renderer.subPixel_log2_X = "
+ MarlinConst.SUBPIXEL_LG_POSITIONS_X);
@@ -1100,12 +1125,21 @@ public final class DMarlinRenderingEngine extends RenderingEngine
// optimisation parameters
logInfo("sun.java2d.renderer.useSimplifier = "
+ MarlinConst.USE_SIMPLIFIER);
+ logInfo("sun.java2d.renderer.usePathSimplifier= "
+ + MarlinConst.USE_PATH_SIMPLIFIER);
+ logInfo("sun.java2d.renderer.pathSimplifier.pixTol = "
+ + MarlinProperties.getPathSimplifierPixelTolerance());
logInfo("sun.java2d.renderer.clip = "
+ MarlinProperties.isDoClip());
logInfo("sun.java2d.renderer.clip.runtime.enable = "
+ MarlinProperties.isDoClipRuntimeFlag());
+ logInfo("sun.java2d.renderer.clip.subdivider = "
+ + MarlinProperties.isDoClipSubdivider());
+ logInfo("sun.java2d.renderer.clip.subdivider.minLength = "
+ + MarlinProperties.getSubdividerMinLength());
+
// debugging parameters
logInfo("sun.java2d.renderer.doStats = "
+ MarlinConst.DO_STATS);
@@ -1123,6 +1157,8 @@ public final class DMarlinRenderingEngine extends RenderingEngine
+ MarlinConst.LOG_UNSAFE_MALLOC);
// quality settings
+ logInfo("sun.java2d.renderer.curve_len_err = "
+ + MarlinProperties.getCurveLengthError());
logInfo("sun.java2d.renderer.cubic_dec_d2 = "
+ MarlinProperties.getCubicDecD2());
logInfo("sun.java2d.renderer.cubic_inc_d1 = "
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/DPathSimplifier.java b/src/java.desktop/share/classes/sun/java2d/marlin/DPathSimplifier.java
new file mode 100644
index 00000000000..27b766b461e
--- /dev/null
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DPathSimplifier.java
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2017, 2018, 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 sun.java2d.marlin;
+
+final class DPathSimplifier implements DPathConsumer2D {
+
+ // distance threshold in pixels (device)
+ private static final double PIX_THRESHOLD = MarlinProperties.getPathSimplifierPixelTolerance();
+
+ private static final double SQUARE_TOLERANCE = PIX_THRESHOLD * PIX_THRESHOLD;
+
+ // members:
+ private DPathConsumer2D delegate;
+ private double cx, cy;
+
+ DPathSimplifier() {
+ }
+
+ DPathSimplifier init(final DPathConsumer2D delegate) {
+ this.delegate = delegate;
+ return this; // fluent API
+ }
+
+ @Override
+ public void pathDone() {
+ delegate.pathDone();
+ }
+
+ @Override
+ public void closePath() {
+ delegate.closePath();
+ }
+
+ @Override
+ public long getNativeConsumer() {
+ return 0;
+ }
+
+ @Override
+ public void quadTo(final double x1, final double y1,
+ final double xe, final double ye)
+ {
+ // Test if curve is too small:
+ double dx = (xe - cx);
+ double dy = (ye - cy);
+
+ if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+ // check control points P1:
+ dx = (x1 - cx);
+ dy = (y1 - cy);
+
+ if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+ return;
+ }
+ }
+ delegate.quadTo(x1, y1, xe, ye);
+ // final end point:
+ cx = xe;
+ cy = ye;
+ }
+
+ @Override
+ public void curveTo(final double x1, final double y1,
+ final double x2, final double y2,
+ final double xe, final double ye)
+ {
+ // Test if curve is too small:
+ double dx = (xe - cx);
+ double dy = (ye - cy);
+
+ if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+ // check control points P1:
+ dx = (x1 - cx);
+ dy = (y1 - cy);
+
+ if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+ // check control points P2:
+ dx = (x2 - cx);
+ dy = (y2 - cy);
+
+ if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+ return;
+ }
+ }
+ }
+ delegate.curveTo(x1, y1, x2, y2, xe, ye);
+ // final end point:
+ cx = xe;
+ cy = ye;
+ }
+
+ @Override
+ public void moveTo(final double xe, final double ye) {
+ delegate.moveTo(xe, ye);
+ // starting point:
+ cx = xe;
+ cy = ye;
+ }
+
+ @Override
+ public void lineTo(final double xe, final double ye) {
+ // Test if segment is too small:
+ double dx = (xe - cx);
+ double dy = (ye - cy);
+
+ if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+ return;
+ }
+ delegate.lineTo(xe, ye);
+ // final end point:
+ cx = xe;
+ cy = ye;
+ }
+}
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/DRenderer.java b/src/java.desktop/share/classes/sun/java2d/marlin/DRenderer.java
index 14c26e02f69..564d935c895 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DRenderer.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DRenderer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -53,9 +53,9 @@ final class DRenderer implements DPathConsumer2D, MarlinRenderer {
private static final int SUBPIXEL_TILE
= TILE_H << SUBPIXEL_LG_POSITIONS_Y;
- // 2048 (pixelSize) pixels (height) x 8 subpixels = 64K
+ // 2176 pixels (height) x 8 subpixels = 68K
static final int INITIAL_BUCKET_ARRAY
- = INITIAL_PIXEL_DIM * SUBPIXEL_POSITIONS_Y;
+ = INITIAL_PIXEL_HEIGHT * SUBPIXEL_POSITIONS_Y;
// crossing capacity = edges count / 4 ~ 1024
static final int INITIAL_CROSSING_COUNT = INITIAL_EDGES_COUNT >> 2;
@@ -76,13 +76,17 @@ final class DRenderer implements DPathConsumer2D, MarlinRenderer {
// curve break into lines
// cubic error in subpixels to decrement step
private static final double CUB_DEC_ERR_SUBPIX
- = MarlinProperties.getCubicDecD2() * (NORM_SUBPIXELS / 8.0d); // 1 pixel
+ = MarlinProperties.getCubicDecD2() * (SUBPIXEL_POSITIONS_X / 8.0d); // 1.0 / 8th pixel
// cubic error in subpixels to increment step
private static final double CUB_INC_ERR_SUBPIX
- = MarlinProperties.getCubicIncD1() * (NORM_SUBPIXELS / 8.0d); // 0.4 pixel
+ = MarlinProperties.getCubicIncD1() * (SUBPIXEL_POSITIONS_X / 8.0d); // 0.4 / 8th pixel
+ // scale factor for Y-axis contribution to quad / cubic errors:
+ public static final double SCALE_DY = ((double) SUBPIXEL_POSITIONS_X) / SUBPIXEL_POSITIONS_Y;
// TestNonAARasterization (JDK-8170879): cubics
// bad paths (59294/100000 == 59,29%, 94335 bad pixels (avg = 1,59), 3966 warnings (avg = 0,07)
+// 2018
+ // 1.0 / 0.2: bad paths (67194/100000 == 67,19%, 117394 bad pixels (avg = 1,75 - max = 9), 4042 warnings (avg = 0,06)
// cubic bind length to decrement step
public static final double CUB_DEC_BND
@@ -109,10 +113,12 @@ final class DRenderer implements DPathConsumer2D, MarlinRenderer {
// quad break into lines
// quadratic error in subpixels
private static final double QUAD_DEC_ERR_SUBPIX
- = MarlinProperties.getQuadDecD2() * (NORM_SUBPIXELS / 8.0d); // 0.5 pixel
+ = MarlinProperties.getQuadDecD2() * (SUBPIXEL_POSITIONS_X / 8.0d); // 0.5 / 8th pixel
// TestNonAARasterization (JDK-8170879): quads
// bad paths (62916/100000 == 62,92%, 103818 bad pixels (avg = 1,65), 6514 warnings (avg = 0,10)
+// 2018
+ // 0.50px = bad paths (62915/100000 == 62,92%, 103810 bad pixels (avg = 1,65), 6512 warnings (avg = 0,10)
// quadratic bind length to decrement step
public static final double QUAD_DEC_BND
@@ -179,7 +185,7 @@ final class DRenderer implements DPathConsumer2D, MarlinRenderer {
int count = 1; // dt = 1 / count
// maximum(ddX|Y) = norm(dbx, dby) * dt^2 (= 1)
- double maxDD = Math.abs(c.dbx) + Math.abs(c.dby);
+ double maxDD = Math.abs(c.dbx) + Math.abs(c.dby) * SCALE_DY;
final double _DEC_BND = QUAD_DEC_BND;
@@ -193,7 +199,8 @@ final class DRenderer implements DPathConsumer2D, MarlinRenderer {
}
}
- int nL = 0; // line count
+ final int nL = count; // line count
+
if (count > 1) {
final double icount = 1.0d / count; // dt
final double icount2 = icount * icount; // dt^2
@@ -203,17 +210,12 @@ final class DRenderer implements DPathConsumer2D, MarlinRenderer {
double dx = c.bx * icount2 + c.cx * icount;
double dy = c.by * icount2 + c.cy * icount;
- double x1, y1;
-
- while (--count > 0) {
- x1 = x0 + dx;
- dx += ddx;
- y1 = y0 + dy;
- dy += ddy;
+ // we use x0, y0 to walk the line
+ for (double x1 = x0, y1 = y0; --count > 0; dx += ddx, dy += ddy) {
+ x1 += dx;
+ y1 += dy;
addLine(x0, y0, x1, y1);
-
- if (DO_STATS) { nL++; }
x0 = x1;
y0 = y1;
}
@@ -221,7 +223,7 @@ final class DRenderer implements DPathConsumer2D, MarlinRenderer {
addLine(x0, y0, x2, y2);
if (DO_STATS) {
- rdrCtx.stats.stat_rdr_quadBreak.add(nL + 1);
+ rdrCtx.stats.stat_rdr_quadBreak.add(nL);
}
}
@@ -234,7 +236,7 @@ final class DRenderer implements DPathConsumer2D, MarlinRenderer {
final DCurve c,
final double x3, final double y3)
{
- int count = CUB_COUNT;
+ int count = CUB_COUNT;
final double icount = CUB_INV_COUNT; // dt
final double icount2 = CUB_INV_COUNT_2; // dt^2
final double icount3 = CUB_INV_COUNT_3; // dt^3
@@ -249,34 +251,20 @@ final class DRenderer implements DPathConsumer2D, MarlinRenderer {
dx = c.ax * icount3 + c.bx * icount2 + c.cx * icount;
dy = c.ay * icount3 + c.by * icount2 + c.cy * icount;
- // we use x0, y0 to walk the line
- double x1 = x0, y1 = y0;
int nL = 0; // line count
final double _DEC_BND = CUB_DEC_BND;
final double _INC_BND = CUB_INC_BND;
+ final double _SCALE_DY = SCALE_DY;
- while (count > 0) {
- // divide step by half:
- while (Math.abs(ddx) + Math.abs(ddy) >= _DEC_BND) {
- dddx /= 8.0d;
- dddy /= 8.0d;
- ddx = ddx / 4.0d - dddx;
- ddy = ddy / 4.0d - dddy;
- dx = (dx - ddx) / 2.0d;
- dy = (dy - ddy) / 2.0d;
-
- count <<= 1;
- if (DO_STATS) {
- rdrCtx.stats.stat_rdr_curveBreak_dec.add(count);
- }
- }
+ // we use x0, y0 to walk the line
+ for (double x1 = x0, y1 = y0; count > 0; ) {
+ // inc / dec => ratio ~ 5 to minimize upscale / downscale but minimize edges
// double step:
// can only do this on even "count" values, because we must divide count by 2
- while (count % 2 == 0
- && Math.abs(dx) + Math.abs(dy) <= _INC_BND)
- {
+ while ((count % 2 == 0)
+ && ((Math.abs(ddx) + Math.abs(ddy) * _SCALE_DY) <= _INC_BND)) {
dx = 2.0d * dx + ddx;
dy = 2.0d * dy + ddy;
ddx = 4.0d * (ddx + dddx);
@@ -289,26 +277,40 @@ final class DRenderer implements DPathConsumer2D, MarlinRenderer {
rdrCtx.stats.stat_rdr_curveBreak_inc.add(count);
}
}
- if (--count > 0) {
- x1 += dx;
- dx += ddx;
- ddx += dddx;
- y1 += dy;
- dy += ddy;
- ddy += dddy;
- } else {
- x1 = x3;
- y1 = y3;
+
+ // divide step by half:
+ while ((Math.abs(ddx) + Math.abs(ddy) * _SCALE_DY) >= _DEC_BND) {
+ dddx /= 8.0d;
+ dddy /= 8.0d;
+ ddx = ddx / 4.0d - dddx;
+ ddy = ddy / 4.0d - dddy;
+ dx = (dx - ddx) / 2.0d;
+ dy = (dy - ddy) / 2.0d;
+
+ count <<= 1;
+ if (DO_STATS) {
+ rdrCtx.stats.stat_rdr_curveBreak_dec.add(count);
+ }
+ }
+ if (--count == 0) {
+ break;
}
- addLine(x0, y0, x1, y1);
+ x1 += dx;
+ y1 += dy;
+ dx += ddx;
+ dy += ddy;
+ ddx += dddx;
+ ddy += dddy;
- if (DO_STATS) { nL++; }
+ addLine(x0, y0, x1, y1);
x0 = x1;
y0 = y1;
}
+ addLine(x0, y0, x3, y3);
+
if (DO_STATS) {
- rdrCtx.stats.stat_rdr_curveBreak.add(nL);
+ rdrCtx.stats.stat_rdr_curveBreak.add(nL + 1);
}
}
@@ -533,8 +535,8 @@ final class DRenderer implements DPathConsumer2D, MarlinRenderer {
edgeBuckets = edgeBuckets_ref.initial;
edgeBucketCounts = edgeBucketCounts_ref.initial;
- // 2048 (pixelsize) pixel large
- alphaLine_ref = rdrCtx.newCleanIntArrayRef(INITIAL_AA_ARRAY); // 8K
+ // 4096 pixels large
+ alphaLine_ref = rdrCtx.newCleanIntArrayRef(INITIAL_AA_ARRAY); // 16K
alphaLine = alphaLine_ref.initial;
crossings_ref = rdrCtx.newDirtyIntArrayRef(INITIAL_CROSSING_COUNT); // 2K
@@ -692,8 +694,10 @@ final class DRenderer implements DPathConsumer2D, MarlinRenderer {
{
final double xe = tosubpixx(pix_x3);
final double ye = tosubpixy(pix_y3);
- curve.set(x0, y0, tosubpixx(pix_x1), tosubpixy(pix_y1),
- tosubpixx(pix_x2), tosubpixy(pix_y2), xe, ye);
+ curve.set(x0, y0,
+ tosubpixx(pix_x1), tosubpixy(pix_y1),
+ tosubpixx(pix_x2), tosubpixy(pix_y2),
+ xe, ye);
curveBreakIntoLinesAndAdd(x0, y0, curve, xe, ye);
x0 = xe;
y0 = ye;
@@ -705,7 +709,9 @@ final class DRenderer implements DPathConsumer2D, MarlinRenderer {
{
final double xe = tosubpixx(pix_x2);
final double ye = tosubpixy(pix_y2);
- curve.set(x0, y0, tosubpixx(pix_x1), tosubpixy(pix_y1), xe, ye);
+ curve.set(x0, y0,
+ tosubpixx(pix_x1), tosubpixy(pix_y1),
+ xe, ye);
quadBreakIntoLinesAndAdd(x0, y0, curve, xe, ye);
x0 = xe;
y0 = ye;
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/DRendererContext.java b/src/java.desktop/share/classes/sun/java2d/marlin/DRendererContext.java
index a144b9ba4d2..0af7bcff540 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DRendererContext.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DRendererContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -31,6 +31,8 @@ import java.util.concurrent.atomic.AtomicInteger;
import sun.java2d.ReentrantContext;
import sun.java2d.marlin.ArrayCacheConst.CacheStats;
import sun.java2d.marlin.DMarlinRenderingEngine.NormalizingPathIterator;
+import sun.java2d.marlin.DTransformingPathConsumer2D.CurveBasicMonotonizer;
+import sun.java2d.marlin.DTransformingPathConsumer2D.CurveClipSplitter;
/**
* This class is a renderer context dedicated to a single thread
@@ -70,6 +72,8 @@ final class DRendererContext extends ReentrantContext implements IRendererContex
final DStroker stroker;
// Simplifies out collinear lines
final DCollinearSimplifier simplifier = new DCollinearSimplifier();
+ // Simplifies path
+ final DPathSimplifier pathSimplifier = new DPathSimplifier();
final DDasher dasher;
final MarlinTileGenerator ptg;
final MarlinCache cache;
@@ -81,6 +85,10 @@ final class DRendererContext extends ReentrantContext implements IRendererContex
boolean closedPath = false;
// clip rectangle (ymin, ymax, xmin, xmax):
final double[] clipRect = new double[4];
+ // CurveBasicMonotonizer instance
+ final CurveBasicMonotonizer monotonizer;
+ // CurveClipSplitter instance
+ final CurveClipSplitter curveClipSplitter;
// Array caches:
/* clean int[] cache (zero-filled) = 5 refs */
@@ -124,6 +132,10 @@ final class DRendererContext extends ReentrantContext implements IRendererContex
nPCPathIterator = new NormalizingPathIterator.NearestPixelCenter(double6);
nPQPathIterator = new NormalizingPathIterator.NearestPixelQuarter(double6);
+ // curve monotonizer & clip subdivider (before transformerPC2D init)
+ monotonizer = new CurveBasicMonotonizer(this);
+ curveClipSplitter = new CurveClipSplitter(this);
+
// MarlinRenderingEngine.TransformingPathConsumer2D
transformerPC2D = new DTransformingPathConsumer2D(this);
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/DStroker.java b/src/java.desktop/share/classes/sun/java2d/marlin/DStroker.java
index bc66163fcb5..ddeadc8a97d 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DStroker.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DStroker.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -27,6 +27,8 @@ package sun.java2d.marlin;
import java.util.Arrays;
import sun.java2d.marlin.DHelpers.PolyStack;
+import sun.java2d.marlin.DTransformingPathConsumer2D.CurveBasicMonotonizer;
+import sun.java2d.marlin.DTransformingPathConsumer2D.CurveClipSplitter;
// TODO: some of the arithmetic here is too verbose and prone to hard to
// debug typos. We should consider making a small Point/Vector class that
@@ -37,10 +39,9 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
private static final int DRAWING_OP_TO = 1; // ie. curve, line, or quad
private static final int CLOSE = 2;
- // pisces used to use fixed point arithmetic with 16 decimal digits. I
- // didn't want to change the values of the constant below when I converted
- // it to floating point, so that's why the divisions by 2^16 are there.
- private static final double ROUND_JOIN_THRESHOLD = 1000.0d/65536.0d;
+ // round join threshold = 1 subpixel
+ private static final double ERR_JOIN = (1.0f / MIN_SUBPIXELS);
+ private static final double ROUND_JOIN_THRESHOLD = ERR_JOIN * ERR_JOIN;
// kappa = (4/3) * (SQRT(2) - 1)
private static final double C = (4.0d * (Math.sqrt(2.0d) - 1.0d) / 3.0d);
@@ -48,8 +49,6 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
// SQRT(2)
private static final double SQRT_2 = Math.sqrt(2.0d);
- private static final int MAX_N_CURVES = 11;
-
private DPathConsumer2D out;
private int capStyle;
@@ -80,12 +79,8 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
private final PolyStack reverse;
- // This is where the curve to be processed is put. We give it
- // enough room to store all curves.
- private final double[] middle = new double[MAX_N_CURVES * 6 + 2];
private final double[] lp = new double[8];
private final double[] rp = new double[8];
- private final double[] subdivTs = new double[MAX_N_CURVES - 1];
// per-thread renderer context
final DRendererContext rdrCtx;
@@ -106,6 +101,11 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
private boolean opened = false;
// flag indicating if the starting point's cap is done
private boolean capStart = false;
+ // flag indicating to monotonize curves
+ private boolean monotonize;
+
+ private boolean subdivide = false;
+ private final CurveClipSplitter curveSplitter;
/**
* Constructs a DStroker.
@@ -124,6 +124,7 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
: new PolyStack(rdrCtx);
this.curve = rdrCtx.curve;
+ this.curveSplitter = rdrCtx.curveClipSplitter;
}
/**
@@ -139,6 +140,7 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
* JOIN_BEVEL.
* @param miterLimit the desired miter limit
* @param scale scaling factor applied to clip boundaries
+ * @param subdivideCurves true to indicate to subdivide curves, false if dasher does
* @return this instance
*/
DStroker init(final DPathConsumer2D pc2d,
@@ -146,12 +148,15 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
final int capStyle,
final int joinStyle,
final double miterLimit,
- final double scale)
+ final double scale,
+ final boolean subdivideCurves)
{
this.out = pc2d;
this.lineWidth2 = lineWidth / 2.0d;
this.invHalfLineWidth2Sq = 1.0d / (2.0d * lineWidth2 * lineWidth2);
+ this.monotonize = subdivideCurves;
+
this.capStyle = capStyle;
this.joinStyle = joinStyle;
@@ -189,6 +194,15 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
_clipRect[2] -= margin - rdrOffX;
_clipRect[3] += margin + rdrOffX;
this.clipRect = _clipRect;
+
+ // initialize curve splitter here for stroker & dasher:
+ if (DO_CLIP_SUBDIVIDER) {
+ subdivide = subdivideCurves;
+ // adjust padded clip rectangle:
+ curveSplitter.init();
+ } else {
+ subdivide = false;
+ }
} else {
this.clipRect = null;
this.cOutCode = 0;
@@ -197,6 +211,12 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
return this; // fluent API
}
+ void disableClipping() {
+ this.clipRect = null;
+ this.cOutCode = 0;
+ this.sOutCode = 0;
+ }
+
/**
* Disposes this stroker:
* clean up before reusing this instance
@@ -213,10 +233,8 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
Arrays.fill(offset1, 0.0d);
Arrays.fill(offset2, 0.0d);
Arrays.fill(miter, 0.0d);
- Arrays.fill(middle, 0.0d);
Arrays.fill(lp, 0.0d);
Arrays.fill(rp, 0.0d);
- Arrays.fill(subdivTs, 0.0d);
}
}
@@ -248,19 +266,20 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
return dx1 * dy2 <= dy1 * dx2;
}
- private void drawRoundJoin(double x, double y,
- double omx, double omy, double mx, double my,
- boolean rev,
- double threshold)
+ private void mayDrawRoundJoin(double cx, double cy,
+ double omx, double omy,
+ double mx, double my,
+ boolean rev)
{
if ((omx == 0.0d && omy == 0.0d) || (mx == 0.0d && my == 0.0d)) {
return;
}
- double domx = omx - mx;
- double domy = omy - my;
- double len = domx*domx + domy*domy;
- if (len < threshold) {
+ final double domx = omx - mx;
+ final double domy = omy - my;
+ final double lenSq = domx*domx + domy*domy;
+
+ if (lenSq < ROUND_JOIN_THRESHOLD) {
return;
}
@@ -270,7 +289,7 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
mx = -mx;
my = -my;
}
- drawRoundJoin(x, y, omx, omy, mx, my, rev);
+ drawRoundJoin(cx, cy, omx, omy, mx, my, rev);
}
private void drawRoundJoin(double cx, double cy,
@@ -381,7 +400,7 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
final double x1, final double y1,
final double x0p, final double y0p,
final double x1p, final double y1p,
- final double[] m, int off)
+ final double[] m)
{
double x10 = x1 - x0;
double y10 = y1 - y0;
@@ -400,8 +419,8 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
double den = x10*y10p - x10p*y10;
double t = x10p*(y0-y0p) - y10p*(x0-x0p);
t /= den;
- m[off++] = x0 + t*x10;
- m[off] = y0 + t*y10;
+ m[0] = x0 + t*x10;
+ m[1] = y0 + t*y10;
}
// Return the intersection point of the lines (x0, y0) -> (x1, y1)
@@ -410,7 +429,7 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
final double x1, final double y1,
final double x0p, final double y0p,
final double x1p, final double y1p,
- final double[] m, int off)
+ final double[] m)
{
double x10 = x1 - x0;
double y10 = y1 - y0;
@@ -428,20 +447,21 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
// immediately).
double den = x10*y10p - x10p*y10;
if (den == 0.0d) {
- m[off++] = (x0 + x0p) / 2.0d;
- m[off] = (y0 + y0p) / 2.0d;
- return;
+ m[2] = (x0 + x0p) / 2.0d;
+ m[3] = (y0 + y0p) / 2.0d;
+ } else {
+ double t = x10p*(y0-y0p) - y10p*(x0-x0p);
+ t /= den;
+ m[2] = x0 + t*x10;
+ m[3] = y0 + t*y10;
}
- double t = x10p*(y0-y0p) - y10p*(x0-x0p);
- t /= den;
- m[off++] = x0 + t*x10;
- m[off] = y0 + t*y10;
}
private void drawMiter(final double pdx, final double pdy,
final double x0, final double y0,
final double dx, final double dy,
- double omx, double omy, double mx, double my,
+ double omx, double omy,
+ double mx, double my,
boolean rev)
{
if ((mx == omx && my == omy) ||
@@ -459,8 +479,7 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
}
computeMiter((x0 - pdx) + omx, (y0 - pdy) + omy, x0 + omx, y0 + omy,
- (dx + x0) + mx, (dy + y0) + my, x0 + mx, y0 + my,
- miter, 0);
+ (dx + x0) + mx, (dy + y0) + my, x0 + mx, y0 + my, miter);
final double miterX = miter[0];
final double miterY = miter[1];
@@ -478,7 +497,7 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
@Override
public void moveTo(final double x0, final double y0) {
- moveTo(x0, y0, cOutCode);
+ _moveTo(x0, y0, cOutCode);
// update starting point:
this.sx0 = x0;
this.sy0 = y0;
@@ -494,7 +513,7 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
}
}
- private void moveTo(final double x0, final double y0,
+ private void _moveTo(final double x0, final double y0,
final int outcode)
{
if (prev == MOVE_TO) {
@@ -521,16 +540,40 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
final boolean force)
{
final int outcode0 = this.cOutCode;
+
if (!force && clipRect != null) {
final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
- this.cOutCode = outcode1;
- // basic rejection criteria
- if ((outcode0 & outcode1) != 0) {
- moveTo(x1, y1, outcode0);
- opened = true;
- return;
+ // Should clip
+ final int orCode = (outcode0 | outcode1);
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1;
+
+ // basic rejection criteria:
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => callback with subdivided parts:
+ boolean ret = curveSplitter.splitLine(cx0, cy0, x1, y1,
+ orCode, this);
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode1;
+ _moveTo(x1, y1, outcode0);
+ opened = true;
+ return;
+ }
}
+
+ this.cOutCode = outcode1;
}
double dx = x1 - cx0;
@@ -752,10 +795,7 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
if (joinStyle == JOIN_MITER) {
drawMiter(pdx, pdy, x0, y0, dx, dy, omx, omy, mx, my, cw);
} else if (joinStyle == JOIN_ROUND) {
- drawRoundJoin(x0, y0,
- omx, omy,
- mx, my, cw,
- ROUND_JOIN_THRESHOLD);
+ mayDrawRoundJoin(x0, y0, omx, omy, mx, my, cw);
}
}
emitLineTo(x0, y0, !cw);
@@ -765,18 +805,19 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
private static boolean within(final double x1, final double y1,
final double x2, final double y2,
- final double ERR)
+ final double err)
{
- assert ERR > 0 : "";
+ assert err > 0 : "";
// compare taxicab distance. ERR will always be small, so using
// true distance won't give much benefit
- return (DHelpers.within(x1, x2, ERR) && // we want to avoid calling Math.abs
- DHelpers.within(y1, y2, ERR)); // this is just as good.
+ return (DHelpers.within(x1, x2, err) && // we want to avoid calling Math.abs
+ DHelpers.within(y1, y2, err)); // this is just as good.
}
- private void getLineOffsets(double x1, double y1,
- double x2, double y2,
- double[] left, double[] right) {
+ private void getLineOffsets(final double x1, final double y1,
+ final double x2, final double y2,
+ final double[] left, final double[] right)
+ {
computeOffset(x2 - x1, y2 - y1, lineWidth2, offset0);
final double mx = offset0[0];
final double my = offset0[1];
@@ -784,14 +825,16 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
left[1] = y1 + my;
left[2] = x2 + mx;
left[3] = y2 + my;
+
right[0] = x1 - mx;
right[1] = y1 - my;
right[2] = x2 - mx;
right[3] = y2 - my;
}
- private int computeOffsetCubic(double[] pts, final int off,
- double[] leftOff, double[] rightOff)
+ private int computeOffsetCubic(final double[] pts, final int off,
+ final double[] leftOff,
+ final double[] rightOff)
{
// if p1=p2 or p3=p4 it means that the derivative at the endpoint
// vanishes, which creates problems with computeOffset. Usually
@@ -800,7 +843,7 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
// the input curve at the cusp, and passes it to this function.
// because of inaccuracies in the splitting, we consider points
// equal if they're very close to each other.
- final double x1 = pts[off + 0], y1 = pts[off + 1];
+ final double x1 = pts[off ], y1 = pts[off + 1];
final double x2 = pts[off + 2], y2 = pts[off + 3];
final double x3 = pts[off + 4], y3 = pts[off + 5];
final double x4 = pts[off + 6], y4 = pts[off + 7];
@@ -814,6 +857,7 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
// in which case ignore if p1 == p2
final boolean p1eqp2 = within(x1, y1, x2, y2, 6.0d * Math.ulp(y2));
final boolean p3eqp4 = within(x3, y3, x4, y4, 6.0d * Math.ulp(y4));
+
if (p1eqp2 && p3eqp4) {
getLineOffsets(x1, y1, x4, y4, leftOff, rightOff);
return 4;
@@ -829,6 +873,7 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
double dotsq = (dx1 * dx4 + dy1 * dy4);
dotsq *= dotsq;
double l1sq = dx1 * dx1 + dy1 * dy1, l4sq = dx4 * dx4 + dy4 * dy4;
+
if (DHelpers.within(dotsq, l1sq * l4sq, 4.0d * Math.ulp(dotsq))) {
getLineOffsets(x1, y1, x4, y4, leftOff, rightOff);
return 4;
@@ -942,10 +987,11 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
// compute offset curves using bezier spline through t=0.5 (i.e.
// ComputedCurve(0.5) == IdealParallelCurve(0.5))
// return the kind of curve in the right and left arrays.
- private int computeOffsetQuad(double[] pts, final int off,
- double[] leftOff, double[] rightOff)
+ private int computeOffsetQuad(final double[] pts, final int off,
+ final double[] leftOff,
+ final double[] rightOff)
{
- final double x1 = pts[off + 0], y1 = pts[off + 1];
+ final double x1 = pts[off ], y1 = pts[off + 1];
final double x2 = pts[off + 2], y2 = pts[off + 3];
final double x3 = pts[off + 4], y3 = pts[off + 5];
@@ -966,6 +1012,7 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
// in which case ignore.
final boolean p1eqp2 = within(x1, y1, x2, y2, 6.0d * Math.ulp(y2));
final boolean p2eqp3 = within(x2, y2, x3, y3, 6.0d * Math.ulp(y3));
+
if (p1eqp2 || p2eqp3) {
getLineOffsets(x1, y1, x3, y3, leftOff, rightOff);
return 4;
@@ -975,6 +1022,7 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
double dotsq = (dx1 * dx3 + dy1 * dy3);
dotsq *= dotsq;
double l1sq = dx1 * dx1 + dy1 * dy1, l3sq = dx3 * dx3 + dy3 * dy3;
+
if (DHelpers.within(dotsq, l1sq * l3sq, 4.0d * Math.ulp(dotsq))) {
getLineOffsets(x1, y1, x3, y3, leftOff, rightOff);
return 4;
@@ -990,151 +1038,111 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
double y1p = y1 + offset0[1]; // point
double x3p = x3 + offset1[0]; // end
double y3p = y3 + offset1[1]; // point
- safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, leftOff, 2);
+ safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, leftOff);
leftOff[0] = x1p; leftOff[1] = y1p;
leftOff[4] = x3p; leftOff[5] = y3p;
x1p = x1 - offset0[0]; y1p = y1 - offset0[1];
x3p = x3 - offset1[0]; y3p = y3 - offset1[1];
- safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, rightOff, 2);
+ safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, rightOff);
rightOff[0] = x1p; rightOff[1] = y1p;
rightOff[4] = x3p; rightOff[5] = y3p;
return 6;
}
- // finds values of t where the curve in pts should be subdivided in order
- // to get good offset curves a distance of w away from the middle curve.
- // Stores the points in ts, and returns how many of them there were.
- private static int findSubdivPoints(final DCurve c, double[] pts, double[] ts,
- final int type, final double w)
- {
- final double x12 = pts[2] - pts[0];
- final double y12 = pts[3] - pts[1];
- // if the curve is already parallel to either axis we gain nothing
- // from rotating it.
- if (y12 != 0.0d && x12 != 0.0d) {
- // we rotate it so that the first vector in the control polygon is
- // parallel to the x-axis. This will ensure that rotated quarter
- // circles won't be subdivided.
- final double hypot = Math.sqrt(x12 * x12 + y12 * y12);
- final double cos = x12 / hypot;
- final double sin = y12 / hypot;
- final double x1 = cos * pts[0] + sin * pts[1];
- final double y1 = cos * pts[1] - sin * pts[0];
- final double x2 = cos * pts[2] + sin * pts[3];
- final double y2 = cos * pts[3] - sin * pts[2];
- final double x3 = cos * pts[4] + sin * pts[5];
- final double y3 = cos * pts[5] - sin * pts[4];
-
- switch(type) {
- case 8:
- final double x4 = cos * pts[6] + sin * pts[7];
- final double y4 = cos * pts[7] - sin * pts[6];
- c.set(x1, y1, x2, y2, x3, y3, x4, y4);
- break;
- case 6:
- c.set(x1, y1, x2, y2, x3, y3);
- break;
- default:
- }
- } else {
- c.set(pts, type);
- }
-
- int ret = 0;
- // we subdivide at values of t such that the remaining rotated
- // curves are monotonic in x and y.
- ret += c.dxRoots(ts, ret);
- ret += c.dyRoots(ts, ret);
- // subdivide at inflection points.
- if (type == 8) {
- // quadratic curves can't have inflection points
- ret += c.infPoints(ts, ret);
- }
-
- // now we must subdivide at points where one of the offset curves will have
- // a cusp. This happens at ts where the radius of curvature is equal to w.
- ret += c.rootsOfROCMinusW(ts, ret, w, 0.0001d);
-
- ret = DHelpers.filterOutNotInAB(ts, 0, ret, 0.0001d, 0.9999d);
- DHelpers.isort(ts, 0, ret);
- return ret;
- }
-
@Override
public void curveTo(final double x1, final double y1,
final double x2, final double y2,
final double x3, final double y3)
{
final int outcode0 = this.cOutCode;
+
if (clipRect != null) {
+ final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
+ final int outcode2 = DHelpers.outcode(x2, y2, clipRect);
final int outcode3 = DHelpers.outcode(x3, y3, clipRect);
- this.cOutCode = outcode3;
- if ((outcode0 & outcode3) != 0) {
- final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
- final int outcode2 = DHelpers.outcode(x2, y2, clipRect);
+ // Should clip
+ final int orCode = (outcode0 | outcode1 | outcode2 | outcode3);
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1 & outcode2 & outcode3;
- // basic rejection criteria
- if ((outcode0 & outcode1 & outcode2 & outcode3) != 0) {
- moveTo(x3, y3, outcode0);
+ // basic rejection criteria:
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => callback with subdivided parts:
+ boolean ret = curveSplitter.splitCurve(cx0, cy0, x1, y1,
+ x2, y2, x3, y3,
+ orCode, this);
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode3;
+ _moveTo(x3, y3, outcode0);
opened = true;
return;
}
}
+
+ this.cOutCode = outcode3;
}
+ _curveTo(x1, y1, x2, y2, x3, y3, outcode0);
+ }
- final double[] mid = middle;
-
- mid[0] = cx0; mid[1] = cy0;
- mid[2] = x1; mid[3] = y1;
- mid[4] = x2; mid[5] = y2;
- mid[6] = x3; mid[7] = y3;
-
+ private void _curveTo(final double x1, final double y1,
+ final double x2, final double y2,
+ final double x3, final double y3,
+ final int outcode0)
+ {
// need these so we can update the state at the end of this method
- final double xf = x3, yf = y3;
- double dxs = mid[2] - mid[0];
- double dys = mid[3] - mid[1];
- double dxf = mid[6] - mid[4];
- double dyf = mid[7] - mid[5];
+ double dxs = x1 - cx0;
+ double dys = y1 - cy0;
+ double dxf = x3 - x2;
+ double dyf = y3 - y2;
- boolean p1eqp2 = (dxs == 0.0d && dys == 0.0d);
- boolean p3eqp4 = (dxf == 0.0d && dyf == 0.0d);
- if (p1eqp2) {
- dxs = mid[4] - mid[0];
- dys = mid[5] - mid[1];
- if (dxs == 0.0d && dys == 0.0d) {
- dxs = mid[6] - mid[0];
- dys = mid[7] - mid[1];
+ if ((dxs == 0.0d) && (dys == 0.0d)) {
+ dxs = x2 - cx0;
+ dys = y2 - cy0;
+ if ((dxs == 0.0d) && (dys == 0.0d)) {
+ dxs = x3 - cx0;
+ dys = y3 - cy0;
}
}
- if (p3eqp4) {
- dxf = mid[6] - mid[2];
- dyf = mid[7] - mid[3];
- if (dxf == 0.0d && dyf == 0.0d) {
- dxf = mid[6] - mid[0];
- dyf = mid[7] - mid[1];
+ if ((dxf == 0.0d) && (dyf == 0.0d)) {
+ dxf = x3 - x1;
+ dyf = y3 - y1;
+ if ((dxf == 0.0d) && (dyf == 0.0d)) {
+ dxf = x3 - cx0;
+ dyf = y3 - cy0;
}
}
- if (dxs == 0.0d && dys == 0.0d) {
+ if ((dxs == 0.0d) && (dys == 0.0d)) {
// this happens if the "curve" is just a point
// fix outcode0 for lineTo() call:
if (clipRect != null) {
this.cOutCode = outcode0;
}
- lineTo(mid[0], mid[1]);
+ lineTo(cx0, cy0);
return;
}
// if these vectors are too small, normalize them, to avoid future
// precision problems.
if (Math.abs(dxs) < 0.1d && Math.abs(dys) < 0.1d) {
- double len = Math.sqrt(dxs*dxs + dys*dys);
+ final double len = Math.sqrt(dxs * dxs + dys * dys);
dxs /= len;
dys /= len;
}
if (Math.abs(dxf) < 0.1d && Math.abs(dyf) < 0.1d) {
- double len = Math.sqrt(dxf*dxf + dyf*dyf);
+ final double len = Math.sqrt(dxf * dxf + dyf * dyf);
dxf /= len;
dyf /= len;
}
@@ -1142,17 +1150,25 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
computeOffset(dxs, dys, lineWidth2, offset0);
drawJoin(cdx, cdy, cx0, cy0, dxs, dys, cmx, cmy, offset0[0], offset0[1], outcode0);
- final int nSplits = findSubdivPoints(curve, mid, subdivTs, 8, lineWidth2);
-
- double prevT = 0.0d;
- for (int i = 0, off = 0; i < nSplits; i++, off += 6) {
- final double t = subdivTs[i];
- DHelpers.subdivideCubicAt((t - prevT) / (1.0d - prevT),
- mid, off, mid, off, mid, off + 6);
- prevT = t;
- }
-
+ int nSplits = 0;
+ final double[] mid;
final double[] l = lp;
+
+ if (monotonize) {
+ // monotonize curve:
+ final CurveBasicMonotonizer monotonizer
+ = rdrCtx.monotonizer.curve(cx0, cy0, x1, y1, x2, y2, x3, y3);
+
+ nSplits = monotonizer.nbSplits;
+ mid = monotonizer.middle;
+ } else {
+ // use left instead:
+ mid = l;
+ mid[0] = cx0; mid[1] = cy0;
+ mid[2] = x1; mid[3] = y1;
+ mid[4] = x2; mid[5] = y2;
+ mid[6] = x3; mid[7] = y3;
+ }
final double[] r = rp;
int kind = 0;
@@ -1176,8 +1192,8 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
}
this.prev = DRAWING_OP_TO;
- this.cx0 = xf;
- this.cy0 = yf;
+ this.cx0 = x3;
+ this.cy0 = y3;
this.cdx = dxf;
this.cdy = dyf;
this.cmx = (l[kind - 2] - r[kind - 2]) / 2.0d;
@@ -1189,74 +1205,101 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
final double x2, final double y2)
{
final int outcode0 = this.cOutCode;
+
if (clipRect != null) {
+ final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
final int outcode2 = DHelpers.outcode(x2, y2, clipRect);
- this.cOutCode = outcode2;
- if ((outcode0 & outcode2) != 0) {
- final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
+ // Should clip
+ final int orCode = (outcode0 | outcode1 | outcode2);
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1 & outcode2;
- // basic rejection criteria
- if ((outcode0 & outcode1 & outcode2) != 0) {
- moveTo(x2, y2, outcode0);
+ // basic rejection criteria:
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => call lineTo() with subdivided curves:
+ boolean ret = curveSplitter.splitQuad(cx0, cy0, x1, y1,
+ x2, y2, orCode, this);
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode2;
+ _moveTo(x2, y2, outcode0);
opened = true;
return;
}
}
+
+ this.cOutCode = outcode2;
}
+ _quadTo(x1, y1, x2, y2, outcode0);
+ }
- final double[] mid = middle;
-
- mid[0] = cx0; mid[1] = cy0;
- mid[2] = x1; mid[3] = y1;
- mid[4] = x2; mid[5] = y2;
-
+ private void _quadTo(final double x1, final double y1,
+ final double x2, final double y2,
+ final int outcode0)
+ {
// need these so we can update the state at the end of this method
- final double xf = x2, yf = y2;
- double dxs = mid[2] - mid[0];
- double dys = mid[3] - mid[1];
- double dxf = mid[4] - mid[2];
- double dyf = mid[5] - mid[3];
- if ((dxs == 0.0d && dys == 0.0d) || (dxf == 0.0d && dyf == 0.0d)) {
- dxs = dxf = mid[4] - mid[0];
- dys = dyf = mid[5] - mid[1];
+ double dxs = x1 - cx0;
+ double dys = y1 - cy0;
+ double dxf = x2 - x1;
+ double dyf = y2 - y1;
+
+ if (((dxs == 0.0d) && (dys == 0.0d)) || ((dxf == 0.0d) && (dyf == 0.0d))) {
+ dxs = dxf = x2 - cx0;
+ dys = dyf = y2 - cy0;
}
- if (dxs == 0.0d && dys == 0.0d) {
+ if ((dxs == 0.0d) && (dys == 0.0d)) {
// this happens if the "curve" is just a point
// fix outcode0 for lineTo() call:
if (clipRect != null) {
this.cOutCode = outcode0;
}
- lineTo(mid[0], mid[1]);
+ lineTo(cx0, cy0);
return;
}
// if these vectors are too small, normalize them, to avoid future
// precision problems.
if (Math.abs(dxs) < 0.1d && Math.abs(dys) < 0.1d) {
- double len = Math.sqrt(dxs*dxs + dys*dys);
+ final double len = Math.sqrt(dxs * dxs + dys * dys);
dxs /= len;
dys /= len;
}
if (Math.abs(dxf) < 0.1d && Math.abs(dyf) < 0.1d) {
- double len = Math.sqrt(dxf*dxf + dyf*dyf);
+ final double len = Math.sqrt(dxf * dxf + dyf * dyf);
dxf /= len;
dyf /= len;
}
-
computeOffset(dxs, dys, lineWidth2, offset0);
drawJoin(cdx, cdy, cx0, cy0, dxs, dys, cmx, cmy, offset0[0], offset0[1], outcode0);
- int nSplits = findSubdivPoints(curve, mid, subdivTs, 6, lineWidth2);
-
- double prevt = 0.0d;
- for (int i = 0, off = 0; i < nSplits; i++, off += 4) {
- final double t = subdivTs[i];
- DHelpers.subdivideQuadAt((t - prevt) / (1.0d - prevt),
- mid, off, mid, off, mid, off + 4);
- prevt = t;
- }
-
+ int nSplits = 0;
+ final double[] mid;
final double[] l = lp;
+
+ if (monotonize) {
+ // monotonize quad:
+ final CurveBasicMonotonizer monotonizer
+ = rdrCtx.monotonizer.quad(cx0, cy0, x1, y1, x2, y2);
+
+ nSplits = monotonizer.nbSplits;
+ mid = monotonizer.middle;
+ } else {
+ // use left instead:
+ mid = l;
+ mid[0] = cx0; mid[1] = cy0;
+ mid[2] = x1; mid[3] = y1;
+ mid[4] = x2; mid[5] = y2;
+ }
final double[] r = rp;
int kind = 0;
@@ -1280,8 +1323,8 @@ final class DStroker implements DPathConsumer2D, MarlinConst {
}
this.prev = DRAWING_OP_TO;
- this.cx0 = xf;
- this.cy0 = yf;
+ this.cx0 = x2;
+ this.cy0 = y2;
this.cdx = dxf;
this.cdy = dyf;
this.cmx = (l[kind - 2] - r[kind - 2]) / 2.0d;
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/DTransformingPathConsumer2D.java b/src/java.desktop/share/classes/sun/java2d/marlin/DTransformingPathConsumer2D.java
index d43c8d652a4..12d9bd4b64d 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DTransformingPathConsumer2D.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DTransformingPathConsumer2D.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -27,11 +27,15 @@ package sun.java2d.marlin;
import java.awt.geom.AffineTransform;
import java.awt.geom.Path2D;
+import java.util.Arrays;
import sun.java2d.marlin.DHelpers.IndexStack;
import sun.java2d.marlin.DHelpers.PolyStack;
final class DTransformingPathConsumer2D {
+ // smaller uncertainty in double variant
+ static final double CLIP_RECT_PADDING = 0.25d;
+
private final DRendererContext rdrCtx;
// recycled ClosedPathDetector instance from detectClosedPath()
@@ -56,6 +60,7 @@ final class DTransformingPathConsumer2D {
private final PathTracer tracerCPDetector = new PathTracer("ClosedPathDetector");
private final PathTracer tracerFiller = new PathTracer("Filler");
private final PathTracer tracerStroker = new PathTracer("Stroker");
+ private final PathTracer tracerDasher = new PathTracer("Dasher");
DTransformingPathConsumer2D(final DRendererContext rdrCtx) {
// used by RendererContext
@@ -84,6 +89,10 @@ final class DTransformingPathConsumer2D {
return tracerStroker.init(out);
}
+ DPathConsumer2D traceDasher(DPathConsumer2D out) {
+ return tracerDasher.init(out);
+ }
+
DPathConsumer2D detectClosedPath(DPathConsumer2D out) {
return cpDetector.init(out);
}
@@ -499,11 +508,19 @@ final class DTransformingPathConsumer2D {
private boolean outside = false;
- // The current point OUTSIDE
+ // The current point (TODO stupid repeated info)
private double cx0, cy0;
+ // The current point OUTSIDE
+ private double cox0, coy0;
+
+ private boolean subdivide = MarlinConst.DO_CLIP_SUBDIVIDER;
+ private final CurveClipSplitter curveSplitter;
+
PathClipFilter(final DRendererContext rdrCtx) {
this.clipRect = rdrCtx.clipRect;
+ this.curveSplitter = rdrCtx.curveClipSplitter;
+
this.stack = (rdrCtx.stats != null) ?
new IndexStack(rdrCtx,
rdrCtx.stats.stat_pcf_idxstack_indices,
@@ -528,6 +545,11 @@ final class DTransformingPathConsumer2D {
_clipRect[2] -= margin - rdrOffX;
_clipRect[3] += margin + rdrOffX;
+ if (MarlinConst.DO_CLIP_SUBDIVIDER) {
+ // adjust padded clip rectangle:
+ curveSplitter.init();
+ }
+
this.init_corners = true;
this.gOutCode = MarlinConst.OUTCODE_MASK_T_B_L_R;
@@ -578,7 +600,9 @@ final class DTransformingPathConsumer2D {
}
stack.pullAll(corners, out);
}
- out.lineTo(cx0, cy0);
+ out.lineTo(cox0, coy0);
+ this.cx0 = cox0;
+ this.cy0 = coy0;
}
@Override
@@ -603,38 +627,68 @@ final class DTransformingPathConsumer2D {
public void moveTo(final double x0, final double y0) {
finishPath();
- final int outcode = DHelpers.outcode(x0, y0, clipRect);
- this.cOutCode = outcode;
+ this.cOutCode = DHelpers.outcode(x0, y0, clipRect);
this.outside = false;
out.moveTo(x0, y0);
+ this.cx0 = x0;
+ this.cy0 = y0;
}
@Override
public void lineTo(final double xe, final double ye) {
final int outcode0 = this.cOutCode;
final int outcode1 = DHelpers.outcode(xe, ye, clipRect);
- this.cOutCode = outcode1;
- final int sideCode = (outcode0 & outcode1);
+ // Should clip
+ final int orCode = (outcode0 | outcode1);
+ if (orCode != 0) {
+ final int sideCode = (outcode0 & outcode1);
- // basic rejection criteria:
- if (sideCode == 0) {
- this.gOutCode = 0;
- } else {
- this.gOutCode &= sideCode;
- // keep last point coordinate before entering the clip again:
- this.outside = true;
- this.cx0 = xe;
- this.cy0 = ye;
+ // basic rejection criteria:
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ boolean ret;
+ // subdivide curve => callback with subdivided parts:
+ if (outside) {
+ ret = curveSplitter.splitLine(cox0, coy0, xe, ye,
+ orCode, this);
+ } else {
+ ret = curveSplitter.splitLine(cx0, cy0, xe, ye,
+ orCode, this);
+ }
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode1;
+ this.gOutCode &= sideCode;
+ // keep last point coordinate before entering the clip again:
+ this.outside = true;
+ this.cox0 = xe;
+ this.coy0 = ye;
- clip(sideCode, outcode0, outcode1);
- return;
+ clip(sideCode, outcode0, outcode1);
+ return;
+ }
}
+
+ this.cOutCode = outcode1;
+ this.gOutCode = 0;
+
if (outside) {
finish();
}
// clipping disabled:
out.lineTo(xe, ye);
+ this.cx0 = xe;
+ this.cy0 = ye;
}
private void clip(final int sideCode,
@@ -654,22 +708,18 @@ final class DTransformingPathConsumer2D {
// add corners to outside stack:
switch (tbCode) {
case MarlinConst.OUTCODE_TOP:
-// System.out.println("TOP "+ ((off == 0) ? "LEFT" : "RIGHT"));
stack.push(off); // top
return;
case MarlinConst.OUTCODE_BOTTOM:
-// System.out.println("BOTTOM "+ ((off == 0) ? "LEFT" : "RIGHT"));
stack.push(off + 1); // bottom
return;
default:
// both TOP / BOTTOM:
if ((outcode0 & MarlinConst.OUTCODE_TOP) != 0) {
-// System.out.println("TOP + BOTTOM "+ ((off == 0) ? "LEFT" : "RIGHT"));
// top to bottom
stack.push(off); // top
stack.push(off + 1); // bottom
} else {
-// System.out.println("BOTTOM + TOP "+ ((off == 0) ? "LEFT" : "RIGHT"));
// bottom to top
stack.push(off + 1); // bottom
stack.push(off); // top
@@ -684,34 +734,62 @@ final class DTransformingPathConsumer2D {
final double xe, final double ye)
{
final int outcode0 = this.cOutCode;
+ final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
+ final int outcode2 = DHelpers.outcode(x2, y2, clipRect);
final int outcode3 = DHelpers.outcode(xe, ye, clipRect);
- this.cOutCode = outcode3;
- int sideCode = outcode0 & outcode3;
-
- if (sideCode == 0) {
- this.gOutCode = 0;
- } else {
- sideCode &= DHelpers.outcode(x1, y1, clipRect);
- sideCode &= DHelpers.outcode(x2, y2, clipRect);
- this.gOutCode &= sideCode;
+ // Should clip
+ final int orCode = (outcode0 | outcode1 | outcode2 | outcode3);
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1 & outcode2 & outcode3;
// basic rejection criteria:
- if (sideCode != 0) {
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => callback with subdivided parts:
+ boolean ret;
+ if (outside) {
+ ret = curveSplitter.splitCurve(cox0, coy0, x1, y1,
+ x2, y2, xe, ye,
+ orCode, this);
+ } else {
+ ret = curveSplitter.splitCurve(cx0, cy0, x1, y1,
+ x2, y2, xe, ye,
+ orCode, this);
+ }
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode3;
+ this.gOutCode &= sideCode;
// keep last point coordinate before entering the clip again:
this.outside = true;
- this.cx0 = xe;
- this.cy0 = ye;
+ this.cox0 = xe;
+ this.coy0 = ye;
clip(sideCode, outcode0, outcode3);
return;
}
}
+
+ this.cOutCode = outcode3;
+ this.gOutCode = 0;
+
if (outside) {
finish();
}
// clipping disabled:
out.curveTo(x1, y1, x2, y2, xe, ye);
+ this.cx0 = xe;
+ this.cy0 = ye;
}
@Override
@@ -719,33 +797,59 @@ final class DTransformingPathConsumer2D {
final double xe, final double ye)
{
final int outcode0 = this.cOutCode;
+ final int outcode1 = DHelpers.outcode(x1, y1, clipRect);
final int outcode2 = DHelpers.outcode(xe, ye, clipRect);
- this.cOutCode = outcode2;
- int sideCode = outcode0 & outcode2;
-
- if (sideCode == 0) {
- this.gOutCode = 0;
- } else {
- sideCode &= DHelpers.outcode(x1, y1, clipRect);
- this.gOutCode &= sideCode;
+ // Should clip
+ final int orCode = (outcode0 | outcode1 | outcode2);
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1 & outcode2;
// basic rejection criteria:
- if (sideCode != 0) {
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => callback with subdivided parts:
+ boolean ret;
+ if (outside) {
+ ret = curveSplitter.splitQuad(cox0, coy0, x1, y1,
+ xe, ye, orCode, this);
+ } else {
+ ret = curveSplitter.splitQuad(cx0, cy0, x1, y1,
+ xe, ye, orCode, this);
+ }
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode2;
+ this.gOutCode &= sideCode;
// keep last point coordinate before entering the clip again:
this.outside = true;
- this.cx0 = xe;
- this.cy0 = ye;
+ this.cox0 = xe;
+ this.coy0 = ye;
clip(sideCode, outcode0, outcode2);
return;
}
}
+
+ this.cOutCode = outcode2;
+ this.gOutCode = 0;
+
if (outside) {
finish();
}
// clipping disabled:
out.quadTo(x1, y1, xe, ye);
+ this.cx0 = xe;
+ this.cy0 = ye;
}
@Override
@@ -754,6 +858,261 @@ final class DTransformingPathConsumer2D {
}
}
+ static final class CurveClipSplitter {
+
+ static final double LEN_TH = MarlinProperties.getSubdividerMinLength();
+ static final boolean DO_CHECK_LENGTH = (LEN_TH > 0.0d);
+
+ private static final boolean TRACE = false;
+
+ private static final int MAX_N_CURVES = 3 * 4;
+
+ // clip rectangle (ymin, ymax, xmin, xmax):
+ final double[] clipRect;
+
+ // clip rectangle (ymin, ymax, xmin, xmax) including padding:
+ final double[] clipRectPad = new double[4];
+ private boolean init_clipRectPad = false;
+
+ // This is where the curve to be processed is put. We give it
+ // enough room to store all curves.
+ final double[] middle = new double[MAX_N_CURVES * 8 + 2];
+ // t values at subdivision points
+ private final double[] subdivTs = new double[MAX_N_CURVES];
+
+ // dirty curve
+ private final DCurve curve;
+
+ CurveClipSplitter(final DRendererContext rdrCtx) {
+ this.clipRect = rdrCtx.clipRect;
+ this.curve = rdrCtx.curve;
+ }
+
+ void init() {
+ this.init_clipRectPad = true;
+ }
+
+ private void initPaddedClip() {
+ // bounds as half-open intervals: minX <= x < maxX and minY <= y < maxY
+ // adjust padded clip rectangle (ymin, ymax, xmin, xmax):
+ // add a rounding error (curve subdivision ~ 0.1px):
+ final double[] _clipRect = clipRect;
+ final double[] _clipRectPad = clipRectPad;
+
+ _clipRectPad[0] = _clipRect[0] - CLIP_RECT_PADDING;
+ _clipRectPad[1] = _clipRect[1] + CLIP_RECT_PADDING;
+ _clipRectPad[2] = _clipRect[2] - CLIP_RECT_PADDING;
+ _clipRectPad[3] = _clipRect[3] + CLIP_RECT_PADDING;
+
+ if (TRACE) {
+ MarlinUtils.logInfo("clip: X [" + _clipRectPad[2] + " .. " + _clipRectPad[3] +"] "
+ + "Y ["+ _clipRectPad[0] + " .. " + _clipRectPad[1] +"]");
+ }
+ }
+
+ boolean splitLine(final double x0, final double y0,
+ final double x1, final double y1,
+ final int outCodeOR,
+ final DPathConsumer2D out)
+ {
+ if (TRACE) {
+ MarlinUtils.logInfo("divLine P0(" + x0 + ", " + y0 + ") P1(" + x1 + ", " + y1 + ")");
+ }
+
+ if (DO_CHECK_LENGTH && DHelpers.fastLineLen(x0, y0, x1, y1) <= LEN_TH) {
+ return false;
+ }
+
+ final double[] mid = middle;
+ mid[0] = x0; mid[1] = y0;
+ mid[2] = x1; mid[3] = y1;
+
+ return subdivideAtIntersections(4, outCodeOR, out);
+ }
+
+ boolean splitQuad(final double x0, final double y0,
+ final double x1, final double y1,
+ final double x2, final double y2,
+ final int outCodeOR,
+ final DPathConsumer2D out)
+ {
+ if (TRACE) {
+ MarlinUtils.logInfo("divQuad P0(" + x0 + ", " + y0 + ") P1(" + x1 + ", " + y1 + ") P2(" + x2 + ", " + y2 + ")");
+ }
+
+ if (DO_CHECK_LENGTH && DHelpers.fastQuadLen(x0, y0, x1, y1, x2, y2) <= LEN_TH) {
+ return false;
+ }
+
+ final double[] mid = middle;
+ mid[0] = x0; mid[1] = y0;
+ mid[2] = x1; mid[3] = y1;
+ mid[4] = x2; mid[5] = y2;
+
+ return subdivideAtIntersections(6, outCodeOR, out);
+ }
+
+ boolean splitCurve(final double x0, final double y0,
+ final double x1, final double y1,
+ final double x2, final double y2,
+ final double x3, final double y3,
+ final int outCodeOR,
+ final DPathConsumer2D out)
+ {
+ if (TRACE) {
+ MarlinUtils.logInfo("divCurve P0(" + x0 + ", " + y0 + ") P1(" + x1 + ", " + y1 + ") P2(" + x2 + ", " + y2 + ") P3(" + x3 + ", " + y3 + ")");
+ }
+
+ if (DO_CHECK_LENGTH && DHelpers.fastCurvelen(x0, y0, x1, y1, x2, y2, x3, y3) <= LEN_TH) {
+ return false;
+ }
+
+ final double[] mid = middle;
+ mid[0] = x0; mid[1] = y0;
+ mid[2] = x1; mid[3] = y1;
+ mid[4] = x2; mid[5] = y2;
+ mid[6] = x3; mid[7] = y3;
+
+ return subdivideAtIntersections(8, outCodeOR, out);
+ }
+
+ private boolean subdivideAtIntersections(final int type, final int outCodeOR,
+ final DPathConsumer2D out)
+ {
+ final double[] mid = middle;
+ final double[] subTs = subdivTs;
+
+ if (init_clipRectPad) {
+ init_clipRectPad = false;
+ initPaddedClip();
+ }
+
+ final int nSplits = DHelpers.findClipPoints(curve, mid, subTs, type,
+ outCodeOR, clipRectPad);
+
+ if (TRACE) {
+ MarlinUtils.logInfo("nSplits: "+ nSplits);
+ MarlinUtils.logInfo("subTs: "+Arrays.toString(Arrays.copyOfRange(subTs, 0, nSplits)));
+ }
+ if (nSplits == 0) {
+ // only curve support shortcut
+ return false;
+ }
+ double prevT = 0.0d;
+
+ for (int i = 0, off = 0; i < nSplits; i++, off += type) {
+ final double t = subTs[i];
+
+ DHelpers.subdivideAt((t - prevT) / (1.0d - prevT),
+ mid, off, mid, off, type);
+ prevT = t;
+ }
+
+ for (int i = 0, off = 0; i <= nSplits; i++, off += type) {
+ if (TRACE) {
+ MarlinUtils.logInfo("Part Curve "+Arrays.toString(Arrays.copyOfRange(mid, off, off + type)));
+ }
+ emitCurrent(type, mid, off, out);
+ }
+ return true;
+ }
+
+ static void emitCurrent(final int type, final double[] pts,
+ final int off, final DPathConsumer2D out)
+ {
+ // if instead of switch (perf + most probable cases first)
+ if (type == 8) {
+ out.curveTo(pts[off + 2], pts[off + 3],
+ pts[off + 4], pts[off + 5],
+ pts[off + 6], pts[off + 7]);
+ } else if (type == 4) {
+ out.lineTo(pts[off + 2], pts[off + 3]);
+ } else {
+ out.quadTo(pts[off + 2], pts[off + 3],
+ pts[off + 4], pts[off + 5]);
+ }
+ }
+ }
+
+ static final class CurveBasicMonotonizer {
+
+ private static final int MAX_N_CURVES = 11;
+
+ // squared half line width (for stroker)
+ private double lw2;
+
+ // number of splitted curves
+ int nbSplits;
+
+ // This is where the curve to be processed is put. We give it
+ // enough room to store all curves.
+ final double[] middle = new double[MAX_N_CURVES * 6 + 2];
+ // t values at subdivision points
+ private final double[] subdivTs = new double[MAX_N_CURVES - 1];
+
+ // dirty curve
+ private final DCurve curve;
+
+ CurveBasicMonotonizer(final DRendererContext rdrCtx) {
+ this.curve = rdrCtx.curve;
+ }
+
+ void init(final double lineWidth) {
+ this.lw2 = (lineWidth * lineWidth) / 4.0d;
+ }
+
+ CurveBasicMonotonizer curve(final double x0, final double y0,
+ final double x1, final double y1,
+ final double x2, final double y2,
+ final double x3, final double y3)
+ {
+ final double[] mid = middle;
+ mid[0] = x0; mid[1] = y0;
+ mid[2] = x1; mid[3] = y1;
+ mid[4] = x2; mid[5] = y2;
+ mid[6] = x3; mid[7] = y3;
+
+ final double[] subTs = subdivTs;
+ final int nSplits = DHelpers.findSubdivPoints(curve, mid, subTs, 8, lw2);
+
+ double prevT = 0.0d;
+ for (int i = 0, off = 0; i < nSplits; i++, off += 6) {
+ final double t = subTs[i];
+
+ DHelpers.subdivideCubicAt((t - prevT) / (1.0d - prevT),
+ mid, off, mid, off, off + 6);
+ prevT = t;
+ }
+
+ this.nbSplits = nSplits;
+ return this;
+ }
+
+ CurveBasicMonotonizer quad(final double x0, final double y0,
+ final double x1, final double y1,
+ final double x2, final double y2)
+ {
+ final double[] mid = middle;
+ mid[0] = x0; mid[1] = y0;
+ mid[2] = x1; mid[3] = y1;
+ mid[4] = x2; mid[5] = y2;
+
+ final double[] subTs = subdivTs;
+ final int nSplits = DHelpers.findSubdivPoints(curve, mid, subTs, 6, lw2);
+
+ double prevt = 0.0d;
+ for (int i = 0, off = 0; i < nSplits; i++, off += 4) {
+ final double t = subTs[i];
+ DHelpers.subdivideQuadAt((t - prevt) / (1.0d - prevt),
+ mid, off, mid, off, off + 4);
+ prevt = t;
+ }
+
+ this.nbSplits = nSplits;
+ return this;
+ }
+ }
+
static final class PathTracer implements DPathConsumer2D {
private final String prefix;
private DPathConsumer2D out;
@@ -807,7 +1166,7 @@ final class DTransformingPathConsumer2D {
}
private void log(final String message) {
- System.out.println(prefix + message);
+ MarlinUtils.logInfo(prefix + message);
}
@Override
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/Dasher.java b/src/java.desktop/share/classes/sun/java2d/marlin/Dasher.java
index 5aaef9ad9c5..b051f00e6b8 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/Dasher.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/Dasher.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -27,6 +27,8 @@ package sun.java2d.marlin;
import java.util.Arrays;
import sun.awt.geom.PathConsumer2D;
+import sun.java2d.marlin.TransformingPathConsumer2D.CurveBasicMonotonizer;
+import sun.java2d.marlin.TransformingPathConsumer2D.CurveClipSplitter;
/**
* The Dasher class takes a series of linear commands
@@ -41,8 +43,9 @@ import sun.awt.geom.PathConsumer2D;
*/
final class Dasher implements PathConsumer2D, MarlinConst {
- static final int REC_LIMIT = 4;
- static final float ERR = 0.01f;
+ /* huge circle with radius ~ 2E9 only needs 12 subdivision levels */
+ static final int REC_LIMIT = 16;
+ static final float CURVE_LEN_ERR = MarlinProperties.getCurveLengthError(); // 0.01
static final float MIN_T_INC = 1.0f / (1 << REC_LIMIT);
// More than 24 bits of mantissa means we can no longer accurately
@@ -64,8 +67,10 @@ final class Dasher implements PathConsumer2D, MarlinConst {
private boolean dashOn;
private float phase;
- private float sx, sy;
- private float x0, y0;
+ // The starting point of the path
+ private float sx0, sy0;
+ // the current point
+ private float cx0, cy0;
// temporary storage for the current curve
private final float[] curCurvepts;
@@ -76,11 +81,34 @@ final class Dasher implements PathConsumer2D, MarlinConst {
// flag to recycle dash array copy
boolean recycleDashes;
+ // We don't emit the first dash right away. If we did, caps would be
+ // drawn on it, but we need joins to be drawn if there's a closePath()
+ // So, we store the path elements that make up the first dash in the
+ // buffer below.
+ private float[] firstSegmentsBuffer; // dynamic array
+ private int firstSegidx;
+
// dashes ref (dirty)
final FloatArrayCache.Reference dashes_ref;
// firstSegmentsBuffer ref (dirty)
final FloatArrayCache.Reference firstSegmentsBuffer_ref;
+ // Bounds of the drawing region, at pixel precision.
+ private float[] clipRect;
+
+ // the outcode of the current point
+ private int cOutCode = 0;
+
+ private boolean subdivide = DO_CLIP_SUBDIVIDER;
+
+ private final LengthIterator li = new LengthIterator();
+
+ private final CurveClipSplitter curveSplitter;
+
+ private float cycleLen;
+ private boolean outside;
+ private float totalSkipLen;
+
/**
* Constructs a Dasher.
* @param rdrCtx per-thread renderer context
@@ -96,6 +124,8 @@ final class Dasher implements PathConsumer2D, MarlinConst {
// we need curCurvepts to be able to contain 2 curves because when
// dashing curves, we need to subdivide it
curCurvepts = new float[8 * 2];
+
+ this.curveSplitter = rdrCtx.curveClipSplitter;
}
/**
@@ -116,10 +146,13 @@ final class Dasher implements PathConsumer2D, MarlinConst {
// Normalize so 0 <= phase < dash[0]
int sidx = 0;
dashOn = true;
+
float sum = 0.0f;
for (float d : dash) {
sum += d;
}
+ this.cycleLen = sum;
+
float cycles = phase / sum;
if (phase < 0.0f) {
if (-cycles >= MAX_CYCLES) {
@@ -168,6 +201,12 @@ final class Dasher implements PathConsumer2D, MarlinConst {
this.recycleDashes = recycleDashes;
+ if (rdrCtx.doClip) {
+ this.clipRect = rdrCtx.clipRect;
+ } else {
+ this.clipRect = null;
+ this.cOutCode = 0;
+ }
return this; // fluent API
}
@@ -205,33 +244,42 @@ final class Dasher implements PathConsumer2D, MarlinConst {
@Override
public void moveTo(final float x0, final float y0) {
if (firstSegidx != 0) {
- out.moveTo(sx, sy);
+ out.moveTo(sx0, sy0);
emitFirstSegments();
}
- needsMoveTo = true;
+ this.needsMoveTo = true;
this.idx = startIdx;
this.dashOn = this.startDashOn;
this.phase = this.startPhase;
- this.sx = x0;
- this.sy = y0;
- this.x0 = x0;
- this.y0 = y0;
+ this.cx0 = x0;
+ this.cy0 = y0;
+
+ // update starting point:
+ this.sx0 = x0;
+ this.sy0 = y0;
this.starting = true;
+
+ if (clipRect != null) {
+ final int outcode = Helpers.outcode(x0, y0, clipRect);
+ this.cOutCode = outcode;
+ this.outside = false;
+ this.totalSkipLen = 0.0f;
+ }
}
private void emitSeg(float[] buf, int off, int type) {
switch (type) {
case 8:
- out.curveTo(buf[off+0], buf[off+1],
- buf[off+2], buf[off+3],
- buf[off+4], buf[off+5]);
+ out.curveTo(buf[off ], buf[off + 1],
+ buf[off + 2], buf[off + 3],
+ buf[off + 4], buf[off + 5]);
return;
case 6:
- out.quadTo(buf[off+0], buf[off+1],
- buf[off+2], buf[off+3]);
+ out.quadTo(buf[off ], buf[off + 1],
+ buf[off + 2], buf[off + 3]);
return;
case 4:
- out.lineTo(buf[off], buf[off+1]);
+ out.lineTo(buf[off], buf[off + 1]);
return;
default:
}
@@ -247,12 +295,6 @@ final class Dasher implements PathConsumer2D, MarlinConst {
}
firstSegidx = 0;
}
- // We don't emit the first dash right away. If we did, caps would be
- // drawn on it, but we need joins to be drawn if there's a closePath()
- // So, we store the path elements that make up the first dash in the
- // buffer below.
- private float[] firstSegmentsBuffer; // dynamic array
- private int firstSegidx;
// precondition: pts must be in relative coordinates (relative to x0,y0)
private void goTo(final float[] pts, final int off, final int type,
@@ -268,7 +310,7 @@ final class Dasher implements PathConsumer2D, MarlinConst {
} else {
if (needsMoveTo) {
needsMoveTo = false;
- out.moveTo(x0, y0);
+ out.moveTo(cx0, cy0);
}
emitSeg(pts, off, type);
}
@@ -279,8 +321,8 @@ final class Dasher implements PathConsumer2D, MarlinConst {
}
needsMoveTo = true;
}
- this.x0 = x;
- this.y0 = y;
+ this.cx0 = x;
+ this.cy0 = y;
}
private void goTo_starting(final float[] pts, final int off, final int type) {
@@ -306,10 +348,56 @@ final class Dasher implements PathConsumer2D, MarlinConst {
@Override
public void lineTo(final float x1, final float y1) {
- final float dx = x1 - x0;
- final float dy = y1 - y0;
+ final int outcode0 = this.cOutCode;
- float len = dx*dx + dy*dy;
+ if (clipRect != null) {
+ final int outcode1 = Helpers.outcode(x1, y1, clipRect);
+
+ // Should clip
+ final int orCode = (outcode0 | outcode1);
+
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1;
+
+ // basic rejection criteria:
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => callback with subdivided parts:
+ boolean ret = curveSplitter.splitLine(cx0, cy0, x1, y1,
+ orCode, this);
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode1;
+ skipLineTo(x1, y1);
+ return;
+ }
+ }
+
+ this.cOutCode = outcode1;
+
+ if (this.outside) {
+ this.outside = false;
+ // Adjust current index, phase & dash:
+ skipLen();
+ }
+ }
+ _lineTo(x1, y1);
+ }
+
+ private void _lineTo(final float x1, final float y1) {
+ final float dx = x1 - cx0;
+ final float dy = y1 - cy0;
+
+ float len = dx * dx + dy * dy;
if (len == 0.0f) {
return;
}
@@ -328,8 +416,7 @@ final class Dasher implements PathConsumer2D, MarlinConst {
boolean _dashOn = dashOn;
float _phase = phase;
- float leftInThisDashSegment;
- float d, dashdx, dashdy, p;
+ float leftInThisDashSegment, d;
while (true) {
d = _dash[_idx];
@@ -350,24 +437,15 @@ final class Dasher implements PathConsumer2D, MarlinConst {
_idx = (_idx + 1) % _dashLen;
_dashOn = !_dashOn;
}
-
- // Save local state:
- idx = _idx;
- dashOn = _dashOn;
- phase = _phase;
- return;
+ break;
}
- dashdx = d * cx;
- dashdy = d * cy;
-
if (_phase == 0.0f) {
- _curCurvepts[0] = x0 + dashdx;
- _curCurvepts[1] = y0 + dashdy;
+ _curCurvepts[0] = cx0 + d * cx;
+ _curCurvepts[1] = cy0 + d * cy;
} else {
- p = leftInThisDashSegment / d;
- _curCurvepts[0] = x0 + p * dashdx;
- _curCurvepts[1] = y0 + p * dashdy;
+ _curCurvepts[0] = cx0 + leftInThisDashSegment * cx;
+ _curCurvepts[1] = cy0 + leftInThisDashSegment * cy;
}
goTo(_curCurvepts, 0, 4, _dashOn);
@@ -378,19 +456,95 @@ final class Dasher implements PathConsumer2D, MarlinConst {
_dashOn = !_dashOn;
_phase = 0.0f;
}
+ // Save local state:
+ idx = _idx;
+ dashOn = _dashOn;
+ phase = _phase;
}
- // shared instance in Dasher
- private final LengthIterator li = new LengthIterator();
+ private void skipLineTo(final float x1, final float y1) {
+ final float dx = x1 - cx0;
+ final float dy = y1 - cy0;
+
+ float len = dx * dx + dy * dy;
+ if (len != 0.0f) {
+ len = (float)Math.sqrt(len);
+ }
+
+ // Accumulate skipped length:
+ this.outside = true;
+ this.totalSkipLen += len;
+
+ // Fix initial move:
+ this.needsMoveTo = true;
+ this.starting = false;
+
+ this.cx0 = x1;
+ this.cy0 = y1;
+ }
+
+ public void skipLen() {
+ float len = this.totalSkipLen;
+ this.totalSkipLen = 0.0f;
+
+ final float[] _dash = dash;
+ final int _dashLen = this.dashLen;
+
+ int _idx = idx;
+ boolean _dashOn = dashOn;
+ float _phase = phase;
+
+ // -2 to ensure having 2 iterations of the post-loop
+ // to compensate the remaining phase
+ final long fullcycles = (long)Math.floor(len / cycleLen) - 2L;
+
+ if (fullcycles > 0L) {
+ len -= cycleLen * fullcycles;
+
+ final long iterations = fullcycles * _dashLen;
+ _idx = (int) (iterations + _idx) % _dashLen;
+ _dashOn = (iterations + (_dashOn ? 1L : 0L) & 1L) == 1L;
+ }
+
+ float leftInThisDashSegment, d;
+
+ while (true) {
+ d = _dash[_idx];
+ leftInThisDashSegment = d - _phase;
+
+ if (len <= leftInThisDashSegment) {
+ // Advance phase within current dash segment
+ _phase += len;
+
+ // TODO: compare float values using epsilon:
+ if (len == leftInThisDashSegment) {
+ _phase = 0.0f;
+ _idx = (_idx + 1) % _dashLen;
+ _dashOn = !_dashOn;
+ }
+ break;
+ }
+
+ len -= leftInThisDashSegment;
+ // Advance to next dash segment
+ _idx = (_idx + 1) % _dashLen;
+ _dashOn = !_dashOn;
+ _phase = 0.0f;
+ }
+ // Save local state:
+ idx = _idx;
+ dashOn = _dashOn;
+ phase = _phase;
+ }
// preconditions: curCurvepts must be an array of length at least 2 * type,
// that contains the curve we want to dash in the first type elements
private void somethingTo(final int type) {
- if (pointCurve(curCurvepts, type)) {
+ final float[] _curCurvepts = curCurvepts;
+ if (pointCurve(_curCurvepts, type)) {
return;
}
final LengthIterator _li = li;
- final float[] _curCurvepts = curCurvepts;
final float[] _dash = dash;
final int _dashLen = this.dashLen;
@@ -402,17 +556,16 @@ final class Dasher implements PathConsumer2D, MarlinConst {
// initially the current curve is at curCurvepts[0...type]
int curCurveoff = 0;
- float lastSplitT = 0.0f;
+ float prevT = 0.0f;
float t;
float leftInThisDashSegment = _dash[_idx] - _phase;
while ((t = _li.next(leftInThisDashSegment)) < 1.0f) {
if (t != 0.0f) {
- Helpers.subdivideAt((t - lastSplitT) / (1.0f - lastSplitT),
+ Helpers.subdivideAt((t - prevT) / (1.0f - prevT),
_curCurvepts, curCurveoff,
- _curCurvepts, 0,
- _curCurvepts, type, type);
- lastSplitT = t;
+ _curCurvepts, 0, type);
+ prevT = t;
goTo(_curCurvepts, 2, type, _dashOn);
curCurveoff = type;
}
@@ -440,7 +593,29 @@ final class Dasher implements PathConsumer2D, MarlinConst {
_li.reset();
}
- private static boolean pointCurve(float[] curve, int type) {
+ private void skipSomethingTo(final int type) {
+ final float[] _curCurvepts = curCurvepts;
+ if (pointCurve(_curCurvepts, type)) {
+ return;
+ }
+ final LengthIterator _li = li;
+
+ _li.initializeIterationOnCurve(_curCurvepts, type);
+
+ // In contrary to somethingTo(),
+ // just estimate properly the curve length:
+ final float len = _li.totalLength();
+
+ // Accumulate skipped length:
+ this.outside = true;
+ this.totalSkipLen += len;
+
+ // Fix initial move:
+ this.needsMoveTo = true;
+ this.starting = false;
+ }
+
+ private static boolean pointCurve(final float[] curve, final int type) {
for (int i = 2; i < type; i++) {
if (curve[i] != curve[i-2]) {
return false;
@@ -463,15 +638,14 @@ final class Dasher implements PathConsumer2D, MarlinConst {
// tree; however, the trees we are interested in have the property that
// every non leaf node has exactly 2 children
static final class LengthIterator {
- private enum Side {LEFT, RIGHT}
// Holds the curves at various levels of the recursion. The root
// (i.e. the original curve) is at recCurveStack[0] (but then it
// gets subdivided, the left half is put at 1, so most of the time
// only the right half of the original curve is at 0)
private final float[][] recCurveStack; // dirty
- // sides[i] indicates whether the node at level i+1 in the path from
+ // sidesRight[i] indicates whether the node at level i+1 in the path from
// the root to the current leaf is a left or right child of its parent.
- private final Side[] sides; // dirty
+ private final boolean[] sidesRight; // dirty
private int curveType;
// lastT and nextT delimit the current leaf.
private float nextT;
@@ -492,7 +666,7 @@ final class Dasher implements PathConsumer2D, MarlinConst {
LengthIterator() {
this.recCurveStack = new float[REC_LIMIT + 1][8];
- this.sides = new Side[REC_LIMIT];
+ this.sidesRight = new boolean[REC_LIMIT];
// if any methods are called without first initializing this object
// on a curve, we want it to fail ASAP.
this.nextT = Float.MAX_VALUE;
@@ -514,7 +688,7 @@ final class Dasher implements PathConsumer2D, MarlinConst {
for (int i = recLimit; i >= 0; i--) {
Arrays.fill(recCurveStack[i], 0.0f);
}
- Arrays.fill(sides, Side.LEFT);
+ Arrays.fill(sidesRight, false);
Arrays.fill(curLeafCtrlPolyLengths, 0.0f);
Arrays.fill(nextRoots, 0.0f);
Arrays.fill(flatLeafCoefCache, 0.0f);
@@ -522,7 +696,7 @@ final class Dasher implements PathConsumer2D, MarlinConst {
}
}
- void initializeIterationOnCurve(float[] pts, int type) {
+ void initializeIterationOnCurve(final float[] pts, final int type) {
// optimize arraycopy (8 values faster than 6 = type):
System.arraycopy(pts, 0, recCurveStack[0], 0, 8);
this.curveType = type;
@@ -534,11 +708,11 @@ final class Dasher implements PathConsumer2D, MarlinConst {
goLeft(); // initializes nextT and lenAtNextT properly
this.lenAtLastSplit = 0.0f;
if (recLevel > 0) {
- this.sides[0] = Side.LEFT;
+ this.sidesRight[0] = false;
this.done = false;
} else {
// the root of the tree is a leaf so we're done.
- this.sides[0] = Side.RIGHT;
+ this.sidesRight[0] = true;
this.done = true;
}
this.lastSegLen = 0.0f;
@@ -547,7 +721,7 @@ final class Dasher implements PathConsumer2D, MarlinConst {
// 0 == false, 1 == true, -1 == invalid cached value.
private int cachedHaveLowAcceleration = -1;
- private boolean haveLowAcceleration(float err) {
+ private boolean haveLowAcceleration(final float err) {
if (cachedHaveLowAcceleration == -1) {
final float len1 = curLeafCtrlPolyLengths[0];
final float len2 = curLeafCtrlPolyLengths[1];
@@ -636,7 +810,7 @@ final class Dasher implements PathConsumer2D, MarlinConst {
// we use cubicRootsInAB here, because we want only roots in 0, 1,
// and our quadratic root finder doesn't filter, so it's just a
// matter of convenience.
- int n = Helpers.cubicRootsInAB(a, b, c, d, nextRoots, 0, 0.0f, 1.0f);
+ final int n = Helpers.cubicRootsInAB(a, b, c, d, nextRoots, 0, 0.0f, 1.0f);
if (n == 1 && !Float.isNaN(nextRoots[0])) {
t = nextRoots[0];
}
@@ -657,6 +831,16 @@ final class Dasher implements PathConsumer2D, MarlinConst {
return t;
}
+ float totalLength() {
+ while (!done) {
+ goToNextLeaf();
+ }
+ // reset LengthIterator:
+ reset();
+
+ return lenAtNextT;
+ }
+
float lastSegLen() {
return lastSegLen;
}
@@ -666,11 +850,11 @@ final class Dasher implements PathConsumer2D, MarlinConst {
private void goToNextLeaf() {
// We must go to the first ancestor node that has an unvisited
// right child.
+ final boolean[] _sides = sidesRight;
int _recLevel = recLevel;
- final Side[] _sides = sides;
-
_recLevel--;
- while(_sides[_recLevel] == Side.RIGHT) {
+
+ while(_sides[_recLevel]) {
if (_recLevel == 0) {
recLevel = 0;
done = true;
@@ -679,19 +863,17 @@ final class Dasher implements PathConsumer2D, MarlinConst {
_recLevel--;
}
- _sides[_recLevel] = Side.RIGHT;
+ _sides[_recLevel] = true;
// optimize arraycopy (8 values faster than 6 = type):
- System.arraycopy(recCurveStack[_recLevel], 0,
- recCurveStack[_recLevel+1], 0, 8);
- _recLevel++;
-
+ System.arraycopy(recCurveStack[_recLevel++], 0,
+ recCurveStack[_recLevel], 0, 8);
recLevel = _recLevel;
goLeft();
}
// go to the leftmost node from the current node. Return its length.
private void goLeft() {
- float len = onLeaf();
+ final float len = onLeaf();
if (len >= 0.0f) {
lastT = nextT;
lenAtLastT = lenAtNextT;
@@ -701,10 +883,11 @@ final class Dasher implements PathConsumer2D, MarlinConst {
flatLeafCoefCache[2] = -1.0f;
cachedHaveLowAcceleration = -1;
} else {
- Helpers.subdivide(recCurveStack[recLevel], 0,
- recCurveStack[recLevel+1], 0,
- recCurveStack[recLevel], 0, curveType);
- sides[recLevel] = Side.LEFT;
+ Helpers.subdivide(recCurveStack[recLevel],
+ recCurveStack[recLevel + 1],
+ recCurveStack[recLevel], curveType);
+
+ sidesRight[recLevel] = false;
recLevel++;
goLeft();
}
@@ -719,7 +902,7 @@ final class Dasher implements PathConsumer2D, MarlinConst {
float x0 = curve[0], y0 = curve[1];
for (int i = 2; i < _curveType; i += 2) {
- final float x1 = curve[i], y1 = curve[i+1];
+ final float x1 = curve[i], y1 = curve[i + 1];
final float len = Helpers.linelen(x0, y0, x1, y1);
polyLen += len;
curLeafCtrlPolyLengths[(i >> 1) - 1] = len;
@@ -727,10 +910,9 @@ final class Dasher implements PathConsumer2D, MarlinConst {
y0 = y1;
}
- final float lineLen = Helpers.linelen(curve[0], curve[1],
- curve[_curveType-2],
- curve[_curveType-1]);
- if ((polyLen - lineLen) < ERR || recLevel == REC_LIMIT) {
+ final float lineLen = Helpers.linelen(curve[0], curve[1], x0, y0);
+
+ if ((polyLen - lineLen) < CURVE_LEN_ERR || recLevel == REC_LIMIT) {
return (polyLen + lineLen) / 2.0f;
}
return -1.0f;
@@ -741,42 +923,191 @@ final class Dasher implements PathConsumer2D, MarlinConst {
public void curveTo(final float x1, final float y1,
final float x2, final float y2,
final float x3, final float y3)
+ {
+ final int outcode0 = this.cOutCode;
+
+ if (clipRect != null) {
+ final int outcode1 = Helpers.outcode(x1, y1, clipRect);
+ final int outcode2 = Helpers.outcode(x2, y2, clipRect);
+ final int outcode3 = Helpers.outcode(x3, y3, clipRect);
+
+ // Should clip
+ final int orCode = (outcode0 | outcode1 | outcode2 | outcode3);
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1 & outcode2 & outcode3;
+
+ // basic rejection criteria:
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => callback with subdivided parts:
+ boolean ret = curveSplitter.splitCurve(cx0, cy0, x1, y1, x2, y2, x3, y3,
+ orCode, this);
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode3;
+ skipCurveTo(x1, y1, x2, y2, x3, y3);
+ return;
+ }
+ }
+
+ this.cOutCode = outcode3;
+
+ if (this.outside) {
+ this.outside = false;
+ // Adjust current index, phase & dash:
+ skipLen();
+ }
+ }
+ _curveTo(x1, y1, x2, y2, x3, y3);
+ }
+
+ private void _curveTo(final float x1, final float y1,
+ final float x2, final float y2,
+ final float x3, final float y3)
{
final float[] _curCurvepts = curCurvepts;
- _curCurvepts[0] = x0; _curCurvepts[1] = y0;
- _curCurvepts[2] = x1; _curCurvepts[3] = y1;
- _curCurvepts[4] = x2; _curCurvepts[5] = y2;
- _curCurvepts[6] = x3; _curCurvepts[7] = y3;
- somethingTo(8);
+
+ // monotonize curve:
+ final CurveBasicMonotonizer monotonizer
+ = rdrCtx.monotonizer.curve(cx0, cy0, x1, y1, x2, y2, x3, y3);
+
+ final int nSplits = monotonizer.nbSplits;
+ final float[] mid = monotonizer.middle;
+
+ for (int i = 0, off = 0; i <= nSplits; i++, off += 6) {
+ // optimize arraycopy (8 values faster than 6 = type):
+ System.arraycopy(mid, off, _curCurvepts, 0, 8);
+
+ somethingTo(8);
+ }
+ }
+
+ private void skipCurveTo(final float x1, final float y1,
+ final float x2, final float y2,
+ final float x3, final float y3)
+ {
+ final float[] _curCurvepts = curCurvepts;
+ _curCurvepts[0] = cx0; _curCurvepts[1] = cy0;
+ _curCurvepts[2] = x1; _curCurvepts[3] = y1;
+ _curCurvepts[4] = x2; _curCurvepts[5] = y2;
+ _curCurvepts[6] = x3; _curCurvepts[7] = y3;
+
+ skipSomethingTo(8);
+
+ this.cx0 = x3;
+ this.cy0 = y3;
}
@Override
public void quadTo(final float x1, final float y1,
final float x2, final float y2)
+ {
+ final int outcode0 = this.cOutCode;
+
+ if (clipRect != null) {
+ final int outcode1 = Helpers.outcode(x1, y1, clipRect);
+ final int outcode2 = Helpers.outcode(x2, y2, clipRect);
+
+ // Should clip
+ final int orCode = (outcode0 | outcode1 | outcode2);
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1 & outcode2;
+
+ // basic rejection criteria:
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => call lineTo() with subdivided curves:
+ boolean ret = curveSplitter.splitQuad(cx0, cy0, x1, y1,
+ x2, y2, orCode, this);
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode2;
+ skipQuadTo(x1, y1, x2, y2);
+ return;
+ }
+ }
+
+ this.cOutCode = outcode2;
+
+ if (this.outside) {
+ this.outside = false;
+ // Adjust current index, phase & dash:
+ skipLen();
+ }
+ }
+ _quadTo(x1, y1, x2, y2);
+ }
+
+ private void _quadTo(final float x1, final float y1,
+ final float x2, final float y2)
{
final float[] _curCurvepts = curCurvepts;
- _curCurvepts[0] = x0; _curCurvepts[1] = y0;
- _curCurvepts[2] = x1; _curCurvepts[3] = y1;
- _curCurvepts[4] = x2; _curCurvepts[5] = y2;
- somethingTo(6);
+
+ // monotonize quad:
+ final CurveBasicMonotonizer monotonizer
+ = rdrCtx.monotonizer.quad(cx0, cy0, x1, y1, x2, y2);
+
+ final int nSplits = monotonizer.nbSplits;
+ final float[] mid = monotonizer.middle;
+
+ for (int i = 0, off = 0; i <= nSplits; i++, off += 4) {
+ // optimize arraycopy (8 values faster than 6 = type):
+ System.arraycopy(mid, off, _curCurvepts, 0, 8);
+
+ somethingTo(6);
+ }
+ }
+
+ private void skipQuadTo(final float x1, final float y1,
+ final float x2, final float y2)
+ {
+ final float[] _curCurvepts = curCurvepts;
+ _curCurvepts[0] = cx0; _curCurvepts[1] = cy0;
+ _curCurvepts[2] = x1; _curCurvepts[3] = y1;
+ _curCurvepts[4] = x2; _curCurvepts[5] = y2;
+
+ skipSomethingTo(6);
+
+ this.cx0 = x2;
+ this.cy0 = y2;
}
@Override
public void closePath() {
- lineTo(sx, sy);
+ if (cx0 != sx0 || cy0 != sy0) {
+ lineTo(sx0, sy0);
+ }
if (firstSegidx != 0) {
if (!dashOn || needsMoveTo) {
- out.moveTo(sx, sy);
+ out.moveTo(sx0, sy0);
}
emitFirstSegments();
}
- moveTo(sx, sy);
+ moveTo(sx0, sy0);
}
@Override
public void pathDone() {
if (firstSegidx != 0) {
- out.moveTo(sx, sy);
+ out.moveTo(sx0, sy0);
emitFirstSegments();
}
out.pathDone();
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/DoubleArrayCache.java b/src/java.desktop/share/classes/sun/java2d/marlin/DoubleArrayCache.java
index abc470e9c5e..a26f1a30c21 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/DoubleArrayCache.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/DoubleArrayCache.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -99,7 +99,7 @@ final class DoubleArrayCache implements MarlinConst {
Reference(final DoubleArrayCache cache, final int initialSize) {
this.cache = cache;
this.clean = cache.clean;
- this.initial = createArray(initialSize, clean);
+ this.initial = createArray(initialSize);
if (DO_STATS) {
cache.stats.totalInitial += initialSize;
}
@@ -116,7 +116,7 @@ final class DoubleArrayCache implements MarlinConst {
logInfo(getLogPrefix(clean) + "DoubleArrayCache: "
+ "getArray[oversize]: length=\t" + length);
}
- return createArray(length, clean);
+ return createArray(length);
}
double[] widenArray(final double[] array, final int usedSize,
@@ -202,7 +202,7 @@ final class DoubleArrayCache implements MarlinConst {
if (DO_STATS) {
stats.createOp++;
}
- return createArray(arraySize, clean);
+ return createArray(arraySize);
}
void putArray(final double[] array)
@@ -229,12 +229,8 @@ final class DoubleArrayCache implements MarlinConst {
}
}
- static double[] createArray(final int length, final boolean clean) {
- if (clean) {
- return new double[length];
- }
- // use JDK9 Unsafe.allocateUninitializedArray(class, length):
- return (double[]) OffHeapArray.UNSAFE.allocateUninitializedArray(double.class, length);
+ static double[] createArray(final int length) {
+ return new double[length];
}
static void fill(final double[] array, final int fromIndex,
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/FloatArrayCache.java b/src/java.desktop/share/classes/sun/java2d/marlin/FloatArrayCache.java
index 042c1a3eb96..f6bcd5ed25c 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/FloatArrayCache.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/FloatArrayCache.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -99,7 +99,7 @@ final class FloatArrayCache implements MarlinConst {
Reference(final FloatArrayCache cache, final int initialSize) {
this.cache = cache;
this.clean = cache.clean;
- this.initial = createArray(initialSize, clean);
+ this.initial = createArray(initialSize);
if (DO_STATS) {
cache.stats.totalInitial += initialSize;
}
@@ -116,7 +116,7 @@ final class FloatArrayCache implements MarlinConst {
logInfo(getLogPrefix(clean) + "FloatArrayCache: "
+ "getArray[oversize]: length=\t" + length);
}
- return createArray(length, clean);
+ return createArray(length);
}
float[] widenArray(final float[] array, final int usedSize,
@@ -202,7 +202,7 @@ final class FloatArrayCache implements MarlinConst {
if (DO_STATS) {
stats.createOp++;
}
- return createArray(arraySize, clean);
+ return createArray(arraySize);
}
void putArray(final float[] array)
@@ -229,12 +229,8 @@ final class FloatArrayCache implements MarlinConst {
}
}
- static float[] createArray(final int length, final boolean clean) {
- if (clean) {
- return new float[length];
- }
- // use JDK9 Unsafe.allocateUninitializedArray(class, length):
- return (float[]) OffHeapArray.UNSAFE.allocateUninitializedArray(float.class, length);
+ static float[] createArray(final int length) {
+ return new float[length];
}
static void fill(final float[] array, final int fromIndex,
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/Helpers.java b/src/java.desktop/share/classes/sun/java2d/marlin/Helpers.java
index c8043509529..a531f083992 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/Helpers.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/Helpers.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -25,7 +25,6 @@
package sun.java2d.marlin;
-import static java.lang.Math.PI;
import java.util.Arrays;
import sun.awt.geom.PathConsumer2D;
import sun.java2d.marlin.stats.Histogram;
@@ -47,13 +46,25 @@ final class Helpers implements MarlinConst {
return (d <= err && d >= -err);
}
- static int quadraticRoots(final float a, final float b,
- final float c, float[] zeroes, final int off)
+ static float evalCubic(final float a, final float b,
+ final float c, final float d,
+ final float t)
+ {
+ return t * (t * (t * a + b) + c) + d;
+ }
+
+ static float evalQuad(final float a, final float b,
+ final float c, final float t)
+ {
+ return t * (t * a + b) + c;
+ }
+
+ static int quadraticRoots(final float a, final float b, final float c,
+ final float[] zeroes, final int off)
{
int ret = off;
- float t;
if (a != 0.0f) {
- final float dis = b*b - 4*a*c;
+ final float dis = b*b - 4.0f * a * c;
if (dis > 0.0f) {
final float sqrtDis = (float) Math.sqrt(dis);
// depending on the sign of b we use a slightly different
@@ -68,37 +79,38 @@ final class Helpers implements MarlinConst {
zeroes[ret++] = (2.0f * c) / (-b + sqrtDis);
}
} else if (dis == 0.0f) {
- t = (-b) / (2.0f * a);
- zeroes[ret++] = t;
- }
- } else {
- if (b != 0.0f) {
- t = (-c) / b;
- zeroes[ret++] = t;
+ zeroes[ret++] = -b / (2.0f * a);
}
+ } else if (b != 0.0f) {
+ zeroes[ret++] = -c / b;
}
return ret - off;
}
// find the roots of g(t) = d*t^3 + a*t^2 + b*t + c in [A,B)
- static int cubicRootsInAB(float d, float a, float b, float c,
- float[] pts, final int off,
+ static int cubicRootsInAB(final float d0, float a0, float b0, float c0,
+ final float[] pts, final int off,
final float A, final float B)
{
- if (d == 0.0f) {
- int num = quadraticRoots(a, b, c, pts, off);
+ if (d0 == 0.0f) {
+ final int num = quadraticRoots(a0, b0, c0, pts, off);
return filterOutNotInAB(pts, off, num, A, B) - off;
}
// From Graphics Gems:
- // http://tog.acm.org/resources/GraphicsGems/gems/Roots3And4.c
+ // https://github.com/erich666/GraphicsGems/blob/master/gems/Roots3And4.c
// (also from awt.geom.CubicCurve2D. But here we don't need as
// much accuracy and we don't want to create arrays so we use
// our own customized version).
// normal form: x^3 + ax^2 + bx + c = 0
- a /= d;
- b /= d;
- c /= d;
+
+ // 2018.1: Need double precision if d is very small (flat curve) !
+ /*
+ * TODO: cleanup all that code after reading Roots3And4.c
+ */
+ final double a = ((double)a0) / d0;
+ final double b = ((double)b0) / d0;
+ final double c = ((double)c0) / d0;
// substitute x = y - A/3 to eliminate quadratic term:
// x^3 +Px + Q = 0
@@ -108,63 +120,45 @@ final class Helpers implements MarlinConst {
// p = P/3
// q = Q/2
// instead and use those values for simplicity of the code.
- double sq_A = a * a;
- double p = (1.0d/3.0d) * ((-1.0d/3.0d) * sq_A + b);
- double q = (1.0d/2.0d) * ((2.0d/27.0d) * a * sq_A - (1.0d/3.0d) * a * b + c);
+ final double sub = (1.0d / 3.0d) * a;
+ final double sq_A = a * a;
+ final double p = (1.0d / 3.0d) * ((-1.0d / 3.0d) * sq_A + b);
+ final double q = (1.0d / 2.0d) * ((2.0d / 27.0d) * a * sq_A - sub * b + c);
// use Cardano's formula
- double cb_p = p * p * p;
- double D = q * q + cb_p;
+ final double cb_p = p * p * p;
+ final double D = q * q + cb_p;
int num;
if (D < 0.0d) {
// see: http://en.wikipedia.org/wiki/Cubic_function#Trigonometric_.28and_hyperbolic.29_method
- final double phi = (1.0d/3.0d) * Math.acos(-q / Math.sqrt(-cb_p));
+ final double phi = (1.0d / 3.0d) * Math.acos(-q / Math.sqrt(-cb_p));
final double t = 2.0d * Math.sqrt(-p);
- pts[ off+0 ] = (float) ( t * Math.cos(phi));
- pts[ off+1 ] = (float) (-t * Math.cos(phi + (PI / 3.0d)));
- pts[ off+2 ] = (float) (-t * Math.cos(phi - (PI / 3.0d)));
+ pts[off ] = (float) ( t * Math.cos(phi) - sub);
+ pts[off + 1] = (float) (-t * Math.cos(phi + (Math.PI / 3.0d)) - sub);
+ pts[off + 2] = (float) (-t * Math.cos(phi - (Math.PI / 3.0d)) - sub);
num = 3;
} else {
final double sqrt_D = Math.sqrt(D);
final double u = Math.cbrt(sqrt_D - q);
final double v = - Math.cbrt(sqrt_D + q);
- pts[ off ] = (float) (u + v);
+ pts[off ] = (float) (u + v - sub);
num = 1;
if (within(D, 0.0d, 1e-8d)) {
- pts[off+1] = -(pts[off] / 2.0f);
+ pts[off + 1] = (float)((-1.0d / 2.0d) * (u + v) - sub);
num = 2;
}
}
- final float sub = (1.0f/3.0f) * a;
-
- for (int i = 0; i < num; ++i) {
- pts[ off+i ] -= sub;
- }
-
return filterOutNotInAB(pts, off, num, A, B) - off;
}
- static float evalCubic(final float a, final float b,
- final float c, final float d,
- final float t)
- {
- return t * (t * (t * a + b) + c) + d;
- }
-
- static float evalQuad(final float a, final float b,
- final float c, final float t)
- {
- return t * (t * a + b) + c;
- }
-
// returns the index 1 past the last valid element remaining after filtering
- static int filterOutNotInAB(float[] nums, final int off, final int len,
+ static int filterOutNotInAB(final float[] nums, final int off, final int len,
final float a, final float b)
{
int ret = off;
@@ -176,35 +170,190 @@ final class Helpers implements MarlinConst {
return ret;
}
- static float linelen(float x1, float y1, float x2, float y2) {
- final float dx = x2 - x1;
- final float dy = y2 - y1;
- return (float) Math.sqrt(dx*dx + dy*dy);
+ static float fastLineLen(final float x0, final float y0,
+ final float x1, final float y1)
+ {
+ final float dx = x1 - x0;
+ final float dy = y1 - y0;
+
+ // use manhattan norm:
+ return Math.abs(dx) + Math.abs(dy);
}
- static void subdivide(float[] src, int srcoff, float[] left, int leftoff,
- float[] right, int rightoff, int type)
+ static float linelen(final float x0, final float y0,
+ final float x1, final float y1)
+ {
+ final float dx = x1 - x0;
+ final float dy = y1 - y0;
+ return (float) Math.sqrt(dx * dx + dy * dy);
+ }
+
+ static float fastQuadLen(final float x0, final float y0,
+ final float x1, final float y1,
+ final float x2, final float y2)
+ {
+ final float dx1 = x1 - x0;
+ final float dx2 = x2 - x1;
+ final float dy1 = y1 - y0;
+ final float dy2 = y2 - y1;
+
+ // use manhattan norm:
+ return Math.abs(dx1) + Math.abs(dx2)
+ + Math.abs(dy1) + Math.abs(dy2);
+ }
+
+ static float quadlen(final float x0, final float y0,
+ final float x1, final float y1,
+ final float x2, final float y2)
+ {
+ return (linelen(x0, y0, x1, y1)
+ + linelen(x1, y1, x2, y2)
+ + linelen(x0, y0, x2, y2)) / 2.0f;
+ }
+
+
+ static float fastCurvelen(final float x0, final float y0,
+ final float x1, final float y1,
+ final float x2, final float y2,
+ final float x3, final float y3)
+ {
+ final float dx1 = x1 - x0;
+ final float dx2 = x2 - x1;
+ final float dx3 = x3 - x2;
+ final float dy1 = y1 - y0;
+ final float dy2 = y2 - y1;
+ final float dy3 = y3 - y2;
+
+ // use manhattan norm:
+ return Math.abs(dx1) + Math.abs(dx2) + Math.abs(dx3)
+ + Math.abs(dy1) + Math.abs(dy2) + Math.abs(dy3);
+ }
+
+ static float curvelen(final float x0, final float y0,
+ final float x1, final float y1,
+ final float x2, final float y2,
+ final float x3, final float y3)
+ {
+ return (linelen(x0, y0, x1, y1)
+ + linelen(x1, y1, x2, y2)
+ + linelen(x2, y2, x3, y3)
+ + linelen(x0, y0, x3, y3)) / 2.0f;
+ }
+
+ // finds values of t where the curve in pts should be subdivided in order
+ // to get good offset curves a distance of w away from the middle curve.
+ // Stores the points in ts, and returns how many of them there were.
+ static int findSubdivPoints(final Curve c, final float[] pts,
+ final float[] ts, final int type,
+ final float w2)
+ {
+ final float x12 = pts[2] - pts[0];
+ final float y12 = pts[3] - pts[1];
+ // if the curve is already parallel to either axis we gain nothing
+ // from rotating it.
+ if ((y12 != 0.0f && x12 != 0.0f)) {
+ // we rotate it so that the first vector in the control polygon is
+ // parallel to the x-axis. This will ensure that rotated quarter
+ // circles won't be subdivided.
+ final float hypot = (float)Math.sqrt(x12 * x12 + y12 * y12);
+ final float cos = x12 / hypot;
+ final float sin = y12 / hypot;
+ final float x1 = cos * pts[0] + sin * pts[1];
+ final float y1 = cos * pts[1] - sin * pts[0];
+ final float x2 = cos * pts[2] + sin * pts[3];
+ final float y2 = cos * pts[3] - sin * pts[2];
+ final float x3 = cos * pts[4] + sin * pts[5];
+ final float y3 = cos * pts[5] - sin * pts[4];
+
+ switch(type) {
+ case 8:
+ final float x4 = cos * pts[6] + sin * pts[7];
+ final float y4 = cos * pts[7] - sin * pts[6];
+ c.set(x1, y1, x2, y2, x3, y3, x4, y4);
+ break;
+ case 6:
+ c.set(x1, y1, x2, y2, x3, y3);
+ break;
+ default:
+ }
+ } else {
+ c.set(pts, type);
+ }
+
+ int ret = 0;
+ // we subdivide at values of t such that the remaining rotated
+ // curves are monotonic in x and y.
+ ret += c.dxRoots(ts, ret);
+ ret += c.dyRoots(ts, ret);
+
+ // subdivide at inflection points.
+ if (type == 8) {
+ // quadratic curves can't have inflection points
+ ret += c.infPoints(ts, ret);
+ }
+
+ // now we must subdivide at points where one of the offset curves will have
+ // a cusp. This happens at ts where the radius of curvature is equal to w.
+ ret += c.rootsOfROCMinusW(ts, ret, w2, 0.0001f);
+
+ ret = filterOutNotInAB(ts, 0, ret, 0.0001f, 0.9999f);
+ isort(ts, ret);
+ return ret;
+ }
+
+ // finds values of t where the curve in pts should be subdivided in order
+ // to get intersections with the given clip rectangle.
+ // Stores the points in ts, and returns how many of them there were.
+ static int findClipPoints(final Curve curve, final float[] pts,
+ final float[] ts, final int type,
+ final int outCodeOR,
+ final float[] clipRect)
+ {
+ curve.set(pts, type);
+
+ // clip rectangle (ymin, ymax, xmin, xmax)
+ int ret = 0;
+
+ if ((outCodeOR & OUTCODE_LEFT) != 0) {
+ ret += curve.xPoints(ts, ret, clipRect[2]);
+ }
+ if ((outCodeOR & OUTCODE_RIGHT) != 0) {
+ ret += curve.xPoints(ts, ret, clipRect[3]);
+ }
+ if ((outCodeOR & OUTCODE_TOP) != 0) {
+ ret += curve.yPoints(ts, ret, clipRect[0]);
+ }
+ if ((outCodeOR & OUTCODE_BOTTOM) != 0) {
+ ret += curve.yPoints(ts, ret, clipRect[1]);
+ }
+ isort(ts, ret);
+ return ret;
+ }
+
+ static void subdivide(final float[] src,
+ final float[] left, final float[] right,
+ final int type)
{
switch(type) {
- case 6:
- Helpers.subdivideQuad(src, srcoff, left, leftoff, right, rightoff);
- return;
case 8:
- Helpers.subdivideCubic(src, srcoff, left, leftoff, right, rightoff);
+ subdivideCubic(src, left, right);
+ return;
+ case 6:
+ subdivideQuad(src, left, right);
return;
default:
throw new InternalError("Unsupported curve type");
}
}
- static void isort(float[] a, int off, int len) {
- for (int i = off + 1, end = off + len; i < end; i++) {
- float ai = a[i];
- int j = i - 1;
- for (; j >= off && a[j] > ai; j--) {
- a[j+1] = a[j];
+ static void isort(final float[] a, final int len) {
+ for (int i = 1, j; i < len; i++) {
+ final float ai = a[i];
+ j = i - 1;
+ for (; j >= 0 && a[j] > ai; j--) {
+ a[j + 1] = a[j];
}
- a[j+1] = ai;
+ a[j + 1] = ai;
}
}
@@ -227,206 +376,216 @@ final class Helpers implements MarlinConst {
* equals (leftoff + 6), in order
* to avoid allocating extra storage for this common point.
* @param src the array holding the coordinates for the source curve
- * @param srcoff the offset into the array of the beginning of the
- * the 6 source coordinates
* @param left the array for storing the coordinates for the first
* half of the subdivided curve
- * @param leftoff the offset into the array of the beginning of the
- * the 6 left coordinates
* @param right the array for storing the coordinates for the second
* half of the subdivided curve
- * @param rightoff the offset into the array of the beginning of the
- * the 6 right coordinates
* @since 1.7
*/
- static void subdivideCubic(float[] src, int srcoff,
- float[] left, int leftoff,
- float[] right, int rightoff)
+ static void subdivideCubic(final float[] src,
+ final float[] left,
+ final float[] right)
{
- float x1 = src[srcoff + 0];
- float y1 = src[srcoff + 1];
- float ctrlx1 = src[srcoff + 2];
- float ctrly1 = src[srcoff + 3];
- float ctrlx2 = src[srcoff + 4];
- float ctrly2 = src[srcoff + 5];
- float x2 = src[srcoff + 6];
- float y2 = src[srcoff + 7];
- if (left != null) {
- left[leftoff + 0] = x1;
- left[leftoff + 1] = y1;
- }
- if (right != null) {
- right[rightoff + 6] = x2;
- right[rightoff + 7] = y2;
- }
- x1 = (x1 + ctrlx1) / 2.0f;
- y1 = (y1 + ctrly1) / 2.0f;
- x2 = (x2 + ctrlx2) / 2.0f;
- y2 = (y2 + ctrly2) / 2.0f;
- float centerx = (ctrlx1 + ctrlx2) / 2.0f;
- float centery = (ctrly1 + ctrly2) / 2.0f;
- ctrlx1 = (x1 + centerx) / 2.0f;
- ctrly1 = (y1 + centery) / 2.0f;
- ctrlx2 = (x2 + centerx) / 2.0f;
- ctrly2 = (y2 + centery) / 2.0f;
- centerx = (ctrlx1 + ctrlx2) / 2.0f;
- centery = (ctrly1 + ctrly2) / 2.0f;
- if (left != null) {
- left[leftoff + 2] = x1;
- left[leftoff + 3] = y1;
- left[leftoff + 4] = ctrlx1;
- left[leftoff + 5] = ctrly1;
- left[leftoff + 6] = centerx;
- left[leftoff + 7] = centery;
- }
- if (right != null) {
- right[rightoff + 0] = centerx;
- right[rightoff + 1] = centery;
- right[rightoff + 2] = ctrlx2;
- right[rightoff + 3] = ctrly2;
- right[rightoff + 4] = x2;
- right[rightoff + 5] = y2;
- }
+ float x1 = src[0];
+ float y1 = src[1];
+ float cx1 = src[2];
+ float cy1 = src[3];
+ float cx2 = src[4];
+ float cy2 = src[5];
+ float x2 = src[6];
+ float y2 = src[7];
+
+ left[0] = x1;
+ left[1] = y1;
+
+ right[6] = x2;
+ right[7] = y2;
+
+ x1 = (x1 + cx1) / 2.0f;
+ y1 = (y1 + cy1) / 2.0f;
+ x2 = (x2 + cx2) / 2.0f;
+ y2 = (y2 + cy2) / 2.0f;
+
+ float cx = (cx1 + cx2) / 2.0f;
+ float cy = (cy1 + cy2) / 2.0f;
+
+ cx1 = (x1 + cx) / 2.0f;
+ cy1 = (y1 + cy) / 2.0f;
+ cx2 = (x2 + cx) / 2.0f;
+ cy2 = (y2 + cy) / 2.0f;
+ cx = (cx1 + cx2) / 2.0f;
+ cy = (cy1 + cy2) / 2.0f;
+
+ left[2] = x1;
+ left[3] = y1;
+ left[4] = cx1;
+ left[5] = cy1;
+ left[6] = cx;
+ left[7] = cy;
+
+ right[0] = cx;
+ right[1] = cy;
+ right[2] = cx2;
+ right[3] = cy2;
+ right[4] = x2;
+ right[5] = y2;
}
-
- static void subdivideCubicAt(float t, float[] src, int srcoff,
- float[] left, int leftoff,
- float[] right, int rightoff)
+ static void subdivideCubicAt(final float t,
+ final float[] src, final int offS,
+ final float[] pts, final int offL, final int offR)
{
- float x1 = src[srcoff + 0];
- float y1 = src[srcoff + 1];
- float ctrlx1 = src[srcoff + 2];
- float ctrly1 = src[srcoff + 3];
- float ctrlx2 = src[srcoff + 4];
- float ctrly2 = src[srcoff + 5];
- float x2 = src[srcoff + 6];
- float y2 = src[srcoff + 7];
- if (left != null) {
- left[leftoff + 0] = x1;
- left[leftoff + 1] = y1;
- }
- if (right != null) {
- right[rightoff + 6] = x2;
- right[rightoff + 7] = y2;
- }
- x1 = x1 + t * (ctrlx1 - x1);
- y1 = y1 + t * (ctrly1 - y1);
- x2 = ctrlx2 + t * (x2 - ctrlx2);
- y2 = ctrly2 + t * (y2 - ctrly2);
- float centerx = ctrlx1 + t * (ctrlx2 - ctrlx1);
- float centery = ctrly1 + t * (ctrly2 - ctrly1);
- ctrlx1 = x1 + t * (centerx - x1);
- ctrly1 = y1 + t * (centery - y1);
- ctrlx2 = centerx + t * (x2 - centerx);
- ctrly2 = centery + t * (y2 - centery);
- centerx = ctrlx1 + t * (ctrlx2 - ctrlx1);
- centery = ctrly1 + t * (ctrly2 - ctrly1);
- if (left != null) {
- left[leftoff + 2] = x1;
- left[leftoff + 3] = y1;
- left[leftoff + 4] = ctrlx1;
- left[leftoff + 5] = ctrly1;
- left[leftoff + 6] = centerx;
- left[leftoff + 7] = centery;
- }
- if (right != null) {
- right[rightoff + 0] = centerx;
- right[rightoff + 1] = centery;
- right[rightoff + 2] = ctrlx2;
- right[rightoff + 3] = ctrly2;
- right[rightoff + 4] = x2;
- right[rightoff + 5] = y2;
- }
+ float x1 = src[offS ];
+ float y1 = src[offS + 1];
+ float cx1 = src[offS + 2];
+ float cy1 = src[offS + 3];
+ float cx2 = src[offS + 4];
+ float cy2 = src[offS + 5];
+ float x2 = src[offS + 6];
+ float y2 = src[offS + 7];
+
+ pts[offL ] = x1;
+ pts[offL + 1] = y1;
+
+ pts[offR + 6] = x2;
+ pts[offR + 7] = y2;
+
+ x1 = x1 + t * (cx1 - x1);
+ y1 = y1 + t * (cy1 - y1);
+ x2 = cx2 + t * (x2 - cx2);
+ y2 = cy2 + t * (y2 - cy2);
+
+ float cx = cx1 + t * (cx2 - cx1);
+ float cy = cy1 + t * (cy2 - cy1);
+
+ cx1 = x1 + t * (cx - x1);
+ cy1 = y1 + t * (cy - y1);
+ cx2 = cx + t * (x2 - cx);
+ cy2 = cy + t * (y2 - cy);
+ cx = cx1 + t * (cx2 - cx1);
+ cy = cy1 + t * (cy2 - cy1);
+
+ pts[offL + 2] = x1;
+ pts[offL + 3] = y1;
+ pts[offL + 4] = cx1;
+ pts[offL + 5] = cy1;
+ pts[offL + 6] = cx;
+ pts[offL + 7] = cy;
+
+ pts[offR ] = cx;
+ pts[offR + 1] = cy;
+ pts[offR + 2] = cx2;
+ pts[offR + 3] = cy2;
+ pts[offR + 4] = x2;
+ pts[offR + 5] = y2;
}
- static void subdivideQuad(float[] src, int srcoff,
- float[] left, int leftoff,
- float[] right, int rightoff)
+ static void subdivideQuad(final float[] src,
+ final float[] left,
+ final float[] right)
{
- float x1 = src[srcoff + 0];
- float y1 = src[srcoff + 1];
- float ctrlx = src[srcoff + 2];
- float ctrly = src[srcoff + 3];
- float x2 = src[srcoff + 4];
- float y2 = src[srcoff + 5];
- if (left != null) {
- left[leftoff + 0] = x1;
- left[leftoff + 1] = y1;
- }
- if (right != null) {
- right[rightoff + 4] = x2;
- right[rightoff + 5] = y2;
- }
- x1 = (x1 + ctrlx) / 2.0f;
- y1 = (y1 + ctrly) / 2.0f;
- x2 = (x2 + ctrlx) / 2.0f;
- y2 = (y2 + ctrly) / 2.0f;
- ctrlx = (x1 + x2) / 2.0f;
- ctrly = (y1 + y2) / 2.0f;
- if (left != null) {
- left[leftoff + 2] = x1;
- left[leftoff + 3] = y1;
- left[leftoff + 4] = ctrlx;
- left[leftoff + 5] = ctrly;
- }
- if (right != null) {
- right[rightoff + 0] = ctrlx;
- right[rightoff + 1] = ctrly;
- right[rightoff + 2] = x2;
- right[rightoff + 3] = y2;
- }
+ float x1 = src[0];
+ float y1 = src[1];
+ float cx = src[2];
+ float cy = src[3];
+ float x2 = src[4];
+ float y2 = src[5];
+
+ left[0] = x1;
+ left[1] = y1;
+
+ right[4] = x2;
+ right[5] = y2;
+
+ x1 = (x1 + cx) / 2.0f;
+ y1 = (y1 + cy) / 2.0f;
+ x2 = (x2 + cx) / 2.0f;
+ y2 = (y2 + cy) / 2.0f;
+ cx = (x1 + x2) / 2.0f;
+ cy = (y1 + y2) / 2.0f;
+
+ left[2] = x1;
+ left[3] = y1;
+ left[4] = cx;
+ left[5] = cy;
+
+ right[0] = cx;
+ right[1] = cy;
+ right[2] = x2;
+ right[3] = y2;
}
- static void subdivideQuadAt(float t, float[] src, int srcoff,
- float[] left, int leftoff,
- float[] right, int rightoff)
+ static void subdivideQuadAt(final float t,
+ final float[] src, final int offS,
+ final float[] pts, final int offL, final int offR)
{
- float x1 = src[srcoff + 0];
- float y1 = src[srcoff + 1];
- float ctrlx = src[srcoff + 2];
- float ctrly = src[srcoff + 3];
- float x2 = src[srcoff + 4];
- float y2 = src[srcoff + 5];
- if (left != null) {
- left[leftoff + 0] = x1;
- left[leftoff + 1] = y1;
- }
- if (right != null) {
- right[rightoff + 4] = x2;
- right[rightoff + 5] = y2;
- }
- x1 = x1 + t * (ctrlx - x1);
- y1 = y1 + t * (ctrly - y1);
- x2 = ctrlx + t * (x2 - ctrlx);
- y2 = ctrly + t * (y2 - ctrly);
- ctrlx = x1 + t * (x2 - x1);
- ctrly = y1 + t * (y2 - y1);
- if (left != null) {
- left[leftoff + 2] = x1;
- left[leftoff + 3] = y1;
- left[leftoff + 4] = ctrlx;
- left[leftoff + 5] = ctrly;
- }
- if (right != null) {
- right[rightoff + 0] = ctrlx;
- right[rightoff + 1] = ctrly;
- right[rightoff + 2] = x2;
- right[rightoff + 3] = y2;
- }
+ float x1 = src[offS ];
+ float y1 = src[offS + 1];
+ float cx = src[offS + 2];
+ float cy = src[offS + 3];
+ float x2 = src[offS + 4];
+ float y2 = src[offS + 5];
+
+ pts[offL ] = x1;
+ pts[offL + 1] = y1;
+
+ pts[offR + 4] = x2;
+ pts[offR + 5] = y2;
+
+ x1 = x1 + t * (cx - x1);
+ y1 = y1 + t * (cy - y1);
+ x2 = cx + t * (x2 - cx);
+ y2 = cy + t * (y2 - cy);
+ cx = x1 + t * (x2 - x1);
+ cy = y1 + t * (y2 - y1);
+
+ pts[offL + 2] = x1;
+ pts[offL + 3] = y1;
+ pts[offL + 4] = cx;
+ pts[offL + 5] = cy;
+
+ pts[offR ] = cx;
+ pts[offR + 1] = cy;
+ pts[offR + 2] = x2;
+ pts[offR + 3] = y2;
}
- static void subdivideAt(float t, float[] src, int srcoff,
- float[] left, int leftoff,
- float[] right, int rightoff, int size)
+ static void subdivideLineAt(final float t,
+ final float[] src, final int offS,
+ final float[] pts, final int offL, final int offR)
{
- switch(size) {
- case 8:
- subdivideCubicAt(t, src, srcoff, left, leftoff, right, rightoff);
- return;
- case 6:
- subdivideQuadAt(t, src, srcoff, left, leftoff, right, rightoff);
- return;
+ float x1 = src[offS ];
+ float y1 = src[offS + 1];
+ float x2 = src[offS + 2];
+ float y2 = src[offS + 3];
+
+ pts[offL ] = x1;
+ pts[offL + 1] = y1;
+
+ pts[offR + 2] = x2;
+ pts[offR + 3] = y2;
+
+ x1 = x1 + t * (x2 - x1);
+ y1 = y1 + t * (y2 - y1);
+
+ pts[offL + 2] = x1;
+ pts[offL + 3] = y1;
+
+ pts[offR ] = x1;
+ pts[offR + 1] = y1;
+ }
+
+ static void subdivideAt(final float t,
+ final float[] src, final int offS,
+ final float[] pts, final int offL, final int type)
+ {
+ // if instead of switch (perf + most probable cases first)
+ if (type == 8) {
+ subdivideCubicAt(t, src, offS, pts, offL, offL + type);
+ } else if (type == 4) {
+ subdivideLineAt(t, src, offS, pts, offL, offL + type);
+ } else {
+ subdivideQuadAt(t, src, offS, pts, offL, offL + type);
}
}
@@ -614,12 +773,12 @@ final class Helpers implements MarlinConst {
e += 2;
continue;
case TYPE_QUADTO:
- io.quadTo(_curves[e+0], _curves[e+1],
+ io.quadTo(_curves[e], _curves[e+1],
_curves[e+2], _curves[e+3]);
e += 4;
continue;
case TYPE_CUBICTO:
- io.curveTo(_curves[e+0], _curves[e+1],
+ io.curveTo(_curves[e], _curves[e+1],
_curves[e+2], _curves[e+3],
_curves[e+4], _curves[e+5]);
e += 6;
@@ -657,12 +816,12 @@ final class Helpers implements MarlinConst {
continue;
case TYPE_QUADTO:
e -= 4;
- io.quadTo(_curves[e+0], _curves[e+1],
+ io.quadTo(_curves[e], _curves[e+1],
_curves[e+2], _curves[e+3]);
continue;
case TYPE_CUBICTO:
e -= 6;
- io.curveTo(_curves[e+0], _curves[e+1],
+ io.curveTo(_curves[e], _curves[e+1],
_curves[e+2], _curves[e+3],
_curves[e+4], _curves[e+5]);
continue;
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/IntArrayCache.java b/src/java.desktop/share/classes/sun/java2d/marlin/IntArrayCache.java
index 248834d8804..d2a3a0ef1d4 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/IntArrayCache.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/IntArrayCache.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -99,7 +99,7 @@ final class IntArrayCache implements MarlinConst {
Reference(final IntArrayCache cache, final int initialSize) {
this.cache = cache;
this.clean = cache.clean;
- this.initial = createArray(initialSize, clean);
+ this.initial = createArray(initialSize);
if (DO_STATS) {
cache.stats.totalInitial += initialSize;
}
@@ -116,7 +116,7 @@ final class IntArrayCache implements MarlinConst {
logInfo(getLogPrefix(clean) + "IntArrayCache: "
+ "getArray[oversize]: length=\t" + length);
}
- return createArray(length, clean);
+ return createArray(length);
}
int[] widenArray(final int[] array, final int usedSize,
@@ -202,7 +202,7 @@ final class IntArrayCache implements MarlinConst {
if (DO_STATS) {
stats.createOp++;
}
- return createArray(arraySize, clean);
+ return createArray(arraySize);
}
void putArray(final int[] array)
@@ -229,12 +229,8 @@ final class IntArrayCache implements MarlinConst {
}
}
- static int[] createArray(final int length, final boolean clean) {
- if (clean) {
- return new int[length];
- }
- // use JDK9 Unsafe.allocateUninitializedArray(class, length):
- return (int[]) OffHeapArray.UNSAFE.allocateUninitializedArray(int.class, length);
+ static int[] createArray(final int length) {
+ return new int[length];
}
static void fill(final int[] array, final int fromIndex,
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinCache.java b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinCache.java
index 97daaf9bfa1..341d8e4a974 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinCache.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinCache.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -43,9 +43,9 @@ public final class MarlinCache implements MarlinConst {
// values are stored as int [x|alpha] where alpha is 8 bits
static final int RLE_MAX_WIDTH = 1 << (24 - 1);
- // 2048 (pixelSize) alpha values (width) x 32 rows (tile) = 64K bytes
+ // 4096 (pixels) alpha values (width) x 64 rows / 4 (tile) = 64K bytes
// x1 instead of 4 bytes (RLE) ie 1/4 capacity or average good RLE compression
- static final long INITIAL_CHUNK_ARRAY = TILE_H * INITIAL_PIXEL_DIM; // 64K
+ static final long INITIAL_CHUNK_ARRAY = TILE_H * INITIAL_PIXEL_WIDTH >> 2; // 64K
// The alpha map used by this object (taken out of our map cache) to convert
// pixel coverage counts gotten from MarlinCache (which are in the range
@@ -292,11 +292,11 @@ public final class MarlinCache implements MarlinConst {
// ensure values are in [0; MAX_AA_ALPHA] range
if (DO_AA_RANGE_CHECK) {
if (val < 0) {
- System.out.println("Invalid coverage = " + val);
+ MarlinUtils.logInfo("Invalid coverage = " + val);
val = 0;
}
if (val > MAX_AA_ALPHA) {
- System.out.println("Invalid coverage = " + val);
+ MarlinUtils.logInfo("Invalid coverage = " + val);
val = MAX_AA_ALPHA;
}
}
@@ -460,11 +460,11 @@ public final class MarlinCache implements MarlinConst {
// ensure values are in [0; MAX_AA_ALPHA] range
if (DO_AA_RANGE_CHECK) {
if (val < 0) {
- System.out.println("Invalid coverage = " + val);
+ MarlinUtils.logInfo("Invalid coverage = " + val);
val = 0;
}
if (val > MAX_AA_ALPHA) {
- System.out.println("Invalid coverage = " + val);
+ MarlinUtils.logInfo("Invalid coverage = " + val);
val = MAX_AA_ALPHA;
}
}
@@ -630,8 +630,6 @@ public final class MarlinCache implements MarlinConst {
final int halfmaxalpha = maxalpha >> 2;
for (int i = 0; i <= maxalpha; i++) {
alMap[i] = (byte) ((i * 255 + halfmaxalpha) / maxalpha);
-// System.out.println("alphaMap[" + i + "] = "
-// + Byte.toUnsignedInt(alMap[i]));
}
return alMap;
}
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinConst.java b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinConst.java
index 19b943a446f..a3ec1d491df 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinConst.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinConst.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -74,23 +74,34 @@ interface MarlinConst {
// do clean dirty array
static final boolean DO_CLEAN_DIRTY = false;
- // flag to use line simplifier
+ // flag to use collinear simplifier
static final boolean USE_SIMPLIFIER = MarlinProperties.isUseSimplifier();
+ // flag to use path simplifier
+ static final boolean USE_PATH_SIMPLIFIER = MarlinProperties.isUsePathSimplifier();
+
+ static final boolean DO_CLIP_SUBDIVIDER = MarlinProperties.isDoClipSubdivider();
+
// flag to enable logs related bounds checks
static final boolean DO_LOG_BOUNDS = ENABLE_LOGS && false;
+ // flag to enable float precision correction
+ static final boolean DO_FIX_FLOAT_PREC = true;
+
// Initial Array sizing (initial context capacity) ~ 450K
- // 2048 pixel (width x height) for initial capacity
- static final int INITIAL_PIXEL_DIM
- = MarlinProperties.getInitialImageSize();
+ // 4096 pixels (width) for initial capacity
+ static final int INITIAL_PIXEL_WIDTH
+ = MarlinProperties.getInitialPixelWidth();
+ // 2176 pixels (height) for initial capacity
+ static final int INITIAL_PIXEL_HEIGHT
+ = MarlinProperties.getInitialPixelHeight();
// typical array sizes: only odd numbers allowed below
static final int INITIAL_ARRAY = 256;
// alpha row dimension
- static final int INITIAL_AA_ARRAY = INITIAL_PIXEL_DIM;
+ static final int INITIAL_AA_ARRAY = INITIAL_PIXEL_WIDTH;
// 4096 edges for initial capacity
static final int INITIAL_EDGES_COUNT = MarlinProperties.getInitialEdges();
@@ -109,16 +120,17 @@ interface MarlinConst {
public static final int SUBPIXEL_LG_POSITIONS_Y
= MarlinProperties.getSubPixel_Log2_Y();
+ public static final int MIN_SUBPIXEL_LG_POSITIONS
+ = Math.min(SUBPIXEL_LG_POSITIONS_X, SUBPIXEL_LG_POSITIONS_Y);
+
// number of subpixels
public static final int SUBPIXEL_POSITIONS_X = 1 << (SUBPIXEL_LG_POSITIONS_X);
public static final int SUBPIXEL_POSITIONS_Y = 1 << (SUBPIXEL_LG_POSITIONS_Y);
- public static final float NORM_SUBPIXELS
- = (float) Math.sqrt(( SUBPIXEL_POSITIONS_X * SUBPIXEL_POSITIONS_X
- + SUBPIXEL_POSITIONS_Y * SUBPIXEL_POSITIONS_Y) / 2.0d);
+ public static final float MIN_SUBPIXELS = 1 << MIN_SUBPIXEL_LG_POSITIONS;
public static final int MAX_AA_ALPHA
- = SUBPIXEL_POSITIONS_X * SUBPIXEL_POSITIONS_Y;
+ = (SUBPIXEL_POSITIONS_X * SUBPIXEL_POSITIONS_Y);
public static final int TILE_H_LG = MarlinProperties.getTileSize_Log2();
public static final int TILE_H = 1 << TILE_H_LG; // 32 by default
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinProperties.java b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinProperties.java
index 7051713cb4e..f676f613b93 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinProperties.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinProperties.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -54,29 +54,41 @@ public final class MarlinProperties {
}
/**
- * Return the initial pixel size used to define initial arrays
- * (tile AA chunk, alpha line, buckets)
+ * Return the initial pixel width used to define initial arrays
+ * (tile AA chunk, alpha line)
*
- * @return 64 < initial pixel size < 32768 (2048 by default)
+ * @return 64 < initial pixel size < 32768 (4096 by default)
*/
- public static int getInitialImageSize() {
+ public static int getInitialPixelWidth() {
return align(
- getInteger("sun.java2d.renderer.pixelsize", 2048, 64, 32 * 1024),
+ getInteger("sun.java2d.renderer.pixelWidth", 4096, 64, 32 * 1024),
64);
}
/**
- * Return the log(2) corresponding to subpixel on x-axis (
+ * Return the initial pixel height used to define initial arrays
+ * (buckets)
*
- * @return 0 (1 subpixels) < initial pixel size < 8 (256 subpixels)
- * (3 by default ie 8 subpixels)
+ * @return 64 < initial pixel size < 32768 (2176 by default)
*/
- public static int getSubPixel_Log2_X() {
- return getInteger("sun.java2d.renderer.subPixel_log2_X", 3, 0, 8);
+ public static int getInitialPixelHeight() {
+ return align(
+ getInteger("sun.java2d.renderer.pixelHeight", 2176, 64, 32 * 1024),
+ 64);
}
/**
- * Return the log(2) corresponding to subpixel on y-axis (
+ * Return the log(2) corresponding to subpixel on x-axis
+ *
+ * @return 0 (1 subpixels) < initial pixel size < 8 (256 subpixels)
+ * (8 by default ie 256 subpixels)
+ */
+ public static int getSubPixel_Log2_X() {
+ return getInteger("sun.java2d.renderer.subPixel_log2_X", 8, 0, 8);
+ }
+
+ /**
+ * Return the log(2) corresponding to subpixel on y-axis
*
* @return 0 (1 subpixels) < initial pixel size < 8 (256 subpixels)
* (3 by default ie 8 subpixels)
@@ -88,7 +100,7 @@ public final class MarlinProperties {
/**
* Return the log(2) corresponding to the square tile size in pixels
*
- * @return 3 (8x8 pixels) < tile size < 8 (256x256 pixels)
+ * @return 3 (8x8 pixels) < tile size < 10 (1024x1024 pixels)
* (5 by default ie 32x32 pixels)
*/
public static int getTileSize_Log2() {
@@ -98,12 +110,11 @@ public final class MarlinProperties {
/**
* Return the log(2) corresponding to the tile width in pixels
*
- * @return 3 (8 pixels) < tile with < 8 (256 pixels)
- * (by default is given by the square tile size)
+ * @return 3 (8 pixels) < tile width < 10 (1024 pixels)
+ * (5 by default ie 32x32 pixels)
*/
public static int getTileWidth_Log2() {
- final int tileSize = getTileSize_Log2();
- return getInteger("sun.java2d.renderer.tileWidth_log2", tileSize, 3, 10);
+ return getInteger("sun.java2d.renderer.tileWidth_log2", 5, 3, 10);
}
/**
@@ -145,6 +156,18 @@ public final class MarlinProperties {
return getBoolean("sun.java2d.renderer.useSimplifier", "false");
}
+ public static boolean isUsePathSimplifier() {
+ return getBoolean("sun.java2d.renderer.usePathSimplifier", "false");
+ }
+
+ public static float getPathSimplifierPixelTolerance() {
+ // default: MIN_PEN_SIZE or less ?
+ return getFloat("sun.java2d.renderer.pathSimplifier.pixTol",
+ (1.0f / MarlinConst.MIN_SUBPIXELS),
+ 1e-3f,
+ 10.0f);
+ }
+
public static boolean isDoClip() {
return getBoolean("sun.java2d.renderer.clip", "true");
}
@@ -157,6 +180,14 @@ public final class MarlinProperties {
return getBoolean("sun.java2d.renderer.clip.runtime", "true");
}
+ public static boolean isDoClipSubdivider() {
+ return getBoolean("sun.java2d.renderer.clip.subdivider", "true");
+ }
+
+ public static float getSubdividerMinLength() {
+ return getFloat("sun.java2d.renderer.clip.subdivider.minLength", 100.0f, Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY);
+ }
+
// debugging parameters
public static boolean isDoStats() {
@@ -191,16 +222,20 @@ public final class MarlinProperties {
// quality settings
+ public static float getCurveLengthError() {
+ return getFloat("sun.java2d.renderer.curve_len_err", 0.01f, 1e-6f, 1.0f);
+ }
+
public static float getCubicDecD2() {
- return getFloat("sun.java2d.renderer.cubic_dec_d2", 1.0f, 0.01f, 4.0f);
+ return getFloat("sun.java2d.renderer.cubic_dec_d2", 1.0f, 1e-5f, 4.0f);
}
public static float getCubicIncD1() {
- return getFloat("sun.java2d.renderer.cubic_inc_d1", 0.4f, 0.01f, 2.0f);
+ return getFloat("sun.java2d.renderer.cubic_inc_d1", 0.2f, 1e-6f, 1.0f);
}
public static float getQuadDecD2() {
- return getFloat("sun.java2d.renderer.quad_dec_d2", 0.5f, 0.01f, 4.0f);
+ return getFloat("sun.java2d.renderer.quad_dec_d2", 0.5f, 1e-5f, 4.0f);
}
// system property utilities
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinRenderingEngine.java b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinRenderingEngine.java
index 1bcdd448b61..40ded575265 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinRenderingEngine.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinRenderingEngine.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -47,7 +47,21 @@ import sun.security.action.GetPropertyAction;
public final class MarlinRenderingEngine extends RenderingEngine
implements MarlinConst
{
- private static enum NormMode {
+ // slightly slower ~2% if enabled stroker clipping (lines) but skipping cap / join handling is few percents faster in specific cases
+ static final boolean DISABLE_2ND_STROKER_CLIPPING = true;
+
+ static final boolean DO_TRACE_PATH = false;
+
+ static final boolean DO_CLIP = MarlinProperties.isDoClip();
+ static final boolean DO_CLIP_FILL = true;
+ static final boolean DO_CLIP_RUNTIME_ENABLE = MarlinProperties.isDoClipRuntimeFlag();
+
+ private static final float MIN_PEN_SIZE = 1.0f / MIN_SUBPIXELS;
+
+ static final float UPPER_BND = Float.MAX_VALUE / 2.0f;
+ static final float LOWER_BND = -UPPER_BND;
+
+ private enum NormMode {
ON_WITH_AA {
@Override
PathIterator getNormalizingPathIterator(final RendererContext rdrCtx,
@@ -80,18 +94,6 @@ public final class MarlinRenderingEngine extends RenderingEngine
PathIterator src);
}
- private static final float MIN_PEN_SIZE = 1.0f / NORM_SUBPIXELS;
-
- static final float UPPER_BND = Float.MAX_VALUE / 2.0f;
- static final float LOWER_BND = -UPPER_BND;
-
- static final boolean DO_CLIP = MarlinProperties.isDoClip();
- static final boolean DO_CLIP_FILL = true;
-
- static final boolean DO_TRACE_PATH = false;
-
- static final boolean DO_CLIP_RUNTIME_ENABLE = MarlinProperties.isDoClipRuntimeFlag();
-
/**
* Public constructor
*/
@@ -419,14 +421,27 @@ public final class MarlinRenderingEngine extends RenderingEngine
pc2d = transformerPC2D.deltaTransformConsumer(pc2d, strokerat);
// stroker will adjust the clip rectangle (width / miter limit):
- pc2d = rdrCtx.stroker.init(pc2d, width, caps, join, miterlimit, scale);
+ pc2d = rdrCtx.stroker.init(pc2d, width, caps, join, miterlimit, scale,
+ (dashes == null));
+
+ // Curve Monotizer:
+ rdrCtx.monotonizer.init(width);
if (dashes != null) {
if (!recycleDashes) {
dashLen = dashes.length;
}
+ if (DO_TRACE_PATH) {
+ pc2d = transformerPC2D.traceDasher(pc2d);
+ }
pc2d = rdrCtx.dasher.init(pc2d, dashes, dashLen, dashphase,
recycleDashes);
+
+ if (DISABLE_2ND_STROKER_CLIPPING) {
+ // disable stoker clipping
+ rdrCtx.stroker.disableClipping();
+ }
+
} else if (rdrCtx.doClip && (caps != Stroker.CAP_BUTT)) {
if (DO_TRACE_PATH) {
pc2d = transformerPC2D.traceClosedPathDetector(pc2d);
@@ -625,6 +640,12 @@ public final class MarlinRenderingEngine extends RenderingEngine
private static void pathTo(final RendererContext rdrCtx, final PathIterator pi,
PathConsumer2D pc2d)
{
+ if (USE_PATH_SIMPLIFIER) {
+ // Use path simplifier at the first step
+ // to remove useless points
+ pc2d = rdrCtx.pathSimplifier.init(pc2d);
+ }
+
// mark context as DIRTY:
rdrCtx.dirty = true;
@@ -849,8 +870,6 @@ public final class MarlinRenderingEngine extends RenderingEngine
// trace Input:
pc2d = rdrCtx.transformerPC2D.traceInput(pc2d);
}
-
- // TODO: subdivide quad/cubic curves into monotonic curves ?
pathTo(rdrCtx, pi, pc2d);
} else {
@@ -1070,8 +1089,10 @@ public final class MarlinRenderingEngine extends RenderingEngine
logInfo("sun.java2d.renderer.edges = "
+ MarlinConst.INITIAL_EDGES_COUNT);
- logInfo("sun.java2d.renderer.pixelsize = "
- + MarlinConst.INITIAL_PIXEL_DIM);
+ logInfo("sun.java2d.renderer.pixelWidth = "
+ + MarlinConst.INITIAL_PIXEL_WIDTH);
+ logInfo("sun.java2d.renderer.pixelHeight = "
+ + MarlinConst.INITIAL_PIXEL_HEIGHT);
logInfo("sun.java2d.renderer.subPixel_log2_X = "
+ MarlinConst.SUBPIXEL_LG_POSITIONS_X);
@@ -1101,12 +1122,21 @@ public final class MarlinRenderingEngine extends RenderingEngine
// optimisation parameters
logInfo("sun.java2d.renderer.useSimplifier = "
+ MarlinConst.USE_SIMPLIFIER);
+ logInfo("sun.java2d.renderer.usePathSimplifier= "
+ + MarlinConst.USE_PATH_SIMPLIFIER);
+ logInfo("sun.java2d.renderer.pathSimplifier.pixTol = "
+ + MarlinProperties.getPathSimplifierPixelTolerance());
logInfo("sun.java2d.renderer.clip = "
+ MarlinProperties.isDoClip());
logInfo("sun.java2d.renderer.clip.runtime.enable = "
+ MarlinProperties.isDoClipRuntimeFlag());
+ logInfo("sun.java2d.renderer.clip.subdivider = "
+ + MarlinProperties.isDoClipSubdivider());
+ logInfo("sun.java2d.renderer.clip.subdivider.minLength = "
+ + MarlinProperties.getSubdividerMinLength());
+
// debugging parameters
logInfo("sun.java2d.renderer.doStats = "
+ MarlinConst.DO_STATS);
@@ -1124,6 +1154,8 @@ public final class MarlinRenderingEngine extends RenderingEngine
+ MarlinConst.LOG_UNSAFE_MALLOC);
// quality settings
+ logInfo("sun.java2d.renderer.curve_len_err = "
+ + MarlinProperties.getCurveLengthError());
logInfo("sun.java2d.renderer.cubic_dec_d2 = "
+ MarlinProperties.getCubicDecD2());
logInfo("sun.java2d.renderer.cubic_inc_d1 = "
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinTileGenerator.java b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinTileGenerator.java
index c3504ccfe17..122a809f94c 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinTileGenerator.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinTileGenerator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -31,6 +31,8 @@ import jdk.internal.misc.Unsafe;
final class MarlinTileGenerator implements AATileGenerator, MarlinConst {
+ private static final boolean DISABLE_BLEND = false;
+
private static final int MAX_TILE_ALPHA_SUM = TILE_W * TILE_H * MAX_AA_ALPHA;
private static final int TH_AA_ALPHA_FILL_EMPTY = ((MAX_AA_ALPHA + 1) / 3); // 33%
@@ -43,10 +45,10 @@ final class MarlinTileGenerator implements AATileGenerator, MarlinConst {
throw new IllegalStateException("Invalid MAX_TILE_ALPHA_SUM: " + MAX_TILE_ALPHA_SUM);
}
if (DO_TRACE) {
- System.out.println("MAX_AA_ALPHA : " + MAX_AA_ALPHA);
- System.out.println("TH_AA_ALPHA_FILL_EMPTY : " + TH_AA_ALPHA_FILL_EMPTY);
- System.out.println("TH_AA_ALPHA_FILL_FULL : " + TH_AA_ALPHA_FILL_FULL);
- System.out.println("FILL_TILE_W : " + FILL_TILE_W);
+ MarlinUtils.logInfo("MAX_AA_ALPHA : " + MAX_AA_ALPHA);
+ MarlinUtils.logInfo("TH_AA_ALPHA_FILL_EMPTY : " + TH_AA_ALPHA_FILL_EMPTY);
+ MarlinUtils.logInfo("TH_AA_ALPHA_FILL_FULL : " + TH_AA_ALPHA_FILL_FULL);
+ MarlinUtils.logInfo("FILL_TILE_W : " + FILL_TILE_W);
}
}
@@ -141,6 +143,10 @@ final class MarlinTileGenerator implements AATileGenerator, MarlinConst {
*/
@Override
public int getTypicalAlpha() {
+ if (DISABLE_BLEND) {
+ // always return empty tiles to disable blending operations
+ return 0x00;
+ }
int al = cache.alphaSumInTile(x);
// Note: if we have a filled rectangle that doesn't end on a tile
// border, we could still return 0xff, even though al!=maxTileAlphaSum
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinUtils.java b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinUtils.java
index 5645e706b2e..05ea55f170b 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/MarlinUtils.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/MarlinUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -60,4 +60,22 @@ public final class MarlinUtils {
th.printStackTrace(System.err);
}
}
+
+ // From sun.awt.util.ThreadGroupUtils
+
+ /**
+ * Returns a root thread group.
+ * Should be called with {@link sun.security.util.SecurityConstants#MODIFY_THREADGROUP_PERMISSION}
+ *
+ * @return a root {@code ThreadGroup}
+ */
+ public static ThreadGroup getRootThreadGroup() {
+ ThreadGroup currentTG = Thread.currentThread().getThreadGroup();
+ ThreadGroup parentTG = currentTG.getParent();
+ while (parentTG != null) {
+ currentTG = parentTG;
+ parentTG = currentTG.getParent();
+ }
+ return currentTG;
+ }
}
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/MergeSort.java b/src/java.desktop/share/classes/sun/java2d/marlin/MergeSort.java
index 52e1f6302ee..4dce3a7cd32 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/MergeSort.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/MergeSort.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2018, 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
@@ -61,7 +61,6 @@ final class MergeSort {
// Merge sorted parts (auxX/auxY) into x/y arrays
if ((insertionSortIndex == 0)
|| (auxX[insertionSortIndex - 1] <= auxX[insertionSortIndex])) {
-// System.out.println("mergeSortNoCopy: ordered");
// 34 occurences
// no initial left part or both sublists (auxX, auxY) are sorted:
// copy back data into (x, y):
@@ -135,7 +134,6 @@ final class MergeSort {
// If arrays are inverted ie all(A) > all(B) do swap A and B to dst
if (srcX[high - 1] <= srcX[low]) {
-// System.out.println("mergeSort: inverse ordered");
// 1561 occurences
final int left = mid - low;
final int right = high - mid;
@@ -151,7 +149,6 @@ final class MergeSort {
// If arrays are already sorted, just copy from src to dest. This is an
// optimization that results in faster sorts for nearly ordered lists.
if (srcX[mid - 1] <= srcX[mid]) {
-// System.out.println("mergeSort: ordered");
// 14 occurences
System.arraycopy(srcX, low, dstX, low, length);
System.arraycopy(srcY, low, dstY, low, length);
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/OffHeapArray.java b/src/java.desktop/share/classes/sun/java2d/marlin/OffHeapArray.java
index 676111a0152..4702a4ae1d9 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/OffHeapArray.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/OffHeapArray.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -31,7 +31,6 @@ import jdk.internal.ref.CleanerFactory;
/**
*
- * @author bourgesl
*/
final class OffHeapArray {
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/PathSimplifier.java b/src/java.desktop/share/classes/sun/java2d/marlin/PathSimplifier.java
new file mode 100644
index 00000000000..7b5e9e5e3a3
--- /dev/null
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/PathSimplifier.java
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2017, 2018, 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 sun.java2d.marlin;
+
+import sun.awt.geom.PathConsumer2D;
+
+final class PathSimplifier implements PathConsumer2D {
+
+ // distance threshold in pixels (device)
+ private static final float PIX_THRESHOLD = MarlinProperties.getPathSimplifierPixelTolerance();
+
+ private static final float SQUARE_TOLERANCE = PIX_THRESHOLD * PIX_THRESHOLD;
+
+ // members:
+ private PathConsumer2D delegate;
+ private float cx, cy;
+
+ PathSimplifier() {
+ }
+
+ PathSimplifier init(final PathConsumer2D delegate) {
+ this.delegate = delegate;
+ return this; // fluent API
+ }
+
+ @Override
+ public void pathDone() {
+ delegate.pathDone();
+ }
+
+ @Override
+ public void closePath() {
+ delegate.closePath();
+ }
+
+ @Override
+ public long getNativeConsumer() {
+ return 0;
+ }
+
+ @Override
+ public void quadTo(final float x1, final float y1,
+ final float xe, final float ye)
+ {
+ // Test if curve is too small:
+ float dx = (xe - cx);
+ float dy = (ye - cy);
+
+ if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+ // check control points P1:
+ dx = (x1 - cx);
+ dy = (y1 - cy);
+
+ if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+ return;
+ }
+ }
+ delegate.quadTo(x1, y1, xe, ye);
+ // final end point:
+ cx = xe;
+ cy = ye;
+ }
+
+ @Override
+ public void curveTo(final float x1, final float y1,
+ final float x2, final float y2,
+ final float xe, final float ye)
+ {
+ // Test if curve is too small:
+ float dx = (xe - cx);
+ float dy = (ye - cy);
+
+ if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+ // check control points P1:
+ dx = (x1 - cx);
+ dy = (y1 - cy);
+
+ if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+ // check control points P2:
+ dx = (x2 - cx);
+ dy = (y2 - cy);
+
+ if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+ return;
+ }
+ }
+ }
+ delegate.curveTo(x1, y1, x2, y2, xe, ye);
+ // final end point:
+ cx = xe;
+ cy = ye;
+ }
+
+ @Override
+ public void moveTo(final float xe, final float ye) {
+ delegate.moveTo(xe, ye);
+ // starting point:
+ cx = xe;
+ cy = ye;
+ }
+
+ @Override
+ public void lineTo(final float xe, final float ye) {
+ // Test if segment is too small:
+ float dx = (xe - cx);
+ float dy = (ye - cy);
+
+ if ((dx * dx + dy * dy) <= SQUARE_TOLERANCE) {
+ return;
+ }
+ delegate.lineTo(xe, ye);
+ // final end point:
+ cx = xe;
+ cy = ye;
+ }
+}
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/Renderer.java b/src/java.desktop/share/classes/sun/java2d/marlin/Renderer.java
index 3b880641196..4d5a14f5ab4 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/Renderer.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/Renderer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -54,9 +54,9 @@ final class Renderer implements PathConsumer2D, MarlinRenderer {
private static final int SUBPIXEL_TILE
= TILE_H << SUBPIXEL_LG_POSITIONS_Y;
- // 2048 (pixelSize) pixels (height) x 8 subpixels = 64K
+ // 2176 pixels (height) x 8 subpixels = 68K
static final int INITIAL_BUCKET_ARRAY
- = INITIAL_PIXEL_DIM * SUBPIXEL_POSITIONS_Y;
+ = INITIAL_PIXEL_HEIGHT * SUBPIXEL_POSITIONS_Y;
// crossing capacity = edges count / 4 ~ 1024
static final int INITIAL_CROSSING_COUNT = INITIAL_EDGES_COUNT >> 2;
@@ -77,13 +77,17 @@ final class Renderer implements PathConsumer2D, MarlinRenderer {
// curve break into lines
// cubic error in subpixels to decrement step
private static final float CUB_DEC_ERR_SUBPIX
- = MarlinProperties.getCubicDecD2() * (NORM_SUBPIXELS / 8.0f); // 1 pixel
+ = MarlinProperties.getCubicDecD2() * (SUBPIXEL_POSITIONS_X / 8.0f); // 1.0 / 8th pixel
// cubic error in subpixels to increment step
private static final float CUB_INC_ERR_SUBPIX
- = MarlinProperties.getCubicIncD1() * (NORM_SUBPIXELS / 8.0f); // 0.4 pixel
+ = MarlinProperties.getCubicIncD1() * (SUBPIXEL_POSITIONS_X / 8.0f); // 0.4 / 8th pixel
+ // scale factor for Y-axis contribution to quad / cubic errors:
+ public static final float SCALE_DY = ((float) SUBPIXEL_POSITIONS_X) / SUBPIXEL_POSITIONS_Y;
// TestNonAARasterization (JDK-8170879): cubics
// bad paths (59294/100000 == 59,29%, 94335 bad pixels (avg = 1,59), 3966 warnings (avg = 0,07)
+// 2018
+ // 1.0 / 0.2: bad paths (67194/100000 == 67,19%, 117394 bad pixels (avg = 1,75 - max = 9), 4042 warnings (avg = 0,06)
// cubic bind length to decrement step
public static final float CUB_DEC_BND
@@ -110,10 +114,12 @@ final class Renderer implements PathConsumer2D, MarlinRenderer {
// quad break into lines
// quadratic error in subpixels
private static final float QUAD_DEC_ERR_SUBPIX
- = MarlinProperties.getQuadDecD2() * (NORM_SUBPIXELS / 8.0f); // 0.5 pixel
+ = MarlinProperties.getQuadDecD2() * (SUBPIXEL_POSITIONS_X / 8.0f); // 0.5 / 8th pixel
// TestNonAARasterization (JDK-8170879): quads
// bad paths (62916/100000 == 62,92%, 103818 bad pixels (avg = 1,65), 6514 warnings (avg = 0,10)
+// 2018
+ // 0.50px = bad paths (62915/100000 == 62,92%, 103810 bad pixels (avg = 1,65), 6512 warnings (avg = 0,10)
// quadratic bind length to decrement step
public static final float QUAD_DEC_BND
@@ -180,7 +186,7 @@ final class Renderer implements PathConsumer2D, MarlinRenderer {
int count = 1; // dt = 1 / count
// maximum(ddX|Y) = norm(dbx, dby) * dt^2 (= 1)
- float maxDD = Math.abs(c.dbx) + Math.abs(c.dby);
+ float maxDD = Math.abs(c.dbx) + Math.abs(c.dby) * SCALE_DY;
final float _DEC_BND = QUAD_DEC_BND;
@@ -194,7 +200,8 @@ final class Renderer implements PathConsumer2D, MarlinRenderer {
}
}
- int nL = 0; // line count
+ final int nL = count; // line count
+
if (count > 1) {
final float icount = 1.0f / count; // dt
final float icount2 = icount * icount; // dt^2
@@ -204,17 +211,12 @@ final class Renderer implements PathConsumer2D, MarlinRenderer {
float dx = c.bx * icount2 + c.cx * icount;
float dy = c.by * icount2 + c.cy * icount;
- float x1, y1;
-
- while (--count > 0) {
- x1 = x0 + dx;
- dx += ddx;
- y1 = y0 + dy;
- dy += ddy;
+ // we use x0, y0 to walk the line
+ for (float x1 = x0, y1 = y0; --count > 0; dx += ddx, dy += ddy) {
+ x1 += dx;
+ y1 += dy;
addLine(x0, y0, x1, y1);
-
- if (DO_STATS) { nL++; }
x0 = x1;
y0 = y1;
}
@@ -222,7 +224,7 @@ final class Renderer implements PathConsumer2D, MarlinRenderer {
addLine(x0, y0, x2, y2);
if (DO_STATS) {
- rdrCtx.stats.stat_rdr_quadBreak.add(nL + 1);
+ rdrCtx.stats.stat_rdr_quadBreak.add(nL);
}
}
@@ -250,34 +252,20 @@ final class Renderer implements PathConsumer2D, MarlinRenderer {
dx = c.ax * icount3 + c.bx * icount2 + c.cx * icount;
dy = c.ay * icount3 + c.by * icount2 + c.cy * icount;
- // we use x0, y0 to walk the line
- float x1 = x0, y1 = y0;
int nL = 0; // line count
final float _DEC_BND = CUB_DEC_BND;
final float _INC_BND = CUB_INC_BND;
+ final float _SCALE_DY = SCALE_DY;
- while (count > 0) {
- // divide step by half:
- while (Math.abs(ddx) + Math.abs(ddy) >= _DEC_BND) {
- dddx /= 8.0f;
- dddy /= 8.0f;
- ddx = ddx / 4.0f - dddx;
- ddy = ddy / 4.0f - dddy;
- dx = (dx - ddx) / 2.0f;
- dy = (dy - ddy) / 2.0f;
+ // we use x0, y0 to walk the line
+ for (float x1 = x0, y1 = y0; count > 0; ) {
+ // inc / dec => ratio ~ 5 to minimize upscale / downscale but minimize edges
- count <<= 1;
- if (DO_STATS) {
- rdrCtx.stats.stat_rdr_curveBreak_dec.add(count);
- }
- }
-
- // double step:
+ // float step:
// can only do this on even "count" values, because we must divide count by 2
- while (count % 2 == 0
- && Math.abs(dx) + Math.abs(dy) <= _INC_BND)
- {
+ while ((count % 2 == 0)
+ && ((Math.abs(ddx) + Math.abs(ddy) * _SCALE_DY) <= _INC_BND)) {
dx = 2.0f * dx + ddx;
dy = 2.0f * dy + ddy;
ddx = 4.0f * (ddx + dddx);
@@ -290,26 +278,40 @@ final class Renderer implements PathConsumer2D, MarlinRenderer {
rdrCtx.stats.stat_rdr_curveBreak_inc.add(count);
}
}
- if (--count > 0) {
- x1 += dx;
- dx += ddx;
- ddx += dddx;
- y1 += dy;
- dy += ddy;
- ddy += dddy;
- } else {
- x1 = x3;
- y1 = y3;
+
+ // divide step by half:
+ while ((Math.abs(ddx) + Math.abs(ddy) * _SCALE_DY) >= _DEC_BND) {
+ dddx /= 8.0f;
+ dddy /= 8.0f;
+ ddx = ddx / 4.0f - dddx;
+ ddy = ddy / 4.0f - dddy;
+ dx = (dx - ddx) / 2.0f;
+ dy = (dy - ddy) / 2.0f;
+
+ count <<= 1;
+ if (DO_STATS) {
+ rdrCtx.stats.stat_rdr_curveBreak_dec.add(count);
+ }
+ }
+ if (--count == 0) {
+ break;
}
- addLine(x0, y0, x1, y1);
+ x1 += dx;
+ y1 += dy;
+ dx += ddx;
+ dy += ddy;
+ ddx += dddx;
+ ddy += dddy;
- if (DO_STATS) { nL++; }
+ addLine(x0, y0, x1, y1);
x0 = x1;
y0 = y1;
}
+ addLine(x0, y0, x3, y3);
+
if (DO_STATS) {
- rdrCtx.stats.stat_rdr_curveBreak.add(nL);
+ rdrCtx.stats.stat_rdr_curveBreak.add(nL + 1);
}
}
@@ -537,8 +539,8 @@ final class Renderer implements PathConsumer2D, MarlinRenderer {
edgeBuckets = edgeBuckets_ref.initial;
edgeBucketCounts = edgeBucketCounts_ref.initial;
- // 2048 (pixelsize) pixel large
- alphaLine_ref = rdrCtx.newCleanIntArrayRef(INITIAL_AA_ARRAY); // 8K
+ // 4096 pixels large
+ alphaLine_ref = rdrCtx.newCleanIntArrayRef(INITIAL_AA_ARRAY); // 16K
alphaLine = alphaLine_ref.initial;
crossings_ref = rdrCtx.newDirtyIntArrayRef(INITIAL_CROSSING_COUNT); // 2K
@@ -696,8 +698,10 @@ final class Renderer implements PathConsumer2D, MarlinRenderer {
{
final float xe = tosubpixx(pix_x3);
final float ye = tosubpixy(pix_y3);
- curve.set(x0, y0, tosubpixx(pix_x1), tosubpixy(pix_y1),
- tosubpixx(pix_x2), tosubpixy(pix_y2), xe, ye);
+ curve.set(x0, y0,
+ tosubpixx(pix_x1), tosubpixy(pix_y1),
+ tosubpixx(pix_x2), tosubpixy(pix_y2),
+ xe, ye);
curveBreakIntoLinesAndAdd(x0, y0, curve, xe, ye);
x0 = xe;
y0 = ye;
@@ -709,7 +713,9 @@ final class Renderer implements PathConsumer2D, MarlinRenderer {
{
final float xe = tosubpixx(pix_x2);
final float ye = tosubpixy(pix_y2);
- curve.set(x0, y0, tosubpixx(pix_x1), tosubpixy(pix_y1), xe, ye);
+ curve.set(x0, y0,
+ tosubpixx(pix_x1), tosubpixy(pix_y1),
+ xe, ye);
quadBreakIntoLinesAndAdd(x0, y0, curve, xe, ye);
x0 = xe;
y0 = ye;
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/RendererContext.java b/src/java.desktop/share/classes/sun/java2d/marlin/RendererContext.java
index 62013efcb9e..ba291d59eeb 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/RendererContext.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/RendererContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -31,6 +31,8 @@ import java.util.concurrent.atomic.AtomicInteger;
import sun.java2d.ReentrantContext;
import sun.java2d.marlin.ArrayCacheConst.CacheStats;
import sun.java2d.marlin.MarlinRenderingEngine.NormalizingPathIterator;
+import sun.java2d.marlin.TransformingPathConsumer2D.CurveBasicMonotonizer;
+import sun.java2d.marlin.TransformingPathConsumer2D.CurveClipSplitter;
/**
* This class is a renderer context dedicated to a single thread
@@ -70,6 +72,8 @@ final class RendererContext extends ReentrantContext implements IRendererContext
final Stroker stroker;
// Simplifies out collinear lines
final CollinearSimplifier simplifier = new CollinearSimplifier();
+ // Simplifies path
+ final PathSimplifier pathSimplifier = new PathSimplifier();
final Dasher dasher;
final MarlinTileGenerator ptg;
final MarlinCache cache;
@@ -81,6 +85,10 @@ final class RendererContext extends ReentrantContext implements IRendererContext
boolean closedPath = false;
// clip rectangle (ymin, ymax, xmin, xmax):
final float[] clipRect = new float[4];
+ // CurveBasicMonotonizer instance
+ final CurveBasicMonotonizer monotonizer;
+ // CurveClipSplitter instance
+ final CurveClipSplitter curveClipSplitter;
// Array caches:
/* clean int[] cache (zero-filled) = 5 refs */
@@ -121,6 +129,10 @@ final class RendererContext extends ReentrantContext implements IRendererContext
nPCPathIterator = new NormalizingPathIterator.NearestPixelCenter(float6);
nPQPathIterator = new NormalizingPathIterator.NearestPixelQuarter(float6);
+ // curve monotonizer & clip subdivider (before transformerPC2D init)
+ monotonizer = new CurveBasicMonotonizer(this);
+ curveClipSplitter = new CurveClipSplitter(this);
+
// MarlinRenderingEngine.TransformingPathConsumer2D
transformerPC2D = new TransformingPathConsumer2D(this);
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/RendererStats.java b/src/java.desktop/share/classes/sun/java2d/marlin/RendererStats.java
index 744074cafa5..256109c6d82 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/RendererStats.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/RendererStats.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -36,7 +36,6 @@ import static sun.java2d.marlin.MarlinUtils.logInfo;
import sun.java2d.marlin.stats.Histogram;
import sun.java2d.marlin.stats.Monitor;
import sun.java2d.marlin.stats.StatLong;
-import sun.awt.util.ThreadGroupUtils;
/**
* This class gathers global rendering statistics for debugging purposes only
@@ -359,7 +358,7 @@ public final class RendererStats implements MarlinConst {
AccessController.doPrivileged(
(PrivilegedActionStroker.
@@ -126,6 +126,7 @@ final class Stroker implements PathConsumer2D, MarlinConst {
: new PolyStack(rdrCtx);
this.curve = rdrCtx.curve;
+ this.curveSplitter = rdrCtx.curveClipSplitter;
}
/**
@@ -141,6 +142,7 @@ final class Stroker implements PathConsumer2D, MarlinConst {
* JOIN_BEVEL.
* @param miterLimit the desired miter limit
* @param scale scaling factor applied to clip boundaries
+ * @param subdivideCurves true to indicate to subdivide curves, false if dasher does
* @return this instance
*/
Stroker init(final PathConsumer2D pc2d,
@@ -148,12 +150,15 @@ final class Stroker implements PathConsumer2D, MarlinConst {
final int capStyle,
final int joinStyle,
final float miterLimit,
- final float scale)
+ final float scale,
+ final boolean subdivideCurves)
{
this.out = pc2d;
this.lineWidth2 = lineWidth / 2.0f;
this.invHalfLineWidth2Sq = 1.0f / (2.0f * lineWidth2 * lineWidth2);
+ this.monotonize = subdivideCurves;
+
this.capStyle = capStyle;
this.joinStyle = joinStyle;
@@ -191,6 +196,15 @@ final class Stroker implements PathConsumer2D, MarlinConst {
_clipRect[2] -= margin - rdrOffX;
_clipRect[3] += margin + rdrOffX;
this.clipRect = _clipRect;
+
+ // initialize curve splitter here for stroker & dasher:
+ if (DO_CLIP_SUBDIVIDER) {
+ subdivide = subdivideCurves;
+ // adjust padded clip rectangle:
+ curveSplitter.init();
+ } else {
+ subdivide = false;
+ }
} else {
this.clipRect = null;
this.cOutCode = 0;
@@ -199,6 +213,12 @@ final class Stroker implements PathConsumer2D, MarlinConst {
return this; // fluent API
}
+ void disableClipping() {
+ this.clipRect = null;
+ this.cOutCode = 0;
+ this.sOutCode = 0;
+ }
+
/**
* Disposes this stroker:
* clean up before reusing this instance
@@ -215,10 +235,8 @@ final class Stroker implements PathConsumer2D, MarlinConst {
Arrays.fill(offset1, 0.0f);
Arrays.fill(offset2, 0.0f);
Arrays.fill(miter, 0.0f);
- Arrays.fill(middle, 0.0f);
Arrays.fill(lp, 0.0f);
Arrays.fill(rp, 0.0f);
- Arrays.fill(subdivTs, 0.0f);
}
}
@@ -250,19 +268,20 @@ final class Stroker implements PathConsumer2D, MarlinConst {
return dx1 * dy2 <= dy1 * dx2;
}
- private void drawRoundJoin(float x, float y,
- float omx, float omy, float mx, float my,
- boolean rev,
- float threshold)
+ private void mayDrawRoundJoin(float cx, float cy,
+ float omx, float omy,
+ float mx, float my,
+ boolean rev)
{
if ((omx == 0.0f && omy == 0.0f) || (mx == 0.0f && my == 0.0f)) {
return;
}
- float domx = omx - mx;
- float domy = omy - my;
- float len = domx*domx + domy*domy;
- if (len < threshold) {
+ final float domx = omx - mx;
+ final float domy = omy - my;
+ final float lenSq = domx*domx + domy*domy;
+
+ if (lenSq < ROUND_JOIN_THRESHOLD) {
return;
}
@@ -272,7 +291,7 @@ final class Stroker implements PathConsumer2D, MarlinConst {
mx = -mx;
my = -my;
}
- drawRoundJoin(x, y, omx, omy, mx, my, rev);
+ drawRoundJoin(cx, cy, omx, omy, mx, my, rev);
}
private void drawRoundJoin(float cx, float cy,
@@ -383,7 +402,7 @@ final class Stroker implements PathConsumer2D, MarlinConst {
final float x1, final float y1,
final float x0p, final float y0p,
final float x1p, final float y1p,
- final float[] m, int off)
+ final float[] m)
{
float x10 = x1 - x0;
float y10 = y1 - y0;
@@ -402,8 +421,8 @@ final class Stroker implements PathConsumer2D, MarlinConst {
float den = x10*y10p - x10p*y10;
float t = x10p*(y0-y0p) - y10p*(x0-x0p);
t /= den;
- m[off++] = x0 + t*x10;
- m[off] = y0 + t*y10;
+ m[0] = x0 + t*x10;
+ m[1] = y0 + t*y10;
}
// Return the intersection point of the lines (x0, y0) -> (x1, y1)
@@ -412,7 +431,7 @@ final class Stroker implements PathConsumer2D, MarlinConst {
final float x1, final float y1,
final float x0p, final float y0p,
final float x1p, final float y1p,
- final float[] m, int off)
+ final float[] m)
{
float x10 = x1 - x0;
float y10 = y1 - y0;
@@ -430,20 +449,21 @@ final class Stroker implements PathConsumer2D, MarlinConst {
// immediately).
float den = x10*y10p - x10p*y10;
if (den == 0.0f) {
- m[off++] = (x0 + x0p) / 2.0f;
- m[off] = (y0 + y0p) / 2.0f;
- return;
+ m[2] = (x0 + x0p) / 2.0f;
+ m[3] = (y0 + y0p) / 2.0f;
+ } else {
+ float t = x10p*(y0-y0p) - y10p*(x0-x0p);
+ t /= den;
+ m[2] = x0 + t*x10;
+ m[3] = y0 + t*y10;
}
- float t = x10p*(y0-y0p) - y10p*(x0-x0p);
- t /= den;
- m[off++] = x0 + t*x10;
- m[off] = y0 + t*y10;
}
private void drawMiter(final float pdx, final float pdy,
final float x0, final float y0,
final float dx, final float dy,
- float omx, float omy, float mx, float my,
+ float omx, float omy,
+ float mx, float my,
boolean rev)
{
if ((mx == omx && my == omy) ||
@@ -461,8 +481,7 @@ final class Stroker implements PathConsumer2D, MarlinConst {
}
computeMiter((x0 - pdx) + omx, (y0 - pdy) + omy, x0 + omx, y0 + omy,
- (dx + x0) + mx, (dy + y0) + my, x0 + mx, y0 + my,
- miter, 0);
+ (dx + x0) + mx, (dy + y0) + my, x0 + mx, y0 + my, miter);
final float miterX = miter[0];
final float miterY = miter[1];
@@ -480,7 +499,7 @@ final class Stroker implements PathConsumer2D, MarlinConst {
@Override
public void moveTo(final float x0, final float y0) {
- moveTo(x0, y0, cOutCode);
+ _moveTo(x0, y0, cOutCode);
// update starting point:
this.sx0 = x0;
this.sy0 = y0;
@@ -496,7 +515,7 @@ final class Stroker implements PathConsumer2D, MarlinConst {
}
}
- private void moveTo(final float x0, final float y0,
+ private void _moveTo(final float x0, final float y0,
final int outcode)
{
if (prev == MOVE_TO) {
@@ -523,16 +542,40 @@ final class Stroker implements PathConsumer2D, MarlinConst {
final boolean force)
{
final int outcode0 = this.cOutCode;
+
if (!force && clipRect != null) {
final int outcode1 = Helpers.outcode(x1, y1, clipRect);
- this.cOutCode = outcode1;
- // basic rejection criteria
- if ((outcode0 & outcode1) != 0) {
- moveTo(x1, y1, outcode0);
- opened = true;
- return;
+ // Should clip
+ final int orCode = (outcode0 | outcode1);
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1;
+
+ // basic rejection criteria:
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => callback with subdivided parts:
+ boolean ret = curveSplitter.splitLine(cx0, cy0, x1, y1,
+ orCode, this);
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode1;
+ _moveTo(x1, y1, outcode0);
+ opened = true;
+ return;
+ }
}
+
+ this.cOutCode = outcode1;
}
float dx = x1 - cx0;
@@ -754,10 +797,7 @@ final class Stroker implements PathConsumer2D, MarlinConst {
if (joinStyle == JOIN_MITER) {
drawMiter(pdx, pdy, x0, y0, dx, dy, omx, omy, mx, my, cw);
} else if (joinStyle == JOIN_ROUND) {
- drawRoundJoin(x0, y0,
- omx, omy,
- mx, my, cw,
- ROUND_JOIN_THRESHOLD);
+ mayDrawRoundJoin(x0, y0, omx, omy, mx, my, cw);
}
}
emitLineTo(x0, y0, !cw);
@@ -767,18 +807,19 @@ final class Stroker implements PathConsumer2D, MarlinConst {
private static boolean within(final float x1, final float y1,
final float x2, final float y2,
- final float ERR)
+ final float err)
{
- assert ERR > 0 : "";
+ assert err > 0 : "";
// compare taxicab distance. ERR will always be small, so using
// true distance won't give much benefit
- return (Helpers.within(x1, x2, ERR) && // we want to avoid calling Math.abs
- Helpers.within(y1, y2, ERR)); // this is just as good.
+ return (Helpers.within(x1, x2, err) && // we want to avoid calling Math.abs
+ Helpers.within(y1, y2, err)); // this is just as good.
}
- private void getLineOffsets(float x1, float y1,
- float x2, float y2,
- float[] left, float[] right) {
+ private void getLineOffsets(final float x1, final float y1,
+ final float x2, final float y2,
+ final float[] left, final float[] right)
+ {
computeOffset(x2 - x1, y2 - y1, lineWidth2, offset0);
final float mx = offset0[0];
final float my = offset0[1];
@@ -786,14 +827,16 @@ final class Stroker implements PathConsumer2D, MarlinConst {
left[1] = y1 + my;
left[2] = x2 + mx;
left[3] = y2 + my;
+
right[0] = x1 - mx;
right[1] = y1 - my;
right[2] = x2 - mx;
right[3] = y2 - my;
}
- private int computeOffsetCubic(float[] pts, final int off,
- float[] leftOff, float[] rightOff)
+ private int computeOffsetCubic(final float[] pts, final int off,
+ final float[] leftOff,
+ final float[] rightOff)
{
// if p1=p2 or p3=p4 it means that the derivative at the endpoint
// vanishes, which creates problems with computeOffset. Usually
@@ -802,7 +845,7 @@ final class Stroker implements PathConsumer2D, MarlinConst {
// the input curve at the cusp, and passes it to this function.
// because of inaccuracies in the splitting, we consider points
// equal if they're very close to each other.
- final float x1 = pts[off + 0], y1 = pts[off + 1];
+ final float x1 = pts[off ], y1 = pts[off + 1];
final float x2 = pts[off + 2], y2 = pts[off + 3];
final float x3 = pts[off + 4], y3 = pts[off + 5];
final float x4 = pts[off + 6], y4 = pts[off + 7];
@@ -816,6 +859,7 @@ final class Stroker implements PathConsumer2D, MarlinConst {
// in which case ignore if p1 == p2
final boolean p1eqp2 = within(x1, y1, x2, y2, 6.0f * Math.ulp(y2));
final boolean p3eqp4 = within(x3, y3, x4, y4, 6.0f * Math.ulp(y4));
+
if (p1eqp2 && p3eqp4) {
getLineOffsets(x1, y1, x4, y4, leftOff, rightOff);
return 4;
@@ -831,6 +875,7 @@ final class Stroker implements PathConsumer2D, MarlinConst {
float dotsq = (dx1 * dx4 + dy1 * dy4);
dotsq *= dotsq;
float l1sq = dx1 * dx1 + dy1 * dy1, l4sq = dx4 * dx4 + dy4 * dy4;
+
if (Helpers.within(dotsq, l1sq * l4sq, 4.0f * Math.ulp(dotsq))) {
getLineOffsets(x1, y1, x4, y4, leftOff, rightOff);
return 4;
@@ -944,10 +989,11 @@ final class Stroker implements PathConsumer2D, MarlinConst {
// compute offset curves using bezier spline through t=0.5 (i.e.
// ComputedCurve(0.5) == IdealParallelCurve(0.5))
// return the kind of curve in the right and left arrays.
- private int computeOffsetQuad(float[] pts, final int off,
- float[] leftOff, float[] rightOff)
+ private int computeOffsetQuad(final float[] pts, final int off,
+ final float[] leftOff,
+ final float[] rightOff)
{
- final float x1 = pts[off + 0], y1 = pts[off + 1];
+ final float x1 = pts[off ], y1 = pts[off + 1];
final float x2 = pts[off + 2], y2 = pts[off + 3];
final float x3 = pts[off + 4], y3 = pts[off + 5];
@@ -968,6 +1014,7 @@ final class Stroker implements PathConsumer2D, MarlinConst {
// in which case ignore.
final boolean p1eqp2 = within(x1, y1, x2, y2, 6.0f * Math.ulp(y2));
final boolean p2eqp3 = within(x2, y2, x3, y3, 6.0f * Math.ulp(y3));
+
if (p1eqp2 || p2eqp3) {
getLineOffsets(x1, y1, x3, y3, leftOff, rightOff);
return 4;
@@ -977,6 +1024,7 @@ final class Stroker implements PathConsumer2D, MarlinConst {
float dotsq = (dx1 * dx3 + dy1 * dy3);
dotsq *= dotsq;
float l1sq = dx1 * dx1 + dy1 * dy1, l3sq = dx3 * dx3 + dy3 * dy3;
+
if (Helpers.within(dotsq, l1sq * l3sq, 4.0f * Math.ulp(dotsq))) {
getLineOffsets(x1, y1, x3, y3, leftOff, rightOff);
return 4;
@@ -992,151 +1040,111 @@ final class Stroker implements PathConsumer2D, MarlinConst {
float y1p = y1 + offset0[1]; // point
float x3p = x3 + offset1[0]; // end
float y3p = y3 + offset1[1]; // point
- safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, leftOff, 2);
+ safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, leftOff);
leftOff[0] = x1p; leftOff[1] = y1p;
leftOff[4] = x3p; leftOff[5] = y3p;
x1p = x1 - offset0[0]; y1p = y1 - offset0[1];
x3p = x3 - offset1[0]; y3p = y3 - offset1[1];
- safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, rightOff, 2);
+ safeComputeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, rightOff);
rightOff[0] = x1p; rightOff[1] = y1p;
rightOff[4] = x3p; rightOff[5] = y3p;
return 6;
}
- // finds values of t where the curve in pts should be subdivided in order
- // to get good offset curves a distance of w away from the middle curve.
- // Stores the points in ts, and returns how many of them there were.
- private static int findSubdivPoints(final Curve c, float[] pts, float[] ts,
- final int type, final float w)
- {
- final float x12 = pts[2] - pts[0];
- final float y12 = pts[3] - pts[1];
- // if the curve is already parallel to either axis we gain nothing
- // from rotating it.
- if (y12 != 0.0f && x12 != 0.0f) {
- // we rotate it so that the first vector in the control polygon is
- // parallel to the x-axis. This will ensure that rotated quarter
- // circles won't be subdivided.
- final float hypot = (float) Math.sqrt(x12 * x12 + y12 * y12);
- final float cos = x12 / hypot;
- final float sin = y12 / hypot;
- final float x1 = cos * pts[0] + sin * pts[1];
- final float y1 = cos * pts[1] - sin * pts[0];
- final float x2 = cos * pts[2] + sin * pts[3];
- final float y2 = cos * pts[3] - sin * pts[2];
- final float x3 = cos * pts[4] + sin * pts[5];
- final float y3 = cos * pts[5] - sin * pts[4];
-
- switch(type) {
- case 8:
- final float x4 = cos * pts[6] + sin * pts[7];
- final float y4 = cos * pts[7] - sin * pts[6];
- c.set(x1, y1, x2, y2, x3, y3, x4, y4);
- break;
- case 6:
- c.set(x1, y1, x2, y2, x3, y3);
- break;
- default:
- }
- } else {
- c.set(pts, type);
- }
-
- int ret = 0;
- // we subdivide at values of t such that the remaining rotated
- // curves are monotonic in x and y.
- ret += c.dxRoots(ts, ret);
- ret += c.dyRoots(ts, ret);
- // subdivide at inflection points.
- if (type == 8) {
- // quadratic curves can't have inflection points
- ret += c.infPoints(ts, ret);
- }
-
- // now we must subdivide at points where one of the offset curves will have
- // a cusp. This happens at ts where the radius of curvature is equal to w.
- ret += c.rootsOfROCMinusW(ts, ret, w, 0.0001f);
-
- ret = Helpers.filterOutNotInAB(ts, 0, ret, 0.0001f, 0.9999f);
- Helpers.isort(ts, 0, ret);
- return ret;
- }
-
@Override
public void curveTo(final float x1, final float y1,
final float x2, final float y2,
final float x3, final float y3)
{
final int outcode0 = this.cOutCode;
+
if (clipRect != null) {
+ final int outcode1 = Helpers.outcode(x1, y1, clipRect);
+ final int outcode2 = Helpers.outcode(x2, y2, clipRect);
final int outcode3 = Helpers.outcode(x3, y3, clipRect);
- this.cOutCode = outcode3;
- if ((outcode0 & outcode3) != 0) {
- final int outcode1 = Helpers.outcode(x1, y1, clipRect);
- final int outcode2 = Helpers.outcode(x2, y2, clipRect);
+ // Should clip
+ final int orCode = (outcode0 | outcode1 | outcode2 | outcode3);
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1 & outcode2 & outcode3;
- // basic rejection criteria
- if ((outcode0 & outcode1 & outcode2 & outcode3) != 0) {
- moveTo(x3, y3, outcode0);
+ // basic rejection criteria:
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => callback with subdivided parts:
+ boolean ret = curveSplitter.splitCurve(cx0, cy0, x1, y1,
+ x2, y2, x3, y3,
+ orCode, this);
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode3;
+ _moveTo(x3, y3, outcode0);
opened = true;
return;
}
}
+
+ this.cOutCode = outcode3;
}
+ _curveTo(x1, y1, x2, y2, x3, y3, outcode0);
+ }
- final float[] mid = middle;
-
- mid[0] = cx0; mid[1] = cy0;
- mid[2] = x1; mid[3] = y1;
- mid[4] = x2; mid[5] = y2;
- mid[6] = x3; mid[7] = y3;
-
+ private void _curveTo(final float x1, final float y1,
+ final float x2, final float y2,
+ final float x3, final float y3,
+ final int outcode0)
+ {
// need these so we can update the state at the end of this method
- final float xf = x3, yf = y3;
- float dxs = mid[2] - mid[0];
- float dys = mid[3] - mid[1];
- float dxf = mid[6] - mid[4];
- float dyf = mid[7] - mid[5];
+ float dxs = x1 - cx0;
+ float dys = y1 - cy0;
+ float dxf = x3 - x2;
+ float dyf = y3 - y2;
- boolean p1eqp2 = (dxs == 0.0f && dys == 0.0f);
- boolean p3eqp4 = (dxf == 0.0f && dyf == 0.0f);
- if (p1eqp2) {
- dxs = mid[4] - mid[0];
- dys = mid[5] - mid[1];
- if (dxs == 0.0f && dys == 0.0f) {
- dxs = mid[6] - mid[0];
- dys = mid[7] - mid[1];
+ if ((dxs == 0.0f) && (dys == 0.0f)) {
+ dxs = x2 - cx0;
+ dys = y2 - cy0;
+ if ((dxs == 0.0f) && (dys == 0.0f)) {
+ dxs = x3 - cx0;
+ dys = y3 - cy0;
}
}
- if (p3eqp4) {
- dxf = mid[6] - mid[2];
- dyf = mid[7] - mid[3];
- if (dxf == 0.0f && dyf == 0.0f) {
- dxf = mid[6] - mid[0];
- dyf = mid[7] - mid[1];
+ if ((dxf == 0.0f) && (dyf == 0.0f)) {
+ dxf = x3 - x1;
+ dyf = y3 - y1;
+ if ((dxf == 0.0f) && (dyf == 0.0f)) {
+ dxf = x3 - cx0;
+ dyf = y3 - cy0;
}
}
- if (dxs == 0.0f && dys == 0.0f) {
+ if ((dxs == 0.0f) && (dys == 0.0f)) {
// this happens if the "curve" is just a point
// fix outcode0 for lineTo() call:
if (clipRect != null) {
this.cOutCode = outcode0;
}
- lineTo(mid[0], mid[1]);
+ lineTo(cx0, cy0);
return;
}
// if these vectors are too small, normalize them, to avoid future
// precision problems.
if (Math.abs(dxs) < 0.1f && Math.abs(dys) < 0.1f) {
- float len = (float) Math.sqrt(dxs*dxs + dys*dys);
+ final float len = (float)Math.sqrt(dxs * dxs + dys * dys);
dxs /= len;
dys /= len;
}
if (Math.abs(dxf) < 0.1f && Math.abs(dyf) < 0.1f) {
- float len = (float) Math.sqrt(dxf*dxf + dyf*dyf);
+ final float len = (float)Math.sqrt(dxf * dxf + dyf * dyf);
dxf /= len;
dyf /= len;
}
@@ -1144,17 +1152,25 @@ final class Stroker implements PathConsumer2D, MarlinConst {
computeOffset(dxs, dys, lineWidth2, offset0);
drawJoin(cdx, cdy, cx0, cy0, dxs, dys, cmx, cmy, offset0[0], offset0[1], outcode0);
- final int nSplits = findSubdivPoints(curve, mid, subdivTs, 8, lineWidth2);
-
- float prevT = 0.0f;
- for (int i = 0, off = 0; i < nSplits; i++, off += 6) {
- final float t = subdivTs[i];
- Helpers.subdivideCubicAt((t - prevT) / (1.0f - prevT),
- mid, off, mid, off, mid, off + 6);
- prevT = t;
- }
-
+ int nSplits = 0;
+ final float[] mid;
final float[] l = lp;
+
+ if (monotonize) {
+ // monotonize curve:
+ final CurveBasicMonotonizer monotonizer
+ = rdrCtx.monotonizer.curve(cx0, cy0, x1, y1, x2, y2, x3, y3);
+
+ nSplits = monotonizer.nbSplits;
+ mid = monotonizer.middle;
+ } else {
+ // use left instead:
+ mid = l;
+ mid[0] = cx0; mid[1] = cy0;
+ mid[2] = x1; mid[3] = y1;
+ mid[4] = x2; mid[5] = y2;
+ mid[6] = x3; mid[7] = y3;
+ }
final float[] r = rp;
int kind = 0;
@@ -1178,8 +1194,8 @@ final class Stroker implements PathConsumer2D, MarlinConst {
}
this.prev = DRAWING_OP_TO;
- this.cx0 = xf;
- this.cy0 = yf;
+ this.cx0 = x3;
+ this.cy0 = y3;
this.cdx = dxf;
this.cdy = dyf;
this.cmx = (l[kind - 2] - r[kind - 2]) / 2.0f;
@@ -1191,74 +1207,101 @@ final class Stroker implements PathConsumer2D, MarlinConst {
final float x2, final float y2)
{
final int outcode0 = this.cOutCode;
+
if (clipRect != null) {
+ final int outcode1 = Helpers.outcode(x1, y1, clipRect);
final int outcode2 = Helpers.outcode(x2, y2, clipRect);
- this.cOutCode = outcode2;
- if ((outcode0 & outcode2) != 0) {
- final int outcode1 = Helpers.outcode(x1, y1, clipRect);
+ // Should clip
+ final int orCode = (outcode0 | outcode1 | outcode2);
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1 & outcode2;
- // basic rejection criteria
- if ((outcode0 & outcode1 & outcode2) != 0) {
- moveTo(x2, y2, outcode0);
+ // basic rejection criteria:
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => call lineTo() with subdivided curves:
+ boolean ret = curveSplitter.splitQuad(cx0, cy0, x1, y1,
+ x2, y2, orCode, this);
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode2;
+ _moveTo(x2, y2, outcode0);
opened = true;
return;
}
}
+
+ this.cOutCode = outcode2;
}
+ _quadTo(x1, y1, x2, y2, outcode0);
+ }
- final float[] mid = middle;
-
- mid[0] = cx0; mid[1] = cy0;
- mid[2] = x1; mid[3] = y1;
- mid[4] = x2; mid[5] = y2;
-
+ private void _quadTo(final float x1, final float y1,
+ final float x2, final float y2,
+ final int outcode0)
+ {
// need these so we can update the state at the end of this method
- final float xf = x2, yf = y2;
- float dxs = mid[2] - mid[0];
- float dys = mid[3] - mid[1];
- float dxf = mid[4] - mid[2];
- float dyf = mid[5] - mid[3];
- if ((dxs == 0.0f && dys == 0.0f) || (dxf == 0.0f && dyf == 0.0f)) {
- dxs = dxf = mid[4] - mid[0];
- dys = dyf = mid[5] - mid[1];
+ float dxs = x1 - cx0;
+ float dys = y1 - cy0;
+ float dxf = x2 - x1;
+ float dyf = y2 - y1;
+
+ if (((dxs == 0.0f) && (dys == 0.0f)) || ((dxf == 0.0f) && (dyf == 0.0f))) {
+ dxs = dxf = x2 - cx0;
+ dys = dyf = y2 - cy0;
}
- if (dxs == 0.0f && dys == 0.0f) {
+ if ((dxs == 0.0f) && (dys == 0.0f)) {
// this happens if the "curve" is just a point
// fix outcode0 for lineTo() call:
if (clipRect != null) {
this.cOutCode = outcode0;
}
- lineTo(mid[0], mid[1]);
+ lineTo(cx0, cy0);
return;
}
// if these vectors are too small, normalize them, to avoid future
// precision problems.
if (Math.abs(dxs) < 0.1f && Math.abs(dys) < 0.1f) {
- float len = (float) Math.sqrt(dxs*dxs + dys*dys);
+ final float len = (float)Math.sqrt(dxs * dxs + dys * dys);
dxs /= len;
dys /= len;
}
if (Math.abs(dxf) < 0.1f && Math.abs(dyf) < 0.1f) {
- float len = (float) Math.sqrt(dxf*dxf + dyf*dyf);
+ final float len = (float)Math.sqrt(dxf * dxf + dyf * dyf);
dxf /= len;
dyf /= len;
}
-
computeOffset(dxs, dys, lineWidth2, offset0);
drawJoin(cdx, cdy, cx0, cy0, dxs, dys, cmx, cmy, offset0[0], offset0[1], outcode0);
- int nSplits = findSubdivPoints(curve, mid, subdivTs, 6, lineWidth2);
-
- float prevt = 0.0f;
- for (int i = 0, off = 0; i < nSplits; i++, off += 4) {
- final float t = subdivTs[i];
- Helpers.subdivideQuadAt((t - prevt) / (1.0f - prevt),
- mid, off, mid, off, mid, off + 4);
- prevt = t;
- }
-
+ int nSplits = 0;
+ final float[] mid;
final float[] l = lp;
+
+ if (monotonize) {
+ // monotonize quad:
+ final CurveBasicMonotonizer monotonizer
+ = rdrCtx.monotonizer.quad(cx0, cy0, x1, y1, x2, y2);
+
+ nSplits = monotonizer.nbSplits;
+ mid = monotonizer.middle;
+ } else {
+ // use left instead:
+ mid = l;
+ mid[0] = cx0; mid[1] = cy0;
+ mid[2] = x1; mid[3] = y1;
+ mid[4] = x2; mid[5] = y2;
+ }
final float[] r = rp;
int kind = 0;
@@ -1282,8 +1325,8 @@ final class Stroker implements PathConsumer2D, MarlinConst {
}
this.prev = DRAWING_OP_TO;
- this.cx0 = xf;
- this.cy0 = yf;
+ this.cx0 = x2;
+ this.cy0 = y2;
this.cdx = dxf;
this.cdy = dyf;
this.cmx = (l[kind - 2] - r[kind - 2]) / 2.0f;
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/TransformingPathConsumer2D.java b/src/java.desktop/share/classes/sun/java2d/marlin/TransformingPathConsumer2D.java
index 0794b5142dd..2f8f8fd622a 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/TransformingPathConsumer2D.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/TransformingPathConsumer2D.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -28,11 +28,15 @@ package sun.java2d.marlin;
import sun.awt.geom.PathConsumer2D;
import java.awt.geom.AffineTransform;
import java.awt.geom.Path2D;
+import java.util.Arrays;
import sun.java2d.marlin.Helpers.IndexStack;
import sun.java2d.marlin.Helpers.PolyStack;
final class TransformingPathConsumer2D {
+ // higher uncertainty in float variant for huge shapes > 10^7
+ static final float CLIP_RECT_PADDING = 1.0f;
+
private final RendererContext rdrCtx;
// recycled ClosedPathDetector instance from detectClosedPath()
@@ -57,6 +61,7 @@ final class TransformingPathConsumer2D {
private final PathTracer tracerCPDetector = new PathTracer("ClosedPathDetector");
private final PathTracer tracerFiller = new PathTracer("Filler");
private final PathTracer tracerStroker = new PathTracer("Stroker");
+ private final PathTracer tracerDasher = new PathTracer("Dasher");
TransformingPathConsumer2D(final RendererContext rdrCtx) {
// used by RendererContext
@@ -85,6 +90,10 @@ final class TransformingPathConsumer2D {
return tracerStroker.init(out);
}
+ PathConsumer2D traceDasher(PathConsumer2D out) {
+ return tracerDasher.init(out);
+ }
+
PathConsumer2D detectClosedPath(PathConsumer2D out) {
return cpDetector.init(out);
}
@@ -500,11 +509,19 @@ final class TransformingPathConsumer2D {
private boolean outside = false;
- // The current point OUTSIDE
+ // The current point (TODO stupid repeated info)
private float cx0, cy0;
+ // The current point OUTSIDE
+ private float cox0, coy0;
+
+ private boolean subdivide = MarlinConst.DO_CLIP_SUBDIVIDER;
+ private final CurveClipSplitter curveSplitter;
+
PathClipFilter(final RendererContext rdrCtx) {
this.clipRect = rdrCtx.clipRect;
+ this.curveSplitter = rdrCtx.curveClipSplitter;
+
this.stack = (rdrCtx.stats != null) ?
new IndexStack(rdrCtx,
rdrCtx.stats.stat_pcf_idxstack_indices,
@@ -529,6 +546,11 @@ final class TransformingPathConsumer2D {
_clipRect[2] -= margin - rdrOffX;
_clipRect[3] += margin + rdrOffX;
+ if (MarlinConst.DO_CLIP_SUBDIVIDER) {
+ // adjust padded clip rectangle:
+ curveSplitter.init();
+ }
+
this.init_corners = true;
this.gOutCode = MarlinConst.OUTCODE_MASK_T_B_L_R;
@@ -579,7 +601,9 @@ final class TransformingPathConsumer2D {
}
stack.pullAll(corners, out);
}
- out.lineTo(cx0, cy0);
+ out.lineTo(cox0, coy0);
+ this.cx0 = cox0;
+ this.cy0 = coy0;
}
@Override
@@ -604,38 +628,68 @@ final class TransformingPathConsumer2D {
public void moveTo(final float x0, final float y0) {
finishPath();
- final int outcode = Helpers.outcode(x0, y0, clipRect);
- this.cOutCode = outcode;
+ this.cOutCode = Helpers.outcode(x0, y0, clipRect);
this.outside = false;
out.moveTo(x0, y0);
+ this.cx0 = x0;
+ this.cy0 = y0;
}
@Override
public void lineTo(final float xe, final float ye) {
final int outcode0 = this.cOutCode;
final int outcode1 = Helpers.outcode(xe, ye, clipRect);
- this.cOutCode = outcode1;
- final int sideCode = (outcode0 & outcode1);
+ // Should clip
+ final int orCode = (outcode0 | outcode1);
+ if (orCode != 0) {
+ final int sideCode = (outcode0 & outcode1);
- // basic rejection criteria:
- if (sideCode == 0) {
- this.gOutCode = 0;
- } else {
- this.gOutCode &= sideCode;
- // keep last point coordinate before entering the clip again:
- this.outside = true;
- this.cx0 = xe;
- this.cy0 = ye;
+ // basic rejection criteria:
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ boolean ret;
+ // subdivide curve => callback with subdivided parts:
+ if (outside) {
+ ret = curveSplitter.splitLine(cox0, coy0, xe, ye,
+ orCode, this);
+ } else {
+ ret = curveSplitter.splitLine(cx0, cy0, xe, ye,
+ orCode, this);
+ }
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode1;
+ this.gOutCode &= sideCode;
+ // keep last point coordinate before entering the clip again:
+ this.outside = true;
+ this.cox0 = xe;
+ this.coy0 = ye;
- clip(sideCode, outcode0, outcode1);
- return;
+ clip(sideCode, outcode0, outcode1);
+ return;
+ }
}
+
+ this.cOutCode = outcode1;
+ this.gOutCode = 0;
+
if (outside) {
finish();
}
// clipping disabled:
out.lineTo(xe, ye);
+ this.cx0 = xe;
+ this.cy0 = ye;
}
private void clip(final int sideCode,
@@ -655,22 +709,18 @@ final class TransformingPathConsumer2D {
// add corners to outside stack:
switch (tbCode) {
case MarlinConst.OUTCODE_TOP:
-// System.out.println("TOP "+ ((off == 0) ? "LEFT" : "RIGHT"));
stack.push(off); // top
return;
case MarlinConst.OUTCODE_BOTTOM:
-// System.out.println("BOTTOM "+ ((off == 0) ? "LEFT" : "RIGHT"));
stack.push(off + 1); // bottom
return;
default:
// both TOP / BOTTOM:
if ((outcode0 & MarlinConst.OUTCODE_TOP) != 0) {
-// System.out.println("TOP + BOTTOM "+ ((off == 0) ? "LEFT" : "RIGHT"));
// top to bottom
stack.push(off); // top
stack.push(off + 1); // bottom
} else {
-// System.out.println("BOTTOM + TOP "+ ((off == 0) ? "LEFT" : "RIGHT"));
// bottom to top
stack.push(off + 1); // bottom
stack.push(off); // top
@@ -685,34 +735,62 @@ final class TransformingPathConsumer2D {
final float xe, final float ye)
{
final int outcode0 = this.cOutCode;
+ final int outcode1 = Helpers.outcode(x1, y1, clipRect);
+ final int outcode2 = Helpers.outcode(x2, y2, clipRect);
final int outcode3 = Helpers.outcode(xe, ye, clipRect);
- this.cOutCode = outcode3;
- int sideCode = outcode0 & outcode3;
-
- if (sideCode == 0) {
- this.gOutCode = 0;
- } else {
- sideCode &= Helpers.outcode(x1, y1, clipRect);
- sideCode &= Helpers.outcode(x2, y2, clipRect);
- this.gOutCode &= sideCode;
+ // Should clip
+ final int orCode = (outcode0 | outcode1 | outcode2 | outcode3);
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1 & outcode2 & outcode3;
// basic rejection criteria:
- if (sideCode != 0) {
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => callback with subdivided parts:
+ boolean ret;
+ if (outside) {
+ ret = curveSplitter.splitCurve(cox0, coy0, x1, y1,
+ x2, y2, xe, ye,
+ orCode, this);
+ } else {
+ ret = curveSplitter.splitCurve(cx0, cy0, x1, y1,
+ x2, y2, xe, ye,
+ orCode, this);
+ }
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode3;
+ this.gOutCode &= sideCode;
// keep last point coordinate before entering the clip again:
this.outside = true;
- this.cx0 = xe;
- this.cy0 = ye;
+ this.cox0 = xe;
+ this.coy0 = ye;
clip(sideCode, outcode0, outcode3);
return;
}
}
+
+ this.cOutCode = outcode3;
+ this.gOutCode = 0;
+
if (outside) {
finish();
}
// clipping disabled:
out.curveTo(x1, y1, x2, y2, xe, ye);
+ this.cx0 = xe;
+ this.cy0 = ye;
}
@Override
@@ -720,33 +798,59 @@ final class TransformingPathConsumer2D {
final float xe, final float ye)
{
final int outcode0 = this.cOutCode;
+ final int outcode1 = Helpers.outcode(x1, y1, clipRect);
final int outcode2 = Helpers.outcode(xe, ye, clipRect);
- this.cOutCode = outcode2;
- int sideCode = outcode0 & outcode2;
-
- if (sideCode == 0) {
- this.gOutCode = 0;
- } else {
- sideCode &= Helpers.outcode(x1, y1, clipRect);
- this.gOutCode &= sideCode;
+ // Should clip
+ final int orCode = (outcode0 | outcode1 | outcode2);
+ if (orCode != 0) {
+ final int sideCode = outcode0 & outcode1 & outcode2;
// basic rejection criteria:
- if (sideCode != 0) {
+ if (sideCode == 0) {
+ // ovelap clip:
+ if (subdivide) {
+ // avoid reentrance
+ subdivide = false;
+ // subdivide curve => callback with subdivided parts:
+ boolean ret;
+ if (outside) {
+ ret = curveSplitter.splitQuad(cox0, coy0, x1, y1,
+ xe, ye, orCode, this);
+ } else {
+ ret = curveSplitter.splitQuad(cx0, cy0, x1, y1,
+ xe, ye, orCode, this);
+ }
+ // reentrance is done:
+ subdivide = true;
+ if (ret) {
+ return;
+ }
+ }
+ // already subdivided so render it
+ } else {
+ this.cOutCode = outcode2;
+ this.gOutCode &= sideCode;
// keep last point coordinate before entering the clip again:
this.outside = true;
- this.cx0 = xe;
- this.cy0 = ye;
+ this.cox0 = xe;
+ this.coy0 = ye;
clip(sideCode, outcode0, outcode2);
return;
}
}
+
+ this.cOutCode = outcode2;
+ this.gOutCode = 0;
+
if (outside) {
finish();
}
// clipping disabled:
out.quadTo(x1, y1, xe, ye);
+ this.cx0 = xe;
+ this.cy0 = ye;
}
@Override
@@ -755,6 +859,261 @@ final class TransformingPathConsumer2D {
}
}
+ static final class CurveClipSplitter {
+
+ static final float LEN_TH = MarlinProperties.getSubdividerMinLength();
+ static final boolean DO_CHECK_LENGTH = (LEN_TH > 0.0f);
+
+ private static final boolean TRACE = false;
+
+ private static final int MAX_N_CURVES = 3 * 4;
+
+ // clip rectangle (ymin, ymax, xmin, xmax):
+ final float[] clipRect;
+
+ // clip rectangle (ymin, ymax, xmin, xmax) including padding:
+ final float[] clipRectPad = new float[4];
+ private boolean init_clipRectPad = false;
+
+ // This is where the curve to be processed is put. We give it
+ // enough room to store all curves.
+ final float[] middle = new float[MAX_N_CURVES * 8 + 2];
+ // t values at subdivision points
+ private final float[] subdivTs = new float[MAX_N_CURVES];
+
+ // dirty curve
+ private final Curve curve;
+
+ CurveClipSplitter(final RendererContext rdrCtx) {
+ this.clipRect = rdrCtx.clipRect;
+ this.curve = rdrCtx.curve;
+ }
+
+ void init() {
+ this.init_clipRectPad = true;
+ }
+
+ private void initPaddedClip() {
+ // bounds as half-open intervals: minX <= x < maxX and minY <= y < maxY
+ // adjust padded clip rectangle (ymin, ymax, xmin, xmax):
+ // add a rounding error (curve subdivision ~ 0.1px):
+ final float[] _clipRect = clipRect;
+ final float[] _clipRectPad = clipRectPad;
+
+ _clipRectPad[0] = _clipRect[0] - CLIP_RECT_PADDING;
+ _clipRectPad[1] = _clipRect[1] + CLIP_RECT_PADDING;
+ _clipRectPad[2] = _clipRect[2] - CLIP_RECT_PADDING;
+ _clipRectPad[3] = _clipRect[3] + CLIP_RECT_PADDING;
+
+ if (TRACE) {
+ MarlinUtils.logInfo("clip: X [" + _clipRectPad[2] + " .. " + _clipRectPad[3] +"] "
+ + "Y ["+ _clipRectPad[0] + " .. " + _clipRectPad[1] +"]");
+ }
+ }
+
+ boolean splitLine(final float x0, final float y0,
+ final float x1, final float y1,
+ final int outCodeOR,
+ final PathConsumer2D out)
+ {
+ if (TRACE) {
+ MarlinUtils.logInfo("divLine P0(" + x0 + ", " + y0 + ") P1(" + x1 + ", " + y1 + ")");
+ }
+
+ if (DO_CHECK_LENGTH && Helpers.fastLineLen(x0, y0, x1, y1) <= LEN_TH) {
+ return false;
+ }
+
+ final float[] mid = middle;
+ mid[0] = x0; mid[1] = y0;
+ mid[2] = x1; mid[3] = y1;
+
+ return subdivideAtIntersections(4, outCodeOR, out);
+ }
+
+ boolean splitQuad(final float x0, final float y0,
+ final float x1, final float y1,
+ final float x2, final float y2,
+ final int outCodeOR,
+ final PathConsumer2D out)
+ {
+ if (TRACE) {
+ MarlinUtils.logInfo("divQuad P0(" + x0 + ", " + y0 + ") P1(" + x1 + ", " + y1 + ") P2(" + x2 + ", " + y2 + ")");
+ }
+
+ if (DO_CHECK_LENGTH && Helpers.fastQuadLen(x0, y0, x1, y1, x2, y2) <= LEN_TH) {
+ return false;
+ }
+
+ final float[] mid = middle;
+ mid[0] = x0; mid[1] = y0;
+ mid[2] = x1; mid[3] = y1;
+ mid[4] = x2; mid[5] = y2;
+
+ return subdivideAtIntersections(6, outCodeOR, out);
+ }
+
+ boolean splitCurve(final float x0, final float y0,
+ final float x1, final float y1,
+ final float x2, final float y2,
+ final float x3, final float y3,
+ final int outCodeOR,
+ final PathConsumer2D out)
+ {
+ if (TRACE) {
+ MarlinUtils.logInfo("divCurve P0(" + x0 + ", " + y0 + ") P1(" + x1 + ", " + y1 + ") P2(" + x2 + ", " + y2 + ") P3(" + x3 + ", " + y3 + ")");
+ }
+
+ if (DO_CHECK_LENGTH && Helpers.fastCurvelen(x0, y0, x1, y1, x2, y2, x3, y3) <= LEN_TH) {
+ return false;
+ }
+
+ final float[] mid = middle;
+ mid[0] = x0; mid[1] = y0;
+ mid[2] = x1; mid[3] = y1;
+ mid[4] = x2; mid[5] = y2;
+ mid[6] = x3; mid[7] = y3;
+
+ return subdivideAtIntersections(8, outCodeOR, out);
+ }
+
+ private boolean subdivideAtIntersections(final int type, final int outCodeOR,
+ final PathConsumer2D out)
+ {
+ final float[] mid = middle;
+ final float[] subTs = subdivTs;
+
+ if (init_clipRectPad) {
+ init_clipRectPad = false;
+ initPaddedClip();
+ }
+
+ final int nSplits = Helpers.findClipPoints(curve, mid, subTs, type,
+ outCodeOR, clipRectPad);
+
+ if (TRACE) {
+ MarlinUtils.logInfo("nSplits: "+ nSplits);
+ MarlinUtils.logInfo("subTs: "+Arrays.toString(Arrays.copyOfRange(subTs, 0, nSplits)));
+ }
+ if (nSplits == 0) {
+ // only curve support shortcut
+ return false;
+ }
+ float prevT = 0.0f;
+
+ for (int i = 0, off = 0; i < nSplits; i++, off += type) {
+ final float t = subTs[i];
+
+ Helpers.subdivideAt((t - prevT) / (1.0f - prevT),
+ mid, off, mid, off, type);
+ prevT = t;
+ }
+
+ for (int i = 0, off = 0; i <= nSplits; i++, off += type) {
+ if (TRACE) {
+ MarlinUtils.logInfo("Part Curve "+Arrays.toString(Arrays.copyOfRange(mid, off, off + type)));
+ }
+ emitCurrent(type, mid, off, out);
+ }
+ return true;
+ }
+
+ static void emitCurrent(final int type, final float[] pts,
+ final int off, final PathConsumer2D out)
+ {
+ // if instead of switch (perf + most probable cases first)
+ if (type == 8) {
+ out.curveTo(pts[off + 2], pts[off + 3],
+ pts[off + 4], pts[off + 5],
+ pts[off + 6], pts[off + 7]);
+ } else if (type == 4) {
+ out.lineTo(pts[off + 2], pts[off + 3]);
+ } else {
+ out.quadTo(pts[off + 2], pts[off + 3],
+ pts[off + 4], pts[off + 5]);
+ }
+ }
+ }
+
+ static final class CurveBasicMonotonizer {
+
+ private static final int MAX_N_CURVES = 11;
+
+ // squared half line width (for stroker)
+ private float lw2;
+
+ // number of splitted curves
+ int nbSplits;
+
+ // This is where the curve to be processed is put. We give it
+ // enough room to store all curves.
+ final float[] middle = new float[MAX_N_CURVES * 6 + 2];
+ // t values at subdivision points
+ private final float[] subdivTs = new float[MAX_N_CURVES - 1];
+
+ // dirty curve
+ private final Curve curve;
+
+ CurveBasicMonotonizer(final RendererContext rdrCtx) {
+ this.curve = rdrCtx.curve;
+ }
+
+ void init(final float lineWidth) {
+ this.lw2 = (lineWidth * lineWidth) / 4.0f;
+ }
+
+ CurveBasicMonotonizer curve(final float x0, final float y0,
+ final float x1, final float y1,
+ final float x2, final float y2,
+ final float x3, final float y3)
+ {
+ final float[] mid = middle;
+ mid[0] = x0; mid[1] = y0;
+ mid[2] = x1; mid[3] = y1;
+ mid[4] = x2; mid[5] = y2;
+ mid[6] = x3; mid[7] = y3;
+
+ final float[] subTs = subdivTs;
+ final int nSplits = Helpers.findSubdivPoints(curve, mid, subTs, 8, lw2);
+
+ float prevT = 0.0f;
+ for (int i = 0, off = 0; i < nSplits; i++, off += 6) {
+ final float t = subTs[i];
+
+ Helpers.subdivideCubicAt((t - prevT) / (1.0f - prevT),
+ mid, off, mid, off, off + 6);
+ prevT = t;
+ }
+
+ this.nbSplits = nSplits;
+ return this;
+ }
+
+ CurveBasicMonotonizer quad(final float x0, final float y0,
+ final float x1, final float y1,
+ final float x2, final float y2)
+ {
+ final float[] mid = middle;
+ mid[0] = x0; mid[1] = y0;
+ mid[2] = x1; mid[3] = y1;
+ mid[4] = x2; mid[5] = y2;
+
+ final float[] subTs = subdivTs;
+ final int nSplits = Helpers.findSubdivPoints(curve, mid, subTs, 6, lw2);
+
+ float prevt = 0.0f;
+ for (int i = 0, off = 0; i < nSplits; i++, off += 4) {
+ final float t = subTs[i];
+ Helpers.subdivideQuadAt((t - prevt) / (1.0f - prevt),
+ mid, off, mid, off, off + 4);
+ prevt = t;
+ }
+
+ this.nbSplits = nSplits;
+ return this;
+ }
+ }
+
static final class PathTracer implements PathConsumer2D {
private final String prefix;
private PathConsumer2D out;
@@ -808,7 +1167,7 @@ final class TransformingPathConsumer2D {
}
private void log(final String message) {
- System.out.println(prefix + message);
+ MarlinUtils.logInfo(prefix + message);
}
@Override
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/Version.java b/src/java.desktop/share/classes/sun/java2d/marlin/Version.java
index 1a0de29c444..7370d9379bb 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/Version.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/Version.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -27,7 +27,7 @@ package sun.java2d.marlin;
public final class Version {
- private static final String VERSION = "marlin-0.8.2-Unsafe-OpenJDK";
+ private static final String VERSION = "marlin-0.9.1-Unsafe-OpenJDK";
public static String getVersion() {
return VERSION;
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/stats/Histogram.java b/src/java.desktop/share/classes/sun/java2d/marlin/stats/Histogram.java
index 92865cbf3f4..54edf766561 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/stats/Histogram.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/stats/Histogram.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -42,7 +42,6 @@ public final class Histogram extends StatLong {
for (int i = 2; i < MAX; i++) {
STEPS[i] = STEPS[i - 1] * BUCKET;
}
-// System.out.println("Histogram.STEPS = " + Arrays.toString(STEPS));
}
static int bucket(int val) {
diff --git a/src/java.desktop/share/classes/sun/java2d/marlin/stats/StatLong.java b/src/java.desktop/share/classes/sun/java2d/marlin/stats/StatLong.java
index 50f906f708e..9aca2a420bd 100644
--- a/src/java.desktop/share/classes/sun/java2d/marlin/stats/StatLong.java
+++ b/src/java.desktop/share/classes/sun/java2d/marlin/stats/StatLong.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, 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
@@ -71,9 +71,7 @@ public class StatLong {
@Override
public String toString() {
- final StringBuilder sb = new StringBuilder(128);
- toString(sb);
- return sb.toString();
+ return toString(new StringBuilder(128)).toString();
}
public final StringBuilder toString(final StringBuilder sb) {
diff --git a/src/java.desktop/share/classes/sun/java2d/pipe/RenderingEngine.java b/src/java.desktop/share/classes/sun/java2d/pipe/RenderingEngine.java
index c5111487c3b..80cbe2d8b32 100644
--- a/src/java.desktop/share/classes/sun/java2d/pipe/RenderingEngine.java
+++ b/src/java.desktop/share/classes/sun/java2d/pipe/RenderingEngine.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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,7 +30,6 @@ import java.awt.BasicStroke;
import java.awt.geom.PathIterator;
import java.awt.geom.AffineTransform;
-import java.security.PrivilegedAction;
import java.security.AccessController;
import sun.security.action.GetPropertyAction;
diff --git a/src/java.desktop/share/native/libawt/awt/image/cvutils/img_colors.c b/src/java.desktop/share/native/libawt/awt/image/cvutils/img_colors.c
index cc11ad1cfd2..94a20cc6d39 100644
--- a/src/java.desktop/share/native/libawt/awt/image/cvutils/img_colors.c
+++ b/src/java.desktop/share/native/libawt/awt/image/cvutils/img_colors.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, 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
@@ -38,6 +38,7 @@
extern JavaVM *jvm;
#endif
+#include "img_colors.h"
#define jio_fprintf fprintf
@@ -515,7 +516,7 @@ handle_biggest_offenders(int testtblsize, int maxcolors) {
}
}
-void
+JNIEXPORT void JNICALL
img_makePalette(int cmapsize, int tablesize, int lookupsize,
float lscale, float weight,
int prevclrs, int doMac,
diff --git a/src/java.desktop/share/native/libawt/awt/image/cvutils/img_colors.h b/src/java.desktop/share/native/libawt/awt/image/cvutils/img_colors.h
index 60f25ca2da5..3971d2b9b0b 100644
--- a/src/java.desktop/share/native/libawt/awt/image/cvutils/img_colors.h
+++ b/src/java.desktop/share/native/libawt/awt/image/cvutils/img_colors.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, 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
@@ -23,10 +23,13 @@
* questions.
*/
-extern void img_makePalette(int cmapsize, int tablesize, int lookupsize,
- float lscale, float weight,
- int prevclrs, int doMac,
- unsigned char *reds,
- unsigned char *greens,
- unsigned char *blues,
- unsigned char *lookup);
+#include "jni.h"
+
+JNIEXPORT void JNICALL
+img_makePalette(int cmapsize, int tablesize, int lookupsize,
+ float lscale, float weight,
+ int prevclrs, int doMac,
+ unsigned char *reds,
+ unsigned char *greens,
+ unsigned char *blues,
+ unsigned char *lookup);
diff --git a/src/java.desktop/share/native/libawt/awt/image/cvutils/img_globals.c b/src/java.desktop/share/native/libawt/awt/image/cvutils/img_globals.c
index fb99c2fdeee..2b9d519b24a 100644
--- a/src/java.desktop/share/native/libawt/awt/image/cvutils/img_globals.c
+++ b/src/java.desktop/share/native/libawt/awt/image/cvutils/img_globals.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, 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
@@ -28,6 +28,7 @@
* by the image conversion package.
*/
+#include "jni.h"
#include "img_globals.h"
#include "java_awt_image_IndexColorModel.h"
@@ -42,7 +43,7 @@
* a lookup table which returns the next color darker than the error
* adjusted color used as the index.
*/
-void
+JNIEXPORT void JNICALL
make_uns_ordered_dither_array(uns_ordered_dither_array oda,
int quantum)
{
diff --git a/src/java.desktop/share/native/libawt/awt/image/cvutils/img_globals.h b/src/java.desktop/share/native/libawt/awt/image/cvutils/img_globals.h
index 4788b7b2c32..6398e1eb7d4 100644
--- a/src/java.desktop/share/native/libawt/awt/image/cvutils/img_globals.h
+++ b/src/java.desktop/share/native/libawt/awt/image/cvutils/img_globals.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, 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
@@ -31,6 +31,7 @@
#ifndef IMAGE_GLOBALS_H
#define IMAGE_GLOBALS_H
+#include "jni.h"
/* Image Conversion function return codes. */
#define SCALEFAILURE -1
@@ -144,8 +145,9 @@ typedef char sgn_ordered_dither_array[8][8];
* error values appearing in the matrix which should be the same as the
* distance between adjacent allocated component values in the color cube).
*/
-extern void make_uns_ordered_dither_array(uns_ordered_dither_array oda,
- int quantum);
+JNIEXPORT void JNICALL
+make_uns_ordered_dither_array(uns_ordered_dither_array oda,
+ int quantum);
extern void make_sgn_ordered_dither_array(char* oda, int errmin, int errmax);
/*
diff --git a/src/java.desktop/share/native/libawt/awt/image/dither.c b/src/java.desktop/share/native/libawt/awt/image/dither.c
index 04828bcab13..37530ba9ec3 100644
--- a/src/java.desktop/share/native/libawt/awt/image/dither.c
+++ b/src/java.desktop/share/native/libawt/awt/image/dither.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, 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
@@ -23,14 +23,16 @@
* questions.
*/
+#include "jni.h"
#include "dither.h"
-sgn_ordered_dither_array std_img_oda_red;
-sgn_ordered_dither_array std_img_oda_green;
-sgn_ordered_dither_array std_img_oda_blue;
-int std_odas_computed = 0;
+JNIEXPORT sgn_ordered_dither_array std_img_oda_red;
+JNIEXPORT sgn_ordered_dither_array std_img_oda_green;
+JNIEXPORT sgn_ordered_dither_array std_img_oda_blue;
+JNIEXPORT int std_odas_computed = 0;
-void initInverseGrayLut(int* prgb, int rgbsize, ColorData *cData) {
+JNIEXPORT void JNICALL
+initInverseGrayLut(int* prgb, int rgbsize, ColorData *cData) {
int *inverse;
int lastindex, lastgray, missing, i;
@@ -267,7 +269,8 @@ initDitherTables(ColorData* cData) {
}
-void make_dither_arrays(int cmapsize, ColorData *cData) {
+JNIEXPORT void JNICALL
+make_dither_arrays(int cmapsize, ColorData *cData) {
int i, j, k;
/*
diff --git a/src/java.desktop/share/native/libawt/awt/image/dither.h b/src/java.desktop/share/native/libawt/awt/image/dither.h
index c7a4b8de735..429dc2a3676 100644
--- a/src/java.desktop/share/native/libawt/awt/image/dither.h
+++ b/src/java.desktop/share/native/libawt/awt/image/dither.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, 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
@@ -29,18 +29,22 @@
#include Creating Objects
+ * Creating Objects
*
* Specification of Inputs and Outputs
+ * Specification of Inputs and Outputs
*
*
- * Qualified Name Representation
- *
+ * Qualified Name Representation
*
* Result Tree Serialization
+ * Result Tree Serialization
*
* Exceptions and Error Reporting
+ * Exceptions and Error Reporting
*
* Resolution of URIs within a transformation
+ * Resolution of URIs within a transformation
*
* 1. XPath Overview
+ * 1. XPath Overview
*
* 2. XPath Expressions
+ * 2. XPath Expressions
*
* 3. XPath Data Types
+ * 3. XPath Data Types
*
* 3.1 QName types
+ * 3.1 QName types
* The XPath API defines the following {@link javax.xml.namespace.QName} types to
* represent return types of an XPath evaluation:
*
@@ -258,7 +258,7 @@
* of a node to a
double data type.
*
*
- * 3.2 Class types
+ * 3.2 Class types
* In addition to the QName types, the XPath API supports the use of Class types
* through the XPathExpression.evaluteExpression(...) or
* XPath.evaluateExpression(...) methods.
@@ -276,14 +276,14 @@
* Of the subtypes of Number, only Double, Integer and Long are supported.
*
*
- * 3.3 Enum types
+ * 3.3 Enum types
* Enum types are defined in {@link javax.xml.xpath.XPathEvaluationResult.XPathResultType}
* that provide mappings between the QName and Class types above. The result of
* evaluating an expression using the XPathExpression.evaluteExpression(...)
* or XPath.evaluateExpression(...) methods will be of one of these types.
*
*
- * 4. XPath Context
+ * 4. XPath Context
*
* 5. Using the XPath API
+ * 5. Using the XPath API
*
* Consider the following XML document:
*
diff --git a/src/jdk.compiler/share/classes/com/sun/source/doctree/package-info.java b/src/jdk.compiler/share/classes/com/sun/source/doctree/package-info.java
index 25947058df8..16f04afbfcb 100644
--- a/src/jdk.compiler/share/classes/com/sun/source/doctree/package-info.java
+++ b/src/jdk.compiler/share/classes/com/sun/source/doctree/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, 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,7 +30,7 @@
* @author Jonathan Gibbons
* @since 1.8
*
- * @see
+ * @see
* Documentation Comment Specification for the Standard Doclet
*/
package com.sun.source.doctree;
diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/Main.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/Main.java
index 91b242684ec..47a2e954e52 100644
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/Main.java
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/Main.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, 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,7 +30,7 @@ import java.io.PrintWriter;
/**
* A legacy programmatic interface for the Java Programming Language
* compiler, javac.
- * See the {@code jdk.compiler}
+ * See the {@code jdk.compiler}
* module for details on replacement APIs.
*/
public class Main {
diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java
index 5e2fb66c30e..7c63b82ac85 100644
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java
@@ -2359,7 +2359,7 @@ public abstract class Type extends AnnoConstruct implements TypeMirror {
public Type constType(Object constValue) { return this; }
@DefinedBy(Api.LANGUAGE_MODEL)
- public Type getEnclosingType() { return this; }
+ public Type getEnclosingType() { return Type.noType; }
public Type getReturnType() { return this; }
public Type asSub(Symbol sym) { return this; }
diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java
index a5ca25f9386..7e006ad75e8 100644
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java
@@ -358,6 +358,10 @@ public class Analyzer {
super(AnalyzerMode.LOCAL, tag);
}
+ boolean isImplicitlyTyped(JCVariableDecl decl) {
+ return decl.vartype.pos == Position.NOPOS;
+ }
+
/**
* Map a variable tree into a new declaration using implicit type.
*/
@@ -390,7 +394,7 @@ public class Analyzer {
boolean match(JCVariableDecl tree){
return tree.sym.owner.kind == Kind.MTH &&
- tree.init != null && !tree.isImplicitlyTyped() &&
+ tree.init != null && !isImplicitlyTyped(tree) &&
attr.canInferLocalVarType(tree) == null;
}
@Override
@@ -414,7 +418,7 @@ public class Analyzer {
@Override
boolean match(JCEnhancedForLoop tree){
- return !tree.var.isImplicitlyTyped();
+ return !isImplicitlyTyped(tree.var);
}
@Override
List
> xs, List
> ys) {
+ if (xs == null || ys == null) {
+ return xs == null && ys == null;
+ }
+ Iterator
> x = xs.iterator();
+ Iterator
> y = ys.iterator();
+ while (x.hasNext() && y.hasNext()) {
+ if (!scan(x.next(), y.next())) {
+ return false;
+ }
+ }
+ return !x.hasNext() && !y.hasNext();
+ }
+
+ @Override
+ public void visitIdent(JCIdent tree) {
+ JCIdent that = (JCIdent) parameter;
+ // Identifiers are a special case: we want to ensure the identifiers correspond to the
+ // same symbols (rather than just having the same name), but also consider lambdas
+ // equal if they differ only in the names of the parameters.
+ Symbol symbol = tree.sym;
+ Symbol otherSymbol = that.sym;
+ if (symbol != null && otherSymbol != null) {
+ Boolean tmp = symbolDiffer.apply(symbol, otherSymbol);
+ if (tmp != null) {
+ result = tmp;
+ return;
+ }
+ }
+ result = tree.sym == that.sym;
+ }
+
+ @Override
+ public void visitSelect(JCFieldAccess tree) {
+ JCFieldAccess that = (JCFieldAccess) parameter;
+ result = scan(tree.selected, that.selected) && tree.sym == that.sym;
+ }
+
+ @Override
+ public void visitAnnotatedType(JCAnnotatedType tree) {
+ JCAnnotatedType that = (JCAnnotatedType) parameter;
+ result =
+ scan(tree.annotations, that.annotations)
+ && scan(tree.underlyingType, that.underlyingType);
+ }
+
+ @Override
+ public void visitAnnotation(JCAnnotation tree) {
+ JCAnnotation that = (JCAnnotation) parameter;
+ result = scan(tree.annotationType, that.annotationType) && scan(tree.args, that.args);
+ }
+
+ @Override
+ public void visitApply(JCMethodInvocation tree) {
+ JCMethodInvocation that = (JCMethodInvocation) parameter;
+ result =
+ scan(tree.typeargs, that.typeargs)
+ && scan(tree.meth, that.meth)
+ && scan(tree.args, that.args)
+ && tree.polyKind == that.polyKind;
+ }
+
+ @Override
+ public void visitAssert(JCAssert tree) {
+ JCAssert that = (JCAssert) parameter;
+ result = scan(tree.cond, that.cond) && scan(tree.detail, that.detail);
+ }
+
+ @Override
+ public void visitAssign(JCAssign tree) {
+ JCAssign that = (JCAssign) parameter;
+ result = scan(tree.lhs, that.lhs) && scan(tree.rhs, that.rhs);
+ }
+
+ @Override
+ public void visitAssignop(JCAssignOp tree) {
+ JCAssignOp that = (JCAssignOp) parameter;
+ result =
+ scan(tree.lhs, that.lhs)
+ && scan(tree.rhs, that.rhs)
+ && tree.operator == that.operator;
+ }
+
+ @Override
+ public void visitBinary(JCBinary tree) {
+ JCBinary that = (JCBinary) parameter;
+ result =
+ scan(tree.lhs, that.lhs)
+ && scan(tree.rhs, that.rhs)
+ && tree.operator == that.operator;
+ }
+
+ @Override
+ public void visitBlock(JCBlock tree) {
+ JCBlock that = (JCBlock) parameter;
+ result = tree.flags == that.flags && scan(tree.stats, that.stats);
+ }
+
+ @Override
+ public void visitBreak(JCBreak tree) {
+ JCBreak that = (JCBreak) parameter;
+ result = tree.label == that.label;
+ }
+
+ @Override
+ public void visitCase(JCCase tree) {
+ JCCase that = (JCCase) parameter;
+ result = scan(tree.pat, that.pat) && scan(tree.stats, that.stats);
+ }
+
+ @Override
+ public void visitCatch(JCCatch tree) {
+ JCCatch that = (JCCatch) parameter;
+ result = scan(tree.param, that.param) && scan(tree.body, that.body);
+ }
+
+ @Override
+ public void visitClassDef(JCClassDecl tree) {
+ JCClassDecl that = (JCClassDecl) parameter;
+ result =
+ scan(tree.mods, that.mods)
+ && tree.name == that.name
+ && scan(tree.typarams, that.typarams)
+ && scan(tree.extending, that.extending)
+ && scan(tree.implementing, that.implementing)
+ && scan(tree.defs, that.defs);
+ }
+
+ @Override
+ public void visitConditional(JCConditional tree) {
+ JCConditional that = (JCConditional) parameter;
+ result =
+ scan(tree.cond, that.cond)
+ && scan(tree.truepart, that.truepart)
+ && scan(tree.falsepart, that.falsepart);
+ }
+
+ @Override
+ public void visitContinue(JCContinue tree) {
+ JCContinue that = (JCContinue) parameter;
+ result = tree.label == that.label;
+ }
+
+ @Override
+ public void visitDoLoop(JCDoWhileLoop tree) {
+ JCDoWhileLoop that = (JCDoWhileLoop) parameter;
+ result = scan(tree.body, that.body) && scan(tree.cond, that.cond);
+ }
+
+ @Override
+ public void visitErroneous(JCErroneous tree) {
+ JCErroneous that = (JCErroneous) parameter;
+ result = scan(tree.errs, that.errs);
+ }
+
+ @Override
+ public void visitExec(JCExpressionStatement tree) {
+ JCExpressionStatement that = (JCExpressionStatement) parameter;
+ result = scan(tree.expr, that.expr);
+ }
+
+ @Override
+ public void visitExports(JCExports tree) {
+ JCExports that = (JCExports) parameter;
+ result = scan(tree.qualid, that.qualid) && scan(tree.moduleNames, that.moduleNames);
+ }
+
+ @Override
+ public void visitForLoop(JCForLoop tree) {
+ JCForLoop that = (JCForLoop) parameter;
+ result =
+ scan(tree.init, that.init)
+ && scan(tree.cond, that.cond)
+ && scan(tree.step, that.step)
+ && scan(tree.body, that.body);
+ }
+
+ @Override
+ public void visitForeachLoop(JCEnhancedForLoop tree) {
+ JCEnhancedForLoop that = (JCEnhancedForLoop) parameter;
+ result =
+ scan(tree.var, that.var)
+ && scan(tree.expr, that.expr)
+ && scan(tree.body, that.body);
+ }
+
+ @Override
+ public void visitIf(JCIf tree) {
+ JCIf that = (JCIf) parameter;
+ result =
+ scan(tree.cond, that.cond)
+ && scan(tree.thenpart, that.thenpart)
+ && scan(tree.elsepart, that.elsepart);
+ }
+
+ @Override
+ public void visitImport(JCImport tree) {
+ JCImport that = (JCImport) parameter;
+ result = tree.staticImport == that.staticImport && scan(tree.qualid, that.qualid);
+ }
+
+ @Override
+ public void visitIndexed(JCArrayAccess tree) {
+ JCArrayAccess that = (JCArrayAccess) parameter;
+ result = scan(tree.indexed, that.indexed) && scan(tree.index, that.index);
+ }
+
+ @Override
+ public void visitLabelled(JCLabeledStatement tree) {
+ JCLabeledStatement that = (JCLabeledStatement) parameter;
+ result = tree.label == that.label && scan(tree.body, that.body);
+ }
+
+ @Override
+ public void visitLambda(JCLambda tree) {
+ JCLambda that = (JCLambda) parameter;
+ result =
+ scan(tree.params, that.params)
+ && scan(tree.body, that.body)
+ && tree.paramKind == that.paramKind;
+ }
+
+ @Override
+ public void visitLetExpr(LetExpr tree) {
+ LetExpr that = (LetExpr) parameter;
+ result = scan(tree.defs, that.defs) && scan(tree.expr, that.expr);
+ }
+
+ @Override
+ public void visitLiteral(JCLiteral tree) {
+ JCLiteral that = (JCLiteral) parameter;
+ result = tree.typetag == that.typetag && Objects.equals(tree.value, that.value);
+ }
+
+ @Override
+ public void visitMethodDef(JCMethodDecl tree) {
+ JCMethodDecl that = (JCMethodDecl) parameter;
+ result =
+ scan(tree.mods, that.mods)
+ && tree.name == that.name
+ && scan(tree.restype, that.restype)
+ && scan(tree.typarams, that.typarams)
+ && scan(tree.recvparam, that.recvparam)
+ && scan(tree.params, that.params)
+ && scan(tree.thrown, that.thrown)
+ && scan(tree.body, that.body)
+ && scan(tree.defaultValue, that.defaultValue);
+ }
+
+ @Override
+ public void visitModifiers(JCModifiers tree) {
+ JCModifiers that = (JCModifiers) parameter;
+ result = tree.flags == that.flags && scan(tree.annotations, that.annotations);
+ }
+
+ @Override
+ public void visitModuleDef(JCModuleDecl tree) {
+ JCModuleDecl that = (JCModuleDecl) parameter;
+ result =
+ scan(tree.mods, that.mods)
+ && scan(tree.qualId, that.qualId)
+ && scan(tree.directives, that.directives);
+ }
+
+ @Override
+ public void visitNewArray(JCNewArray tree) {
+ JCNewArray that = (JCNewArray) parameter;
+ result =
+ scan(tree.elemtype, that.elemtype)
+ && scan(tree.dims, that.dims)
+ && scan(tree.annotations, that.annotations)
+ && scanDimAnnotations(tree.dimAnnotations, that.dimAnnotations)
+ && scan(tree.elems, that.elems);
+ }
+
+ @Override
+ public void visitNewClass(JCNewClass tree) {
+ JCNewClass that = (JCNewClass) parameter;
+ result =
+ scan(tree.encl, that.encl)
+ && scan(tree.typeargs, that.typeargs)
+ && scan(tree.clazz, that.clazz)
+ && scan(tree.args, that.args)
+ && scan(tree.def, that.def)
+ && tree.constructor == that.constructor;
+ }
+
+ @Override
+ public void visitOpens(JCOpens tree) {
+ JCOpens that = (JCOpens) parameter;
+ result = scan(tree.qualid, that.qualid) && scan(tree.moduleNames, that.moduleNames);
+ }
+
+ @Override
+ public void visitPackageDef(JCPackageDecl tree) {
+ JCPackageDecl that = (JCPackageDecl) parameter;
+ result =
+ scan(tree.annotations, that.annotations)
+ && scan(tree.pid, that.pid)
+ && tree.packge == that.packge;
+ }
+
+ @Override
+ public void visitProvides(JCProvides tree) {
+ JCProvides that = (JCProvides) parameter;
+ result = scan(tree.serviceName, that.serviceName) && scan(tree.implNames, that.implNames);
+ }
+
+ @Override
+ public void visitReference(JCMemberReference tree) {
+ JCMemberReference that = (JCMemberReference) parameter;
+ result =
+ tree.mode == that.mode
+ && tree.kind == that.kind
+ && tree.name == that.name
+ && scan(tree.expr, that.expr)
+ && scan(tree.typeargs, that.typeargs);
+ }
+
+ @Override
+ public void visitRequires(JCRequires tree) {
+ JCRequires that = (JCRequires) parameter;
+ result =
+ tree.isTransitive == that.isTransitive
+ && tree.isStaticPhase == that.isStaticPhase
+ && scan(tree.moduleName, that.moduleName);
+ }
+
+ @Override
+ public void visitReturn(JCReturn tree) {
+ JCReturn that = (JCReturn) parameter;
+ result = scan(tree.expr, that.expr);
+ }
+
+ @Override
+ public void visitSwitch(JCSwitch tree) {
+ JCSwitch that = (JCSwitch) parameter;
+ result = scan(tree.selector, that.selector) && scan(tree.cases, that.cases);
+ }
+
+ @Override
+ public void visitSynchronized(JCSynchronized tree) {
+ JCSynchronized that = (JCSynchronized) parameter;
+ result = scan(tree.lock, that.lock) && scan(tree.body, that.body);
+ }
+
+ @Override
+ public void visitThrow(JCThrow tree) {
+ JCThrow that = (JCThrow) parameter;
+ result = scan(tree.expr, that.expr);
+ }
+
+ @Override
+ public void visitTopLevel(JCCompilationUnit tree) {
+ JCCompilationUnit that = (JCCompilationUnit) parameter;
+ result =
+ scan(tree.defs, that.defs)
+ && tree.modle == that.modle
+ && tree.packge == that.packge;
+ }
+
+ @Override
+ public void visitTry(JCTry tree) {
+ JCTry that = (JCTry) parameter;
+ result =
+ scan(tree.body, that.body)
+ && scan(tree.catchers, that.catchers)
+ && scan(tree.finalizer, that.finalizer)
+ && scan(tree.resources, that.resources);
+ }
+
+ @Override
+ public void visitTypeApply(JCTypeApply tree) {
+ JCTypeApply that = (JCTypeApply) parameter;
+ result = scan(tree.clazz, that.clazz) && scan(tree.arguments, that.arguments);
+ }
+
+ @Override
+ public void visitTypeArray(JCArrayTypeTree tree) {
+ JCArrayTypeTree that = (JCArrayTypeTree) parameter;
+ result = scan(tree.elemtype, that.elemtype);
+ }
+
+ @Override
+ public void visitTypeBoundKind(TypeBoundKind tree) {
+ TypeBoundKind that = (TypeBoundKind) parameter;
+ result = tree.kind == that.kind;
+ }
+
+ @Override
+ public void visitTypeCast(JCTypeCast tree) {
+ JCTypeCast that = (JCTypeCast) parameter;
+ result = scan(tree.clazz, that.clazz) && scan(tree.expr, that.expr);
+ }
+
+ @Override
+ public void visitTypeIdent(JCPrimitiveTypeTree tree) {
+ JCPrimitiveTypeTree that = (JCPrimitiveTypeTree) parameter;
+ result = tree.typetag == that.typetag;
+ }
+
+ @Override
+ public void visitTypeIntersection(JCTypeIntersection tree) {
+ JCTypeIntersection that = (JCTypeIntersection) parameter;
+ result = scan(tree.bounds, that.bounds);
+ }
+
+ @Override
+ public void visitTypeParameter(JCTypeParameter tree) {
+ JCTypeParameter that = (JCTypeParameter) parameter;
+ result =
+ tree.name == that.name
+ && scan(tree.bounds, that.bounds)
+ && scan(tree.annotations, that.annotations);
+ }
+
+ @Override
+ public void visitTypeTest(JCInstanceOf tree) {
+ JCInstanceOf that = (JCInstanceOf) parameter;
+ result = scan(tree.expr, that.expr) && scan(tree.clazz, that.clazz);
+ }
+
+ @Override
+ public void visitTypeUnion(JCTypeUnion tree) {
+ JCTypeUnion that = (JCTypeUnion) parameter;
+ result = scan(tree.alternatives, that.alternatives);
+ }
+
+ @Override
+ public void visitUnary(JCUnary tree) {
+ JCUnary that = (JCUnary) parameter;
+ result = scan(tree.arg, that.arg) && tree.operator == that.operator;
+ }
+
+ @Override
+ public void visitUses(JCUses tree) {
+ JCUses that = (JCUses) parameter;
+ result = scan(tree.qualid, that.qualid);
+ }
+
+ @Override
+ public void visitVarDef(JCVariableDecl tree) {
+ JCVariableDecl that = (JCVariableDecl) parameter;
+ result =
+ scan(tree.mods, that.mods)
+ && tree.name == that.name
+ && scan(tree.nameexpr, that.nameexpr)
+ && scan(tree.vartype, that.vartype)
+ && scan(tree.init, that.init);
+ }
+
+ @Override
+ public void visitWhileLoop(JCWhileLoop tree) {
+ JCWhileLoop that = (JCWhileLoop) parameter;
+ result = scan(tree.cond, that.cond) && scan(tree.body, that.body);
+ }
+
+ @Override
+ public void visitWildcard(JCWildcard tree) {
+ JCWildcard that = (JCWildcard) parameter;
+ result = scan(tree.kind, that.kind) && scan(tree.inner, that.inner);
+ }
+}
diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TreeHasher.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TreeHasher.java
new file mode 100644
index 00000000000..916cb2fe056
--- /dev/null
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TreeHasher.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2018, Google LLC. 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.tools.javac.comp;
+
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.tree.JCTree.JCFieldAccess;
+import com.sun.tools.javac.tree.JCTree.JCIdent;
+import com.sun.tools.javac.tree.JCTree.JCLiteral;
+import com.sun.tools.javac.tree.TreeInfo;
+import com.sun.tools.javac.tree.TreeScanner;
+import java.util.Objects;
+import java.util.function.Function;
+
+/** A tree visitor that computes a hash code. */
+public class TreeHasher extends TreeScanner {
+
+ private final Function