# HG changeset patch # User dfuchs # Date 1523280462 -3600 # Node ID d5703ecb5b0aff21759b75eb351e20f40d71d591 # Parent 84a8fa6849985ced319af1f6eb480a859c2c912b# Parent dce997f9a93eb7e3fe3240c87f51fc1826a98fe9 Merge diff -r 84a8fa684998 -r d5703ecb5b0a .hgtags --- a/.hgtags Mon Apr 09 12:59:06 2018 +0100 +++ b/.hgtags Mon Apr 09 14:27:42 2018 +0100 @@ -477,3 +477,5 @@ e59941f7247d451fa7df9eaef3fce0f492f8420c jdk-11+4 d5c43e9f08fb9a7c74aae0d48daf17f2ad2afaef jdk-11+5 3acb379b86725c47e7f33358cb22efa8752ae532 jdk-11+6 +f7363de371c9a1f668bd0a01b7df3d1ddb9cc58b jdk-11+7 +755e1b55a4dff510f9639cdb5c5e82549a7e09b3 jdk-11+8 diff -r 84a8fa684998 -r d5703ecb5b0a make/CompileDemos.gmk --- a/make/CompileDemos.gmk Mon Apr 09 12:59:06 2018 +0100 +++ b/make/CompileDemos.gmk Mon Apr 09 14:27:42 2018 +0100 @@ -242,6 +242,13 @@ 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 -r 84a8fa684998 -r d5703ecb5b0a make/CreateJmods.gmk --- a/make/CreateJmods.gmk Mon Apr 09 12:59:06 2018 +0100 +++ b/make/CreateJmods.gmk Mon Apr 09 14:27:42 2018 +0100 @@ -80,10 +80,15 @@ DEPS += $(call CacheFind, $(MAN_DIR)) endif +# If a specific modules_legal dir exists for this module, only pick up files +# from there. These files were explicitly filtered or modified in -copy +# targets. For the rest, just pick up everything from the source legal dirs. LEGAL_NOTICES := \ - $(call uniq, $(SUPPORT_OUTPUTDIR)/modules_legal/java.base \ - $(call FindModuleLegalDirs, $(MODULE))) \ - # + $(SUPPORT_OUTPUTDIR)/modules_legal/common \ + $(if $(wildcard $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE)), \ + $(wildcard $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE)), \ + $(call FindModuleLegalSrcDirs, $(MODULE)) \ + ) LEGAL_NOTICES_PATH := $(call PathList, $(LEGAL_NOTICES)) DEPS += $(call CacheFind, $(LEGAL_NOTICES)) diff -r 84a8fa684998 -r d5703ecb5b0a make/Docs.gmk --- a/make/Docs.gmk Mon Apr 09 12:59:06 2018 +0100 +++ b/make/Docs.gmk Mon Apr 09 14:27:42 2018 +0100 @@ -64,7 +64,7 @@ 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 diff -r 84a8fa684998 -r d5703ecb5b0a make/autoconf/flags-ldflags.m4 --- a/make/autoconf/flags-ldflags.m4 Mon Apr 09 12:59:06 2018 +0100 +++ b/make/autoconf/flags-ldflags.m4 Mon Apr 09 14:27:42 2018 +0100 @@ -81,7 +81,7 @@ elif test "x$TOOLCHAIN_TYPE" = xclang; then BASIC_LDFLAGS_JVM_ONLY="-mno-omit-leaf-frame-pointer -mstack-alignment=16 \ - -stdlib=libstdc++ -fPIC" + -stdlib=libc++ -fPIC" elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then BASIC_LDFLAGS="-Wl,-z,defs" diff -r 84a8fa684998 -r d5703ecb5b0a make/autoconf/flags.m4 --- a/make/autoconf/flags.m4 Mon Apr 09 12:59:06 2018 +0100 +++ b/make/autoconf/flags.m4 Mon Apr 09 14:27:42 2018 +0100 @@ -116,7 +116,7 @@ # of the OS. It currently has a hard coded value. Setting this also limits # exposure to API changes in header files. Bumping this is likely to # require code changes to build. - MACOSX_VERSION_MIN=10.7.0 + MACOSX_VERSION_MIN=10.9.0 MACOSX_VERSION_MIN_NODOTS=${MACOSX_VERSION_MIN//\./} AC_SUBST(MACOSX_VERSION_MIN) @@ -241,7 +241,7 @@ 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 + test "x$OPENJDK_TARGET_CPU" != xmips64el; then MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}" fi fi @@ -325,22 +325,18 @@ if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then CC_OUT_OPTION=-Fo - EXE_OUT_OPTION=-out: LD_OUT_OPTION=-out: AR_OUT_OPTION=-out: else # The option used to specify the target .o,.a or .so file. # When compiling, how to specify the to be created object file. CC_OUT_OPTION='-o$(SPACE)' - # When linking, how to specify the to be created executable. - EXE_OUT_OPTION='-o$(SPACE)' - # When linking, how to specify the to be created dynamically linkable library. + # When linking, how to specify the output LD_OUT_OPTION='-o$(SPACE)' # When archiving, how to specify the to be create static archive for object files. AR_OUT_OPTION='rcs$(SPACE)' fi AC_SUBST(CC_OUT_OPTION) - AC_SUBST(EXE_OUT_OPTION) AC_SUBST(LD_OUT_OPTION) AC_SUBST(AR_OUT_OPTION) diff -r 84a8fa684998 -r d5703ecb5b0a make/autoconf/spec.gmk.in --- a/make/autoconf/spec.gmk.in Mon Apr 09 12:59:06 2018 +0100 +++ b/make/autoconf/spec.gmk.in Mon Apr 09 14:27:42 2018 +0100 @@ -395,7 +395,6 @@ COMPILER_BINDCMD_FILE_FLAG:=@COMPILER_BINDCMD_FILE_FLAG@ CC_OUT_OPTION:=@CC_OUT_OPTION@ -EXE_OUT_OPTION:=@EXE_OUT_OPTION@ LD_OUT_OPTION:=@LD_OUT_OPTION@ AR_OUT_OPTION:=@AR_OUT_OPTION@ @@ -460,11 +459,6 @@ # Xcode SDK path SDKROOT:=@SDKROOT@ -# The linker on older SuSE distros (e.g. on SLES 10) complains with: -# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable." -# if feeded with a version script which contains named tags. -USING_BROKEN_SUSE_LD:=@USING_BROKEN_SUSE_LD@ - # LDFLAGS used to link the jdk native libraries (C-code) LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@ JDKLIB_LIBS:=@JDKLIB_LIBS@ diff -r 84a8fa684998 -r d5703ecb5b0a make/autoconf/toolchain.m4 --- a/make/autoconf/toolchain.m4 Mon Apr 09 12:59:06 2018 +0100 +++ b/make/autoconf/toolchain.m4 Mon Apr 09 14:27:42 2018 +0100 @@ -597,8 +597,9 @@ # 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/'` ] @@ -1021,24 +1022,6 @@ # This is later checked when setting flags. fi - # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed - # in executable.' - USING_BROKEN_SUSE_LD=no - if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then - AC_MSG_CHECKING([for broken SuSE 'ld' which only understands anonymous version tags in executables]) - $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map - $ECHO "int main() { }" > main.c - if $CXX -Wl,-version-script=version-script.map main.c 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD; then - AC_MSG_RESULT(no) - USING_BROKEN_SUSE_LD=no - else - AC_MSG_RESULT(yes) - USING_BROKEN_SUSE_LD=yes - fi - $RM version-script.map main.c a.out - fi - AC_SUBST(USING_BROKEN_SUSE_LD) - # Setup hotspot lecagy names for toolchains HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE if test "x$TOOLCHAIN_TYPE" = xclang; then diff -r 84a8fa684998 -r d5703ecb5b0a make/autoconf/version-numbers --- a/make/autoconf/version-numbers Mon Apr 09 12:59:06 2018 +0100 +++ b/make/autoconf/version-numbers Mon Apr 09 14:27:42 2018 +0100 @@ -29,7 +29,7 @@ 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 -r 84a8fa684998 -r d5703ecb5b0a make/common/Modules.gmk --- a/make/common/Modules.gmk Mon Apr 09 12:59:06 2018 +0100 +++ b/make/common/Modules.gmk Mon Apr 09 14:27:42 2018 +0100 @@ -393,12 +393,11 @@ endif LEGAL_SUBDIRS += share/legal -# Find all legal dirs for a particular module +# Find all legal src dirs for a particular module # $1 - Module to find legal dirs for -FindModuleLegalDirs = \ +FindModuleLegalSrcDirs = \ $(strip $(wildcard \ - $(addsuffix /$(strip $1), $(SUPPORT_OUTPUTDIR)/modules_legal \ - $(IMPORT_MODULES_LEGAL)) \ + $(addsuffix /$(strip $1), $(IMPORT_MODULES_LEGAL)) \ $(foreach sub, $(LEGAL_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS))) \ )) diff -r 84a8fa684998 -r d5703ecb5b0a make/common/NativeCompilation.gmk --- a/make/common/NativeCompilation.gmk Mon Apr 09 12:59:06 2018 +0100 +++ b/make/common/NativeCompilation.gmk Mon Apr 09 14:27:42 2018 +0100 @@ -292,8 +292,7 @@ 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 @@ -861,10 +860,48 @@ endif endif - ifeq ($$($1_TYPE), LIBRARY) - # Generating a dynamic library. - $1_EXTRA_LDFLAGS += $$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME)) + ifeq ($$($1_TYPE), STATIC_LIBRARY) + $1_VARDEPS := $$($1_AR) $$($1_ARFLAGS) $$($1_LIBS) \ + $$($1_EXTRA_LIBS) + $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \ + $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps) + + # Generating a static library, ie object file archive. + ifeq ($(STATIC_BUILD), true) + ifeq ($$($1_USE_MAPFILE_FOR_SYMBOLS), true) + STATIC_MAPFILE_DEP := $$($1_MAPFILE) + endif + endif + + $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_VARDEPS_FILE) $$(STATIC_MAPFILE_DEP) + $$(call LogInfo, Building static library $$($1_BASENAME)) + $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \ + $$($1_AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_ALL_OBJS) \ + $$($1_RES)) + ifeq ($(STATIC_BUILD), true) + ifeq ($$($1_USE_MAPFILE_FOR_SYMBOLS), true) + $(CP) $$($1_MAPFILE) $$(@D)/$$(basename $$(@F)).symbols + else + $(GetSymbols) + endif + endif + else + # A shared dynamic library or an executable binary has been specified + ifeq ($$($1_TYPE), LIBRARY) + # Generating a dynamic library. + $1_EXTRA_LDFLAGS += $$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME)) + + # Create loadmap on AIX. Helps in diagnosing some problems. + ifneq ($(COMPILER_BINDCMD_FILE_FLAG), ) + $1_EXTRA_LDFLAGS += $(COMPILER_BINDCMD_FILE_FLAG)$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).loadmap + endif + endif + ifeq ($(OPENJDK_TARGET_OS), windows) + ifeq ($$($1_EMBED_MANIFEST), true) + $1_EXTRA_LDFLAGS += -manifest:embed + endif + $1_IMPORT_LIBRARY := $$($1_OBJECT_DIR)/$$($1_NAME).lib $1_EXTRA_LDFLAGS += "-implib:$$($1_IMPORT_LIBRARY)" # To properly trigger downstream dependants of the import library, just as @@ -883,13 +920,9 @@ $(TOUCH) $$@ endif - # Create loadmap on AIX. Helps in diagnosing some problems. - ifneq ($(COMPILER_BINDCMD_FILE_FLAG), ) - $1_EXTRA_LDFLAGS += $(COMPILER_BINDCMD_FILE_FLAG)$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).loadmap - endif - $1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \ - $$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_CREATE_DEBUGINFO_CMDS) \ + $$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \ + $$($1_CODESIGN) $$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \ $$($1_STRIP_CMD) $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \ $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps) @@ -928,8 +961,8 @@ endif endif - $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_REAL_MAPFILE) \ - $$($1_VARDEPS_FILE) + $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_MANIFEST) \ + $$($1_REAL_MAPFILE) $$($1_VARDEPS_FILE) ifneq ($$($1_OBJ_FILE_LIST), ) ifeq ($$($1_LINK_OBJS_RELATIVE), true) $$(eval $$(call ListPathsSafely, $1_ALL_OBJS_RELATIVE, $$($1_OBJ_FILE_LIST))) @@ -943,74 +976,21 @@ ifeq ($(OPENJDK_TARGET_OS), windows) $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \ $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \ - $(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \ - $$($1_LIBS) $$($1_EXTRA_LIBS)) \ + $(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \ + $$($1_LIBS) $$($1_EXTRA_LIBS)) \ | $(GREP) -v "^ Creating library .*\.lib and object .*\.exp" || \ - test "$$$$?" = "1" ; \ + test "$$$$?" = "1" ; \ $$($1_CREATE_DEBUGINFO_CMDS) $$($1_STRIP_CMD) else $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \ $$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \ $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \ - $(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \ - $$($1_LIBS) $$($1_EXTRA_LIBS)) ; \ + $(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \ + $$($1_LIBS) $$($1_EXTRA_LIBS)) ; \ $$($1_CREATE_DEBUGINFO_CMDS) $$($1_STRIP_CMD) endif - - endif - - ifeq ($$($1_TYPE), STATIC_LIBRARY) - $1_VARDEPS := $$($1_AR) $$($1_ARFLAGS) $$($1_LIBS) \ - $$($1_EXTRA_LIBS) - $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \ - $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps) - - # Generating a static library, ie object file archive. - ifeq ($(STATIC_BUILD), true) - ifeq ($$($1_USE_MAPFILE_FOR_SYMBOLS), true) - STATIC_MAPFILE_DEP := $$($1_MAPFILE) - endif - endif - - $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_VARDEPS_FILE) $$(STATIC_MAPFILE_DEP) - $$(call LogInfo, Building static library $$($1_BASENAME)) - $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \ - $$($1_AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_ALL_OBJS) \ - $$($1_RES)) - ifeq ($(STATIC_BUILD), true) - ifeq ($$($1_USE_MAPFILE_FOR_SYMBOLS), true) - $(CP) $$($1_MAPFILE) $$(@D)/$$(basename $$(@F)).symbols - else - $(GetSymbols) - endif - endif - endif - - ifeq ($$($1_TYPE), EXECUTABLE) - # A executable binary has been specified, setup the target for it. - $1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \ - $$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \ - $$($1_CODESIGN) $$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \ - $$($1_STRIP_CMD) - $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \ - $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps) - - ifeq ($(OPENJDK_TARGET_OS), windows) - ifeq ($$($1_EMBED_MANIFEST), true) - $1_EXTRA_LDFLAGS += -manifest:embed - endif - endif - - $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_MANIFEST) \ - $$($1_VARDEPS_FILE) - $$(call LogInfo, Linking executable $$($1_BASENAME)) - $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \ - $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \ - $(EXE_OUT_OPTION)$$($1_TARGET) \ - $$($1_ALL_OBJS) $$($1_RES) \ - $$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS)) ifeq ($(OPENJDK_TARGET_OS), windows) ifneq ($$($1_MANIFEST), ) $$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1 @@ -1023,9 +1003,6 @@ $(CODESIGN) -s openjdk_codesign $$@ endif endif - $$($1_CREATE_DEBUGINFO_CMDS) - $$($1_STRIP_CMD) - endif endef diff -r 84a8fa684998 -r d5703ecb5b0a make/conf/jib-profiles.js --- a/make/conf/jib-profiles.js Mon Apr 09 12:59:06 2018 +0100 +++ b/make/conf/jib-profiles.js Mon Apr 09 14:27:42 2018 +0100 @@ -432,7 +432,7 @@ target_cpu: "x64", dependencies: ["devkit", "autoconf"], configure_args: concat(common.configure_args_64bit, "--with-zlib=system", - "--with-macosx-version-max=10.7.0"), + "--with-macosx-version-max=10.9.0"), }, "solaris-x64": { @@ -472,7 +472,7 @@ build_cpu: "x64", dependencies: ["devkit", "autoconf", "build_devkit", "cups"], configure_args: [ - "--openjdk-target=aarch64-linux-gnu" + "--openjdk-target=aarch64-linux-gnu", "--with-freetype=bundled", ], }, @@ -816,7 +816,7 @@ 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 -r 84a8fa684998 -r d5703ecb5b0a make/copy/Copy-java.base.gmk --- a/make/copy/Copy-java.base.gmk Mon Apr 09 12:59:06 2018 +0100 +++ b/make/copy/Copy-java.base.gmk Mon Apr 09 14:27:42 2018 +0100 @@ -24,6 +24,7 @@ # include CopyCommon.gmk +include Modules.gmk include TextFileProcessing.gmk $(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk)) @@ -224,13 +225,28 @@ $(eval $(call SetupCopyFiles, COPY_JDK_NOTICES, \ FILES := $(JDK_LICENSE) $(JDK_NOTICE) $(JDK_ADDITIONAL_LICENSE_INFO), \ - DEST := $(LEGAL_DST_DIR), \ + DEST := $(COMMON_LEGAL_DST_DIR), \ FLATTEN := true, \ )) TARGETS += $(COPY_JDK_NOTICES) ################################################################################ +# +# Copy and filter the legal files depending on what 3rd party components are +# bundled or linked from the OS. +# +ifeq ($(USE_EXTERNAL_LIBZ), true) + LEGAL_EXCLUDES += zlib.md +endif + +$(eval $(call SetupCopyLegalFiles, COPY_LEGAL, \ + EXCLUDES := $(LEGAL_EXCLUDES), \ +)) + +TARGETS += $(COPY_LEGAL) + +################################################################################ # Optionally copy libffi.so.? into the the image ifeq ($(ENABLE_LIBFFI_BUNDLING), true) diff -r 84a8fa684998 -r d5703ecb5b0a make/copy/Copy-java.desktop.gmk --- a/make/copy/Copy-java.desktop.gmk Mon Apr 09 12:59:06 2018 +0100 +++ b/make/copy/Copy-java.desktop.gmk Mon Apr 09 14:27:42 2018 +0100 @@ -24,6 +24,7 @@ # include CopyCommon.gmk +include Modules.gmk $(eval $(call IncludeCustomExtension, copy/Copy-java.desktop.gmk)) @@ -48,3 +49,34 @@ TARGETS += $(PSFONTPROPFILE_TARGET_FILES) ################################################################################ +# +# Copy and filter the legal files depending on what 3rd party components are +# bundled or linked from the OS. +# +ifeq ($(USE_EXTERNAL_LIBJPEG), true) + LEGAL_EXCLUDES += jpeg.md +endif + +ifeq ($(USE_EXTERNAL_LIBGIF), true) + LEGAL_EXCLUDES += giflib.md +endif + +ifeq ($(USE_EXTERNAL_LIBPNG), true) + LEGAL_EXCLUDES += libpng.md +endif + +ifeq ($(USE_EXTERNAL_LCMS), true) + LEGAL_EXCLUDES += lcms.md +endif + +ifeq ($(FREETYPE_TO_USE), system) + LEGAL_EXCLUDES += freetype.md +endif + +$(eval $(call SetupCopyLegalFiles, COPY_LEGAL, \ + EXCLUDES := $(LEGAL_EXCLUDES), \ +)) + +TARGETS += $(COPY_LEGAL) + +################################################################################ diff -r 84a8fa684998 -r d5703ecb5b0a make/copy/CopyCommon.gmk --- a/make/copy/CopyCommon.gmk Mon Apr 09 12:59:06 2018 +0100 +++ b/make/copy/CopyCommon.gmk Mon Apr 09 14:27:42 2018 +0100 @@ -26,6 +26,7 @@ LIB_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE) CONF_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_conf/$(MODULE) LEGAL_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE) +COMMON_LEGAL_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_legal/common ################################################################################ # @@ -60,3 +61,24 @@ TARGETS += $(COPY_EXPORTED_INCLUDE_OS) endif + +################################################################################ +# Setup make rules for copying legal files. This is only needed if the files +# need to be filtered due to optional components being enabled/disabled. +# Otherwise CreateJmods.gmk will find the legal files in the original src dirs. +# +# Parameter 1 is the name of the rule. +# +# Remaining parameters are named arguments. These include: +# EXCLUDES : List of filenames to exclude from copy +SetupCopyLegalFiles = $(NamedParamsMacroTemplate) +define SetupCopyLegalFilesBody + $$(foreach f, $$(filter-out $$(addprefix %/, $$($1_EXCLUDES)), \ + $$(wildcard $$(addsuffix /*, $$(call FindModuleLegalSrcDirs, $$(MODULE))))), \ + $$(eval $$(call SetupCopyFiles, $1_$$(notdir $$f), \ + DEST := $$(LEGAL_DST_DIR), \ + FILES := $$f, \ + )) \ + $$(eval $1 += $$($1_$$(notdir $$f))) \ + ) +endef diff -r 84a8fa684998 -r d5703ecb5b0a make/data/tzdata/VERSION --- a/make/data/tzdata/VERSION Mon Apr 09 12:59:06 2018 +0100 +++ b/make/data/tzdata/VERSION Mon Apr 09 14:27:42 2018 +0100 @@ -21,4 +21,4 @@ # or visit www.oracle.com if you need additional information or have any # questions. # -tzdata2018c +tzdata2018d diff -r 84a8fa684998 -r d5703ecb5b0a make/data/tzdata/africa --- a/make/data/tzdata/africa Mon Apr 09 12:59:06 2018 +0100 +++ b/make/data/tzdata/africa Mon Apr 09 14:27:42 2018 +0100 @@ -138,13 +138,13 @@ # Cape Verde / Cabo Verde # +# From Paul Eggert (2018-02-16): # Shanks gives 1907 for the transition to +02. -# Perhaps the 1911-05-26 Portuguese decree -# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf -# merely made it official? +# For now, ignore that and follow the 1911-05-26 Portuguese decree +# (see Europe/Lisbon). # # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Atlantic/Cape_Verde -1:34:04 - LMT 1907 # Praia +Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2:00u # Praia -2:00 - -02 1942 Sep -2:00 1:00 -01 1945 Oct 15 -2:00 - -02 1975 Nov 25 2:00 @@ -393,15 +393,34 @@ # See Africa/Abidjan. # Ghana -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S + +# From Paul Eggert (2018-01-30): # Whitman says DST was observed from 1931 to "the present"; -# Shanks & Pottenger say 1936 to 1942; -# and September 1 to January 1 is given by: -# Scott Keltie J, Epstein M (eds), The Statesman's Year-Book, -# 57th ed. Macmillan, London (1920), OCLC 609408015, pp xxviii. -# For lack of better info, assume DST was observed from 1920 to 1942. -Rule Ghana 1920 1942 - Sep 1 0:00 0:20 GHST -Rule Ghana 1920 1942 - Dec 31 0:00 0 GMT +# Shanks & Pottenger say 1936 to 1942 with 20 minutes of DST, +# with transitions on 09-01 and 12-31 at 00:00. +# Page 33 of Parish GCB, Colonial Reports - Annual. No. 1066. Gold +# Coast. Report for 1919. (March 1921), OCLC 784024077 +# http://libsysdigi.library.illinois.edu/ilharvest/africana/books2011-05/5530214/5530214_1919/5530214_1919_opt.pdf +# lists the Determination of the Time Ordinance, 1919, No. 18, +# "to advance the time observed locally by the space of twenty minutes +# during the last four months of each year; the object in view being +# to extend during those months the period of daylight-time available +# for evening recreation after office hours." +# Vanessa Ogle, The Global Transformation of Time, 1870-1950 (2015), p 33, +# writes "In 1919, the Gold Coast (Ghana as of 1957) made Greenwich +# time its legal time and simultaneously legalized a summer time of +# UTC - 00:20 minutes from March to October."; a footnote lists +# the ordinance as being dated 1919-11-24. +# The Crown Colonist, Volume 12 (1942), p 176, says "the Government +# intend advancing Gold Coast time half an hour ahead of G.M.T. +# The actual date of the alteration has not yet been announced." +# These sources are incomplete and contradictory. Possibly what is +# now Ghana observed different DST regimes in different years. For +# lack of better info, use Shanks except treat the minus sign as a +# typo, and assume DST started in 1920 not 1936. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Ghana 1920 1942 - Sep 1 0:00 0:20 - +Rule Ghana 1920 1942 - Dec 31 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Accra -0:00:52 - LMT 1918 0:00 Ghana GMT/+0020 @@ -411,13 +430,13 @@ # Guinea-Bissau # +# From Paul Eggert (2018-02-16): # Shanks gives 1911-05-26 for the transition to WAT, # evidently confusing the date of the Portuguese decree -# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf -# with the date that it took effect, namely 1912-01-01. +# (see Europe/Lisbon) with the date that it took effect. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 +Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 1:00u -1:00 - -01 1975 0:00 - GMT @@ -613,9 +632,9 @@ # at 2am (or 02:00) local time..." # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Mauritius 1982 only - Oct 10 0:00 1:00 S +Rule Mauritius 1982 only - Oct 10 0:00 1:00 - Rule Mauritius 1983 only - Mar 21 0:00 0 - -Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 S +Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 - Rule Mauritius 2009 only - Mar lastSun 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis @@ -1060,6 +1079,8 @@ # São Tomé and Príncipe +# See Europe/Lisbon for info about the 1912 transition. + # From Steffen Thorsen (2018-01-08): # Multiple sources tell that São Tomé changed from UTC to UTC+1 as # they entered the year 2018. @@ -1068,7 +1089,7 @@ # http://www.mnec.gov.st/index.php/publicacoes/documentos/file/90-decreto-lei-n-25-2017 Zone Africa/Sao_Tome 0:26:56 - LMT 1884 - -0:36:45 - LMT 1912 # Lisbon Mean Time + -0:36:45 - LMT 1912 Jan 1 00:00u # Lisbon MT 0:00 - GMT 2018 Jan 1 01:00 1:00 - WAT diff -r 84a8fa684998 -r d5703ecb5b0a make/data/tzdata/antarctica --- a/make/data/tzdata/antarctica Mon Apr 09 12:59:06 2018 +0100 +++ b/make/data/tzdata/antarctica Mon Apr 09 14:27:42 2018 +0100 @@ -98,7 +98,8 @@ 8:00 - +08 2011 Oct 28 2:00 11:00 - +11 2012 Feb 21 17:00u 8:00 - +08 2016 Oct 22 - 11:00 - +11 + 11:00 - +11 2018 Mar 11 4:00 + 8:00 - +08 Zone Antarctica/Davis 0 - -00 1957 Jan 13 7:00 - +07 1964 Nov 0 - -00 1969 Feb diff -r 84a8fa684998 -r d5703ecb5b0a make/data/tzdata/asia --- a/make/data/tzdata/asia Mon Apr 09 12:59:06 2018 +0100 +++ b/make/data/tzdata/asia Mon Apr 09 14:27:42 2018 +0100 @@ -92,13 +92,13 @@ Rule EUAsia 1981 max - Mar lastSun 1:00u 1:00 S Rule EUAsia 1979 1995 - Sep lastSun 1:00u 0 - Rule EUAsia 1996 max - Oct lastSun 1:00u 0 - -Rule E-EurAsia 1981 max - Mar lastSun 0:00 1:00 S +Rule E-EurAsia 1981 max - Mar lastSun 0:00 1:00 - Rule E-EurAsia 1979 1995 - Sep lastSun 0:00 0 - Rule E-EurAsia 1996 max - Oct lastSun 0:00 0 - -Rule RussiaAsia 1981 1984 - Apr 1 0:00 1:00 S +Rule RussiaAsia 1981 1984 - Apr 1 0:00 1:00 - Rule RussiaAsia 1981 1983 - Oct 1 0:00 0 - Rule RussiaAsia 1984 1995 - Sep lastSun 2:00s 0 - -Rule RussiaAsia 1985 2010 - Mar lastSun 2:00s 1:00 S +Rule RussiaAsia 1985 2010 - Mar lastSun 2:00s 1:00 - Rule RussiaAsia 1996 2010 - Oct lastSun 2:00s 0 - # Afghanistan @@ -133,7 +133,7 @@ # (brief) # http://www.worldtimezone.com/dst_news/dst_news_armenia03.html # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Armenia 2011 only - Mar lastSun 2:00s 1:00 S +Rule Armenia 2011 only - Mar lastSun 2:00s 1:00 - Rule Armenia 2011 only - Oct lastSun 2:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 @@ -159,7 +159,7 @@ # http://en.apa.az/xeber_azerbaijan_abolishes_daylight_savings_ti_240862.html # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Azer 1997 2015 - Mar lastSun 4:00 1:00 S +Rule Azer 1997 2015 - Mar lastSun 4:00 1:00 - Rule Azer 1997 2015 - Oct lastSun 5:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Baku 3:19:24 - LMT 1924 May 2 @@ -246,7 +246,7 @@ # http://www.worldtimezone.com/dst_news/dst_news_bangladesh06.html # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Dhaka 2009 only - Jun 19 23:00 1:00 S +Rule Dhaka 2009 only - Jun 19 23:00 1:00 - Rule Dhaka 2009 only - Dec 31 24:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -787,8 +787,9 @@ Rule Macau 1975 1977 - Apr Sun>=15 3:30 1:00 D Rule Macau 1978 1980 - Apr Sun>=15 0:00 1:00 D Rule Macau 1978 1980 - Oct Sun>=15 0:00 0 S +# See Europe/Lisbon for info about the 1912 transition. # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Macau 7:34:20 - LMT 1912 Jan 1 +Zone Asia/Macau 7:34:20 - LMT 1911 Dec 31 16:00u 8:00 Macau C%sT @@ -1129,61 +1130,61 @@ # thirtieth day of Shahrivar. # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Iran 1978 1980 - Mar 21 0:00 1:00 D -Rule Iran 1978 only - Oct 21 0:00 0 S -Rule Iran 1979 only - Sep 19 0:00 0 S -Rule Iran 1980 only - Sep 23 0:00 0 S -Rule Iran 1991 only - May 3 0:00 1:00 D -Rule Iran 1992 1995 - Mar 22 0:00 1:00 D -Rule Iran 1991 1995 - Sep 22 0:00 0 S -Rule Iran 1996 only - Mar 21 0:00 1:00 D -Rule Iran 1996 only - Sep 21 0:00 0 S -Rule Iran 1997 1999 - Mar 22 0:00 1:00 D -Rule Iran 1997 1999 - Sep 22 0:00 0 S -Rule Iran 2000 only - Mar 21 0:00 1:00 D -Rule Iran 2000 only - Sep 21 0:00 0 S -Rule Iran 2001 2003 - Mar 22 0:00 1:00 D -Rule Iran 2001 2003 - Sep 22 0:00 0 S -Rule Iran 2004 only - Mar 21 0:00 1:00 D -Rule Iran 2004 only - Sep 21 0:00 0 S -Rule Iran 2005 only - Mar 22 0:00 1:00 D -Rule Iran 2005 only - Sep 22 0:00 0 S -Rule Iran 2008 only - Mar 21 0:00 1:00 D -Rule Iran 2008 only - Sep 21 0:00 0 S -Rule Iran 2009 2011 - Mar 22 0:00 1:00 D -Rule Iran 2009 2011 - Sep 22 0:00 0 S -Rule Iran 2012 only - Mar 21 0:00 1:00 D -Rule Iran 2012 only - Sep 21 0:00 0 S -Rule Iran 2013 2015 - Mar 22 0:00 1:00 D -Rule Iran 2013 2015 - Sep 22 0:00 0 S -Rule Iran 2016 only - Mar 21 0:00 1:00 D -Rule Iran 2016 only - Sep 21 0:00 0 S -Rule Iran 2017 2019 - Mar 22 0:00 1:00 D -Rule Iran 2017 2019 - Sep 22 0:00 0 S -Rule Iran 2020 only - Mar 21 0:00 1:00 D -Rule Iran 2020 only - Sep 21 0:00 0 S -Rule Iran 2021 2023 - Mar 22 0:00 1:00 D -Rule Iran 2021 2023 - Sep 22 0:00 0 S -Rule Iran 2024 only - Mar 21 0:00 1:00 D -Rule Iran 2024 only - Sep 21 0:00 0 S -Rule Iran 2025 2027 - Mar 22 0:00 1:00 D -Rule Iran 2025 2027 - Sep 22 0:00 0 S -Rule Iran 2028 2029 - Mar 21 0:00 1:00 D -Rule Iran 2028 2029 - Sep 21 0:00 0 S -Rule Iran 2030 2031 - Mar 22 0:00 1:00 D -Rule Iran 2030 2031 - Sep 22 0:00 0 S -Rule Iran 2032 2033 - Mar 21 0:00 1:00 D -Rule Iran 2032 2033 - Sep 21 0:00 0 S -Rule Iran 2034 2035 - Mar 22 0:00 1:00 D -Rule Iran 2034 2035 - Sep 22 0:00 0 S +Rule Iran 1978 1980 - Mar 21 0:00 1:00 - +Rule Iran 1978 only - Oct 21 0:00 0 - +Rule Iran 1979 only - Sep 19 0:00 0 - +Rule Iran 1980 only - Sep 23 0:00 0 - +Rule Iran 1991 only - May 3 0:00 1:00 - +Rule Iran 1992 1995 - Mar 22 0:00 1:00 - +Rule Iran 1991 1995 - Sep 22 0:00 0 - +Rule Iran 1996 only - Mar 21 0:00 1:00 - +Rule Iran 1996 only - Sep 21 0:00 0 - +Rule Iran 1997 1999 - Mar 22 0:00 1:00 - +Rule Iran 1997 1999 - Sep 22 0:00 0 - +Rule Iran 2000 only - Mar 21 0:00 1:00 - +Rule Iran 2000 only - Sep 21 0:00 0 - +Rule Iran 2001 2003 - Mar 22 0:00 1:00 - +Rule Iran 2001 2003 - Sep 22 0:00 0 - +Rule Iran 2004 only - Mar 21 0:00 1:00 - +Rule Iran 2004 only - Sep 21 0:00 0 - +Rule Iran 2005 only - Mar 22 0:00 1:00 - +Rule Iran 2005 only - Sep 22 0:00 0 - +Rule Iran 2008 only - Mar 21 0:00 1:00 - +Rule Iran 2008 only - Sep 21 0:00 0 - +Rule Iran 2009 2011 - Mar 22 0:00 1:00 - +Rule Iran 2009 2011 - Sep 22 0:00 0 - +Rule Iran 2012 only - Mar 21 0:00 1:00 - +Rule Iran 2012 only - Sep 21 0:00 0 - +Rule Iran 2013 2015 - Mar 22 0:00 1:00 - +Rule Iran 2013 2015 - Sep 22 0:00 0 - +Rule Iran 2016 only - Mar 21 0:00 1:00 - +Rule Iran 2016 only - Sep 21 0:00 0 - +Rule Iran 2017 2019 - Mar 22 0:00 1:00 - +Rule Iran 2017 2019 - Sep 22 0:00 0 - +Rule Iran 2020 only - Mar 21 0:00 1:00 - +Rule Iran 2020 only - Sep 21 0:00 0 - +Rule Iran 2021 2023 - Mar 22 0:00 1:00 - +Rule Iran 2021 2023 - Sep 22 0:00 0 - +Rule Iran 2024 only - Mar 21 0:00 1:00 - +Rule Iran 2024 only - Sep 21 0:00 0 - +Rule Iran 2025 2027 - Mar 22 0:00 1:00 - +Rule Iran 2025 2027 - Sep 22 0:00 0 - +Rule Iran 2028 2029 - Mar 21 0:00 1:00 - +Rule Iran 2028 2029 - Sep 21 0:00 0 - +Rule Iran 2030 2031 - Mar 22 0:00 1:00 - +Rule Iran 2030 2031 - Sep 22 0:00 0 - +Rule Iran 2032 2033 - Mar 21 0:00 1:00 - +Rule Iran 2032 2033 - Sep 21 0:00 0 - +Rule Iran 2034 2035 - Mar 22 0:00 1:00 - +Rule Iran 2034 2035 - Sep 22 0:00 0 - # # The following rules are approximations starting in the year 2038. # These are the best post-2037 approximations available, given the # restrictions of a single rule using a Gregorian-based data format. # At some point this table will need to be extended, though quite # possibly Iran will change the rules first. -Rule Iran 2036 max - Mar 21 0:00 1:00 D -Rule Iran 2036 max - Sep 21 0:00 0 S +Rule Iran 2036 max - Mar 21 0:00 1:00 - +Rule Iran 2036 max - Sep 21 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Tehran 3:25:44 - LMT 1916 @@ -1219,17 +1220,17 @@ # https://www.timeanddate.com/news/time/iraq-dumps-daylight-saving.html # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Iraq 1982 only - May 1 0:00 1:00 D -Rule Iraq 1982 1984 - Oct 1 0:00 0 S -Rule Iraq 1983 only - Mar 31 0:00 1:00 D -Rule Iraq 1984 1985 - Apr 1 0:00 1:00 D -Rule Iraq 1985 1990 - Sep lastSun 1:00s 0 S -Rule Iraq 1986 1990 - Mar lastSun 1:00s 1:00 D +Rule Iraq 1982 only - May 1 0:00 1:00 - +Rule Iraq 1982 1984 - Oct 1 0:00 0 - +Rule Iraq 1983 only - Mar 31 0:00 1:00 - +Rule Iraq 1984 1985 - Apr 1 0:00 1:00 - +Rule Iraq 1985 1990 - Sep lastSun 1:00s 0 - +Rule Iraq 1986 1990 - Mar lastSun 1:00s 1:00 - # IATA SSIM (1991/1996) says Apr 1 12:01am UTC; guess the ':01' is a typo. # Shanks & Pottenger say Iraq did not observe DST 1992/1997; ignore this. # -Rule Iraq 1991 2007 - Apr 1 3:00s 1:00 D -Rule Iraq 1991 2007 - Oct 1 3:00s 0 S +Rule Iraq 1991 2007 - Apr 1 3:00s 1:00 - +Rule Iraq 1991 2007 - Oct 1 3:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Baghdad 2:57:40 - LMT 1890 2:57:36 - BMT 1918 # Baghdad Mean Time? @@ -1501,8 +1502,7 @@ # From Hideyuki Suzuki (1998-11-09): # 'Tokyo' usually stands for the former location of Tokyo Astronomical -# Observatory: 139 degrees 44' 40.90" E (9h 18m 58.727s), -# 35 degrees 39' 16.0" N. +# Observatory: 139° 44' 40.90" E (9h 18m 58.727s), 35° 39' 16.0" N. # This data is from 'Rika Nenpyou (Chronological Scientific Tables) 1996' # edited by National Astronomical Observatory of Japan.... # JST (Japan Standard Time) has been used since 1888-01-01 00:00 (JST). @@ -1510,10 +1510,10 @@ # From Hideyuki Suzuki (1998-11-16): # The ordinance No. 51 (1886) established "standard time" in Japan, -# which stands for the time on 135 degrees E. +# which stands for the time on 135° E. # In the ordinance No. 167 (1895), "standard time" was renamed to "central # standard time". And the same ordinance also established "western standard -# time", which stands for the time on 120 degrees E.... But "western standard +# time", which stands for the time on 120° E.... But "western standard # time" was abolished in the ordinance No. 529 (1937). In the ordinance No. # 167, there is no mention regarding for what place western standard time is # standard.... @@ -1926,9 +1926,9 @@ # From 2005-08-12 our GMT-offset is +6, w/o any daylight saving. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Kyrgyz 1992 1996 - Apr Sun>=7 0:00s 1:00 S +Rule Kyrgyz 1992 1996 - Apr Sun>=7 0:00s 1:00 - Rule Kyrgyz 1992 1996 - Sep lastSun 0:00 0 - -Rule Kyrgyz 1997 2005 - Mar lastSun 2:30 1:00 S +Rule Kyrgyz 1997 2005 - Mar lastSun 2:30 1:00 - Rule Kyrgyz 1997 2004 - Oct lastSun 2:30 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Bishkek 4:58:24 - LMT 1924 May 2 @@ -2060,7 +2060,7 @@ # Malaysia # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule NBorneo 1935 1941 - Sep 14 0:00 0:20 TS # one-Third Summer +Rule NBorneo 1935 1941 - Sep 14 0:00 0:20 - Rule NBorneo 1935 1941 - Dec 14 0:00 0 - # # peninsular Malaysia @@ -2205,7 +2205,7 @@ # http://zasag.mn/news/view/8969 # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S +Rule Mongol 1983 1984 - Apr 1 0:00 1:00 - Rule Mongol 1983 only - Oct 1 0:00 0 - # Shanks & Pottenger and IATA SSIM say 1990s switches occurred at 00:00, # but McDow says the 2001 switches occurred at 02:00. Also, IATA SSIM @@ -2222,13 +2222,13 @@ # Mongolian Government meeting has concluded today to cancel daylight # saving time adoption in Mongolia. Source: http://zasag.mn/news/view/16192 -Rule Mongol 1985 1998 - Mar lastSun 0:00 1:00 S +Rule Mongol 1985 1998 - Mar lastSun 0:00 1:00 - Rule Mongol 1984 1998 - Sep lastSun 0:00 0 - # IATA SSIM (1999-09) says Mongolia no longer observes DST. -Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S +Rule Mongol 2001 only - Apr lastSat 2:00 1:00 - Rule Mongol 2001 2006 - Sep lastSat 2:00 0 - -Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S -Rule Mongol 2015 2016 - Mar lastSat 2:00 1:00 S +Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 - +Rule Mongol 2015 2016 - Mar lastSat 2:00 1:00 - Rule Mongol 2015 2016 - Sep lastSat 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -2662,9 +2662,6 @@ # [Google translation]: "The Council also decided to start daylight # saving in Palestine as of one o'clock on Saturday morning, # 2016-03-26, to provide the clock 60 minutes ahead." -# -# From Paul Eggert (2016-03-12): -# Predict spring transitions on March's last Saturday at 01:00 from now on. # From Sharef Mustafa (2016-10-19): # [T]he Palestinian cabinet decision (Mar 8th 2016) published on @@ -2681,6 +2678,16 @@ # https://www.timeanddate.com/time/change/gaza-strip/gaza # https://www.timeanddate.com/time/change/west-bank/hebron +# From Sharef Mustafa (2018-03-16): +# Palestine summer time will start on Mar 24th 2018 by advancing the +# clock by 60 minutes as per Palestinian cabinet decision published on +# the offical website, though the decree did not specify the exact +# time of the time shift. +# http://www.palestinecabinet.gov.ps/Website/AR/NDecrees/ViewFile.ashx?ID=e7a42ab7-ee23-435a-b9c8-a4f7e81f3817 +# +# From Paul Eggert (2018-03-16): +# For 2016 on, predict spring transitions on March's fourth Saturday at 01:00. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S Rule EgyptAsia 1957 1958 - Oct 1 0:00 0 - @@ -2710,7 +2717,7 @@ Rule Palestine 2013 only - Sep Fri>=21 0:00 0 - Rule Palestine 2014 2015 - Oct Fri>=21 0:00 0 - Rule Palestine 2015 only - Mar lastFri 24:00 1:00 S -Rule Palestine 2016 max - Mar lastSat 1:00 1:00 S +Rule Palestine 2016 max - Mar Sat>=22 1:00 1:00 S Rule Palestine 2016 max - Oct lastSat 1:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -2760,11 +2767,11 @@ # http://www.philstar.com/headlines/2014/08/05/1354152/pnoy-urged-declare-use-daylight-saving-time # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Phil 1936 only - Nov 1 0:00 1:00 S +Rule Phil 1936 only - Nov 1 0:00 1:00 - Rule Phil 1937 only - Feb 1 0:00 0 - -Rule Phil 1954 only - Apr 12 0:00 1:00 S +Rule Phil 1954 only - Apr 12 0:00 1:00 - Rule Phil 1954 only - Jul 1 0:00 0 - -Rule Phil 1978 only - Mar 22 0:00 1:00 S +Rule Phil 1978 only - Mar 22 0:00 1:00 - Rule Phil 1978 only - Sep 21 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Manila -15:56:00 - LMT 1844 Dec 31 @@ -3120,9 +3127,9 @@ # and is the basis for the information below. # # The 1906 transition was effective July 1 and standardized Indochina to -# Phù Liễn Observatory, legally 104 deg. 17'17" east of Paris. +# Phù Liễn Observatory, legally 104° 17' 17" east of Paris. # It's unclear whether this meant legal Paris Mean Time (00:09:21) or -# the Paris Meridian (2 deg. 20'14.03" E); the former yields 07:06:30.1333... +# the Paris Meridian (2° 20' 14.03" E); the former yields 07:06:30.1333... # and the latter 07:06:29.333... so either way it rounds to 07:06:30, # which is used below even though the modern-day Phù Liễn Observatory # is closer to 07:06:31. Abbreviate Phù Liễn Mean Time as PLMT. diff -r 84a8fa684998 -r d5703ecb5b0a make/data/tzdata/australasia --- a/make/data/tzdata/australasia Mon Apr 09 12:59:06 2018 +0100 +++ b/make/data/tzdata/australasia Mon Apr 09 14:27:42 2018 +0100 @@ -219,20 +219,20 @@ # Lord Howe Island # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule LH 1981 1984 - Oct lastSun 2:00 1:00 D -Rule LH 1982 1985 - Mar Sun>=1 2:00 0 S -Rule LH 1985 only - Oct lastSun 2:00 0:30 D -Rule LH 1986 1989 - Mar Sun>=15 2:00 0 S -Rule LH 1986 only - Oct 19 2:00 0:30 D -Rule LH 1987 1999 - Oct lastSun 2:00 0:30 D -Rule LH 1990 1995 - Mar Sun>=1 2:00 0 S -Rule LH 1996 2005 - Mar lastSun 2:00 0 S -Rule LH 2000 only - Aug lastSun 2:00 0:30 D -Rule LH 2001 2007 - Oct lastSun 2:00 0:30 D -Rule LH 2006 only - Apr Sun>=1 2:00 0 S -Rule LH 2007 only - Mar lastSun 2:00 0 S -Rule LH 2008 max - Apr Sun>=1 2:00 0 S -Rule LH 2008 max - Oct Sun>=1 2:00 0:30 D +Rule LH 1981 1984 - Oct lastSun 2:00 1:00 - +Rule LH 1982 1985 - Mar Sun>=1 2:00 0 - +Rule LH 1985 only - Oct lastSun 2:00 0:30 - +Rule LH 1986 1989 - Mar Sun>=15 2:00 0 - +Rule LH 1986 only - Oct 19 2:00 0:30 - +Rule LH 1987 1999 - Oct lastSun 2:00 0:30 - +Rule LH 1990 1995 - Mar Sun>=1 2:00 0 - +Rule LH 1996 2005 - Mar lastSun 2:00 0 - +Rule LH 2000 only - Aug lastSun 2:00 0:30 - +Rule LH 2001 2007 - Oct lastSun 2:00 0:30 - +Rule LH 2006 only - Apr Sun>=1 2:00 0 - +Rule LH 2007 only - Mar lastSun 2:00 0 - +Rule LH 2008 max - Apr Sun>=1 2:00 0 - +Rule LH 2008 max - Oct Sun>=1 2:00 0:30 - Zone Australia/Lord_Howe 10:36:20 - LMT 1895 Feb 10:00 - AEST 1981 Mar 10:30 LH +1030/+1130 1985 Jul @@ -390,15 +390,15 @@ # practice than guessing no DST. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 S +Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 - Rule Fiji 1999 2000 - Feb lastSun 3:00 0 - -Rule Fiji 2009 only - Nov 29 2:00 1:00 S +Rule Fiji 2009 only - Nov 29 2:00 1:00 - Rule Fiji 2010 only - Mar lastSun 3:00 0 - -Rule Fiji 2010 2013 - Oct Sun>=21 2:00 1:00 S +Rule Fiji 2010 2013 - Oct Sun>=21 2:00 1:00 - Rule Fiji 2011 only - Mar Sun>=1 3:00 0 - Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 - Rule Fiji 2014 only - Jan Sun>=18 2:00 0 - -Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 S +Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 - Rule Fiji 2015 max - Jan Sun>=14 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva @@ -429,11 +429,11 @@ 12:00 - +12 Zone Pacific/Enderbury -11:24:20 - LMT 1901 -12:00 - -12 1979 Oct - -11:00 - -11 1995 + -11:00 - -11 1994 Dec 31 13:00 - +13 Zone Pacific/Kiritimati -10:29:20 - LMT 1901 -10:40 - -1040 1979 Oct - -10:00 - -10 1995 + -10:00 - -10 1994 Dec 31 14:00 - +14 # N Mariana Is @@ -470,9 +470,9 @@ # New Caledonia # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule NC 1977 1978 - Dec Sun>=1 0:00 1:00 S +Rule NC 1977 1978 - Dec Sun>=1 0:00 1:00 - Rule NC 1978 1979 - Feb 27 0:00 0 - -Rule NC 1996 only - Dec 1 2:00s 1:00 S +Rule NC 1996 only - Dec 1 2:00s 1:00 - # Shanks & Pottenger say the following was at 2:00; go with IATA. Rule NC 1997 only - Mar 2 2:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -492,27 +492,28 @@ Rule NZ 1934 1940 - Apr lastSun 2:00 0 M Rule NZ 1934 1940 - Sep lastSun 2:00 0:30 S Rule NZ 1946 only - Jan 1 0:00 0 S -# Since 1957 Chatham has been 45 minutes ahead of NZ, but there's no -# convenient single notation for the date and time of this transition -# so we must duplicate the Rule lines. +# Since 1957 Chatham has been 45 minutes ahead of NZ, but until 2018a +# there was no documented single notation for the date and time of this +# transition. Duplicate the Rule lines for now, to give the 2018a change +# time to percolate out. Rule NZ 1974 only - Nov Sun>=1 2:00s 1:00 D -Rule Chatham 1974 only - Nov Sun>=1 2:45s 1:00 D +Rule Chatham 1974 only - Nov Sun>=1 2:45s 1:00 - Rule NZ 1975 only - Feb lastSun 2:00s 0 S -Rule Chatham 1975 only - Feb lastSun 2:45s 0 S +Rule Chatham 1975 only - Feb lastSun 2:45s 0 - Rule NZ 1975 1988 - Oct lastSun 2:00s 1:00 D -Rule Chatham 1975 1988 - Oct lastSun 2:45s 1:00 D +Rule Chatham 1975 1988 - Oct lastSun 2:45s 1:00 - Rule NZ 1976 1989 - Mar Sun>=1 2:00s 0 S -Rule Chatham 1976 1989 - Mar Sun>=1 2:45s 0 S +Rule Chatham 1976 1989 - Mar Sun>=1 2:45s 0 - Rule NZ 1989 only - Oct Sun>=8 2:00s 1:00 D -Rule Chatham 1989 only - Oct Sun>=8 2:45s 1:00 D +Rule Chatham 1989 only - Oct Sun>=8 2:45s 1:00 - Rule NZ 1990 2006 - Oct Sun>=1 2:00s 1:00 D -Rule Chatham 1990 2006 - Oct Sun>=1 2:45s 1:00 D +Rule Chatham 1990 2006 - Oct Sun>=1 2:45s 1:00 - Rule NZ 1990 2007 - Mar Sun>=15 2:00s 0 S -Rule Chatham 1990 2007 - Mar Sun>=15 2:45s 0 S +Rule Chatham 1990 2007 - Mar Sun>=15 2:45s 0 - Rule NZ 2007 max - Sep lastSun 2:00s 1:00 D -Rule Chatham 2007 max - Sep lastSun 2:45s 1:00 D +Rule Chatham 2007 max - Sep lastSun 2:45s 1:00 - Rule NZ 2008 max - Apr Sun>=1 2:00s 0 S -Rule Chatham 2008 max - Apr Sun>=1 2:45s 0 S +Rule Chatham 2008 max - Apr Sun>=1 2:45s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Auckland 11:39:04 - LMT 1868 Nov 2 11:30 NZ NZ%sT 1946 Jan 1 @@ -536,9 +537,9 @@ # Cook Is # From Shanks & Pottenger: # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Cook 1978 only - Nov 12 0:00 0:30 HS +Rule Cook 1978 only - Nov 12 0:00 0:30 - Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 - -Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS +Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua -10:30 - -1030 1978 Nov 12 @@ -679,11 +680,11 @@ # Assume the pattern instituted in 2012 will continue indefinitely. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule WS 2010 only - Sep lastSun 0:00 1 D -Rule WS 2011 only - Apr Sat>=1 4:00 0 S -Rule WS 2011 only - Sep lastSat 3:00 1 D -Rule WS 2012 max - Apr Sun>=1 4:00 0 S -Rule WS 2012 max - Sep lastSun 3:00 1 D +Rule WS 2010 only - Sep lastSun 0:00 1 - +Rule WS 2011 only - Apr Sat>=1 4:00 0 - +Rule WS 2011 only - Sep lastSat 3:00 1 - +Rule WS 2012 max - Apr Sun>=1 4:00 0 - +Rule WS 2012 max - Sep lastSun 3:00 1 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Apia 12:33:04 - LMT 1892 Jul 5 -11:26:56 - LMT 1911 @@ -723,11 +724,11 @@ # Tonga # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Tonga 1999 only - Oct 7 2:00s 1:00 S +Rule Tonga 1999 only - Oct 7 2:00s 1:00 - Rule Tonga 2000 only - Mar 19 2:00s 0 - -Rule Tonga 2000 2001 - Nov Sun>=1 2:00 1:00 S +Rule Tonga 2000 2001 - Nov Sun>=1 2:00 1:00 - Rule Tonga 2001 2002 - Jan lastSun 2:00 0 - -Rule Tonga 2016 only - Nov Sun>=1 2:00 1:00 S +Rule Tonga 2016 only - Nov Sun>=1 2:00 1:00 - Rule Tonga 2017 only - Jan Sun>=15 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Tongatapu 12:19:20 - LMT 1901 @@ -804,12 +805,12 @@ # Vanuatu # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Vanuatu 1983 only - Sep 25 0:00 1:00 S +Rule Vanuatu 1983 only - Sep 25 0:00 1:00 - Rule Vanuatu 1984 1991 - Mar Sun>=23 0:00 0 - -Rule Vanuatu 1984 only - Oct 23 0:00 1:00 S -Rule Vanuatu 1985 1991 - Sep Sun>=23 0:00 1:00 S +Rule Vanuatu 1984 only - Oct 23 0:00 1:00 - +Rule Vanuatu 1985 1991 - Sep Sun>=23 0:00 1:00 - Rule Vanuatu 1992 1993 - Jan Sun>=23 0:00 0 - -Rule Vanuatu 1992 only - Oct Sun>=23 0:00 1:00 S +Rule Vanuatu 1992 only - Oct Sun>=23 0:00 1:00 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila 11:00 Vanuatu +11/+12 @@ -1108,6 +1109,13 @@ # South Australian time even though it's located in Western Australia. # Queensland + +# From Paul Eggert (2018-02-26): +# I lack access to the following source for Queensland DST: +# Pearce C. History of daylight saving time in Queensland. +# Queensland Hist J. 2017 Aug;23(6):389-403 +# https://search.informit.com.au/documentSummary;dn=994682348436426;res=IELHSS + # From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06): # # The state of QUEENSLAND.. [ Courtesy Qld. Dept Premier Econ&Trade Devel ] # # [ Dec 1990 ] @@ -1534,6 +1542,12 @@ # "declared it the same day [throughout] the country as of Jan. 1, 1995" # as part of the competition to be first into the 21st century. +# From Kerry Shetline (2018-02-03): +# December 31 was the day that was skipped, so that the transition +# would be from Friday December 30, 1994 to Sunday January 1, 1995. +# From Paul Eggert (2018-02-04): +# One source for this is page 202 of: Bartky IR. One Time Fits All: +# The Campaigns for Global Uniformity (2007). # Kwajalein @@ -1626,7 +1640,7 @@ # From Howie Phelps (1999-11-10), who talked to a Pitcairner via shortwave: # Betty Christian told me yesterday that their local time is the same as -# Pacific Standard Time. They used to be 1/2 hour different from us here in +# Pacific Standard Time. They used to be ½ hour different from us here in # Sacramento but it was changed a couple of years ago. @@ -1665,7 +1679,7 @@ # 12 hours and 20 minutes ahead of GMT. When New Zealand adjusted its # standard time in 1940s, Tonga had the choice of subtracting from its # local time to come on the same standard time as New Zealand or of -# advancing its time to maintain the differential of 13 degrees +# advancing its time to maintain the differential of 13° # (approximately 50 minutes ahead of New Zealand time). # # Because His Majesty King Tāufaʻāhau Tupou IV, then Crown Prince diff -r 84a8fa684998 -r d5703ecb5b0a make/data/tzdata/europe --- a/make/data/tzdata/europe Mon Apr 09 12:59:06 2018 +0100 +++ b/make/data/tzdata/europe Mon Apr 09 14:27:42 2018 +0100 @@ -140,8 +140,8 @@ # along the towpath within a few yards of it.' # # I have a one inch to one mile map of London and my estimate of the stone's -# position is 51 degrees 28' 30" N, 0 degrees 18' 45" W. The longitude should -# be within about +-2". The Ordnance Survey grid reference is TQ172761. +# position is 51° 28' 30" N, 0° 18' 45" W. The longitude should +# be within about ±2". The Ordnance Survey grid reference is TQ172761. # # [This yields GMTOFF = -0:01:15 for London LMT in the 18th century.] @@ -181,7 +181,7 @@ # after-hours daylight in which to pursue his research. # In 1895 he presented a paper to the Wellington Philosophical Society # that proposed a two-hour daylight-saving shift. See: -# Hudson GV. On seasonal time-adjustment in countries south of lat. 30 deg. +# Hudson GV. On seasonal time-adjustment in countries south of lat. 30°. # Transactions and Proceedings of the New Zealand Institute. 1895;28:734 # http://rsnz.natlib.govt.nz/volume/rsnz_28/rsnz_28_00_006110.html # Although some interest was expressed in New Zealand, his proposal @@ -531,11 +531,25 @@ Link Europe/London Europe/Guernsey Link Europe/London Europe/Isle_of_Man -# From Paul Eggert (2018-01-19): +# From Paul Eggert (2018-02-15): +# In January 2018 we discovered that the negative SAVE values in the +# Eire rules cause problems with tests for ICU: +# https://mm.icann.org/pipermail/tz/2018-January/025825.html +# and with tests for OpenJDK: +# https://mm.icann.org/pipermail/tz/2018-January/025822.html +# +# To work around this problem, the build procedure can translate the +# following data into two forms, one with negative SAVE values and the +# other form with a traditional approximation for Irish time stamps +# after 1971-10-31 02:00 UTC; although this approximation has tm_isdst +# flags that are reversed, its UTC offsets are correct and this often +# suffices. This source file currently uses only nonnegative SAVE +# values, but this is intended to change and downstream code should +# not rely on it. +# # The following is like GB-Eire and EU, except with standard time in -# summer and negative daylight saving time in winter. -# Although currently commented out, this will need to become uncommented -# once the ICU/OpenJDK workaround is removed; see below. +# summer and negative daylight saving time in winter. It is for when +# negative SAVE values are used. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S #Rule Eire 1971 only - Oct 31 2:00u -1:00 GMT #Rule Eire 1972 1980 - Mar Sun>=16 2:00u 0 IST @@ -556,24 +570,12 @@ 0:00 1:00 IST 1947 Nov 2 2:00s 0:00 - GMT 1948 Apr 18 2:00s 0:00 GB-Eire GMT/IST 1968 Oct 27 -# From Paul Eggert (2018-01-18): -# The next line should look like this: +# The next line is for when negative SAVE values are used. # 1:00 Eire IST/GMT -# However, in January 2018 we discovered that the Eire rules cause -# problems with tests for ICU: -# https://mm.icann.org/pipermail/tz/2018-January/025825.html -# and with tests for OpenJDK: -# https://mm.icann.org/pipermail/tz/2018-January/025822.html -# To work around this problem, use a traditional approximation for -# time stamps after 1971-10-31 02:00 UTC, to give ICU and OpenJDK -# developers breathing room to fix bugs. This approximation has -# correct UTC offsets, but results in tm_isdst flags are the reverse -# of what they should be. This workaround is temporary and should be -# removed reasonably soon. +# These three lines are for when SAVE values are always nonnegative. 1:00 - IST 1971 Oct 31 2:00u 0:00 GB-Eire GMT/IST 1996 0:00 EU GMT/IST -# End of workaround for ICU and OpenJDK bugs. ############################################################################### @@ -1557,21 +1559,21 @@ # http://www.almanak.hi.is/klukkan.html # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Iceland 1917 1919 - Feb 19 23:00 1:00 S +Rule Iceland 1917 1919 - Feb 19 23:00 1:00 - Rule Iceland 1917 only - Oct 21 1:00 0 - Rule Iceland 1918 1919 - Nov 16 1:00 0 - -Rule Iceland 1921 only - Mar 19 23:00 1:00 S +Rule Iceland 1921 only - Mar 19 23:00 1:00 - Rule Iceland 1921 only - Jun 23 1:00 0 - -Rule Iceland 1939 only - Apr 29 23:00 1:00 S +Rule Iceland 1939 only - Apr 29 23:00 1:00 - Rule Iceland 1939 only - Oct 29 2:00 0 - -Rule Iceland 1940 only - Feb 25 2:00 1:00 S +Rule Iceland 1940 only - Feb 25 2:00 1:00 - Rule Iceland 1940 1941 - Nov Sun>=2 1:00s 0 - -Rule Iceland 1941 1942 - Mar Sun>=2 1:00s 1:00 S +Rule Iceland 1941 1942 - Mar Sun>=2 1:00s 1:00 - # 1943-1946 - first Sunday in March until first Sunday in winter -Rule Iceland 1943 1946 - Mar Sun>=1 1:00s 1:00 S +Rule Iceland 1943 1946 - Mar Sun>=1 1:00s 1:00 - Rule Iceland 1942 1948 - Oct Sun>=22 1:00s 0 - # 1947-1967 - first Sunday in April until first Sunday in winter -Rule Iceland 1947 1967 - Apr Sun>=1 1:00s 1:00 S +Rule Iceland 1947 1967 - Apr Sun>=1 1:00s 1:00 - # 1949 and 1967 Oct transitions delayed by 1 week Rule Iceland 1949 only - Oct 30 1:00s 0 - Rule Iceland 1950 1966 - Oct Sun>=22 1:00s 0 - @@ -2161,15 +2163,19 @@ 1:00 EU CE%sT # Portugal -# + # From Paul Eggert (2014-08-11), after a heads-up from Stephen Colebourne: # According to a Portuguese decree (1911-05-26) # https://dre.pt/application/dir/pdf1sdip/1911/05/12500/23132313.pdf # Lisbon was at -0:36:44.68, but switched to GMT on 1912-01-01 at 00:00. -# Round the old offset to -0:36:45. This agrees with Willett but disagrees -# with Shanks, who says the transition occurred on 1911-05-24 at 00:00 for -# Europe/Lisbon, Atlantic/Azores, and Atlantic/Madeira. +# Round the old offset to -0:36:45. This agrees with Willett.... # +# From Michael Deckers (2018-02-15): +# article 5 [of the 1911 decree; Deckers's translation] ...: +# These dispositions shall enter into force at the instant at which, +# according to the 2nd article, the civil day January 1, 1912 begins, +# all clocks therefore having to be advanced or set back correspondingly ... + # From Rui Pedro Salgueiro (1992-11-12): # Portugal has recently (September, 27) changed timezone # (from WET to MET or CET) to harmonize with EEC. @@ -2252,7 +2258,7 @@ # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Lisbon -0:36:45 - LMT 1884 - -0:36:45 - LMT 1912 Jan 1 # Lisbon Mean Time + -0:36:45 - LMT 1912 Jan 1 0:00u # Lisbon MT 0:00 Port WE%sT 1966 Apr 3 2:00 1:00 - CET 1976 Sep 26 1:00 0:00 Port WE%sT 1983 Sep 25 1:00s @@ -2261,7 +2267,7 @@ 0:00 EU WE%sT # This Zone can be simplified once we assume zic %z. Zone Atlantic/Azores -1:42:40 - LMT 1884 # Ponta Delgada - -1:54:32 - HMT 1912 Jan 1 # Horta Mean Time + -1:54:32 - HMT 1912 Jan 1 2:00u # Horta MT -2:00 Port -02/-01 1942 Apr 25 22:00s -2:00 Port +00 1942 Aug 15 22:00s -2:00 Port -02/-01 1943 Apr 17 22:00s @@ -2277,7 +2283,7 @@ -1:00 EU -01/+00 # This Zone can be simplified once we assume zic %z. Zone Atlantic/Madeira -1:07:36 - LMT 1884 # Funchal - -1:07:36 - FMT 1912 Jan 1 # Funchal Mean Time + -1:07:36 - FMT 1912 Jan 1 1:00u # Funchal MT -1:00 Port -01/+00 1942 Apr 25 22:00s -1:00 Port +01 1942 Aug 15 22:00s -1:00 Port -01/+00 1943 Apr 17 22:00s @@ -2615,13 +2621,13 @@ # From Vladimir Karpinsky (2014-07-08): # LMT in Moscow (before Jul 3, 1916) is 2:30:17, that was defined by Moscow -# Observatory (coordinates: 55 deg. 45'29.70", 37 deg. 34'05.30").... +# Observatory (coordinates: 55° 45' 29.70", 37° 34' 05.30").... # LMT in Moscow since Jul 3, 1916 is 2:31:01 as a result of new standard. # (The info is from the book by Byalokoz ... p. 18.) # The time in St. Petersburg as capital of Russia was defined by # Pulkov observatory, near St. Petersburg. In 1916 LMT Moscow # was synchronized with LMT St. Petersburg (+30 minutes), (Pulkov observatory -# coordinates: 59 deg. 46'18.70", 30 deg. 19'40.70") so 30 deg. 19'40.70" > +# coordinates: 59° 46' 18.70", 30° 19' 40.70") so 30° 19' 40.70" > # 2h01m18.7s = 2:01:19. LMT Moscow = LMT St.Petersburg + 30m 2:01:19 + 0:30 = # 2:31:19 ... # @@ -3450,7 +3456,7 @@ # three degrees, or twelve minutes of time, to the west of the # meridian of the Observatory of Stockholm". The law is dated 1878-05-31. # -# The observatory at that time had the meridian 18 degrees 03' 30" +# The observatory at that time had the meridian 18° 03' 30" # eastern longitude = 01:12:14 in time. Less 12 minutes gives the # national standard time as 01:00:14 ahead of GMT.... # @@ -3554,7 +3560,7 @@ # From Alois Treindl (2013-09-11): # The Federal regulations say # https://www.admin.ch/opc/de/classified-compilation/20071096/index.html -# ... the meridian for Bern mean time ... is 7 degrees 26' 22.50". +# ... the meridian for Bern mean time ... is 7° 26' 22.50". # Expressed in time, it is 0h29m45.5s. # From Pierre-Yves Berger (2013-09-11): diff -r 84a8fa684998 -r d5703ecb5b0a make/data/tzdata/northamerica --- a/make/data/tzdata/northamerica Mon Apr 09 12:59:06 2018 +0100 +++ b/make/data/tzdata/northamerica Mon Apr 09 14:27:42 2018 +0100 @@ -48,7 +48,7 @@ # in New York City (1869-10). His 1870 proposal was based on Washington, DC, # but in 1872-05 he moved the proposed origin to Greenwich. -# From Paul Eggert (2016-09-21): +# From Paul Eggert (2018-03-20): # Dowd's proposal left many details unresolved, such as where to draw # lines between time zones. The key individual who made time zones # work in the US was William Frederick Allen - railway engineer, @@ -59,10 +59,9 @@ # to the General Time Convention on 1883-04-11, saying that his plan # meant "local time would be practically abolished" - a plus for # railway scheduling. By the next convention on 1883-10-11 nearly all -# railroads had agreed and it took effect on 1883-11-18 at 12:00. -# That Sunday was called the "day of two noons", as the eastern parts -# of the new zones observed noon twice. Allen witnessed the -# transition in New York City, writing: +# railroads had agreed and it took effect on 1883-11-18. That Sunday +# was called the "day of two noons", as some locations observed noon +# twice. Allen witnessed the transition in New York City, writing: # # I heard the bells of St. Paul's strike on the old time. Four # minutes later, obedient to the electrical signal from the Naval @@ -447,8 +446,7 @@ # ...according to the Census Bureau, the largest city is Beulah (although # it's commonly referred to as Beulah-Hazen, with Hazen being the next # largest city in Mercer County). Google Maps places Beulah's city hall -# at 47 degrees 15' 51" N, 101 degrees 46' 40" W, which yields an offset -# of 6h47'07". +# at 47° 15' 51" N, 101° 46' 40" W, which yields an offset of 6h47'07". Zone America/North_Dakota/Beulah -6:47:07 - LMT 1883 Nov 18 12:12:53 -7:00 US M%sT 2010 Nov 7 2:00 @@ -481,7 +479,7 @@ # California, northern Idaho (Benewah, Bonner, Boundary, Clearwater, # Kootenai, Latah, Lewis, Nez Perce, and Shoshone counties, Idaho county # north of the Salmon River, and the towns of Burgdorf and Warren), -# Nevada (except West Wendover), Oregon (except the northern 3/4 of +# Nevada (except West Wendover), Oregon (except the northern ¾ of # Malheur county), and Washington # From Paul Eggert (2016-08-20): @@ -979,6 +977,13 @@ -5:00 - EST 2006 -5:00 US E%sT +# From Paul Eggert (2018-03-20): +# The Louisville & Nashville Railroad's 1883-11-18 change occurred at +# 10:00 old local time; train were supposed to come to a standstill +# for precisely 18 minutes. See Bartky Fig. 1 (page 50). It is not +# clear how this matched civil time in Louisville, so for now continue +# to assume Louisville switched at noon new local time, like New York. +# # Part of Kentucky left its clocks alone in 1974. # This also includes Clark, Floyd, and Harrison counties in Indiana. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER @@ -3287,8 +3292,8 @@ # http://www.jamaicaobserver.com/columns/The-politician-in-all-of-us_17573647 # # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Jamaica -5:07:11 - LMT 1890 # Kingston - -5:07:11 - KMT 1912 Feb # Kingston Mean Time +Zone America/Jamaica -5:07:10 - LMT 1890 # Kingston + -5:07:10 - KMT 1912 Feb # Kingston Mean Time -5:00 - EST 1974 -5:00 US E%sT 1984 -5:00 - EST @@ -3438,7 +3443,7 @@ # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Grand_Turk -4:44:32 - LMT 1890 - -5:07:11 - KMT 1912 Feb # Kingston Mean Time + -5:07:10 - KMT 1912 Feb # Kingston Mean Time -5:00 - EST 1979 -5:00 US E%sT 2015 Nov Sun>=1 2:00 -4:00 - AST 2018 Mar 11 3:00 diff -r 84a8fa684998 -r d5703ecb5b0a make/data/tzdata/southamerica --- a/make/data/tzdata/southamerica Mon Apr 09 12:59:06 2018 +0100 +++ b/make/data/tzdata/southamerica Mon Apr 09 14:27:42 2018 +0100 @@ -70,28 +70,28 @@ # AR was chosen because they are the ISO letters that represent Argentina. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Arg 1930 only - Dec 1 0:00 1:00 S +Rule Arg 1930 only - Dec 1 0:00 1:00 - Rule Arg 1931 only - Apr 1 0:00 0 - -Rule Arg 1931 only - Oct 15 0:00 1:00 S +Rule Arg 1931 only - Oct 15 0:00 1:00 - Rule Arg 1932 1940 - Mar 1 0:00 0 - -Rule Arg 1932 1939 - Nov 1 0:00 1:00 S -Rule Arg 1940 only - Jul 1 0:00 1:00 S +Rule Arg 1932 1939 - Nov 1 0:00 1:00 - +Rule Arg 1940 only - Jul 1 0:00 1:00 - Rule Arg 1941 only - Jun 15 0:00 0 - -Rule Arg 1941 only - Oct 15 0:00 1:00 S +Rule Arg 1941 only - Oct 15 0:00 1:00 - Rule Arg 1943 only - Aug 1 0:00 0 - -Rule Arg 1943 only - Oct 15 0:00 1:00 S +Rule Arg 1943 only - Oct 15 0:00 1:00 - Rule Arg 1946 only - Mar 1 0:00 0 - -Rule Arg 1946 only - Oct 1 0:00 1:00 S +Rule Arg 1946 only - Oct 1 0:00 1:00 - Rule Arg 1963 only - Oct 1 0:00 0 - -Rule Arg 1963 only - Dec 15 0:00 1:00 S +Rule Arg 1963 only - Dec 15 0:00 1:00 - Rule Arg 1964 1966 - Mar 1 0:00 0 - -Rule Arg 1964 1966 - Oct 15 0:00 1:00 S +Rule Arg 1964 1966 - Oct 15 0:00 1:00 - Rule Arg 1967 only - Apr 2 0:00 0 - -Rule Arg 1967 1968 - Oct Sun>=1 0:00 1:00 S +Rule Arg 1967 1968 - Oct Sun>=1 0:00 1:00 - Rule Arg 1968 1969 - Apr Sun>=1 0:00 0 - -Rule Arg 1974 only - Jan 23 0:00 1:00 S +Rule Arg 1974 only - Jan 23 0:00 1:00 - Rule Arg 1974 only - May 1 0:00 0 - -Rule Arg 1988 only - Dec 1 0:00 1:00 S +Rule Arg 1988 only - Dec 1 0:00 1:00 - # # From Hernan G. Otero (1995-06-26): # These corrections were contributed by InterSoft Argentina S.A., @@ -99,7 +99,7 @@ # Talleres de Hidrografía Naval Argentina # (Argentine Naval Hydrography Institute) Rule Arg 1989 1993 - Mar Sun>=1 0:00 0 - -Rule Arg 1989 1992 - Oct Sun>=15 0:00 1:00 S +Rule Arg 1989 1992 - Oct Sun>=15 0:00 1:00 - # # From Hernan G. Otero (1995-06-26): # From this moment on, the law that mandated the daylight saving @@ -110,7 +110,7 @@ # On October 3, 1999, 0:00 local, Argentina implemented daylight savings time, # which did not result in the switch of a time zone, as they stayed 9 hours # from the International Date Line. -Rule Arg 1999 only - Oct Sun>=1 0:00 1:00 S +Rule Arg 1999 only - Oct Sun>=1 0:00 1:00 - # From Paul Eggert (2007-12-28): # DST was set to expire on March 5, not March 3, but since it was converted # to standard time on March 3 it's more convenient for us to pretend that @@ -213,9 +213,9 @@ # la modificación del huso horario, ya que 2009 nos encuentra con # crecimiento en la producción y distribución energética." -Rule Arg 2007 only - Dec 30 0:00 1:00 S +Rule Arg 2007 only - Dec 30 0:00 1:00 - Rule Arg 2008 2009 - Mar Sun>=15 0:00 0 - -Rule Arg 2008 only - Oct Sun>=15 0:00 1:00 S +Rule Arg 2008 only - Oct Sun>=15 0:00 1:00 - # From Mariano Absatz (2004-05-21): # Today it was officially published that the Province of Mendoza is changing @@ -225,12 +225,14 @@ # It's Law No. 7,210. This change is due to a public power emergency, so for # now we'll assume it's for this year only. # -# From Paul Eggert (2014-08-09): +# From Paul Eggert (2018-01-31): # Hora de verano para la República Argentina # http://buenasiembra.com.ar/esoterismo/astrologia/hora-de-verano-de-la-republica-argentina-27.html # says that standard time in Argentina from 1894-10-31 # to 1920-05-01 was -4:16:48.25. Go with this more-precise value -# over Shanks & Pottenger. +# over Shanks & Pottenger. It is upward compatible with Milne, who +# says Córdoba time was -4:16:48.2. + # # From Mariano Absatz (2004-06-05): # These media articles from a major newspaper mostly cover the current state: @@ -404,9 +406,9 @@ # rules...San Luis is still using "Western ARgentina Time" and it got # stuck on Summer daylight savings time even though the summer is over. -# From Paul Eggert (2013-09-05): +# From Paul Eggert (2018-01-23): # Perhaps San Luis operates on the legal fiction that it is at -04 -# with perpetual summer time, but ordinary usage typically seems to +# with perpetual daylight saving time, but ordinary usage typically seems to # just say it's at -03; see, for example, # https://es.wikipedia.org/wiki/Hora_oficial_argentina # We've documented similar situations as being plain changes to @@ -415,9 +417,6 @@ # plus is that this silences a zic complaint that there's no POSIX TZ # setting for time stamps past 2038. -# From Paul Eggert (2013-02-21): -# Milne says Córdoba time was -4:16:48.2. Round to the nearest second. - # Zone NAME GMTOFF RULES FORMAT [UNTIL] # # Buenos Aires (BA), Capital Federal (CF), @@ -552,7 +551,7 @@ # San Luis (SL) Rule SanLuis 2008 2009 - Mar Sun>=8 0:00 0 - -Rule SanLuis 2007 2008 - Oct Sun>=8 0:00 1:00 S +Rule SanLuis 2007 2008 - Oct Sun>=8 0:00 1:00 - Zone America/Argentina/San_Luis -4:25:24 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May @@ -794,14 +793,14 @@ # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Decree 20,466 (1931-10-01) # Decree 21,896 (1932-01-10) -Rule Brazil 1931 only - Oct 3 11:00 1:00 S +Rule Brazil 1931 only - Oct 3 11:00 1:00 - Rule Brazil 1932 1933 - Apr 1 0:00 0 - -Rule Brazil 1932 only - Oct 3 0:00 1:00 S +Rule Brazil 1932 only - Oct 3 0:00 1:00 - # Decree 23,195 (1933-10-10) # revoked DST. # Decree 27,496 (1949-11-24) # Decree 27,998 (1950-04-13) -Rule Brazil 1949 1952 - Dec 1 0:00 1:00 S +Rule Brazil 1949 1952 - Dec 1 0:00 1:00 - Rule Brazil 1950 only - Apr 16 1:00 0 - Rule Brazil 1951 1952 - Apr 1 0:00 0 - # Decree 32,308 (1953-02-24) @@ -813,51 +812,51 @@ # in SP, RJ, GB, MG, ES, due to the prolongation of the drought. # Decree 53,071 (1963-12-03) # extended the above decree to all of the national territory on 12-09. -Rule Brazil 1963 only - Dec 9 0:00 1:00 S +Rule Brazil 1963 only - Dec 9 0:00 1:00 - # Decree 53,604 (1964-02-25) # extended summer time by one day to 1964-03-01 00:00 (start of school). Rule Brazil 1964 only - Mar 1 0:00 0 - # Decree 55,639 (1965-01-27) -Rule Brazil 1965 only - Jan 31 0:00 1:00 S +Rule Brazil 1965 only - Jan 31 0:00 1:00 - Rule Brazil 1965 only - Mar 31 0:00 0 - # Decree 57,303 (1965-11-22) -Rule Brazil 1965 only - Dec 1 0:00 1:00 S +Rule Brazil 1965 only - Dec 1 0:00 1:00 - # Decree 57,843 (1966-02-18) Rule Brazil 1966 1968 - Mar 1 0:00 0 - -Rule Brazil 1966 1967 - Nov 1 0:00 1:00 S +Rule Brazil 1966 1967 - Nov 1 0:00 1:00 - # Decree 63,429 (1968-10-15) # revoked DST. # Decree 91,698 (1985-09-27) -Rule Brazil 1985 only - Nov 2 0:00 1:00 S +Rule Brazil 1985 only - Nov 2 0:00 1:00 - # Decree 92,310 (1986-01-21) # Decree 92,463 (1986-03-13) Rule Brazil 1986 only - Mar 15 0:00 0 - # Decree 93,316 (1986-10-01) -Rule Brazil 1986 only - Oct 25 0:00 1:00 S +Rule Brazil 1986 only - Oct 25 0:00 1:00 - Rule Brazil 1987 only - Feb 14 0:00 0 - # Decree 94,922 (1987-09-22) -Rule Brazil 1987 only - Oct 25 0:00 1:00 S +Rule Brazil 1987 only - Oct 25 0:00 1:00 - Rule Brazil 1988 only - Feb 7 0:00 0 - # Decree 96,676 (1988-09-12) # except for the states of AC, AM, PA, RR, RO, and AP (then a territory) -Rule Brazil 1988 only - Oct 16 0:00 1:00 S +Rule Brazil 1988 only - Oct 16 0:00 1:00 - Rule Brazil 1989 only - Jan 29 0:00 0 - # Decree 98,077 (1989-08-21) # with the same exceptions -Rule Brazil 1989 only - Oct 15 0:00 1:00 S +Rule Brazil 1989 only - Oct 15 0:00 1:00 - Rule Brazil 1990 only - Feb 11 0:00 0 - # Decree 99,530 (1990-09-17) # adopted by RS, SC, PR, SP, RJ, ES, MG, GO, MS, DF. # Decree 99,629 (1990-10-19) adds BA, MT. -Rule Brazil 1990 only - Oct 21 0:00 1:00 S +Rule Brazil 1990 only - Oct 21 0:00 1:00 - Rule Brazil 1991 only - Feb 17 0:00 0 - # Unnumbered decree (1991-09-25) # adopted by RS, SC, PR, SP, RJ, ES, MG, BA, GO, MT, MS, DF. -Rule Brazil 1991 only - Oct 20 0:00 1:00 S +Rule Brazil 1991 only - Oct 20 0:00 1:00 - Rule Brazil 1992 only - Feb 9 0:00 0 - # Unnumbered decree (1992-10-16) # adopted by same states. -Rule Brazil 1992 only - Oct 25 0:00 1:00 S +Rule Brazil 1992 only - Oct 25 0:00 1:00 - Rule Brazil 1993 only - Jan 31 0:00 0 - # Decree 942 (1993-09-28) # adopted by same states, plus AM. @@ -867,12 +866,12 @@ # adopted by same states, plus MT and TO. # Decree 1,674 (1995-10-13) # adds AL, SE. -Rule Brazil 1993 1995 - Oct Sun>=11 0:00 1:00 S +Rule Brazil 1993 1995 - Oct Sun>=11 0:00 1:00 - Rule Brazil 1994 1995 - Feb Sun>=15 0:00 0 - Rule Brazil 1996 only - Feb 11 0:00 0 - # Decree 2,000 (1996-09-04) # adopted by same states, minus AL, SE. -Rule Brazil 1996 only - Oct 6 0:00 1:00 S +Rule Brazil 1996 only - Oct 6 0:00 1:00 - Rule Brazil 1997 only - Feb 16 0:00 0 - # From Daniel C. Sobral (1998-02-12): # In 1997, the DS began on October 6. The stated reason was that @@ -882,19 +881,19 @@ # to help dealing with the shortages of electric power. # # Decree 2,317 (1997-09-04), adopted by same states. -Rule Brazil 1997 only - Oct 6 0:00 1:00 S +Rule Brazil 1997 only - Oct 6 0:00 1:00 - # Decree 2,495 # (1998-02-10) Rule Brazil 1998 only - Mar 1 0:00 0 - # Decree 2,780 (1998-09-11) # adopted by the same states as before. -Rule Brazil 1998 only - Oct 11 0:00 1:00 S +Rule Brazil 1998 only - Oct 11 0:00 1:00 - Rule Brazil 1999 only - Feb 21 0:00 0 - # Decree 3,150 # (1999-08-23) adopted by same states. # Decree 3,188 (1999-09-30) # adds SE, AL, PB, PE, RN, CE, PI, MA and RR. -Rule Brazil 1999 only - Oct 3 0:00 1:00 S +Rule Brazil 1999 only - Oct 3 0:00 1:00 - Rule Brazil 2000 only - Feb 27 0:00 0 - # Decree 3,592 (2000-09-06) # adopted by the same states as before. @@ -904,34 +903,34 @@ # repeals DST in SE, AL, PB, RN, CE, PI and MA, effective 2000-10-22 00:00. # Decree 3,916 # (2001-09-13) reestablishes DST in AL, CE, MA, PB, PE, PI, RN, SE. -Rule Brazil 2000 2001 - Oct Sun>=8 0:00 1:00 S +Rule Brazil 2000 2001 - Oct Sun>=8 0:00 1:00 - Rule Brazil 2001 2006 - Feb Sun>=15 0:00 0 - # Decree 4,399 (2002-10-01) repeals DST in AL, CE, MA, PB, PE, PI, RN, SE. # 4,399 -Rule Brazil 2002 only - Nov 3 0:00 1:00 S +Rule Brazil 2002 only - Nov 3 0:00 1:00 - # Decree 4,844 (2003-09-24; corrected 2003-09-26) repeals DST in BA, MT, TO. # 4,844 -Rule Brazil 2003 only - Oct 19 0:00 1:00 S +Rule Brazil 2003 only - Oct 19 0:00 1:00 - # Decree 5,223 (2004-10-01) reestablishes DST in MT. # 5,223 -Rule Brazil 2004 only - Nov 2 0:00 1:00 S +Rule Brazil 2004 only - Nov 2 0:00 1:00 - # Decree 5,539 (2005-09-19), # adopted by the same states as before. -Rule Brazil 2005 only - Oct 16 0:00 1:00 S +Rule Brazil 2005 only - Oct 16 0:00 1:00 - # Decree 5,920 (2006-10-03), # adopted by the same states as before. -Rule Brazil 2006 only - Nov 5 0:00 1:00 S +Rule Brazil 2006 only - Nov 5 0:00 1:00 - Rule Brazil 2007 only - Feb 25 0:00 0 - # Decree 6,212 (2007-09-26), # adopted by the same states as before. -Rule Brazil 2007 only - Oct Sun>=8 0:00 1:00 S +Rule Brazil 2007 only - Oct Sun>=8 0:00 1:00 - # From Frederico A. C. Neves (2008-09-10): # According to this decree # http://www.planalto.gov.br/ccivil_03/_Ato2007-2010/2008/Decreto/D6558.htm # [t]he DST period in Brazil now on will be from the 3rd Oct Sunday to the # 3rd Feb Sunday. There is an exception on the return date when this is # the Carnival Sunday then the return date will be the next Sunday... -Rule Brazil 2008 2017 - Oct Sun>=15 0:00 1:00 S +Rule Brazil 2008 2017 - Oct Sun>=15 0:00 1:00 - Rule Brazil 2008 2011 - Feb Sun>=15 0:00 0 - # Decree 7,584 (2011-10-13) # added Bahia. @@ -949,7 +948,7 @@ # ... https://www.timeanddate.com/news/time/brazil-delays-dst-2018.html # From Steffen Thorsen (2017-12-20): # http://www.planalto.gov.br/ccivil_03/_ato2015-2018/2017/decreto/D9242.htm -Rule Brazil 2018 max - Nov Sun>=1 0:00 1:00 S +Rule Brazil 2018 max - Nov Sun>=1 0:00 1:00 - Rule Brazil 2023 only - Feb Sun>=22 0:00 0 - Rule Brazil 2024 2025 - Feb Sun>=15 0:00 0 - Rule Brazil 2026 only - Feb Sun>=22 0:00 0 - @@ -1256,28 +1255,28 @@ # For now, assume that they will not revert. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Chile 1927 1931 - Sep 1 0:00 1:00 S +Rule Chile 1927 1931 - Sep 1 0:00 1:00 - Rule Chile 1928 1932 - Apr 1 0:00 0 - -Rule Chile 1968 only - Nov 3 4:00u 1:00 S +Rule Chile 1968 only - Nov 3 4:00u 1:00 - Rule Chile 1969 only - Mar 30 3:00u 0 - -Rule Chile 1969 only - Nov 23 4:00u 1:00 S +Rule Chile 1969 only - Nov 23 4:00u 1:00 - Rule Chile 1970 only - Mar 29 3:00u 0 - Rule Chile 1971 only - Mar 14 3:00u 0 - -Rule Chile 1970 1972 - Oct Sun>=9 4:00u 1:00 S +Rule Chile 1970 1972 - Oct Sun>=9 4:00u 1:00 - Rule Chile 1972 1986 - Mar Sun>=9 3:00u 0 - -Rule Chile 1973 only - Sep 30 4:00u 1:00 S -Rule Chile 1974 1987 - Oct Sun>=9 4:00u 1:00 S +Rule Chile 1973 only - Sep 30 4:00u 1:00 - +Rule Chile 1974 1987 - Oct Sun>=9 4:00u 1:00 - Rule Chile 1987 only - Apr 12 3:00u 0 - Rule Chile 1988 1990 - Mar Sun>=9 3:00u 0 - -Rule Chile 1988 1989 - Oct Sun>=9 4:00u 1:00 S -Rule Chile 1990 only - Sep 16 4:00u 1:00 S +Rule Chile 1988 1989 - Oct Sun>=9 4:00u 1:00 - +Rule Chile 1990 only - Sep 16 4:00u 1:00 - Rule Chile 1991 1996 - Mar Sun>=9 3:00u 0 - -Rule Chile 1991 1997 - Oct Sun>=9 4:00u 1:00 S +Rule Chile 1991 1997 - Oct Sun>=9 4:00u 1:00 - Rule Chile 1997 only - Mar 30 3:00u 0 - Rule Chile 1998 only - Mar Sun>=9 3:00u 0 - -Rule Chile 1998 only - Sep 27 4:00u 1:00 S +Rule Chile 1998 only - Sep 27 4:00u 1:00 - Rule Chile 1999 only - Apr 4 3:00u 0 - -Rule Chile 1999 2010 - Oct Sun>=9 4:00u 1:00 S +Rule Chile 1999 2010 - Oct Sun>=9 4:00u 1:00 - Rule Chile 2000 2007 - Mar Sun>=9 3:00u 0 - # N.B.: the end of March 29 in Chile is March 30 in Universal time, # which is used below in specifying the transition. @@ -1285,11 +1284,11 @@ Rule Chile 2009 only - Mar Sun>=9 3:00u 0 - Rule Chile 2010 only - Apr Sun>=1 3:00u 0 - Rule Chile 2011 only - May Sun>=2 3:00u 0 - -Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 S +Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 - Rule Chile 2012 2014 - Apr Sun>=23 3:00u 0 - -Rule Chile 2012 2014 - Sep Sun>=2 4:00u 1:00 S +Rule Chile 2012 2014 - Sep Sun>=2 4:00u 1:00 - Rule Chile 2016 max - May Sun>=9 3:00u 0 - -Rule Chile 2016 max - Aug Sun>=9 4:00u 1:00 S +Rule Chile 2016 max - Aug Sun>=9 4:00u 1:00 - # IATA SSIM anomalies: (1992-02) says 1992-03-14; # (1996-09) says 1998-03-08. Ignore these. # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1354,7 +1353,7 @@ # "A variation of fifteen minutes in the public clocks of Bogota is not rare." # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule CO 1992 only - May 3 0:00 1:00 S +Rule CO 1992 only - May 3 0:00 1:00 - Rule CO 1993 only - Apr 4 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Bogota -4:56:16 - LMT 1884 Mar 13 @@ -1414,7 +1413,7 @@ # repeated. For now, assume transitions were at 00:00 local time country-wide. # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Ecuador 1992 only - Nov 28 0:00 1:00 S +Rule Ecuador 1992 only - Nov 28 0:00 1:00 - Rule Ecuador 1993 only - Feb 5 0:00 0 - # # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1504,22 +1503,22 @@ # the maintainers of the database to inform them we're adopting # the same policy this year and suggest recommendations for future years. # -# For now we will assume permanent summer time for the Falklands +# For now we will assume permanent -03 for the Falklands # until advised differently (to apply for 2012 and beyond, after the 2011 # experiment was apparently successful.) # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Falk 1937 1938 - Sep lastSun 0:00 1:00 S +Rule Falk 1937 1938 - Sep lastSun 0:00 1:00 - Rule Falk 1938 1942 - Mar Sun>=19 0:00 0 - -Rule Falk 1939 only - Oct 1 0:00 1:00 S -Rule Falk 1940 1942 - Sep lastSun 0:00 1:00 S +Rule Falk 1939 only - Oct 1 0:00 1:00 - +Rule Falk 1940 1942 - Sep lastSun 0:00 1:00 - Rule Falk 1943 only - Jan 1 0:00 0 - -Rule Falk 1983 only - Sep lastSun 0:00 1:00 S +Rule Falk 1983 only - Sep lastSun 0:00 1:00 - Rule Falk 1984 1985 - Apr lastSun 0:00 0 - -Rule Falk 1984 only - Sep 16 0:00 1:00 S -Rule Falk 1985 2000 - Sep Sun>=9 0:00 1:00 S +Rule Falk 1984 only - Sep 16 0:00 1:00 - +Rule Falk 1985 2000 - Sep Sun>=9 0:00 1:00 - Rule Falk 1986 2000 - Apr Sun>=16 0:00 0 - Rule Falk 2001 2010 - Apr Sun>=15 2:00 0 - -Rule Falk 2001 2010 - Sep Sun>=1 2:00 1:00 S +Rule Falk 2001 2010 - Sep Sun>=1 2:00 1:00 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Stanley -3:51:24 - LMT 1890 -3:51:24 - SMT 1912 Mar 12 # Stanley Mean Time @@ -1554,16 +1553,16 @@ # adjust their clocks at 0 hour of the given dates. # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Para 1975 1988 - Oct 1 0:00 1:00 S +Rule Para 1975 1988 - Oct 1 0:00 1:00 - Rule Para 1975 1978 - Mar 1 0:00 0 - Rule Para 1979 1991 - Apr 1 0:00 0 - -Rule Para 1989 only - Oct 22 0:00 1:00 S -Rule Para 1990 only - Oct 1 0:00 1:00 S -Rule Para 1991 only - Oct 6 0:00 1:00 S +Rule Para 1989 only - Oct 22 0:00 1:00 - +Rule Para 1990 only - Oct 1 0:00 1:00 - +Rule Para 1991 only - Oct 6 0:00 1:00 - Rule Para 1992 only - Mar 1 0:00 0 - -Rule Para 1992 only - Oct 5 0:00 1:00 S +Rule Para 1992 only - Oct 5 0:00 1:00 - Rule Para 1993 only - Mar 31 0:00 0 - -Rule Para 1993 1995 - Oct 1 0:00 1:00 S +Rule Para 1993 1995 - Oct 1 0:00 1:00 - Rule Para 1994 1995 - Feb lastSun 0:00 0 - Rule Para 1996 only - Mar 1 0:00 0 - # IATA SSIM (2000-02) says 1999-10-10; ignore this for now. @@ -1581,7 +1580,7 @@ # year, the time will change on the first Sunday of October; likewise, the # clock will be set back on the first Sunday of March. # -Rule Para 1996 2001 - Oct Sun>=1 0:00 1:00 S +Rule Para 1996 2001 - Oct Sun>=1 0:00 1:00 - # IATA SSIM (1997-09) says Mar 1; go with Shanks & Pottenger. Rule Para 1997 only - Feb lastSun 0:00 0 - # Shanks & Pottenger say 1999-02-28; IATA SSIM (1999-02) says 1999-02-27, but @@ -1592,7 +1591,7 @@ # dst method to be from the first Sunday in September to the first Sunday in # April. Rule Para 2002 2004 - Apr Sun>=1 0:00 0 - -Rule Para 2002 2003 - Sep Sun>=1 0:00 1:00 S +Rule Para 2002 2003 - Sep Sun>=1 0:00 1:00 - # # From Jesper Nørgaard Welen (2005-01-02): # There are several sources that claim that Paraguay made @@ -1601,7 +1600,7 @@ # Decree 1,867 (2004-03-05) # From Carlos Raúl Perasso via Jesper Nørgaard Welen (2006-10-13) # http://www.presidencia.gov.py/decretos/D1867.pdf -Rule Para 2004 2009 - Oct Sun>=15 0:00 1:00 S +Rule Para 2004 2009 - Oct Sun>=15 0:00 1:00 - Rule Para 2005 2009 - Mar Sun>=8 0:00 0 - # From Carlos Raúl Perasso (2010-02-18): # By decree number 3958 issued yesterday @@ -1614,7 +1613,7 @@ # and that on the first Sunday of the month of October, it is to be set # forward 60 minutes, in all the territory of the Paraguayan Republic. # ... -Rule Para 2010 max - Oct Sun>=1 0:00 1:00 S +Rule Para 2010 max - Oct Sun>=1 0:00 1:00 - Rule Para 2010 2012 - Apr Sun>=8 0:00 0 - # # From Steffen Thorsen (2013-03-07): @@ -1647,16 +1646,16 @@ # Shanks & Pottenger don't have this transition. Assume 1986 was like 1987. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Peru 1938 only - Jan 1 0:00 1:00 S +Rule Peru 1938 only - Jan 1 0:00 1:00 - Rule Peru 1938 only - Apr 1 0:00 0 - -Rule Peru 1938 1939 - Sep lastSun 0:00 1:00 S +Rule Peru 1938 1939 - Sep lastSun 0:00 1:00 - Rule Peru 1939 1940 - Mar Sun>=24 0:00 0 - -Rule Peru 1986 1987 - Jan 1 0:00 1:00 S +Rule Peru 1986 1987 - Jan 1 0:00 1:00 - Rule Peru 1986 1987 - Apr 1 0:00 0 - -Rule Peru 1990 only - Jan 1 0:00 1:00 S +Rule Peru 1990 only - Jan 1 0:00 1:00 - Rule Peru 1990 only - Apr 1 0:00 0 - # IATA is ambiguous for 1993/1995; go with Shanks & Pottenger. -Rule Peru 1994 only - Jan 1 0:00 1:00 S +Rule Peru 1994 only - Jan 1 0:00 1:00 - Rule Peru 1994 only - Apr 1 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Lima -5:08:12 - LMT 1890 @@ -1702,72 +1701,201 @@ # Uruguay # From Paul Eggert (1993-11-18): # Uruguay wins the prize for the strangest peacetime manipulation of the rules. -# From Shanks & Pottenger: +# +# From Tim Parenti (2018-02-20), per Jeremie Bonjour (2018-01-31) and Michael +# Deckers (2018-02-20): +# ... At least they kept good records... +# +# http://www.armada.mil.uy/ContenidosPDFs/sohma/web/almanaque/almanaque_2018.pdf#page=36 +# Page 36 of Almanaque 2018, published by the Oceanography, Hydrography, and +# Meteorology Service of the Uruguayan Navy, seems to give many transitions +# with greater clarity than we've had before. It directly references many laws +# and decrees which are, in turn, referenced below. They can be viewed in the +# public archives of the Diario Oficial (in Spanish) at +# http://www.impo.com.uy/diariooficial/ +# +# Ley No. 3920 of 1908-06-10 placed the determination of legal time under the +# auspices of the National Institute for the Prediction of Time. It is unclear +# exactly what offset was used during this period, though Ley No. 7200 of +# 1920-04-23 used the Observatory of the National Meteorological Institute in +# Montevideo (34° 54' 33" S, 56° 12' 45" W) as its reference meridian, +# retarding legal time by 15 minutes 9 seconds from 1920-04-30 24:00, +# resulting in UT-04. Assume the corresponding LMT of UT-03:44:51 (given on +# page 725 of the Proceedings of the Second Pan-American Scientific Congress, +# 1915-1916) was in use, and merely became official from 1908-06-10. +# https://www.impo.com.uy/diariooficial/1908/06/18/12 +# https://www.impo.com.uy/diariooficial/1920/04/27/9 +# +# Ley No. 7594 of 1923-06-28 specified legal time as Observatory time advanced +# by 44 minutes 51 seconds (UT-03) "from 30 September to 31 March", and by 14 +# minutes 51 seconds (UT-03:30) "the rest of the year"; a message from the +# National Council of Administration the same day, published directly below the +# law in the Diario Oficial, specified the first transition to be 1923-09-30 +# 24:00. This effectively established standard time at UT-03:30 with 30 +# minutes DST. Assume transitions at 24:00 on the specified days until Ley No. +# 7919 of 1926-03-05 ended this arrangement, repealing all "laws and other +# provisions which oppose" it, resulting in year-round UT-03:30; a Resolución +# of 1926-03-11 puts the final transition at 1926-03-31 24:00, the same as it +# would have been under the previous law. +# https://www.impo.com.uy/diariooficial/1923/07/02/2 +# https://www.impo.com.uy/diariooficial/1926/03/10/2 +# https://www.impo.com.uy/diariooficial/1926/03/18/2 +# # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -# Whitman gives 1923 Oct 1; go with Shanks & Pottenger. -Rule Uruguay 1923 only - Oct 2 0:00 0:30 HS +Rule Uruguay 1923 1925 - Oct 1 0:00 0:30 - Rule Uruguay 1924 1926 - Apr 1 0:00 0 - -Rule Uruguay 1924 1925 - Oct 1 0:00 0:30 HS -Rule Uruguay 1933 1935 - Oct lastSun 0:00 0:30 HS -# Shanks & Pottenger give 1935 Apr 1 0:00 & 1936 Mar 30 0:00; go with Whitman. -Rule Uruguay 1934 1936 - Mar Sat>=25 23:30s 0 - -Rule Uruguay 1936 only - Nov 1 0:00 0:30 HS -Rule Uruguay 1937 1941 - Mar lastSun 0:00 0 - -# Whitman gives 1937 Oct 3; go with Shanks & Pottenger. -Rule Uruguay 1937 1940 - Oct lastSun 0:00 0:30 HS -# Whitman gives 1941 Oct 24 - 1942 Mar 27, 1942 Dec 14 - 1943 Apr 13, -# and 1943 Apr 13 "to present time"; go with Shanks & Pottenger. -Rule Uruguay 1941 only - Aug 1 0:00 0:30 HS -Rule Uruguay 1942 only - Jan 1 0:00 0 - -Rule Uruguay 1942 only - Dec 14 0:00 1:00 S +# From Tim Parenti (2018-02-15): +# http://www.impo.com.uy/diariooficial/1933/10/27/6 +# +# It appears Ley No. 9122 of 1933 was never published as such in the Diario +# Oficial, but instead appeared as Document 26 in the Diario on Friday +# 1933-10-27 as a decree made Monday 1933-10-23 and filed under the Ministry of +# National Defense. It reinstituted a DST of 30 minutes (to UT-03) "from the +# last Sunday of October...until the last Saturday of March." In accordance +# with this provision, the first transition was explicitly specified in Article +# 2 of the decree as Saturday 1933-10-28 at 24:00; that is, Sunday 1933-10-29 +# at 00:00. Assume transitions at 00:00 Sunday throughout. +# +# Departing from the matter-of-fact nature of previous timekeeping laws, the +# 1933 decree "consider[s] the advantages of...the advance of legal time": +# +# "Whereas: The measure adopted by almost all nations at the time of the last +# World War still persists in North America and Europe, precisely because of +# the economic, hygienic, and social advantages derived from such an +# emergency measure... +# +# Whereas: The advance of the legal time during the summer seasons, by +# displacing social activity near sunrise, favors the citizen populations +# and especially the society that creates and works..." +# +# It further specified that "necessary measures" be taken to ensure that +# "public spectacles finish, in general, before [01:00]." +Rule Uruguay 1933 1938 - Oct lastSun 0:00 0:30 - +Rule Uruguay 1934 1941 - Mar lastSat 24:00 0 - +# From Tim Parenti (2018-02-15): +# Most of the Rules below, and their contemporaneous Zone lines, have been +# updated simply to match the Almanaque 2018. Although the document does not +# list exact transition times, midnight transitions were already present in our +# data here for all transitions through 2004-09, and this is both consistent +# with prior transitions and verified in several decrees marked below between +# 1939-09 and 2004-09, wherein the relevant text was typically of the form: +# +# "From 0 hours on [date], the legal time of the entire Republic will be... +# +# In accordance with [the preceding], on [previous date] at 24 hours, all +# clocks throughout the Republic will be [advanced/retarded] by..." +# +# It is possible that there is greater specificity to be found for the Rules +# below, but it is buried in no fewer than 40 different decrees individually +# referenced by the Almanaque for the period from 1939-09 to 2014-09. +# Four-fifths of these were promulgated less than two weeks before taking +# effect; more than half within a week and none more than 5 weeks. Only the +# handful with comments below have been checked with any thoroughness. +Rule Uruguay 1939 only - Oct 1 0:00 0:30 - +Rule Uruguay 1940 only - Oct 27 0:00 0:30 - +# From Tim Parenti (2018-02-15): +# Decreto 1145 of the Ministry of National Defense, dated 1941-07-26, specified +# UT-03 from Friday 1941-08-01 00:00, citing an "urgent...need to save fuel". +# http://www.impo.com.uy/diariooficial/1941/08/04/1 +Rule Uruguay 1941 only - Aug 1 0:00 0:30 - +# From Tim Parenti (2018-02-15): +# Decreto 1866 of the Ministry of National Defense, dated 1942-12-09, specified +# further advancement (to UT-02:30) from Sunday 1942-12-13 24:00. Since clocks +# never went back to UT-03:30 thereafter, this is modeled as advancing standard +# time by 30 minutes to UT-03, while retaining 30 minutes of DST. +# http://www.impo.com.uy/diariooficial/1942/12/16/3 +Rule Uruguay 1942 only - Dec 14 0:00 0:30 - Rule Uruguay 1943 only - Mar 14 0:00 0 - -Rule Uruguay 1959 only - May 24 0:00 1:00 S +Rule Uruguay 1959 only - May 24 0:00 0:30 - Rule Uruguay 1959 only - Nov 15 0:00 0 - -Rule Uruguay 1960 only - Jan 17 0:00 1:00 S +Rule Uruguay 1960 only - Jan 17 0:00 1:00 - Rule Uruguay 1960 only - Mar 6 0:00 0 - -Rule Uruguay 1965 1967 - Apr Sun>=1 0:00 1:00 S +Rule Uruguay 1965 only - Apr 4 0:00 1:00 - Rule Uruguay 1965 only - Sep 26 0:00 0 - -Rule Uruguay 1966 1967 - Oct 31 0:00 0 - -Rule Uruguay 1968 1970 - May 27 0:00 0:30 HS -Rule Uruguay 1968 1970 - Dec 2 0:00 0 - -Rule Uruguay 1972 only - Apr 24 0:00 1:00 S -Rule Uruguay 1972 only - Aug 15 0:00 0 - -Rule Uruguay 1974 only - Mar 10 0:00 0:30 HS -Rule Uruguay 1974 only - Dec 22 0:00 1:00 S -Rule Uruguay 1976 only - Oct 1 0:00 0 - -Rule Uruguay 1977 only - Dec 4 0:00 1:00 S -Rule Uruguay 1978 only - Apr 1 0:00 0 - -Rule Uruguay 1979 only - Oct 1 0:00 1:00 S -Rule Uruguay 1980 only - May 1 0:00 0 - -Rule Uruguay 1987 only - Dec 14 0:00 1:00 S -Rule Uruguay 1988 only - Mar 14 0:00 0 - -Rule Uruguay 1988 only - Dec 11 0:00 1:00 S -Rule Uruguay 1989 only - Mar 12 0:00 0 - -Rule Uruguay 1989 only - Oct 29 0:00 1:00 S -# Shanks & Pottenger say no DST was observed in 1990/1 and 1991/2, -# and that 1992/3's DST was from 10-25 to 03-01. Go with IATA. -Rule Uruguay 1990 1992 - Mar Sun>=1 0:00 0 - -Rule Uruguay 1990 1991 - Oct Sun>=21 0:00 1:00 S -Rule Uruguay 1992 only - Oct 18 0:00 1:00 S +# From Tim Parenti (2018-02-15): +# Decreto 321/968 of 1968-05-25, citing emergency drought measures decreed the +# day before, brought clocks forward 30 minutes from Monday 1968-05-27 00:00. +# http://www.impo.com.uy/diariooficial/1968/05/30/5 +Rule Uruguay 1968 only - May 27 0:00 0:30 - +Rule Uruguay 1968 only - Dec 1 0:00 0 - +# From Tim Parenti (2018-02-15): +# Decreto 188/970 of 1970-04-23 instituted restrictions on electricity +# consumption "as a consequence of the current rainfall regime in the country". +# Articles 13 and 14 advanced clocks by an hour from Saturday 1970-04-25 00:00. +# http://www.impo.com.uy/diariooficial/1970/04/29/4 +Rule Uruguay 1970 only - Apr 25 0:00 1:00 - +Rule Uruguay 1970 only - Jun 14 0:00 0 - +Rule Uruguay 1972 only - Apr 23 0:00 1:00 - +Rule Uruguay 1972 only - Jul 16 0:00 0 - +# From Tim Parenti (2018-02-15): +# Decreto 29/974 of 1974-01-11, citing "the international rise in the price of +# oil", advanced clocks by 90 minutes (to UT-01:30). Decreto 163/974 of +# 1974-03-04 returned 60 of those minutes (to UT-02:30), and the remaining 30 +# minutes followed in Decreto 679/974 of 1974-08-29. +# http://www.impo.com.uy/diariooficial/1974/01/22/11 +# http://www.impo.com.uy/diariooficial/1974/03/14/3 +# http://www.impo.com.uy/diariooficial/1974/09/04/6 +Rule Uruguay 1974 only - Jan 13 0:00 1:30 - +Rule Uruguay 1974 only - Mar 10 0:00 0:30 - +Rule Uruguay 1974 only - Sep 1 0:00 0 - +Rule Uruguay 1974 only - Dec 22 0:00 1:00 - +Rule Uruguay 1975 only - Mar 30 0:00 0 - +Rule Uruguay 1976 only - Dec 19 0:00 1:00 - +Rule Uruguay 1977 only - Mar 6 0:00 0 - +Rule Uruguay 1977 only - Dec 4 0:00 1:00 - +Rule Uruguay 1978 1979 - Mar Sun>=1 0:00 0 - +Rule Uruguay 1978 only - Dec 17 0:00 1:00 - +Rule Uruguay 1979 only - Apr 29 0:00 1:00 - +Rule Uruguay 1980 only - Mar 16 0:00 0 - +# From Tim Parenti (2018-02-15): +# Decreto 725/987 of 1987-12-04 cited "better use of national tourist +# attractions" to advance clocks one hour from Monday 1987-12-14 00:00. +# http://www.impo.com.uy/diariooficial/1988/01/25/1 +Rule Uruguay 1987 only - Dec 14 0:00 1:00 - +Rule Uruguay 1988 only - Feb 28 0:00 0 - +Rule Uruguay 1988 only - Dec 11 0:00 1:00 - +Rule Uruguay 1989 only - Mar 5 0:00 0 - +Rule Uruguay 1989 only - Oct 29 0:00 1:00 - +Rule Uruguay 1990 only - Feb 25 0:00 0 - +# From Tim Parenti (2018-02-15), per Paul Eggert (1999-11-04): +# IATA agrees as below for 1990-10 through 1993-02. Per Almanaque 2018, the +# 1992/1993 season appears to be the first in over half a century where DST +# both began and ended pursuant to the same decree. +Rule Uruguay 1990 1991 - Oct Sun>=21 0:00 1:00 - +Rule Uruguay 1991 1992 - Mar Sun>=1 0:00 0 - +Rule Uruguay 1992 only - Oct 18 0:00 1:00 - Rule Uruguay 1993 only - Feb 28 0:00 0 - # From Eduardo Cota (2004-09-20): # The Uruguayan government has decreed a change in the local time.... -# http://www.presidencia.gub.uy/decretos/2004091502.htm -Rule Uruguay 2004 only - Sep 19 0:00 1:00 S +# From Tim Parenti (2018-02-15): +# Decreto 328/004 of 2004-09-15. +# http://www.impo.com.uy/diariooficial/2004/09/23/documentos.pdf#page=1 +Rule Uruguay 2004 only - Sep 19 0:00 1:00 - # From Steffen Thorsen (2005-03-11): # Uruguay's DST was scheduled to end on Sunday, 2005-03-13, but in order to # save energy ... it was postponed two weeks.... -# http://www.presidencia.gub.uy/_Web/noticias/2005/03/2005031005.htm +# From Tim Parenti (2018-02-15): +# This 2005 postponement is not in Almanaque 2018. Go with the contemporaneous +# reporting, which is confirmed by Decreto 107/005 of 2005-03-10 amending +# Decreto 328/004: +# http://www.impo.com.uy/diariooficial/2005/03/15/documentos.pdf#page=1 +# The original decree specified a transition of 2005-03-12 24:00, but the new +# one specified 2005-03-27 02:00. Rule Uruguay 2005 only - Mar 27 2:00 0 - # From Eduardo Cota (2005-09-27): -# http://www.presidencia.gub.uy/_Web/decretos/2005/09/CM%20119_09%2009%202005_00001.PDF -# This means that from 2005-10-09 at 02:00 local time, until 2006-03-12 at -# 02:00 local time, official time in Uruguay will be at GMT -2. -Rule Uruguay 2005 only - Oct 9 2:00 1:00 S -Rule Uruguay 2006 only - Mar 12 2:00 0 - -# From Jesper Nørgaard Welen (2006-09-06): -# http://www.presidencia.gub.uy/_web/decretos/2006/09/CM%20210_08%2006%202006_00001.PDF -# +# ...from 2005-10-09 at 02:00 local time, until 2006-03-12 at 02:00 local time, +# official time in Uruguay will be at GMT -2. +# From Tim Parenti (2018-02-15): +# Decreto 318/005 of 2005-09-19. +# http://www.impo.com.uy/diariooficial/2005/09/23/documentos.pdf#page=1 +Rule Uruguay 2005 only - Oct 9 2:00 1:00 - +Rule Uruguay 2006 2015 - Mar Sun>=8 2:00 0 - +# From Tim Parenti (2018-02-15), per Jesper Nørgaard Welen (2006-09-06): +# Decreto 311/006 of 2006-09-04 established regular DST from the first Sunday +# of October at 02:00 through the second Sunday of March at 02:00. Almanaque +# 2018 appears to have a few typoed dates through this period; ignore them. +# http://www.impo.com.uy/diariooficial/2006/09/08/documentos.pdf#page=1 +Rule Uruguay 2006 2014 - Oct Sun>=1 2:00 1:00 - # From Steffen Thorsen (2015-06-30): # ... it looks like they will not be using DST the coming summer: # http://www.elobservador.com.uy/gobierno-resolvio-que-no-habra-cambio-horario-verano-n656787 @@ -1777,17 +1905,19 @@ # instead of out to dinner. # From Pablo Camargo (2015-07-13): # http://archivo.presidencia.gub.uy/sci/decretos/2015/06/cons_min_201.pdf -# [dated 2015-06-29; repeals Decree 311/006 dated 2006-09-04] -Rule Uruguay 2006 2014 - Oct Sun>=1 2:00 1:00 S -Rule Uruguay 2007 2015 - Mar Sun>=8 2:00 0 - +# From Tim Parenti (2018-02-15): +# Decreto 178/015 of 2015-06-29; repeals Decreto 311/006. # This Zone can be simplified once we assume zic %z. -Zone America/Montevideo -3:44:44 - LMT 1898 Jun 28 - -3:44:44 - MMT 1920 May 1 # Montevideo MT +Zone America/Montevideo -3:44:51 - LMT 1908 Jun 10 + -3:44:51 - MMT 1920 May 1 # Montevideo MT + -4:00 - -04 1923 Oct 1 -3:30 Uruguay -0330/-03 1942 Dec 14 + -3:00 Uruguay -03/-0230 1960 -3:00 Uruguay -03/-02 1968 - -3:00 Uruguay -03/-0230 1971 + -3:00 Uruguay -03/-0230 1970 -3:00 Uruguay -03/-02 1974 + -3:00 Uruguay -03/-0130 1974 Mar 10 -3:00 Uruguay -03/-0230 1974 Dec 22 -3:00 Uruguay -03/-02 diff -r 84a8fa684998 -r d5703ecb5b0a make/data/tzdata/zone.tab --- a/make/data/tzdata/zone.tab Mon Apr 09 12:59:06 2018 +0100 +++ b/make/data/tzdata/zone.tab Mon Apr 09 14:27:42 2018 +0100 @@ -452,7 +452,7 @@ US +643004-1652423 America/Nome Alaska (west) US +515248-1763929 America/Adak Aleutian Islands US +211825-1575130 Pacific/Honolulu Hawaii -UY -3453-05611 America/Montevideo +UY -345433-0561245 America/Montevideo UZ +3940+06648 Asia/Samarkand Uzbekistan (west) UZ +4120+06918 Asia/Tashkent Uzbekistan (east) VA +415408+0122711 Europe/Vatican diff -r 84a8fa684998 -r d5703ecb5b0a make/jdk/netbeans/jmx/build.properties --- a/make/jdk/netbeans/jmx/build.properties Mon Apr 09 12:59:06 2018 +0100 +++ b/make/jdk/netbeans/jmx/build.properties Mon Apr 09 14:27:42 2018 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2018, 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 @@ -34,8 +34,7 @@ javax/management/ \ org/omg/stub/javax/management/ -excludes=\ - com/sun/jmx/snmp/ +excludes= jtreg.tests=\ com/sun/jmx/ \ diff -r 84a8fa684998 -r d5703ecb5b0a make/launcher/Launcher-jdk.pack.gmk --- a/make/launcher/Launcher-jdk.pack.gmk Mon Apr 09 12:59:06 2018 +0100 +++ b/make/launcher/Launcher-jdk.pack.gmk Mon Apr 09 14:27:42 2018 +0100 @@ -34,6 +34,25 @@ # The order of the object files on the link command line affects the size of the resulting # binary (at least on linux) which causes the size to differ between old and new build. +# 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) + CXXFLAGS_JDKEXE += -fvisibility=hidden + LDFLAGS_JDKEXE += -Wl,--exclude-libs,ALL +else ifeq ($(TOOLCHAIN_TYPE), clang) + ifneq ($(OPENJDK_TARGET_OS), macosx) + CXXFLAGS_JDKEXE += -fvisibility=hidden + endif +else ifeq ($(TOOLCHAIN_TYPE), solstudio) + CXXFLAGS_JDKEXE += -xldscope=hidden +else ifeq ($(TOOLCHAIN_TYPE), xlc) + CXXFLAGS_JDKEXE += -qvisibility=hidden +endif + UNPACKEXE_SRC := $(TOPDIR)/src/jdk.pack/share/native/common-unpack \ $(TOPDIR)/src/jdk.pack/share/native/unpack200 UNPACKEXE_CFLAGS := -I$(TOPDIR)/src/jdk.pack/share/native/common-unpack \ @@ -58,21 +77,6 @@ endif -UNPACK_MAPFILE_DIR := $(TOPDIR)/make/mapfiles/libunpack -UNPACK_MAPFILE_PLATFORM_FILE := \ - $(UNPACK_MAPFILE_DIR)/mapfile-vers-unpack200-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH) - -# The linker on older SuSE distros (e.g. on SLES 10) complains with: -# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable." -# if feeded with a version script which contains named tags. -ifeq ($(USING_BROKEN_SUSE_LD), yes) - UNPACK_MAPFILE := $(UNPACK_MAPFILE_DIR)/mapfile-vers-unpack200.anonymous -else ifneq ($(wildcard $(UNPACK_MAPFILE_PLATFORM_FILE)), ) - UNPACK_MAPFILE := $(UNPACK_MAPFILE_PLATFORM_FILE) -else - UNPACK_MAPFILE := $(UNPACK_MAPFILE_DIR)/mapfile-vers-unpack200 -endif - $(eval $(call SetupJdkExecutable, BUILD_UNPACKEXE, \ NAME := unpack200, \ SRC := $(UNPACKEXE_SRC), \ @@ -84,7 +88,6 @@ CFLAGS_solaris := -KPIC, \ CFLAGS_macosx := -fPIC, \ DISABLED_WARNINGS_gcc := unused-result implicit-fallthrough, \ - MAPFILE := $(UNPACK_MAPFILE),\ LDFLAGS := $(UNPACKEXE_ZIPOBJS) \ $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ diff -r 84a8fa684998 -r d5703ecb5b0a make/launcher/LauncherCommon.gmk --- a/make/launcher/LauncherCommon.gmk Mon Apr 09 12:59:06 2018 +0100 +++ b/make/launcher/LauncherCommon.gmk Mon Apr 09 14:27:42 2018 +0100 @@ -26,11 +26,9 @@ include JdkNativeCompilation.gmk ifeq ($(OPENJDK_TARGET_OS), macosx) - DISABLE_MAPFILES := true ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN) else ifeq ($(OPENJDK_TARGET_OS), windows) - DISABLE_MAPFILES := true endif ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN,/../lib/jli) @@ -42,8 +40,27 @@ endif endif +# 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) + LAUNCHER_CFLAGS += -fvisibility=hidden + LDFLAGS_JDKEXE += -Wl,--exclude-libs,ALL +else ifeq ($(TOOLCHAIN_TYPE), clang) + ifneq ($(OPENJDK_TARGET_OS), macosx) + LAUNCHER_CFLAGS += -fvisibility=hidden + endif +else ifeq ($(TOOLCHAIN_TYPE), solstudio) + LAUNCHER_CFLAGS += -xldscope=hidden +else ifeq ($(TOOLCHAIN_TYPE), xlc) + LAUNCHER_CFLAGS += -qvisibility=hidden +endif + LAUNCHER_SRC := $(TOPDIR)/src/java.base/share/native/launcher -LAUNCHER_CFLAGS := -I$(TOPDIR)/src/java.base/share/native/launcher \ +LAUNCHER_CFLAGS += -I$(TOPDIR)/src/java.base/share/native/launcher \ -I$(TOPDIR)/src/java.base/share/native/libjli \ -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjli \ -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli \ @@ -157,23 +174,6 @@ $1_WINDOWS_JLI_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjli/jli.lib endif - # The linker on older SuSE distros (e.g. on SLES 10) complains with: - # "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable." - # if feeded with a version script which contains named tags. - ifeq ($(USING_BROKEN_SUSE_LD),yes) - ifneq ($(wildcard $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU).anonymous), ) - $1_MAPFILE := $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU).anonymous - else - $1_MAPFILE := - endif - else - ifneq ($(wildcard $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)), ) - $1_MAPFILE := $(TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU) - else - $1_MAPFILE := - endif - endif - $$(eval $$(call SetupJdkExecutable, BUILD_LAUNCHER_$1, \ NAME := $1, \ EXTRA_FILES := $(LAUNCHER_SRC)/main.c, \ @@ -194,7 +194,6 @@ -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jli, \ LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \ -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jli, \ - MAPFILE := $$($1_MAPFILE), \ LIBS := $(JDKEXE_LIBS) $$($1_LIBS), \ LIBS_unix := $$($1_LIBS_unix), \ LIBS_linux := -lpthread -ljli $(LIBDL), \ diff -r 84a8fa684998 -r d5703ecb5b0a make/lib/Awt2dLibraries.gmk --- a/make/lib/Awt2dLibraries.gmk Mon Apr 09 12:59:06 2018 +0100 +++ b/make/lib/Awt2dLibraries.gmk Mon Apr 09 14:27:42 2018 +0100 @@ -543,7 +543,7 @@ 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), \ )) @@ -651,10 +651,11 @@ LDFLAGS := $(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \ - LDFLAGS_macosx := -undefined dynamic_lookup, \ LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \ LIBS_unix := -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \ - LIBS_aix := -lawt_headless,\ + LIBS_aix := -lawt_headless, \ + LIBS_macosx := -lawt_lwawt -framework CoreText -framework CoreFoundation \ + -framework CoreGraphics, \ LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \ $(WIN_AWT_LIB), \ )) @@ -665,6 +666,10 @@ $(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_HEADLESS) endif +ifeq ($(OPENJDK_TARGET_OS), macosx) + $(BUILD_LIBFONTMANAGER): $(call FindLib, java.desktop, awt_lwawt) +endif + ifeq ($(FREETYPE_TO_USE), bundled) $(BUILD_LIBFONTMANAGER): $(BUILD_LIBFREETYPE) endif @@ -993,6 +998,7 @@ -I$(TOPDIR)/src/java.base/share/native/libjava \ -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \ -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \ + DISABLED_WARNINGS_clang := deprecated-declarations, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN) \ -Wl$(COMMA)-rpath$(COMMA)@loader_path \ diff -r 84a8fa684998 -r d5703ecb5b0a make/lib/Lib-java.desktop.gmk --- a/make/lib/Lib-java.desktop.gmk Mon Apr 09 12:59:06 2018 +0100 +++ b/make/lib/Lib-java.desktop.gmk Mon Apr 09 14:27:42 2018 +0100 @@ -105,7 +105,8 @@ CFLAGS := $(CFLAGS_JDKLIB) \ $(addprefix -I, $(LIBOSXAPP_SRC)) \ -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \ - DISABLED_WARNINGS_clang := objc-method-access objc-root-class, \ + DISABLED_WARNINGS_clang := objc-method-access objc-root-class \ + deprecated-declarations, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := \ diff -r 84a8fa684998 -r d5703ecb5b0a make/mapfiles/launchers/mapfile-ppc64 --- a/make/mapfiles/launchers/mapfile-ppc64 Mon Apr 09 12:59:06 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -# -# Copyright (c) 2004, 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. -# -# -# Specify what global symbols we export. Note that we're not really -# interested in declaring a version, simply scoping the file is sufficient. -# - -SUNWprivate_1.1 { - global: - main; # Provides basic adb symbol offsets - environ; # Public symbols and required by Java run time - _environ; - __environ_lock; - - local: - *; -}; diff -r 84a8fa684998 -r d5703ecb5b0a make/mapfiles/launchers/mapfile-ppc64.anonymous --- a/make/mapfiles/launchers/mapfile-ppc64.anonymous Mon Apr 09 12:59:06 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -# -# Copyright (c) 2004, 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 anonymous library interface (i.e. without a version tag) for broken SuSE ld because -# the linker on older SuSE distros (e.g. on SLES 10) complains with: -# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable." -# if feeded with a version script which contains named tags. - -{ - global: - main; # Provides basic adb symbol offsets - environ; # Public symbols and required by Java run time - _environ; - __environ_lock; - - local: - *; -}; diff -r 84a8fa684998 -r d5703ecb5b0a make/mapfiles/launchers/mapfile-sparc --- a/make/mapfiles/launchers/mapfile-sparc Mon Apr 09 12:59:06 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +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. -# -# Specify what global symbols we export. Note that we're not really -# interested in declaring a version, simply scoping the file is sufficient. -# - -SUNWprivate_1.1 { - global: - main; # Provides basic adb symbol offsets - environ; # Public symbols and required by Java run time - _environ; - __environ_lock; - ___Argv; # The following are private, but as they are - _start; # exported from ctr1/crtn, the clever hacker - _init; # might know about them. However note, that - _fini; # their use is strictly not supported. - _lib_version; - __cg92_used; - __xargc; - __xargv; - __fsr_init_value; - - local: - *; -}; diff -r 84a8fa684998 -r d5703ecb5b0a make/mapfiles/launchers/mapfile-sparcv9 --- a/make/mapfiles/launchers/mapfile-sparcv9 Mon Apr 09 12:59:06 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +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. -# - -# -# Specify what global symbols we export. Note that we're not really -# interested in declaring a version, simply scoping the file is sufficient. -# - -SUNWprivate_1.1 { - global: - main; # Provides basic adb symbol offsets - environ; # Public symbols and required by Java run time - _environ; - __environ_lock; - ___Argv; # The following are private, but as they are - _start; # exported from ctr1/crtn, the clever hacker - _init; # might know about them. However note, that - _fini; # their use is strictly not supported. - _lib_version; - __xargc; - __xargv; - __fsr_init_value; - - local: - *; -}; diff -r 84a8fa684998 -r d5703ecb5b0a make/mapfiles/launchers/mapfile-x86 --- a/make/mapfiles/launchers/mapfile-x86 Mon Apr 09 12:59:06 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +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. -# -# -# Specify what global symbols we export. Note that we're not really -# interested in declaring a version, simply scoping the file is sufficient. -# - -SUNWprivate_1.1 { - global: - main; # Provides basic adb symbol offsets - environ; # Public symbols and required by Java run time - _environ; - __environ_lock; - ___Argv; # The following are private, but as they are - _start; # exported from ctr1/crtn, the clever hacker - _init; # might know about them. However note, that - _fini; # their use is strictly not supported. - _lib_version; -# _mcount; - __fsr; - __fsr_init_value; - __longdouble_used; - - local: - *; -}; diff -r 84a8fa684998 -r d5703ecb5b0a make/mapfiles/launchers/mapfile-x86.anonymous --- a/make/mapfiles/launchers/mapfile-x86.anonymous Mon Apr 09 12:59:06 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -# -# Copyright (c) 2004, 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 anonymous library interface (i.e. without a version tag) for broken SuSE ld because -# the linker on older SuSE distros (e.g. on SLES 10) complains with: -# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable." -# if feeded with a version script which contains named tags. - -{ - global: - main; # Provides basic adb symbol offsets - environ; # Public symbols and required by Java run time - _environ; - __environ_lock; - ___Argv; # The following are private, but as they are - _start; # exported from ctr1/crtn, the clever hacker - _init; # might know about them. However note, that - _fini; # their use is strictly not supported. - _lib_version; -# _mcount; - __fsr; - __fsr_init_value; - __longdouble_used; - - local: - *; -}; diff -r 84a8fa684998 -r d5703ecb5b0a make/mapfiles/launchers/mapfile-x86_64 --- a/make/mapfiles/launchers/mapfile-x86_64 Mon Apr 09 12:59:06 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +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. -# -# -# Specify what global symbols we export. Note that we're not really -# interested in declaring a version, simply scoping the file is sufficient. -# - -SUNWprivate_1.1 { - global: - main; # Provides basic adb symbol offsets - environ; # Public symbols and required by Java run time - _environ; - __environ_lock; - - # These are needed by the c runtime in SS12u4 - ___Argv; - __xargv; - __xargc; - _start; - __longdouble_used; - _lib_version; - - local: - *; -}; diff -r 84a8fa684998 -r d5703ecb5b0a make/mapfiles/launchers/mapfile-x86_64.anonymous --- a/make/mapfiles/launchers/mapfile-x86_64.anonymous Mon Apr 09 12:59:06 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -# -# Copyright (c) 2004, 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 anonymous library interface (i.e. without a version tag) for broken SuSE ld because -# the linker on older SuSE distros (e.g. on SLES 10) complains with: -# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable." -# if feeded with a version script which contains named tags. - -{ - global: - main; # Provides basic adb symbol offsets - environ; # Public symbols and required by Java run time - _environ; - __environ_lock; - - local: - *; -}; diff -r 84a8fa684998 -r d5703ecb5b0a make/mapfiles/libunpack/mapfile-vers-unpack200 --- a/make/mapfiles/libunpack/mapfile-vers-unpack200 Mon Apr 09 12:59:06 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -# -# Copyright (c) 2011, 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 { - local: - *; -}; diff -r 84a8fa684998 -r d5703ecb5b0a make/mapfiles/libunpack/mapfile-vers-unpack200-solaris-sparc --- a/make/mapfiles/libunpack/mapfile-vers-unpack200-solaris-sparc Mon Apr 09 12:59:06 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -# -# Copyright (c) 2011, 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: - # These are needed by the c runtime in SS12u4 - environ; - _environ; - __environ_lock; - ___Argv; - __xargv; - __xargc; - _start; - _lib_version; - - local: - *; -}; diff -r 84a8fa684998 -r d5703ecb5b0a make/mapfiles/libunpack/mapfile-vers-unpack200-solaris-x86 --- a/make/mapfiles/libunpack/mapfile-vers-unpack200-solaris-x86 Mon Apr 09 12:59:06 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +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. -# - -# Define library interface. - -SUNWprivate_1.1 { - global: - # These are needed by the c runtime in SS12u4 - environ; - _environ; - __environ_lock; - ___Argv; - __xargv; - __xargc; - _start; - __longdouble_used; - _lib_version; - - local: - *; -}; diff -r 84a8fa684998 -r d5703ecb5b0a make/mapfiles/libunpack/mapfile-vers-unpack200.anonymous --- a/make/mapfiles/libunpack/mapfile-vers-unpack200.anonymous Mon Apr 09 12:59:06 2018 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -# -# Copyright (c) 2011, 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 anonymous library interface (i.e. without a version tag) for broken SuSE ld because -# the linker on older SuSE distros (e.g. on SLES 10) complains with: -# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable." -# if feeded with a version script which contains named tags. - -{ - local: - *; -}; diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/AquaTheme.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/AquaTheme.java Mon Apr 09 14:27:42 2018 +0100 @@ -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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/BezierAnimationPanel.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/BezierAnimationPanel.java Mon Apr 09 14:27:42 2018 +0100 @@ -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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/ButtonDemo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/ButtonDemo.java Mon Apr 09 14:27:42 2018 +0100 @@ -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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/CharcoalTheme.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/CharcoalTheme.java Mon Apr 09 14:27:42 2018 +0100 @@ -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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/ColorChooserDemo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/ColorChooserDemo.java Mon Apr 09 14:27:42 2018 +0100 @@ -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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/ComboBoxDemo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/ComboBoxDemo.java Mon Apr 09 14:27:42 2018 +0100 @@ -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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/ContrastTheme.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/ContrastTheme.java Mon Apr 09 14:27:42 2018 +0100 @@ -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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/DemoModule.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/DemoModule.java Mon Apr 09 14:27:42 2018 +0100 @@ -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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/DirectionPanel.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/DirectionPanel.java Mon Apr 09 14:27:42 2018 +0100 @@ -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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/EmeraldTheme.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/EmeraldTheme.java Mon Apr 09 14:27:42 2018 +0100 @@ -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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/ExampleFileView.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/ExampleFileView.java Mon Apr 09 14:27:42 2018 +0100 @@ -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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/FileChooserDemo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/FileChooserDemo.java Mon Apr 09 14:27:42 2018 +0100 @@ -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 += "
" + file.getName() + "
"; + text += getString("FileChooserDemo.isprobably") + ""; + } + JOptionPane.showMessageDialog(getDemoPanel(), text); + } + }; + } + + public Action createOKAction() { + return new AbstractAction(getString("FileChooserDemo.ok")) { + public void actionPerformed(ActionEvent e) { + dialog.dispose(); + if (!e.getActionCommand().equals(JFileChooser.CANCEL_SELECTION) + && fc.getSelectedFile() != null) { + + loadImage(fc.getSelectedFile().getPath()); + } + } + }; + } + + public Action createCancelAction() { + return new AbstractAction(getString("FileChooserDemo.cancel")) { + public void actionPerformed(ActionEvent e) { + dialog.dispose(); + } + }; + } + + public Action createFindAction() { + Icon icon = createImageIcon("filechooser/find.gif", getString("FileChooserDemo.find")); + return new AbstractAction("", icon) { + public void actionPerformed(ActionEvent e) { + String result = JOptionPane.showInputDialog(getDemoPanel(), getString("FileChooserDemo.findquestion")); + if (result != null) { + JOptionPane.showMessageDialog(getDemoPanel(), getString("FileChooserDemo.findresponse")); + } + } + }; + } + + public Action createHelpAction() { + Icon icon = createImageIcon("filechooser/help.gif", getString("FileChooserDemo.help")); + return new AbstractAction("", icon) { + public void actionPerformed(ActionEvent e) { + JOptionPane.showMessageDialog(getDemoPanel(), getString("FileChooserDemo.helptext")); + } + }; + } + + class MyImageIcon extends ImageIcon { + public MyImageIcon(String filename) { + super(filename); + }; + public synchronized void paintIcon(Component c, Graphics g, int x, int y) { + g.setColor(Color.white); + g.fillRect(0,0, c.getWidth(), c.getHeight()); + if(getImageObserver() == null) { + g.drawImage( + getImage(), + c.getWidth()/2 - getIconWidth()/2, + c.getHeight()/2 - getIconHeight()/2, + c + ); + } else { + g.drawImage( + getImage(), + c.getWidth()/2 - getIconWidth()/2, + c.getHeight()/2 - getIconHeight()/2, + getImageObserver() + ); + } + } + } + + public void loadImage(String filename) { + theImage.setIcon(new MyImageIcon(filename)); + } + + public JButton createButton(Action a) { + JButton b = new JButton(a) { + public Dimension getMaximumSize() { + int width = Short.MAX_VALUE; + int height = super.getMaximumSize().height; + return new Dimension(width, height); + } + }; + return b; + } + + public JButton createImageButton(Action a) { + JButton b = new JButton(a); + b.setMargin(new Insets(0,0,0,0)); + return b; + } +} + +class FilePreviewer extends JComponent implements PropertyChangeListener { + ImageIcon thumbnail = null; + + public FilePreviewer(JFileChooser fc) { + setPreferredSize(new Dimension(100, 50)); + fc.addPropertyChangeListener(this); + setBorder(new BevelBorder(BevelBorder.LOWERED)); + } + + public void loadImage(File f) { + if (f == null) { + thumbnail = null; + } else { + ImageIcon tmpIcon = new ImageIcon(f.getPath()); + if(tmpIcon.getIconWidth() > 90) { + thumbnail = new ImageIcon( + tmpIcon.getImage().getScaledInstance(90, -1, Image.SCALE_DEFAULT)); + } else { + thumbnail = tmpIcon; + } + } + } + + public void propertyChange(PropertyChangeEvent e) { + String prop = e.getPropertyName(); + if(prop == JFileChooser.SELECTED_FILE_CHANGED_PROPERTY) { + if(isShowing()) { + loadImage((File) e.getNewValue()); + repaint(); + } + } + } + + public void paint(Graphics g) { + super.paint(g); + if(thumbnail != null) { + int x = getWidth()/2 - thumbnail.getIconWidth()/2; + int y = getHeight()/2 - thumbnail.getIconHeight()/2; + if(y < 0) { + y = 0; + } + + if(x < 5) { + x = 5; + } + thumbnail.paintIcon(this, g, x, y); + } + } +} diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/HtmlDemo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/HtmlDemo.java Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,129 @@ +/* + * + * 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.text.html.*; +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.*; + +/** + * Html Demo + * + * @author Jeff Dinkins + */ +public class HtmlDemo extends DemoModule { + + JEditorPane html; + + /** + * main method allows us to run as a standalone demo. + */ + public static void main(String[] args) { + HtmlDemo demo = new HtmlDemo(null); + demo.mainImpl(); + } + + /** + * HtmlDemo Constructor + */ + public HtmlDemo(SwingSet2 swingset) { + // Set the title for this demo, and an icon used to represent this + // demo inside the SwingSet2 app. + super(swingset, "HtmlDemo", "toolbar/JEditorPane.gif"); + + try { + URL url = null; + // System.getProperty("user.dir") + + // System.getProperty("file.separator"); + String path = null; + try { + path = "/resources/index.html"; + url = getClass().getResource(path); + } catch (Exception e) { + System.err.println("Failed to open " + path); + url = null; + } + + if(url != null) { + html = new JEditorPane(url); + html.setEditable(false); + html.addHyperlinkListener(createHyperLinkListener()); + + JScrollPane scroller = new JScrollPane(); + JViewport vp = scroller.getViewport(); + vp.add(html); + getDemoPanel().add(scroller, BorderLayout.CENTER); + } + } catch (MalformedURLException e) { + System.out.println("Malformed URL: " + e); + } catch (IOException e) { + System.out.println("IOException: " + e); + } + } + + public HyperlinkListener createHyperLinkListener() { + return new HyperlinkListener() { + public void hyperlinkUpdate(HyperlinkEvent e) { + if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + if (e instanceof HTMLFrameHyperlinkEvent) { + ((HTMLDocument)html.getDocument()).processHTMLFrameHyperlinkEvent( + (HTMLFrameHyperlinkEvent)e); + } else { + try { + html.setPage(e.getURL()); + } catch (IOException ioe) { + System.out.println("IOE: " + ioe); + } + } + } + } + }; + } + + void updateDragEnabled(boolean dragEnabled) { + html.setDragEnabled(dragEnabled); + } + +} diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/InternalFrameDemo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/InternalFrameDemo.java Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,342 @@ +/* + * + * 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.*; + +/** + * Internal Frames Demo + * + * @author Jeff Dinkins + */ +public class InternalFrameDemo extends DemoModule { + int windowCount = 0; + JDesktopPane desktop = null; + + ImageIcon icon1, icon2, icon3, icon4; + ImageIcon smIcon1, smIcon2, smIcon3, smIcon4; + + public Integer FIRST_FRAME_LAYER = new Integer(1); + public Integer DEMO_FRAME_LAYER = new Integer(2); + public Integer PALETTE_LAYER = new Integer(3); + + public int FRAME0_X = 15; + public int FRAME0_Y = 280; + + public int FRAME0_WIDTH = 320; + public int FRAME0_HEIGHT = 230; + + public int FRAME_WIDTH = 225; + public int FRAME_HEIGHT = 150; + + public int PALETTE_X = 375; + public int PALETTE_Y = 20; + + public int PALETTE_WIDTH = 260; + public int PALETTE_HEIGHT = 260; + + JCheckBox windowResizable = null; + JCheckBox windowClosable = null; + JCheckBox windowIconifiable = null; + JCheckBox windowMaximizable = null; + + JTextField windowTitleField = null; + JLabel windowTitleLabel = null; + + + /** + * main method allows us to run as a standalone demo. + */ + public static void main(String[] args) { + InternalFrameDemo demo = new InternalFrameDemo(null); + demo.mainImpl(); + } + + /** + * InternalFrameDemo Constructor + */ + public InternalFrameDemo(SwingSet2 swingset) { + super(swingset, "InternalFrameDemo", "toolbar/JDesktop.gif"); + + // preload all the icons we need for this demo + icon1 = createImageIcon("misc/toast.gif", getString("InternalFrameDemo.toast")); + icon2 = createImageIcon("misc/duke.gif", getString("InternalFrameDemo.duke")); + icon3 = createImageIcon("misc/duchess.gif", getString("InternalFrameDemo.duchess")); + icon4 = createImageIcon("misc/cab.gif", getString("InternalFrameDemo.cab")); + + smIcon1 = createImageIcon("misc/toast_small.gif", getString("InternalFrameDemo.toast")); + smIcon2 = createImageIcon("misc/duke_small.gif", getString("InternalFrameDemo.duke")); + smIcon3 = createImageIcon("misc/duchess_small.gif", getString("InternalFrameDemo.duchess")); + smIcon4 = createImageIcon("misc/cab_small.gif", getString("InternalFrameDemo.cab")); + + // Create the desktop pane + desktop = new JDesktopPane(); + getDemoPanel().add(desktop, BorderLayout.CENTER); + + // Create the "frame maker" palette + createInternalFramePalette(); + + // Create an initial internal frame to show + JInternalFrame frame1 = createInternalFrame(icon1, FIRST_FRAME_LAYER, 1, 1); + frame1.setBounds(FRAME0_X, FRAME0_Y, FRAME0_WIDTH, FRAME0_HEIGHT); + + // Create four more starter windows + createInternalFrame(icon1, DEMO_FRAME_LAYER, FRAME_WIDTH, FRAME_HEIGHT); + createInternalFrame(icon3, DEMO_FRAME_LAYER, FRAME_WIDTH, FRAME_HEIGHT); + createInternalFrame(icon4, DEMO_FRAME_LAYER, FRAME_WIDTH, FRAME_HEIGHT); + createInternalFrame(icon2, DEMO_FRAME_LAYER, FRAME_WIDTH, FRAME_HEIGHT); + } + + + + /** + * Create an internal frame and add a scrollable imageicon to it + */ + public JInternalFrame createInternalFrame(Icon icon, Integer layer, int width, int height) { + JInternalFrame jif = new JInternalFrame(); + + if(!windowTitleField.getText().equals(getString("InternalFrameDemo.frame_label"))) { + jif.setTitle(windowTitleField.getText() + " "); + } else { + jif = new JInternalFrame(getString("InternalFrameDemo.frame_label") + " " + windowCount + " "); + } + + // set properties + jif.setClosable(windowClosable.isSelected()); + jif.setMaximizable(windowMaximizable.isSelected()); + jif.setIconifiable(windowIconifiable.isSelected()); + jif.setResizable(windowResizable.isSelected()); + + jif.setBounds(20*(windowCount%10), 20*(windowCount%10), width, height); + jif.setContentPane(new ImageScroller(this, icon, 0, windowCount)); + + windowCount++; + + desktop.add(jif, layer); + + // Set this internal frame to be selected + + try { + jif.setSelected(true); + } catch (java.beans.PropertyVetoException e2) { + } + + jif.show(); + + return jif; + } + + public JInternalFrame createInternalFramePalette() { + JInternalFrame palette = new JInternalFrame( + getString("InternalFrameDemo.palette_label") + ); + palette.putClientProperty("JInternalFrame.isPalette", Boolean.TRUE); + palette.getContentPane().setLayout(new BorderLayout()); + palette.setBounds(PALETTE_X, PALETTE_Y, PALETTE_WIDTH, PALETTE_HEIGHT); + palette.setResizable(true); + palette.setIconifiable(true); + desktop.add(palette, PALETTE_LAYER); + + // ************************************* + // * Create create frame maker buttons * + // ************************************* + JButton b1 = new JButton(smIcon1); + JButton b2 = new JButton(smIcon2); + JButton b3 = new JButton(smIcon3); + JButton b4 = new JButton(smIcon4); + + // add frame maker actions + b1.addActionListener(new ShowFrameAction(this, icon1)); + b2.addActionListener(new ShowFrameAction(this, icon2)); + b3.addActionListener(new ShowFrameAction(this, icon3)); + b4.addActionListener(new ShowFrameAction(this, icon4)); + + // add frame maker buttons to panel + JPanel p = new JPanel(); + p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); + + JPanel buttons1 = new JPanel(); + buttons1.setLayout(new BoxLayout(buttons1, BoxLayout.X_AXIS)); + + JPanel buttons2 = new JPanel(); + buttons2.setLayout(new BoxLayout(buttons2, BoxLayout.X_AXIS)); + + buttons1.add(b1); + buttons1.add(Box.createRigidArea(HGAP15)); + buttons1.add(b2); + + buttons2.add(b3); + buttons2.add(Box.createRigidArea(HGAP15)); + buttons2.add(b4); + + p.add(Box.createRigidArea(VGAP10)); + p.add(buttons1); + p.add(Box.createRigidArea(VGAP15)); + p.add(buttons2); + p.add(Box.createRigidArea(VGAP10)); + + palette.getContentPane().add(p, BorderLayout.NORTH); + + // ************************************ + // * Create frame property checkboxes * + // ************************************ + p = new JPanel() { + Insets insets = new Insets(10,15,10,5); + public Insets getInsets() { + return insets; + } + }; + p.setLayout(new GridLayout(1,2)); + + + Box box = new Box(BoxLayout.Y_AXIS); + windowResizable = new JCheckBox(getString("InternalFrameDemo.resizable_label"), true); + windowIconifiable = new JCheckBox(getString("InternalFrameDemo.iconifiable_label"), true); + + box.add(Box.createGlue()); + box.add(windowResizable); + box.add(windowIconifiable); + box.add(Box.createGlue()); + p.add(box); + + box = new Box(BoxLayout.Y_AXIS); + windowClosable = new JCheckBox(getString("InternalFrameDemo.closable_label"), true); + windowMaximizable = new JCheckBox(getString("InternalFrameDemo.maximizable_label"), true); + + box.add(Box.createGlue()); + box.add(windowClosable); + box.add(windowMaximizable); + box.add(Box.createGlue()); + p.add(box); + + palette.getContentPane().add(p, BorderLayout.CENTER); + + + // ************************************ + // * Create Frame title textfield * + // ************************************ + p = new JPanel() { + Insets insets = new Insets(0,0,10,0); + public Insets getInsets() { + return insets; + } + }; + + windowTitleField = new JTextField(getString("InternalFrameDemo.frame_label")); + windowTitleLabel = new JLabel(getString("InternalFrameDemo.title_text_field_label")); + + p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); + p.add(Box.createRigidArea(HGAP5)); + p.add(windowTitleLabel, BorderLayout.WEST); + p.add(Box.createRigidArea(HGAP5)); + p.add(windowTitleField, BorderLayout.CENTER); + p.add(Box.createRigidArea(HGAP5)); + + palette.getContentPane().add(p, BorderLayout.SOUTH); + + palette.show(); + + return palette; + } + + + class ShowFrameAction extends AbstractAction { + InternalFrameDemo demo; + Icon icon; + + + public ShowFrameAction(InternalFrameDemo demo, Icon icon) { + this.demo = demo; + this.icon = icon; + } + + public void actionPerformed(ActionEvent e) { + demo.createInternalFrame(icon, + getDemoFrameLayer(), + getFrameWidth(), + getFrameHeight() + ); + } + } + + public int getFrameWidth() { + return FRAME_WIDTH; + } + + public int getFrameHeight() { + return FRAME_HEIGHT; + } + + public Integer getDemoFrameLayer() { + return DEMO_FRAME_LAYER; + } + + class ImageScroller extends JScrollPane { + + public ImageScroller(InternalFrameDemo demo, Icon icon, int layer, int count) { + super(); + JPanel p = new JPanel(); + p.setBackground(Color.white); + p.setLayout(new BorderLayout() ); + + p.add(new JLabel(icon), BorderLayout.CENTER); + + getViewport().add(p); + getHorizontalScrollBar().setUnitIncrement(10); + getVerticalScrollBar().setUnitIncrement(10); + } + + public Dimension getMinimumSize() { + return new Dimension(25, 25); + } + + } + + void updateDragEnabled(boolean dragEnabled) { + windowTitleField.setDragEnabled(dragEnabled); + } + +} diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/LayoutControlPanel.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/LayoutControlPanel.java Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,334 @@ +/* + * + * 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.text.*; +import javax.swing.border.*; + +import java.awt.*; +import java.awt.event.*; +import java.util.*; + +/* + * The LayoutControlPanel contains controls for setting an + * AbstractButton's horizontal and vertical text position and + * horizontal and vertical alignment. + */ + +public class LayoutControlPanel extends JPanel implements SwingConstants { + + private boolean absolutePositions; + private DirectionPanel textPosition = null; + private DirectionPanel labelAlignment = null; + private ButtonDemo demo = null; + + // private ComponentOrientChanger componentOrientChanger = null; + + LayoutControlPanel(ButtonDemo demo) { + this.demo = demo; + + // this.componentOrientationChanger = componentOrientationChanger; + + setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); + setAlignmentX(LEFT_ALIGNMENT); + setAlignmentY(TOP_ALIGNMENT); + + JLabel l; + + // If SwingSet has a ComponentOrientationChanger, then include control + // for choosing between absolute and relative positioning. This will + // only happen when we're running on JDK 1.2 or above. + // + // if(componentOrientationChanger != null ) { + // l = new JLabel("Positioning:"); + // add(l); + // + // ButtonGroup group = new ButtonGroup(); + // PositioningListener positioningListener = new PositioningListener(); + // JRadioButton absolutePos = new JRadioButton("Absolute"); + // absolutePos.setMnemonic('a'); + // absolutePos.setToolTipText("Text/Content positioning is independant of line direction"); + // group.add(absolutePos); + // absolutePos.addItemListener(positioningListener); + // add(absolutePos); + // + // JRadioButton relativePos = new JRadioButton("Relative"); + // relativePos.setMnemonic('r'); + // relativePos.setToolTipText("Text/Content positioning depends on line direction."); + // group.add(relativePos); + // relativePos.addItemListener(positioningListener); + // add(relativePos); + // + // add(Box.createRigidArea(demo.VGAP20)); + // + // absolutePositions = false; + // relativePos.setSelected(true); + // + // componentOrientationChanger.addActionListener( new OrientationChangeListener() ); + //} else { + absolutePositions = true; + //} + + textPosition = new DirectionPanel(true, "E", new TextPositionListener()); + labelAlignment = new DirectionPanel(true, "C", new LabelAlignmentListener()); + + // Make sure the controls' text position and label alignment match + // the initial value of the associated direction panel. + for(int i = 0; i < demo.getCurrentControls().size(); i++) { + Component c = (Component) demo.getCurrentControls().elementAt(i); + setPosition(c, RIGHT, CENTER); + setAlignment(c,CENTER,CENTER); + } + + l = new JLabel(demo.getString("LayoutControlPanel.textposition_label")); + add(l); + add(textPosition); + + add(Box.createRigidArea(demo.VGAP20)); + + l = new JLabel(demo.getString("LayoutControlPanel.contentalignment_label")); + add(l); + add(labelAlignment); + + add(Box.createGlue()); + } + + + class OrientationChangeListener implements ActionListener { + public void actionPerformed( ActionEvent e ) { + if( !e.getActionCommand().equals("OrientationChanged") ){ + return; + } + if( absolutePositions ){ + return; + } + + String currentTextPosition = textPosition.getSelection(); + if( currentTextPosition.equals("NW") ) + textPosition.setSelection("NE"); + else if( currentTextPosition.equals("NE") ) + textPosition.setSelection("NW"); + else if( currentTextPosition.equals("E") ) + textPosition.setSelection("W"); + else if( currentTextPosition.equals("W") ) + textPosition.setSelection("E"); + else if( currentTextPosition.equals("SE") ) + textPosition.setSelection("SW"); + else if( currentTextPosition.equals("SW") ) + textPosition.setSelection("SE"); + + String currentLabelAlignment = labelAlignment.getSelection(); + if( currentLabelAlignment.equals("NW") ) + labelAlignment.setSelection("NE"); + else if( currentLabelAlignment.equals("NE") ) + labelAlignment.setSelection("NW"); + else if( currentLabelAlignment.equals("E") ) + labelAlignment.setSelection("W"); + else if( currentLabelAlignment.equals("W") ) + labelAlignment.setSelection("E"); + else if( currentLabelAlignment.equals("SE") ) + labelAlignment.setSelection("SW"); + else if( currentLabelAlignment.equals("SW") ) + labelAlignment.setSelection("SE"); + } + } + + class PositioningListener implements ItemListener { + + public void itemStateChanged(ItemEvent e) { + JRadioButton rb = (JRadioButton) e.getSource(); + if(rb.getText().equals("Absolute") && rb.isSelected()) { + absolutePositions = true; + } else if(rb.getText().equals("Relative") && rb.isSelected()) { + absolutePositions = false; + } + + for(int i = 0; i < demo.getCurrentControls().size(); i++) { + Component c = (Component) demo.getCurrentControls().elementAt(i); + int hPos, vPos, hAlign, vAlign; + if( c instanceof AbstractButton ) { + hPos = ((AbstractButton)c).getHorizontalTextPosition(); + vPos = ((AbstractButton)c).getVerticalTextPosition(); + hAlign = ((AbstractButton)c).getHorizontalAlignment(); + vAlign = ((AbstractButton)c).getVerticalAlignment(); + } else if( c instanceof JLabel ) { + hPos = ((JLabel)c).getHorizontalTextPosition(); + vPos = ((JLabel)c).getVerticalTextPosition(); + hAlign = ((JLabel)c).getHorizontalAlignment(); + vAlign = ((JLabel)c).getVerticalAlignment(); + } else { + continue; + } + setPosition(c, hPos, vPos); + setAlignment(c, hAlign, vAlign); + } + + demo.invalidate(); + demo.validate(); + demo.repaint(); + } + }; + + + // Text Position Listener + class TextPositionListener implements ActionListener { + public void actionPerformed(ActionEvent e) { + JRadioButton rb = (JRadioButton) e.getSource(); + if(!rb.isSelected()) { + return; + } + String cmd = rb.getActionCommand(); + int hPos, vPos; + if(cmd.equals("NW")) { + hPos = LEFT; vPos = TOP; + } else if(cmd.equals("N")) { + hPos = CENTER; vPos = TOP; + } else if(cmd.equals("NE")) { + hPos = RIGHT; vPos = TOP; + } else if(cmd.equals("W")) { + hPos = LEFT; vPos = CENTER; + } else if(cmd.equals("C")) { + hPos = CENTER; vPos = CENTER; + } else if(cmd.equals("E")) { + hPos = RIGHT; vPos = CENTER; + } else if(cmd.equals("SW")) { + hPos = LEFT; vPos = BOTTOM; + } else if(cmd.equals("S")) { + hPos = CENTER; vPos = BOTTOM; + } else /*if(cmd.equals("SE"))*/ { + hPos = RIGHT; vPos = BOTTOM; + } + for(int i = 0; i < demo.getCurrentControls().size(); i++) { + Component c = (Component) demo.getCurrentControls().elementAt(i); + setPosition(c, hPos, vPos); + } + demo.invalidate(); + demo.validate(); + demo.repaint(); + } + }; + + + // Label Alignment Listener + class LabelAlignmentListener implements ActionListener { + public void actionPerformed(ActionEvent e) { + JRadioButton rb = (JRadioButton) e.getSource(); + if(!rb.isSelected()) { + return; + } + String cmd = rb.getActionCommand(); + int hPos, vPos; + if(cmd.equals("NW")) { + hPos = LEFT; vPos = TOP; + } else if(cmd.equals("N")) { + hPos = CENTER; vPos = TOP; + } else if(cmd.equals("NE")) { + hPos = RIGHT; vPos = TOP; + } else if(cmd.equals("W")) { + hPos = LEFT; vPos = CENTER; + } else if(cmd.equals("C")) { + hPos = CENTER; vPos = CENTER; + } else if(cmd.equals("E")) { + hPos = RIGHT; vPos = CENTER; + } else if(cmd.equals("SW")) { + hPos = LEFT; vPos = BOTTOM; + } else if(cmd.equals("S")) { + hPos = CENTER; vPos = BOTTOM; + } else /*if(cmd.equals("SE"))*/ { + hPos = RIGHT; vPos = BOTTOM; + } + for(int i = 0; i < demo.getCurrentControls().size(); i++) { + Component c = (Component) demo.getCurrentControls().elementAt(i); + setAlignment(c,hPos,vPos); + c.invalidate(); + } + demo.invalidate(); + demo.validate(); + demo.repaint(); + } + }; + + // Position + void setPosition(Component c, int hPos, int vPos) { + boolean ltr = true; + ltr = c.getComponentOrientation().isLeftToRight(); + if( absolutePositions ) { + if( hPos == LEADING ) { + hPos = ltr ? LEFT : RIGHT; + } else if( hPos == TRAILING ) { + hPos = ltr ? RIGHT : LEFT; + } + } else { + if( hPos == LEFT ) { + hPos = ltr ? LEADING : TRAILING; + } else if( hPos == RIGHT ) { + hPos = ltr ? TRAILING : LEADING; + } + } + if(c instanceof AbstractButton) { + AbstractButton x = (AbstractButton) c; + x.setHorizontalTextPosition(hPos); + x.setVerticalTextPosition(vPos); + } else if(c instanceof JLabel) { + JLabel x = (JLabel) c; + x.setHorizontalTextPosition(hPos); + x.setVerticalTextPosition(vPos); + } + } + + void setAlignment(Component c, int hPos, int vPos) { + boolean ltr = true; + ltr = c.getComponentOrientation().isLeftToRight(); + if( absolutePositions ) { + if( hPos == LEADING ) { + hPos = ltr ? LEFT : RIGHT; + } else if( hPos == TRAILING ) { + hPos = ltr ? RIGHT : LEFT; + } + } else { + if( hPos == LEFT ) { + hPos = ltr ? LEADING : TRAILING; + } else if( hPos == RIGHT ) { + hPos = ltr ? TRAILING : LEADING; + } + } + if(c instanceof AbstractButton) { + AbstractButton x = (AbstractButton) c; + x.setHorizontalAlignment(hPos); + x.setVerticalAlignment(vPos); + } else if(c instanceof JLabel) { + JLabel x = (JLabel) c; + x.setHorizontalAlignment(hPos); + x.setVerticalAlignment(vPos); + } + } +} diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/ListDemo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/ListDemo.java Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,379 @@ +/* + * + * 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.*; + +/** + * List Demo. This demo shows that it is not + * always necessary to have an array of objects + * as big as the size of the list stored. + * + * Indeed, in this example, there is no array + * kept for the list data, rather it is generated + * on the fly as only those elements are needed. + * + * @author Jeff Dinkins + */ +public class ListDemo extends DemoModule { + JList list; + + JPanel prefixList; + JPanel suffixList; + + Action prefixAction; + Action suffixAction; + + GeneratedListModel listModel; + + Vector checkboxes = new Vector(); + + /** + * main method allows us to run as a standalone demo. + */ + public static void main(String[] args) { + ListDemo demo = new ListDemo(null); + demo.mainImpl(); + } + + /** + * ListDemo Constructor + */ + public ListDemo(SwingSet2 swingset) { + super(swingset, "ListDemo", "toolbar/JList.gif"); + + loadImages(); + + JLabel description = new JLabel(getString("ListDemo.description")); + getDemoPanel().add(description, BorderLayout.NORTH); + + JPanel centerPanel = new JPanel(); + centerPanel.setLayout(new BoxLayout(centerPanel, BoxLayout.X_AXIS)); + centerPanel.add(Box.createRigidArea(HGAP10)); + getDemoPanel().add(centerPanel, BorderLayout.CENTER); + + JPanel listPanel = new JPanel(); + listPanel.setLayout(new BoxLayout(listPanel, BoxLayout.Y_AXIS)); + listPanel.add(Box.createRigidArea(VGAP10)); + + centerPanel.add(listPanel); + centerPanel.add(Box.createRigidArea(HGAP30)); + + // Create the list + list = new JList(); + list.setCellRenderer(new CompanyLogoListCellRenderer()); + listModel = new GeneratedListModel(this); + list.setModel(listModel); + + // Set the preferred row count. This affects the preferredSize + // of the JList when it's in a scrollpane. + list.setVisibleRowCount(22); + + // Add list to a scrollpane + JScrollPane scrollPane = new JScrollPane(list); + listPanel.add(scrollPane); + listPanel.add(Box.createRigidArea(VGAP10)); + + // Add the control panel (holds the prefix/suffix list and prefix/suffix checkboxes) + centerPanel.add(createControlPanel()); + + // create prefixes and suffixes + addPrefix("Tera", true); + addPrefix("Micro", false); + addPrefix("Southern", false); + addPrefix("Net", true); + addPrefix("YoYo", true); + addPrefix("Northern", false); + addPrefix("Tele", false); + addPrefix("Eastern", false); + addPrefix("Neo", false); + addPrefix("Digi", false); + addPrefix("National", false); + addPrefix("Compu", true); + addPrefix("Meta", true); + addPrefix("Info", false); + addPrefix("Western", false); + addPrefix("Data", false); + addPrefix("Atlantic", false); + addPrefix("Advanced", false); + addPrefix("Euro", false); + addPrefix("Pacific", false); + addPrefix("Mobile", false); + addPrefix("In", false); + addPrefix("Computa", false); + addPrefix("Digital", false); + addPrefix("Analog", false); + + addSuffix("Tech", true); + addSuffix("Soft", true); + addSuffix("Telecom", true); + addSuffix("Solutions", false); + addSuffix("Works", true); + addSuffix("Dyne", false); + addSuffix("Services", false); + addSuffix("Vers", false); + addSuffix("Devices", false); + addSuffix("Software", false); + addSuffix("Serv", false); + addSuffix("Systems", true); + addSuffix("Dynamics", true); + addSuffix("Net", false); + addSuffix("Sys", false); + addSuffix("Computing", false); + addSuffix("Scape", false); + addSuffix("Com", false); + addSuffix("Ware", false); + addSuffix("Widgets", false); + addSuffix("Media", false); + addSuffix("Computer", false); + addSuffix("Hardware", false); + addSuffix("Gizmos", false); + addSuffix("Concepts", false); + } + + void updateDragEnabled(boolean dragEnabled) { + list.setDragEnabled(dragEnabled); + } + + public JPanel createControlPanel() { + JPanel controlPanel = new JPanel() { + Insets insets = new Insets(0, 4, 10, 10); + public Insets getInsets() { + return insets; + } + }; + controlPanel.setLayout(new BoxLayout(controlPanel, BoxLayout.X_AXIS)); + + JPanel prefixPanel = new JPanel(); + prefixPanel.setLayout(new BoxLayout(prefixPanel, BoxLayout.Y_AXIS)); + prefixPanel.add(new JLabel(getString("ListDemo.prefixes"))); + + JPanel suffixPanel = new JPanel(); + suffixPanel.setLayout(new BoxLayout(suffixPanel, BoxLayout.Y_AXIS)); + suffixPanel.add(new JLabel(getString("ListDemo.suffixes"))); + + prefixList = new JPanel() { + Insets insets = new Insets(0, 4, 0, 0); + public Insets getInsets() { + return insets; + } + }; + prefixList.setLayout(new BoxLayout(prefixList, BoxLayout.Y_AXIS)); + JScrollPane scrollPane = new JScrollPane(prefixList); + scrollPane.getVerticalScrollBar().setUnitIncrement(10); + prefixPanel.add(scrollPane); + prefixPanel.add(Box.createRigidArea(HGAP10)); + + suffixList = new JPanel() { + Insets insets = new Insets(0, 4, 0, 0); + public Insets getInsets() { + return insets; + } + }; + suffixList.setLayout(new BoxLayout(suffixList, BoxLayout.Y_AXIS)); + scrollPane = new JScrollPane(suffixList); + scrollPane.getVerticalScrollBar().setUnitIncrement(10); + suffixPanel.add(scrollPane); + suffixPanel.add(Box.createRigidArea(HGAP10)); + + controlPanel.add(prefixPanel); + controlPanel.add(Box.createRigidArea(HGAP15)); + controlPanel.add(suffixPanel); + return controlPanel; + } + + private FocusListener listFocusListener = new FocusAdapter() { + public void focusGained(FocusEvent e) { + JComponent c = (JComponent)e.getComponent(); + c.scrollRectToVisible(new Rectangle(0, 0, c.getWidth(), c.getHeight())); + } + }; + + public void addPrefix(String prefix, boolean selected) { + if(prefixAction == null) { + prefixAction = new UpdatePrefixListAction(listModel); + } + final JCheckBox cb = (JCheckBox) prefixList.add(new JCheckBox(prefix)); + checkboxes.addElement(cb); + cb.setSelected(selected); + cb.addActionListener(prefixAction); + if(selected) { + listModel.addPrefix(prefix); + } + cb.addFocusListener(listFocusListener); + } + + public void addSuffix(String suffix, boolean selected) { + if(suffixAction == null) { + suffixAction = new UpdateSuffixListAction(listModel); + } + final JCheckBox cb = (JCheckBox) suffixList.add(new JCheckBox(suffix)); + checkboxes.addElement(cb); + cb.setSelected(selected); + cb.addActionListener(suffixAction); + if(selected) { + listModel.addSuffix(suffix); + } + cb.addFocusListener(listFocusListener); + } + + class UpdatePrefixListAction extends AbstractAction { + GeneratedListModel listModel; + protected UpdatePrefixListAction(GeneratedListModel listModel) { + this.listModel = listModel; + } + + public void actionPerformed(ActionEvent e) { + JCheckBox cb = (JCheckBox) e.getSource(); + if(cb.isSelected()) { + listModel.addPrefix(cb.getText()); + } else { + listModel.removePrefix(cb.getText()); + } + } + } + + class UpdateSuffixListAction extends AbstractAction { + GeneratedListModel listModel; + protected UpdateSuffixListAction(GeneratedListModel listModel) { + this.listModel = listModel; + } + + public void actionPerformed(ActionEvent e) { + JCheckBox cb = (JCheckBox) e.getSource(); + if(cb.isSelected()) { + listModel.addSuffix(cb.getText()); + } else { + listModel.removeSuffix(cb.getText()); + } + } + } + + + class GeneratedListModel extends AbstractListModel { + ListDemo demo; + Permuter permuter; + + public Vector prefix = new Vector(); + public Vector suffix = new Vector(); + + public GeneratedListModel (ListDemo demo) { + this.demo = demo; + } + + private void update() { + permuter = new Permuter(getSize()); + fireContentsChanged(this, 0, getSize()); + } + + public void addPrefix(String s) { + if(!prefix.contains(s)) { + prefix.addElement(s); + update(); + } + } + + public void removePrefix(String s) { + prefix.removeElement(s); + update(); + } + + public void addSuffix(String s) { + if(!suffix.contains(s)) { + suffix.addElement(s); + update(); + } + } + + public void removeSuffix(String s) { + suffix.removeElement(s); + update(); + } + + public int getSize() { + return prefix.size() * suffix.size(); + } + + public Object getElementAt(int index) { + if(permuter == null) { + update(); + } + // morph the index to another int -- this has the benefit of + // causing the list to look random. + int j = permuter.map(index); + int ps = prefix.size(); + int ss = suffix.size(); + return (String) prefix.elementAt(j%ps) + (String) suffix.elementAt((j/ps)%ss); + } + } + + ImageIcon images[] = new ImageIcon[7]; + void loadImages() { + images[0] = createImageIcon("list/red.gif", getString("ListDemo.red")); + images[1] = createImageIcon("list/blue.gif", getString("ListDemo.blue")); + images[2] = createImageIcon("list/yellow.gif", getString("ListDemo.yellow")); + images[3] = createImageIcon("list/green.gif", getString("ListDemo.green")); + images[4] = createImageIcon("list/gray.gif", getString("ListDemo.gray")); + images[5] = createImageIcon("list/cyan.gif", getString("ListDemo.cyan")); + images[6] = createImageIcon("list/magenta.gif", getString("ListDemo.magenta")); + } + + class CompanyLogoListCellRenderer extends DefaultListCellRenderer { + public Component getListCellRendererComponent( + JList list, + Object value, + int index, + boolean isSelected, + boolean cellHasFocus) + { + Component retValue = super.getListCellRendererComponent( + list, value, index, isSelected, cellHasFocus + ); + setIcon(images[index%7]); + return retValue; + } + } +} diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/OptionPaneDemo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/OptionPaneDemo.java Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,231 @@ +/* + * + * 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.*; + +/** + * JOptionPaneDemo + * + * @author Jeff Dinkins + */ +public class OptionPaneDemo extends DemoModule { + + /** + * main method allows us to run as a standalone demo. + */ + public static void main(String[] args) { + OptionPaneDemo demo = new OptionPaneDemo(null); + demo.mainImpl(); + } + + /** + * OptionPaneDemo Constructor + */ + public OptionPaneDemo(SwingSet2 swingset) { + // Set the title for this demo, and an icon used to represent this + // demo inside the SwingSet2 app. + super(swingset, "OptionPaneDemo", "toolbar/JOptionPane.gif"); + + JPanel demo = getDemoPanel(); + + demo.setLayout(new BoxLayout(demo, BoxLayout.X_AXIS)); + + JPanel bp = new JPanel() { + public Dimension getMaximumSize() { + return new Dimension(getPreferredSize().width, super.getMaximumSize().height); + } + }; + bp.setLayout(new BoxLayout(bp, BoxLayout.Y_AXIS)); + + bp.add(Box.createRigidArea(VGAP30)); + bp.add(Box.createRigidArea(VGAP30)); + + bp.add(createInputDialogButton()); bp.add(Box.createRigidArea(VGAP15)); + bp.add(createWarningDialogButton()); bp.add(Box.createRigidArea(VGAP15)); + bp.add(createMessageDialogButton()); bp.add(Box.createRigidArea(VGAP15)); + bp.add(createComponentDialogButton()); bp.add(Box.createRigidArea(VGAP15)); + bp.add(createConfirmDialogButton()); bp.add(Box.createVerticalGlue()); + + demo.add(Box.createHorizontalGlue()); + demo.add(bp); + demo.add(Box.createHorizontalGlue()); + } + + public JButton createWarningDialogButton() { + Action a = new AbstractAction(getString("OptionPaneDemo.warningbutton")) { + public void actionPerformed(ActionEvent e) { + JOptionPane.showMessageDialog( + getDemoPanel(), + getString("OptionPaneDemo.warningtext"), + getString("OptionPaneDemo.warningtitle"), + JOptionPane.WARNING_MESSAGE + ); + } + }; + return createButton(a); + } + + public JButton createMessageDialogButton() { + Action a = new AbstractAction(getString("OptionPaneDemo.messagebutton")) { + URL img = getClass().getResource("/resources/images/optionpane/bottle.gif"); + String imagesrc = ""; + String message = getString("OptionPaneDemo.messagetext"); + public void actionPerformed(ActionEvent e) { + JOptionPane.showMessageDialog( + getDemoPanel(), + "" + imagesrc + "
" + message + "

" + ); + } + }; + return createButton(a); + } + + public JButton createConfirmDialogButton() { + Action a = new AbstractAction(getString("OptionPaneDemo.confirmbutton")) { + public void actionPerformed(ActionEvent e) { + int result = JOptionPane.showConfirmDialog(getDemoPanel(), getString("OptionPaneDemo.confirmquestion")); + if(result == JOptionPane.YES_OPTION) { + JOptionPane.showMessageDialog(getDemoPanel(), getString("OptionPaneDemo.confirmyes")); + } else if(result == JOptionPane.NO_OPTION) { + JOptionPane.showMessageDialog(getDemoPanel(), getString("OptionPaneDemo.confirmno")); + } + } + }; + return createButton(a); + } + + public JButton createInputDialogButton() { + Action a = new AbstractAction(getString("OptionPaneDemo.inputbutton")) { + public void actionPerformed(ActionEvent e) { + String result = JOptionPane.showInputDialog(getDemoPanel(), getString("OptionPaneDemo.inputquestion")); + if ((result != null) && (result.length() > 0)) { + JOptionPane.showMessageDialog(getDemoPanel(), + result + ": " + + getString("OptionPaneDemo.inputresponse")); + } + } + }; + return createButton(a); + } + + public JButton createComponentDialogButton() { + Action a = new AbstractAction(getString("OptionPaneDemo.componentbutton")) { + public void actionPerformed(ActionEvent e) { + // In a ComponentDialog, you can show as many message components and + // as many options as you want: + + // Messages + Object[] message = new Object[4]; + message[0] = getString("OptionPaneDemo.componentmessage"); + message[1] = new JTextField(getString("OptionPaneDemo.componenttextfield")); + + JComboBox cb = new JComboBox(); + cb.addItem(getString("OptionPaneDemo.component_cb1")); + cb.addItem(getString("OptionPaneDemo.component_cb2")); + cb.addItem(getString("OptionPaneDemo.component_cb3")); + message[2] = cb; + + message[3] = getString("OptionPaneDemo.componentmessage2"); + + // Options + String[] options = { + getString("OptionPaneDemo.component_op1"), + getString("OptionPaneDemo.component_op2"), + getString("OptionPaneDemo.component_op3"), + getString("OptionPaneDemo.component_op4"), + getString("OptionPaneDemo.component_op5") + }; + int result = JOptionPane.showOptionDialog( + getDemoPanel(), // the parent that the dialog blocks + message, // the dialog message array + getString("OptionPaneDemo.componenttitle"), // the title of the dialog window + JOptionPane.DEFAULT_OPTION, // option type + JOptionPane.INFORMATION_MESSAGE, // message type + null, // optional icon, use null to use the default icon + options, // options string array, will be made into buttons + options[3] // option that should be made into a default button + ); + switch(result) { + case 0: // yes + JOptionPane.showMessageDialog(getDemoPanel(), getString("OptionPaneDemo.component_r1")); + break; + case 1: // no + JOptionPane.showMessageDialog(getDemoPanel(), getString("OptionPaneDemo.component_r2")); + break; + case 2: // maybe + JOptionPane.showMessageDialog(getDemoPanel(), getString("OptionPaneDemo.component_r3")); + break; + case 3: // probably + JOptionPane.showMessageDialog(getDemoPanel(), getString("OptionPaneDemo.component_r4")); + break; + default: + break; + } + + } + }; + return createButton(a); + } + + public JButton createButton(Action a) { + JButton b = new JButton() { + public Dimension getMaximumSize() { + int width = Short.MAX_VALUE; + int height = super.getMaximumSize().height; + return new Dimension(width, height); + } + }; + // setting the following client property informs the button to show + // the action text as it's name. The default is to not show the + // action text. + b.putClientProperty("displayActionText", Boolean.TRUE); + b.setAction(a); + // b.setAlignmentX(JButton.CENTER_ALIGNMENT); + return b; + } + +} diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/Permuter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/Permuter.java Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,110 @@ +/* + * + * 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 java.util.Random; + +/** + * An object that implements a cheesy pseudorandom permutation of the integers + * from zero to some user-specified value. (The permutation is a linear + * function.) + * + * @author Josh Bloch + */ +class Permuter { + /** + * The size of the permutation. + */ + private int modulus; + + /** + * Nonnegative integer less than n that is relatively prime to m. + */ + private int multiplier; + + /** + * Pseudorandom nonnegative integer less than n. + */ + private int addend = 22; + + public Permuter(int n) { + if (n<0) { + throw new IllegalArgumentException(); + } + modulus = n; + if (n==1) { + return; + } + + // Initialize the multiplier and offset + multiplier = (int) Math.sqrt(n); + while (gcd(multiplier, n) != 1) { + if (++multiplier == n) { + multiplier = 1; + } + } + } + + /** + * Returns the integer to which this permuter maps the specified integer. + * The specified integer must be between 0 and n-1, and the returned + * integer will be as well. + */ + public int map(int i) { + return (multiplier * i + addend) % modulus; + } + + /** + * Calculate GCD of a and b, which are assumed to be non-negative. + */ + private static int gcd(int a, int b) { + while(b != 0) { + int tmp = a % b; + a = b; + b = tmp; + } + return a; + } + + /** + * Simple test. Takes modulus on command line and prints out permutation. + */ + public static void main(String[] args) { + int modulus = Integer.parseInt(args[0]); + Permuter p = new Permuter(modulus); + for (int i=0; i 0) { + splitPane.setDividerSize(newSize); + } else { + JOptionPane.showMessageDialog(splitPane, + getString("SplitPaneDemo.invalid_divider_size"), + getString("SplitPaneDemo.error"), + JOptionPane.ERROR_MESSAGE); + } + } + }); + label = new JLabel(getString("SplitPaneDemo.divider_size")); + tfWrapper = new JPanel(new FlowLayout(FlowLayout.LEFT)); + tfWrapper.add(label); + tfWrapper.add(divSize); + label.setLabelFor(divSize); + label.setDisplayedMnemonic(getMnemonic("SplitPaneDemo.divider_size_mnemonic")); + wrapper.add(tfWrapper); + + /* Create a text field that will change the preferred/minimum size + of the earth component. */ + earthSize = new JTextField(String.valueOf(earth.getMinimumSize().width)); + earthSize.setColumns(5); + earthSize.getAccessibleContext().setAccessibleName(getString("SplitPaneDemo.first_component_min_size")); + earthSize.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + String value = ((JTextField)e.getSource()).getText(); + int newSize; + + try { + newSize = Integer.parseInt(value); + } catch (Exception ex) { + newSize = -1; + } + if(newSize > 10) { + earth.setMinimumSize(new Dimension(newSize, newSize)); + } else { + JOptionPane.showMessageDialog(splitPane, + getString("SplitPaneDemo.invalid_min_size") + + getString("SplitPaneDemo.must_be_greater_than") + 10, + getString("SplitPaneDemo.error"), + JOptionPane.ERROR_MESSAGE); + } + } + }); + label = new JLabel(getString("SplitPaneDemo.first_component_min_size")); + tfWrapper = new JPanel(new FlowLayout(FlowLayout.LEFT)); + tfWrapper.add(label); + tfWrapper.add(earthSize); + label.setLabelFor(earthSize); + label.setDisplayedMnemonic(getMnemonic("SplitPaneDemo.first_component_min_size_mnemonic")); + wrapper.add(tfWrapper); + + /* Create a text field that will change the preferred/minimum size + of the moon component. */ + moonSize = new JTextField(String.valueOf(moon.getMinimumSize().width)); + moonSize.setColumns(5); + moonSize.getAccessibleContext().setAccessibleName(getString("SplitPaneDemo.second_component_min_size")); + moonSize.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + String value = ((JTextField)e.getSource()).getText(); + int newSize; + + try { + newSize = Integer.parseInt(value); + } catch (Exception ex) { + newSize = -1; + } + if(newSize > 10) { + moon.setMinimumSize(new Dimension(newSize, newSize)); + } else { + JOptionPane.showMessageDialog(splitPane, + getString("SplitPaneDemo.invalid_min_size") + + getString("SplitPaneDemo.must_be_greater_than") + 10, + getString("SplitPaneDemo.error"), + JOptionPane.ERROR_MESSAGE); + } + } + }); + label = new JLabel(getString("SplitPaneDemo.second_component_min_size")); + tfWrapper = new JPanel(new FlowLayout(FlowLayout.LEFT)); + tfWrapper.add(label); + tfWrapper.add(moonSize); + label.setLabelFor(moonSize); + label.setDisplayedMnemonic(getMnemonic("SplitPaneDemo.second_component_min_size_mnemonic")); + wrapper.add(tfWrapper); + + return wrapper; + } + + void updateDragEnabled(boolean dragEnabled) { + divSize.setDragEnabled(dragEnabled); + earthSize.setDragEnabled(dragEnabled); + moonSize.setDragEnabled(dragEnabled); + } + +} diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/SwingSet2.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/SwingSet2.html Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,14 @@ + + + + SwingSet demo + + + +

SwingSet demo

+ + + + diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/SwingSet2.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/SwingSet2.java Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,1367 @@ +/* + * + * Copyright (c) 2007, 2014, 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.border.*; + +import javax.swing.plaf.metal.MetalTheme; +import javax.swing.plaf.metal.OceanTheme; +import javax.swing.plaf.metal.DefaultMetalTheme; +import javax.swing.plaf.metal.MetalLookAndFeel; + +import java.lang.reflect.*; +import java.awt.*; +import java.awt.event.*; +import java.util.*; + +/** + * A demo that shows all of the Swing components. + * + * @author Jeff Dinkins + */ +public class SwingSet2 extends JPanel { + + String[] demos = { + "ButtonDemo", + "ColorChooserDemo", + "ComboBoxDemo", + "FileChooserDemo", + "HtmlDemo", + "ListDemo", + "OptionPaneDemo", + "ProgressBarDemo", + "ScrollPaneDemo", + "SliderDemo", + "SplitPaneDemo", + "TabbedPaneDemo", + "TableDemo", + "ToolTipDemo", + "TreeDemo" + }; + + void loadDemos() { + for(int i = 0; i < demos.length;) { + if(isApplet() && demos[i].equals("FileChooserDemo")) { + // don't load the file chooser demo if we are + // an applet + } else { + loadDemo(demos[i]); + } + i++; + } + } + + // The current Look & Feel + private static LookAndFeelData currentLookAndFeel; + private static LookAndFeelData[] lookAndFeelData; + // List of demos + private ArrayList demosList = new ArrayList(); + + // The preferred size of the demo + private static final int PREFERRED_WIDTH = 720; + private static final int PREFERRED_HEIGHT = 640; + + // Box spacers + private Dimension HGAP = new Dimension(1,5); + private Dimension VGAP = new Dimension(5,1); + + // A place to hold on to the visible demo + private DemoModule currentDemo = null; + private JPanel demoPanel = null; + + // About Box + private JDialog aboutBox = null; + + // Status Bar + private JTextField statusField = null; + + // Tool Bar + private ToggleButtonToolBar toolbar = null; + private ButtonGroup toolbarGroup = new ButtonGroup(); + + // Menus + private JMenuBar menuBar = null; + private JMenu lafMenu = null; + private JMenu themesMenu = null; + private JMenu audioMenu = null; + private JMenu optionsMenu = null; + private ButtonGroup lafMenuGroup = new ButtonGroup(); + private ButtonGroup themesMenuGroup = new ButtonGroup(); + private ButtonGroup audioMenuGroup = new ButtonGroup(); + + // Popup menu + private JPopupMenu popupMenu = null; + private ButtonGroup popupMenuGroup = new ButtonGroup(); + + // Used only if swingset is an application + private JFrame frame = null; + + // Used only if swingset is an applet + private SwingSet2Applet applet = null; + + // To debug or not to debug, that is the question + private boolean DEBUG = true; + private int debugCounter = 0; + + // The tab pane that holds the demo + private JTabbedPane tabbedPane = null; + + private JEditorPane demoSrcPane = null; + + + // contentPane cache, saved from the applet or application frame + Container contentPane = null; + + + // number of swingsets - for multiscreen + // keep track of the number of SwingSets created - we only want to exit + // the program when the last one has been closed. + private static int numSSs = 0; + private static Vector swingSets = new Vector(); + + private boolean dragEnabled = false; + + public SwingSet2(SwingSet2Applet applet) { + this(applet, null); + } + + /** + * SwingSet2 Constructor + */ + public SwingSet2(SwingSet2Applet applet, GraphicsConfiguration gc) { + + // Note that applet may be null if this is started as an application + this.applet = applet; + + String lafClassName = UIManager.getLookAndFeel().getClass().getName(); + lookAndFeelData = getInstalledLookAndFeelData(); + currentLookAndFeel = Arrays.stream(lookAndFeelData) + .filter(laf -> lafClassName.equals(laf.className)) + .findFirst().get(); + + if (!isApplet()) { + frame = createFrame(gc); + } + + // set the layout + setLayout(new BorderLayout()); + + // set the preferred size of the demo + setPreferredSize(new Dimension(PREFERRED_WIDTH,PREFERRED_HEIGHT)); + + initializeDemo(); + preloadFirstDemo(); + + showSwingSet2(); + + // Start loading the rest of the demo in the background + DemoLoadThread demoLoader = new DemoLoadThread(this); + demoLoader.start(); + } + + + /** + * SwingSet2 Main. Called only if we're an application, not an applet. + */ + public static void main(final String[] args) { + // must run in EDT when constructing the GUI components + SwingUtilities.invokeLater(() -> { + // Create SwingSet on the default monitor + UIManager.put("swing.boldMetal", Boolean.FALSE); + SwingSet2 swingset = new SwingSet2(null, GraphicsEnvironment. + getLocalGraphicsEnvironment(). + getDefaultScreenDevice(). + getDefaultConfiguration()); + }); + } + + // ******************************************************* + // *************** Demo Loading Methods ****************** + // ******************************************************* + + + + public void initializeDemo() { + JPanel top = new JPanel(); + top.setLayout(new BorderLayout()); + add(top, BorderLayout.NORTH); + + menuBar = createMenus(); + + if (isApplet()) { + applet.setJMenuBar(menuBar); + } else { + frame.setJMenuBar(menuBar); + } + + // creates popup menu accessible via keyboard + popupMenu = createPopupMenu(); + + ToolBarPanel toolbarPanel = new ToolBarPanel(); + toolbarPanel.setLayout(new BorderLayout()); + toolbar = new ToggleButtonToolBar(); + toolbarPanel.add(toolbar, BorderLayout.CENTER); + top.add(toolbarPanel, BorderLayout.SOUTH); + toolbarPanel.addContainerListener(toolbarPanel); + + tabbedPane = new JTabbedPane(); + add(tabbedPane, BorderLayout.CENTER); + tabbedPane.getModel().addChangeListener(new TabListener()); + + statusField = new JTextField(""); + statusField.setEditable(false); + add(statusField, BorderLayout.SOUTH); + + demoPanel = new JPanel(); + demoPanel.setLayout(new BorderLayout()); + demoPanel.setBorder(new EtchedBorder()); + tabbedPane.addTab("Hi There!", demoPanel); + + // Add html src code viewer + demoSrcPane = new JEditorPane("text/html", getString("SourceCode.loading")); + demoSrcPane.setEditable(false); + + JScrollPane scroller = new JScrollPane(); + scroller.getViewport().add(demoSrcPane); + + tabbedPane.addTab( + getString("TabbedPane.src_label"), + null, + scroller, + getString("TabbedPane.src_tooltip") + ); + } + + DemoModule currentTabDemo = null; + class TabListener implements ChangeListener { + public void stateChanged(ChangeEvent e) { + SingleSelectionModel model = (SingleSelectionModel) e.getSource(); + boolean srcSelected = model.getSelectedIndex() == 1; + if(currentTabDemo != currentDemo && demoSrcPane != null && srcSelected) { + demoSrcPane.setText(getString("SourceCode.loading")); + repaint(); + } + if(currentTabDemo != currentDemo && srcSelected) { + currentTabDemo = currentDemo; + setSourceCode(currentDemo); + } + } + } + + + /** + * Create menus + */ + public JMenuBar createMenus() { + JMenuItem mi; + // ***** create the menubar **** + JMenuBar menuBar = new JMenuBar(); + menuBar.getAccessibleContext().setAccessibleName( + getString("MenuBar.accessible_description")); + + // ***** create File menu + JMenu fileMenu = (JMenu) menuBar.add(new JMenu(getString("FileMenu.file_label"))); + fileMenu.setMnemonic(getMnemonic("FileMenu.file_mnemonic")); + fileMenu.getAccessibleContext().setAccessibleDescription(getString("FileMenu.accessible_description")); + + createMenuItem(fileMenu, "FileMenu.about_label", "FileMenu.about_mnemonic", + "FileMenu.about_accessible_description", new AboutAction(this)); + + fileMenu.addSeparator(); + + createMenuItem(fileMenu, "FileMenu.open_label", "FileMenu.open_mnemonic", + "FileMenu.open_accessible_description", null); + + createMenuItem(fileMenu, "FileMenu.save_label", "FileMenu.save_mnemonic", + "FileMenu.save_accessible_description", null); + + createMenuItem(fileMenu, "FileMenu.save_as_label", "FileMenu.save_as_mnemonic", + "FileMenu.save_as_accessible_description", null); + + + if(!isApplet()) { + fileMenu.addSeparator(); + + createMenuItem(fileMenu, "FileMenu.exit_label", "FileMenu.exit_mnemonic", + "FileMenu.exit_accessible_description", new ExitAction(this) + ); + } + + // Create these menu items for the first SwingSet only. + if (numSSs == 0) { + // ***** create laf switcher menu + lafMenu = (JMenu) menuBar.add(new JMenu(getString("LafMenu.laf_label"))); + lafMenu.setMnemonic(getMnemonic("LafMenu.laf_mnemonic")); + lafMenu.getAccessibleContext().setAccessibleDescription( + getString("LafMenu.laf_accessible_description")); + + for (LookAndFeelData lafData : lookAndFeelData) { + mi = createLafMenuItem(lafMenu, lafData); + mi.setSelected(lafData.equals(currentLookAndFeel)); + } + + // ***** create themes menu + themesMenu = (JMenu) menuBar.add(new JMenu(getString("ThemesMenu.themes_label"))); + themesMenu.setMnemonic(getMnemonic("ThemesMenu.themes_mnemonic")); + themesMenu.getAccessibleContext().setAccessibleDescription( + getString("ThemesMenu.themes_accessible_description")); + + // ***** create the audio submenu under the theme menu + audioMenu = (JMenu) themesMenu.add(new JMenu(getString("AudioMenu.audio_label"))); + audioMenu.setMnemonic(getMnemonic("AudioMenu.audio_mnemonic")); + audioMenu.getAccessibleContext().setAccessibleDescription( + getString("AudioMenu.audio_accessible_description")); + + createAudioMenuItem(audioMenu, "AudioMenu.on_label", + "AudioMenu.on_mnemonic", + "AudioMenu.on_accessible_description", + new OnAudioAction(this)); + + mi = createAudioMenuItem(audioMenu, "AudioMenu.default_label", + "AudioMenu.default_mnemonic", + "AudioMenu.default_accessible_description", + new DefaultAudioAction(this)); + mi.setSelected(true); // This is the default feedback setting + + createAudioMenuItem(audioMenu, "AudioMenu.off_label", + "AudioMenu.off_mnemonic", + "AudioMenu.off_accessible_description", + new OffAudioAction(this)); + + + // ***** create the font submenu under the theme menu + JMenu fontMenu = (JMenu) themesMenu.add(new JMenu(getString("FontMenu.fonts_label"))); + fontMenu.setMnemonic(getMnemonic("FontMenu.fonts_mnemonic")); + fontMenu.getAccessibleContext().setAccessibleDescription( + getString("FontMenu.fonts_accessible_description")); + ButtonGroup fontButtonGroup = new ButtonGroup(); + mi = createButtonGroupMenuItem(fontMenu, "FontMenu.plain_label", + "FontMenu.plain_mnemonic", + "FontMenu.plain_accessible_description", + new ChangeFontAction(this, true), fontButtonGroup); + mi.setSelected(true); + mi = createButtonGroupMenuItem(fontMenu, "FontMenu.bold_label", + "FontMenu.bold_mnemonic", + "FontMenu.bold_accessible_description", + new ChangeFontAction(this, false), fontButtonGroup); + + + + // *** now back to adding color/font themes to the theme menu + mi = createThemesMenuItem(themesMenu, "ThemesMenu.ocean_label", + "ThemesMenu.ocean_mnemonic", + "ThemesMenu.ocean_accessible_description", + new OceanTheme()); + mi.setSelected(true); // This is the default theme + + createThemesMenuItem(themesMenu, "ThemesMenu.steel_label", + "ThemesMenu.steel_mnemonic", + "ThemesMenu.steel_accessible_description", + new DefaultMetalTheme()); + + createThemesMenuItem(themesMenu, "ThemesMenu.aqua_label", "ThemesMenu.aqua_mnemonic", + "ThemesMenu.aqua_accessible_description", new AquaTheme()); + + createThemesMenuItem(themesMenu, "ThemesMenu.charcoal_label", "ThemesMenu.charcoal_mnemonic", + "ThemesMenu.charcoal_accessible_description", new CharcoalTheme()); + + createThemesMenuItem(themesMenu, "ThemesMenu.contrast_label", "ThemesMenu.contrast_mnemonic", + "ThemesMenu.contrast_accessible_description", new ContrastTheme()); + + createThemesMenuItem(themesMenu, "ThemesMenu.emerald_label", "ThemesMenu.emerald_mnemonic", + "ThemesMenu.emerald_accessible_description", new EmeraldTheme()); + + createThemesMenuItem(themesMenu, "ThemesMenu.ruby_label", "ThemesMenu.ruby_mnemonic", + "ThemesMenu.ruby_accessible_description", new RubyTheme()); + + // Enable theme menu based on L&F + themesMenu.setEnabled("Metal".equals(currentLookAndFeel.name)); + + // ***** create the options menu + optionsMenu = (JMenu)menuBar.add( + new JMenu(getString("OptionsMenu.options_label"))); + optionsMenu.setMnemonic(getMnemonic("OptionsMenu.options_mnemonic")); + optionsMenu.getAccessibleContext().setAccessibleDescription( + getString("OptionsMenu.options_accessible_description")); + + // ***** create tool tip submenu item. + mi = createCheckBoxMenuItem(optionsMenu, "OptionsMenu.tooltip_label", + "OptionsMenu.tooltip_mnemonic", + "OptionsMenu.tooltip_accessible_description", + new ToolTipAction()); + mi.setSelected(true); + + // ***** create drag support submenu item. + createCheckBoxMenuItem(optionsMenu, "OptionsMenu.dragEnabled_label", + "OptionsMenu.dragEnabled_mnemonic", + "OptionsMenu.dragEnabled_accessible_description", + new DragSupportAction()); + + } + + + // ***** create the multiscreen menu, if we have multiple screens + if (!isApplet()) { + GraphicsDevice[] screens = GraphicsEnvironment. + getLocalGraphicsEnvironment(). + getScreenDevices(); + if (screens.length > 1) { + + JMenu multiScreenMenu = (JMenu) menuBar.add(new JMenu( + getString("MultiMenu.multi_label"))); + + multiScreenMenu.setMnemonic(getMnemonic("MultiMenu.multi_mnemonic")); + multiScreenMenu.getAccessibleContext().setAccessibleDescription( + getString("MultiMenu.multi_accessible_description")); + + createMultiscreenMenuItem(multiScreenMenu, MultiScreenAction.ALL_SCREENS); + for (int i = 0; i < screens.length; i++) { + createMultiscreenMenuItem(multiScreenMenu, i); + } + } + } + + return menuBar; + } + + /** + * Create a checkbox menu menu item + */ + private JMenuItem createCheckBoxMenuItem(JMenu menu, String label, + String mnemonic, + String accessibleDescription, + Action action) { + JCheckBoxMenuItem mi = (JCheckBoxMenuItem)menu.add( + new JCheckBoxMenuItem(getString(label))); + mi.setMnemonic(getMnemonic(mnemonic)); + mi.getAccessibleContext().setAccessibleDescription(getString( + accessibleDescription)); + mi.addActionListener(action); + return mi; + } + + /** + * Create a radio button menu menu item for items that are part of a + * button group. + */ + private JMenuItem createButtonGroupMenuItem(JMenu menu, String label, + String mnemonic, + String accessibleDescription, + Action action, + ButtonGroup buttonGroup) { + JRadioButtonMenuItem mi = (JRadioButtonMenuItem)menu.add( + new JRadioButtonMenuItem(getString(label))); + buttonGroup.add(mi); + mi.setMnemonic(getMnemonic(mnemonic)); + mi.getAccessibleContext().setAccessibleDescription(getString( + accessibleDescription)); + mi.addActionListener(action); + return mi; + } + + /** + * Create the theme's audio submenu + */ + public JMenuItem createAudioMenuItem(JMenu menu, String label, + String mnemonic, + String accessibleDescription, + Action action) { + JRadioButtonMenuItem mi = (JRadioButtonMenuItem) menu.add(new JRadioButtonMenuItem(getString(label))); + audioMenuGroup.add(mi); + mi.setMnemonic(getMnemonic(mnemonic)); + mi.getAccessibleContext().setAccessibleDescription(getString(accessibleDescription)); + mi.addActionListener(action); + + return mi; + } + + /** + * Creates a generic menu item + */ + public JMenuItem createMenuItem(JMenu menu, String label, String mnemonic, + String accessibleDescription, Action action) { + JMenuItem mi = (JMenuItem) menu.add(new JMenuItem(getString(label))); + mi.setMnemonic(getMnemonic(mnemonic)); + mi.getAccessibleContext().setAccessibleDescription(getString(accessibleDescription)); + mi.addActionListener(action); + if(action == null) { + mi.setEnabled(false); + } + return mi; + } + + /** + * Creates a JRadioButtonMenuItem for the Themes menu + */ + public JMenuItem createThemesMenuItem(JMenu menu, String label, String mnemonic, + String accessibleDescription, MetalTheme theme) { + JRadioButtonMenuItem mi = (JRadioButtonMenuItem) menu.add(new JRadioButtonMenuItem(getString(label))); + themesMenuGroup.add(mi); + mi.setMnemonic(getMnemonic(mnemonic)); + mi.getAccessibleContext().setAccessibleDescription(getString(accessibleDescription)); + mi.addActionListener(new ChangeThemeAction(this, theme)); + + return mi; + } + + /** + * Creates a JRadioButtonMenuItem for the Look and Feel menu + */ + public JMenuItem createLafMenuItem(JMenu menu, LookAndFeelData lafData) { + JMenuItem mi = menu.add(new JRadioButtonMenuItem(lafData.label)); + lafMenuGroup.add(mi); + mi.setMnemonic(lafData.mnemonic); + mi.getAccessibleContext().setAccessibleDescription(lafData.accDescription); + mi.addActionListener(new ChangeLookAndFeelAction(this, lafData)); + return mi; + } + + /** + * Creates a multi-screen menu item + */ + public JMenuItem createMultiscreenMenuItem(JMenu menu, int screen) { + JMenuItem mi = null; + if (screen == MultiScreenAction.ALL_SCREENS) { + mi = (JMenuItem) menu.add(new JMenuItem(getString("MultiMenu.all_label"))); + mi.setMnemonic(getMnemonic("MultiMenu.all_mnemonic")); + mi.getAccessibleContext().setAccessibleDescription(getString( + "MultiMenu.all_accessible_description")); + } + else { + mi = (JMenuItem) menu.add(new JMenuItem(getString("MultiMenu.single_label") + " " + + screen)); + mi.setMnemonic(KeyEvent.VK_0 + screen); + mi.getAccessibleContext().setAccessibleDescription(getString( + "MultiMenu.single_accessible_description") + " " + screen); + + } + mi.addActionListener(new MultiScreenAction(this, screen)); + return mi; + } + + public JPopupMenu createPopupMenu() { + JPopupMenu popup = new JPopupMenu("JPopupMenu demo"); + + for (LookAndFeelData lafData : lookAndFeelData) { + createPopupMenuItem(popup, lafData); + } + + // register key binding to activate popup menu + InputMap map = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW); + map.put(KeyStroke.getKeyStroke(KeyEvent.VK_F10, InputEvent.SHIFT_MASK), + "postMenuAction"); + map.put(KeyStroke.getKeyStroke(KeyEvent.VK_CONTEXT_MENU, 0), "postMenuAction"); + getActionMap().put("postMenuAction", new ActivatePopupMenuAction(this, popup)); + + return popup; + } + + /** + * Creates a JMenuItem for the Look and Feel popup menu + */ + public JMenuItem createPopupMenuItem(JPopupMenu menu, LookAndFeelData lafData) { + JMenuItem mi = menu.add(new JMenuItem(lafData.label)); + popupMenuGroup.add(mi); + mi.setMnemonic(lafData.mnemonic); + mi.getAccessibleContext().setAccessibleDescription(lafData.accDescription); + mi.addActionListener(new ChangeLookAndFeelAction(this, lafData)); + return mi; + } + + + /** + * Load the first demo. This is done separately from the remaining demos + * so that we can get SwingSet2 up and available to the user quickly. + */ + public void preloadFirstDemo() { + DemoModule demo = addDemo(new InternalFrameDemo(this)); + setDemo(demo); + } + + + /** + * Add a demo to the toolbar + */ + public DemoModule addDemo(DemoModule demo) { + demosList.add(demo); + if (dragEnabled) { + demo.updateDragEnabled(true); + } + // do the following on the gui thread + SwingUtilities.invokeLater(new SwingSetRunnable(this, demo) { + public void run() { + SwitchToDemoAction action = new SwitchToDemoAction(swingset, (DemoModule) obj); + JToggleButton tb = swingset.getToolBar().addToggleButton(action); + swingset.getToolBarGroup().add(tb); + if(swingset.getToolBarGroup().getSelection() == null) { + tb.setSelected(true); + } + tb.setText(null); + tb.setToolTipText(((DemoModule)obj).getToolTip()); + + if(demos[demos.length-1].equals(obj.getClass().getName())) { + setStatus(getString("Status.popupMenuAccessible")); + } + + } + }); + return demo; + } + + + /** + * Sets the current demo + */ + public void setDemo(DemoModule demo) { + currentDemo = demo; + + // Ensure panel's UI is current before making visible + JComponent currentDemoPanel = demo.getDemoPanel(); + SwingUtilities.updateComponentTreeUI(currentDemoPanel); + + demoPanel.removeAll(); + demoPanel.add(currentDemoPanel, BorderLayout.CENTER); + + tabbedPane.setSelectedIndex(0); + tabbedPane.setTitleAt(0, demo.getName()); + tabbedPane.setToolTipTextAt(0, demo.getToolTip()); + } + + + /** + * Bring up the SwingSet2 demo by showing the frame (only + * applicable if coming up as an application, not an applet); + */ + public void showSwingSet2() { + if(!isApplet() && getFrame() != null) { + // put swingset in a frame and show it + JFrame f = getFrame(); + f.setTitle(getString("Frame.title")); + f.getContentPane().add(this, BorderLayout.CENTER); + f.pack(); + + Rectangle screenRect = f.getGraphicsConfiguration().getBounds(); + Insets screenInsets = Toolkit.getDefaultToolkit().getScreenInsets( + f.getGraphicsConfiguration()); + + // Make sure we don't place the demo off the screen. + int centerWidth = screenRect.width < f.getSize().width ? + screenRect.x : + screenRect.x + screenRect.width/2 - f.getSize().width/2; + int centerHeight = screenRect.height < f.getSize().height ? + screenRect.y : + screenRect.y + screenRect.height/2 - f.getSize().height/2; + + centerHeight = centerHeight < screenInsets.top ? + screenInsets.top : centerHeight; + + f.setLocation(centerWidth, centerHeight); + f.show(); + numSSs++; + swingSets.add(this); + } + } + + // ******************************************************* + // ****************** Utility Methods ******************** + // ******************************************************* + + /** + * Loads a demo from a classname + */ + void loadDemo(String classname) { + setStatus(getString("Status.loading") + getString(classname + ".name")); + DemoModule demo = null; + try { + Class demoClass = Class.forName(classname); + Constructor demoConstructor = demoClass.getConstructor(new Class[]{SwingSet2.class}); + demo = (DemoModule) demoConstructor.newInstance(new Object[]{this}); + addDemo(demo); + } catch (Exception e) { + System.out.println("Error occurred loading demo: " + classname); + } + } + + /** + * Determines if this is an applet or application + */ + public boolean isApplet() { + return (applet != null); + } + + /** + * Returns the applet instance + */ + public SwingSet2Applet getApplet() { + return applet; + } + + + /** + * Returns the frame instance + */ + public JFrame getFrame() { + return frame; + } + + /** + * Returns the menubar + */ + public JMenuBar getMenuBar() { + return menuBar; + } + + /** + * Returns the toolbar + */ + public ToggleButtonToolBar getToolBar() { + return toolbar; + } + + /** + * Returns the toolbar button group + */ + public ButtonGroup getToolBarGroup() { + return toolbarGroup; + } + + /** + * Returns the content pane whether we're in an applet + * or application + */ + public Container getContentPane() { + if(contentPane == null) { + if(getFrame() != null) { + contentPane = getFrame().getContentPane(); + } else if (getApplet() != null) { + contentPane = getApplet().getContentPane(); + } + } + return contentPane; + } + + /** + * Create a frame for SwingSet2 to reside in if brought up + * as an application. + */ + public static JFrame createFrame(GraphicsConfiguration gc) { + JFrame frame = new JFrame(gc); + if (numSSs == 0) { + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + } else { + WindowListener l = new WindowAdapter() { + public void windowClosing(WindowEvent e) { + numSSs--; + swingSets.remove(this); + } + }; + frame.addWindowListener(l); + } + return frame; + } + + + /** + * Set the status + */ + public void setStatus(String s) { + // do the following on the gui thread + SwingUtilities.invokeLater(new SwingSetRunnable(this, s) { + public void run() { + swingset.statusField.setText((String) obj); + } + }); + } + + + /** + * This method returns a string from the demo's resource bundle. + */ + public static String getString(String key) { + String value = null; + try { + value = TextAndMnemonicUtils.getTextAndMnemonicString(key); + } catch (MissingResourceException e) { + System.out.println("java.util.MissingResourceException: Couldn't find value for: " + key); + } + if(value == null) { + value = "Could not find resource: " + key + " "; + } + return value; + } + + void setDragEnabled(boolean dragEnabled) { + if (dragEnabled == this.dragEnabled) { + return; + } + + this.dragEnabled = dragEnabled; + + for (DemoModule dm : demosList) { + dm.updateDragEnabled(dragEnabled); + } + + demoSrcPane.setDragEnabled(dragEnabled); + } + + boolean isDragEnabled() { + return dragEnabled; + } + + + /** + * Returns a mnemonic from the resource bundle. Typically used as + * keyboard shortcuts in menu items. + */ + public char getMnemonic(String key) { + return (getString(key)).charAt(0); + } + + /** + * Creates an icon from an image contained in the "images" directory. + */ + public ImageIcon createImageIcon(String filename, String description) { + String path = "/resources/images/" + filename; + return new ImageIcon(getClass().getResource(path)); + } + + /** + * If DEBUG is defined, prints debug information out to std ouput. + */ + public void debug(String s) { + if(DEBUG) { + System.out.println((debugCounter++) + ": " + s); + } + } + + /** + * Stores the current L&F, and calls updateLookAndFeel, below + */ + public void setLookAndFeel(LookAndFeelData laf) { + if(!currentLookAndFeel.equals(laf)) { + currentLookAndFeel = laf; + /* The recommended way of synchronizing state between multiple + * controls that represent the same command is to use Actions. + * The code below is a workaround and will be replaced in future + * version of SwingSet2 demo. + */ + String lafName = laf.label; + themesMenu.setEnabled(laf.name.equals("Metal")); + updateLookAndFeel(); + for(int i=0;i= 0) && (x < r.width) && (y >= 0) && (y < r.height); + } + else { + return super.contains(x,y); + } + } + + public void componentAdded(ContainerEvent e) { + Container c = e.getContainer().getParent(); + if (c != null) { + c.getParent().validate(); + c.getParent().repaint(); + } + } + + public void componentRemoved(ContainerEvent e) { + Container c = e.getContainer().getParent(); + if (c != null) { + c.getParent().validate(); + c.getParent().repaint(); + } + } + } + + // ******************************************************* + // ****************** Runnables *********************** + // ******************************************************* + + /** + * Generic SwingSet2 runnable. This is intended to run on the + * AWT gui event thread so as not to muck things up by doing + * gui work off the gui thread. Accepts a SwingSet2 and an Object + * as arguments, which gives subtypes of this class the two + * "must haves" needed in most runnables for this demo. + */ + class SwingSetRunnable implements Runnable { + protected SwingSet2 swingset; + protected Object obj; + + public SwingSetRunnable(SwingSet2 swingset, Object obj) { + this.swingset = swingset; + this.obj = obj; + } + + public void run() { + } + } + + + // ******************************************************* + // ******************** Actions *********************** + // ******************************************************* + + public class SwitchToDemoAction extends AbstractAction { + SwingSet2 swingset; + DemoModule demo; + + public SwitchToDemoAction(SwingSet2 swingset, DemoModule demo) { + super(demo.getName(), demo.getIcon()); + this.swingset = swingset; + this.demo = demo; + } + + public void actionPerformed(ActionEvent e) { + swingset.setDemo(demo); + } + } + + class OkAction extends AbstractAction { + JDialog aboutBox; + + protected OkAction(JDialog aboutBox) { + super("OkAction"); + this.aboutBox = aboutBox; + } + + public void actionPerformed(ActionEvent e) { + aboutBox.setVisible(false); + } + } + + class ChangeLookAndFeelAction extends AbstractAction { + SwingSet2 swingset; + LookAndFeelData lafData; + protected ChangeLookAndFeelAction(SwingSet2 swingset, LookAndFeelData lafData) { + super("ChangeTheme"); + this.swingset = swingset; + this.lafData = lafData; + } + + public void actionPerformed(ActionEvent e) { + swingset.setLookAndFeel(lafData); + } + } + + class ActivatePopupMenuAction extends AbstractAction { + SwingSet2 swingset; + JPopupMenu popup; + protected ActivatePopupMenuAction(SwingSet2 swingset, JPopupMenu popup) { + super("ActivatePopupMenu"); + this.swingset = swingset; + this.popup = popup; + } + + public void actionPerformed(ActionEvent e) { + Dimension invokerSize = getSize(); + Dimension popupSize = popup.getPreferredSize(); + popup.show(swingset, (invokerSize.width - popupSize.width) / 2, + (invokerSize.height - popupSize.height) / 2); + } + } + + // Turns on all possible auditory feedback + class OnAudioAction extends AbstractAction { + SwingSet2 swingset; + protected OnAudioAction(SwingSet2 swingset) { + super("Audio On"); + this.swingset = swingset; + } + public void actionPerformed(ActionEvent e) { + UIManager.put("AuditoryCues.playList", + UIManager.get("AuditoryCues.allAuditoryCues")); + swingset.updateLookAndFeel(); + } + } + + // Turns on the default amount of auditory feedback + class DefaultAudioAction extends AbstractAction { + SwingSet2 swingset; + protected DefaultAudioAction(SwingSet2 swingset) { + super("Audio Default"); + this.swingset = swingset; + } + public void actionPerformed(ActionEvent e) { + UIManager.put("AuditoryCues.playList", + UIManager.get("AuditoryCues.defaultCueList")); + swingset.updateLookAndFeel(); + } + } + + // Turns off all possible auditory feedback + class OffAudioAction extends AbstractAction { + SwingSet2 swingset; + protected OffAudioAction(SwingSet2 swingset) { + super("Audio Off"); + this.swingset = swingset; + } + public void actionPerformed(ActionEvent e) { + UIManager.put("AuditoryCues.playList", + UIManager.get("AuditoryCues.noAuditoryCues")); + swingset.updateLookAndFeel(); + } + } + + // Turns on or off the tool tips for the demo. + class ToolTipAction extends AbstractAction { + protected ToolTipAction() { + super("ToolTip Control"); + } + + public void actionPerformed(ActionEvent e) { + boolean status = ((JCheckBoxMenuItem)e.getSource()).isSelected(); + ToolTipManager.sharedInstance().setEnabled(status); + } + } + + class DragSupportAction extends AbstractAction { + protected DragSupportAction() { + super("DragSupport Control"); + } + + public void actionPerformed(ActionEvent e) { + boolean dragEnabled = ((JCheckBoxMenuItem)e.getSource()).isSelected(); + if (isApplet()) { + setDragEnabled(dragEnabled); + } else { + for (SwingSet2 ss : swingSets) { + ss.setDragEnabled(dragEnabled); + } + } + } + } + + class ChangeThemeAction extends AbstractAction { + SwingSet2 swingset; + MetalTheme theme; + protected ChangeThemeAction(SwingSet2 swingset, MetalTheme theme) { + super("ChangeTheme"); + this.swingset = swingset; + this.theme = theme; + } + + public void actionPerformed(ActionEvent e) { + MetalLookAndFeel.setCurrentTheme(theme); + swingset.updateLookAndFeel(); + } + } + + class ExitAction extends AbstractAction { + SwingSet2 swingset; + protected ExitAction(SwingSet2 swingset) { + super("ExitAction"); + this.swingset = swingset; + } + + public void actionPerformed(ActionEvent e) { + System.exit(0); + } + } + + class AboutAction extends AbstractAction { + SwingSet2 swingset; + protected AboutAction(SwingSet2 swingset) { + super("AboutAction"); + this.swingset = swingset; + } + + public void actionPerformed(ActionEvent e) { + if(aboutBox == null) { + // JPanel panel = new JPanel(new BorderLayout()); + JPanel panel = new AboutPanel(swingset); + panel.setLayout(new BorderLayout()); + + aboutBox = new JDialog(swingset.getFrame(), getString("AboutBox.title"), false); + aboutBox.setResizable(false); + aboutBox.getContentPane().add(panel, BorderLayout.CENTER); + + // JButton button = new JButton(getString("AboutBox.ok_button_text")); + JPanel buttonpanel = new JPanel(); + buttonpanel.setBorder(new javax.swing.border.EmptyBorder(0, 0, 3, 0)); + buttonpanel.setOpaque(false); + JButton button = (JButton) buttonpanel.add( + new JButton(getString("AboutBox.ok_button_text")) + ); + panel.add(buttonpanel, BorderLayout.SOUTH); + + button.addActionListener(new OkAction(aboutBox)); + } + aboutBox.pack(); + if (isApplet()) { + aboutBox.setLocationRelativeTo(getApplet()); + } else { + aboutBox.setLocationRelativeTo(getFrame()); + } + aboutBox.show(); + } + } + + class MultiScreenAction extends AbstractAction { + static final int ALL_SCREENS = -1; + int screen; + protected MultiScreenAction(SwingSet2 swingset, int screen) { + super("MultiScreenAction"); + this.screen = screen; + } + + public void actionPerformed(ActionEvent e) { + GraphicsDevice[] gds = GraphicsEnvironment. + getLocalGraphicsEnvironment(). + getScreenDevices(); + if (screen == ALL_SCREENS) { + for (int i = 0; i < gds.length; i++) { + SwingSet2 swingset = new SwingSet2(null, + gds[i].getDefaultConfiguration()); + swingset.setDragEnabled(dragEnabled); + } + } + else { + SwingSet2 swingset = new SwingSet2(null, + gds[screen].getDefaultConfiguration()); + swingset.setDragEnabled(dragEnabled); + } + } + } + + // ******************************************************* + // ********************** Misc ************************* + // ******************************************************* + + class DemoLoadThread extends Thread { + SwingSet2 swingset; + + DemoLoadThread(SwingSet2 swingset) { + this.swingset = swingset; + } + + public void run() { + SwingUtilities.invokeLater(swingset::loadDemos); + } + } + + class AboutPanel extends JPanel { + ImageIcon aboutimage = null; + SwingSet2 swingset = null; + + public AboutPanel(SwingSet2 swingset) { + this.swingset = swingset; + aboutimage = swingset.createImageIcon("About.jpg", "AboutBox.accessible_description"); + setOpaque(false); + } + + public void paint(Graphics g) { + aboutimage.paintIcon(this, g, 0, 0); + super.paint(g); + } + + public Dimension getPreferredSize() { + return new Dimension(aboutimage.getIconWidth(), + aboutimage.getIconHeight()); + } + } + + + private class ChangeFontAction extends AbstractAction { + private SwingSet2 swingset; + private boolean plain; + + ChangeFontAction(SwingSet2 swingset, boolean plain) { + super("FontMenu"); + this.swingset = swingset; + this.plain = plain; + } + + public void actionPerformed(ActionEvent e) { + if (plain) { + UIManager.put("swing.boldMetal", Boolean.FALSE); + } + else { + UIManager.put("swing.boldMetal", Boolean.TRUE); + } + // Change the look and feel to force the settings to take effect. + updateLookAndFeel(); + } + } + + private static LookAndFeelData[] getInstalledLookAndFeelData() { + return Arrays.stream(UIManager.getInstalledLookAndFeels()) + .map(laf -> getLookAndFeelData(laf)) + .toArray(LookAndFeelData[]::new); + } + + private static LookAndFeelData getLookAndFeelData( + UIManager.LookAndFeelInfo info) { + switch (info.getName()) { + case "Metal": + return new LookAndFeelData(info, "java"); + case "Nimbus": + return new LookAndFeelData(info, "nimbus"); + case "Windows": + return new LookAndFeelData(info, "windows"); + case "GTK+": + return new LookAndFeelData(info, "gtk"); + case "CDE/Motif": + return new LookAndFeelData(info, "motif"); + case "Mac OS X": + return new LookAndFeelData(info, "mac"); + default: + return new LookAndFeelData(info); + } + } + + private static class LookAndFeelData { + String name; + String className; + String label; + char mnemonic; + String accDescription; + + public LookAndFeelData(UIManager.LookAndFeelInfo info) { + this(info.getName(), info.getClassName(), info.getName(), + info.getName(), info.getName()); + } + + public LookAndFeelData(UIManager.LookAndFeelInfo info, String property) { + this(info.getName(), info.getClassName(), + getString(String.format("LafMenu.%s_label", property)), + getString(String.format("LafMenu.%s_mnemonic", property)), + getString(String.format("LafMenu.%s_accessible_description", + property))); + } + + public LookAndFeelData(String name, String className, String label, + String mnemonic, String accDescription) { + this.name = name; + this.className = className; + this.label = label; + this.mnemonic = mnemonic.charAt(0); + this.accDescription = accDescription; + } + + @Override + public String toString() { + return className; + } + } +} diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/SwingSet2Applet.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/SwingSet2Applet.java Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,78 @@ +/* + * + * 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.*; + +/** + * + * + * @author Jeff Dinkins + */ + +public class SwingSet2Applet extends JApplet { + public void init() { + getContentPane().setLayout(new BorderLayout()); + getContentPane().add(new SwingSet2(this), BorderLayout.CENTER); + } + + public URL getURL(String filename) { + URL codeBase = this.getCodeBase(); + URL url = null; + + try { + url = new URL(codeBase, filename); + System.out.println(url); + } catch (java.net.MalformedURLException e) { + System.out.println("Error: badly specified URL"); + return null; + } + + return url; + } + + +} diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/TabbedPaneDemo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/TabbedPaneDemo.java Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,233 @@ +/* + * + * 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.*; + +/** + * JTabbedPane Demo + * + * @author Jeff Dinkins + */ +public class TabbedPaneDemo extends DemoModule implements ActionListener { + HeadSpin spin; + + JTabbedPane tabbedpane; + + ButtonGroup group; + + JRadioButton top; + JRadioButton bottom; + JRadioButton left; + JRadioButton right; + + /** + * main method allows us to run as a standalone demo. + */ + public static void main(String[] args) { + TabbedPaneDemo demo = new TabbedPaneDemo(null); + demo.mainImpl(); + } + + /** + * TabbedPaneDemo Constructor + */ + public TabbedPaneDemo(SwingSet2 swingset) { + // Set the title for this demo, and an icon used to represent this + // demo inside the SwingSet2 app. + super(swingset, "TabbedPaneDemo", "toolbar/JTabbedPane.gif"); + + // create tab position controls + JPanel tabControls = new JPanel(); + tabControls.add(new JLabel(getString("TabbedPaneDemo.label"))); + top = (JRadioButton) tabControls.add(new JRadioButton(getString("TabbedPaneDemo.top"))); + left = (JRadioButton) tabControls.add(new JRadioButton(getString("TabbedPaneDemo.left"))); + bottom = (JRadioButton) tabControls.add(new JRadioButton(getString("TabbedPaneDemo.bottom"))); + right = (JRadioButton) tabControls.add(new JRadioButton(getString("TabbedPaneDemo.right"))); + getDemoPanel().add(tabControls, BorderLayout.NORTH); + + group = new ButtonGroup(); + group.add(top); + group.add(bottom); + group.add(left); + group.add(right); + + top.setSelected(true); + + top.addActionListener(this); + bottom.addActionListener(this); + left.addActionListener(this); + right.addActionListener(this); + + // create tab + tabbedpane = new JTabbedPane(); + getDemoPanel().add(tabbedpane, BorderLayout.CENTER); + + String name = getString("TabbedPaneDemo.laine"); + JLabel pix = new JLabel(createImageIcon("tabbedpane/laine.jpg", name)); + tabbedpane.add(name, pix); + + name = getString("TabbedPaneDemo.ewan"); + pix = new JLabel(createImageIcon("tabbedpane/ewan.jpg", name)); + tabbedpane.add(name, pix); + + name = getString("TabbedPaneDemo.hania"); + pix = new JLabel(createImageIcon("tabbedpane/hania.jpg", name)); + tabbedpane.add(name, pix); + + name = getString("TabbedPaneDemo.bounce"); + spin = new HeadSpin(); + tabbedpane.add(name, spin); + + tabbedpane.getModel().addChangeListener( + new ChangeListener() { + public void stateChanged(ChangeEvent e) { + SingleSelectionModel model = (SingleSelectionModel) e.getSource(); + if(model.getSelectedIndex() == tabbedpane.getTabCount()-1) { + spin.go(); + } + } + } + ); + } + + public void actionPerformed(ActionEvent e) { + if(e.getSource() == top) { + tabbedpane.setTabPlacement(JTabbedPane.TOP); + } else if(e.getSource() == left) { + tabbedpane.setTabPlacement(JTabbedPane.LEFT); + } else if(e.getSource() == bottom) { + tabbedpane.setTabPlacement(JTabbedPane.BOTTOM); + } else if(e.getSource() == right) { + tabbedpane.setTabPlacement(JTabbedPane.RIGHT); + } + } + + class HeadSpin extends JComponent implements ActionListener { + javax.swing.Timer animator; + + ImageIcon icon[] = new ImageIcon[6]; + + int tmpScale; + + static final int numImages = 6; + + double x[] = new double[numImages]; + double y[] = new double[numImages]; + + int xh[] = new int[numImages]; + int yh[] = new int[numImages]; + + double scale[] = new double[numImages]; + + public HeadSpin() { + setBackground(Color.black); + icon[0] = createImageIcon("tabbedpane/ewan.gif", getString("TabbedPaneDemo.ewan")); + icon[1] = createImageIcon("tabbedpane/stephen.gif", getString("TabbedPaneDemo.stephen")); + icon[2] = createImageIcon("tabbedpane/david.gif", getString("TabbedPaneDemo.david")); + icon[3] = createImageIcon("tabbedpane/matthew.gif", getString("TabbedPaneDemo.matthew")); + icon[4] = createImageIcon("tabbedpane/blake.gif", getString("TabbedPaneDemo.blake")); + icon[5] = createImageIcon("tabbedpane/brooke.gif", getString("TabbedPaneDemo.brooke")); + + /* + for(int i = 0; i < 6; i++) { + x[i] = (double) rand.nextInt(500); + y[i] = (double) rand.nextInt(500); + } + */ + } + + public void go() { + animator = new javax.swing.Timer(22 + 22 + 22, this); + animator.start(); + } + + public void paint(Graphics g) { + g.setColor(getBackground()); + g.fillRect(0, 0, getWidth(), getHeight()); + + for(int i = 0; i < numImages; i++) { + if(x[i] > 3*i) { + nudge(i); + squish(g, icon[i], xh[i], yh[i], scale[i]); + } else { + x[i] += .05; + y[i] += .05; + } + } + } + + Random rand = new Random(); + + public void nudge(int i) { + x[i] += (double) rand.nextInt(1000) / 8756; + y[i] += (double) rand.nextInt(1000) / 5432; + int tmpScale = (int) (Math.abs(Math.sin(x[i])) * 10); + scale[i] = (double) tmpScale / 10; + int nudgeX = (int) (((double) getWidth()/2) * .8); + int nudgeY = (int) (((double) getHeight()/2) * .60); + xh[i] = (int) (Math.sin(x[i]) * nudgeX) + nudgeX; + yh[i] = (int) (Math.sin(y[i]) * nudgeY) + nudgeY; + } + + public void squish(Graphics g, ImageIcon icon, int x, int y, double scale) { + if(isVisible()) { + g.drawImage(icon.getImage(), x, y, + (int) (icon.getIconWidth()*scale), + (int) (icon.getIconHeight()*scale), + this); + } + } + + public void actionPerformed(ActionEvent e) { + if(isVisible()) { + repaint(); + } else { + animator.stop(); + } + } + } +} diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/TableDemo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/TableDemo.java Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,741 @@ +/* + * + * 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.table.*; +import javax.swing.border.*; +import javax.swing.colorchooser.*; +import javax.swing.filechooser.*; +import javax.accessibility.*; + +import java.awt.*; +import java.awt.event.*; +import java.awt.print.PrinterException; +import java.beans.*; +import java.util.*; +import java.io.*; +import java.applet.*; +import java.net.*; + +import java.text.MessageFormat; + +/** + * Table demo + * + * @author Philip Milne + * @author Steve Wilson + */ +public class TableDemo extends DemoModule { + JTable tableView; + JScrollPane scrollpane; + Dimension origin = new Dimension(0, 0); + + JCheckBox isColumnReorderingAllowedCheckBox; + JCheckBox showHorizontalLinesCheckBox; + JCheckBox showVerticalLinesCheckBox; + + JCheckBox isColumnSelectionAllowedCheckBox; + JCheckBox isRowSelectionAllowedCheckBox; + + JLabel interCellSpacingLabel; + JLabel rowHeightLabel; + + JSlider interCellSpacingSlider; + JSlider rowHeightSlider; + + JComboBox selectionModeComboBox = null; + JComboBox resizeModeComboBox = null; + + JLabel headerLabel; + JLabel footerLabel; + + JTextField headerTextField; + JTextField footerTextField; + + JCheckBox fitWidth; + JButton printButton; + + JPanel controlPanel; + JScrollPane tableAggregate; + + String path = "food/"; + + final int INITIAL_ROWHEIGHT = 33; + + /** + * main method allows us to run as a standalone demo. + */ + public static void main(String[] args) { + TableDemo demo = new TableDemo(null); + demo.mainImpl(); + } + + /** + * TableDemo Constructor + */ + public TableDemo(SwingSet2 swingset) { + super(swingset, "TableDemo", "toolbar/JTable.gif"); + + getDemoPanel().setLayout(new BorderLayout()); + controlPanel = new JPanel(); + controlPanel.setLayout(new BoxLayout(controlPanel, BoxLayout.X_AXIS)); + JPanel cbPanel = new JPanel(new GridLayout(3, 2)); + JPanel labelPanel = new JPanel(new GridLayout(2, 1)) { + public Dimension getMaximumSize() { + return new Dimension(getPreferredSize().width, super.getMaximumSize().height); + } + }; + JPanel sliderPanel = new JPanel(new GridLayout(2, 1)) { + public Dimension getMaximumSize() { + return new Dimension(getPreferredSize().width, super.getMaximumSize().height); + } + }; + JPanel comboPanel = new JPanel(new GridLayout(2, 1)); + JPanel printPanel = new JPanel(new ColumnLayout()); + + getDemoPanel().add(controlPanel, BorderLayout.NORTH); + Vector relatedComponents = new Vector(); + + + // check box panel + isColumnReorderingAllowedCheckBox = new JCheckBox(getString("TableDemo.reordering_allowed"), true); + isColumnReorderingAllowedCheckBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + boolean flag = ((JCheckBox)e.getSource()).isSelected(); + tableView.getTableHeader().setReorderingAllowed(flag); + tableView.repaint(); + } + }); + + showHorizontalLinesCheckBox = new JCheckBox(getString("TableDemo.horz_lines"), true); + showHorizontalLinesCheckBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + boolean flag = ((JCheckBox)e.getSource()).isSelected(); + tableView.setShowHorizontalLines(flag); ; + tableView.repaint(); + } + }); + + showVerticalLinesCheckBox = new JCheckBox(getString("TableDemo.vert_lines"), true); + showVerticalLinesCheckBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + boolean flag = ((JCheckBox)e.getSource()).isSelected(); + tableView.setShowVerticalLines(flag); ; + tableView.repaint(); + } + }); + + // Show that showHorizontal/Vertical controls are related + relatedComponents.removeAllElements(); + relatedComponents.add(showHorizontalLinesCheckBox); + relatedComponents.add(showVerticalLinesCheckBox); + buildAccessibleGroup(relatedComponents); + + isRowSelectionAllowedCheckBox = new JCheckBox(getString("TableDemo.row_selection"), true); + isRowSelectionAllowedCheckBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + boolean flag = ((JCheckBox)e.getSource()).isSelected(); + tableView.setRowSelectionAllowed(flag); ; + tableView.repaint(); + } + }); + + isColumnSelectionAllowedCheckBox = new JCheckBox(getString("TableDemo.column_selection"), false); + isColumnSelectionAllowedCheckBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + boolean flag = ((JCheckBox)e.getSource()).isSelected(); + tableView.setColumnSelectionAllowed(flag); ; + tableView.repaint(); + } + }); + + // Show that row/column selections are related + relatedComponents.removeAllElements(); + relatedComponents.add(isColumnSelectionAllowedCheckBox); + relatedComponents.add(isRowSelectionAllowedCheckBox); + buildAccessibleGroup(relatedComponents); + + cbPanel.add(isColumnReorderingAllowedCheckBox); + cbPanel.add(isRowSelectionAllowedCheckBox); + cbPanel.add(showHorizontalLinesCheckBox); + cbPanel.add(isColumnSelectionAllowedCheckBox); + cbPanel.add(showVerticalLinesCheckBox); + + + // label panel + interCellSpacingLabel = new JLabel(getString("TableDemo.intercell_spacing_colon")); + labelPanel.add(interCellSpacingLabel); + + rowHeightLabel = new JLabel(getString("TableDemo.row_height_colon")); + labelPanel.add(rowHeightLabel); + + + // slider panel + interCellSpacingSlider = new JSlider(JSlider.HORIZONTAL, 0, 10, 1); + interCellSpacingSlider.getAccessibleContext().setAccessibleName(getString("TableDemo.intercell_spacing")); + interCellSpacingLabel.setLabelFor(interCellSpacingSlider); + sliderPanel.add(interCellSpacingSlider); + interCellSpacingSlider.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + int spacing = ((JSlider)e.getSource()).getValue(); + tableView.setIntercellSpacing(new Dimension(spacing, spacing)); + tableView.repaint(); + } + }); + + rowHeightSlider = new JSlider(JSlider.HORIZONTAL, 5, 100, INITIAL_ROWHEIGHT); + rowHeightSlider.getAccessibleContext().setAccessibleName(getString("TableDemo.row_height")); + rowHeightLabel.setLabelFor(rowHeightSlider); + sliderPanel.add(rowHeightSlider); + rowHeightSlider.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + int height = ((JSlider)e.getSource()).getValue(); + tableView.setRowHeight(height); + tableView.repaint(); + } + }); + + // Show that spacing controls are related + relatedComponents.removeAllElements(); + relatedComponents.add(interCellSpacingSlider); + relatedComponents.add(rowHeightSlider); + buildAccessibleGroup(relatedComponents); + + + // Create the table. + tableAggregate = createTable(); + getDemoPanel().add(tableAggregate, BorderLayout.CENTER); + + + // ComboBox for selection modes. + JPanel selectMode = new JPanel(); + selectMode.setLayout(new BoxLayout(selectMode, BoxLayout.X_AXIS)); + selectMode.setBorder(new TitledBorder(getString("TableDemo.selection_mode"))); + + + selectionModeComboBox = new JComboBox() { + public Dimension getMaximumSize() { + return getPreferredSize(); + } + }; + selectionModeComboBox.addItem(getString("TableDemo.single")); + selectionModeComboBox.addItem(getString("TableDemo.one_range")); + selectionModeComboBox.addItem(getString("TableDemo.multiple_ranges")); + selectionModeComboBox.setSelectedIndex(tableView.getSelectionModel().getSelectionMode()); + selectionModeComboBox.addItemListener(new ItemListener() { + public void itemStateChanged(ItemEvent e) { + JComboBox source = (JComboBox)e.getSource(); + tableView.setSelectionMode(source.getSelectedIndex()); + } + }); + + selectMode.add(Box.createHorizontalStrut(2)); + selectMode.add(selectionModeComboBox); + selectMode.add(Box.createHorizontalGlue()); + comboPanel.add(selectMode); + + // Combo box for table resize mode. + JPanel resizeMode = new JPanel(); + resizeMode.setLayout(new BoxLayout(resizeMode, BoxLayout.X_AXIS)); + resizeMode.setBorder(new TitledBorder(getString("TableDemo.autoresize_mode"))); + + + resizeModeComboBox = new JComboBox() { + public Dimension getMaximumSize() { + return getPreferredSize(); + } + }; + resizeModeComboBox.addItem(getString("TableDemo.off")); + resizeModeComboBox.addItem(getString("TableDemo.column_boundaries")); + resizeModeComboBox.addItem(getString("TableDemo.subsequent_columns")); + resizeModeComboBox.addItem(getString("TableDemo.last_column")); + resizeModeComboBox.addItem(getString("TableDemo.all_columns")); + resizeModeComboBox.setSelectedIndex(tableView.getAutoResizeMode()); + resizeModeComboBox.addItemListener(new ItemListener() { + public void itemStateChanged(ItemEvent e) { + JComboBox source = (JComboBox)e.getSource(); + tableView.setAutoResizeMode(source.getSelectedIndex()); + } + }); + + resizeMode.add(Box.createHorizontalStrut(2)); + resizeMode.add(resizeModeComboBox); + resizeMode.add(Box.createHorizontalGlue()); + comboPanel.add(resizeMode); + + // print panel + printPanel.setBorder(new TitledBorder(getString("TableDemo.printing"))); + headerLabel = new JLabel(getString("TableDemo.header")); + footerLabel = new JLabel(getString("TableDemo.footer")); + headerTextField = new JTextField(getString("TableDemo.headerText"), 15); + footerTextField = new JTextField(getString("TableDemo.footerText"), 15); + fitWidth = new JCheckBox(getString("TableDemo.fitWidth"), true); + printButton = new JButton(getString("TableDemo.print")); + printButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent ae) { + printTable(); + } + }); + + printPanel.add(headerLabel); + printPanel.add(headerTextField); + printPanel.add(footerLabel); + printPanel.add(footerTextField); + + JPanel buttons = new JPanel(); + buttons.add(fitWidth); + buttons.add(printButton); + + printPanel.add(buttons); + + // Show that printing controls are related + relatedComponents.removeAllElements(); + relatedComponents.add(headerTextField); + relatedComponents.add(footerTextField); + relatedComponents.add(printButton); + buildAccessibleGroup(relatedComponents); + + // wrap up the panels and add them + JPanel sliderWrapper = new JPanel(); + sliderWrapper.setLayout(new BoxLayout(sliderWrapper, BoxLayout.X_AXIS)); + sliderWrapper.add(labelPanel); + sliderWrapper.add(sliderPanel); + sliderWrapper.add(Box.createHorizontalGlue()); + sliderWrapper.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0)); + + JPanel leftWrapper = new JPanel(); + leftWrapper.setLayout(new BoxLayout(leftWrapper, BoxLayout.Y_AXIS)); + leftWrapper.add(cbPanel); + leftWrapper.add(sliderWrapper); + + // add everything + controlPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 2, 0)); + controlPanel.add(leftWrapper); + controlPanel.add(comboPanel); + controlPanel.add(printPanel); + + setTableControllers(); // Set accessibility information + + getDemoPanel().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) + .put(KeyStroke.getKeyStroke("ctrl P"), "print"); + + getDemoPanel().getActionMap().put("print", new AbstractAction() { + public void actionPerformed(ActionEvent ae) { + printTable(); + } + }); + + } // TableDemo() + + /** + * Sets the Accessibility MEMBER_OF property to denote that + * these components work together as a group. Each object + * is set to be a MEMBER_OF an array that contains all of + * the objects in the group, including itself. + * + * @param components The list of objects that are related + */ + void buildAccessibleGroup(Vector components) { + + AccessibleContext context = null; + int numComponents = components.size(); + Object[] group = components.toArray(); + Object object = null; + for (int i = 0; i < numComponents; ++i) { + object = components.elementAt(i); + if (object instanceof Accessible) { + context = ((Accessible)components.elementAt(i)). + getAccessibleContext(); + context.getAccessibleRelationSet().add( + new AccessibleRelation( + AccessibleRelation.MEMBER_OF, group)); + } + } + } // buildAccessibleGroup() + + /** + * This sets CONTROLLER_FOR on the controls that manipulate the + * table and CONTROLLED_BY relationships on the table to point + * back to the controllers. + */ + private void setTableControllers() { + + // Set up the relationships to show what controls the table + setAccessibleController(isColumnReorderingAllowedCheckBox, + tableAggregate); + setAccessibleController(showHorizontalLinesCheckBox, + tableAggregate); + setAccessibleController(showVerticalLinesCheckBox, + tableAggregate); + setAccessibleController(isColumnSelectionAllowedCheckBox, + tableAggregate); + setAccessibleController(isRowSelectionAllowedCheckBox, + tableAggregate); + setAccessibleController(interCellSpacingSlider, + tableAggregate); + setAccessibleController(rowHeightSlider, + tableAggregate); + setAccessibleController(selectionModeComboBox, + tableAggregate); + setAccessibleController(resizeModeComboBox, + tableAggregate); + } // setTableControllers() + + /** + * Sets up accessibility relationships to denote that one + * object controls another. The CONTROLLER_FOR property is + * set on the controller object, and the CONTROLLED_BY + * property is set on the target object. + */ + private void setAccessibleController(JComponent controller, + JComponent target) { + AccessibleRelationSet controllerRelations = + controller.getAccessibleContext().getAccessibleRelationSet(); + AccessibleRelationSet targetRelations = + target.getAccessibleContext().getAccessibleRelationSet(); + + controllerRelations.add( + new AccessibleRelation( + AccessibleRelation.CONTROLLER_FOR, target)); + targetRelations.add( + new AccessibleRelation( + AccessibleRelation.CONTROLLED_BY, controller)); + } // setAccessibleController() + + public JScrollPane createTable() { + + // final + final String[] names = { + getString("TableDemo.first_name"), + getString("TableDemo.last_name"), + getString("TableDemo.favorite_color"), + getString("TableDemo.favorite_movie"), + getString("TableDemo.favorite_number"), + getString("TableDemo.favorite_food") + }; + + ImageIcon apple = createImageIcon("food/apple.jpg", getString("TableDemo.apple")); + ImageIcon asparagus = createImageIcon("food/asparagus.gif", getString("TableDemo.asparagus")); + ImageIcon banana = createImageIcon("food/banana.gif", getString("TableDemo.banana")); + ImageIcon broccoli = createImageIcon("food/broccoli.gif", getString("TableDemo.broccoli")); + ImageIcon cantaloupe = createImageIcon("food/cantaloupe.gif", getString("TableDemo.cantaloupe")); + ImageIcon carrot = createImageIcon("food/carrot.gif", getString("TableDemo.carrot")); + ImageIcon corn = createImageIcon("food/corn.gif", getString("TableDemo.corn")); + ImageIcon grapes = createImageIcon("food/grapes.gif", getString("TableDemo.grapes")); + ImageIcon grapefruit = createImageIcon("food/grapefruit.gif", getString("TableDemo.grapefruit")); + ImageIcon kiwi = createImageIcon("food/kiwi.gif", getString("TableDemo.kiwi")); + ImageIcon onion = createImageIcon("food/onion.gif", getString("TableDemo.onion")); + ImageIcon pear = createImageIcon("food/pear.gif", getString("TableDemo.pear")); + ImageIcon peach = createImageIcon("food/peach.gif", getString("TableDemo.peach")); + ImageIcon pepper = createImageIcon("food/pepper.gif", getString("TableDemo.pepper")); + ImageIcon pickle = createImageIcon("food/pickle.gif", getString("TableDemo.pickle")); + ImageIcon pineapple = createImageIcon("food/pineapple.gif", getString("TableDemo.pineapple")); + ImageIcon raspberry = createImageIcon("food/raspberry.gif", getString("TableDemo.raspberry")); + ImageIcon sparegrass = createImageIcon("food/asparagus.gif", getString("TableDemo.sparegrass")); + ImageIcon strawberry = createImageIcon("food/strawberry.gif", getString("TableDemo.strawberry")); + ImageIcon tomato = createImageIcon("food/tomato.gif", getString("TableDemo.tomato")); + ImageIcon watermelon = createImageIcon("food/watermelon.gif", getString("TableDemo.watermelon")); + + NamedColor aqua = new NamedColor(new Color(127, 255, 212), getString("TableDemo.aqua")); + NamedColor beige = new NamedColor(new Color(245, 245, 220), getString("TableDemo.beige")); + NamedColor black = new NamedColor(Color.black, getString("TableDemo.black")); + NamedColor blue = new NamedColor(new Color(0, 0, 222), getString("TableDemo.blue")); + NamedColor eblue = new NamedColor(Color.blue, getString("TableDemo.eblue")); + NamedColor jfcblue = new NamedColor(new Color(204, 204, 255), getString("TableDemo.jfcblue")); + NamedColor jfcblue2 = new NamedColor(new Color(153, 153, 204), getString("TableDemo.jfcblue2")); + NamedColor cybergreen = new NamedColor(Color.green.darker().brighter(), getString("TableDemo.cybergreen")); + NamedColor darkgreen = new NamedColor(new Color(0, 100, 75), getString("TableDemo.darkgreen")); + NamedColor forestgreen = new NamedColor(Color.green.darker(), getString("TableDemo.forestgreen")); + NamedColor gray = new NamedColor(Color.gray, getString("TableDemo.gray")); + NamedColor green = new NamedColor(Color.green, getString("TableDemo.green")); + NamedColor orange = new NamedColor(new Color(255, 165, 0), getString("TableDemo.orange")); + NamedColor purple = new NamedColor(new Color(160, 32, 240), getString("TableDemo.purple")); + NamedColor red = new NamedColor(Color.red, getString("TableDemo.red")); + NamedColor rustred = new NamedColor(Color.red.darker(), getString("TableDemo.rustred")); + NamedColor sunpurple = new NamedColor(new Color(100, 100, 255), getString("TableDemo.sunpurple")); + NamedColor suspectpink = new NamedColor(new Color(255, 105, 180), getString("TableDemo.suspectpink")); + NamedColor turquoise = new NamedColor(new Color(0, 255, 255), getString("TableDemo.turquoise")); + NamedColor violet = new NamedColor(new Color(238, 130, 238), getString("TableDemo.violet")); + NamedColor yellow = new NamedColor(Color.yellow, getString("TableDemo.yellow")); + + // Create the dummy data (a few rows of names) + final Object[][] data = { + {"Mike", "Albers", green, getString("TableDemo.brazil"), new Double(44.0), strawberry}, + {"Mark", "Andrews", blue, getString("TableDemo.curse"), new Double(3), grapes}, + {"Brian", "Beck", black, getString("TableDemo.bluesbros"), new Double(2.7182818285), raspberry}, + {"Lara", "Bunni", red, getString("TableDemo.airplane"), new Double(15), strawberry}, + {"Roger", "Brinkley", blue, getString("TableDemo.man"), new Double(13), peach}, + {"Brent", "Christian", black, getString("TableDemo.bladerunner"), new Double(23), broccoli}, + {"Mark", "Davidson", darkgreen, getString("TableDemo.brazil"), new Double(27), asparagus}, + {"Jeff", "Dinkins", blue, getString("TableDemo.ladyvanishes"), new Double(8), kiwi}, + {"Ewan", "Dinkins", yellow, getString("TableDemo.bugs"), new Double(2), strawberry}, + {"Amy", "Fowler", violet, getString("TableDemo.reservoir"), new Double(3), raspberry}, + {"Hania", "Gajewska", purple, getString("TableDemo.jules"), new Double(5), raspberry}, + {"David", "Geary", blue, getString("TableDemo.pulpfiction"), new Double(3), watermelon}, +// {"James", "Gosling", pink, getString("TableDemo.tennis"), new Double(21), donut}, + {"Eric", "Hawkes", blue, getString("TableDemo.bladerunner"), new Double(.693), pickle}, + {"Shannon", "Hickey", green, getString("TableDemo.shawshank"), new Double(2), grapes}, + {"Earl", "Johnson", green, getString("TableDemo.pulpfiction"), new Double(8), carrot}, + {"Robi", "Khan", green, getString("TableDemo.goodfellas"), new Double(89), apple}, + {"Robert", "Kim", blue, getString("TableDemo.mohicans"), new Double(655321), strawberry}, + {"Janet", "Koenig", turquoise, getString("TableDemo.lonestar"), new Double(7), peach}, + {"Jeff", "Kesselman", blue, getString("TableDemo.stuntman"), new Double(17), pineapple}, + {"Onno", "Kluyt", orange, getString("TableDemo.oncewest"), new Double(8), broccoli}, + {"Peter", "Korn", sunpurple, getString("TableDemo.musicman"), new Double(12), sparegrass}, + + {"Rick", "Levenson", black, getString("TableDemo.harold"), new Double(1327), raspberry}, + {"Brian", "Lichtenwalter", jfcblue, getString("TableDemo.fifthelement"), new Double(22), pear}, + {"Malini", "Minasandram", beige, getString("TableDemo.joyluck"), new Double(9), corn}, + {"Michael", "Martak", green, getString("TableDemo.city"), new Double(3), strawberry}, + {"David", "Mendenhall", forestgreen, getString("TableDemo.schindlerslist"), new Double(7), peach}, + {"Phil", "Milne", suspectpink, getString("TableDemo.withnail"), new Double(3), banana}, + {"Lynn", "Monsanto", cybergreen, getString("TableDemo.dasboot"), new Double(52), peach}, + {"Hans", "Muller", rustred, getString("TableDemo.eraserhead"), new Double(0), pineapple}, + {"Joshua", "Outwater", blue, getString("TableDemo.labyrinth"), new Double(3), pineapple}, + {"Tim", "Prinzing", blue, getString("TableDemo.firstsight"), new Double(69), pepper}, + {"Raj", "Premkumar", jfcblue2, getString("TableDemo.none"), new Double(7), broccoli}, + {"Howard", "Rosen", green, getString("TableDemo.defending"), new Double(7), strawberry}, + {"Ray", "Ryan", black, getString("TableDemo.buckaroo"), + new Double(3.141592653589793238462643383279502884197169399375105820974944), banana}, + {"Georges", "Saab", aqua, getString("TableDemo.bicycle"), new Double(290), cantaloupe}, + {"Tom", "Santos", blue, getString("TableDemo.spinaltap"), new Double(241), pepper}, + {"Rich", "Schiavi", blue, getString("TableDemo.repoman"), new Double(0xFF), pepper}, + {"Nancy", "Schorr", green, getString("TableDemo.fifthelement"), new Double(47), watermelon}, + {"Keith", "Sprochi", darkgreen, getString("TableDemo.2001"), new Double(13), watermelon}, + {"Matt", "Tucker", eblue, getString("TableDemo.starwars"), new Double(2), broccoli}, + {"Dmitri", "Trembovetski", red, getString("TableDemo.aliens"), new Double(222), tomato}, + {"Scott", "Violet", violet, getString("TableDemo.raiders"), new Double(-97), banana}, + {"Kathy", "Walrath", darkgreen, getString("TableDemo.thinman"), new Double(8), pear}, + {"Nathan", "Walrath", black, getString("TableDemo.chusingura"), new Double(3), grapefruit}, + {"Steve", "Wilson", green, getString("TableDemo.raiders"), new Double(7), onion}, + {"Kathleen", "Zelony", gray, getString("TableDemo.dog"), new Double(13), grapes} + }; + + // Create a model of the data. + TableModel dataModel = new AbstractTableModel() { + public int getColumnCount() { return names.length; } + public int getRowCount() { return data.length;} + public Object getValueAt(int row, int col) {return data[row][col];} + public String getColumnName(int column) {return names[column];} + public Class getColumnClass(int c) {return getValueAt(0, c).getClass();} + public boolean isCellEditable(int row, int col) {return col != 5;} + public void setValueAt(Object aValue, int row, int column) { data[row][column] = aValue; } + }; + + + // Create the table + tableView = new JTable(dataModel); + TableRowSorter sorter = new TableRowSorter(dataModel); + tableView.setRowSorter(sorter); + + // Show colors by rendering them in their own color. + DefaultTableCellRenderer colorRenderer = new DefaultTableCellRenderer() { + public void setValue(Object value) { + if (value instanceof NamedColor) { + NamedColor c = (NamedColor) value; + setBackground(c); + setForeground(c.getTextColor()); + setText(c.toString()); + } else { + super.setValue(value); + } + } + }; + + // Create a combo box to show that you can use one in a table. + JComboBox comboBox = new JComboBox(); + comboBox.addItem(aqua); + comboBox.addItem(beige); + comboBox.addItem(black); + comboBox.addItem(blue); + comboBox.addItem(eblue); + comboBox.addItem(jfcblue); + comboBox.addItem(jfcblue2); + comboBox.addItem(cybergreen); + comboBox.addItem(darkgreen); + comboBox.addItem(forestgreen); + comboBox.addItem(gray); + comboBox.addItem(green); + comboBox.addItem(orange); + comboBox.addItem(purple); + comboBox.addItem(red); + comboBox.addItem(rustred); + comboBox.addItem(sunpurple); + comboBox.addItem(suspectpink); + comboBox.addItem(turquoise); + comboBox.addItem(violet); + comboBox.addItem(yellow); + + TableColumn colorColumn = tableView.getColumn(getString("TableDemo.favorite_color")); + // Use the combo box as the editor in the "Favorite Color" column. + colorColumn.setCellEditor(new DefaultCellEditor(comboBox)); + + colorRenderer.setHorizontalAlignment(JLabel.CENTER); + colorColumn.setCellRenderer(colorRenderer); + + tableView.setRowHeight(INITIAL_ROWHEIGHT); + + scrollpane = new JScrollPane(tableView); + return scrollpane; + } + + private void printTable() { + MessageFormat headerFmt; + MessageFormat footerFmt; + JTable.PrintMode printMode = fitWidth.isSelected() ? + JTable.PrintMode.FIT_WIDTH : + JTable.PrintMode.NORMAL; + + String text; + text = headerTextField.getText(); + if (text != null && text.length() > 0) { + headerFmt = new MessageFormat(text); + } else { + headerFmt = null; + } + + text = footerTextField.getText(); + if (text != null && text.length() > 0) { + footerFmt = new MessageFormat(text); + } else { + footerFmt = null; + } + + try { + boolean status = tableView.print(printMode, headerFmt, footerFmt); + + if (status) { + JOptionPane.showMessageDialog(tableView.getParent(), + getString("TableDemo.printingComplete"), + getString("TableDemo.printingResult"), + JOptionPane.INFORMATION_MESSAGE); + } else { + JOptionPane.showMessageDialog(tableView.getParent(), + getString("TableDemo.printingCancelled"), + getString("TableDemo.printingResult"), + JOptionPane.INFORMATION_MESSAGE); + } + } catch (PrinterException pe) { + String errorMessage = MessageFormat.format(getString("TableDemo.printingFailed"), + new Object[] {pe.getMessage()}); + JOptionPane.showMessageDialog(tableView.getParent(), + errorMessage, + getString("TableDemo.printingResult"), + JOptionPane.ERROR_MESSAGE); + } catch (SecurityException se) { + String errorMessage = MessageFormat.format(getString("TableDemo.printingFailed"), + new Object[] {se.getMessage()}); + JOptionPane.showMessageDialog(tableView.getParent(), + errorMessage, + getString("TableDemo.printingResult"), + JOptionPane.ERROR_MESSAGE); + } + } + + class NamedColor extends Color { + String name; + public NamedColor(Color color, String name) { + super(color.getRGB()); + this.name = name; + } + + public Color getTextColor() { + int r = getRed(); + int g = getGreen(); + int b = getBlue(); + if(r > 240 || g > 240) { + return Color.black; + } else { + return Color.white; + } + } + + public String toString() { + return name; + } + } + + class ColumnLayout implements LayoutManager { + int xInset = 5; + int yInset = 5; + int yGap = 2; + + public void addLayoutComponent(String s, Component c) {} + + public void layoutContainer(Container c) { + Insets insets = c.getInsets(); + int height = yInset + insets.top; + + Component[] children = c.getComponents(); + Dimension compSize = null; + for (int i = 0; i < children.length; i++) { + compSize = children[i].getPreferredSize(); + children[i].setSize(compSize.width, compSize.height); + children[i].setLocation( xInset + insets.left, height); + height += compSize.height + yGap; + } + + } + + public Dimension minimumLayoutSize(Container c) { + Insets insets = c.getInsets(); + int height = yInset + insets.top; + int width = 0 + insets.left + insets.right; + + Component[] children = c.getComponents(); + Dimension compSize = null; + for (int i = 0; i < children.length; i++) { + compSize = children[i].getPreferredSize(); + height += compSize.height + yGap; + width = Math.max(width, compSize.width + insets.left + insets.right + xInset*2); + } + height += insets.bottom; + return new Dimension( width, height); + } + + public Dimension preferredLayoutSize(Container c) { + return minimumLayoutSize(c); + } + + public void removeLayoutComponent(Component c) {} + } + + void updateDragEnabled(boolean dragEnabled) { + tableView.setDragEnabled(dragEnabled); + headerTextField.setDragEnabled(dragEnabled); + footerTextField.setDragEnabled(dragEnabled); + } + +} diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/TextAndMnemonicUtils.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/TextAndMnemonicUtils.java Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,193 @@ +/* + * + * Copyright (c) 2012, 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 java.io.IOException; +import java.util.Properties; +import java.util.ResourceBundle; + +/** + * 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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/ToolTipDemo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/ToolTipDemo.java Mon Apr 09 14:27:42 2018 +0100 @@ -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("
" + + getString("ToolTipDemo.moo") + "
"); + moo = true; + milk = false; + tail = false; + } + } else if((x > 150) && (x < 260) && (y > 90) && (y < 145)) { + if(!milk) { + setToolTipText("
" + + getString("ToolTipDemo.got_milk") + "
"); + milk = true; + moo = false; + tail = false; + } + } else if((x > 280) && (x < 300) && (y > 20) && (y < 175)) { + if(!tail) { + setToolTipText("" + getString("ToolTipDemo.tail") + ""); + tail = true; + moo = false; + milk = false; + } + } else if(moo || milk || tail) { + setToolTipText(getString("ToolTipDemo.tooltip_features")); + moo = false; + tail = false; + milk = false; + } + + return true; + } + } + +} diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/TreeDemo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/TreeDemo.java Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,138 @@ +/* + * + * 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.tree.*; +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.*; + +/** + * JTree Demo + * + * @author Jeff Dinkins + */ +public class TreeDemo extends DemoModule { + + JTree tree; + + /** + * main method allows us to run as a standalone demo. + */ + public static void main(String[] args) { + TreeDemo demo = new TreeDemo(null); + demo.mainImpl(); + } + + /** + * TreeDemo Constructor + */ + public TreeDemo(SwingSet2 swingset) { + // Set the title for this demo, and an icon used to represent this + // demo inside the SwingSet2 app. + super(swingset, "TreeDemo", "toolbar/JTree.gif"); + + getDemoPanel().add(createTree(), BorderLayout.CENTER); + } + + public JScrollPane createTree() { + DefaultMutableTreeNode top = new DefaultMutableTreeNode(getString("TreeDemo.music")); + DefaultMutableTreeNode catagory = null ; + DefaultMutableTreeNode artist = null; + DefaultMutableTreeNode record = null; + + // open tree data + URL url = getClass().getResource("/resources/tree.txt"); + + try { + // convert url to buffered string + InputStream is = url.openStream(); + InputStreamReader isr = new InputStreamReader(is, "UTF-8"); + BufferedReader reader = new BufferedReader(isr); + + // read one line at a time, put into tree + String line = reader.readLine(); + while(line != null) { + // System.out.println("reading in: ->" + line + "<-"); + char linetype = line.charAt(0); + switch(linetype) { + case 'C': + catagory = new DefaultMutableTreeNode(line.substring(2)); + top.add(catagory); + break; + case 'A': + if(catagory != null) { + catagory.add(artist = new DefaultMutableTreeNode(line.substring(2))); + } + break; + case 'R': + if(artist != null) { + artist.add(record = new DefaultMutableTreeNode(line.substring(2))); + } + break; + case 'S': + if(record != null) { + record.add(new DefaultMutableTreeNode(line.substring(2))); + } + break; + default: + break; + } + line = reader.readLine(); + } + } catch (IOException e) { + } + + tree = new JTree(top) { + public Insets getInsets() { + return new Insets(5,5,5,5); + } + }; + + tree.setEditable(true); + + return new JScrollPane(tree); + } + + void updateDragEnabled(boolean dragEnabled) { + tree.setDragEnabled(dragEnabled); + } + +} diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/ant.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/resources/ant.html Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,121 @@ + + +Untitled Document + + + + +


+ Observ. XLIX. Of an Ant or Pismire.
+

+

+

 

+
+
+

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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/bug.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/resources/bug.html Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,128 @@ + + +Untitled Document + + + + +
+

Observ. LIV. Of a Louse.
+

+

+

 

+
+
+

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.

+
+

 

+

+

 

+

 

+
+ + diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/About.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/About.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/Octavo/CREDITS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/resources/images/Octavo/CREDITS Mon Apr 09 14:27:42 2018 +0100 @@ -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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/Octavo/ant.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/ant.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/Octavo/book.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/book.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/Octavo/bug.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/bug.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/Octavo/bug2.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/bug2.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/Octavo/crest.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/crest.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/Octavo/king.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/king.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/Octavo/micro.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/micro.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/Octavo/seaweed.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/Octavo/seaweed.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/b1.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b1.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/b1d.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b1d.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/b1p.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b1p.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/b1r.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b1r.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/b2.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b2.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/b2d.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b2d.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/b2p.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b2p.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/b2r.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b2r.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/b3.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b3.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/b3d.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b3d.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/b3p.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b3p.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/b3r.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/b3r.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/bl.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/bl.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/bldn.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/bldn.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/bm.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/bm.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/bmdn.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/bmdn.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/br.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/br.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/brdn.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/brdn.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/c.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/c.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/cb.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/cb.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/cbr.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/cbr.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/cbrs.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/cbrs.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/cbs.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/cbs.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/cdn.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/cdn.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/ml.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/ml.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/mldn.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/mldn.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/mr.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/mr.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/mrdn.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/mrdn.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/rb.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/rb.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/rbp.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/rbp.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/rbr.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/rbr.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/rbrs.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/rbrs.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/rbs.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/rbs.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/tl.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/tl.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/tldn.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/tldn.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/tm.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/tm.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/tmdn.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/tmdn.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/toggle.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/toggle.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/toggledn.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/toggledn.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/tr.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/tr.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/buttons/trdn.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/buttons/trdn.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/brenteyes.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/brenteyes.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/brenthair.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/brenthair.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/brentmouth.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/brentmouth.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/georgeseyes.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/georgeseyes.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/georgeshair.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/georgeshair.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/georgesmouth.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/georgesmouth.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/hanseyes.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/hanseyes.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/hanshair.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/hanshair.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/hansmouth.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/hansmouth.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/howardeyes.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/howardeyes.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/howardhair.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/howardhair.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/howardmouth.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/howardmouth.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/jameseyes.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jameseyes.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/jameshair.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jameshair.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/jamesmouth.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jamesmouth.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffeyes.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffeyes.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffhair.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffhair.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffmouth.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jeffmouth.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/joneyes.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/joneyes.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/jonhair.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jonhair.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/jonmouth.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/jonmouth.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/laraeyes.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/laraeyes.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/larahair.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/larahair.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/laramouth.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/laramouth.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/larryeyes.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/larryeyes.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/larryhair.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/larryhair.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/larrymouth.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/larrymouth.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/lisaeyes.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/lisaeyes.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/lisahair.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/lisahair.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/lisamouth.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/lisamouth.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/michaeleyes.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/michaeleyes.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/michaelhair.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/michaelhair.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/michaelmouth.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/michaelmouth.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/philipeyes.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/philipeyes.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/philiphair.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/philiphair.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/philipmouth.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/philipmouth.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/scotteyes.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/scotteyes.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/scotthair.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/scotthair.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/combobox/scottmouth.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/combobox/scottmouth.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/filechooser/find.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/filechooser/find.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/filechooser/gifIcon.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/filechooser/gifIcon.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/filechooser/help.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/filechooser/help.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/filechooser/jpgIcon.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/filechooser/jpgIcon.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/apple.jpeg Binary file src/demo/share/jfc/SwingSet2/resources/images/food/apple.jpeg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/apple.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/food/apple.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/asparagus.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/asparagus.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/banana.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/banana.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/broccoli.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/broccoli.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/cantaloupe.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/cantaloupe.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/carrot.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/carrot.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/corn.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/corn.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/grapefruit.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/grapefruit.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/grapes.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/grapes.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/kiwi.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/kiwi.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/onion.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/onion.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/peach.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/peach.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/pear.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/pear.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/pepper.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/pepper.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/pickle.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/pickle.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/pineapple.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/pineapple.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/raspberry.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/raspberry.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/strawberry.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/strawberry.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/tomato.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/tomato.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/food/watermelon.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/food/watermelon.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/htmldemo/back.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/htmldemo/back.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/htmldemo/forward.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/htmldemo/forward.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/htmldemo/header.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/htmldemo/header.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/list/blue.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/list/blue.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/list/cyan.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/list/cyan.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/list/gray.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/list/gray.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/list/green.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/list/green.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/list/magenta.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/list/magenta.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/list/red.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/list/red.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/list/yellow.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/list/yellow.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/misc/cab.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/cab.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/misc/cab_small.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/cab_small.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/misc/duchess.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/duchess.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/misc/duchess_small.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/duchess_small.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/misc/duke.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/duke.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/misc/duke_small.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/duke_small.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/misc/toast.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/toast.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/misc/toast_small.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/misc/toast_small.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/optionpane/bottle.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/optionpane/bottle.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/optionpane/ibd.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/optionpane/ibd.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/optionpane/ibu.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/optionpane/ibu.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/scrollpane/COPYRIGHT --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/resources/images/scrollpane/COPYRIGHT Mon Apr 09 14:27:42 2018 +0100 @@ -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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/scrollpane/colheader.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/scrollpane/colheader.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/scrollpane/crayons.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/scrollpane/crayons.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/scrollpane/lowerleft.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/scrollpane/lowerleft.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/scrollpane/rowheader.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/scrollpane/rowheader.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/scrollpane/upperleft.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/scrollpane/upperleft.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/scrollpane/upperright.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/scrollpane/upperright.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/splash.png Binary file src/demo/share/jfc/SwingSet2/resources/images/splash.png has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/splitpane/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/resources/images/splitpane/README Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,4 @@ + + All images in this directory were obtained from NASA at: + http://www.nasa.gov + diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/splitpane/earth.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/splitpane/earth.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/splitpane/moon.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/splitpane/moon.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/blake.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/blake.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/brooke.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/brooke.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/david.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/david.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/ewan.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/ewan.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/ewan.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/ewan.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/hania.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/hania.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/laine.jpg Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/laine.jpg has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/matthew.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/matthew.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/stephen.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/tabbedpane/stephen.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JButton.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JButton.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JColorChooser.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JColorChooser.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JComboBox.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JComboBox.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JDesktop.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JDesktop.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JDialog.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JDialog.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JEditorPane.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JEditorPane.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JFileChooser.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JFileChooser.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JList.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JList.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JMenu.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JMenu.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JOptionPane.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JOptionPane.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JProgressBar.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JProgressBar.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JRadioButton.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JRadioButton.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JScrollBar.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JScrollBar.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JScrollPane.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JScrollPane.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JSlider.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JSlider.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JSplitPane.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JSplitPane.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTabbedPane.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTabbedPane.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTable.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTable.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTree.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/JTree.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/toolbar/ToolTip.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/toolbar/ToolTip.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/images/tooltip/cow.gif Binary file src/demo/share/jfc/SwingSet2/resources/images/tooltip/cow.gif has changed diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/resources/index.html Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,42 @@ + + +Untitled Document + + + + +

 

+

+

+

 

+

 

+
+

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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/king.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/resources/king.html Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,45 @@ + + +Untitled Document + + + + +

+

+

 

+
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. +

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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/preface.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/resources/preface.html Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,115 @@ + + +Untitled Document + + + + +
+

 

+

THE PREFACE

+
+
+

 

+

 

+
+
+
+

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 -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/seaweed.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/resources/seaweed.html Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,62 @@ + + +Untitled Document + + + + +


+ Observ. XXIII. Of the curious texture of Sea-weeds.
+

+

+

 

+
+

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.

+

 

+

+

 

+

 

+
+ + diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/swingset.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/resources/swingset.properties Mon Apr 09 14:27:42 2018 +0100 @@ -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=Three! + +ButtonDemo.radio1=Radio One +ButtonDemo.radio2=Radio Two +ButtonDemo.radio3=Radio Three +ButtonDemo.radioX=Three(HTML!) + +ButtonDemo.check1=One +ButtonDemo.check2=Two +ButtonDemo.check3=Three +ButtonDemo.checkX=Three(HTML!) + +ButtonDemo.customradio=A custom "chrome" radio button. +ButtonDemo.customcheck=A custom lightbulb checkbox. + +ButtonDemo.phone=Phone +ButtonDemo.write=Write +ButtonDemo.peace=Peace + +ButtonDemo.controlpanel.labelAndMnemonic=Display Options: +ButtonDemo.paintborder.labelAndMnemonic=Paint &Border +ButtonDemo.paintborder_tooltip=Click here to turn border painting on or off. +ButtonDemo.paintfocus.labelAndMnemonic=Paint &Focus +ButtonDemo.paintfocus_tooltip=Click here to turn focus painting on or off. +ButtonDemo.enabled.labelAndMnemonic=&Enabled +ButtonDemo.enabled_tooltip=Click here to enable or disable the buttons. +ButtonDemo.contentfilled.labelAndMnemonic=Content F&illed +ButtonDemo.contentfilled_tooltip=Click here to control the filling of the content area. + +ButtonDemo.padamount.labelAndMnemonic=Pad Amount: +ButtonDemo.default.labelAndMnemonic=&Default +ButtonDemo.default_tooltip=Uses the default padding between the border and label. +ButtonDemo.zero.labelAndMnemonic=&0 +ButtonDemo.zero_tooltip=Uses no padding between the border and label. +ButtonDemo.ten.labelAndMnemonic=&10 +ButtonDemo.ten_tooltip=Uses a 10 pixel pad between the border and label. + +LayoutControlPanel.textposition.labelAndMnemonic=Text Position: +LayoutControlPanel.contentalignment.labelAndMnemonic=Content Alignment: + +### ColorChooser Demo ### + +ColorChooserDemo.accessible_description=The ColorChooser allows a user to pick a color either from a pallete or by choosing RGB or HSB values +ColorChooserDemo.tooltip=JColorChooser demo +ColorChooserDemo.name=ColorChooser Demo +ColorChooserDemo.chooser_title=Choose a Color +ColorChooserDemo.background=Background +ColorChooserDemo.grad_a=Gradient 1 +ColorChooserDemo.grad_b=Gradient 2 +ColorChooserDemo.outer_line=Perimeter +ColorChooserDemo.cup=Image of the Java Trademark Coffee Cup + +### ComboBox Demo ### + +ComboBoxDemo.accessible_description=This demo shows an example of using the JComboBox component. +ComboBoxDemo.tooltip=JComboBox demo +ComboBoxDemo.name=ComboBox Demo + +ComboBoxDemo.hair=hair +ComboBoxDemo.eyes=eyes +ComboBoxDemo.mouth=mouth +ComboBoxDemo.presets=Presets: + +ComboBoxDemo.preset1=Philip, Howard, Jeff +ComboBoxDemo.preset2=Jeff, Larry, Philip +ComboBoxDemo.preset3=Howard, Scott, Hans +ComboBoxDemo.preset4=Philip, Jeff, Hans +ComboBoxDemo.preset5=Brent, Jon, Scott +ComboBoxDemo.preset6=Lara, Larry, Lisa +ComboBoxDemo.preset7=James, Philip, Michael +ComboBoxDemo.preset8=Philip, Lisa, Brent +ComboBoxDemo.preset9=James, Philip, Jon +ComboBoxDemo.preset10=Lara, Jon, Scott + + +ComboBoxDemo.hair_description=Hair: +ComboBoxDemo.eyes_description=Eyes && Nose: +ComboBoxDemo.mouth_description=Mouth: + +ComboBoxDemo.amy=Amy +ComboBoxDemo.brent=Brent +ComboBoxDemo.georges=Georges +ComboBoxDemo.hans=Hans +ComboBoxDemo.howard=Howard +ComboBoxDemo.james=James +ComboBoxDemo.jeff=Jeff +ComboBoxDemo.jon=Jon +ComboBoxDemo.lara=Lara +ComboBoxDemo.larry=Larry +ComboBoxDemo.lisa=Lisa +ComboBoxDemo.michael=Michael +ComboBoxDemo.philip=Philip +ComboBoxDemo.scott=Scott + +### FileChooser Demo ### + +FileChooserDemo.accessible_description=The FileChooser allows a user to select a file, usually for opening or creating/saving. +FileChooserDemo.tooltip=JFileChooser demo +FileChooserDemo.name=FileChooser Demo + +FileChooserDemo.plainbutton=Show Plain JFileChooser +FileChooserDemo.previewbutton=Show Preview JFileChooser +FileChooserDemo.custombutton=Show Custom JFileChooser + +FileChooserDemo.description=\ +&  &  Note that you can easily create your own custom FileChooser
\ +&  &  with as many components as you like. \ + + +FileChooserDemo.filterdescription=JPEG and GIF Image Files + +FileChooserDemo.nofileselected=Please select a file first. +FileChooserDemo.thefile=the file: +FileChooserDemo.isprobably=is probably an image. + +FileChooserDemo.helptext=\ +Find: Find a file.
\ +About: Learn more about the file.
\ +OK: Choose that file.
\ +Cancel: Exit this dialog without doing anything.\ + + +FileChooserDemo.findquestion=Find File: +FileChooserDemo.findresponse=
\ +You really want me to find a file?!?
\ +I don't know how to do that! I'm just a demo!\ +
+ +FileChooserDemo.dialogtitle=Custom Layout FileChooser +FileChooserDemo.help=Help +FileChooserDemo.find=Find +FileChooserDemo.ok=OK +FileChooserDemo.about=About +FileChooserDemo.cancel=Cancel + +### Html Demo ### + +HtmlDemo.accessible_description=This demo shows how to display html text using the JEditorPane component. +HtmlDemo.tooltip=JEditorPane HTML demo +HtmlDemo.name=JEditorPane HTML Demo +HtmlDemo.filename=swing.html + + +### Internal Frame Demo ### + +InternalFrameDemo.accessible_description=JInternal Frame Demo +InternalFrameDemo.create_frames.labelAndMnemonic=Create Customized Internal Frames +InternalFrameDemo.title_text_field.labelAndMnemonic=Frame title: +InternalFrameDemo.frame.labelAndMnemonic=Frame +InternalFrameDemo.palette.labelAndMnemonic=Internal Frame Generator +InternalFrameDemo.name=Internal Frames Demo +InternalFrameDemo.tooltip=JInternalFrame demo +InternalFrameDemo.closable.labelAndMnemonic=Closable +InternalFrameDemo.resizable.labelAndMnemonic=Resizable +InternalFrameDemo.iconifiable.labelAndMnemonic=Iconifiable +InternalFrameDemo.maximizable.labelAndMnemonic=Maximizable +InternalFrameDemo.toast=Cheers +InternalFrameDemo.duke=Your Grace! +InternalFrameDemo.duchess=Duchess +InternalFrameDemo.cab=Anyone need a Taxi? + + +### List Demo ### + +ListDemo.accessible_description=JList Demo +ListDemo.name=List Demo +ListDemo.tooltip=JList demo +ListDemo.prefixes=Prefixes +ListDemo.suffixes=Suffixes +ListDemo.count.labelAndMnemonic=Number of generated list entries: +ListDemo.all=All +ListDemo.none=None +ListDemo.red=Red Company Logo Image +ListDemo.yellow=Red Company Logo Image +ListDemo.blue=Blue Company Logo Image +ListDemo.gray=Gray Company Logo Image +ListDemo.green=Green Company Logo Image +ListDemo.magenta=Magenta Company Logo Image +ListDemo.cyan=Cyan Company Logo Image +ListDemo.description=

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.

+ +OptionPaneDemo.messagetext=Message in a Bottle (yeah) + +OptionPaneDemo.confirmquestion=Is the sun shining outside today? +OptionPaneDemo.confirmyes=Well what are you doing playing on the computer?
Get outside! Take a trip to the beach! Get a little sun! +OptionPaneDemo.confirmno=Well good thing you're inside protected from the elements! + +OptionPaneDemo.inputquestion=What is your favorite movie? +OptionPaneDemo.inputresponse=That was a pretty good movie! + +OptionPaneDemo.componenttitle=Component Dialog Example +OptionPaneDemo.componentmessage=JOptionPane can contain as many components
as you want, such as a text field: +OptionPaneDemo.componenttextfield=or a combobox: +OptionPaneDemo.component_cb1=item 1 +OptionPaneDemo.component_cb2=item 2 +OptionPaneDemo.component_cb3=item 3 +OptionPaneDemo.componentmessage2=JOptionPane can also show as many options
as you want: +OptionPaneDemo.component_op1=Yes +OptionPaneDemo.component_op2=No +OptionPaneDemo.component_op3=Maybe +OptionPaneDemo.component_op4=Probably +OptionPaneDemo.component_op5=Cancel + +OptionPaneDemo.component_r1=Upbeat and positive! I like that! Good choice. +OptionPaneDemo.component_r2=Definitely not, I wouldn't do it either. +OptionPaneDemo.component_r3= Mmmm.. yes, the situation is unclear at this
time. Check back when you know for sure.
+OptionPaneDemo.component_r4=You know you want to. I think you should
have gone for broke and pressed "Yes".
+ +### ProgressBar Demo ### + +ProgressBarDemo.accessible_description=This demo shows an example of using the JProgressBar component. +ProgressBarDemo.tooltip=JProgressBar demo +ProgressBarDemo.name=ProgressBar Demo +ProgressBarDemo.start_button=Start Loading Text +ProgressBarDemo.stop_button=Stop Loading Text +ProgressBarDemo.accessible_text_loading_progress=Text loading progress +ProgressBarDemo.accessible_text_area_name=Text progressively being loaded in + +ProgressBarDemo.accessible_text_area_description=This JTextArea is being filled with text from a buffer progressively a character at a time while the progress bar a the bottom of the window shows the loading progress + +ProgressBarDemo.text=\ +The saying goes: if an infinite number of monkeys typed on an infinite number of typewriters, eventually \n\ +all the great works of mankind would emerge. Now, with today's high speed computers, we can finally test \n\ +this theory... \n\n\ +\tLzskd jfy 92y;ho4 th;qlh sd 6yty;q2 hnlj 8sdf. Djfy 92y;ho4, th;qxhz d7yty; \n\ +\tQ0hnlj 23&&^ (# ljask djf y92y; fy92y; Sd6y ty;q2h nl jk la gfa harvin garvel\n\ +\tlasdfsd a83sl la8z ks8l 92y;ho4 th;qlh sd 6yty;q2 hnlj 8sdf. Djfy 92y;ho4,\n\ +\tth;qxhz d7yty; Q0hnlj 23&&^ nknod mrs88 jsd79lfm#%$JLaoz6df lso7dj f2 jfls\n\ +\t67d9ol1@2fou99s 1lkj2 @l.k1 2; a89o7aljf 1l3i7ou8 d8l3 lqwerty0092 #1!\n\ +\tja9o do8lkjj139rojsd9**!l6*hd # ljasd78 l2awkjad78 3ol7asljf 3 ldif && l.js\n\ +\tLl ls ewan la8uj 23lll7u 8l 3h hhxx8 8d lsd fixx 891lkjno99sl d8l@@@!!8#8\n\ +\tdfoil jarooda mklaoorj nowai the smisthliylka jkdlfjiw ladajadra lthhheeejfjl\n\ +\tdkddooolda bub mirznod of the koojgaf!! But 2 be or not to be... that is the\n\ +\tquestion. Then when shall we three meet again In thunder, lightning, or in\n\ +\train? When the hurlyburly's done, When the battle's lost and won. That will\n\ +\tbe ere the set of sun. Where the place? Upon the heath. There to meet with\n\ +\tMacbeth. But hath forth not to want..... a banana, or to be.... a banana.\n\ +\tBanana, I knew him banana. Banana banana. Banana banana banana banana.\n\ +\n\ +\n\ +\n\ +\n\ +Well... hmm.... it seemed like a good idea... + + +### ScrollPane Demo ### + +ScrollPaneDemo.accessible_description=JScrollPane Demo +ScrollPaneDemo.name=Scroll Pane Demo +ScrollPaneDemo.tooltip=JScrollPane demo +ScrollPaneDemo.crayons=Lots of Crayons +ScrollPaneDemo.colheader=Column Header +ScrollPaneDemo.rowheader=Row Header +ScrollPaneDemo.upperleft=Upper Left Corner +ScrollPaneDemo.upperright=Upper Right Column Header Corner +ScrollPaneDemo.lowerleft=Lower Left Row Header Corner + + +### Slider Demo ### + +SliderDemo.accessible_description=This demo shows an example of using the JSlider component. +SliderDemo.tooltip=JSlider demo +SliderDemo.name=Slider Demo + +SliderDemo.slidervalue=Slider Value: +SliderDemo.horizontal=Horizontal +SliderDemo.vertical=Vertical +SliderDemo.plain=Plain +SliderDemo.a_plain_slider=A Plain Slider +SliderDemo.majorticks=Major Ticks +SliderDemo.majorticksdescription=A slider showing major tick marks +SliderDemo.ticks=Minor Ticks, Snap-to-ticks and Labels +SliderDemo.minorticks=Minor Ticks +SliderDemo.minorticksdescription=A slider showing major and minor tick marks, with slider action snapping to tick marks, with some ticks visibly labeled +SliderDemo.disabled=Disabled +SliderDemo.disableddescription=A slider showing major and minor tick marks that is not enabled (cannot be manipulated + +### SplitPane Demo ### + +SplitPaneDemo.accessible_description=JSplitPane Demo +SplitPaneDemo.name=Split Pane Demo +SplitPaneDemo.tooltip=JSplitPane demo +SplitPaneDemo.earth=Mother Earth +SplitPaneDemo.moon=An Astranaut on the Moon +SplitPaneDemo.vert_split.labelAndMnemonic=&Vertically Split +SplitPaneDemo.horz_split.labelAndMnemonic=Ho&rizontally Split +SplitPaneDemo.cont_layout.labelAndMnemonic=&Continuous Layout +SplitPaneDemo.one_touch_expandable.labelAndMnemonic=&One-Touch expandable +SplitPaneDemo.divider_size.labelAndMnemonic=Divider Si&ze +SplitPaneDemo.invalid_divider_size=Invalid Divider Size +SplitPaneDemo.error=Error +SplitPaneDemo.first_component_min_size.labelAndMnemonic=F&irst Component's Minimum Size +SplitPaneDemo.second_component_min_size.labelAndMnemonic=Seco&nd Component's Minimum Size +SplitPaneDemo.invalid_min_size=Invalid Minimum Size +SplitPaneDemo.must_be_greater_than=must be greater than + + +### TabbedPane Demo ### + +TabbedPaneDemo.accessible_description=This demo shows an example of using the JTabbedPane component. +TabbedPaneDemo.tooltip=JTabbedPane demo +TabbedPaneDemo.name=TabbedPane Demo + +TabbedPaneDemo.bounce=
Bouncing Babies!
+TabbedPaneDemo.stephen=Stephen +TabbedPaneDemo.david=David +TabbedPaneDemo.matthew=Matthew +TabbedPaneDemo.ewan=Ewan +TabbedPaneDemo.blake=Blake +TabbedPaneDemo.brooke=Brooke +TabbedPaneDemo.laine=Laine +TabbedPaneDemo.hania=Hania + +TabbedPaneDemo.label=Tab Placement: +TabbedPaneDemo.top=Top +TabbedPaneDemo.bottom=Bottom +TabbedPaneDemo.left=Left +TabbedPaneDemo.right=Right + + +### Table Demo ### + +TableDemo.accessible_description=JTable Demo +TableDemo.name=Table Demo +TableDemo.tooltip=JTable demo +TableDemo.all_columns=All columns +TableDemo.autoresize_mode=Autoresize mode +TableDemo.cell_selection=Cell selection +TableDemo.column_boundaries=Column boundaries +TableDemo.column_selection=Column selection +TableDemo.horz_lines=Horiz. Lines +TableDemo.intercell_spacing=Inter-cell spacing +TableDemo.intercell_spacing_colon=Inter-cell spacing: +TableDemo.last_column=Last column +TableDemo.multiple_ranges=Multiple ranges +TableDemo.one_range=One range +TableDemo.reordering_allowed=Reordering allowed +TableDemo.row_height=Row height +TableDemo.row_height_colon=Row height: +TableDemo.row_selection=Row selection +TableDemo.selection_mode=Selection mode +TableDemo.subsequent_columns=Subsequent columns +TableDemo.vert_lines=Vert. Lines +TableDemo.single=Single +TableDemo.none=None +TableDemo.off=Off +TableDemo.first_name=First Name +TableDemo.last_name=Last Name +TableDemo.favorite_color=Favorite Color +TableDemo.favorite_food=Favorite Food +TableDemo.favorite_movie=Favorite Movie +TableDemo.favorite_number=Favorite Number +TableDemo.aqua=Aqua +TableDemo.beige=Beige +TableDemo.black=Black +TableDemo.blue=Blue +TableDemo.cybergreen=Cyber Green +TableDemo.darkgreen=Dark Green +TableDemo.eblue=Electric Blue +TableDemo.jfcblue=JFC Primary +TableDemo.jfcblue2=JFC Secondary +TableDemo.forestgreen=Forest Green +TableDemo.gray=Gray +TableDemo.green=Green +TableDemo.orange=Orange +TableDemo.purple=Purple +TableDemo.red=Red +TableDemo.rustred=Rust Red +TableDemo.sunpurple=Sun Purple +TableDemo.suspectpink=Suspect Pink +TableDemo.turquoise=Turquoise +TableDemo.violet=Violet +TableDemo.yellow=Yellow +TableDemo.2001=2001: A Space Odyssey +TableDemo.buckaroo=The Adventures of Buckaroo Banzai Across the 8th Dimension +TableDemo.firstsight=At First Sight +TableDemo.airplane=Airplane (the whole series) +TableDemo.aliens=Aliens +TableDemo.bicycle=The Bicycle Thief +TableDemo.bladerunner=Blade Runner (Director's Cut) +TableDemo.bluesbros=The Blues Brothers +TableDemo.brazil=Brazil +TableDemo.bugs=A Bug's Life +TableDemo.city=City of Lost Children +TableDemo.chusingura=Chusingura (1962) +TableDemo.clock=A Clockwork Orange +TableDemo.curse=Curse of the Demon +TableDemo.dasboot=Das Boot +TableDemo.dazed=Dazed and Confused +TableDemo.defending=Defending Your Life +TableDemo.eraserhead=Eraserhead +TableDemo.fifthelement=The Fifth Element +TableDemo.goodfellas=Goodfellas +TableDemo.harold=Harold && Maude +TableDemo.joyluck=The Joy Luck Club +TableDemo.jules=Jules et Jim +TableDemo.ladyvanishes=The Lady Vanishes +TableDemo.mohicans=The Last of the Mohicans +TableDemo.lonestar=Lone Star +TableDemo.man=The Man Who Knew Too Much +TableDemo.musicman=The Music Man +TableDemo.dog=My Life as a Dog +TableDemo.oncewest=Once Upon A Time In The West +TableDemo.pulpfiction=Pulp Fiction +TableDemo.raiders=Raiders of the Lost Ark +TableDemo.reservoir=Reservoir Dogs +TableDemo.repoman=Repo Man +TableDemo.spinaltap=This is Spinal Tap +TableDemo.schindlerslist=Schindler's List +TableDemo.starwars=Star Wars +TableDemo.stuntman=The Stuntman +TableDemo.thinman=The Thin Man +TableDemo.withnail=Withnail && I +TableDemo.labyrinth=Labyrinth +TableDemo.shawshank=The Shawshank Redemption +TableDemo.apple=Apple +TableDemo.asparagus=Asparagus +TableDemo.banana=Banana +TableDemo.broccoli=Broccoli +TableDemo.carrot=Carrot +TableDemo.cantaloupe=Cantaloupe +TableDemo.corn=Corn +TableDemo.grapes=Grapes +TableDemo.grapefruit=Grapefruit +TableDemo.kiwi=Kiwi +TableDemo.onion=Onion +TableDemo.pear=Pear +TableDemo.peach=Peach +TableDemo.pepper=Red Pepper +TableDemo.pickle=Pickle +TableDemo.pineapple=Pineapple +TableDemo.raspberry=Raspberry +TableDemo.sparegrass=Spare Grass +TableDemo.strawberry=Strawberry +TableDemo.tomato=Tomato +TableDemo.watermelon=Watermelon + +TableDemo.printing=Printing +TableDemo.fitWidth=Fit Width +TableDemo.print=Print +TableDemo.header=Header + +# This string will be formatted by a MessageFormat and +# printed at the top of each page of the printed result. +# You can use {0} to insert a page number. +TableDemo.headerText=JTable Printing + +TableDemo.footer=Footer + +# This string will be formatted by a MessageFormat and +# printed at the bottom of each page of the printed result. +# You can use {0} to insert a page number. +TableDemo.footerText=Page {0} + +TableDemo.printingResult=Printing Result +TableDemo.printingComplete=Printing Complete +TableDemo.printingCancelled=Printing Cancelled + +# This string will be formatted by a MessageFormat and +# and displayed when an exception occurs. +# {0} is used to place details of the exception. +TableDemo.printingFailed=Printing Failed: {0} + + +### ToolTip Demo ### + +ToolTipDemo.accessible_description=ToolTips show short help descriptions for a component +ToolTipDemo.accessible_cow=This is a Cow. +ToolTipDemo.tooltip=ToolTip demo +ToolTipDemo.name=ToolTip Demo +ToolTipDemo.bessie=Bessie The Cow +ToolTipDemo.cow=Cow. +ToolTipDemo.got_milk=Got Milk? +ToolTipDemo.tail=tail. +ToolTipDemo.moo=Mooooooo +ToolTipDemo.tooltip_features=In case you thought that tooltips had to be

boring, one line descriptions, the Swing! team

is happy to shatter your illusions.

In Swing, they can use HTML to

  • Have Lists
  • Bold text
  • emphasized text
  • text with Color
  • text in different sizes
  • and Fonts
Oh, and they can be multi-line, too. + + +### Tree Demo ### + +TreeDemo.accessible_description=This demo shows shows a sample usage of a JTree component. +TreeDemo.tooltip=JTree demo +TreeDemo.name=Tree Demo +TreeDemo.music=Music + diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/swingset_ja.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/resources/swingset_ja.properties Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,644 @@ +# 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=Swing\u306B\u3064\u3044\u3066 +AboutBox.ok_button_text=OK +AboutBox.accessible_description=Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + +### Source Code ### +SourceCode.loading=\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9\u306E\u8AAD\u8FBC\u307F\u304A\u3088\u3073\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u4E2D\u3067\u3059\u3002\u5C11\u3005\u304A\u5F85\u3061\u304F\u3060\u3055\u3044... + +### Status ### + +Status.loading=\u8AAD\u8FBC\u307F\u4E2D: +Status.popupMenuAccessible=Shift+F10: \u30DD\u30C3\u30D7\u30A2\u30C3\u30D7\u30FB\u30E1\u30CB\u30E5\u30FC\u306E\u6709\u52B9\u5316 + +### Menu Bar ### + +MenuBar.accessible_description=Swing\u30C7\u30E2\u30FB\u30E1\u30CB\u30E5\u30FC\u30FB\u30D0\u30FC + + +### Frame ### + +Frame.title=SwingSet2 + + +### Tabbed Pane ### + +TabbedPane.src.labelAndMnemonic=\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9 +TabbedPane.src_tooltip=\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9\u306E\u53C2\u7167 + + +### Look & Feel Menu ### + +LafMenu.laf.labelAndMnemonic=\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB(&L) +LafMenu.laf_accessible_description=\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB\u3092\u5207\u308A\u66FF\u3048\u3089\u308C\u308B\u30E1\u30CB\u30E5\u30FC + +LafMenu.java.labelAndMnemonic=Java\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB(&J) +LafMenu.java_accessible_description=Java\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB + +LafMenu.nimbus.labelAndMnemonic=Nimbus\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB(&N) +LafMenu.nimbus_accessible_description=Nimbus\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB + +LafMenu.mac.labelAndMnemonic=Mac OS X\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB(&M) +LafMenu.mac_accessible_description=Mac OS X\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB + +LafMenu.motif.labelAndMnemonic=Motif\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB(&O) +LafMenu.motif_accessible_description=Motif\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB + +LafMenu.windows.labelAndMnemonic=Windows\u30B9\u30BF\u30A4\u30EB\u30FB\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB(&W) +LafMenu.windows_accessible_description=Windows\u30B9\u30BF\u30A4\u30EB\u30FB\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB + +LafMenu.gtk.labelAndMnemonic=GTK\u30B9\u30BF\u30A4\u30EB\u30FB\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB(&G) +LafMenu.gtk_accessible_description=GTK\u30B9\u30BF\u30A4\u30EB\u30FB\u30EB\u30C3\u30AF&&\u30D5\u30A3\u30FC\u30EB + + +### Themes Menu ### + +ThemesMenu.themes.labelAndMnemonic=\u30C6\u30FC\u30DE(&T) +ThemesMenu.themes_accessible_description=Metal\u30C6\u30FC\u30DE\u306E\u30AB\u30E9\u30FC\u5207\u66FF\u3048\u30E1\u30CB\u30E5\u30FC + +ThemesMenu.aqua.labelAndMnemonic=\u30A2\u30AF\u30A2(&Q) +ThemesMenu.aqua_accessible_description=\u9752\u7DD1\u3092\u57FA\u8ABF\u3068\u3057\u305FMetal\u30C6\u30FC\u30DE + +ThemesMenu.charcoal.labelAndMnemonic=\u30C1\u30E3\u30B3\u30FC\u30EB(&C) +ThemesMenu.charcoal_accessible_description=\u30C0\u30FC\u30AF\u30FB\u30B0\u30EC\u30FC\u3092\u57FA\u8ABF\u3068\u3057\u305FMetal\u30C6\u30FC\u30DE + +ThemesMenu.contrast.labelAndMnemonic=\u30CF\u30A4\u30FB\u30B3\u30F3\u30C8\u30E9\u30B9\u30C8(&H) +ThemesMenu.contrast_accessible_description=\u30CF\u30A4\u30FB\u30B3\u30F3\u30C8\u30E9\u30B9\u30C8\u306E\u30C6\u30FC\u30DE + +ThemesMenu.ocean.labelAndMnemonic=\u30AA\u30FC\u30B7\u30E3\u30F3(&O) +ThemesMenu.ocean_accessible_description=\u30AA\u30FC\u30B7\u30E3\u30F3\u306EMetal\u30C6\u30FC\u30DE + +ThemesMenu.steel.labelAndMnemonic=\u30B9\u30C1\u30FC\u30EB(&S) +ThemesMenu.steel_accessible_description=\u9752\u7D2B\u306EMetal\u30C6\u30FC\u30DE + +ThemesMenu.emerald.labelAndMnemonic=\u30A8\u30E1\u30E9\u30EB\u30C9(&E) +ThemesMenu.emerald_accessible_description=\u7DD1\u3092\u57FA\u8ABF\u3068\u3057\u305FMetal\u30C6\u30FC\u30DE + +ThemesMenu.ruby.labelAndMnemonic=\u30EB\u30D3\u30FC(&R) +ThemesMenu.ruby_accessible_description=\u8D64\u3092\u57FA\u8ABF\u3068\u3057\u305FMetal\u30C6\u30FC\u30DE + + +### Font SubMenu (under Themes) +FontMenu.fonts.labelAndMnemonic=\u30D5\u30A9\u30F3\u30C8(&F) +FontMenu.fonts_accessible_description=Java\u30EB\u30C3\u30AF&\u30D5\u30A3\u30FC\u30EB\u7528\u306E\u30D5\u30A9\u30F3\u30C8\u9078\u629E\u30E1\u30CB\u30E5\u30FC + +FontMenu.bold.labelAndMnemonic=\u592A\u5B57(&B) +FontMenu.bold_accessible_description=Java\u30EB\u30C3\u30AF&\u30D5\u30A3\u30FC\u30EB\u306B\u592A\u5B57\u30D5\u30A9\u30F3\u30C8\u3092\u4F7F\u7528\u3057\u307E\u3059 + +FontMenu.plain.labelAndMnemonic=\u30D7\u30EC\u30FC\u30F3(&P) +FontMenu.plain_accessible_description=Java\u30EB\u30C3\u30AF&\u30D5\u30A3\u30FC\u30EB\u306B\u30D7\u30EC\u30FC\u30F3\u30FB\u30D5\u30A9\u30F3\u30C8\u3092\u4F7F\u7528\u3057\u307E\u3059 + + +### Audio SubMenu (under Themes) ### + +AudioMenu.audio.labelAndMnemonic=\u30AA\u30FC\u30C7\u30A3\u30AA(&A) +AudioMenu.audio_accessible_description=Java\u30EB\u30C3\u30AF&\u30D5\u30A3\u30FC\u30EB\u5185\u3067\u306E\u52B9\u679C\u97F3\u306E\u5207\u66FF\u3048\u30E1\u30CB\u30E5\u30FC + +AudioMenu.on.labelAndMnemonic=\u6642\u9593(&O) +AudioMenu.on_accessible_description=Java\u30EB\u30C3\u30AF&\u30D5\u30A3\u30FC\u30EB\u306E\u3059\u3079\u3066\u306E\u52B9\u679C\u97F3\u3092\u30AA\u30F3\u306B\u3057\u307E\u3059 + +AudioMenu.default.labelAndMnemonic=\u30C7\u30D5\u30A9\u30EB\u30C8(&D) +AudioMenu.default_accessible_description=Java\u30EB\u30C3\u30AF&\u30D5\u30A3\u30FC\u30EB\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u52B9\u679C\u97F3\u306E\u8A2D\u5B9A\u306B\u623B\u3057\u307E\u3059 + +AudioMenu.off.labelAndMnemonic=\u30AA\u30D5(&F) +AudioMenu.off_accessible_description=Java\u30EB\u30C3\u30AF&\u30D5\u30A3\u30FC\u30EB\u306E\u3059\u3079\u3066\u306E\u52B9\u679C\u97F3\u3092\u30AA\u30D5\u306B\u3057\u307E\u3059 + +### Options Menu ### + +OptionsMenu.options.labelAndMnemonic=\u30AA\u30D7\u30B7\u30E7\u30F3(&P) +OptionsMenu.options_accessible_description=\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u9078\u629E\u30E1\u30CB\u30E5\u30FC + +OptionsMenu.tooltip.labelAndMnemonic=\u30C4\u30FC\u30EB\u30FB\u30C1\u30C3\u30D7\u306E\u6709\u52B9\u5316(&T) +OptionsMenu.tooltip_accessible_description=\u30C4\u30FC\u30EB\u30FB\u30C1\u30C3\u30D7\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3057\u307E\u3059 + +OptionsMenu.dragEnabled.labelAndMnemonic=\u30C9\u30E9\u30C3\u30B0\u306E\u6709\u52B9\u5316(&D) +OptionsMenu.dragEnabled_accessible_description=\u30C9\u30E9\u30C3\u30B0\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3057\u307E\u3059 + +### File Menu ### + +FileMenu.file.labelAndMnemonic=\u30D5\u30A1\u30A4\u30EB(&F) +FileMenu.accessible_description=\u30D5\u30A1\u30A4\u30EB\u30FB\u30E1\u30CB\u30E5\u30FC +FileMenu.about.labelAndMnemonic=\u60C5\u5831(&B) +FileMenu.about_accessible_description=SwingSet2\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u8A73\u7D30\u3092\u78BA\u8A8D\u3057\u307E\u3059 +FileMenu.open.labelAndMnemonic=\u958B\u304F(&O) +FileMenu.open_accessible_description=\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304F\u305F\u3081\u306E\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FB\u30E1\u30CB\u30E5\u30FC\u9805\u76EE +FileMenu.save.labelAndMnemonic=\u4FDD\u5B58(&S) +FileMenu.save_accessible_description=\u30D5\u30A1\u30A4\u30EB\u3092\u4FDD\u5B58\u3059\u308B\u305F\u3081\u306E\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FB\u30E1\u30CB\u30E5\u30FC\u9805\u76EE +FileMenu.save_as.labelAndMnemonic=\u5225\u540D\u4FDD\u5B58(&A)... +FileMenu.save_as_accessible_description=\u30D5\u30A1\u30A4\u30EB\u3092\u5225\u540D\u4FDD\u5B58\u3059\u308B\u305F\u3081\u306E\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FB\u30E1\u30CB\u30E5\u30FC\u9805\u76EE +FileMenu.exit.labelAndMnemonic=\u7D42\u4E86(&X) +FileMenu.exit_accessible_description=SwingSet2\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u3092\u7D42\u4E86\u3057\u307E\u3059 + +### Multi-Screen menu ### +MultiMenu.multi.labelAndMnemonic=\u30DE\u30EB\u30C1\u30B9\u30AF\u30EA\u30FC\u30F3(&M) +MultiMenu.multi_accessible_description=\u30DE\u30EB\u30C1\u30B9\u30AF\u30EA\u30FC\u30F3\u30FB\u30E1\u30CB\u30E5\u30FC +MultiMenu.all.labelAndMnemonic=SwingSet2\u3092\u3059\u3079\u3066\u306E\u30B9\u30AF\u30EA\u30FC\u30F3\u306B\u4F5C\u6210\u3057\u307E\u3059(&A) +MultiMenu.all_accessible_description=SwingSet2\u306E\u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u30B9\u30AF\u30EA\u30FC\u30F3\u3054\u3068\u306B\u4F5C\u6210\u3057\u307E\u3059 +MultiMenu.single.labelAndMnemonic=SwingSet2\u3092\u30B9\u30AF\u30EA\u30FC\u30F3\u306B\u4F5C\u6210\u3057\u307E\u3059 +MultiMenu.single_accessible_description=SwingSet2\u306E\u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u30B9\u30AF\u30EA\u30FC\u30F3\u306B\u4F5C\u6210\u3057\u307E\u3059 + + +################################ +### DEMOS ### +################################ + +### Button Demo ### + +ButtonDemo.accessible_description=ButtonDemo\u3067\u306F\u3001JButton\u3001JRadioButton\u3001JToggleButton\u304A\u3088\u3073JCheckBox\u306E\u4F7F\u7528\u4F8B\u3092\u7D39\u4ECB\u3057\u307E\u3059 +ButtonDemo.tooltip=JButton\u3001JRadioButton\u3001JToggleButton\u3001JCheckbox\u30C7\u30E2 +ButtonDemo.name=Button\u30C7\u30E2 + +ButtonDemo.buttons=\u30DC\u30BF\u30F3 +ButtonDemo.checkboxes=\u30C1\u30A7\u30C3\u30AF\u30FB\u30DC\u30C3\u30AF\u30B9 +ButtonDemo.radiobuttons=\u30E9\u30B8\u30AA\u30FB\u30DC\u30BF\u30F3 +ButtonDemo.togglebuttons=\u30C8\u30B0\u30EB\u30FB\u30DC\u30BF\u30F3 + +ButtonDemo.textbuttons=\u30C6\u30AD\u30B9\u30C8\u30FB\u30DC\u30BF\u30F3 +ButtonDemo.imagebuttons=\u30A4\u30E1\u30FC\u30B8\u30FB\u30DC\u30BF\u30F3 +ButtonDemo.textradiobuttons=\u30C6\u30AD\u30B9\u30C8\u30FB\u30E9\u30B8\u30AA\u30FB\u30DC\u30BF\u30F3 +ButtonDemo.imageradiobuttons=\u30A4\u30E1\u30FC\u30B8\u30FB\u30E9\u30B8\u30AA\u30FB\u30DC\u30BF\u30F3 +ButtonDemo.texttogglebuttons=\u30C6\u30AD\u30B9\u30C8\u30FB\u30C8\u30B0\u30EB\u30FB\u30DC\u30BF\u30F3 +ButtonDemo.imagetogglebuttons=\u30A4\u30E1\u30FC\u30B8\u30FB\u30C8\u30B0\u30EB\u30FB\u30DC\u30BF\u30F3 +ButtonDemo.textcheckboxes=\u30C6\u30AD\u30B9\u30C8\u30FB\u30C1\u30A7\u30C3\u30AF\u30FB\u30DC\u30C3\u30AF\u30B9 +ButtonDemo.imagecheckboxes=\u30A4\u30E1\u30FC\u30B8\u30FB\u30C1\u30A7\u30C3\u30AF\u30FB\u30DC\u30C3\u30AF\u30B9 + +ButtonDemo.button1=1 +ButtonDemo.button2=2 +ButtonDemo.button3=3 + +ButtonDemo.radio1=\u30DC\u30BF\u30F31 +ButtonDemo.radio2=\u30DC\u30BF\u30F32 +ButtonDemo.radio3=\u30DC\u30BF\u30F33 +ButtonDemo.radioX=3(HTML) + +ButtonDemo.check1=1 +ButtonDemo.check2=2 +ButtonDemo.check3=3 +ButtonDemo.checkX=3(HTML) + +ButtonDemo.customradio=\u30AB\u30B9\u30BF\u30E0\u306E"\u30E1\u30BF\u30EA\u30C3\u30AF\u8ABF"\u30E9\u30B8\u30AA\u30FB\u30DC\u30BF\u30F3 +ButtonDemo.customcheck=\u30AB\u30B9\u30BF\u30E0\u306E\u96FB\u7403\u30C1\u30A7\u30C3\u30AF\u30FB\u30DC\u30C3\u30AF\u30B9 + +ButtonDemo.phone=\u96FB\u8A71 +ButtonDemo.write=\u66F8\u8FBC\u307F +ButtonDemo.peace=\u30D4\u30FC\u30B9 + +ButtonDemo.controlpanel.labelAndMnemonic=\u8868\u793A\u30AA\u30D7\u30B7\u30E7\u30F3: +ButtonDemo.paintborder.labelAndMnemonic=\u30DC\u30FC\u30C0\u30FC\u8868\u793A(&B) +ButtonDemo.paintborder_tooltip=\u3053\u3053\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u3001\u30DC\u30FC\u30C0\u30FC\u306E\u8868\u793A\u306E\u30AA\u30F3\u3068\u30AA\u30D5\u3092\u5207\u308A\u66FF\u3048\u307E\u3059\u3002 +ButtonDemo.paintfocus.labelAndMnemonic=\u30D5\u30A9\u30FC\u30AB\u30B9\u8868\u793A(&F) +ButtonDemo.paintfocus_tooltip=\u3053\u3053\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u3001\u30D5\u30A9\u30FC\u30AB\u30B9\u306E\u8868\u793A\u306E\u30AA\u30F3\u3068\u30AA\u30D5\u3092\u5207\u308A\u66FF\u3048\u307E\u3059\u3002 +ButtonDemo.enabled.labelAndMnemonic=\u6709\u52B9(&E) +ButtonDemo.enabled_tooltip=\u3053\u3053\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u3001\u30DC\u30BF\u30F3\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3057\u307E\u3059\u3002 +ButtonDemo.contentfilled.labelAndMnemonic=\u30DA\u30A4\u30F3\u30C8(&I) +ButtonDemo.contentfilled_tooltip=\u3053\u3053\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u3001\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30A8\u30EA\u30A2\u3092\u30DA\u30A4\u30F3\u30C8\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u9078\u629E\u3057\u307E\u3059\u3002 + +ButtonDemo.padamount.labelAndMnemonic=\u4F59\u767D: +ButtonDemo.default.labelAndMnemonic=\u30C7\u30D5\u30A9\u30EB\u30C8(&D) +ButtonDemo.default_tooltip=\u30DC\u30FC\u30C0\u30FC\u304A\u3088\u3073\u30E9\u30D9\u30EB\u306E\u9593\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30D4\u30AF\u30BB\u30EB\u6570\u306E\u4F59\u767D\u3092\u5165\u308C\u307E\u3059\u3002 +ButtonDemo.zero.labelAndMnemonic=&0 +ButtonDemo.zero_tooltip=\u30DC\u30FC\u30C0\u30FC\u304A\u3088\u3073\u30E9\u30D9\u30EB\u306E\u9593\u306B\u4F59\u767D\u3092\u5165\u308C\u307E\u305B\u3093\u3002 +ButtonDemo.ten.labelAndMnemonic=&10 +ButtonDemo.ten_tooltip=\u30DC\u30FC\u30C0\u30FC\u304A\u3088\u3073\u30E9\u30D9\u30EB\u306E\u9593\u306B10\u30D4\u30AF\u30BB\u30EB\u306E\u4F59\u767D\u3092\u5165\u308C\u307E\u3059\u3002 + +LayoutControlPanel.textposition.labelAndMnemonic=\u30C6\u30AD\u30B9\u30C8\u4F4D\u7F6E: +LayoutControlPanel.contentalignment.labelAndMnemonic=\u30B3\u30F3\u30C6\u30F3\u30C4\u4F4D\u7F6E\u5408\u305B: + +### ColorChooser Demo ### + +ColorChooserDemo.accessible_description=ColorChooser\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u30D1\u30EC\u30C3\u30C8\u304B\u3089\u8272\u3092\u9078\u629E\u3057\u305F\u308A\u3001RGB\u5024\u307E\u305F\u306FHSB\u5024\u3092\u76F4\u63A5\u6307\u5B9A\u3067\u304D\u307E\u3059 +ColorChooserDemo.tooltip=JColorChooser\u30C7\u30E2 +ColorChooserDemo.name=ColorChooser\u30C7\u30E2 +ColorChooserDemo.chooser_title=\u8272\u306E\u9078\u629E +ColorChooserDemo.background=\u80CC\u666F +ColorChooserDemo.grad_a=\u30B0\u30E9\u30C7\u30FC\u30B7\u30E7\u30F3\u57FA\u672C\u82721 +ColorChooserDemo.grad_b=\u30B0\u30E9\u30C7\u30FC\u30B7\u30E7\u30F3\u57FA\u672C\u82722 +ColorChooserDemo.outer_line=\u5883\u754C\u7DDA +ColorChooserDemo.cup=Java\u306E\u30C8\u30EC\u30FC\u30C9\u30DE\u30FC\u30AF\u3067\u3042\u308B\u30B3\u30FC\u30D2\u30FC\u30FB\u30AB\u30C3\u30D7\u306E\u30A4\u30E1\u30FC\u30B8 + +### ComboBox Demo ### + +ComboBoxDemo.accessible_description=\u3053\u306E\u30C7\u30E2\u3067\u306F\u3001JComboBox\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u4F7F\u7528\u4F8B\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002 +ComboBoxDemo.tooltip=JComboBox\u30C7\u30E2 +ComboBoxDemo.name=ComboBox\u30C7\u30E2 + +ComboBoxDemo.hair=\u9AEA +ComboBoxDemo.eyes=\u76EE +ComboBoxDemo.mouth=\u53E3 +ComboBoxDemo.presets=\u30D7\u30EA\u30BB\u30C3\u30C8: + +ComboBoxDemo.preset1=\u30D5\u30A3\u30EA\u30C3\u30D7, \u30CF\u30EF\u30FC\u30C9, \u30B8\u30A7\u30D5 +ComboBoxDemo.preset2=\u30B8\u30A7\u30D5, \u30E9\u30EA\u30FC, \u30D5\u30A3\u30EA\u30C3\u30D7 +ComboBoxDemo.preset3=\u30CF\u30EF\u30FC\u30C9, \u30B9\u30B3\u30C3\u30C8, \u30CF\u30F3\u30B9 +ComboBoxDemo.preset4=\u30D5\u30A3\u30EA\u30C3\u30D7, \u30B8\u30A7\u30D5, \u30CF\u30F3\u30B9 +ComboBoxDemo.preset5=\u30D6\u30EC\u30F3\u30C8, \u30B8\u30E7\u30F3, \u30B9\u30B3\u30C3\u30C8 +ComboBoxDemo.preset6=\u30E9\u30E9, \u30E9\u30EA\u30FC, \u30EA\u30B5 +ComboBoxDemo.preset7=\u30B8\u30A7\u30FC\u30E0\u30B9 ,\u30D5\u30A3\u30EA\u30C3\u30D7, \u30DE\u30A4\u30B1\u30EB +ComboBoxDemo.preset8=\u30D5\u30A3\u30EA\u30C3\u30D7, \u30EA\u30B5, \u30D6\u30EC\u30F3\u30C8 +ComboBoxDemo.preset9=\u30B8\u30A7\u30FC\u30E0\u30B9, \u30D5\u30A3\u30EA\u30C3\u30D7, \u30B8\u30E7\u30F3 +ComboBoxDemo.preset10=\u30E9\u30E9, \u30B8\u30E7\u30F3, \u30B9\u30B3\u30C3\u30C8 + + +ComboBoxDemo.hair_description=\u9AEA: +ComboBoxDemo.eyes_description=\u76EE\u3068\u9F3B: +ComboBoxDemo.mouth_description=\u53E3: + +ComboBoxDemo.amy=\u30A8\u30A4\u30DF\u30FC +ComboBoxDemo.brent=\u30D6\u30EC\u30F3\u30C8 +ComboBoxDemo.georges=\u30B8\u30E7\u30EB\u30B8\u30E5 +ComboBoxDemo.hans=\u30CF\u30F3\u30B9 +ComboBoxDemo.howard=\u30CF\u30EF\u30FC\u30C9 +ComboBoxDemo.james=\u30B8\u30A7\u30FC\u30E0\u30B9 +ComboBoxDemo.jeff=\u30B8\u30A7\u30D5 +ComboBoxDemo.jon=\u30B8\u30E7\u30F3 +ComboBoxDemo.lara=\u30E9\u30E9 +ComboBoxDemo.larry=\u30E9\u30EA\u30FC +ComboBoxDemo.lisa=\u30EA\u30B5 +ComboBoxDemo.michael=\u30DE\u30A4\u30B1\u30EB +ComboBoxDemo.philip=\u30D5\u30A3\u30EA\u30C3\u30D7 +ComboBoxDemo.scott=\u30B9\u30B3\u30C3\u30C8 + +### FileChooser Demo ### + +FileChooserDemo.accessible_description=FileChooser\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u958B\u304F\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u4F5C\u6210\u304A\u3088\u3073\u4FDD\u5B58\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3067\u304D\u307E\u3059\u3002 +FileChooserDemo.tooltip=JFileChooser\u30C7\u30E2 +FileChooserDemo.name=FileChooser\u30C7\u30E2 + +FileChooserDemo.plainbutton=\u6A19\u6E96\u306EJFileChooser\u306E\u8868\u793A +FileChooserDemo.previewbutton=\u30D7\u30EC\u30D3\u30E5\u30FC\u4ED8\u304DJFileChooser\u306E\u8868\u793A +FileChooserDemo.custombutton=\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3057\u305FJFileChooser\u306E\u8868\u793A + +FileChooserDemo.description=&  & \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u597D\u304D\u306A\u3060\u3051\u4F7F\u7528\u3057\u3066\u3001\u72EC\u81EA\u306EFileChooser\u3092\u7C21\u5358\u306B
&  & \u4F5C\u6210\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002 + +FileChooserDemo.filterdescription=JPEG\u304A\u3088\u3073GIF\u753B\u50CF\u30D5\u30A1\u30A4\u30EB + +FileChooserDemo.nofileselected=\u6700\u521D\u306B\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002 +FileChooserDemo.thefile=\u30D5\u30A1\u30A4\u30EB\u540D: +FileChooserDemo.isprobably=\u306F\u304A\u305D\u3089\u304F\u753B\u50CF\u30C7\u30FC\u30BF\u3067\u3059\u3002 + +FileChooserDemo.helptext=\u691C\u7D22: \u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3057\u307E\u3059\u3002
\u8A73\u7D30: \u30D5\u30A1\u30A4\u30EB\u306B\u3064\u3044\u3066\u306E\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\u3002
OK: \u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3057\u307E\u3059\u3002
\u53D6\u6D88: \u4F55\u3082\u305B\u305A\u306B\u3053\u306E\u30C0\u30A4\u30A2\u30ED\u30B0\u3092\u9589\u3058\u307E\u3059\u3002 + +FileChooserDemo.findquestion=\u30D5\u30A1\u30A4\u30EB\u306E\u691C\u7D22: +FileChooserDemo.findresponse=
\u3042\u306A\u305F\u3001\u672C\u5F53\u306B\u79C1\u306B\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3057\u3066\u307B\u3057\u3044\u3068\u601D\u3063\u3066\u308B\u3093\u3067\u3059\u304B\u3002
\u305D\u3093\u306A\u3053\u3068\u3067\u304D\u306A\u3044\u3067\u3059\u3088\u3001\u3084\u308A\u65B9\u77E5\u3089\u306A\u3044\u3093\u3067\u3059\u304B\u3089\u3002\u79C1\u306F\u305F\u3060\u306E\u30C7\u30E2\u30FB\u30D7\u30ED\u30B0\u30E9\u30E0\u3067\u3059\u3088\u3002
+ +FileChooserDemo.dialogtitle=\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3057\u305FFileChooser +FileChooserDemo.help=\u30D8\u30EB\u30D7 +FileChooserDemo.find=\u691C\u7D22 +FileChooserDemo.ok=OK +FileChooserDemo.about=\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831 +FileChooserDemo.cancel=\u53D6\u6D88 + +### Html Demo ### + +HtmlDemo.accessible_description=\u3053\u306E\u30C7\u30E2\u3067\u306F\u3001JEditorPane\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3067HTML\u30C6\u30AD\u30B9\u30C8\u304C\u3069\u306E\u3088\u3046\u306B\u8868\u793A\u3055\u308C\u308B\u304B\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002 +HtmlDemo.tooltip=JEditorPane HTML\u30C7\u30E2 +HtmlDemo.name=JEditorPane HTML\u30C7\u30E2 +HtmlDemo.filename=swing.html + + +### Internal Frame Demo ### + +InternalFrameDemo.accessible_description=JInternal Frame\u30C7\u30E2 +InternalFrameDemo.create_frames.labelAndMnemonic=\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3055\u308C\u305F\u5185\u90E8\u30D5\u30EC\u30FC\u30E0\u306E\u4F5C\u6210 +InternalFrameDemo.title_text_field.labelAndMnemonic=\u30D5\u30EC\u30FC\u30E0\u306E\u30BF\u30A4\u30C8\u30EB: +InternalFrameDemo.frame.labelAndMnemonic=\u30D5\u30EC\u30FC\u30E0 +InternalFrameDemo.palette.labelAndMnemonic=\u5185\u90E8\u30D5\u30EC\u30FC\u30E0\u306E\u4F5C\u6210 +InternalFrameDemo.name=Internal Frame\u30C7\u30E2 +InternalFrameDemo.tooltip=JInternal Frame\u30C7\u30E2 +InternalFrameDemo.closable.labelAndMnemonic=\u30AF\u30ED\u30FC\u30BA\u53EF +InternalFrameDemo.resizable.labelAndMnemonic=\u30B5\u30A4\u30BA\u5909\u66F4\u53EF +InternalFrameDemo.iconifiable.labelAndMnemonic=\u6700\u5C0F\u5316\u53EF +InternalFrameDemo.maximizable.labelAndMnemonic=\u6700\u5927\u5316\u53EF +InternalFrameDemo.toast=Cheers +InternalFrameDemo.duke=Your Grace +InternalFrameDemo.duchess=Duchess +InternalFrameDemo.cab=Anyone need a Taxi? + + +### List Demo ### + +ListDemo.accessible_description=JList\u30C7\u30E2 +ListDemo.name=List\u30C7\u30E2 +ListDemo.tooltip=JList\u30C7\u30E2 +ListDemo.prefixes=\u63A5\u982D\u8F9E +ListDemo.suffixes=\u63A5\u5C3E\u8F9E +ListDemo.count.labelAndMnemonic=\u751F\u6210\u3055\u308C\u305F\u30EA\u30B9\u30C8\u30FB\u30A8\u30F3\u30C8\u30EA\u306E\u6570: +ListDemo.all=\u3059\u3079\u3066 +ListDemo.none=\u306A\u3057 +ListDemo.red=\u8D64\u8272\u306E\u4F1A\u793E\u30ED\u30B4\u30FB\u30A4\u30E1\u30FC\u30B8 +ListDemo.yellow=\u8D64\u8272\u306E\u4F1A\u793E\u30ED\u30B4\u30FB\u30A4\u30E1\u30FC\u30B8 +ListDemo.blue=\u9752\u8272\u306E\u4F1A\u793E\u30ED\u30B4\u30FB\u30A4\u30E1\u30FC\u30B8 +ListDemo.gray=\u30B0\u30EC\u30FC\u306E\u4F1A\u793E\u30ED\u30B4\u30FB\u30A4\u30E1\u30FC\u30B8 +ListDemo.green=\u7DD1\u8272\u306E\u4F1A\u793E\u30ED\u30B4\u30FB\u30A4\u30E1\u30FC\u30B8 +ListDemo.magenta=\u30DE\u30BC\u30F3\u30BF\u306E\u4F1A\u793E\u30ED\u30B4\u30FB\u30A4\u30E1\u30FC\u30B8 +ListDemo.cyan=\u30B7\u30A2\u30F3\u306E\u4F1A\u793E\u30ED\u30B4\u30FB\u30A4\u30E1\u30FC\u30B8 +ListDemo.description=

\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

+ +OptionPaneDemo.messagetext=\u74F6\u306B\u5165\u308C\u305F\u30E1\u30C3\u30BB\u30FC\u30B8 + +OptionPaneDemo.confirmquestion=\u4ECA\u65E5\u306E\u5916\u306E\u5929\u6C17\u306F\u6674\u308C\u3067\u3059\u304B\u3002 +OptionPaneDemo.confirmyes=\u30B3\u30F3\u30D4\u30E5\u30FC\u30BF\u3067\u904A\u3093\u3067\u306A\u3044\u3067\u5916\u306B\u51FA\u3088\u3046\u3002
\u30D3\u30FC\u30C1\u306B\u884C\u3063\u3066\u592A\u967D\u306E\u65E5\u3092\u6D74\u3073\u305F\u3089\u3069\u3046\u3067\u3057\u3087\u3046\u3002 +OptionPaneDemo.confirmno=\u5C4B\u5185\u306B\u3044\u3066\u69D8\u3005\u306A\u3082\u306E\u304B\u3089\u4FDD\u8B77\u3055\u308C\u3066\u3044\u308B\u306E\u306F\u3044\u3044\u3053\u3068\u3067\u3059\u3002 + +OptionPaneDemo.inputquestion=\u597D\u304D\u306A\u6620\u753B\u306F\u4F55\u3067\u3059\u304B\u3002 +OptionPaneDemo.inputresponse=\u3042\u308C\u306F\u3068\u3066\u3082\u3044\u3044\u6620\u753B\u3067\u3057\u305F\u306D\u3002 + +OptionPaneDemo.componenttitle=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30FB\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u4F8B +OptionPaneDemo.componentmessage=JOptionPane\u306B\u306F\u3001\u30C6\u30AD\u30B9\u30C8\u30FB\u30D5\u30A3\u30FC\u30EB\u30C9\u306A\u3069\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092
\u5FC5\u8981\u306A\u3060\u3051\u542B\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002 +OptionPaneDemo.componenttextfield=\u30B3\u30F3\u30DC\u30DC\u30C3\u30AF\u30B9: +OptionPaneDemo.component_cb1=\u9805\u76EE1 +OptionPaneDemo.component_cb2=\u9805\u76EE2 +OptionPaneDemo.component_cb3=\u9805\u76EE3 +OptionPaneDemo.componentmessage2=\u307E\u305F\u3001JOptionPane\u306B\u306F\u5FC5\u8981\u306A\u6570\u3060\u3051\u30AA\u30D7\u30B7\u30E7\u30F3\u3092
\u542B\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002 +OptionPaneDemo.component_op1=\u306F\u3044 +OptionPaneDemo.component_op2=\u3044\u3044\u3048 +OptionPaneDemo.component_op3=\u305D\u3046\u304B\u3082\u3057\u308C\u306A\u3044 +OptionPaneDemo.component_op4=\u305F\u3076\u3093 +OptionPaneDemo.component_op5=\u53D6\u6D88 + +OptionPaneDemo.component_r1=\u660E\u308B\u304F\u3066\u697D\u89B3\u7684\u3002\u3044\u3044\u9078\u629E\u3067\u3059\u306D\u3002 +OptionPaneDemo.component_r2=\u307E\u3063\u305F\u304F\u9055\u3044\u307E\u3059\u3002\u79C1\u306A\u3089\u305D\u3093\u306A\u3053\u3068\u306F\u3057\u307E\u305B\u3093\u3002 +OptionPaneDemo.component_r3=\u3048\u3048\u3068\u3001\u306F\u3044\u3002\u73FE\u6642\u70B9\u3067\u306F\u72B6\u6CC1\u304C\u306F\u3063\u304D\u308A\u3057\u307E\u305B\u3093\u3002
\u306F\u3063\u304D\u308A\u3068\u6C7A\u307E\u3063\u305F\u3089\u6559\u3048\u3066\u304F\u3060\u3055\u3044\u3002
+OptionPaneDemo.component_r4=\u305D\u3046\u3057\u305F\u3044\u306E\u306F\u308F\u304B\u3063\u3066\u3044\u308B\u306F\u305A\u3067\u3059\u3002\u4E00\u767A\u52DD\u8CA0\u3092
\u304B\u3051\u3066\u300C\u306F\u3044\u300D\u3092\u62BC\u3059\u3079\u304D\u3067\u3057\u305F\u3002
+ +### ProgressBar Demo ### + +ProgressBarDemo.accessible_description=\u3053\u306E\u30C7\u30E2\u3067\u306F\u3001JprogressBar\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u4F7F\u7528\u4F8B\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002 +ProgressBarDemo.tooltip=JProgressBar\u30C7\u30E2 +ProgressBarDemo.name=ProgressBar\u30C7\u30E2 +ProgressBarDemo.start_button=\u30C6\u30AD\u30B9\u30C8\u306E\u30ED\u30FC\u30C9\u958B\u59CB +ProgressBarDemo.stop_button=\u30C6\u30AD\u30B9\u30C8\u306E\u30ED\u30FC\u30C9\u505C\u6B62 +ProgressBarDemo.accessible_text_loading_progress=\u30C6\u30AD\u30B9\u30C8\u306E\u30ED\u30FC\u30C9\u4E2D +ProgressBarDemo.accessible_text_area_name=\u30ED\u30FC\u30C9\u4E2D\u306E\u30C6\u30AD\u30B9\u30C8 + +ProgressBarDemo.accessible_text_area_description=\u3053\u306EJTextArea\u306B\u306F\u3001\u30C6\u30AD\u30B9\u30C8\u304C\u4E00\u5EA6\u306B1\u6587\u5B57\u305A\u3064\u30D0\u30C3\u30D5\u30A1\u304B\u3089\u57CB\u3081\u8FBC\u307E\u308C\u3066\u3044\u307E\u3059\u3002\u30A6\u30A3\u30F3\u30C9\u30A6\u306E\u4E0B\u90E8\u306B\u3042\u308B\u30D7\u30ED\u30B0\u30EC\u30B9\u30FB\u30D0\u30FC\u306B\u3001\u30ED\u30FC\u30C9\u51E6\u7406\u306E\u9032\u6357\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002 + +ProgressBarDemo.text=\u7121\u9650\u306E\u733F\u304C\u7121\u9650\u6570\u306E\u30BF\u30A4\u30D7\u30E9\u30A4\u30BF\u3067\u5165\u529B\u3057\u7D9A\u3051\u308C\u3070\u3001\u3044\u3064\u304B\u306F\u4EBA\u985E\u306E\u5049\u5927\u306A\u4F5C\u54C1\u304C\u3067\u304D\u3042\u304C\u308B\u3068\u4FD7\u306B\u3044\u308F\u308C\u3066\u3044\u307E\u3059\u3002\n\u73FE\u5728\u306E\u9AD8\u901F\u51E6\u7406\u30B3\u30F3\u30D4\u30E5\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308C\u3070\u3001\u3053\u306E\u7406\u8AD6\u3092\u30C6\u30B9\u30C8\n\u3067\u304D\u307E\u3059... \n\n\tLzskd jfy 92y;ho4 th;qlh sd 6yty;q2 hnlj 8sdf. Djfy 92y;ho4, th;qxhz d7yty; \n\tQ0hnlj 23&&^ (# ljask djf y92y; fy92y; Sd6y ty;q2h nl jk la gfa harvin garvel\n\tlasdfsd a83sl la8z ks8l 92y;ho4 th;qlh sd 6yty;q2 hnlj 8sdf. Djfy 92y;ho4,\n\tth;qxhz d7yty; Q0hnlj 23&&^ nknod mrs88 jsd79lfm#%$JLaoz6df lso7dj f2 jfls\n\t67d9ol1@2fou99s 1lkj2 @l.k1 2; a89o7aljf 1l3i7ou8 d8l3 lqwerty0092 #1!\n\tja9o do8lkjj139rojsd9**!l6*hd # ljasd78 l2awkjad78 3ol7asljf 3 ldif && l.js\n\tLl ls ewan la8uj 23lll7u 8l 3h hhxx8 8d lsd fixx 891lkjno99sl d8l@@@!!8#8\n\tdfoil jarooda mklaoorj nowai the smisthliylka jkdlfjiw ladajadra lthhheeejfjl\n\tdkddooolda bub mirznod of the koojgaf!! But 2 be or not to be... that is the\n\tquestion. Then when shall we three meet again In thunder, lightning, or in\n\train? When the hurlyburly's done, When the battle's lost and won. That will\n\tbe ere the set of sun. Where the place? Upon the heath. There to meet with\n\tMacbeth. But hath forth not to want..... a banana, or to be.... a banana.\n\tBanana, I knew him banana. Banana banana. Banana banana banana banana.\n\n\n\n\nWell... hmm.... it seemed like a good idea... + + +### ScrollPane Demo ### + +ScrollPaneDemo.accessible_description=JScrollPane\u30C7\u30E2 +ScrollPaneDemo.name=Scroll Pane\u30C7\u30E2 +ScrollPaneDemo.tooltip=JScrollPane\u30C7\u30E2 +ScrollPaneDemo.crayons=\u305F\u304F\u3055\u3093\u306E\u30AF\u30EC\u30E8\u30F3 +ScrollPaneDemo.colheader=\u5217\u30D8\u30C3\u30C0\u30FC +ScrollPaneDemo.rowheader=\u884C\u30D8\u30C3\u30C0\u30FC +ScrollPaneDemo.upperleft=\u5DE6\u4E0A\u30B3\u30FC\u30CA\u30FC +ScrollPaneDemo.upperright=\u53F3\u4E0A\u306E\u5217\u30D8\u30C3\u30C0\u30FC\u30FB\u30B3\u30FC\u30CA\u30FC +ScrollPaneDemo.lowerleft=\u5DE6\u4E0B\u306E\u884C\u30D8\u30C3\u30C0\u30FC\u30FB\u30B3\u30FC\u30CA\u30FC + + +### Slider Demo ### + +SliderDemo.accessible_description=\u3053\u306E\u30C7\u30E2\u3067\u306F\u3001JSlider\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u4F7F\u7528\u4F8B\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002 +SliderDemo.tooltip=JSlider\u30C7\u30E2 +SliderDemo.name=Slider\u30C7\u30E2 + +SliderDemo.slidervalue=Slider\u306E\u5024: +SliderDemo.horizontal=\u6C34\u5E73 +SliderDemo.vertical=\u5782\u76F4 +SliderDemo.plain=\u30D7\u30EC\u30FC\u30F3 +SliderDemo.a_plain_slider=\u30D7\u30EC\u30FC\u30F3\u306E\u30B9\u30E9\u30A4\u30C0 +SliderDemo.majorticks=\u5927\u76EE\u76DB +SliderDemo.majorticksdescription=\u5927\u76EE\u76DB\u3092\u8868\u793A\u3059\u308B\u30B9\u30E9\u30A4\u30C0 +SliderDemo.ticks=\u5C0F\u76EE\u76DB\u3001Snap-to-ticks\u304A\u3088\u3073\u30E9\u30D9\u30EB +SliderDemo.minorticks=\u5C0F\u76EE\u76DB +SliderDemo.minorticksdescription=\u5927\u76EE\u76DB\u3068\u5C0F\u76EE\u76DB\u3092\u8868\u793A\u3059\u308B\u30B9\u30E9\u30A4\u30C0(\u76EE\u76DB\u30DE\u30FC\u30AF\u306B\u30B9\u30CA\u30C3\u30D7\u3059\u308B\u30B9\u30E9\u30A4\u30C0\u30FB\u30A2\u30AF\u30B7\u30E7\u30F3\u3042\u308A\u3001\u4E00\u90E8\u306E\u76EE\u76DB\u306F\u76EE\u7ACB\u3064\u30E9\u30D9\u30EB\u4ED8\u304D) +SliderDemo.disabled=\u7121\u52B9 +SliderDemo.disableddescription=\u7121\u52B9\u5316\u3055\u308C\u305F\u3001\u5927\u76EE\u76DB\u3068\u5C0F\u76EE\u76DB\u3092\u8868\u793A\u3059\u308B\u30B9\u30E9\u30A4\u30C0(\u64CD\u4F5C\u4E0D\u53EF) + +### SplitPane Demo ### + +SplitPaneDemo.accessible_description=JSplitPane\u30C7\u30E2 +SplitPaneDemo.name=Split Pane\u30C7\u30E2 +SplitPaneDemo.tooltip=JSplitPane\u30C7\u30E2 +SplitPaneDemo.earth=\u6BCD\u306A\u308B\u5730\u7403 +SplitPaneDemo.moon=\u6708\u9762\u306E\u5B87\u5B99\u98DB\u884C\u58EB +SplitPaneDemo.vert_split.labelAndMnemonic=\u5782\u76F4\u5206\u5272(&V) +SplitPaneDemo.horz_split.labelAndMnemonic=\u6C34\u5E73\u5206\u5272(&R) +SplitPaneDemo.cont_layout.labelAndMnemonic=\u9023\u7D9A\u3057\u305F\u30EC\u30A4\u30A2\u30A6\u30C8(&C) +SplitPaneDemo.one_touch_expandable.labelAndMnemonic=\u30EF\u30F3\u30BF\u30C3\u30C1\u62E1\u5F35\u6A5F\u80FD(&O) +SplitPaneDemo.divider_size.labelAndMnemonic=\u30C7\u30A3\u30D0\u30A4\u30C0\u306E\u30B5\u30A4\u30BA(&Z) +SplitPaneDemo.invalid_divider_size=\u7121\u52B9\u306A\u30C7\u30A3\u30D0\u30A4\u30C0\u306E\u30B5\u30A4\u30BA +SplitPaneDemo.error=\u30A8\u30E9\u30FC +SplitPaneDemo.first_component_min_size.labelAndMnemonic=\u6700\u521D\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u6700\u5C0F\u30B5\u30A4\u30BA(&I) +SplitPaneDemo.second_component_min_size.labelAndMnemonic=2\u3064\u76EE\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u6700\u5C0F\u30B5\u30A4\u30BA(&N) +SplitPaneDemo.invalid_min_size=\u7121\u52B9\u306A\u6700\u5C0F\u30B5\u30A4\u30BA +SplitPaneDemo.must_be_greater_than=\u6B21\u306E\u6570\u3088\u308A\u5927\u304D\u306A\u5024\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044 + + +### TabbedPane Demo ### + +TabbedPaneDemo.accessible_description=\u3053\u306E\u30C7\u30E2\u3067\u306F\u3001JTabbedPane\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u4F7F\u7528\u4F8B\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002 +TabbedPaneDemo.tooltip=JTabbedPane\u30C7\u30E2 +TabbedPaneDemo.name=TabbedPane\u30C7\u30E2 + +TabbedPaneDemo.bounce=
Bouncing Babies!
+TabbedPaneDemo.stephen=\u30B9\u30C6\u30A3\u30FC\u30F4\u30F3 +TabbedPaneDemo.david=\u30C7\u30A4\u30F4\u30A3\u30C3\u30C9 +TabbedPaneDemo.matthew=\u30DE\u30B7\u30E5\u30FC +TabbedPaneDemo.ewan=\u30E6\u30A2\u30F3 +TabbedPaneDemo.blake=\u30D6\u30EC\u30A4\u30AF +TabbedPaneDemo.brooke=\u30D6\u30EB\u30C3\u30AF +TabbedPaneDemo.laine=\u30EC\u30A4\u30F3 +TabbedPaneDemo.hania=\u30CF\u30CB\u30A2 + +TabbedPaneDemo.label=\u30BF\u30D6\u914D\u7F6E: +TabbedPaneDemo.top=\u4E0A +TabbedPaneDemo.bottom=\u4E0B +TabbedPaneDemo.left=\u5DE6 +TabbedPaneDemo.right=\u53F3 + + +### Table Demo ### + +TableDemo.accessible_description=JTable\u30C7\u30E2 +TableDemo.name=Table\u30C7\u30E2 +TableDemo.tooltip=JTable\u30C7\u30E2 +TableDemo.all_columns=\u3059\u3079\u3066\u306E\u5217 +TableDemo.autoresize_mode=\u30B5\u30A4\u30BA\u81EA\u52D5\u5909\u66F4\u30E2\u30FC\u30C9 +TableDemo.cell_selection=\u30BB\u30EB\u306E\u9078\u629E +TableDemo.column_boundaries=\u5217\u306E\u5883\u754C +TableDemo.column_selection=\u5217\u306E\u9078\u629E +TableDemo.horz_lines=\u6C34\u5E73\u7DDA +TableDemo.intercell_spacing=\u30BB\u30EB\u9593\u306E\u30B9\u30DA\u30FC\u30B9 +TableDemo.intercell_spacing_colon=\u30BB\u30EB\u9593\u306E\u30B9\u30DA\u30FC\u30B9: +TableDemo.last_column=\u6700\u5F8C\u306E\u5217 +TableDemo.multiple_ranges=\u8907\u6570\u306E\u7BC4\u56F2 +TableDemo.one_range=1\u3064\u306E\u7BC4\u56F2 +TableDemo.reordering_allowed=\u4E26\u66FF\u3048\u3092\u8A31\u53EF +TableDemo.row_height=\u884C\u306E\u9AD8\u3055 +TableDemo.row_height_colon=\u884C\u306E\u9AD8\u3055: +TableDemo.row_selection=\u884C\u306E\u9078\u629E +TableDemo.selection_mode=\u9078\u629E\u30E2\u30FC\u30C9 +TableDemo.subsequent_columns=\u5F8C\u7D9A\u306E\u5217 +TableDemo.vert_lines=\u5782\u76F4\u7DDA +TableDemo.single=\u30B7\u30F3\u30B0\u30EB +TableDemo.none=\u306A\u3057 +TableDemo.off=\u30AA\u30D5 +TableDemo.first_name=\u540D +TableDemo.last_name=\u59D3 +TableDemo.favorite_color=\u597D\u304D\u306A\u8272 +TableDemo.favorite_food=\u597D\u304D\u306A\u98DF\u3079\u7269 +TableDemo.favorite_movie=\u597D\u304D\u306A\u6620\u753B +TableDemo.favorite_number=\u597D\u304D\u306A\u6570 +TableDemo.aqua=\u30A2\u30AF\u30A2 +TableDemo.beige=\u30D9\u30FC\u30B8\u30E5 +TableDemo.black=\u9ED2 +TableDemo.blue=\u9752 +TableDemo.cybergreen=\u30B5\u30A4\u30D0\u30FC\u30FB\u30B0\u30EA\u30FC\u30F3 +TableDemo.darkgreen=\u30C0\u30FC\u30AF\u30FB\u30B0\u30EA\u30FC\u30F3 +TableDemo.eblue=\u30E1\u30BF\u30EA\u30C3\u30AF\u30FB\u30D6\u30EB\u30FC +TableDemo.jfcblue=JFC\u30D7\u30E9\u30A4\u30DE\u30EA +TableDemo.jfcblue2=JFC\u30BB\u30AB\u30F3\u30C0\u30EA +TableDemo.forestgreen=\u30D5\u30A9\u30EC\u30B9\u30C8\u30FB\u30B0\u30EA\u30FC\u30F3 +TableDemo.gray=\u7070\u8272 +TableDemo.green=\u7DD1 +TableDemo.orange=\u30AA\u30EC\u30F3\u30B8 +TableDemo.purple=\u7D2B +TableDemo.red=\u8D64 +TableDemo.rustred=\u8D64\u7149\u74E6\u8272 +TableDemo.sunpurple=Sun\u30D1\u30FC\u30D7\u30EB +TableDemo.suspectpink=\u30D4\u30F3\u30AF +TableDemo.turquoise=\u30BF\u30FC\u30B3\u30A4\u30BA +TableDemo.violet=\u3059\u307F\u308C\u8272 +TableDemo.yellow=\u9EC4\u8272 +TableDemo.2001=2001\u5E74\u5B87\u5B99\u306E\u65C5 +TableDemo.buckaroo=\u30D0\u30AB\u30EB\u30FC\u30FB\u30D0\u30F3\u30B6\u30A4\u306E8\u6B21\u5143\u30AE\u30E3\u30E9\u30AF\u30B7\u30FC +TableDemo.firstsight=\u3042\u306A\u305F\u304C\u898B\u3048\u306A\u304F\u3066\u3082 +TableDemo.airplane=\u30D5\u30E9\u30A4\u30F3\u30B0\u30FB\u30CF\u30A4(\u5168\u30B7\u30EA\u30FC\u30BA) +TableDemo.aliens=\u30A8\u30A4\u30EA\u30A2\u30F3 +TableDemo.bicycle=\u81EA\u8EE2\u8ECA\u6CE5\u68D2 +TableDemo.bladerunner=\u30D6\u30EC\u30FC\u30C9\u30FB\u30E9\u30F3\u30CA\u30FC(\u30C7\u30A3\u30EC\u30AF\u30BF\u30FC\u30BA\u30FB\u30AB\u30C3\u30C8) +TableDemo.bluesbros=\u30D6\u30EB\u30FC\u30B9\u30FB\u30D6\u30E9\u30B6\u30FC\u30B9 +TableDemo.brazil=\u672A\u6765\u4E16\u7D00\u30D6\u30E9\u30B8\u30EB +TableDemo.bugs=\u30D0\u30B0\u30BA\u30FB\u30E9\u30A4\u30D5 +TableDemo.city=\u30ED\u30B9\u30C8\u30FB\u30C1\u30EB\u30C9\u30EC\u30F3 +TableDemo.chusingura=\u5FE0\u81E3\u8535(1962) +TableDemo.clock=\u6642\u8A08\u4ED5\u639B\u3051\u306E\u30AA\u30EC\u30F3\u30B8 +TableDemo.curse=\u602A\u5947\u30DF\u30A4\u30E9\u7537 +TableDemo.dasboot=U\u30DC\u30FC\u30C8 +TableDemo.dazed=\u30D0\u30C3\u30C9\u30FB\u30C1\u30E5\u30FC\u30CB\u30F3\u30B0 +TableDemo.defending=\u3042\u306A\u305F\u306E\u6B7B\u5F8C\u306B\u3054\u7528\u5FC3 +TableDemo.eraserhead=\u30A4\u30EC\u30A4\u30B6\u30FC\u30D8\u30C3\u30C9 +TableDemo.fifthelement=\u30D5\u30A3\u30D5\u30B9\u30FB\u30A8\u30EC\u30E1\u30F3\u30C8 +TableDemo.goodfellas=\u30B0\u30C3\u30C9\u30FB\u30D5\u30A7\u30ED\u30FC\u30BA +TableDemo.harold=\u30CF\u30ED\u30EB\u30C9\u3068\u30E2\u30FC\u30C9 +TableDemo.joyluck=\u30B8\u30E7\u30A4\u30FB\u30E9\u30C3\u30AF\u30FB\u30AF\u30E9\u30D6 +TableDemo.jules=\u7A81\u7136\u708E\u306E\u3054\u3068\u304F +TableDemo.ladyvanishes=\u30EC\u30C7\u30A3\u30FB\u30D0\u30CB\u30C3\u30B7\u30E5/\u6697\u53F7\u3092\u6B4C\u3046\u5973 +TableDemo.mohicans=\u30E9\u30B9\u30C8\u30FB\u30AA\u30D6\u30FB\u30E2\u30D2\u30AB\u30F3 +TableDemo.lonestar=\u771F\u5B9F\u306E\u56C1\u304D +TableDemo.man=\u77E5\u308A\u3059\u304E\u3066\u3044\u305F\u7537 +TableDemo.musicman=\u30B6\u30FB\u30DF\u30E5\u30FC\u30B8\u30C3\u30AF\u30FB\u30DE\u30F3 +TableDemo.dog=\u30DE\u30A4\u30FB\u30E9\u30A4\u30D5\u30FB\u30A2\u30BA\u30FB\u30A2\u30FB\u30C9\u30C3\u30B0 +TableDemo.oncewest=\u30A6\u30A8\u30B9\u30BF\u30F3 +TableDemo.pulpfiction=\u30D1\u30EB\u30D7\u30FB\u30D5\u30A3\u30AF\u30B7\u30E7\u30F3 +TableDemo.raiders=\u30EC\u30A4\u30C0\u30FC\u30B9/\u5931\u308F\u308C\u305F\u30A2\u30FC\u30AF(\u8056\u6AC3) +TableDemo.reservoir=\u30EC\u30B6\u30DC\u30A2\u30FB\u30C9\u30C3\u30B0\u30B9 +TableDemo.repoman=\u30EC\u30DD\u30FB\u30DE\u30F3 +TableDemo.spinaltap=\u30B9\u30D1\u30A4\u30CA\u30EB\u30FB\u30BF\u30C3\u30D7 +TableDemo.schindlerslist=\u30B7\u30F3\u30C9\u30E9\u30FC\u306E\u30EA\u30B9\u30C8 +TableDemo.starwars=\u30B9\u30BF\u30FC\u30FB\u30A6\u30A9\u30FC\u30BA +TableDemo.stuntman=\u30B9\u30BF\u30F3\u30C8\u30DE\u30F3 +TableDemo.thinman=\u5F71\u306A\u304D\u7537 +TableDemo.withnail=\u30A6\u30A3\u30BA\u30FB\u30CD\u30A4\u30EB\u3068\u50D5 +TableDemo.labyrinth=\u30E9\u30D3\u30EA\u30F3\u30B9/\u9B54\u738B\u306E\u8FF7\u5BAE +TableDemo.shawshank=\u30B7\u30E7\u30FC\u30B7\u30E3\u30F3\u30AF\u306E\u7A7A\u306B +TableDemo.apple=\u308A\u3093\u3054 +TableDemo.asparagus=\u30A2\u30B9\u30D1\u30E9\u30AC\u30B9 +TableDemo.banana=\u30D0\u30CA\u30CA +TableDemo.broccoli=\u30D6\u30ED\u30C3\u30B3\u30EA +TableDemo.carrot=\u30CB\u30F3\u30B8\u30F3 +TableDemo.cantaloupe=\u30E1\u30ED\u30F3 +TableDemo.corn=\u3068\u3046\u3082\u308D\u3053\u3057 +TableDemo.grapes=\u3076\u3069\u3046 +TableDemo.grapefruit=\u30B0\u30EC\u30FC\u30D7\u30D5\u30EB\u30FC\u30C4 +TableDemo.kiwi=\u30AD\u30A6\u30A3\u30FB\u30D5\u30EB\u30FC\u30C4 +TableDemo.onion=\u7389\u306D\u304E +TableDemo.pear=\u6D0B\u306A\u3057 +TableDemo.peach=\u6843 +TableDemo.pepper=\u3068\u3046\u304C\u3089\u3057 +TableDemo.pickle=\u30D4\u30AF\u30EB\u30B9 +TableDemo.pineapple=\u30D1\u30A4\u30CA\u30C3\u30D7\u30EB +TableDemo.raspberry=\u30E9\u30B9\u30D9\u30EA +TableDemo.sparegrass=\u30A2\u30B9\u30D1\u30E9\u30AC\u30B9 +TableDemo.strawberry=\u3044\u3061\u3054 +TableDemo.tomato=\u30C8\u30DE\u30C8 +TableDemo.watermelon=\u3059\u3044\u304B + +TableDemo.printing=\u5370\u5237\u30E1\u30CB\u30E5\u30FC +TableDemo.fitWidth=\u6A2A\u5E45\u306B\u5408\u308F\u305B\u308B +TableDemo.print=\u5370\u5237 +TableDemo.header=\u30D8\u30C3\u30C0\u30FC + +# This string will be formatted by a MessageFormat and +# printed at the top of each page of the printed result. +# You can use {0} to insert a page number. +TableDemo.headerText=JTable\u5370\u5237 + +TableDemo.footer=\u30D5\u30C3\u30BF\u30FC + +# This string will be formatted by a MessageFormat and +# printed at the bottom of each page of the printed result. +# You can use {0} to insert a page number. +TableDemo.footerText={0}\u30DA\u30FC\u30B8 + +TableDemo.printingResult=\u5370\u5237\u7D50\u679C +TableDemo.printingComplete=\u5370\u5237\u5B8C\u4E86 +TableDemo.printingCancelled=\u5370\u5237\u306E\u53D6\u6D88 + +# This string will be formatted by a MessageFormat and +# and displayed when an exception occurs. +# {0} is used to place details of the exception. +TableDemo.printingFailed=\u5370\u5237\u30A8\u30E9\u30FC: {0} + + +### ToolTip Demo ### + +ToolTipDemo.accessible_description=ToolTip\u306F\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306B\u3064\u3044\u3066\u306E\u7C21\u5358\u306A\u8AAC\u660E\u3092\u8868\u793A\u3057\u307E\u3059\u3002 +ToolTipDemo.accessible_cow=\u3053\u308C\u306F\u96CC\u725B\u3067\u3059\u3002 +ToolTipDemo.tooltip=ToolTip\u30C7\u30E2 +ToolTipDemo.name=ToolTip\u30C7\u30E2 +ToolTipDemo.bessie=\u96CC\u725B\u306E\u30D9\u30C3\u30B7\u30FC +ToolTipDemo.cow=\u96CC\u725B\u3002 +ToolTipDemo.got_milk=\u725B\u4E73\u3042\u308B? +ToolTipDemo.tail=\u3057\u3063\u307D\u3002 +ToolTipDemo.moo=\u30E2\u30A9\u30A9\u30A9\u30A9! +ToolTipDemo.tooltip_features=\u3082\u3057\u3084\u3042\u306A\u305F\u306F\u3001\u30C4\u30FC\u30EB\u30FB\u30C1\u30C3\u30D7\u306F\u300C1\u884C\u306E\u30D7\u30EC\u30FC\u30F3\u30FB\u30C6\u30AD\u30B9\u30C8\u300D\u3057\u304B

\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

  • List\u3092\u6301\u3063\u305F\u308A\u3001
  • \u592A\u5B57\u306B\u3057\u305F\u308A\u3001
  • \u5F37\u8ABF\u306B\u3057\u305F\u308A\u3001
  • \u6587\u5B57\u306B\u8272\u3092\u4ED8\u3051\u305F\u308A\u3001
  • \u30B5\u30A4\u30BA\u3092\u5909\u3048\u305F\u308A\u3001
  • \u30D5\u30A9\u30F3\u30C8\u3092\u5909\u3048\u305F\u308A\u3001
\u305D\u3046\u305D\u3046\u3001\u3082\u3061\u308D\u3093\u8907\u6570\u884C\u306B\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u3061\u3083\u3046\u306E\u3067\u3059\u3002\u306D\u3063\u3002 + + +### Tree Demo ### + +TreeDemo.accessible_description=\u3053\u306E\u30C7\u30E2\u3067\u306F\u3001JTree\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u4F7F\u7528\u4F8B\u3092\u7D39\u4ECB\u3057\u307E\u3059\u3002 +TreeDemo.tooltip=JTree\u30C7\u30E2 +TreeDemo.name=Tree\u30C7\u30E2 +TreeDemo.music=\u97F3\u697D + diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/swingset_zh_CN.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/resources/swingset_zh_CN.properties Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,644 @@ +# 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=\u5173\u4E8E Swing! +AboutBox.ok_button_text=\u786E\u5B9A +AboutBox.accessible_description=SwingSet2 \u6F14\u793A\u7A0B\u5E8F, \u7248\u6743\u6240\u6709 (c) 2011, Oracle \u548C/\u6216\u5176\u5B50\u516C\u53F8\u3002\u4FDD\u7559\u6240\u6709\u6743\u5229\u3002 + +### Source Code ### +SourceCode.loading=\u6B63\u5728\u52A0\u8F7D\u548C\u683C\u5F0F\u5316\u6E90\u4EE3\u7801, \u8BF7\u7A0D\u5019... + +### Status ### + +Status.loading=\u6B63\u5728\u52A0\u8F7D: +Status.popupMenuAccessible=\u8BF7\u6309 Shift-F10 \u7EC4\u5408\u952E\u6FC0\u6D3B\u5F39\u51FA\u5F0F\u83DC\u5355 + +### Menu Bar ### + +MenuBar.accessible_description=Swing \u6F14\u793A\u83DC\u5355\u680F + + +### Frame ### + +Frame.title=SwingSet2 + + +### Tabbed Pane ### + +TabbedPane.src.labelAndMnemonic=\u6E90\u4EE3\u7801 +TabbedPane.src_tooltip=\u67E5\u770B\u672C\u6F14\u793A\u7684\u6E90\u4EE3\u7801 + + +### Look & Feel Menu ### + +LafMenu.laf.labelAndMnemonic=\u5916\u89C2(&L) +LafMenu.laf_accessible_description=\u7528\u4E8E\u5207\u6362\u5916\u89C2\u7684\u83DC\u5355 + +LafMenu.java.labelAndMnemonic=Java \u5916\u89C2(&J) +LafMenu.java_accessible_description=Java \u5916\u89C2 + +LafMenu.nimbus.labelAndMnemonic=Nimbus \u5916\u89C2(&N) +LafMenu.nimbus_accessible_description=Nimbus \u5916\u89C2 + +LafMenu.mac.labelAndMnemonic=Mac OS X \u5916\u89C2(&M) +LafMenu.mac_accessible_description=Mac OS X \u5916\u89C2 + +LafMenu.motif.labelAndMnemonic=Motif \u5916\u89C2(&O) +LafMenu.motif_accessible_description=Motif \u5916\u89C2 + +LafMenu.windows.labelAndMnemonic=Windows \u6837\u5F0F\u5916\u89C2(&W) +LafMenu.windows_accessible_description=Windows \u6837\u5F0F\u5916\u89C2 + +LafMenu.gtk.labelAndMnemonic=GTK \u6837\u5F0F\u5916\u89C2(&G) +LafMenu.gtk_accessible_description=GTK \u6837\u5F0F\u5916\u89C2 + + +### Themes Menu ### + +ThemesMenu.themes.labelAndMnemonic=\u4E3B\u9898(&T) +ThemesMenu.themes_accessible_description=\u5207\u6362\u91D1\u5C5E\u989C\u8272\u4E3B\u9898\u7684\u83DC\u5355 + +ThemesMenu.aqua.labelAndMnemonic=\u6C34\u7EFF(&Q) +ThemesMenu.aqua_accessible_description=\u84DD\u7EFF\u8272\u91D1\u5C5E\u4E3B\u9898 + +ThemesMenu.charcoal.labelAndMnemonic=\u70AD\u7070(&C) +ThemesMenu.charcoal_accessible_description=\u6697\u7070\u8272\u91D1\u5C5E\u4E3B\u9898 + +ThemesMenu.contrast.labelAndMnemonic=\u9AD8\u5BF9\u6BD4\u5EA6(&H) +ThemesMenu.contrast_accessible_description=\u9AD8\u5BF9\u6BD4\u5EA6\u4E3B\u9898 + +ThemesMenu.ocean.labelAndMnemonic=\u6D77\u6D0B(&O) +ThemesMenu.ocean_accessible_description=\u6D77\u6D0B\u91D1\u5C5E\u4E3B\u9898 + +ThemesMenu.steel.labelAndMnemonic=\u94A2(&S) +ThemesMenu.steel_accessible_description=\u84DD\u8272/\u7D2B\u8272\u91D1\u5C5E\u4E3B\u9898 + +ThemesMenu.emerald.labelAndMnemonic=\u7956\u6BCD\u7EFF(&E) +ThemesMenu.emerald_accessible_description=\u7EFF\u8272\u91D1\u5C5E\u4E3B\u9898 + +ThemesMenu.ruby.labelAndMnemonic=\u5B9D\u77F3\u7EA2(&R) +ThemesMenu.ruby_accessible_description=\u7EA2\u8272\u91D1\u5C5E\u4E3B\u9898 + + +### Font SubMenu (under Themes) +FontMenu.fonts.labelAndMnemonic=\u5B57\u4F53(&F) +FontMenu.fonts_accessible_description=\u7528\u6765\u9009\u62E9 Java \u5916\u89C2\u5B57\u4F53\u7684\u83DC\u5355 + +FontMenu.bold.labelAndMnemonic=\u7C97\u4F53(&B) +FontMenu.bold_accessible_description=\u4E3A Java \u5916\u89C2\u542F\u7528\u7C97\u4F53\u5B57\u4F53 + +FontMenu.plain.labelAndMnemonic=\u65E0\u683C\u5F0F(&P) +FontMenu.plain_accessible_description=\u4E3A Java \u5916\u89C2\u542F\u7528\u65E0\u683C\u5F0F\u5B57\u4F53 + + +### Audio SubMenu (under Themes) ### + +AudioMenu.audio.labelAndMnemonic=\u97F3\u9891(&A) +AudioMenu.audio_accessible_description=\u7528\u6765\u5207\u6362 Java \u5916\u89C2\u4E2D\u53EF\u7528\u7684\u542C\u89C9\u53CD\u9988\u6570\u91CF\u7684\u83DC\u5355 + +AudioMenu.on.labelAndMnemonic=\u65E5\u671F(&O) +AudioMenu.on_accessible_description=\u4E3A Java \u5916\u89C2\u542F\u7528\u6240\u6709\u542C\u89C9\u53CD\u9988 + +AudioMenu.default.labelAndMnemonic=\u9ED8\u8BA4\u503C(&D) +AudioMenu.default_accessible_description=\u4E3A Java \u5916\u89C2\u542F\u7528\u6807\u51C6\u7684\u542C\u89C9\u53CD\u9988\u6570\u91CF + +AudioMenu.off.labelAndMnemonic=\u5173(&F) +AudioMenu.off_accessible_description=\u4E3A Java \u5916\u89C2\u7981\u7528\u6240\u6709\u542C\u89C9\u53CD\u9988 + +### Options Menu ### + +OptionsMenu.options.labelAndMnemonic=\u9009\u9879(&P) +OptionsMenu.options_accessible_description=\u5305\u542B\u5176\u4ED6\u9009\u9879\u7684\u83DC\u5355 + +OptionsMenu.tooltip.labelAndMnemonic=\u542F\u7528\u5DE5\u5177\u63D0\u793A(&T) +OptionsMenu.tooltip_accessible_description=\u542F\u7528\u6216\u7981\u7528\u5DE5\u5177\u63D0\u793A + +OptionsMenu.dragEnabled.labelAndMnemonic=\u542F\u7528\u62D6\u52A8\u652F\u6301(&D) +OptionsMenu.dragEnabled_accessible_description=\u542F\u7528\u6216\u7981\u7528\u62D6\u52A8\u652F\u6301 + +### File Menu ### + +FileMenu.file.labelAndMnemonic=\u6587\u4EF6(&F) +FileMenu.accessible_description=\u6587\u4EF6\u83DC\u5355 +FileMenu.about.labelAndMnemonic=\u5173\u4E8E(&B) +FileMenu.about_accessible_description=\u4E86\u89E3 SwingSet2 \u5E94\u7528\u7A0B\u5E8F +FileMenu.open.labelAndMnemonic=\u6253\u5F00(&O) +FileMenu.open_accessible_description=\u7528\u4E8E\u6253\u5F00\u6587\u4EF6\u7684\u5360\u4F4D\u7B26\u83DC\u5355\u9879 +FileMenu.save.labelAndMnemonic=\u4FDD\u5B58(&S) +FileMenu.save_accessible_description=\u7528\u4E8E\u4FDD\u5B58\u6587\u4EF6\u7684\u5360\u4F4D\u7B26\u83DC\u5355\u9879 +FileMenu.save_as.labelAndMnemonic=\u53E6\u5B58\u4E3A(&A)... +FileMenu.save_as_accessible_description=\u7528\u4E8E\u5C06\u6587\u4EF6\u53E6\u5B58\u4E3A\u4E00\u4E2A\u65B0\u6587\u4EF6\u540D\u7684\u5360\u4F4D\u7B26\u83DC\u5355\u9879 +FileMenu.exit.labelAndMnemonic=\u9000\u51FA(&X) +FileMenu.exit_accessible_description=\u9000\u51FA SwingSet2 \u5E94\u7528\u7A0B\u5E8F + +### Multi-Screen menu ### +MultiMenu.multi.labelAndMnemonic=\u591A\u5C4F\u5E55(&M) +MultiMenu.multi_accessible_description=\u591A\u5C4F\u5E55\u83DC\u5355 +MultiMenu.all.labelAndMnemonic=\u5728\u6240\u6709\u5C4F\u5E55\u4E0A\u521B\u5EFA SwingSet2(&A) +MultiMenu.all_accessible_description=\u5728\u6BCF\u4E2A\u5C4F\u5E55\u4E0A\u521B\u5EFA\u4E00\u4E2A SwingSet2 \u7A97\u53E3 +MultiMenu.single.labelAndMnemonic=\u5728\u5C4F\u5E55\u4E0A\u521B\u5EFA SwingSet2 +MultiMenu.single_accessible_description=\u5728\u5C4F\u5E55\u4E0A\u521B\u5EFA SwingSet2 \u7A97\u53E3 + + +################################ +### DEMOS ### +################################ + +### Button Demo ### + +ButtonDemo.accessible_description=ButtonDemo \u663E\u793A\u4E86\u4F7F\u7528 JButton, JRadioButton, JToggleButton \u548C JCheckBox \u7684\u793A\u4F8B +ButtonDemo.tooltip=JButton, JRadioButton, JToggleButton, JCheckbox \u6F14\u793A +ButtonDemo.name=\u6309\u94AE\u6F14\u793A + +ButtonDemo.buttons=\u6309\u94AE +ButtonDemo.checkboxes=\u590D\u9009\u6846 +ButtonDemo.radiobuttons=\u5355\u9009\u6309\u94AE +ButtonDemo.togglebuttons=\u5207\u6362\u6309\u94AE + +ButtonDemo.textbuttons=\u6587\u672C\u6309\u94AE +ButtonDemo.imagebuttons=\u56FE\u50CF\u6309\u94AE +ButtonDemo.textradiobuttons=\u6587\u672C\u5355\u9009\u6309\u94AE +ButtonDemo.imageradiobuttons=\u56FE\u50CF\u5355\u9009\u6309\u94AE +ButtonDemo.texttogglebuttons=\u6587\u672C\u5207\u6362\u6309\u94AE +ButtonDemo.imagetogglebuttons=\u56FE\u50CF\u5207\u6362\u6309\u94AE +ButtonDemo.textcheckboxes=\u6587\u672C\u590D\u9009\u6846 +ButtonDemo.imagecheckboxes=\u56FE\u50CF\u590D\u9009\u6846 + +ButtonDemo.button1=\u4E00 +ButtonDemo.button2=\u4E8C +ButtonDemo.button3=\u4E09! + +ButtonDemo.radio1=\u5355\u9009\u4E00 +ButtonDemo.radio2=\u5355\u9009\u4E8C +ButtonDemo.radio3=\u5355\u9009\u4E09 +ButtonDemo.radioX=\u4E09 (HTML!) + +ButtonDemo.check1=\u4E00 +ButtonDemo.check2=\u4E8C +ButtonDemo.check3=\u4E09 +ButtonDemo.checkX=\u4E09 (HTML!) + +ButtonDemo.customradio=\u5B9A\u5236 "chrome" \u5355\u9009\u6309\u94AE\u3002 +ButtonDemo.customcheck=\u5B9A\u5236\u201C\u706F\u6CE1\u201D\u590D\u9009\u6846\u3002 + +ButtonDemo.phone=\u7535\u8BDD +ButtonDemo.write=\u5199 +ButtonDemo.peace=\u5E73\u9759 + +ButtonDemo.controlpanel.labelAndMnemonic=\u663E\u793A\u9009\u9879: +ButtonDemo.paintborder.labelAndMnemonic=\u7ED8\u5236\u8FB9\u6846(&B) +ButtonDemo.paintborder_tooltip=\u5355\u51FB\u6B64\u5904\u53EF\u6253\u5F00\u6216\u5173\u95ED\u8FB9\u6846\u7ED8\u5236\u3002 +ButtonDemo.paintfocus.labelAndMnemonic=\u7ED8\u5236\u7126\u70B9(&F) +ButtonDemo.paintfocus_tooltip=\u5355\u51FB\u6B64\u5904\u53EF\u6253\u5F00\u6216\u5173\u95ED\u7126\u70B9\u7ED8\u5236\u3002 +ButtonDemo.enabled.labelAndMnemonic=\u542F\u7528(&E) +ButtonDemo.enabled_tooltip=\u5355\u51FB\u6B64\u5904\u53EF\u542F\u7528\u6216\u7981\u7528\u6309\u94AE\u3002 +ButtonDemo.contentfilled.labelAndMnemonic=\u586B\u5145\u5185\u5BB9(&I) +ButtonDemo.contentfilled_tooltip=\u5355\u51FB\u6B64\u5904\u53EF\u63A7\u5236\u5185\u5BB9\u533A\u57DF\u7684\u586B\u5145\u3002 + +ButtonDemo.padamount.labelAndMnemonic=\u586B\u5145\u91CF: +ButtonDemo.default.labelAndMnemonic=\u9ED8\u8BA4\u503C(&D) +ButtonDemo.default_tooltip=\u5728\u8FB9\u6846\u4E0E\u6807\u7B7E\u4E4B\u95F4\u4F7F\u7528\u9ED8\u8BA4\u586B\u5145\u3002 +ButtonDemo.zero.labelAndMnemonic=&0 +ButtonDemo.zero_tooltip=\u5728\u8FB9\u6846\u4E0E\u6807\u7B7E\u4E4B\u95F4\u4E0D\u4F7F\u7528\u586B\u5145\u3002 +ButtonDemo.ten.labelAndMnemonic=&10 +ButtonDemo.ten_tooltip=\u5728\u8FB9\u6846\u4E0E\u6807\u7B7E\u4E4B\u95F4\u4F7F\u7528 10 \u50CF\u7D20\u586B\u5145\u3002 + +LayoutControlPanel.textposition.labelAndMnemonic=\u6587\u672C\u4F4D\u7F6E: +LayoutControlPanel.contentalignment.labelAndMnemonic=\u5185\u5BB9\u5BF9\u9F50: + +### ColorChooser Demo ### + +ColorChooserDemo.accessible_description=\u4F7F\u7528 ColorChooser, \u7528\u6237\u53EF\u4EE5\u4ECE\u8C03\u8272\u677F\u6216\u8005\u901A\u8FC7\u9009\u62E9 RGB \u6216 HSB \u503C\u6765\u9009\u53D6\u989C\u8272 +ColorChooserDemo.tooltip=JColorChooser \u6F14\u793A +ColorChooserDemo.name=ColorChooser \u6F14\u793A +ColorChooserDemo.chooser_title=\u9009\u62E9\u989C\u8272 +ColorChooserDemo.background=\u80CC\u666F +ColorChooserDemo.grad_a=\u6E10\u53D8 1 +ColorChooserDemo.grad_b=\u6E10\u53D8 2 +ColorChooserDemo.outer_line=\u5468\u957F +ColorChooserDemo.cup=Java \u5546\u6807\u7684\u5496\u5561\u676F\u56FE\u50CF + +### ComboBox Demo ### + +ComboBoxDemo.accessible_description=\u6B64\u6F14\u793A\u663E\u793A\u4E86\u4F7F\u7528 JComboBox \u7EC4\u4EF6\u7684\u793A\u4F8B\u3002 +ComboBoxDemo.tooltip=JComboBox \u6F14\u793A +ComboBoxDemo.name=ComboBox \u6F14\u793A + +ComboBoxDemo.hair=\u5934\u53D1 +ComboBoxDemo.eyes=\u773C\u775B +ComboBoxDemo.mouth=\u5634 +ComboBoxDemo.presets=\u9884\u8BBE: + +ComboBoxDemo.preset1=Philip, Howard, Jeff +ComboBoxDemo.preset2=Jeff, Larry, Philip +ComboBoxDemo.preset3=Howard, Scott, Hans +ComboBoxDemo.preset4=Philip, Jeff, Hans +ComboBoxDemo.preset5=Brent, Jon, Scott +ComboBoxDemo.preset6=Lara, Larry, Lisa +ComboBoxDemo.preset7=James, Philip, Michael +ComboBoxDemo.preset8=Philip, Lisa, Brent +ComboBoxDemo.preset9=James, Philip, Jon +ComboBoxDemo.preset10=Lara, Jon, Scott + + +ComboBoxDemo.hair_description=\u5934\u53D1: +ComboBoxDemo.eyes_description=\u773C\u775B\u548C\u9F3B\u5B50: +ComboBoxDemo.mouth_description=\u5634: + +ComboBoxDemo.amy=Amy +ComboBoxDemo.brent=Brent +ComboBoxDemo.georges=Georges +ComboBoxDemo.hans=Hans +ComboBoxDemo.howard=Howard +ComboBoxDemo.james=James +ComboBoxDemo.jeff=Jeff +ComboBoxDemo.jon=Jon +ComboBoxDemo.lara=Lara +ComboBoxDemo.larry=Larry +ComboBoxDemo.lisa=Lisa +ComboBoxDemo.michael=Michael +ComboBoxDemo.philip=Philip +ComboBoxDemo.scott=Scott + +### FileChooser Demo ### + +FileChooserDemo.accessible_description=\u4F7F\u7528 FileChooser, \u7528\u6237\u53EF\u4EE5\u9009\u62E9\u6587\u4EF6, \u901A\u5E38\u662F\u7528\u4E8E\u6253\u5F00\u6216\u521B\u5EFA/\u4FDD\u5B58\u3002 +FileChooserDemo.tooltip=JFileChooser \u6F14\u793A +FileChooserDemo.name=FileChooser \u6F14\u793A + +FileChooserDemo.plainbutton=\u663E\u793A\u65E0\u683C\u5F0F JFileChooser +FileChooserDemo.previewbutton=\u663E\u793A\u9884\u89C8 JFileChooser +FileChooserDemo.custombutton=\u663E\u793A\u5B9A\u5236 JFileChooser + +FileChooserDemo.description=&  &  \u8BF7\u6CE8\u610F, \u60A8\u53EF\u4EE5\u4F7F\u7528\u4EFB\u610F\u591A\u4E2A\u7EC4\u4EF6\u8F7B\u677E\u521B\u5EFA
&  &  \u5B9A\u5236 FileChooser\u3002 + +FileChooserDemo.filterdescription=JPEG \u548C GIF \u56FE\u50CF\u6587\u4EF6 + +FileChooserDemo.nofileselected=\u8BF7\u5148\u9009\u62E9\u4E00\u4E2A\u6587\u4EF6\u3002 +FileChooserDemo.thefile=\u6587\u4EF6: +FileChooserDemo.isprobably=\u53EF\u80FD\u662F\u4E00\u4E2A\u56FE\u50CF\u3002 + +FileChooserDemo.helptext=\u67E5\u627E: \u67E5\u627E\u67D0\u4E2A\u6587\u4EF6\u3002
\u5173\u4E8E: \u4E86\u89E3\u6709\u5173\u8BE5\u6587\u4EF6\u7684\u8BE6\u7EC6\u4FE1\u606F\u3002
\u786E\u5B9A: \u9009\u62E9\u8BE5\u6587\u4EF6\u3002
\u53D6\u6D88: \u9000\u51FA\u6B64\u5BF9\u8BDD\u6846, \u800C\u4E0D\u8FDB\u884C\u4EFB\u4F55\u64CD\u4F5C\u3002 + +FileChooserDemo.findquestion=\u67E5\u627E\u6587\u4EF6: +FileChooserDemo.findresponse=
\u662F\u5426\u786E\u5B9E\u8981\u67E5\u627E\u6587\u4EF6?!?
\u6211\u4E0D\u77E5\u9053\u5982\u4F55\u6267\u884C\u8BE5\u64CD\u4F5C! \u8FD9\u53EA\u662F\u4E00\u4E2A\u6F14\u793A!
+ +FileChooserDemo.dialogtitle=\u5B9A\u5236\u5E03\u5C40 FileChooser +FileChooserDemo.help=\u5E2E\u52A9 +FileChooserDemo.find=\u67E5\u627E +FileChooserDemo.ok=\u786E\u5B9A +FileChooserDemo.about=\u5173\u4E8E +FileChooserDemo.cancel=\u53D6\u6D88 + +### Html Demo ### + +HtmlDemo.accessible_description=\u672C\u6F14\u793A\u8BF4\u660E\u5982\u4F55\u4F7F\u7528 JEditorPane \u7EC4\u4EF6\u663E\u793A HTML \u6587\u672C\u3002 +HtmlDemo.tooltip=JEditorPane HTML \u6F14\u793A +HtmlDemo.name=JEditorPane HTML \u6F14\u793A +HtmlDemo.filename=swing.html + + +### Internal Frame Demo ### + +InternalFrameDemo.accessible_description=JInternal Frame \u6F14\u793A +InternalFrameDemo.create_frames.labelAndMnemonic=\u521B\u5EFA\u5B9A\u5236\u7684\u5185\u90E8\u6846\u67B6 +InternalFrameDemo.title_text_field.labelAndMnemonic=\u6846\u67B6\u6807\u9898: +InternalFrameDemo.frame.labelAndMnemonic=\u6846\u67B6 +InternalFrameDemo.palette.labelAndMnemonic=\u5185\u90E8\u6846\u67B6\u751F\u6210\u5668 +InternalFrameDemo.name=\u5185\u90E8\u6846\u67B6\u6F14\u793A +InternalFrameDemo.tooltip=JInternalFrame \u6F14\u793A +InternalFrameDemo.closable.labelAndMnemonic=\u53EF\u5173\u95ED +InternalFrameDemo.resizable.labelAndMnemonic=\u53EF\u8C03\u6574\u5927\u5C0F +InternalFrameDemo.iconifiable.labelAndMnemonic=\u53EF\u56FE\u6807\u5316 +InternalFrameDemo.maximizable.labelAndMnemonic=\u53EF\u6700\u5927\u5316 +InternalFrameDemo.toast=Cheers +InternalFrameDemo.duke=Your Grace +InternalFrameDemo.duchess=Duchess +InternalFrameDemo.cab=\u8C01\u9700\u8981\u51FA\u79DF\u8F66? + + +### List Demo ### + +ListDemo.accessible_description=JList \u6F14\u793A +ListDemo.name=List \u6F14\u793A +ListDemo.tooltip=JList \u6F14\u793A +ListDemo.prefixes=\u524D\u7F00 +ListDemo.suffixes=\u540E\u7F00 +ListDemo.count.labelAndMnemonic=\u751F\u6210\u7684\u5217\u8868\u6761\u76EE\u6570: +ListDemo.all=\u5168\u90E8 +ListDemo.none=\u65E0 +ListDemo.red=\u7EA2\u8272\u516C\u53F8\u5FBD\u6807\u56FE\u50CF +ListDemo.yellow=\u7EA2\u8272\u516C\u53F8\u5FBD\u6807\u56FE\u50CF +ListDemo.blue=\u84DD\u8272\u516C\u53F8\u5FBD\u6807\u56FE\u50CF +ListDemo.gray=\u7070\u8272\u516C\u53F8\u5FBD\u6807\u56FE\u50CF +ListDemo.green=\u7EFF\u8272\u516C\u53F8\u5FBD\u6807\u56FE\u50CF +ListDemo.magenta=\u7D2B\u7EA2\u8272\u516C\u53F8\u5FBD\u6807\u56FE\u50CF +ListDemo.cyan=\u9752\u8272\u516C\u53F8\u5FBD\u6807\u56FE\u50CF +ListDemo.description=

\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

+ +OptionPaneDemo.messagetext=\u74F6\u4E2D\u4FE1 (\u662F) + +OptionPaneDemo.confirmquestion=\u4ECA\u5929\u5929\u6C14\u6674\u6717\u5417? +OptionPaneDemo.confirmyes=\u8001\u662F\u5750\u5728\u7535\u8111\u65C1\u8FB9\u6709\u4EC0\u4E48\u610F\u601D?
\u5230\u6237\u5916\u53BB\u5427! \u5230\u6D77\u8FB9\u65C5\u884C\u53BB\u5427! \u4EAB\u53D7\u4E00\u4E0B\u9633\u5149! +OptionPaneDemo.confirmno=\u5F85\u5728\u5BA4\u5185\u53EF\u4EE5\u514D\u53D7\u81EA\u7136\u73AF\u5883\u7684\u4FB5\u5BB3, \u662F\u4EF6\u597D\u4E8B! + +OptionPaneDemo.inputquestion=\u60A8\u6700\u559C\u6B22\u54EA\u4E00\u90E8\u7535\u5F71? +OptionPaneDemo.inputresponse=\u90A3\u662F\u4E00\u90E8\u76F8\u5F53\u597D\u770B\u7684\u7535\u5F71! + +OptionPaneDemo.componenttitle=\u7EC4\u4EF6\u5BF9\u8BDD\u6846\u793A\u4F8B +OptionPaneDemo.componentmessage=JOptionPane \u53EF\u4EE5\u5305\u542B\u4EFB\u610F\u591A\u4E2A\u7EC4\u4EF6
, \u4F8B\u5982\u6587\u672C\u5B57\u6BB5: +OptionPaneDemo.componenttextfield=\u6216\u8005\u7EC4\u5408\u6846: +OptionPaneDemo.component_cb1=\u9879 1 +OptionPaneDemo.component_cb2=\u9879 2 +OptionPaneDemo.component_cb3=\u9879 3 +OptionPaneDemo.componentmessage2=JOptionPane \u8FD8\u53EF\u4EE5\u663E\u793A\u4EFB\u610F\u591A\u4E2A
\u9009\u9879: +OptionPaneDemo.component_op1=\u662F +OptionPaneDemo.component_op2=\u5426 +OptionPaneDemo.component_op3=\u6216\u8BB8 +OptionPaneDemo.component_op4=\u53EF\u80FD +OptionPaneDemo.component_op5=\u53D6\u6D88 + +OptionPaneDemo.component_r1=\u4E50\u89C2\u79EF\u6781! \u6211\u559C\u6B22\u8FD9\u6837! \u6B63\u786E\u7684\u9009\u62E9\u3002 +OptionPaneDemo.component_r2=\u4E00\u5B9A\u4E0D\u4F1A, \u6211\u4E5F\u4E0D\u4F1A\u90A3\u6837\u505A\u3002 +OptionPaneDemo.component_r3= \u55EF, \u662F\u7684, \u73B0\u5728\u60C5\u51B5\u8FD8\u4E0D
\u660E\u786E\u3002\u5F53\u60A8\u4E86\u89E3\u5230\u786E\u5207\u60C5\u51B5\u540E, \u8BF7\u8FDB\u884C\u6838\u5B9E\u3002
+OptionPaneDemo.component_r4=\u8FD9\u624D\u662F\u60A8\u771F\u6B63\u60F3\u505A\u7684\u3002\u6211\u4EE5\u4E3A\u60A8\u672C\u5E94\u8BE5
\u575A\u51B3\u5730\u6309\u4E0B "\u662F"\u3002
+ +### ProgressBar Demo ### + +ProgressBarDemo.accessible_description=\u6B64\u6F14\u793A\u663E\u793A\u4E86\u4F7F\u7528 JProgressBar \u7EC4\u4EF6\u7684\u793A\u4F8B\u3002 +ProgressBarDemo.tooltip=JProgressBar \u6F14\u793A +ProgressBarDemo.name=ProgressBar \u6F14\u793A +ProgressBarDemo.start_button=\u5F00\u59CB\u52A0\u8F7D\u6587\u672C +ProgressBarDemo.stop_button=\u505C\u6B62\u52A0\u8F7D\u6587\u672C +ProgressBarDemo.accessible_text_loading_progress=\u6587\u672C\u52A0\u8F7D\u8FDB\u5EA6 +ProgressBarDemo.accessible_text_area_name=\u52A0\u8F7D\u7684\u6587\u672C\u6B63\u5728\u9010\u6E10\u589E\u591A + +ProgressBarDemo.accessible_text_area_description=\u8FD9\u4E2A JTextArea \u7531\u6765\u81EA\u7F13\u51B2\u533A\u7684\u6587\u672C\u9010\u4E2A\u5B57\u7B26\u5730\u586B\u5145, \u540C\u65F6\u7A97\u53E3\u5E95\u90E8\u7684\u8FDB\u5EA6\u680F\u5C06\u663E\u793A\u52A0\u8F7D\u7684\u8FDB\u5EA6 + +ProgressBarDemo.text=\u5E38\u8A00\u9053: \u5982\u679C\u65E0\u6570\u53EA\u7334\u5B50\u5728\u65E0\u6570\u53F0\u6253\u5B57\u673A\u4E0A\u6572\u51FB\u952E\u76D8, \u6700\u7EC8\n\u5C06\u5F62\u6210\u4EBA\u7C7B\u5386\u53F2\u4E0A\u6240\u6709\u4F1F\u5927\u7684\u8457\u4F5C\u3002\u73B0\u5728, \u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528\u5F53\u4ECA\u7684\u9AD8\u901F\u8BA1\u7B97\u673A\u6765\u68C0\u9A8C\n\u8FD9\u4E00\u7406\u8BBA\u4E86... \n\n\tLzskd jfy 92y;ho4 th;qlh sd 6yty;q2 hnlj 8sdf. Djfy 92y;ho4, th;qxhz d7yty; \n\tQ0hnlj 23&&^ (# ljask djf y92y; fy92y; Sd6y ty;q2h nl jk la gfa harvin garvel\n\tlasdfsd a83sl la8z ks8l 92y;ho4 th;qlh sd 6yty;q2 hnlj 8sdf. Djfy 92y;ho4,\n\tth;qxhz d7yty; Q0hnlj 23&&^ nknod mrs88 jsd79lfm#%$JLaoz6df lso7dj f2 jfls\n\t67d9ol1@2fou99s 1lkj2 @l.k1 2; a89o7aljf 1l3i7ou8 d8l3 lqwerty0092 #1!\n\tja9o do8lkjj139rojsd9**!l6*hd # ljasd78 l2awkjad78 3ol7asljf 3 ldif && l.js\n\tLl ls ewan la8uj 23lll7u 8l 3h hhxx8 8d lsd fixx 891lkjno99sl d8l@@@!!8#8\n\tdfoil jarooda mklaoorj nowai the smisthliylka jkdlfjiw ladajadra lthhheeejfjl\n\tdkddooolda bub mirznod of the koojgaf!! But 2 be or not to be... that is the\n\tquestion. Then when shall we three meet again In thunder, lightning, or in\n\train? When the hurlyburly's done, When the battle's lost and won. That will\n\tbe ere the set of sun. Where the place? Upon the heath. There to meet with\n\tMacbeth. But hath forth not to want..... a banana, or to be.... a banana.\n\tBanana, I knew him banana. Banana banana. Banana banana banana banana.\n\n\n\n\n\u5662, \u8FD9\u770B\u8D77\u6765\u662F\u4E2A\u597D\u4E3B\u610F... + + +### ScrollPane Demo ### + +ScrollPaneDemo.accessible_description=JScrollPane \u6F14\u793A +ScrollPaneDemo.name=Scroll Pane \u6F14\u793A +ScrollPaneDemo.tooltip=JScrollPane \u6F14\u793A +ScrollPaneDemo.crayons=\u5F88\u591A\u5F69\u7B14 +ScrollPaneDemo.colheader=\u5217\u6807\u9898 +ScrollPaneDemo.rowheader=\u884C\u6807\u9898 +ScrollPaneDemo.upperleft=\u5DE6\u4E0A\u89D2 +ScrollPaneDemo.upperright=\u53F3\u4E0A\u5217\u6807\u9898\u89D2 +ScrollPaneDemo.lowerleft=\u5DE6\u4E0B\u884C\u6807\u9898\u89D2 + + +### Slider Demo ### + +SliderDemo.accessible_description=\u6B64\u6F14\u793A\u663E\u793A\u4E86\u4F7F\u7528 JSlider \u7EC4\u4EF6\u7684\u793A\u4F8B\u3002 +SliderDemo.tooltip=JSlider \u6F14\u793A +SliderDemo.name=\u6ED1\u5757\u6F14\u793A + +SliderDemo.slidervalue=\u6ED1\u5757\u503C: +SliderDemo.horizontal=\u6C34\u5E73 +SliderDemo.vertical=\u5782\u76F4 +SliderDemo.plain=\u65E0\u683C\u5F0F +SliderDemo.a_plain_slider=\u65E0\u683C\u5F0F\u6ED1\u5757 +SliderDemo.majorticks=\u4E3B\u523B\u5EA6 +SliderDemo.majorticksdescription=\u663E\u793A\u4E3B\u523B\u5EA6\u7684\u6ED1\u5757 +SliderDemo.ticks=\u6B21\u523B\u5EA6, \u5BF9\u9F50\u523B\u5EA6\u548C\u6807\u7B7E +SliderDemo.minorticks=\u6B21\u523B\u5EA6 +SliderDemo.minorticksdescription=\u6ED1\u5757\u663E\u793A\u4E3B\u523B\u5EA6\u548C\u6B21\u523B\u5EA6, \u6ED1\u5757\u52A8\u4F5C\u5C06\u5BF9\u9F50\u523B\u5EA6\u7EBF, \u5E76\u660E\u663E\u5730\u6807\u8BB0\u51FA\u67D0\u4E9B\u523B\u5EA6 +SliderDemo.disabled=\u5DF2\u7981\u7528 +SliderDemo.disableddescription=\u6ED1\u5757\u663E\u793A\u672A\u542F\u7528\u7684\u4E3B\u523B\u5EA6\u548C\u6B21\u523B\u5EA6 (\u65E0\u6CD5\u64CD\u4F5C + +### SplitPane Demo ### + +SplitPaneDemo.accessible_description=JSplitPane \u6F14\u793A +SplitPaneDemo.name=Split Pane \u6F14\u793A +SplitPaneDemo.tooltip=JSplitPane \u6F14\u793A +SplitPaneDemo.earth=\u5730\u7403\u6BCD\u4EB2 +SplitPaneDemo.moon=\u6708\u7403\u4E0A\u7684\u5B87\u822A\u5458 +SplitPaneDemo.vert_split.labelAndMnemonic=\u5782\u76F4\u62C6\u5206(&V) +SplitPaneDemo.horz_split.labelAndMnemonic=\u6C34\u5E73\u62C6\u5206(&R) +SplitPaneDemo.cont_layout.labelAndMnemonic=\u8FDE\u7EED\u5E03\u5C40(&C) +SplitPaneDemo.one_touch_expandable.labelAndMnemonic=\u70B9\u51FB\u53EF\u5C55\u5F00(&O) +SplitPaneDemo.divider_size.labelAndMnemonic=\u5206\u9694\u7B26\u5927\u5C0F(&Z) +SplitPaneDemo.invalid_divider_size=\u65E0\u6548\u7684\u5206\u9694\u7B26\u5927\u5C0F +SplitPaneDemo.error=\u9519\u8BEF +SplitPaneDemo.first_component_min_size.labelAndMnemonic=\u7B2C\u4E00\u4E2A\u7EC4\u4EF6\u7684\u6700\u5C0F\u5927\u5C0F(&I) +SplitPaneDemo.second_component_min_size.labelAndMnemonic=\u7B2C\u4E8C\u7EC4\u4EF6\u7684\u6700\u5C0F\u5927\u5C0F(&N) +SplitPaneDemo.invalid_min_size=\u65E0\u6548\u7684\u6700\u5C0F\u5927\u5C0F +SplitPaneDemo.must_be_greater_than=\u5FC5\u987B\u5927\u4E8E + + +### TabbedPane Demo ### + +TabbedPaneDemo.accessible_description=\u6B64\u6F14\u793A\u663E\u793A\u4E86\u4F7F\u7528 JTabbedPane \u7EC4\u4EF6\u7684\u793A\u4F8B\u3002 +TabbedPaneDemo.tooltip=JTabbedPane \u6F14\u793A +TabbedPaneDemo.name=TabbedPane \u6F14\u793A + +TabbedPaneDemo.bounce=
\u5065\u5EB7\u6D3B\u6CFC\u7684\u5A74\u513F!
+TabbedPaneDemo.stephen=Stephen +TabbedPaneDemo.david=David +TabbedPaneDemo.matthew=Matthew +TabbedPaneDemo.ewan=Ewan +TabbedPaneDemo.blake=Blake +TabbedPaneDemo.brooke=Brooke +TabbedPaneDemo.laine=Laine +TabbedPaneDemo.hania=Hania + +TabbedPaneDemo.label=\u5236\u8868\u7B26\u4F4D\u7F6E: +TabbedPaneDemo.top=\u9876\u90E8 +TabbedPaneDemo.bottom=\u5E95\u90E8 +TabbedPaneDemo.left=\u5DE6\u4FA7 +TabbedPaneDemo.right=\u53F3\u4FA7 + + +### Table Demo ### + +TableDemo.accessible_description=JTable \u6F14\u793A +TableDemo.name=Table \u6F14\u793A +TableDemo.tooltip=JTable \u6F14\u793A +TableDemo.all_columns=\u6240\u6709\u5217 +TableDemo.autoresize_mode=\u81EA\u52A8\u8C03\u6574\u5927\u5C0F\u6A21\u5F0F +TableDemo.cell_selection=\u5355\u5143\u9009\u62E9 +TableDemo.column_boundaries=\u5217\u8FB9\u754C +TableDemo.column_selection=\u5217\u9009\u62E9 +TableDemo.horz_lines=\u6C34\u5E73\u7EBF +TableDemo.intercell_spacing=\u5355\u5143\u95F4\u8DDD +TableDemo.intercell_spacing_colon=\u5355\u5143\u95F4\u8DDD: +TableDemo.last_column=\u6700\u540E\u4E00\u5217 +TableDemo.multiple_ranges=\u591A\u4E2A\u533A\u57DF +TableDemo.one_range=\u4E00\u4E2A\u533A\u57DF +TableDemo.reordering_allowed=\u5141\u8BB8\u91CD\u6392 +TableDemo.row_height=\u884C\u9AD8 +TableDemo.row_height_colon=\u884C\u9AD8: +TableDemo.row_selection=\u884C\u9009\u62E9 +TableDemo.selection_mode=\u9009\u62E9\u6A21\u5F0F +TableDemo.subsequent_columns=\u540E\u7EED\u5217 +TableDemo.vert_lines=\u5782\u76F4\u7EBF +TableDemo.single=\u5355\u4E00 +TableDemo.none=\u65E0 +TableDemo.off=\u5173 +TableDemo.first_name=\u540D +TableDemo.last_name=\u59D3 +TableDemo.favorite_color=\u559C\u7231\u7684\u989C\u8272 +TableDemo.favorite_food=\u559C\u7231\u7684\u98DF\u54C1 +TableDemo.favorite_movie=\u559C\u7231\u7684\u7535\u5F71 +TableDemo.favorite_number=\u559C\u7231\u7684\u6570\u5B57 +TableDemo.aqua=\u6C34\u7EFF +TableDemo.beige=\u6DE1\u68D5 +TableDemo.black=\u9ED1\u8272 +TableDemo.blue=\u84DD\u8272 +TableDemo.cybergreen=\u4EBA\u5DE5\u7EFF +TableDemo.darkgreen=\u58A8\u7EFF +TableDemo.eblue=\u7535\u5668\u84DD +TableDemo.jfcblue=JFC \u57FA\u672C +TableDemo.jfcblue2=JFC \u8F85\u52A9 +TableDemo.forestgreen=\u68EE\u6797\u7EFF +TableDemo.gray=\u7070\u8272 +TableDemo.green=\u7EFF\u8272 +TableDemo.orange=\u6A59\u8272 +TableDemo.purple=\u7D2B\u8272 +TableDemo.red=\u7EA2\u8272 +TableDemo.rustred=\u9508\u7EA2 +TableDemo.sunpurple=\u592A\u9633\u7D2B +TableDemo.suspectpink=\u7591\u60D1\u7C89\u7EA2 +TableDemo.turquoise=\u9752\u7EFF\u8272 +TableDemo.violet=\u7D2B\u7F57\u5170\u8272 +TableDemo.yellow=\u9EC4\u8272 +TableDemo.2001=2001 \u592A\u7A7A\u6F2B\u6E38 +TableDemo.buckaroo=\u5929\u751F\u7231\u795E +TableDemo.firstsight=\u771F\u60C5\u96BE\u820D +TableDemo.airplane=\u7A7A\u524D\u7EDD\u540E\u6EE1\u5929\u98DE (\u5168\u7CFB\u5217) +TableDemo.aliens=\u5F02\u5F62 +TableDemo.bicycle=\u5077\u81EA\u884C\u8F66\u7684\u4EBA +TableDemo.bladerunner=\u94F6\u7FFC\u6740\u624B (\u526A\u8F91) +TableDemo.bluesbros=\u798F\u7984\u53CC\u9738\u5929 +TableDemo.brazil=\u5DF4\u897F +TableDemo.bugs=\u866B\u866B\u7279\u653B\u961F +TableDemo.city=\u7AE5\u68A6\u5931\u9B42\u591C +TableDemo.chusingura=\u6700\u540E\u7684\u5FE0\u81E3\u85CF (1962) +TableDemo.clock=\u53D1\u6761\u6A59 +TableDemo.curse=\u9B54\u9B3C\u7684\u8BC5\u5492 +TableDemo.dasboot=\u4ECE\u6D77\u5E95\u51FA\u51FB +TableDemo.dazed=\u5E74\u5C11\u8F7B\u72C2 +TableDemo.defending=\u9634\u9633\u754C\u751F\u6B7B\u604B +TableDemo.eraserhead=\u6A61\u76AE\u5934 +TableDemo.fifthelement=\u7B2C\u4E94\u5143\u7D20 +TableDemo.goodfellas=\u597D\u5BB6\u4F19 +TableDemo.harold=\u54C8\u6D1B\u4E0E\u6155\u5FB7 +TableDemo.joyluck=\u559C\u798F\u4F1A +TableDemo.jules=\u7956\u4E0E\u5360 +TableDemo.ladyvanishes=\u8D35\u5987\u5931\u8E2A\u6848 +TableDemo.mohicans=\u6700\u540E\u7684\u6469\u6839\u6218\u58EB +TableDemo.lonestar=\u5C0F\u9547\u7591\u4E91 +TableDemo.man=\u64D2\u51F6\u8BB0 +TableDemo.musicman=\u6B22\u4E50\u97F3\u4E50\u5999\u65E0\u7A77 +TableDemo.dog=\u72D7\u8138\u7684\u5C81\u6708 +TableDemo.oncewest=\u897F\u90E8\u5F80\u4E8B +TableDemo.pulpfiction=\u4F4E\u4FD7\u5C0F\u8BF4 +TableDemo.raiders=\u593A\u5B9D\u5947\u5175 +TableDemo.reservoir=\u843D\u6C34\u72D7 +TableDemo.repoman=\u91CD\u751F\u7537\u4EBA +TableDemo.spinaltap=\u6447\u6EDA\u4E07\u4E07\u5C81 +TableDemo.schindlerslist=\u8F9B\u5FB7\u52D2\u540D\u5355 +TableDemo.starwars=\u661F\u7403\u5927\u6218 +TableDemo.stuntman=\u7279\u6280\u66FF\u8EAB +TableDemo.thinman=\u7626\u5B50 +TableDemo.withnail=\u6211\u4E0E\u957F\u6307\u7532 +TableDemo.labyrinth=\u9B54\u738B\u8FF7\u5BAB +TableDemo.shawshank=\u8096\u7533\u514B\u7684\u6551\u8D4E +TableDemo.apple=\u82F9\u679C +TableDemo.asparagus=\u82A6\u7B0B +TableDemo.banana=\u9999\u8549 +TableDemo.broccoli=\u7518\u84DD +TableDemo.carrot=\u80E1\u841D\u535C +TableDemo.cantaloupe=\u9999\u74DC +TableDemo.corn=\u7389\u7C73 +TableDemo.grapes=\u8461\u8404 +TableDemo.grapefruit=\u67DA\u5B50 +TableDemo.kiwi=\u5947\u5F02\u679C +TableDemo.onion=\u6D0B\u8471 +TableDemo.pear=\u68A8 +TableDemo.peach=\u6843\u5B50 +TableDemo.pepper=\u8FA3\u6912 +TableDemo.pickle=\u6CE1\u83DC +TableDemo.pineapple=\u83E0\u841D +TableDemo.raspberry=\u8986\u76C6\u5B50 +TableDemo.sparegrass=\u7FBD\u72B6\u79BE\u8349 +TableDemo.strawberry=\u8349\u8393 +TableDemo.tomato=\u756A\u8304 +TableDemo.watermelon=\u897F\u74DC + +TableDemo.printing=\u6253\u5370 +TableDemo.fitWidth=\u9002\u5408\u5BBD\u5EA6 +TableDemo.print=\u6253\u5370 +TableDemo.header=\u9875\u7709 + +# This string will be formatted by a MessageFormat and +# printed at the top of each page of the printed result. +# You can use {0} to insert a page number. +TableDemo.headerText=JTable \u6253\u5370 + +TableDemo.footer=\u9875\u811A + +# This string will be formatted by a MessageFormat and +# printed at the bottom of each page of the printed result. +# You can use {0} to insert a page number. +TableDemo.footerText=\u7B2C {0} \u9875 + +TableDemo.printingResult=\u6253\u5370\u7ED3\u679C +TableDemo.printingComplete=\u6253\u5370\u5B8C\u6210 +TableDemo.printingCancelled=\u6253\u5370\u5DF2\u53D6\u6D88 + +# This string will be formatted by a MessageFormat and +# and displayed when an exception occurs. +# {0} is used to place details of the exception. +TableDemo.printingFailed=\u6253\u5370\u5931\u8D25: {0} + + +### ToolTip Demo ### + +ToolTipDemo.accessible_description=\u5DE5\u5177\u63D0\u793A\u4E2D\u663E\u793A\u7EC4\u4EF6\u7684\u7B80\u77ED\u5E2E\u52A9\u8BF4\u660E +ToolTipDemo.accessible_cow=\u8FD9\u662F\u5976\u725B\u3002 +ToolTipDemo.tooltip=\u5DE5\u5177\u63D0\u793A\u6F14\u793A +ToolTipDemo.name=\u5DE5\u5177\u63D0\u793A\u6F14\u793A +ToolTipDemo.bessie=\u5976\u725B Bessie +ToolTipDemo.cow=\u5976\u725B\u3002 +ToolTipDemo.got_milk=\u5F97\u5230\u5976\u4E86\u5417? +ToolTipDemo.tail=\u5C3E\u5DF4\u3002 +ToolTipDemo.moo=\u54DE +ToolTipDemo.tooltip_features=\u5982\u679C\u60A8\u4EE5\u524D\u8BA4\u4E3A\u5DE5\u5177\u6307\u793A\u662F

\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:

  • \u5217\u8868\u5F62\u5F0F
  • \u7C97\u4F53\u6587\u672C
  • \u5F3A\u8C03\u6027\u6587\u672C
  • \u5F69\u8272\u6587\u672C
  • \u4E0D\u540C\u5B57\u53F7\u7684\u6587\u672C
  • \u4EE5\u53CA\u4E0D\u540C\u7684\u5B57\u4F53
\u5BF9\u4E86, \u8FD9\u4E9B\u6587\u672C\u4E5F\u53EF\u4EE5\u662F\u591A\u884C\u6587\u672C\u3002 + + +### Tree Demo ### + +TreeDemo.accessible_description=\u6B64\u6F14\u793A\u663E\u793A\u4E86\u4F7F\u7528 JTree \u7EC4\u4EF6\u7684\u793A\u4F8B\u3002 +TreeDemo.tooltip=JTree \u6F14\u793A +TreeDemo.name=\u6811\u6F14\u793A +TreeDemo.music=\u97F3\u4E50 + diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/title.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/resources/title.html Mon Apr 09 14:27:42 2018 +0100 @@ -0,0 +1,37 @@ + + +Untitled Document + + + + +


+ MICROGRAPHIA:

+

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 .

+

+
+
+
+

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.

+


+

+
+

+
+
+ + diff -r 84a8fa684998 -r d5703ecb5b0a src/demo/share/jfc/SwingSet2/resources/tree.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/demo/share/jfc/SwingSet2/resources/tree.txt Mon Apr 09 14:27:42 2018 +0100 @@ -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 -r 84a8fa684998 -r d5703ecb5b0a src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java --- a/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java Mon Apr 09 14:27:42 2018 +0100 @@ -63,20 +63,14 @@ // maps file descriptor to selection key, synchronize on selector private final Map fdToKey = new HashMap<>(); - // pending new registrations/updates, queued by implRegister and putEventOpos + // pending new registrations/updates, queued by setEventOps private final Object updateLock = new Object(); - private final Deque newKeys = new ArrayDeque<>(); private final Deque updateKeys = new ArrayDeque<>(); - private final Deque updateEvents = new ArrayDeque<>(); // interrupt triggering and clearing private final Object interruptLock = new Object(); private boolean interruptTriggered; - /** - * Package private constructor called by factory method in - * the abstract superclass Selector. - */ EPollSelectorImpl(SelectorProvider sp) throws IOException { super(sp); @@ -140,30 +134,21 @@ } /** - * Process new registrations and changes to the interest ops. + * Process changes to the interest ops. */ private void processUpdateQueue() { assert Thread.holdsLock(this); synchronized (updateLock) { SelectionKeyImpl ski; - - // new registrations - while ((ski = newKeys.pollFirst()) != null) { + while ((ski = updateKeys.pollFirst()) != null) { if (ski.isValid()) { - int fd = ski.channel.getFDVal(); - SelectionKeyImpl previous = fdToKey.put(fd, ski); - assert previous == null; - assert ski.registeredEvents() == 0; - } - } + int fd = ski.getFDVal(); + // add to fdToKey if needed + SelectionKeyImpl previous = fdToKey.putIfAbsent(fd, ski); + assert (previous == null) || (previous == ski); - // changes to interest ops - assert updateKeys.size() == updateEvents.size(); - while ((ski = updateKeys.pollFirst()) != null) { - int newEvents = updateEvents.pollFirst(); - int fd = ski.channel.getFDVal(); - if (ski.isValid() && fdToKey.containsKey(fd)) { + int newEvents = ski.translateInterestOps(); int registeredEvents = ski.registeredEvents(); if (newEvents != registeredEvents) { if (newEvents == 0) { @@ -206,11 +191,11 @@ if (ski != null) { int rOps = EPoll.getEvents(event); if (selectedKeys.contains(ski)) { - if (ski.channel.translateAndSetReadyOps(rOps, ski)) { + if (ski.translateAndUpdateReadyOps(rOps)) { numKeysUpdated++; } } else { - ski.channel.translateAndSetReadyOps(rOps, ski); + ski.translateAndSetReadyOps(rOps); if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) { selectedKeys.add(ski); numKeysUpdated++; @@ -244,19 +229,11 @@ } @Override - protected void implRegister(SelectionKeyImpl ski) { - ensureOpen(); - synchronized (updateLock) { - newKeys.addLast(ski); - } - } - - @Override protected void implDereg(SelectionKeyImpl ski) throws IOException { assert !ski.isValid(); assert Thread.holdsLock(this); - int fd = ski.channel.getFDVal(); + int fd = ski.getFDVal(); if (fdToKey.remove(fd) != null) { if (ski.registeredEvents() != 0) { EPoll.ctl(epfd, EPOLL_CTL_DEL, fd, 0); @@ -268,10 +245,9 @@ } @Override - public void putEventOps(SelectionKeyImpl ski, int events) { + public void setEventOps(SelectionKeyImpl ski) { ensureOpen(); synchronized (updateLock) { - updateEvents.addLast(events); // events first in case adding key fails updateKeys.addLast(ski); } } diff -r 84a8fa684998 -r d5703ecb5b0a src/java.base/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java --- a/src/java.base/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java Mon Apr 09 14:27:42 2018 +0100 @@ -62,11 +62,9 @@ // maps file descriptor to selection key, synchronize on selector private final Map fdToKey = new HashMap<>(); - // pending new registrations/updates, queued by implRegister and putEventOps + // pending new registrations/updates, queued by setEventOps private final Object updateLock = new Object(); - private final Deque newKeys = new ArrayDeque<>(); private final Deque updateKeys = new ArrayDeque<>(); - private final Deque updateEvents = new ArrayDeque<>(); // interrupt triggering and clearing private final Object interruptLock = new Object(); @@ -138,30 +136,21 @@ } /** - * Process new registrations and changes to the interest ops. + * Process changes to the interest ops. */ private void processUpdateQueue() { assert Thread.holdsLock(this); synchronized (updateLock) { SelectionKeyImpl ski; - - // new registrations - while ((ski = newKeys.pollFirst()) != null) { + while ((ski = updateKeys.pollFirst()) != null) { if (ski.isValid()) { - int fd = ski.channel.getFDVal(); - SelectionKeyImpl previous = fdToKey.put(fd, ski); - assert previous == null; - assert ski.registeredEvents() == 0; - } - } + int fd = ski.getFDVal(); + // add to fdToKey if needed + SelectionKeyImpl previous = fdToKey.putIfAbsent(fd, ski); + assert (previous == null) || (previous == ski); - // changes to interest ops - assert updateKeys.size() == updateKeys.size(); - while ((ski = updateKeys.pollFirst()) != null) { - int newEvents = updateEvents.pollFirst(); - int fd = ski.channel.getFDVal(); - if (ski.isValid() && fdToKey.containsKey(fd)) { + int newEvents = ski.translateInterestOps(); int registeredEvents = ski.registeredEvents(); if (newEvents != registeredEvents) { @@ -227,18 +216,15 @@ } if (selectedKeys.contains(ski)) { - // file descriptor may be polled more than once per poll - if (ski.lastPolled != pollCount) { - if (ski.channel.translateAndSetReadyOps(rOps, ski)) { + if (ski.translateAndUpdateReadyOps(rOps)) { + // file descriptor may be polled more than once per poll + if (ski.lastPolled != pollCount) { numKeysUpdated++; ski.lastPolled = pollCount; } - } else { - // ready ops have already been set on this update - ski.channel.translateAndUpdateReadyOps(rOps, ski); } } else { - ski.channel.translateAndSetReadyOps(rOps, ski); + ski.translateAndSetReadyOps(rOps); if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) { selectedKeys.add(ski); numKeysUpdated++; @@ -273,19 +259,11 @@ } @Override - protected void implRegister(SelectionKeyImpl ski) { - ensureOpen(); - synchronized (updateLock) { - newKeys.addLast(ski); - } - } - - @Override protected void implDereg(SelectionKeyImpl ski) throws IOException { assert !ski.isValid(); assert Thread.holdsLock(this); - int fd = ski.channel.getFDVal(); + int fd = ski.getFDVal(); int registeredEvents = ski.registeredEvents(); if (fdToKey.remove(fd) != null) { if (registeredEvents != 0) { @@ -301,10 +279,9 @@ } @Override - public void putEventOps(SelectionKeyImpl ski, int events) { + public void setEventOps(SelectionKeyImpl ski) { ensureOpen(); synchronized (updateLock) { - updateEvents.addLast(events); // events first in case adding key fails updateKeys.addLast(ski); } } diff -r 84a8fa684998 -r d5703ecb5b0a src/java.base/share/classes/java/lang/Boolean.java --- a/src/java.base/share/classes/java/lang/Boolean.java Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/share/classes/java/lang/Boolean.java Mon Apr 09 14:27:42 2018 +0100 @@ -129,7 +129,7 @@ * @since 1.5 */ public static boolean parseBoolean(String s) { - return ((s != null) && s.equalsIgnoreCase("true")); + return "true".equalsIgnoreCase(s); } /** diff -r 84a8fa684998 -r d5703ecb5b0a src/java.base/share/classes/java/lang/Class.java --- a/src/java.base/share/classes/java/lang/Class.java Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/share/classes/java/lang/Class.java Mon Apr 09 14:27:42 2018 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -3529,7 +3529,7 @@ if (universe == null) throw new IllegalArgumentException( getName() + " is not an enum type"); - directory = new HashMap<>(2 * universe.length); + directory = new HashMap<>((int)(universe.length / 0.75f) + 1); for (T constant : universe) { directory.put(((Enum)constant).name(), constant); } diff -r 84a8fa684998 -r d5703ecb5b0a src/java.base/share/classes/java/lang/ClassLoader.java --- a/src/java.base/share/classes/java/lang/ClassLoader.java Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/share/classes/java/lang/ClassLoader.java Mon Apr 09 14:27:42 2018 +0100 @@ -73,7 +73,7 @@ /** * 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 @@ * } * * - *

Binary names

+ *

Binary names

* *

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 @@ // -- 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 @@ * 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 @@ } /** - * 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 @@ * 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 @@ } /** - * 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 @@ * @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 @@ } /** - * 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 @@ * @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,9 +697,9 @@ } /** - * 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 + * Class loader implementations that support loading from modules * should override this method. * * @apiNote This method returns {@code null} rather than throwing @@ -715,7 +715,7 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ * 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 @@ * * @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 @@ *

* * @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 @@ * * @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 @@ } /** - * 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 @@ * #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 @@ 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 @@ -1281,7 +1281,7 @@ /** * Returns a URL to a resource in a module defined to this class loader. - * Class loader implementations that support the loading from modules + * Class loader implementations that support loading from modules * should override this method. * * @apiNote This method is the basis for the {@link @@ -1417,12 +1417,12 @@ * @param name * The resource name * - * @return An enumeration of {@link java.net.URL URL} objects for - * the resource. If no resources could be found, the enumeration - * will be empty. Resources for which a {@code URL} cannot be - * constructed, are in package that is not opened unconditionally, - * or access to the resource is denied by the security manager, - * are not returned in the enumeration. + * @return An enumeration of {@link java.net.URL URL} objects for the + * resource. If no resources could be found, the enumeration will + * be empty. Resources for which a {@code URL} cannot be + * constructed, are in a package that is not opened + * unconditionally, or access to the resource is denied by the + * security manager, are not returned in the enumeration. * * @throws IOException * If I/O errors occur @@ -2087,9 +2087,9 @@ } /** - * 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 @@ * 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 @@ } /** - * 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 @@ } /** - * 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 @@ * 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 -r 84a8fa684998 -r d5703ecb5b0a src/java.base/share/classes/java/lang/ModuleLayer.java --- a/src/java.base/share/classes/java/lang/ModuleLayer.java Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/share/classes/java/lang/ModuleLayer.java Mon Apr 09 14:27:42 2018 +0100 @@ -152,7 +152,7 @@ private static final ModuleLayer EMPTY_LAYER = new ModuleLayer(Configuration.empty(), List.of(), null); - // the configuration from which this ;ayer was created + // the configuration from which this layer was created private final Configuration cf; // parent layers, empty in the case of the empty layer @@ -498,7 +498,7 @@ try { Loader loader = new Loader(cf.modules(), parentLoader); loader.initRemotePackageMap(cf, parents); - ModuleLayer layer = new ModuleLayer(cf, parents, mn -> loader); + ModuleLayer layer = new ModuleLayer(cf, parents, mn -> loader); return new Controller(layer); } catch (IllegalArgumentException | IllegalStateException e) { throw new LayerInstantiationException(e.getMessage()); diff -r 84a8fa684998 -r d5703ecb5b0a src/java.base/share/classes/java/lang/Runtime.java --- a/src/java.base/share/classes/java/lang/Runtime.java Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/share/classes/java/lang/Runtime.java Mon Apr 09 14:27:42 2018 +0100 @@ -1140,7 +1140,7 @@ * 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 @@ * 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 @@ * 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 @@ /** * 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 -r 84a8fa684998 -r d5703ecb5b0a src/java.base/share/classes/java/lang/SecurityManager.java --- a/src/java.base/share/classes/java/lang/SecurityManager.java Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/share/classes/java/lang/SecurityManager.java Mon Apr 09 14:27:42 2018 +0100 @@ -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 @@ */ 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 SecurityManager. * @@ -1081,28 +1068,6 @@ } /** - * 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 @@ 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 @@ -1475,35 +1402,6 @@ } /** - * 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 -r 84a8fa684998 -r d5703ecb5b0a src/java.base/share/classes/java/lang/invoke/VarHandle.java --- a/src/java.base/share/classes/java/lang/invoke/VarHandle.java Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/share/classes/java/lang/invoke/VarHandle.java Mon Apr 09 14:27:42 2018 +0100 @@ -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 @@ -1788,10 +1788,12 @@ static final Map methodNameToAccessMode; static { - // Initial capacity of # values is sufficient to avoid resizes - // for the smallest table size (32) - methodNameToAccessMode = new HashMap<>(AccessMode.values().length); - for (AccessMode am : AccessMode.values()) { + AccessMode[] values = AccessMode.values(); + // Initial capacity of # values divided by the load factor is sufficient + // to avoid resizes for the smallest table size (64) + int initialCapacity = (int)(values.length / 0.75f) + 1; + methodNameToAccessMode = new HashMap<>(initialCapacity); + for (AccessMode am : values) { methodNameToAccessMode.put(am.methodName, am); } } diff -r 84a8fa684998 -r d5703ecb5b0a src/java.base/share/classes/java/lang/module/ModuleDescriptor.java --- a/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java Mon Apr 09 14:27:42 2018 +0100 @@ -1742,7 +1742,7 @@ throw new IllegalArgumentException("Empty target set"); if (strict) { requirePackageName(e.source()); - targets.stream().forEach(Checks::requireModuleName); + targets.forEach(Checks::requireModuleName); } return exports(e); } @@ -1878,7 +1878,7 @@ throw new IllegalArgumentException("Empty target set"); if (strict) { requirePackageName(opens.source()); - targets.stream().forEach(Checks::requireModuleName); + targets.forEach(Checks::requireModuleName); } return opens(opens); } diff -r 84a8fa684998 -r d5703ecb5b0a src/java.base/share/classes/java/lang/package-info.java --- a/src/java.base/share/classes/java/lang/package-info.java Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/share/classes/java/lang/package-info.java Mon Apr 09 14:27:42 2018 +0100 @@ -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. * * - *

Character Encodings

+ *

Character Encodings

* * The specification of the {@link java.nio.charset.Charset * java.nio.charset.Charset} class describes the naming conventions diff -r 84a8fa684998 -r d5703ecb5b0a src/java.base/share/classes/java/lang/reflect/Proxy.java --- a/src/java.base/share/classes/java/lang/reflect/Proxy.java Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/share/classes/java/lang/reflect/Proxy.java Mon Apr 09 14:27:42 2018 +0100 @@ -593,8 +593,7 @@ module.getName(), cn, loader); } if (isDebug("debug")) { - interfaces.stream() - .forEach(c -> System.out.println(toDetails(c))); + interfaces.forEach(c -> System.out.println(toDetails(c))); } } diff -r 84a8fa684998 -r d5703ecb5b0a src/java.base/share/classes/java/net/InetAddress.java --- a/src/java.base/share/classes/java/net/InetAddress.java Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/share/classes/java/net/InetAddress.java Mon Apr 09 14:27:42 2018 +0100 @@ -290,7 +290,10 @@ /* Used to store the name service provider */ private static transient NameService nameService = null; - /* Used to store the best available hostname */ + /** + * Used to store the best available hostname. + * Lazily initialized via a data race; safe because Strings are immutable. + */ private transient String canonicalHostName = null; /** use serialVersionUID from JDK 1.0.2 for interoperability */ @@ -622,11 +625,11 @@ * @since 1.4 */ public String getCanonicalHostName() { - if (canonicalHostName == null) { - canonicalHostName = + String value = canonicalHostName; + if (value == null) + canonicalHostName = value = InetAddress.getHostFromNameService(this, true); - } - return canonicalHostName; + return value; } /** diff -r 84a8fa684998 -r d5703ecb5b0a src/java.base/share/classes/java/net/URL.java --- a/src/java.base/share/classes/java/net/URL.java Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/share/classes/java/net/URL.java Mon Apr 09 14:27:42 2018 +0100 @@ -1411,7 +1411,7 @@ // Check with factory if another thread set a // factory since our last check if (!checkedWithFactory && (fac = factory) != null) { - handler2 = fac.createURLStreamHandler(protocol); + handler2 = fac.createURLStreamHandler(protocol); } if (handler2 != null) { diff -r 84a8fa684998 -r d5703ecb5b0a src/java.base/share/classes/java/net/URLClassLoader.java --- a/src/java.base/share/classes/java/net/URLClassLoader.java Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/share/classes/java/net/URLClassLoader.java Mon Apr 09 14:27:42 2018 +0100 @@ -764,7 +764,7 @@ path = ParseUtil.decode(path); if (path.endsWith(File.separator)) path += "-"; - p = new FilePermission(path, SecurityConstants.FILE_READ_ACTION); + p = new FilePermission(path, SecurityConstants.FILE_READ_ACTION); } else { /** * Not loading from a 'file:' URL so we want to give the class diff -r 84a8fa684998 -r d5703ecb5b0a src/java.base/share/classes/java/net/doc-files/net-properties.html --- a/src/java.base/share/classes/java/net/doc-files/net-properties.html Mon Apr 09 12:59:06 2018 +0100 +++ b/src/java.base/share/classes/java/net/doc-files/net-properties.html Mon Apr 09 14:27:42 2018 +0100 @@ -1,6 +1,6 @@