mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-09 14:38:42 +00:00
Merge
This commit is contained in:
commit
39082eb3c0
@ -122,7 +122,7 @@ COPY_FILES += $(PSFONTPROPFILE_TARGET_FILES)
|
||||
|
||||
##########################################################################################
|
||||
#
|
||||
# Copy flavormap.properties, cursor.properties and cursors gif files to LIBDIR
|
||||
# Copy cursor.properties and cursors gif files to LIBDIR
|
||||
#
|
||||
ifneq ($(OPENJDK_TARGET_OS), macosx)
|
||||
OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
|
||||
@ -130,11 +130,6 @@ else
|
||||
OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/macosx/lib
|
||||
endif
|
||||
|
||||
$(LIBDIR)/flavormap.properties: $(OPENJDK_TARGET_OS_LIB_SRC)/flavormap.properties
|
||||
$(call install-file)
|
||||
|
||||
COPY_FILES += $(LIBDIR)/flavormap.properties
|
||||
|
||||
CURSORS_DEST_DIR = $(LIBDIR)/images/cursors
|
||||
CURSORS_OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib/images/cursors
|
||||
|
||||
|
||||
@ -163,6 +163,19 @@ $(foreach R, $(JAVAX_SOUND_RULES), $(eval $(call addto_meta-inf_services, $R)))
|
||||
|
||||
################################################################################
|
||||
|
||||
ifneq ($(OPENJDK_TARGET_OS), macosx)
|
||||
OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/awt/datatransfer/flavormap.properties
|
||||
else
|
||||
OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES = $(JDK_TOPDIR)/src/macosx/classes/sun/awt/datatransfer/flavormap.properties
|
||||
endif
|
||||
|
||||
$(JDK_OUTPUTDIR)/classes/sun/awt/datatransfer/flavormap.properties: $(OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES)
|
||||
$(install-file)
|
||||
|
||||
COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/sun/awt/datatransfer/flavormap.properties
|
||||
|
||||
################################################################################
|
||||
|
||||
CLEAN_FILES := $(wildcard \
|
||||
$(JDK_TOPDIR)/src/share/classes/com/sun/imageio/plugins/common/*.properties \
|
||||
$(JDK_TOPDIR)/src/share/classes/com/sun/java/util/jar/pack/*.properties \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -42,7 +42,7 @@ import sun.swing.BeanInfoUtils;
|
||||
*/
|
||||
|
||||
public class @(BeanClassName)BeanInfo extends javax.swing.SwingBeanInfoBase {
|
||||
private static final Class class@(BeanClassName) = @(BeanClassObject);
|
||||
private static final Class<?> class@(BeanClassName) = @(BeanClassObject);
|
||||
|
||||
/**
|
||||
* @return a @(BeanClassName) BeanDescriptor
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -67,7 +67,7 @@ public class SwingBeanInfoBase extends SimpleBeanInfo
|
||||
* its PropertyDescriptors will be included.
|
||||
*/
|
||||
public BeanInfo[] getAdditionalBeanInfo() {
|
||||
Class superClass = getBeanDescriptor().getBeanClass().getSuperclass();
|
||||
Class<?> superClass = getBeanDescriptor().getBeanClass().getSuperclass();
|
||||
BeanInfo superBeanInfo = null;
|
||||
try {
|
||||
superBeanInfo = Introspector.getBeanInfo(superClass);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -122,7 +122,7 @@ public class BeanInfoUtils
|
||||
* @see java.beans#PropertyDescriptor
|
||||
* @see java.beans#FeatureDescriptor
|
||||
*/
|
||||
public static PropertyDescriptor createPropertyDescriptor(Class cls, String name, Object[] args)
|
||||
public static PropertyDescriptor createPropertyDescriptor(Class<?> cls, String name, Object[] args)
|
||||
{
|
||||
PropertyDescriptor pd = null;
|
||||
try {
|
||||
@ -156,7 +156,7 @@ public class BeanInfoUtils
|
||||
String methodName = (String)value;
|
||||
Method method;
|
||||
try {
|
||||
method = cls.getMethod(methodName, new Class[0]);
|
||||
method = cls.getMethod(methodName, new Class<?>[0]);
|
||||
pd.setReadMethod(method);
|
||||
}
|
||||
catch(Exception e) {
|
||||
@ -168,8 +168,8 @@ public class BeanInfoUtils
|
||||
String methodName = (String)value;
|
||||
Method method;
|
||||
try {
|
||||
Class type = pd.getPropertyType();
|
||||
method = cls.getMethod(methodName, new Class[]{type});
|
||||
Class<?> type = pd.getPropertyType();
|
||||
method = cls.getMethod(methodName, new Class<?>[]{type});
|
||||
pd.setWriteMethod(method);
|
||||
}
|
||||
catch(Exception e) {
|
||||
@ -215,9 +215,9 @@ public class BeanInfoUtils
|
||||
* @see java.beans#BeanInfo
|
||||
* @see java.beans#PropertyDescriptor
|
||||
*/
|
||||
public static BeanDescriptor createBeanDescriptor(Class cls, Object[] args)
|
||||
public static BeanDescriptor createBeanDescriptor(Class<?> cls, Object[] args)
|
||||
{
|
||||
Class customizerClass = null;
|
||||
Class<?> customizerClass = null;
|
||||
|
||||
/* For reasons I don't understand, customizerClass is a
|
||||
* readOnly property. So we have to find it and pass it
|
||||
@ -242,11 +242,11 @@ public class BeanInfoUtils
|
||||
}
|
||||
|
||||
static private PropertyDescriptor createReadOnlyPropertyDescriptor(
|
||||
String name, Class cls) throws IntrospectionException {
|
||||
String name, Class<?> cls) throws IntrospectionException {
|
||||
|
||||
Method readMethod = null;
|
||||
String base = capitalize(name);
|
||||
Class[] parameters = new Class[0];
|
||||
Class<?>[] parameters = new Class<?>[0];
|
||||
|
||||
// Is it a boolean?
|
||||
try {
|
||||
@ -264,7 +264,7 @@ public class BeanInfoUtils
|
||||
|
||||
try {
|
||||
// Try indexed accessor pattern.
|
||||
parameters = new Class[1];
|
||||
parameters = new Class<?>[1];
|
||||
parameters[0] = int.class;
|
||||
readMethod = cls.getMethod("get" + base, parameters);
|
||||
} catch (NoSuchMethodException nsme) {
|
||||
|
||||
@ -90,8 +90,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LIBOSX_DIRS := \
|
||||
$(JDK_TOPDIR)/src/macosx/native/com/apple/concurrent \
|
||||
$(JDK_TOPDIR)/src/macosx/native/com/apple/eio \
|
||||
$(JDK_TOPDIR)/src/macosx/native/apple/security \
|
||||
$(JDK_TOPDIR)/src/macosx/native/apple/launcher
|
||||
$(JDK_TOPDIR)/src/macosx/native/apple/security
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBOSX, \
|
||||
LIBRARY := osx, \
|
||||
|
||||
@ -204,6 +204,7 @@ SUNWprivate_1.1 {
|
||||
Java_sun_print_CUPSPrinter_canConnect;
|
||||
Java_sun_print_CUPSPrinter_getMedia;
|
||||
Java_sun_print_CUPSPrinter_getPageSizes;
|
||||
Java_sun_print_CUPSPrinter_getResolutions;
|
||||
|
||||
Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1arrow;
|
||||
Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box;
|
||||
|
||||
@ -76,6 +76,7 @@ SUNWprivate_1.1 {
|
||||
Java_sun_print_CUPSPrinter_canConnect;
|
||||
Java_sun_print_CUPSPrinter_getMedia;
|
||||
Java_sun_print_CUPSPrinter_getPageSizes;
|
||||
Java_sun_print_CUPSPrinter_getResolutions;
|
||||
|
||||
# libfontmanager entry points
|
||||
AWTIsHeadless;
|
||||
|
||||
@ -442,6 +442,7 @@ SUNWprivate_1.1 {
|
||||
Java_sun_print_CUPSPrinter_canConnect;
|
||||
Java_sun_print_CUPSPrinter_getMedia;
|
||||
Java_sun_print_CUPSPrinter_getPageSizes;
|
||||
Java_sun_print_CUPSPrinter_getResolutions;
|
||||
|
||||
awt_GetDrawingSurface;
|
||||
awt_FreeDrawingSurface;
|
||||
|
||||
@ -177,7 +177,6 @@ FULL_JRE_LIB_FILES := \
|
||||
ext/dnsns.jar \
|
||||
ext/nashorn.jar \
|
||||
ext/zipfs.jar \
|
||||
flavormap.properties \
|
||||
fontconfig.RedHat.5.bfc \
|
||||
fontconfig.RedHat.5.properties.src \
|
||||
fontconfig.RedHat.6.bfc \
|
||||
|
||||
@ -1,318 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
2C483E05143512EB00F2AEFD /* 1.7.0.jre in Copy PlugIns */ = {isa = PBXBuildFile; fileRef = 2C483E04143512EB00F2AEFD /* 1.7.0.jre */; };
|
||||
89D3CD32142EEB2200A08AED /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 89D3CD29142EEB2200A08AED /* InfoPlist.strings */; };
|
||||
89D3CD33142EEB2200A08AED /* GenericApp.icns in Resources */ = {isa = PBXBuildFile; fileRef = 89D3CD2B142EEB2200A08AED /* GenericApp.icns */; };
|
||||
89D3CD35142EEB2200A08AED /* JVMArgs.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D3CD30142EEB2200A08AED /* JVMArgs.m */; };
|
||||
89D3CD36142EEB2200A08AED /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D3CD31142EEB2200A08AED /* main.m */; };
|
||||
89D3D365143041F000A08AED /* JavaAppLauncher.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D3D364143041F000A08AED /* JavaAppLauncher.m */; };
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
2C48F06614350F0F00F2AEFD /* Copy PlugIns */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 13;
|
||||
files = (
|
||||
2C483E05143512EB00F2AEFD /* 1.7.0.jre in Copy PlugIns */,
|
||||
);
|
||||
name = "Copy PlugIns";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
2C483E04143512EB00F2AEFD /* 1.7.0.jre */ = {isa = PBXFileReference; lastKnownFileType = folder; name = 1.7.0.jre; path = "../../../../../build/macosx-universal/j2sdk-bundle/1.7.0.jdk/Contents/Home/1.7.0.jre"; sourceTree = SOURCE_ROOT; };
|
||||
2C48F06714350F8300F2AEFD /* 1.7.0.jdk */ = {isa = PBXFileReference; lastKnownFileType = folder; name = 1.7.0.jdk; path = "../../../../../build/macosx-universal/j2sdk-bundle/1.7.0.jdk"; sourceTree = SOURCE_ROOT; };
|
||||
2CB5DA5E14355FCA00D3A656 /* classfile_constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = classfile_constants.h; sourceTree = "<group>"; };
|
||||
2CB5DA6014355FCA00D3A656 /* jawt_md.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jawt_md.h; sourceTree = "<group>"; };
|
||||
2CB5DA6114355FCA00D3A656 /* jni_md.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jni_md.h; sourceTree = "<group>"; };
|
||||
2CB5DA6214355FCA00D3A656 /* jawt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jawt.h; sourceTree = "<group>"; };
|
||||
2CB5DA6314355FCA00D3A656 /* jdwpTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jdwpTransport.h; sourceTree = "<group>"; };
|
||||
2CB5DA6414355FCA00D3A656 /* jni.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jni.h; sourceTree = "<group>"; };
|
||||
2CB5DA6514355FCA00D3A656 /* jvmti.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jvmti.h; sourceTree = "<group>"; };
|
||||
2CB5DA6614355FCA00D3A656 /* jvmticmlr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jvmticmlr.h; sourceTree = "<group>"; };
|
||||
89D3CD2A142EEB2200A08AED /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
89D3CD2B142EEB2200A08AED /* GenericApp.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = GenericApp.icns; path = /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/GenericApp.icns; sourceTree = "<absolute>"; };
|
||||
89D3CD2C142EEB2200A08AED /* JavaAppLauncher-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "JavaAppLauncher-Info.plist"; sourceTree = "<group>"; };
|
||||
89D3CD2E142EEB2200A08AED /* JavaAppLauncher_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaAppLauncher_Prefix.pch; sourceTree = "<group>"; };
|
||||
89D3CD2F142EEB2200A08AED /* JVMArgs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JVMArgs.h; sourceTree = "<group>"; };
|
||||
89D3CD30142EEB2200A08AED /* JVMArgs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JVMArgs.m; sourceTree = "<group>"; };
|
||||
89D3CD31142EEB2200A08AED /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
89D3D363143041F000A08AED /* JavaAppLauncher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaAppLauncher.h; sourceTree = "<group>"; };
|
||||
89D3D364143041F000A08AED /* JavaAppLauncher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavaAppLauncher.m; sourceTree = "<group>"; };
|
||||
8D1107320486CEB800E47090 /* JavaAppLauncher.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JavaAppLauncher.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D11072E0486CEB800E47090 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
1058C7A0FEA54F0111CA2CBB /* frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
|
||||
);
|
||||
name = frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D1107320486CEB800E47090 /* JavaAppLauncher.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97314FDCFA39411CA2CEA /* JavaAppLauncher */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
89D3CD2D142EEB2200A08AED /* src */,
|
||||
89D3CD28142EEB2200A08AED /* resources */,
|
||||
29B97323FDCFA39411CA2CEA /* linking */,
|
||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||
);
|
||||
name = JavaAppLauncher;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97323FDCFA39411CA2CEA /* linking */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2C48F06714350F8300F2AEFD /* 1.7.0.jdk */,
|
||||
2C483E04143512EB00F2AEFD /* 1.7.0.jre */,
|
||||
2CB5DA5D14355FCA00D3A656 /* include */,
|
||||
1058C7A0FEA54F0111CA2CBB /* frameworks */,
|
||||
);
|
||||
name = linking;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2CB5DA5D14355FCA00D3A656 /* include */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2CB5DA5E14355FCA00D3A656 /* classfile_constants.h */,
|
||||
2CB5DA5F14355FCA00D3A656 /* darwin */,
|
||||
2CB5DA6214355FCA00D3A656 /* jawt.h */,
|
||||
2CB5DA6314355FCA00D3A656 /* jdwpTransport.h */,
|
||||
2CB5DA6414355FCA00D3A656 /* jni.h */,
|
||||
2CB5DA6514355FCA00D3A656 /* jvmti.h */,
|
||||
2CB5DA6614355FCA00D3A656 /* jvmticmlr.h */,
|
||||
);
|
||||
name = include;
|
||||
path = "../../../../../build/macosx-universal/j2sdk-bundle/1.7.0.jdk/Contents/Home/include";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2CB5DA5F14355FCA00D3A656 /* darwin */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2CB5DA6014355FCA00D3A656 /* jawt_md.h */,
|
||||
2CB5DA6114355FCA00D3A656 /* jni_md.h */,
|
||||
);
|
||||
path = darwin;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
89D3CD28142EEB2200A08AED /* resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
89D3CD29142EEB2200A08AED /* InfoPlist.strings */,
|
||||
89D3CD2B142EEB2200A08AED /* GenericApp.icns */,
|
||||
89D3CD2C142EEB2200A08AED /* JavaAppLauncher-Info.plist */,
|
||||
);
|
||||
path = resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
89D3CD2D142EEB2200A08AED /* src */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
89D3CD31142EEB2200A08AED /* main.m */,
|
||||
89D3D363143041F000A08AED /* JavaAppLauncher.h */,
|
||||
89D3D364143041F000A08AED /* JavaAppLauncher.m */,
|
||||
89D3CD2F142EEB2200A08AED /* JVMArgs.h */,
|
||||
89D3CD30142EEB2200A08AED /* JVMArgs.m */,
|
||||
89D3CD2E142EEB2200A08AED /* JavaAppLauncher_Prefix.pch */,
|
||||
);
|
||||
path = src;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D1107260486CEB800E47090 /* JavaAppLauncher */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "JavaAppLauncher" */;
|
||||
buildPhases = (
|
||||
8D1107290486CEB800E47090 /* Resources */,
|
||||
2C48F06614350F0F00F2AEFD /* Copy PlugIns */,
|
||||
8D11072C0486CEB800E47090 /* Sources */,
|
||||
8D11072E0486CEB800E47090 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = JavaAppLauncher;
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = JavaAppLauncher;
|
||||
productReference = 8D1107320486CEB800E47090 /* JavaAppLauncher.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "JavaAppLauncher" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
en,
|
||||
English,
|
||||
);
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* JavaAppLauncher */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8D1107260486CEB800E47090 /* JavaAppLauncher */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D1107290486CEB800E47090 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
89D3CD32142EEB2200A08AED /* InfoPlist.strings in Resources */,
|
||||
89D3CD33142EEB2200A08AED /* GenericApp.icns in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D11072C0486CEB800E47090 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
89D3CD35142EEB2200A08AED /* JVMArgs.m in Sources */,
|
||||
89D3CD36142EEB2200A08AED /* main.m in Sources */,
|
||||
89D3D365143041F000A08AED /* JavaAppLauncher.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
89D3CD29142EEB2200A08AED /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
89D3CD2A142EEB2200A08AED /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
C01FCF4B08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = src/JavaAppLauncher_Prefix.pch;
|
||||
INFOPLIST_FILE = "resources/JavaAppLauncher-Info.plist";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
PRODUCT_NAME = JavaAppLauncher;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C01FCF4C08A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = src/JavaAppLauncher_Prefix.pch;
|
||||
INFOPLIST_FILE = "resources/JavaAppLauncher-Info.plist";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
PRODUCT_NAME = JavaAppLauncher;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
C01FCF4F08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C01FCF5008A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "JavaAppLauncher" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4B08A954540054247B /* Debug */,
|
||||
C01FCF4C08A954540054247B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "JavaAppLauncher" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4F08A954540054247B /* Debug */,
|
||||
C01FCF5008A954540054247B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
}
|
||||
@ -1,2 +0,0 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
||||
@ -1,48 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>GenericApp.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Your Cool App</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2011 Your Company Inc. All Rights Reserved.</string>
|
||||
<key>JVMInfo</key>
|
||||
<dict>
|
||||
<key>JRE</key>
|
||||
<string>1.7.0.jre</string>
|
||||
<key>ClassPath</key>
|
||||
<array/>
|
||||
<key>Properties</key>
|
||||
<dict>
|
||||
<key>apple.laf.useScreenMenuBar</key>
|
||||
<string>true</string>
|
||||
</dict>
|
||||
<key>MainClass</key>
|
||||
<string>com.yourcompany.yourapp.mainclass</string>
|
||||
<key>Arguments</key>
|
||||
<array/>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -1,62 +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.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#import "jni.h"
|
||||
|
||||
|
||||
@interface JVMArgs : NSObject {
|
||||
@public
|
||||
NSBundle *jreBundle;
|
||||
char *preferredJVMLib;
|
||||
JavaVMInitArgs vm_args;
|
||||
BOOL startOnFirstThread;
|
||||
BOOL debug;
|
||||
|
||||
NSDictionary *appInfo;
|
||||
NSMutableDictionary *jvmInfo;
|
||||
|
||||
NSString *userHome;
|
||||
NSString *appPackage;
|
||||
NSString *javaRoot;
|
||||
}
|
||||
|
||||
@property (retain, nonatomic) NSBundle *jreBundle;
|
||||
@property (nonatomic) char *preferredJVMLib;
|
||||
@property (nonatomic) JavaVMInitArgs vm_args;
|
||||
@property (nonatomic) BOOL startOnFirstThread;
|
||||
@property (nonatomic) BOOL debug;
|
||||
|
||||
@property (retain, nonatomic) NSDictionary *appInfo;
|
||||
@property (retain, nonatomic) NSMutableDictionary *jvmInfo;
|
||||
|
||||
@property (retain, nonatomic) NSString *userHome;
|
||||
@property (retain, nonatomic) NSString *appPackage;
|
||||
@property (retain, nonatomic) NSString *javaRoot;
|
||||
|
||||
+ (JVMArgs *)jvmArgsForBundle:(NSBundle *)appBundle argc:(int)argc argv:(char *[])argv;
|
||||
|
||||
@end
|
||||
@ -1,236 +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.
|
||||
*/
|
||||
|
||||
#import "JVMArgs.h"
|
||||
|
||||
|
||||
#define kArgsFailure "JVMArgsFailure"
|
||||
|
||||
NSString *kArgumentsKey = @"Arguments";
|
||||
|
||||
NSString *kClassPathKey = @"ClassPath";
|
||||
#ifdef __i386__
|
||||
NSString *kArchClassPathKey = @"ClassPath.i386";
|
||||
#elif __x86_64__
|
||||
NSString *kArchClassPathKey = @"ClassPath.x86_64";
|
||||
#endif
|
||||
|
||||
NSString *kVMOptionsKey = @"VMOptions";
|
||||
#ifdef __i386__
|
||||
NSString *kArchVMOptionsKey = @"VMOptions.i386";
|
||||
#elif __x86_64__
|
||||
NSString *kArchVMOptionsKey = @"VMOptions.x86_64";
|
||||
#endif
|
||||
|
||||
|
||||
@implementation JVMArgs
|
||||
|
||||
@synthesize jreBundle;
|
||||
@synthesize preferredJVMLib;
|
||||
@synthesize vm_args;
|
||||
@synthesize startOnFirstThread;
|
||||
@synthesize debug;
|
||||
|
||||
@synthesize appInfo;
|
||||
@synthesize jvmInfo;
|
||||
|
||||
@synthesize userHome;
|
||||
@synthesize appPackage;
|
||||
@synthesize javaRoot;
|
||||
|
||||
- (void) dealloc {
|
||||
self.jreBundle = nil;
|
||||
if (self.preferredJVMLib) free(self.preferredJVMLib);
|
||||
|
||||
self.appInfo = nil;
|
||||
self.jvmInfo = nil;
|
||||
|
||||
self.userHome = nil;
|
||||
self.appPackage = nil;
|
||||
self.javaRoot = nil;
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
NSString *GetJavaRoot(NSDictionary *jvmInfoDict) {
|
||||
NSObject *javaRoot = [jvmInfoDict objectForKey:@"$JAVAROOT"];
|
||||
if (![javaRoot isKindOfClass:[NSString class]]) return @"$APP_PACKAGE/Contents/Java";
|
||||
return (NSString *)javaRoot;
|
||||
}
|
||||
|
||||
// Replaces occurances of $JAVAROOT, $APP_PACKAGE, and $USER_HOME
|
||||
- (NSString *) expandMacros:(NSString *)str {
|
||||
if ([str rangeOfString:@"$JAVAROOT"].length == 0 && [str rangeOfString:@"$APP_PACKAGE"].length == 0 && [str rangeOfString:@"$USER_HOME"].length == 0) return str;
|
||||
|
||||
// expand $JAVAROOT first, because it can contain $APP_PACKAGE
|
||||
NSMutableString *mutable = [str mutableCopy];
|
||||
[mutable replaceOccurrencesOfString:@"$JAVAROOT" withString:javaRoot options:0 range:NSMakeRange(0, [str length])];
|
||||
[mutable replaceOccurrencesOfString:@"$APP_PACKAGE" withString:appPackage options:0 range:NSMakeRange(0, [str length])];
|
||||
[mutable replaceOccurrencesOfString:@"$USER_HOME" withString:userHome options:0 range:NSMakeRange(0, [str length])];
|
||||
return mutable;
|
||||
}
|
||||
|
||||
- (NSArray *) arrayFrom:(id) obj delimitedBy:(NSString *)delimiter withErrKey:(NSString *)key {
|
||||
if (obj == nil) return nil;
|
||||
if ([obj isKindOfClass:[NSArray class]]) return obj;
|
||||
if (![obj isKindOfClass:[NSString class]]) {
|
||||
[NSException raise:@kArgsFailure format:@"%@", [NSString stringWithFormat:@"Failed to find '%@' array in JVMInfo Info.plist"]];
|
||||
}
|
||||
|
||||
// split
|
||||
return [(NSString *)obj componentsSeparatedByString:delimiter];
|
||||
}
|
||||
|
||||
- (void) buildArgsForBundle:(NSBundle *)appBundle argc:(int)argc argv:(char *[])argv {
|
||||
// for verbose logging
|
||||
self.debug = NULL != getenv("JAVA_LAUNCHER_VERBOSE");
|
||||
|
||||
self.appInfo = [appBundle infoDictionary];
|
||||
|
||||
// all apps must have a JVMInfo dictionary inside their Info.plist
|
||||
self.jvmInfo = [[self.appInfo objectForKey:@"JVMInfo"] mutableCopy];
|
||||
if (![jvmInfo isKindOfClass:[NSDictionary class]]) {
|
||||
[NSException raise:@kArgsFailure format:@"Failed to find 'JVMInfo' dictionary in Info.plist"];
|
||||
}
|
||||
|
||||
// initialize macro expansion values
|
||||
self.userHome = NSHomeDirectory();
|
||||
self.appPackage = [appBundle bundlePath];
|
||||
self.javaRoot = GetJavaRoot(jvmInfo);
|
||||
self.javaRoot = [self expandMacros:self.javaRoot]; // dereference $APP_PACKAGE
|
||||
|
||||
// if the 'Arguments' key is defined, those override the ones that came into main()
|
||||
NSArray *jvmInfoArgs = [jvmInfo valueForKey:kArgumentsKey];
|
||||
if (jvmInfoArgs != nil) {
|
||||
// substitute all the variables in the 'Arguments' array/string
|
||||
jvmInfoArgs = [self arrayFrom:jvmInfoArgs delimitedBy:@" " withErrKey:kArgumentsKey];
|
||||
NSMutableArray *arguments = [NSMutableArray arrayWithCapacity:[jvmInfoArgs count]];
|
||||
[jvmInfoArgs enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
[arguments replaceObjectAtIndex:idx withObject:[self expandMacros:[obj description]]];
|
||||
}];
|
||||
[jvmInfo setObject:arguments forKey:kArgumentsKey];
|
||||
} else if (argc != 0) {
|
||||
// put the (macro expanded) args to main() in an NSArray
|
||||
NSMutableArray *arguments = [NSMutableArray arrayWithCapacity:argc];
|
||||
for (int i = 0; i < argc; i++) {
|
||||
[arguments addObject:[self expandMacros:[NSString stringWithUTF8String:(argv[i])]]];
|
||||
}
|
||||
[jvmInfo setObject:arguments forKey:kArgumentsKey];
|
||||
}
|
||||
|
||||
// all JVMInfo's must have a JRE or JDK key
|
||||
NSString *jreBundleName = [jvmInfo objectForKey:@"JRE"];
|
||||
if (!jreBundleName) jreBundleName = [jvmInfo objectForKey:@"JDK"];
|
||||
if (![jreBundleName isKindOfClass:[NSString class]]) {
|
||||
[NSException raise:@kArgsFailure format:@"Failed to find 'JRE' or 'JDK' string in Info.plist JVMInfo"];
|
||||
}
|
||||
|
||||
// the JRE/JDK must be loadable from the ($APP_PACKAGE)/Contents/PlugIns/ directory
|
||||
NSURL *jreBundleURL = [[appBundle builtInPlugInsURL] URLByAppendingPathComponent:jreBundleName];
|
||||
self.jreBundle = [NSBundle bundleWithURL:jreBundleURL];
|
||||
if (!self.jreBundle) {
|
||||
[NSException raise:@kArgsFailure format:@"Failed to find JRE/JDK at: %@", jreBundleURL];
|
||||
}
|
||||
|
||||
// if the app prefers 'client' or 'server', use the JVM key
|
||||
NSString *JVMLib = [jvmInfo objectForKey:@"JVM"];
|
||||
if (JVMLib != nil) self.preferredJVMLib = strdup([JVMLib UTF8String]);
|
||||
|
||||
// sniff for StartOnFirstThread
|
||||
if ([[jvmInfo objectForKey:@"StartOnFirstThread"] boolValue]) {
|
||||
self.startOnFirstThread = YES;
|
||||
} else if ([[jvmInfo objectForKey:@"StartOnMainThread"] boolValue]) {
|
||||
// for key compatibility with the Apple JavaApplicationStub's 'Java' dictionary
|
||||
self.startOnFirstThread = YES;
|
||||
}
|
||||
|
||||
// add $JAVAROOT directory to the JNI library search path
|
||||
setenv("JAVA_LIBRARY_PATH", [javaRoot UTF8String], 1);
|
||||
|
||||
// 'WorkingDirectory' key changes current working directory
|
||||
NSString *javaWorkingDir = [jvmInfo objectForKey:@"WorkingDirectory"];
|
||||
if (javaWorkingDir == nil) javaWorkingDir = @"$APP_PACKAGE/..";
|
||||
javaWorkingDir = [self expandMacros:javaWorkingDir];
|
||||
if (chdir([javaWorkingDir UTF8String]) == -1) {
|
||||
NSLog(@kArgsFailure " chdir() failed, could not change the current working directory to %s\n", [javaWorkingDir UTF8String]);
|
||||
}
|
||||
|
||||
NSMutableArray *classpath = [NSMutableArray array];
|
||||
|
||||
// 'Jar' key sets exactly one classpath entry
|
||||
NSString *jarFile = [jvmInfo objectForKey:@"Jar"];
|
||||
if (jarFile != nil) {
|
||||
[jvmInfo setObject:[self expandMacros:jarFile] forKey:@"Jar"];
|
||||
[classpath addObject:jarFile];
|
||||
}
|
||||
|
||||
// 'ClassPath' key allows arbitrary classpath
|
||||
[classpath addObjectsFromArray:[self arrayFrom:[jvmInfo objectForKey:kClassPathKey] delimitedBy:@":" withErrKey:kClassPathKey]];
|
||||
[classpath addObjectsFromArray:[self arrayFrom:[jvmInfo objectForKey:kArchClassPathKey] delimitedBy:@":" withErrKey:kArchClassPathKey]];
|
||||
|
||||
// Sum up all the classpath entries into one big JVM arg
|
||||
NSMutableString *classpathOption = [NSMutableString stringWithString:@"-Djava.class.path="];
|
||||
[classpath enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
if (idx > 1) [classpathOption appendString:@":"];
|
||||
[classpathOption appendString:obj];
|
||||
}];
|
||||
|
||||
NSMutableArray *jvmOptions = [NSMutableArray arrayWithObject:classpathOption];
|
||||
|
||||
// 'VMOptions' key allows arbitary VM start up options
|
||||
[jvmOptions addObjectsFromArray:[self arrayFrom:[jvmInfo objectForKey:kVMOptionsKey] delimitedBy:@" " withErrKey:kVMOptionsKey]];
|
||||
[jvmOptions addObjectsFromArray:[self arrayFrom:[jvmInfo objectForKey:kArchVMOptionsKey] delimitedBy:@" " withErrKey:kArchVMOptionsKey]];
|
||||
|
||||
// 'Properties' key is a sub-dictionary transfered to initial System.properties
|
||||
NSDictionary *properties = [jvmInfo objectForKey:@"Properties"];
|
||||
if (properties != nil) {
|
||||
if (![properties isKindOfClass:[NSDictionary class]]) {
|
||||
[NSException raise:@kArgsFailure format:@"Failed to find 'Properties' dictionary in Info.plist JVMInfo"];
|
||||
}
|
||||
|
||||
[properties enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
|
||||
[jvmOptions addObject:[NSString stringWithFormat:@"-D%@=%@", key, obj]];
|
||||
}];
|
||||
}
|
||||
|
||||
// build the real JVM init args struct
|
||||
vm_args.version = JNI_VERSION_1_6;
|
||||
vm_args.ignoreUnrecognized = JNI_TRUE;
|
||||
vm_args.nOptions = [jvmOptions count];
|
||||
vm_args.options = calloc(vm_args.nOptions, sizeof(JavaVMOption));
|
||||
[jvmOptions enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
NSString *expanded = [self expandMacros:[obj description]]; // turn everything into a string, and expand macros
|
||||
vm_args.options[idx].optionString = strdup([expanded UTF8String]);
|
||||
}];
|
||||
}
|
||||
|
||||
+ (JVMArgs *)jvmArgsForBundle:(NSBundle *)appBundle argc:(int)argc argv:(char *[])argv {
|
||||
JVMArgs *args = [JVMArgs new];
|
||||
[args buildArgsForBundle:appBundle argc:argc argv:argv];
|
||||
return [args autorelease];
|
||||
}
|
||||
|
||||
@end
|
||||
@ -1,133 +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.
|
||||
*/
|
||||
|
||||
#import "JavaAppLauncher.h"
|
||||
|
||||
#import <dlfcn.h>
|
||||
|
||||
#import "jni.h"
|
||||
|
||||
#define kLaunchFailure "JavaAppLauncherFailure"
|
||||
|
||||
|
||||
typedef jint (JNICALL *CreateJavaVM_t)(JavaVM **pvm, void **env, void *args);
|
||||
typedef void (JNICALL *SetPreferredJVM_t)(const char *prefJVM);
|
||||
|
||||
|
||||
@implementation JavaAppLauncher
|
||||
|
||||
@synthesize args;
|
||||
|
||||
- (void) findAndLoadJVM {
|
||||
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||
|
||||
@try {
|
||||
// load the libjli.dylib of the embedded JRE (or JDK) bundle
|
||||
NSURL *jreBundleURL = [args.jreBundle bundleURL];
|
||||
CFBundleRef jreBundle = CFBundleCreate(NULL, (CFURLRef)jreBundleURL);
|
||||
|
||||
NSError *err = nil;
|
||||
Boolean jreBundleLoaded = CFBundleLoadExecutableAndReturnError(jreBundle, (CFErrorRef *)&err);
|
||||
if (err != nil || !jreBundleLoaded) {
|
||||
[NSException raise:@kLaunchFailure format:@"could not load the JRE/JDK: %@", err];
|
||||
}
|
||||
|
||||
// if there is a preferred libjvm to load, set it here
|
||||
if (args.preferredJVMLib != NULL) {
|
||||
SetPreferredJVM_t setPrefJVMFxnPtr = CFBundleGetFunctionPointerForName(jreBundle, CFSTR("JLI_SetPreferredJVM"));
|
||||
if (setPrefJVMFxnPtr != NULL) {
|
||||
setPrefJVMFxnPtr(args.preferredJVMLib);
|
||||
} else {
|
||||
NSLog(@"No JLI_SetPreferredJVM in JRE/JDK primary executable, failed to set preferred JVM library to: %s", args->preferredJVMLib);
|
||||
}
|
||||
}
|
||||
|
||||
// pull the JNI_CreateJavaVM function pointer out of the primary executable of the JRE/JDK bundle
|
||||
CreateJavaVM_t createJVMFxnPtr = CFBundleGetFunctionPointerForName(jreBundle, CFSTR("JNI_CreateJavaVM"));
|
||||
if (createJVMFxnPtr == NULL) {
|
||||
[NSException raise:@kLaunchFailure format:@"null JNI_CreateJavaVM fxn ptr from: %@", jreBundle];
|
||||
}
|
||||
|
||||
// instantiate the JVM
|
||||
JNIEnv *env;
|
||||
jint createJVMStatus = createJVMFxnPtr(&jvm, (void **)&env, &(args->vm_args));
|
||||
if (createJVMStatus != JNI_OK) {
|
||||
[NSException raise:@kLaunchFailure format:@"failed to JNI_CreateJavaVM (%d): %@", createJVMStatus, jreBundle];
|
||||
}
|
||||
|
||||
// check the app needs to run the Java main() on the main thread
|
||||
if (args.startOnFirstThread) {
|
||||
dispatch_sync(dispatch_get_main_queue(), ^(void) {
|
||||
JNIEnv *mainThreadEnv;
|
||||
(*jvm)->AttachCurrentThread(jvm, (void **)&mainThreadEnv, NULL);
|
||||
[self invokeBundledAppJavaLauncherWithEnv:mainThreadEnv];
|
||||
(*jvm)->DetachCurrentThread(jvm);
|
||||
});
|
||||
} else {
|
||||
[self invokeBundledAppJavaLauncherWithEnv:env];
|
||||
}
|
||||
|
||||
} @catch (NSException *e) {
|
||||
NSLog(@"%@: %@", e, [e callStackSymbols]);
|
||||
}
|
||||
|
||||
if (jvm) {
|
||||
(*jvm)->DetachCurrentThread(jvm);
|
||||
(*jvm)->DestroyJavaVM(jvm);
|
||||
}
|
||||
|
||||
[pool drain];
|
||||
}
|
||||
|
||||
static const char kLauncherClassName[] = "apple/launcher/JavaAppLauncher";
|
||||
|
||||
- (void) invokeBundledAppJavaLauncherWithEnv:(JNIEnv *)env {
|
||||
// hand off control to the apple.launcher.JavaAppLauncher class
|
||||
|
||||
jclass mainClass = (*env)->FindClass(env, kLauncherClassName);
|
||||
if (mainClass == NULL) {
|
||||
fprintf(stderr, kLaunchFailure " FindClass() failed for class %s:\n", kLauncherClassName);
|
||||
(*env)->ExceptionDescribe(env);
|
||||
return;
|
||||
}
|
||||
|
||||
jmethodID mainMethod = (*env)->GetStaticMethodID(env, mainClass, "launch", "(JZ)V");
|
||||
if ((mainMethod == NULL) || (*env)->ExceptionOccurred(env)) {
|
||||
fprintf(stderr, kLaunchFailure " GetStaticMethodID() failed for launch() method");
|
||||
(*env)->ExceptionDescribe(env);
|
||||
return;
|
||||
}
|
||||
|
||||
CFDictionaryRef jvmInfo = CFRetain(args.jvmInfo);
|
||||
|
||||
(*env)->CallStaticVoidMethod(env, mainClass, mainMethod, (jlong)jvmInfo, (jboolean)args.debug);
|
||||
if ((*env)->ExceptionOccurred(env)) {
|
||||
fprintf(stderr, kLaunchFailure " CallStaticVoidMethod() threw an exception\n");
|
||||
(*env)->ExceptionDescribe(env);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@ -1,80 +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.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#import "JVMArgs.h"
|
||||
#import "JavaAppLauncher.h"
|
||||
|
||||
|
||||
static void dummyTimer(CFRunLoopTimerRef timer, void *info) {}
|
||||
static void ParkEventLoop() {
|
||||
// RunLoop needs at least one source, and 1e20 is pretty far into the future
|
||||
CFRunLoopTimerRef t = CFRunLoopTimerCreate(kCFAllocatorDefault, 1.0e20, 0.0, 0, 0, dummyTimer, NULL);
|
||||
CFRunLoopAddTimer(CFRunLoopGetCurrent(), t, kCFRunLoopDefaultMode);
|
||||
CFRelease(t);
|
||||
|
||||
// Park this thread in the main run loop.
|
||||
int32_t result;
|
||||
do {
|
||||
result = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1.0e20, false);
|
||||
} while (result != kCFRunLoopRunFinished);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||
|
||||
@try {
|
||||
NSBundle *mainBundle = [NSBundle mainBundle];
|
||||
|
||||
// pick apart the Info.plist, and release all the temporary objects
|
||||
NSAutoreleasePool *argParsingPool = [NSAutoreleasePool new];
|
||||
JVMArgs *args = [JVMArgs jvmArgsForBundle:mainBundle argc:argc argv:argv];
|
||||
JavaAppLauncher *launcher = [JavaAppLauncher new];
|
||||
launcher.args = args;
|
||||
[argParsingPool drain];
|
||||
|
||||
// kick off a new thread to instantiate the JVM on
|
||||
NSThread *thread = [[NSThread alloc] initWithTarget:launcher selector:@selector(findAndLoadJVM) object:nil];
|
||||
struct rlimit limit;
|
||||
int err = getrlimit(RLIMIT_STACK, &limit);
|
||||
if (err == 0 && limit.rlim_cur != 0LL) {
|
||||
[thread setStackSize:limit.rlim_cur];
|
||||
}
|
||||
[thread start];
|
||||
[thread release];
|
||||
|
||||
[launcher release];
|
||||
|
||||
ParkEventLoop();
|
||||
|
||||
} @catch (NSException *e) {
|
||||
NSLog(@"%@: %@", e, [e callStackSymbols]);
|
||||
}
|
||||
|
||||
[pool drain];
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1,239 +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.
|
||||
*/
|
||||
|
||||
package apple.launcher;
|
||||
|
||||
import java.io.*;
|
||||
import java.lang.reflect.*;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.*;
|
||||
import java.util.jar.*;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
class JavaAppLauncher implements Runnable {
|
||||
static {
|
||||
java.security.AccessController.doPrivileged(
|
||||
new java.security.PrivilegedAction<Void>() {
|
||||
public Void run() {
|
||||
System.loadLibrary("osx");
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static native <T> T nativeConvertAndRelease(final long ptr);
|
||||
private static native void nativeInvokeNonPublic(Class<? extends Method> cls, Method m, String[] args);
|
||||
|
||||
// entry point from native
|
||||
static void launch(final long javaDictionaryPtr, final boolean verbose) {
|
||||
final Map<String, ?> javaDictionary = nativeConvertAndRelease(javaDictionaryPtr);
|
||||
(new JavaAppLauncher(javaDictionary, verbose)).run();
|
||||
}
|
||||
|
||||
// these are the values for the enumeration JavaFailureMode
|
||||
static final String kJavaFailureMainClassNotSpecified = "MainClassNotSpecified";
|
||||
static final String kJavaFailureMainClassNotFound = "CannotLoadMainClass";
|
||||
static final String kJavaFailureMainClassHasNoMain = "NoMainMethod";
|
||||
static final String kJavaFailureMainClassMainNotStatic = "MainNotStatic";
|
||||
static final String kJavaFailureMainThrewException = "MainThrewException";
|
||||
static final String kJavaFailureMainInitializerException = "MainInitializerException";
|
||||
|
||||
final boolean verbose; // Normally set by environment variable JAVA_LAUNCHER_VERBOSE.
|
||||
final Map<String, ?> javaDictionary;
|
||||
|
||||
JavaAppLauncher(final Map<String, ?> javaDictionary, final boolean verbose) {
|
||||
this.verbose = verbose;
|
||||
this.javaDictionary = javaDictionary;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
final Method m = loadMainMethod(getMainMethod());
|
||||
final String methodName = m.getDeclaringClass().getName() + ".main(String[])";
|
||||
try {
|
||||
log("Calling " + methodName + " method");
|
||||
m.invoke(null, new Object[] { getArguments() });
|
||||
log(methodName + " has returned");
|
||||
} catch (final IllegalAccessException x) {
|
||||
try {
|
||||
nativeInvokeNonPublic(m.getClass(), m, getArguments());
|
||||
} catch (final Throwable excpt) {
|
||||
logError(methodName + " threw an exception:");
|
||||
if ((excpt instanceof UnsatisfiedLinkError) && excpt.getMessage().equals("nativeInvokeNonPublic")) {
|
||||
showFailureAlertAndKill(kJavaFailureMainThrewException, "nativeInvokeNonPublic not registered");
|
||||
} else {
|
||||
excpt.printStackTrace();
|
||||
showFailureAlertAndKill(kJavaFailureMainThrewException, excpt.toString());
|
||||
}
|
||||
}
|
||||
} catch (final InvocationTargetException invokeExcpt) {
|
||||
logError(methodName + " threw an exception:");
|
||||
invokeExcpt.getTargetException().printStackTrace();
|
||||
showFailureAlertAndKill(kJavaFailureMainThrewException, invokeExcpt.getTargetException().toString());
|
||||
}
|
||||
}
|
||||
|
||||
Method loadMainMethod(final String mainClassName) {
|
||||
try {
|
||||
final Class<?> mainClass = Class.forName(mainClassName, true, sun.misc.Launcher.getLauncher().getClassLoader());
|
||||
final Method mainMethod = mainClass.getDeclaredMethod("main", new Class[] { String[].class });
|
||||
if ((mainMethod.getModifiers() & Modifier.STATIC) == 0) {
|
||||
logError("The main(String[]) method of class " + mainClassName + " is not static!");
|
||||
showFailureAlertAndKill(kJavaFailureMainClassMainNotStatic, mainClassName);
|
||||
}
|
||||
return mainMethod;
|
||||
} catch (final ExceptionInInitializerError x) {
|
||||
logError("The main class \"" + mainClassName + "\" had a static initializer throw an exception.");
|
||||
x.getException().printStackTrace();
|
||||
showFailureAlertAndKill(kJavaFailureMainInitializerException, x.getException().toString());
|
||||
} catch (final ClassNotFoundException x) {
|
||||
logError("The main class \"" + mainClassName + "\" could not be found.");
|
||||
showFailureAlertAndKill(kJavaFailureMainClassNotFound, mainClassName);
|
||||
} catch (final NoSuchMethodException x) {
|
||||
logError("The main class \"" + mainClassName + "\" has no static main(String[]) method.");
|
||||
showFailureAlertAndKill(kJavaFailureMainClassHasNoMain, mainClassName);
|
||||
} catch (final NullPointerException x) {
|
||||
logError("No main class specified");
|
||||
showFailureAlertAndKill(kJavaFailureMainClassNotSpecified, null);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// get main class name from 'Jar' key, or 'MainClass' key
|
||||
String getMainMethod() {
|
||||
final Object javaJar = javaDictionary.get("Jar");
|
||||
if (javaJar != null) {
|
||||
if (!(javaJar instanceof String)) {
|
||||
logError("'Jar' key in 'Java' sub-dictionary of Info.plist requires a string value");
|
||||
return null;
|
||||
}
|
||||
|
||||
final String jarPath = (String)javaJar;
|
||||
if (jarPath.length() == 0) {
|
||||
log("'Jar' key of sub-dictionary 'Java' of Info.plist key is empty");
|
||||
} else {
|
||||
// extract main class from manifest of this jar
|
||||
final String main = getMainFromManifest(jarPath);
|
||||
if (main == null) {
|
||||
logError("jar file '" + jarPath + "' does not have Main-Class: attribute in its manifest");
|
||||
return null;
|
||||
}
|
||||
|
||||
log("Main class " + main + " found in jar manifest");
|
||||
return main;
|
||||
}
|
||||
}
|
||||
|
||||
final Object javaMain = javaDictionary.get("MainClass");
|
||||
if (!(javaMain instanceof String)) {
|
||||
logError("'MainClass' key in 'Java' sub-dictionary of Info.plist requires a string value");
|
||||
return null;
|
||||
}
|
||||
|
||||
final String main = (String)javaMain;
|
||||
if (main.length() == 0) {
|
||||
log("'MainClass' key of sub-dictionary 'Java' of Info.plist key is empty");
|
||||
return null;
|
||||
}
|
||||
|
||||
log("Main class " + (String)javaMain + " found via 'MainClass' key of sub-dictionary 'Java' of Info.plist key");
|
||||
return (String)javaMain;
|
||||
}
|
||||
|
||||
// get arguments for main(String[]) out of Info.plist and command line
|
||||
String[] getArguments() {
|
||||
// check for 'Arguments' key, which contains the main() args if not defined in Info.plist
|
||||
final Object javaArguments = javaDictionary.get("Arguments");
|
||||
if (javaArguments == null) {
|
||||
// no arguments
|
||||
log("No arguments for main(String[]) specified");
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
if (javaArguments instanceof List) {
|
||||
final List<?> args = (List<?>)javaArguments;
|
||||
final int count = args.size();
|
||||
log("Arguments to main(String[" + count + "]):");
|
||||
|
||||
final String[] result = new String[count];
|
||||
for (int i = 0; i < count; ++i) {
|
||||
final Object element = args.get(i);
|
||||
if (element instanceof String) {
|
||||
result[i] = (String)element;
|
||||
} else {
|
||||
logError("Found non-string in array");
|
||||
}
|
||||
log(" arg[" + i + "]=" + result[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
logError("'Arguments' key in 'Java' sub-dictionary of Info.plist requires a string value or an array of strings");
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
// returns name of main class, or null
|
||||
String getMainFromManifest(final String jarpath) {
|
||||
JarFile jar = null;
|
||||
try {
|
||||
jar = new JarFile(jarpath);
|
||||
final Manifest man = jar.getManifest();
|
||||
final Attributes attr = man.getMainAttributes();
|
||||
return attr.getValue("Main-Class");
|
||||
} catch (final IOException x) {
|
||||
// shrug
|
||||
} finally {
|
||||
if (jar != null) {
|
||||
try {
|
||||
jar.close();
|
||||
} catch (final IOException x) { }
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
void log(final String s) {
|
||||
if (!verbose) return;
|
||||
System.out.println("[LaunchRunner] " + s);
|
||||
}
|
||||
|
||||
static void logError(final String s) {
|
||||
System.err.println("[LaunchRunner Error] " + s);
|
||||
}
|
||||
|
||||
// This kills the app and does not return!
|
||||
static void showFailureAlertAndKill(final String msg, String arg) {
|
||||
if (arg == null) arg = "<<null>>";
|
||||
JOptionPane.showMessageDialog(null, getMessage(msg, arg), "", JOptionPane.ERROR_MESSAGE);
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
static String getMessage(final String msgKey, final Object ... args) {
|
||||
final String msg = ResourceBundle.getBundle("appLauncherErrors").getString(msgKey);
|
||||
return MessageFormat.format(msg, args);
|
||||
}
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
MainClassNotSpecified=No main class specified.
|
||||
CannotLoadMainClass=The main class \u201C{0}\u201D could not be loaded.
|
||||
NoMainMethod=The main class \u201C{0}\u201D has no \u201Cvoid main(String[])\u201D method.
|
||||
MainNotStatic=The \u201Cmain(String[])\u201D method of class \u201C{0}\u201D is not static.
|
||||
MainThrewException=Uncaught exception in main method: {0}
|
||||
MainInitializerException=A static initializer of the main class threw an exception: {0}
|
||||
@ -74,19 +74,19 @@ public final class KeychainStore extends KeyStoreSpi {
|
||||
* Entries that have been deleted. When something calls engineStore we'll
|
||||
* remove them from the keychain.
|
||||
*/
|
||||
private Hashtable deletedEntries = new Hashtable();
|
||||
private Hashtable<String, Object> deletedEntries = new Hashtable<>();
|
||||
|
||||
/**
|
||||
* Entries that have been added. When something calls engineStore we'll
|
||||
* add them to the keychain.
|
||||
*/
|
||||
private Hashtable addedEntries = new Hashtable();
|
||||
private Hashtable<String, Object> addedEntries = new Hashtable<>();
|
||||
|
||||
/**
|
||||
* Private keys and certificates are stored in a hashtable.
|
||||
* Hash entries are keyed by alias names.
|
||||
*/
|
||||
private Hashtable entries = new Hashtable();
|
||||
private Hashtable<String, Object> entries = new Hashtable<>();
|
||||
|
||||
/**
|
||||
* Algorithm identifiers and corresponding OIDs for the contents of the PKCS12 bag we get from the Keychain.
|
||||
@ -471,7 +471,7 @@ public final class KeychainStore extends KeyStoreSpi {
|
||||
|
||||
// This will be slow, but necessary. Enumerate the values and then see if the cert matches the one in the trusted cert entry.
|
||||
// Security framework doesn't support the same certificate twice in a keychain.
|
||||
Collection allValues = entries.values();
|
||||
Collection<Object> allValues = entries.values();
|
||||
|
||||
for (Object value : allValues) {
|
||||
if (value instanceof TrustedCertEntry) {
|
||||
@ -517,7 +517,7 @@ public final class KeychainStore extends KeyStoreSpi {
|
||||
*
|
||||
* @return enumeration of the alias names
|
||||
*/
|
||||
public Enumeration engineAliases() {
|
||||
public Enumeration<String> engineAliases() {
|
||||
permissionCheck();
|
||||
return entries.keys();
|
||||
}
|
||||
@ -598,8 +598,8 @@ public final class KeychainStore extends KeyStoreSpi {
|
||||
permissionCheck();
|
||||
Certificate certElem;
|
||||
|
||||
for (Enumeration e = entries.keys(); e.hasMoreElements(); ) {
|
||||
String alias = (String)e.nextElement();
|
||||
for (Enumeration<String> e = entries.keys(); e.hasMoreElements(); ) {
|
||||
String alias = e.nextElement();
|
||||
Object entry = entries.get(alias);
|
||||
if (entry instanceof TrustedCertEntry) {
|
||||
certElem = ((TrustedCertEntry)entry).cert;
|
||||
@ -634,8 +634,8 @@ public final class KeychainStore extends KeyStoreSpi {
|
||||
permissionCheck();
|
||||
|
||||
// Delete items that do have a keychain item ref.
|
||||
for (Enumeration e = deletedEntries.keys(); e.hasMoreElements(); ) {
|
||||
String alias = (String)e.nextElement();
|
||||
for (Enumeration<String> e = deletedEntries.keys(); e.hasMoreElements(); ) {
|
||||
String alias = e.nextElement();
|
||||
Object entry = deletedEntries.get(alias);
|
||||
if (entry instanceof TrustedCertEntry) {
|
||||
if (((TrustedCertEntry)entry).certRef != 0) {
|
||||
@ -664,8 +664,8 @@ public final class KeychainStore extends KeyStoreSpi {
|
||||
|
||||
// Add all of the certs or keys in the added entries.
|
||||
// No need to check for 0 refs, as they are in the added list.
|
||||
for (Enumeration e = addedEntries.keys(); e.hasMoreElements(); ) {
|
||||
String alias = (String)e.nextElement();
|
||||
for (Enumeration<String> e = addedEntries.keys(); e.hasMoreElements(); ) {
|
||||
String alias = e.nextElement();
|
||||
Object entry = addedEntries.get(alias);
|
||||
if (entry instanceof TrustedCertEntry) {
|
||||
TrustedCertEntry tce = (TrustedCertEntry)entry;
|
||||
@ -730,8 +730,8 @@ public final class KeychainStore extends KeyStoreSpi {
|
||||
|
||||
// Release any stray keychain references before clearing out the entries.
|
||||
synchronized(entries) {
|
||||
for (Enumeration e = entries.keys(); e.hasMoreElements(); ) {
|
||||
String alias = (String)e.nextElement();
|
||||
for (Enumeration<String> e = entries.keys(); e.hasMoreElements(); ) {
|
||||
String alias = e.nextElement();
|
||||
Object entry = entries.get(alias);
|
||||
if (entry instanceof TrustedCertEntry) {
|
||||
if (((TrustedCertEntry)entry).certRef != 0) {
|
||||
@ -816,7 +816,7 @@ public final class KeychainStore extends KeyStoreSpi {
|
||||
|
||||
// Next, create X.509 Certificate objects from the raw data. This is complicated
|
||||
// because a certificate's public key may be too long for Java's default encryption strength.
|
||||
List createdCerts = new ArrayList();
|
||||
List<CertKeychainItemPair> createdCerts = new ArrayList<>();
|
||||
|
||||
try {
|
||||
CertificateFactory cf = CertificateFactory.getInstance("X.509");
|
||||
@ -842,12 +842,12 @@ public final class KeychainStore extends KeyStoreSpi {
|
||||
|
||||
// We have our certificates in the List, so now extract them into an array of
|
||||
// Certificates and SecCertificateRefs.
|
||||
Object[] objArray = createdCerts.toArray();
|
||||
CertKeychainItemPair[] objArray = createdCerts.toArray(new CertKeychainItemPair[0]);
|
||||
Certificate[] certArray = new Certificate[objArray.length];
|
||||
long[] certRefArray = new long[objArray.length];
|
||||
|
||||
for (int i = 0; i < objArray.length; i++) {
|
||||
CertKeychainItemPair addedItem = (CertKeychainItemPair)objArray[i];
|
||||
CertKeychainItemPair addedItem = objArray[i];
|
||||
certArray[i] = addedItem.mCert;
|
||||
certRefArray[i] = addedItem.mCertificateRef;
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ class _AppDockIconHandler {
|
||||
|
||||
static Creator getCImageCreator() {
|
||||
try {
|
||||
final Method getCreatorMethod = CImage.class.getDeclaredMethod("getCreator", new Class[] {});
|
||||
final Method getCreatorMethod = CImage.class.getDeclaredMethod("getCreator", new Class<?>[] {});
|
||||
getCreatorMethod.setAccessible(true);
|
||||
return (Creator)getCreatorMethod.invoke(null, new Object[] {});
|
||||
} catch (final Throwable e) {
|
||||
|
||||
@ -75,7 +75,7 @@ public abstract class AquaBorder implements Border, UIResource {
|
||||
protected AquaBorder deriveBorderForSize(final Size size) {
|
||||
try {
|
||||
final Class<? extends AquaBorder> clazz = getClass();
|
||||
final AquaBorder border = clazz.getConstructor(new Class[] { clazz }).newInstance(new Object[] { this });
|
||||
final AquaBorder border = clazz.getConstructor(new Class<?>[] { clazz }).newInstance(new Object[] { this });
|
||||
border.setSize(size);
|
||||
return border;
|
||||
} catch (final Throwable e) {
|
||||
|
||||
@ -35,8 +35,8 @@ import apple.laf.JRSUIConstants.*;
|
||||
|
||||
@SuppressWarnings("serial") // Superclass is not serializable across versions
|
||||
class AquaComboBoxButton extends JButton {
|
||||
final protected JComboBox comboBox;
|
||||
final protected JList list;
|
||||
final protected JComboBox<Object> comboBox;
|
||||
final protected JList<?> list;
|
||||
final protected CellRendererPane rendererPane;
|
||||
final protected AquaComboBoxUI ui;
|
||||
|
||||
@ -45,7 +45,10 @@ class AquaComboBoxButton extends JButton {
|
||||
boolean isSquare;
|
||||
|
||||
@SuppressWarnings("serial") // anonymous class
|
||||
protected AquaComboBoxButton(final AquaComboBoxUI ui, final JComboBox comboBox, final CellRendererPane rendererPane, final JList list) {
|
||||
protected AquaComboBoxButton(final AquaComboBoxUI ui,
|
||||
final JComboBox<Object> comboBox,
|
||||
final CellRendererPane rendererPane,
|
||||
final JList<?> list) {
|
||||
super("");
|
||||
putClientProperty("JButton.buttonType", "comboboxInternal");
|
||||
|
||||
@ -163,7 +166,7 @@ class AquaComboBoxButton extends JButton {
|
||||
}
|
||||
|
||||
protected void doRendererPaint(final Graphics g, final ButtonModel buttonModel, final boolean editable, final Insets insets, int left, int top, int width, int height) {
|
||||
final ListCellRenderer renderer = comboBox.getRenderer();
|
||||
final ListCellRenderer<Object> renderer = comboBox.getRenderer();
|
||||
|
||||
// fake it out! not renderPressed
|
||||
final Component c = renderer.getListCellRendererComponent(list, comboBox.getSelectedItem(), -1, false, false);
|
||||
|
||||
@ -43,7 +43,7 @@ class AquaComboBoxPopup extends BasicComboPopup {
|
||||
protected Component bottomStrut;
|
||||
protected boolean isPopDown = false;
|
||||
|
||||
public AquaComboBoxPopup(final JComboBox cBox) {
|
||||
public AquaComboBoxPopup(final JComboBox<Object> cBox) {
|
||||
super(cBox);
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ class AquaComboBoxPopup extends BasicComboPopup {
|
||||
final int rowCount = Math.min(maxRowCount, currentElementCount);
|
||||
|
||||
final Dimension popupSize = new Dimension();
|
||||
final ListCellRenderer renderer = list.getCellRenderer();
|
||||
final ListCellRenderer<Object> renderer = list.getCellRenderer();
|
||||
|
||||
for (int i = 0; i < rowCount; i++) {
|
||||
final Object value = list.getModel().getElementAt(i);
|
||||
@ -149,8 +149,8 @@ class AquaComboBoxPopup extends BasicComboPopup {
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("serial") // anonymous class
|
||||
protected JList createList() {
|
||||
return new JList(comboBox.getModel()) {
|
||||
protected JList<Object> createList() {
|
||||
return new JList<Object>(comboBox.getModel()) {
|
||||
@Override
|
||||
public void processMouseEvent(MouseEvent e) {
|
||||
if (e.isMetaDown()) {
|
||||
|
||||
@ -29,8 +29,8 @@ import javax.swing.*;
|
||||
import javax.swing.plaf.UIResource;
|
||||
|
||||
@SuppressWarnings("serial") // Superclass is not serializable across versions
|
||||
class AquaComboBoxRenderer extends AquaComboBoxRendererInternal implements UIResource {
|
||||
public AquaComboBoxRenderer(final JComboBox comboBox) {
|
||||
class AquaComboBoxRenderer extends AquaComboBoxRendererInternal<Object> implements UIResource {
|
||||
public AquaComboBoxRenderer(final JComboBox<?> comboBox) {
|
||||
super(comboBox);
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,8 +31,8 @@ import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
@SuppressWarnings("serial") // Superclass is not serializable across versions
|
||||
class AquaComboBoxRendererInternal extends JLabel implements ListCellRenderer {
|
||||
final JComboBox fComboBox;
|
||||
class AquaComboBoxRendererInternal<E> extends JLabel implements ListCellRenderer<E> {
|
||||
final JComboBox<?> fComboBox;
|
||||
boolean fSelected;
|
||||
boolean fChecked;
|
||||
boolean fInList;
|
||||
@ -40,7 +40,7 @@ class AquaComboBoxRendererInternal extends JLabel implements ListCellRenderer {
|
||||
boolean fDrawCheckedItem = true;
|
||||
|
||||
// Provides space for a checkbox, and is translucent
|
||||
public AquaComboBoxRendererInternal(final JComboBox comboBox) {
|
||||
public AquaComboBoxRendererInternal(final JComboBox<?> comboBox) {
|
||||
super();
|
||||
fComboBox = comboBox;
|
||||
}
|
||||
@ -72,7 +72,10 @@ class AquaComboBoxRendererInternal extends JLabel implements ListCellRenderer {
|
||||
}
|
||||
|
||||
// Really means is the one with the mouse over it
|
||||
public Component getListCellRendererComponent(final JList list, final Object value, int index, final boolean isSelected, final boolean cellHasFocus) {
|
||||
public Component getListCellRendererComponent(final JList<? extends E> list,
|
||||
final E value, int index,
|
||||
final boolean isSelected,
|
||||
final boolean cellHasFocus) {
|
||||
fInList = (index >= 0); // When the button wants the item painted, it passes in -1
|
||||
fSelected = isSelected;
|
||||
if (index < 0) {
|
||||
|
||||
@ -102,13 +102,13 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
if (now - 1000 < lastBlink) return;
|
||||
lastBlink = now;
|
||||
|
||||
final JList itemList = popup.getList();
|
||||
final JList<Object> itemList = popup.getList();
|
||||
final ListUI listUI = itemList.getUI();
|
||||
if (!(listUI instanceof AquaListUI)) return;
|
||||
final AquaListUI aquaListUI = (AquaListUI)listUI;
|
||||
|
||||
final int selectedIndex = comboBox.getSelectedIndex();
|
||||
final ListModel dataModel = itemList.getModel();
|
||||
final ListModel<Object> dataModel = itemList.getModel();
|
||||
if (dataModel == null) return;
|
||||
|
||||
final Object value = dataModel.getElementAt(selectedIndex);
|
||||
@ -125,7 +125,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
// this space intentionally left blank
|
||||
}
|
||||
|
||||
protected ListCellRenderer createRenderer() {
|
||||
protected ListCellRenderer<Object> createRenderer() {
|
||||
return new AquaComboBoxRenderer(comboBox);
|
||||
}
|
||||
|
||||
@ -185,7 +185,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
|
||||
final Object text = editor.getText();
|
||||
|
||||
final ListModel model = listBox.getModel();
|
||||
final ListModel<Object> model = listBox.getModel();
|
||||
final int items = model.getSize();
|
||||
for (int i = 0; i < items; i++) {
|
||||
final Object element = model.getElementAt(i);
|
||||
@ -423,7 +423,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
return;
|
||||
}
|
||||
|
||||
final JComboBox cb = (JComboBox)parent;
|
||||
final JComboBox<?> cb = (JComboBox<?>) parent;
|
||||
final int width = cb.getWidth();
|
||||
final int height = cb.getHeight();
|
||||
|
||||
@ -450,11 +450,11 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
return Boolean.TRUE.equals(c.getClientProperty(AquaComboBoxUI.IS_TABLE_CELL_EDITOR));
|
||||
}
|
||||
|
||||
protected static boolean isPopdown(final JComboBox c) {
|
||||
protected static boolean isPopdown(final JComboBox<?> c) {
|
||||
return c.isEditable() || Boolean.TRUE.equals(c.getClientProperty(AquaComboBoxUI.POPDOWN_CLIENT_PROPERTY_KEY));
|
||||
}
|
||||
|
||||
protected static void triggerSelectionEvent(final JComboBox comboBox, final ActionEvent e) {
|
||||
protected static void triggerSelectionEvent(final JComboBox<?> comboBox, final ActionEvent e) {
|
||||
if (!comboBox.isEnabled()) return;
|
||||
|
||||
final AquaComboBoxUI aquaUi = (AquaComboBoxUI)comboBox.getUI();
|
||||
@ -505,7 +505,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
@SuppressWarnings("serial") // anonymous class
|
||||
private static final Action toggleSelectionAction = new AbstractAction() {
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
final JComboBox comboBox = (JComboBox)e.getSource();
|
||||
final JComboBox<?> comboBox = (JComboBox<?>) e.getSource();
|
||||
if (!comboBox.isEnabled()) return;
|
||||
if (comboBox.isEditable()) return;
|
||||
|
||||
@ -525,7 +525,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
private final Action hideAction = new AbstractAction() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
final JComboBox comboBox = (JComboBox)e.getSource();
|
||||
final JComboBox<?> comboBox = (JComboBox<?>) e.getSource();
|
||||
comboBox.firePopupMenuCanceled();
|
||||
comboBox.setPopupVisible(false);
|
||||
}
|
||||
@ -588,10 +588,11 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
static final RecyclableSingleton<ClientPropertyApplicator<JComboBox, AquaComboBoxUI>> APPLICATOR = new RecyclableSingleton<ClientPropertyApplicator<JComboBox, AquaComboBoxUI>>() {
|
||||
static final RecyclableSingleton<ClientPropertyApplicator<JComboBox<?>, AquaComboBoxUI>> APPLICATOR = new
|
||||
RecyclableSingleton<ClientPropertyApplicator<JComboBox<?>, AquaComboBoxUI>>() {
|
||||
@Override
|
||||
protected ClientPropertyApplicator<JComboBox, AquaComboBoxUI> getInstance() {
|
||||
return new ClientPropertyApplicator<JComboBox, AquaComboBoxUI>(
|
||||
protected ClientPropertyApplicator<JComboBox<?>, AquaComboBoxUI> getInstance() {
|
||||
return new ClientPropertyApplicator<JComboBox<?>, AquaComboBoxUI>(
|
||||
new Property<AquaComboBoxUI>(AquaFocusHandler.FRAME_ACTIVE_PROPERTY) {
|
||||
public void applyProperty(final AquaComboBoxUI target, final Object value) {
|
||||
if (Boolean.FALSE.equals(value)) {
|
||||
@ -633,7 +634,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
}
|
||||
}
|
||||
) {
|
||||
public AquaComboBoxUI convertJComponentToTarget(final JComboBox combo) {
|
||||
public AquaComboBoxUI convertJComponentToTarget(final JComboBox<?> combo) {
|
||||
final ComboBoxUI comboUI = combo.getUI();
|
||||
if (comboUI instanceof AquaComboBoxUI) return (AquaComboBoxUI)comboUI;
|
||||
return null;
|
||||
@ -641,7 +642,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
};
|
||||
}
|
||||
};
|
||||
static ClientPropertyApplicator<JComboBox, AquaComboBoxUI> getApplicator() {
|
||||
static ClientPropertyApplicator<JComboBox<?>, AquaComboBoxUI> getApplicator() {
|
||||
return APPLICATOR.get();
|
||||
}
|
||||
}
|
||||
|
||||
@ -724,6 +724,7 @@ public class AquaFileChooserUI extends FileChooserUI {
|
||||
final Transferable transferable = dtde.getTransferable();
|
||||
|
||||
try {
|
||||
@SuppressWarnings("unchecked")
|
||||
final java.util.List<File> fileList = (java.util.List<File>)transferable.getTransferData(DataFlavor.javaFileListFlavor);
|
||||
dropFiles(fileList.toArray(new File[fileList.size()]));
|
||||
dtde.dropComplete(true);
|
||||
@ -1144,11 +1145,14 @@ public class AquaFileChooserUI extends FileChooserUI {
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial") // anonymous class
|
||||
protected ListCellRenderer createDirectoryComboBoxRenderer(final JFileChooser fc) {
|
||||
return new AquaComboBoxRendererInternal(directoryComboBox) {
|
||||
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) {
|
||||
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
|
||||
final File directory = (File)value;
|
||||
protected ListCellRenderer<File> createDirectoryComboBoxRenderer(final JFileChooser fc) {
|
||||
return new AquaComboBoxRendererInternal<File>(directoryComboBox) {
|
||||
public Component getListCellRendererComponent(final JList<? extends File> list,
|
||||
final File directory,
|
||||
final int index,
|
||||
final boolean isSelected,
|
||||
final boolean cellHasFocus) {
|
||||
super.getListCellRendererComponent(list, directory, index, isSelected, cellHasFocus);
|
||||
if (directory == null) {
|
||||
setText("");
|
||||
return this;
|
||||
@ -1173,7 +1177,7 @@ public class AquaFileChooserUI extends FileChooserUI {
|
||||
* Data model for a type-face selection combo-box.
|
||||
*/
|
||||
@SuppressWarnings("serial") // Superclass is not serializable across versions
|
||||
protected class DirectoryComboBoxModel extends AbstractListModel implements ComboBoxModel {
|
||||
protected class DirectoryComboBoxModel extends AbstractListModel<File> implements ComboBoxModel<File> {
|
||||
Vector<File> fDirectories = new Vector<File>();
|
||||
int topIndex = -1;
|
||||
int fPathCount = 0;
|
||||
@ -1248,7 +1252,7 @@ public class AquaFileChooserUI extends FileChooserUI {
|
||||
return fDirectories.size();
|
||||
}
|
||||
|
||||
public Object getElementAt(final int index) {
|
||||
public File getElementAt(final int index) {
|
||||
return fDirectories.elementAt(index);
|
||||
}
|
||||
}
|
||||
@ -1257,11 +1261,14 @@ public class AquaFileChooserUI extends FileChooserUI {
|
||||
// Renderer for Types ComboBox
|
||||
//
|
||||
@SuppressWarnings("serial") // anonymous class
|
||||
protected ListCellRenderer createFilterComboBoxRenderer() {
|
||||
return new AquaComboBoxRendererInternal(filterComboBox) {
|
||||
public Component getListCellRendererComponent(final JList list, final Object value, final int index, final boolean isSelected, final boolean cellHasFocus) {
|
||||
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
|
||||
final FileFilter filter = (FileFilter)value;
|
||||
protected ListCellRenderer<FileFilter> createFilterComboBoxRenderer() {
|
||||
return new AquaComboBoxRendererInternal<FileFilter>(filterComboBox) {
|
||||
public Component getListCellRendererComponent(final JList<? extends FileFilter> list,
|
||||
final FileFilter filter,
|
||||
final int index,
|
||||
final boolean isSelected,
|
||||
final boolean cellHasFocus) {
|
||||
super.getListCellRendererComponent(list, filter, index, isSelected, cellHasFocus);
|
||||
if (filter != null) setText(filter.getDescription());
|
||||
return this;
|
||||
}
|
||||
@ -1356,7 +1363,7 @@ public class AquaFileChooserUI extends FileChooserUI {
|
||||
}
|
||||
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
getFileChooser().setFileFilter((FileFilter)filterComboBox.getSelectedItem());
|
||||
getFileChooser().setFileFilter((FileFilter) filterComboBox.getSelectedItem());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1503,7 +1510,7 @@ public class AquaFileChooserUI extends FileChooserUI {
|
||||
fTextfieldPanel.add(tPanel, BorderLayout.CENTER);
|
||||
|
||||
// DirectoryComboBox, left-justified, 200x20 not including drop shadow
|
||||
directoryComboBox = new JComboBox();
|
||||
directoryComboBox = new JComboBox<>();
|
||||
directoryComboBox.putClientProperty("JComboBox.lightweightKeyboardNavigation", "Lightweight");
|
||||
fDirectoryComboBoxModel = createDirectoryComboBoxModel(fc);
|
||||
directoryComboBox.setModel(fDirectoryComboBoxModel);
|
||||
@ -1551,7 +1558,7 @@ public class AquaFileChooserUI extends FileChooserUI {
|
||||
// Combobox
|
||||
filterComboBoxModel = createFilterComboBoxModel();
|
||||
fc.addPropertyChangeListener(filterComboBoxModel);
|
||||
filterComboBox = new JComboBox(filterComboBoxModel);
|
||||
filterComboBox = new JComboBox<>(filterComboBoxModel);
|
||||
formatLabel.setLabelFor(filterComboBox);
|
||||
filterComboBox.setRenderer(createFilterComboBoxRenderer());
|
||||
d = new Dimension(220, (int)filterComboBox.getMinimumSize().getHeight());
|
||||
@ -1788,7 +1795,7 @@ public class AquaFileChooserUI extends FileChooserUI {
|
||||
}
|
||||
}
|
||||
|
||||
JComboBox directoryComboBox;
|
||||
JComboBox<File> directoryComboBox;
|
||||
DirectoryComboBoxModel fDirectoryComboBoxModel;
|
||||
private final Action directoryComboBoxAction = new DirectoryComboBoxAction();
|
||||
|
||||
@ -1797,7 +1804,7 @@ public class AquaFileChooserUI extends FileChooserUI {
|
||||
JTableExtension fFileList;
|
||||
|
||||
private FilterComboBoxModel filterComboBoxModel;
|
||||
JComboBox filterComboBox;
|
||||
JComboBox<FileFilter> filterComboBox;
|
||||
private final Action filterComboBoxAction = new FilterComboBoxAction();
|
||||
|
||||
private static final Dimension hstrut10 = new Dimension(10, 1);
|
||||
|
||||
@ -131,7 +131,7 @@ public class AquaFocusHandler implements FocusListener, PropertyChangeListener {
|
||||
c.setSelectionBackground(UIManager.getColor(bgName));
|
||||
}
|
||||
|
||||
static void swapSelectionColors(final String prefix, final JList c, final Object value) {
|
||||
static void swapSelectionColors(final String prefix, final JList<?> c, final Object value) {
|
||||
if (!isComponentValid(c)) return;
|
||||
|
||||
final Color bg = c.getSelectionBackground();
|
||||
@ -149,7 +149,7 @@ public class AquaFocusHandler implements FocusListener, PropertyChangeListener {
|
||||
}
|
||||
}
|
||||
|
||||
static void setSelectionColors(final JList c, final String fgName, final String bgName) {
|
||||
static void setSelectionColors(final JList<?> c, final String fgName, final String bgName) {
|
||||
c.setSelectionForeground(UIManager.getColor(fgName));
|
||||
c.setSelectionBackground(UIManager.getColor(bgName));
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ public class AquaListUI extends BasicListUI {
|
||||
* For a Home action, scrolls to the top. Otherwise, scroll to the end.
|
||||
*/
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
final JList list = (JList)e.getSource();
|
||||
final JList<?> list = (JList<?>)e.getSource();
|
||||
|
||||
if (fHomeAction) {
|
||||
list.ensureIndexIsVisible(0);
|
||||
@ -135,7 +135,7 @@ public class AquaListUI extends BasicListUI {
|
||||
}*/
|
||||
}
|
||||
|
||||
JList getComponent() {
|
||||
JList<Object> getComponent() {
|
||||
return list;
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ public class AquaListUI extends BasicListUI {
|
||||
final Rectangle rowBounds = getCellBounds(list, selectedIndex, selectedIndex);
|
||||
if (rowBounds == null) return;
|
||||
|
||||
final ListCellRenderer renderer = list.getCellRenderer();
|
||||
final ListCellRenderer<Object> renderer = list.getCellRenderer();
|
||||
if (renderer == null) return;
|
||||
|
||||
final Component rendererComponent = renderer.getListCellRendererComponent(list, value, selectedIndex, selected, true);
|
||||
|
||||
@ -3820,7 +3820,7 @@ public class AquaTabbedPaneCopyFromBasicUI extends TabbedPaneUI implements Swing
|
||||
_loader = null;
|
||||
final Class<?> klass = (Class<?>)loader;
|
||||
try {
|
||||
final java.lang.reflect.Method method = klass.getDeclaredMethod("loadActionMap", new Class[] { LazyActionMap.class });
|
||||
final java.lang.reflect.Method method = klass.getDeclaredMethod("loadActionMap", new Class<?>[] { LazyActionMap.class });
|
||||
method.invoke(klass, new Object[] { this });
|
||||
} catch (final NoSuchMethodException nsme) {
|
||||
assert false : "LazyActionMap unable to load actions " + klass;
|
||||
|
||||
@ -69,6 +69,7 @@ public class AquaTableHeaderUI extends BasicTableHeaderUI {
|
||||
|
||||
final static RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>> TABLE_HEADER_APPLICATORS = new RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>>() {
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
protected ClientPropertyApplicator<JTableHeader, JTableHeader> getInstance() {
|
||||
return new ClientPropertyApplicator<JTableHeader, JTableHeader>(
|
||||
new Property<JTableHeader>("JTableHeader.selectedColumn") {
|
||||
|
||||
@ -121,7 +121,7 @@ public class AquaUtilControlSize {
|
||||
try {
|
||||
// see if this component has a "getUI" method
|
||||
final Class<? extends JComponent> clazz = c.getClass();
|
||||
final Method getUIMethod = clazz.getMethod("getUI", new Class[0]);
|
||||
final Method getUIMethod = clazz.getMethod("getUI", new Class<?>[0]);
|
||||
|
||||
// see if that UI is one of ours that understands sizing
|
||||
final Object ui = getUIMethod.invoke(c, new Object[0]);
|
||||
|
||||
@ -82,7 +82,8 @@ final class AquaUtils {
|
||||
@Override
|
||||
public Creator run() {
|
||||
try {
|
||||
final Method getCreatorMethod = CImage.class.getDeclaredMethod("getCreator", new Class[] {});
|
||||
final Method getCreatorMethod = CImage.class.getDeclaredMethod(
|
||||
"getCreator", new Class<?>[] {});
|
||||
getCreatorMethod.setAccessible(true);
|
||||
return (Creator)getCreatorMethod.invoke(null, new Object[] {});
|
||||
} catch (final Exception ignored) {
|
||||
@ -383,7 +384,8 @@ final class AquaUtils {
|
||||
@Override
|
||||
public Method run() {
|
||||
try {
|
||||
final Method method = JComponent.class.getDeclaredMethod("getFlag", new Class[] { int.class });
|
||||
final Method method = JComponent.class.getDeclaredMethod(
|
||||
"getFlag", new Class<?>[] { int.class });
|
||||
method.setAccessible(true);
|
||||
return method;
|
||||
} catch (final Throwable ignored) {
|
||||
|
||||
@ -33,6 +33,7 @@ import javax.swing.JComponent;
|
||||
public class ClientPropertyApplicator<T extends JComponent, N> implements PropertyChangeListener {
|
||||
private final Map<String, Property<N>> properties = new HashMap<String, Property<N>>();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public ClientPropertyApplicator(final Property<N>... propertyList) {
|
||||
for (final Property<N> p : propertyList) {
|
||||
properties.put(p.name, p);
|
||||
|
||||
@ -25,6 +25,9 @@
|
||||
|
||||
package com.apple.laf;
|
||||
|
||||
import sun.awt.AWTAccessor;
|
||||
import sun.lwawt.macosx.CMenuBar;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.lang.reflect.*;
|
||||
@ -243,54 +246,25 @@ public class ScreenMenuBar extends MenuBar implements ContainerListener, ScreenM
|
||||
fSubmenus.remove(menu);
|
||||
}
|
||||
|
||||
private static Field[] stolenFields = null;
|
||||
|
||||
static {
|
||||
stolenFields = AccessController.doPrivileged(new PrivilegedAction<Field[]>() {
|
||||
public Field[] run() {
|
||||
try {
|
||||
final Field[] localFields = new Field[2];
|
||||
localFields[0] = MenuBar.class.getDeclaredField("menus");
|
||||
localFields[1] = MenuComponent.class.getDeclaredField("parent");
|
||||
AccessibleObject.setAccessible(localFields, true);
|
||||
return localFields;
|
||||
} catch (final NoSuchFieldException nsf) {
|
||||
// If this happens, Sun changed the definition of MenuBar and MenuComponent!
|
||||
nsf.printStackTrace(System.err);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
public Menu add(final Menu m, final int index) {
|
||||
synchronized (getTreeLock()) {
|
||||
if (m.getParent() != null) {
|
||||
m.getParent().remove(m);
|
||||
}
|
||||
|
||||
// Use nasty reflection to get at the menus array and parent fields.
|
||||
try {
|
||||
if (stolenFields == null) return m;
|
||||
final Vector<Menu> menus = AWTAccessor.getMenuBarAccessor().getMenus(this);
|
||||
menus.insertElementAt(m, index);
|
||||
AWTAccessor.getMenuComponentAccessor().setParent(m, this);
|
||||
|
||||
final Vector<Menu> menus = (Vector<Menu>)stolenFields[0].get(this);
|
||||
menus.insertElementAt(m, index);
|
||||
final CMenuBar peer = (CMenuBar)getPeer();
|
||||
if (peer == null) return m;
|
||||
|
||||
stolenFields[1].set(m, this);
|
||||
|
||||
final sun.lwawt.macosx.CMenuBar peer = (sun.lwawt.macosx.CMenuBar)getPeer();
|
||||
if (peer == null) return m;
|
||||
|
||||
peer.setNextInsertionIndex(index);
|
||||
if (m.getPeer() == null) {
|
||||
m.addNotify();
|
||||
}
|
||||
|
||||
peer.setNextInsertionIndex(-1);
|
||||
} catch (final IllegalAccessException iae) {
|
||||
iae.printStackTrace(System.err);
|
||||
peer.setNextInsertionIndex(index);
|
||||
if (m.getPeer() == null) {
|
||||
m.addNotify();
|
||||
}
|
||||
|
||||
peer.setNextInsertionIndex(-1);
|
||||
return m;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,19 +2,12 @@
|
||||
# This properties file is used to initialize the default
|
||||
# java.awt.datatransfer.SystemFlavorMap. It contains the Mac OS X platform-specific,
|
||||
# default mappings between common Mac OS X selection atoms and platform-independent
|
||||
# MIME type strings, which will be converted into
|
||||
# MIME type strings, which will be converted into
|
||||
# java.awt.datatransfer.DataFlavors.
|
||||
#
|
||||
# These default mappings may be augmented by specifying the
|
||||
#
|
||||
# AWT.DnD.flavorMapFileURL
|
||||
#
|
||||
# property in the appropriate awt.properties file. The specified properties URL
|
||||
# will be loaded into the SystemFlavorMap.
|
||||
#
|
||||
# The standard format is:
|
||||
#
|
||||
# <native>=<MIME type>
|
||||
# <native>=<MIME type>,<MIME type>, ...
|
||||
#
|
||||
# <native> should be a string identifier that the native platform will
|
||||
# recognize as a valid data format. <MIME type> should specify both a MIME
|
||||
@ -23,9 +16,9 @@
|
||||
# where each parameter to the MIME type is separated by a ';'.
|
||||
#
|
||||
# Because SystemFlavorMap implements FlavorTable, developers are free to
|
||||
# duplicate both native keys and DataFlavor values. If a mapping contains a
|
||||
# duplicate key or value, earlier mappings which included this key or value
|
||||
# will be preferred.
|
||||
# duplicate DataFlavor values and set multiple values for a single native by
|
||||
# separating them with ",". If a mapping contains a duplicate key or value,
|
||||
# earlier mappings which included this key or value will be preferred.
|
||||
#
|
||||
# Mappings whose values specify DataFlavors with primary MIME types of
|
||||
# "text", and which support the charset parameter, should specify the exact
|
||||
@ -79,5 +72,5 @@ JFIF=image/x-java-image;class=java.awt.Image
|
||||
TIFF=image/x-java-image;class=java.awt.Image
|
||||
RICH_TEXT=text/rtf
|
||||
HTML=text/html;charset=utf-8;eoln="\r\n";terminators=1
|
||||
URL=application/x-java-url;class=java.net.URL
|
||||
URL=text/uri-list;eoln="\r\n";terminators=1
|
||||
URL=application/x-java-url;class=java.net.URL,\
|
||||
text/uri-list;eoln="\r\n";terminators=1
|
||||
@ -88,7 +88,7 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer {
|
||||
super.startDrag(dsc, cursor, dragImage, dragImageOffset);
|
||||
}
|
||||
|
||||
protected void startDrag(Transferable transferable, long[] formats, Map formatMap) {
|
||||
protected void startDrag(Transferable transferable, long[] formats, Map<Long, DataFlavor> formatMap) {
|
||||
DragGestureEvent trigger = getTrigger();
|
||||
InputEvent triggerEvent = trigger.getTriggerEvent();
|
||||
|
||||
@ -311,7 +311,7 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer {
|
||||
}
|
||||
}
|
||||
|
||||
private void setDefaultDragImage(JList component) {
|
||||
private void setDefaultDragImage(JList<?> component) {
|
||||
Rectangle selectedOutline = null;
|
||||
|
||||
// This code actually works, even under the (non-existant) multiple-selections, because we only draw a union outline
|
||||
@ -485,7 +485,7 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer {
|
||||
private native long createNativeDragSource(Component component, long nativePeer, Transferable transferable,
|
||||
InputEvent triggerEvent, int dragPosX, int dragPosY, int extModifiers, int clickCount, long timestamp,
|
||||
long nsDragImagePtr, int dragImageOffsetX, int dragImageOffsetY,
|
||||
int sourceActions, long[] formats, Map formatMap);
|
||||
int sourceActions, long[] formats, Map<Long, DataFlavor> formatMap);
|
||||
|
||||
private native void doDragging(long nativeDragSource);
|
||||
|
||||
|
||||
@ -44,13 +44,14 @@ import sun.lwawt.*;
|
||||
public class CInputMethod extends InputMethodAdapter {
|
||||
private InputMethodContext fIMContext;
|
||||
private Component fAwtFocussedComponent;
|
||||
private LWComponentPeer fAwtFocussedComponentPeer;
|
||||
private LWComponentPeer<?, ?> fAwtFocussedComponentPeer;
|
||||
private boolean isActive;
|
||||
|
||||
private static Map<TextAttribute, Integer>[] sHighlightStyles;
|
||||
|
||||
// Intitalize highlight mapping table and its mapper.
|
||||
static {
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
Map<TextAttribute, Integer> styles[] = new Map[4];
|
||||
HashMap<TextAttribute, Integer> map;
|
||||
|
||||
@ -242,7 +243,7 @@ public class CInputMethod extends InputMethodAdapter {
|
||||
public void hideWindows() {
|
||||
}
|
||||
|
||||
long getNativeViewPtr(LWComponentPeer peer) {
|
||||
long getNativeViewPtr(LWComponentPeer<?, ?> peer) {
|
||||
if (peer.getPlatformWindow() instanceof CPlatformWindow) {
|
||||
CPlatformWindow platformWindow = (CPlatformWindow) peer.getPlatformWindow();
|
||||
CPlatformView platformView = platformWindow.getContentView();
|
||||
@ -272,7 +273,7 @@ public class CInputMethod extends InputMethodAdapter {
|
||||
* to talk to when responding to key events.
|
||||
*/
|
||||
protected void setAWTFocussedComponent(Component component) {
|
||||
LWComponentPeer peer = null;
|
||||
LWComponentPeer<?, ?> peer = null;
|
||||
long modelPtr = 0;
|
||||
CInputMethod imInstance = this;
|
||||
|
||||
@ -305,7 +306,7 @@ public class CInputMethod extends InputMethodAdapter {
|
||||
/**
|
||||
* @see java.awt.Toolkit#mapInputMethodHighlight
|
||||
*/
|
||||
public static Map mapInputMethodHighlight(InputMethodHighlight highlight) {
|
||||
public static Map<TextAttribute, ?> mapInputMethodHighlight(InputMethodHighlight highlight) {
|
||||
int index;
|
||||
int state = highlight.getState();
|
||||
if (state == InputMethodHighlight.RAW_TEXT) {
|
||||
@ -384,7 +385,7 @@ public class CInputMethod extends InputMethodAdapter {
|
||||
|
||||
// java.awt.Toolkit#getNativeContainer() is not available
|
||||
// from this package
|
||||
private LWComponentPeer getNearestNativePeer(Component comp) {
|
||||
private LWComponentPeer<?, ?> getNearestNativePeer(Component comp) {
|
||||
if (comp==null)
|
||||
return null;
|
||||
|
||||
@ -796,7 +797,7 @@ public class CInputMethod extends InputMethodAdapter {
|
||||
// these calls will be ignored.
|
||||
private native void nativeNotifyPeer(long nativePeer, CInputMethod imInstance);
|
||||
private native void nativeEndComposition(long nativePeer);
|
||||
private native void nativeHandleEvent(LWComponentPeer peer, AWTEvent event);
|
||||
private native void nativeHandleEvent(LWComponentPeer<?, ?> peer, AWTEvent event);
|
||||
|
||||
// Returns the locale of the active input method.
|
||||
static native Locale getNativeLocale();
|
||||
|
||||
@ -57,7 +57,7 @@ public class CInputMethodDescriptor implements InputMethodDescriptor {
|
||||
}
|
||||
|
||||
static Object[] getAvailableLocalesInternal() {
|
||||
List workList = nativeGetAvailableLocales();
|
||||
List<?> workList = nativeGetAvailableLocales();
|
||||
|
||||
if (workList != null) {
|
||||
return workList.toArray();
|
||||
@ -119,5 +119,5 @@ public class CInputMethodDescriptor implements InputMethodDescriptor {
|
||||
}
|
||||
|
||||
private static native void nativeInit();
|
||||
private static native List nativeGetAvailableLocales();
|
||||
private static native List<?> nativeGetAvailableLocales();
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||
return (bits & mask) != 0;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
static ClientPropertyApplicator<JRootPane, CPlatformWindow> CLIENT_PROPERTY_APPLICATOR = new ClientPropertyApplicator<JRootPane, CPlatformWindow>(new Property[] {
|
||||
new Property<CPlatformWindow>(WINDOW_DOCUMENT_MODIFIED) { public void applyProperty(final CPlatformWindow c, final Object value) {
|
||||
c.setStyleBits(DOCUMENT_MODIFIED, value == null ? false : Boolean.parseBoolean(value.toString()));
|
||||
|
||||
@ -32,6 +32,7 @@ import java.awt.dnd.peer.DragSourceContextPeer;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.InvocationEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.font.TextAttribute;
|
||||
import java.awt.im.InputMethodHighlight;
|
||||
import java.awt.im.spi.InputMethodDescriptor;
|
||||
import java.awt.peer.*;
|
||||
@ -543,9 +544,9 @@ public final class LWCToolkit extends LWToolkit {
|
||||
return super.getImage(filename);
|
||||
}
|
||||
|
||||
String fileneame2x = getScaledImageName(filename);
|
||||
return (imageExists(fileneame2x))
|
||||
? getImageWithResolutionVariant(filename, fileneame2x)
|
||||
String filename2x = getScaledImageName(filename);
|
||||
return (imageExists(filename2x))
|
||||
? getImageWithResolutionVariant(filename, filename2x)
|
||||
: super.getImage(filename);
|
||||
}
|
||||
|
||||
@ -691,6 +692,7 @@ public final class LWCToolkit extends LWToolkit {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
|
||||
Class<T> abstractRecognizerClass, DragSource ds, Component c,
|
||||
int srcActions, DragGestureListener dgl) {
|
||||
@ -743,7 +745,7 @@ public final class LWCToolkit extends LWToolkit {
|
||||
* @since 1.3
|
||||
*/
|
||||
@Override
|
||||
public Map mapInputMethodHighlight(InputMethodHighlight highlight) {
|
||||
public Map<TextAttribute, ?> mapInputMethodHighlight(InputMethodHighlight highlight) {
|
||||
return CInputMethod.mapInputMethodHighlight(highlight);
|
||||
}
|
||||
|
||||
@ -906,6 +908,9 @@ public final class LWCToolkit extends LWToolkit {
|
||||
}
|
||||
|
||||
private static boolean isValidPath(String path) {
|
||||
return !path.isEmpty() && !path.endsWith("/") && !path.endsWith(".");
|
||||
return path != null &&
|
||||
!path.isEmpty() &&
|
||||
!path.endsWith("/") &&
|
||||
!path.endsWith(".");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,63 +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.
|
||||
*/
|
||||
|
||||
#import "apple_launcher_JavaAppLauncher.h"
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <JavaNativeFoundation/JavaNativeFoundation.h>
|
||||
|
||||
|
||||
/*
|
||||
* Class: apple_launcher_JavaAppLauncher
|
||||
* Method: nativeConvertAndRelease
|
||||
* Signature: (J)Ljava/lang/Object;
|
||||
*/
|
||||
JNIEXPORT jobject JNICALL Java_apple_launcher_JavaAppLauncher_nativeConvertAndRelease
|
||||
(JNIEnv *env, jclass clazz, jlong nsObjectPtr) {
|
||||
|
||||
jobject value = NULL;
|
||||
|
||||
JNF_COCOA_ENTER(env);
|
||||
|
||||
id obj = jlong_to_ptr(nsObjectPtr);
|
||||
value = [[JNFDefaultCoercions defaultCoercer] coerceNSObject:obj withEnv:env];
|
||||
CFRelease(obj);
|
||||
|
||||
JNF_COCOA_EXIT(env);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: apple_launcher_JavaAppLauncher
|
||||
* Method: nativeInvokeNonPublic
|
||||
* Signature: (Ljava/lang/Class;Ljava/lang/reflect/Method;[Ljava/lang/String;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_apple_launcher_JavaAppLauncher_nativeInvokeNonPublic
|
||||
(JNIEnv *env, jclass clazz, jclass targetClass, jobject targetMethod, jobjectArray args) {
|
||||
jmethodID mainMethodID = (*env)->FromReflectedMethod(env, targetMethod);
|
||||
if ((*env)->ExceptionOccurred(env)) return;
|
||||
(*env)->CallStaticVoidMethod(env, targetClass, mainMethodID, args);
|
||||
}
|
||||
@ -45,6 +45,7 @@
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include <sizecalc.h>
|
||||
#import "ThreadUtilities.h"
|
||||
|
||||
static NSScreen* SplashNSScreen()
|
||||
{
|
||||
@ -130,8 +131,12 @@ char* SplashGetScaledImageName(const char* jar, const char* file,
|
||||
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||
*scaleFactor = 1;
|
||||
char* scaledFile = nil;
|
||||
float screenScaleFactor = [SplashNSScreen() backingScaleFactor];
|
||||
|
||||
__block float screenScaleFactor = 1;
|
||||
|
||||
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
|
||||
screenScaleFactor = [SplashNSScreen() backingScaleFactor];
|
||||
}];
|
||||
|
||||
if (screenScaleFactor > 1) {
|
||||
NSString *fileName = [NSString stringWithUTF8String: file];
|
||||
NSUInteger length = [fileName length];
|
||||
|
||||
@ -126,18 +126,18 @@ public class BMPMetadata extends IIOMetadata implements BMPConstants {
|
||||
new IIOMetadataNode(nativeMetadataFormatName);
|
||||
|
||||
addChildNode(root, "BMPVersion", bmpVersion);
|
||||
addChildNode(root, "Width", new Integer(width));
|
||||
addChildNode(root, "Height", new Integer(height));
|
||||
addChildNode(root, "Width", width);
|
||||
addChildNode(root, "Height", height);
|
||||
addChildNode(root, "BitsPerPixel", new Short(bitsPerPixel));
|
||||
addChildNode(root, "Compression", new Integer(compression));
|
||||
addChildNode(root, "ImageSize", new Integer(imageSize));
|
||||
addChildNode(root, "Compression", compression);
|
||||
addChildNode(root, "ImageSize", imageSize);
|
||||
|
||||
IIOMetadataNode node = addChildNode(root, "PixelsPerMeter", null);
|
||||
addChildNode(node, "X", new Integer(xPixelsPerMeter));
|
||||
addChildNode(node, "Y", new Integer(yPixelsPerMeter));
|
||||
addChildNode(node, "X", xPixelsPerMeter);
|
||||
addChildNode(node, "Y", yPixelsPerMeter);
|
||||
|
||||
addChildNode(root, "ColorsUsed", new Integer(colorsUsed));
|
||||
addChildNode(root, "ColorsImportant", new Integer(colorsImportant));
|
||||
addChildNode(root, "ColorsUsed", colorsUsed);
|
||||
addChildNode(root, "ColorsImportant", colorsImportant);
|
||||
|
||||
int version = 0;
|
||||
for (int i = 0; i < bmpVersion.length(); i++)
|
||||
@ -146,19 +146,19 @@ public class BMPMetadata extends IIOMetadata implements BMPConstants {
|
||||
|
||||
if (version >= 4) {
|
||||
node = addChildNode(root, "Mask", null);
|
||||
addChildNode(node, "Red", new Integer(redMask));
|
||||
addChildNode(node, "Green", new Integer(greenMask));
|
||||
addChildNode(node, "Blue", new Integer(blueMask));
|
||||
addChildNode(node, "Alpha", new Integer(alphaMask));
|
||||
addChildNode(node, "Red", redMask);
|
||||
addChildNode(node, "Green", greenMask);
|
||||
addChildNode(node, "Blue", blueMask);
|
||||
addChildNode(node, "Alpha", alphaMask);
|
||||
|
||||
addChildNode(root, "ColorSpaceType", new Integer(colorSpace));
|
||||
addChildNode(root, "ColorSpaceType", colorSpace);
|
||||
|
||||
node = addChildNode(root, "CIEXYZEndPoints", null);
|
||||
addXYZPoints(node, "Red", redX, redY, redZ);
|
||||
addXYZPoints(node, "Green", greenX, greenY, greenZ);
|
||||
addXYZPoints(node, "Blue", blueX, blueY, blueZ);
|
||||
|
||||
node = addChildNode(root, "Intent", new Integer(intent));
|
||||
node = addChildNode(root, "Intent", intent);
|
||||
}
|
||||
|
||||
// Palette
|
||||
|
||||
@ -2323,7 +2323,7 @@ public class JPEGMetadata extends IIOMetadata implements Cloneable {
|
||||
SOSMarkerSegment sos = (SOSMarkerSegment) seg;
|
||||
SOSMarkerSegment.ScanComponentSpec [] specs = sos.componentSpecs;
|
||||
for (int i = 0; i < specs.length; i++) {
|
||||
Integer id = new Integer(specs[i].componentSelector);
|
||||
Integer id = specs[i].componentSelector;
|
||||
if (!ids.contains(id)) {
|
||||
ids.add(id);
|
||||
}
|
||||
|
||||
@ -639,7 +639,7 @@ public class PNGImageReader extends ImageReader {
|
||||
metadata.zTXt_keyword.add(keyword);
|
||||
|
||||
int method = stream.readUnsignedByte();
|
||||
metadata.zTXt_compressionMethod.add(new Integer(method));
|
||||
metadata.zTXt_compressionMethod.add(method);
|
||||
|
||||
byte[] b = new byte[chunkLength - keyword.length() - 2];
|
||||
stream.readFully(b);
|
||||
|
||||
@ -1254,8 +1254,11 @@ public class PNGMetadata extends IIOMetadata implements Cloneable {
|
||||
if (name.equals("IHDR")) {
|
||||
IHDR_width = getIntAttribute(node, "width");
|
||||
IHDR_height = getIntAttribute(node, "height");
|
||||
IHDR_bitDepth = getEnumeratedAttribute(node, "bitDepth",
|
||||
IHDR_bitDepths);
|
||||
IHDR_bitDepth =
|
||||
Integer.valueOf(IHDR_bitDepths[
|
||||
getEnumeratedAttribute(node,
|
||||
"bitDepth",
|
||||
IHDR_bitDepths)]);
|
||||
IHDR_colorType = getEnumeratedAttribute(node, "colorType",
|
||||
IHDR_colorTypeNames);
|
||||
IHDR_compressionMethod =
|
||||
@ -1644,7 +1647,7 @@ public class PNGMetadata extends IIOMetadata implements Cloneable {
|
||||
int compressionMethod =
|
||||
getEnumeratedAttribute(zTXt_node, "compressionMethod",
|
||||
zTXt_compressionMethodNames);
|
||||
zTXt_compressionMethod.add(new Integer(compressionMethod));
|
||||
zTXt_compressionMethod.add(compressionMethod);
|
||||
|
||||
String text = getAttribute(zTXt_node, "text");
|
||||
zTXt_text.add(text);
|
||||
|
||||
@ -75,9 +75,9 @@ public class WBMPMetadata extends IIOMetadata {
|
||||
IIOMetadataNode root =
|
||||
new IIOMetadataNode(nativeMetadataFormatName);
|
||||
|
||||
addChildNode(root, "WBMPType", new Integer(wbmpType));
|
||||
addChildNode(root, "Width", new Integer(width));
|
||||
addChildNode(root, "Height", new Integer(height));
|
||||
addChildNode(root, "WBMPType", wbmpType);
|
||||
addChildNode(root, "Width", width);
|
||||
addChildNode(root, "Height", height);
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
@ -812,12 +812,12 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||
|
||||
"OptionPane.setButtonMargin", Boolean.FALSE,
|
||||
"OptionPane.sameSizeButtons", Boolean.TRUE,
|
||||
"OptionPane.buttonOrientation", new Integer(SwingConstants.RIGHT),
|
||||
"OptionPane.buttonOrientation", SwingConstants.RIGHT,
|
||||
"OptionPane.minimumSize", new DimensionUIResource(262, 90),
|
||||
"OptionPane.buttonPadding", new Integer(10),
|
||||
"OptionPane.buttonPadding", 10,
|
||||
"OptionPane.windowBindings", new Object[] {
|
||||
"ESCAPE", "close" },
|
||||
"OptionPane.buttonClickThreshhold", new Integer(500),
|
||||
"OptionPane.buttonClickThreshhold", 500,
|
||||
"OptionPane.isYesLast", Boolean.TRUE,
|
||||
"OptionPane.font", new FontLazyValue(Region.OPTION_PANE),
|
||||
|
||||
|
||||
@ -567,7 +567,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||
"ProgressBar.selectionForeground", table.get("control"),
|
||||
"ProgressBar.selectionBackground", table.get("controlText"),
|
||||
"ProgressBar.border", loweredBevelBorder,
|
||||
"ProgressBar.cellLength", new Integer(6),
|
||||
"ProgressBar.cellLength", 6,
|
||||
"ProgressBar.cellSpacing", Integer.valueOf(0),
|
||||
|
||||
// Buttons
|
||||
@ -582,7 +582,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||
"released SPACE", "released"
|
||||
}),
|
||||
|
||||
"CheckBox.textIconGap", new Integer(8),
|
||||
"CheckBox.textIconGap", 8,
|
||||
"CheckBox.margin", new InsetsUIResource(4, 2, 4, 2),
|
||||
"CheckBox.icon", checkBoxIcon,
|
||||
"CheckBox.focus", table.get("activeCaptionBorder"),
|
||||
@ -593,7 +593,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||
}),
|
||||
|
||||
"RadioButton.margin", new InsetsUIResource(4, 2, 4, 2),
|
||||
"RadioButton.textIconGap", new Integer(8),
|
||||
"RadioButton.textIconGap", 8,
|
||||
"RadioButton.background", table.get("control"),
|
||||
"RadioButton.foreground", table.get("controlText"),
|
||||
"RadioButton.icon", radioButtonIcon,
|
||||
@ -627,10 +627,10 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||
"Menu.selectionBackground", menuItemPressedBackground,
|
||||
"Menu.checkIcon", menuItemCheckIcon,
|
||||
"Menu.arrowIcon", menuArrowIcon,
|
||||
"Menu.menuPopupOffsetX", new Integer(0),
|
||||
"Menu.menuPopupOffsetY", new Integer(0),
|
||||
"Menu.submenuPopupOffsetX", new Integer(-2),
|
||||
"Menu.submenuPopupOffsetY", new Integer(3),
|
||||
"Menu.menuPopupOffsetX", 0,
|
||||
"Menu.menuPopupOffsetY", 0,
|
||||
"Menu.submenuPopupOffsetX", -2,
|
||||
"Menu.submenuPopupOffsetY", 3,
|
||||
"Menu.shortcutKeys", new int[]{
|
||||
SwingUtilities2.getSystemMnemonicKeyMask(),
|
||||
KeyEvent.META_MASK
|
||||
@ -938,7 +938,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||
"Tree.collapsedIcon", treeCollapsedIcon,
|
||||
"Tree.editorBorder", focusBorder,
|
||||
"Tree.editorBorderSelectionColor", table.get("activeCaptionBorder"),
|
||||
"Tree.rowHeight", new Integer(18),
|
||||
"Tree.rowHeight", 18,
|
||||
"Tree.drawsFocusBorderAroundIcon", Boolean.TRUE,
|
||||
"Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
|
||||
"COPY", "copy",
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -50,7 +50,7 @@ import java.awt.color.ColorSpace;
|
||||
* see <A href="http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html">
|
||||
* http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html
|
||||
* </A>.
|
||||
* <p>
|
||||
*
|
||||
* @version 10 Feb 1997
|
||||
* @author Sami Shaio
|
||||
* @author Arthur van Hoff
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -542,7 +542,6 @@ public class Font implements java.io.Serializable
|
||||
* compatible alternative, then the font system will map the Font
|
||||
* instance to "Dialog", such that for example, the family as reported
|
||||
* by {@link #getFamily() getFamily} will be "Dialog".
|
||||
* <p>
|
||||
*
|
||||
* @param name the font name. This can be a font face name or a font
|
||||
* family name, and may represent either a logical font or a physical
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -151,7 +151,7 @@ public abstract class Graphics {
|
||||
* is specified by the <code>width</code> and <code>height</code>
|
||||
* arguments.
|
||||
* </ul>
|
||||
* <p>
|
||||
*
|
||||
* @param x the <i>x</i> coordinate.
|
||||
* @param y the <i>y</i> coordinate.
|
||||
* @param width the width of the clipping rectangle.
|
||||
|
||||
@ -132,16 +132,24 @@ public abstract class MenuComponent implements java.io.Serializable {
|
||||
static {
|
||||
AWTAccessor.setMenuComponentAccessor(
|
||||
new AWTAccessor.MenuComponentAccessor() {
|
||||
@Override
|
||||
public AppContext getAppContext(MenuComponent menuComp) {
|
||||
return menuComp.appContext;
|
||||
}
|
||||
@Override
|
||||
public void setAppContext(MenuComponent menuComp,
|
||||
AppContext appContext) {
|
||||
menuComp.appContext = appContext;
|
||||
}
|
||||
@Override
|
||||
public MenuContainer getParent(MenuComponent menuComp) {
|
||||
return menuComp.parent;
|
||||
}
|
||||
@Override
|
||||
public void setParent(MenuComponent menuComp, MenuContainer menuContainer) {
|
||||
menuComp.parent = menuContainer;
|
||||
}
|
||||
@Override
|
||||
public Font getFont_NoClientCode(MenuComponent menuComp) {
|
||||
return menuComp.getFont_NoClientCode();
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -351,7 +351,7 @@ public class Polygon implements Shape, java.io.Serializable {
|
||||
/**
|
||||
* Determines whether the specified coordinates are inside this
|
||||
* <code>Polygon</code>.
|
||||
* <p>
|
||||
*
|
||||
* @param x the specified X coordinate to be tested
|
||||
* @param y the specified Y coordinate to be tested
|
||||
* @return {@code true} if this {@code Polygon} contains
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -41,14 +41,13 @@ import java.beans.Transient;
|
||||
* <p>
|
||||
* <a name="Empty">
|
||||
* A {@code Rectangle} whose width or height is exactly zero has location
|
||||
* along those axes with zero dimension, but is otherwise considered empty.
|
||||
* along those axes with zero dimension, but is otherwise considered empty.</a>
|
||||
* The {@link #isEmpty} method will return true for such a {@code Rectangle}.
|
||||
* Methods which test if an empty {@code Rectangle} contains or intersects
|
||||
* a point or rectangle will always return false if either dimension is zero.
|
||||
* Methods which combine such a {@code Rectangle} with a point or rectangle
|
||||
* will include the location of the {@code Rectangle} on that axis in the
|
||||
* result as if the {@link #add(Point)} method were being called.
|
||||
* </a>
|
||||
* <p>
|
||||
* <a name="NonExistant">
|
||||
* A {@code Rectangle} whose width or height is negative has neither
|
||||
@ -422,7 +421,7 @@ public class Rectangle extends Rectangle2D
|
||||
* <code>Rectangle</code> to the specified
|
||||
* <code>x</code>, <code>y</code>, <code>width</code>,
|
||||
* and <code>height</code>.
|
||||
* <p>
|
||||
*
|
||||
* @param x the new X coordinate for the upper-left
|
||||
* corner of this <code>Rectangle</code>
|
||||
* @param y the new Y coordinate for the upper-left
|
||||
@ -488,7 +487,7 @@ public class Rectangle extends Rectangle2D
|
||||
|
||||
/**
|
||||
* Moves this <code>Rectangle</code> to the specified location.
|
||||
* <p>
|
||||
*
|
||||
* @param x the X coordinate of the new location
|
||||
* @param y the Y coordinate of the new location
|
||||
* @deprecated As of JDK version 1.1,
|
||||
@ -629,7 +628,7 @@ public class Rectangle extends Rectangle2D
|
||||
/**
|
||||
* Sets the size of this <code>Rectangle</code> to the specified
|
||||
* width and height.
|
||||
* <p>
|
||||
*
|
||||
* @param width the new width for this <code>Rectangle</code>
|
||||
* @param height the new height for this <code>Rectangle</code>
|
||||
* @deprecated As of JDK version 1.1,
|
||||
|
||||
@ -1241,10 +1241,9 @@ public abstract class Toolkit {
|
||||
* clipboard enables data transfer between Java programs and native
|
||||
* applications which use native clipboard facilities.
|
||||
* <p>
|
||||
* In addition to any and all formats specified in the flavormap.properties
|
||||
* file, or other file specified by the <code>AWT.DnD.flavorMapFileURL
|
||||
* </code> Toolkit property, text returned by the system Clipboard's <code>
|
||||
* getTransferData()</code> method is available in the following flavors:
|
||||
* In addition to any and all default formats text returned by the system
|
||||
* Clipboard's <code>getTransferData()</code> method is available in the
|
||||
* following flavors:
|
||||
* <ul>
|
||||
* <li>DataFlavor.stringFlavor</li>
|
||||
* <li>DataFlavor.plainTextFlavor (<b>deprecated</b>)</li>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -388,7 +388,7 @@ public abstract class ColorSpace implements java.io.Serializable {
|
||||
* convert from CS_CIEXYZ to the output color space.
|
||||
* See {@link #toCIEXYZ(float[]) toCIEXYZ} and
|
||||
* {@link #fromCIEXYZ(float[]) fromCIEXYZ} for further information.
|
||||
* <p>
|
||||
*
|
||||
* @param colorvalue a float array with length of at least the number
|
||||
* of components in this ColorSpace
|
||||
* @return a float array of length 3
|
||||
@ -412,7 +412,7 @@ public abstract class ColorSpace implements java.io.Serializable {
|
||||
* convert from CS_CIEXYZ to the output color space.
|
||||
* See {@link #toCIEXYZ(float[]) toCIEXYZ} and
|
||||
* {@link #fromCIEXYZ(float[]) fromCIEXYZ} for further information.
|
||||
* <p>
|
||||
*
|
||||
* @param rgbvalue a float array with length of at least 3
|
||||
* @return a float array with length equal to the number of
|
||||
* components in this ColorSpace
|
||||
@ -439,7 +439,7 @@ public abstract class ColorSpace implements java.io.Serializable {
|
||||
* that would be measured using current CIE recommended practices.
|
||||
* See the {@link ICC_ColorSpace#toCIEXYZ(float[]) toCIEXYZ} method of
|
||||
* <code>ICC_ColorSpace</code> for further information.
|
||||
* <p>
|
||||
*
|
||||
* @param colorvalue a float array with length of at least the number
|
||||
* of components in this ColorSpace
|
||||
* @return a float array of length 3
|
||||
@ -467,7 +467,7 @@ public abstract class ColorSpace implements java.io.Serializable {
|
||||
* relative values before being passed to this method.
|
||||
* See the {@link ICC_ColorSpace#fromCIEXYZ(float[]) fromCIEXYZ} method of
|
||||
* <code>ICC_ColorSpace</code> for further information.
|
||||
* <p>
|
||||
*
|
||||
* @param colorvalue a float array with length of at least 3
|
||||
* @return a float array with length equal to the number of
|
||||
* components in this ColorSpace
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -149,7 +149,7 @@ public class ICC_ColorSpace extends ColorSpace {
|
||||
* convert from CS_CIEXYZ to the output color space.
|
||||
* See {@link #toCIEXYZ(float[]) toCIEXYZ} and
|
||||
* {@link #fromCIEXYZ(float[]) fromCIEXYZ} for further information.
|
||||
* <p>
|
||||
*
|
||||
* @param colorvalue a float array with length of at least the number
|
||||
* of components in this ColorSpace.
|
||||
* @return a float array of length 3.
|
||||
@ -201,7 +201,7 @@ public class ICC_ColorSpace extends ColorSpace {
|
||||
* convert from CS_CIEXYZ to the output color space.
|
||||
* See {@link #toCIEXYZ(float[]) toCIEXYZ} and
|
||||
* {@link #fromCIEXYZ(float[]) fromCIEXYZ} for further information.
|
||||
* <p>
|
||||
*
|
||||
* @param rgbvalue a float array with length of at least 3.
|
||||
* @return a float array with length equal to the number of
|
||||
* components in this ColorSpace.
|
||||
@ -336,7 +336,7 @@ public class ICC_ColorSpace extends ColorSpace {
|
||||
* will result in a measured device XYZ value of D65. This will not
|
||||
* be the same as the media white point tag XYZ value in the ICC
|
||||
* profile for an sRGB device.
|
||||
* <p>
|
||||
*
|
||||
* @param colorvalue a float array with length of at least the number
|
||||
* of components in this ColorSpace.
|
||||
* @return a float array of length 3.
|
||||
@ -480,7 +480,7 @@ public class ICC_ColorSpace extends ColorSpace {
|
||||
* will result in a measured device XYZ value of D65. This will not
|
||||
* be the same as the media white point tag XYZ value in the ICC
|
||||
* profile for an sRGB device.
|
||||
* <p>
|
||||
*
|
||||
* @param colorvalue a float array with length of at least 3.
|
||||
* @return a float array with length equal to the number of
|
||||
* components in this ColorSpace.
|
||||
|
||||
@ -27,6 +27,8 @@ package java.awt.datatransfer;
|
||||
|
||||
import java.awt.Toolkit;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.lang.ref.SoftReference;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
@ -38,6 +40,7 @@ import java.net.URL;
|
||||
import java.net.MalformedURLException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@ -45,6 +48,7 @@ import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import sun.awt.AppContext;
|
||||
@ -210,193 +214,48 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a SystemFlavorMap by reading flavormap.properties and
|
||||
* AWT.DnD.flavorMapFileURL.
|
||||
* Initializes a SystemFlavorMap by reading flavormap.properties
|
||||
* For thread-safety must be called under lock on this.
|
||||
*/
|
||||
private void initSystemFlavorMap() {
|
||||
if (isMapInitialized) {
|
||||
return;
|
||||
}
|
||||
|
||||
isMapInitialized = true;
|
||||
BufferedReader flavormapDotProperties =
|
||||
java.security.AccessController.doPrivileged(
|
||||
new java.security.PrivilegedAction<BufferedReader>() {
|
||||
public BufferedReader run() {
|
||||
String fileName =
|
||||
System.getProperty("java.home") +
|
||||
File.separator +
|
||||
"lib" +
|
||||
File.separator +
|
||||
"flavormap.properties";
|
||||
try {
|
||||
return new BufferedReader
|
||||
(new InputStreamReader
|
||||
(new File(fileName).toURI().toURL().openStream(), "ISO-8859-1"));
|
||||
} catch (MalformedURLException e) {
|
||||
System.err.println("MalformedURLException:" + e + " while loading default flavormap.properties file:" + fileName);
|
||||
} catch (IOException e) {
|
||||
System.err.println("IOException:" + e + " while loading default flavormap.properties file:" + fileName);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
String url =
|
||||
java.security.AccessController.doPrivileged(
|
||||
new java.security.PrivilegedAction<String>() {
|
||||
public String run() {
|
||||
return Toolkit.getProperty("AWT.DnD.flavorMapFileURL", null);
|
||||
}
|
||||
});
|
||||
|
||||
if (flavormapDotProperties != null) {
|
||||
try {
|
||||
parseAndStoreReader(flavormapDotProperties);
|
||||
} catch (IOException e) {
|
||||
System.err.println("IOException:" + e + " while parsing default flavormap.properties file");
|
||||
}
|
||||
InputStream is = SystemFlavorMap.class.getResourceAsStream("/sun/awt/datatransfer/flavormap.properties");
|
||||
if (is == null) {
|
||||
throw new InternalError("Default flavor mapping not found");
|
||||
}
|
||||
|
||||
BufferedReader flavormapURL = null;
|
||||
if (url != null) {
|
||||
try {
|
||||
flavormapURL = new BufferedReader(new InputStreamReader(new URL(url).openStream(), "ISO-8859-1"));
|
||||
} catch (MalformedURLException e) {
|
||||
System.err.println("MalformedURLException:" + e + " while reading AWT.DnD.flavorMapFileURL:" + url);
|
||||
} catch (IOException e) {
|
||||
System.err.println("IOException:" + e + " while reading AWT.DnD.flavorMapFileURL:" + url);
|
||||
} catch (SecurityException e) {
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
|
||||
if (flavormapURL != null) {
|
||||
try {
|
||||
parseAndStoreReader(flavormapURL);
|
||||
} catch (IOException e) {
|
||||
System.err.println("IOException:" + e + " while parsing AWT.DnD.flavorMapFileURL");
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Copied code from java.util.Properties. Parsing the data ourselves is the
|
||||
* only way to handle duplicate keys and values.
|
||||
*/
|
||||
private void parseAndStoreReader(BufferedReader in) throws IOException {
|
||||
while (true) {
|
||||
// Get next line
|
||||
String line = in.readLine();
|
||||
if (line == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (line.length() > 0) {
|
||||
// Continue lines that end in slashes if they are not comments
|
||||
char firstChar = line.charAt(0);
|
||||
if (firstChar != '#' && firstChar != '!') {
|
||||
while (continueLine(line)) {
|
||||
String nextLine = in.readLine();
|
||||
if (nextLine == null) {
|
||||
nextLine = "";
|
||||
}
|
||||
String loppedLine =
|
||||
line.substring(0, line.length() - 1);
|
||||
// Advance beyond whitespace on new line
|
||||
int startIndex = 0;
|
||||
for(; startIndex < nextLine.length(); startIndex++) {
|
||||
if (whiteSpaceChars.
|
||||
indexOf(nextLine.charAt(startIndex)) == -1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
nextLine = nextLine.substring(startIndex,
|
||||
nextLine.length());
|
||||
line = loppedLine+nextLine;
|
||||
}
|
||||
|
||||
// Find start of key
|
||||
int len = line.length();
|
||||
int keyStart = 0;
|
||||
for(; keyStart < len; keyStart++) {
|
||||
if(whiteSpaceChars.
|
||||
indexOf(line.charAt(keyStart)) == -1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Blank lines are ignored
|
||||
if (keyStart == len) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Find separation between key and value
|
||||
int separatorIndex = keyStart;
|
||||
for(; separatorIndex < len; separatorIndex++) {
|
||||
char currentChar = line.charAt(separatorIndex);
|
||||
if (currentChar == '\\') {
|
||||
separatorIndex++;
|
||||
} else if (keyValueSeparators.
|
||||
indexOf(currentChar) != -1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Skip over whitespace after key if any
|
||||
int valueIndex = separatorIndex;
|
||||
for (; valueIndex < len; valueIndex++) {
|
||||
if (whiteSpaceChars.
|
||||
indexOf(line.charAt(valueIndex)) == -1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Skip over one non whitespace key value separators if any
|
||||
if (valueIndex < len) {
|
||||
if (strictKeyValueSeparators.
|
||||
indexOf(line.charAt(valueIndex)) != -1) {
|
||||
valueIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
// Skip over white space after other separators if any
|
||||
while (valueIndex < len) {
|
||||
if (whiteSpaceChars.
|
||||
indexOf(line.charAt(valueIndex)) == -1) {
|
||||
break;
|
||||
}
|
||||
valueIndex++;
|
||||
}
|
||||
|
||||
String key = line.substring(keyStart, separatorIndex);
|
||||
String value = (separatorIndex < len)
|
||||
? line.substring(valueIndex, len)
|
||||
: "";
|
||||
|
||||
// Convert then store key and value
|
||||
key = loadConvert(key);
|
||||
value = loadConvert(value);
|
||||
|
||||
try (InputStreamReader isr = new InputStreamReader(is);
|
||||
BufferedReader reader = new BufferedReader(isr)) {
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
line = line.trim();
|
||||
if (line.startsWith("#") || line.isEmpty()) continue;
|
||||
while (line.endsWith("\\")) {
|
||||
line = line.substring(0, line.length() - 1) + reader.readLine().trim();
|
||||
}
|
||||
int delimiterPosition = line.indexOf('=');
|
||||
String key = line.substring(0, delimiterPosition).replace("\\ ", " ");
|
||||
String[] values = line.substring(delimiterPosition + 1, line.length()).split(",");
|
||||
for (String value : values) {
|
||||
try {
|
||||
MimeType mime = new MimeType(value);
|
||||
if ("text".equals(mime.getPrimaryType())) {
|
||||
String charset = mime.getParameter("charset");
|
||||
if (DataTransferer.doesSubtypeSupportCharset
|
||||
(mime.getSubType(), charset))
|
||||
if (DataTransferer.doesSubtypeSupportCharset(mime.getSubType(), charset))
|
||||
{
|
||||
// We need to store the charset and eoln
|
||||
// parameters, if any, so that the
|
||||
// DataTransferer will have this information
|
||||
// for conversion into the native format.
|
||||
DataTransferer transferer =
|
||||
DataTransferer.getInstance();
|
||||
DataTransferer transferer = DataTransferer.getInstance();
|
||||
if (transferer != null) {
|
||||
transferer.registerTextFlavorProperties
|
||||
(key, charset,
|
||||
mime.getParameter("eoln"),
|
||||
mime.getParameter("terminators"));
|
||||
transferer.registerTextFlavorProperties(key, charset,
|
||||
mime.getParameter("eoln"),
|
||||
mime.getParameter("terminators"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -441,80 +300,11 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new InternalError("Error reading default flavor mapping", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copied from java.util.Properties.
|
||||
*/
|
||||
private boolean continueLine (String line) {
|
||||
int slashCount = 0;
|
||||
int index = line.length() - 1;
|
||||
while((index >= 0) && (line.charAt(index--) == '\\')) {
|
||||
slashCount++;
|
||||
}
|
||||
return (slashCount % 2 == 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copied from java.util.Properties.
|
||||
*/
|
||||
private String loadConvert(String theString) {
|
||||
char aChar;
|
||||
int len = theString.length();
|
||||
StringBuilder outBuffer = new StringBuilder(len);
|
||||
|
||||
for (int x = 0; x < len; ) {
|
||||
aChar = theString.charAt(x++);
|
||||
if (aChar == '\\') {
|
||||
aChar = theString.charAt(x++);
|
||||
if (aChar == 'u') {
|
||||
// Read the xxxx
|
||||
int value = 0;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
aChar = theString.charAt(x++);
|
||||
switch (aChar) {
|
||||
case '0': case '1': case '2': case '3': case '4':
|
||||
case '5': case '6': case '7': case '8': case '9': {
|
||||
value = (value << 4) + aChar - '0';
|
||||
break;
|
||||
}
|
||||
case 'a': case 'b': case 'c':
|
||||
case 'd': case 'e': case 'f': {
|
||||
value = (value << 4) + 10 + aChar - 'a';
|
||||
break;
|
||||
}
|
||||
case 'A': case 'B': case 'C':
|
||||
case 'D': case 'E': case 'F': {
|
||||
value = (value << 4) + 10 + aChar - 'A';
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
throw new IllegalArgumentException(
|
||||
"Malformed \\uxxxx encoding.");
|
||||
}
|
||||
}
|
||||
}
|
||||
outBuffer.append((char)value);
|
||||
} else {
|
||||
if (aChar == 't') {
|
||||
aChar = '\t';
|
||||
} else if (aChar == 'r') {
|
||||
aChar = '\r';
|
||||
} else if (aChar == 'n') {
|
||||
aChar = '\n';
|
||||
} else if (aChar == 'f') {
|
||||
aChar = '\f';
|
||||
}
|
||||
outBuffer.append(aChar);
|
||||
}
|
||||
} else {
|
||||
outBuffer.append(aChar);
|
||||
}
|
||||
}
|
||||
return outBuffer.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores the listed object under the specified hash key in map. Unlike a
|
||||
* standard map, the listed object will not replace any object already at
|
||||
|
||||
@ -96,7 +96,7 @@ import sun.misc.SharedSecrets;
|
||||
* </UL>
|
||||
*
|
||||
* <h4>Summary of attributes</h4>
|
||||
* <table style="float:center" border="0" cellspacing="0" cellpadding="2" width="%95"
|
||||
* <table style="float:center" border="0" cellspacing="0" cellpadding="2" width="95%"
|
||||
* summary="Key, value type, principal constants, and default value
|
||||
* behavior of all TextAttributes">
|
||||
* <tr style="background-color:#ccccff">
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -35,8 +35,8 @@ import java.io.Serializable;
|
||||
* <p>
|
||||
* <a name="inscribes">
|
||||
* The arc is a partial section of a full ellipse which
|
||||
* inscribes the framing rectangle of its parent {@link RectangularShape}.
|
||||
* </a>
|
||||
* inscribes the framing rectangle of its parent</a> {@link RectangularShape}.
|
||||
*
|
||||
* <a name="angles">
|
||||
* The angles are specified relative to the non-square
|
||||
* framing rectangle such that 45 degrees always falls on the line from
|
||||
|
||||
@ -324,7 +324,7 @@ public class AffineTransformOp implements BufferedImageOp, RasterOp {
|
||||
* this part of the rectangle is not drawn. If the coordinates
|
||||
* of the rectangle are positive then the filtered image is drawn at
|
||||
* that position in the destination <code>Raster</code>.
|
||||
* <p>
|
||||
*
|
||||
* @param src The <CODE>Raster</CODE> to transform.
|
||||
* @param dst The <CODE>Raster</CODE> in which to store the results of the
|
||||
* transformation.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -85,7 +85,7 @@ public class BufferedImageFilter extends ImageFilter implements Cloneable {
|
||||
* an image should avoid calling this method directly since that
|
||||
* operation could result in problems with retrieving the requested
|
||||
* pixels.
|
||||
* <p>
|
||||
*
|
||||
* @param width the width to which to set the width of this
|
||||
* <code>BufferedImageFilter</code>
|
||||
* @param height the height to which to set the height of this
|
||||
|
||||
@ -225,7 +225,7 @@ public class ImageFilter implements ImageConsumer, Cloneable {
|
||||
*
|
||||
* <li>
|
||||
* Override the method to simply send the data.
|
||||
* This is appropriate if the filter can handle the request itself —
|
||||
* This is appropriate if the filter can handle the request itself —
|
||||
* for example,
|
||||
* if the generated pixels have been saved in some sort of buffer.
|
||||
*
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -394,7 +394,7 @@ public class WritableRaster extends Raster {
|
||||
* is first converted to a 32-bit int (if necessary), using the above
|
||||
* rules for integral types, and then the int is cast to float or
|
||||
* double.
|
||||
* <p>
|
||||
*
|
||||
* @param srcRaster The Raster from which to copy pixels.
|
||||
*
|
||||
* @throws NullPointerException if srcRaster is null.
|
||||
|
||||
@ -370,7 +370,7 @@ public class ParameterBlock implements Cloneable, Serializable {
|
||||
* the specified parameter.
|
||||
*/
|
||||
public ParameterBlock add(int i) {
|
||||
return add(new Integer(i));
|
||||
return add(i);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -489,7 +489,7 @@ public class ParameterBlock implements Cloneable, Serializable {
|
||||
* the specified parameter.
|
||||
*/
|
||||
public ParameterBlock set(int i, int index) {
|
||||
return set(new Integer(i), index);
|
||||
return set(i, index);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -546,7 +546,6 @@ public abstract class PrinterJob {
|
||||
* user settings returned from
|
||||
* <code>printDialog(PrintRequestAttributeSet attributes</code> to
|
||||
* this print() method.
|
||||
* <p>
|
||||
*
|
||||
* @param attributes a set of attributes for the job
|
||||
* @exception PrinterException an error in the print system
|
||||
|
||||
@ -437,7 +437,7 @@ public class EventHandler implements InvocationHandler {
|
||||
if (method.getDeclaringClass() == Object.class) {
|
||||
// Handle the Object public methods.
|
||||
if (methodName.equals("hashCode")) {
|
||||
return new Integer(System.identityHashCode(proxy));
|
||||
return System.identityHashCode(proxy);
|
||||
} else if (methodName.equals("equals")) {
|
||||
return (proxy == arguments[0] ? Boolean.TRUE : Boolean.FALSE);
|
||||
} else if (methodName.equals("toString")) {
|
||||
|
||||
@ -123,13 +123,13 @@ static final class ArrayPersistenceDelegate extends PersistenceDelegate {
|
||||
Class<?> oldClass = oldInstance.getClass();
|
||||
return new Expression(oldInstance, Array.class, "newInstance",
|
||||
new Object[]{oldClass.getComponentType(),
|
||||
new Integer(Array.getLength(oldInstance))});
|
||||
Array.getLength(oldInstance)});
|
||||
}
|
||||
|
||||
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out) {
|
||||
int n = Array.getLength(oldInstance);
|
||||
for (int i = 0; i < n; i++) {
|
||||
Object index = new Integer(i);
|
||||
Object index = i;
|
||||
// Expression oldGetExp = new Expression(Array.class, "get", new Object[]{oldInstance, index});
|
||||
// Expression newGetExp = new Expression(Array.class, "get", new Object[]{newInstance, index});
|
||||
Expression oldGetExp = new Expression(oldInstance, "get", new Object[]{index});
|
||||
@ -635,7 +635,7 @@ static class java_util_List_PersistenceDelegate extends DefaultPersistenceDelega
|
||||
newSize = 0;
|
||||
}
|
||||
for (int i = 0; i < newSize; i++) {
|
||||
Object index = new Integer(i);
|
||||
Object index = i;
|
||||
|
||||
Expression oldGetExp = new Expression(oldInstance, "get", new Object[]{index});
|
||||
Expression newGetExp = new Expression(newInstance, "get", new Object[]{index});
|
||||
@ -892,7 +892,7 @@ static final class java_awt_MenuShortcut_PersistenceDelegate extends Persistence
|
||||
protected Expression instantiate(Object oldInstance, Encoder out) {
|
||||
java.awt.MenuShortcut m = (java.awt.MenuShortcut)oldInstance;
|
||||
return new Expression(oldInstance, m.getClass(), "new",
|
||||
new Object[]{new Integer(m.getKey()), Boolean.valueOf(m.usesShiftModifier())});
|
||||
new Object[]{m.getKey(), Boolean.valueOf(m.usesShiftModifier())});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ class NameGenerator {
|
||||
|
||||
Integer size = nameToCount.get(className);
|
||||
int instanceNumber = (size == null) ? 0 : (size).intValue() + 1;
|
||||
nameToCount.put(className, new Integer(instanceNumber));
|
||||
nameToCount.put(className, instanceNumber);
|
||||
|
||||
result = className + instanceNumber;
|
||||
valueToName.put(instance, result);
|
||||
|
||||
@ -131,8 +131,8 @@ standard plug-ins.
|
||||
<li>the number of bands is 1;
|
||||
<li>the number of bits per sample is not greater than 8;
|
||||
<li>the size of a color component is not greater than 8;
|
||||
</ul> </p>
|
||||
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
By default the GIF writer plug-in creates version "89a" images. This can be
|
||||
changed to "87a" by explicitly setting the version in the
|
||||
|
||||
@ -170,7 +170,7 @@ class PartialOrderIterator<E> implements Iterator<E> {
|
||||
while (iter.hasNext()) {
|
||||
DigraphNode<E> node = iter.next();
|
||||
int inDegree = node.getInDegree();
|
||||
inDegrees.put(node, new Integer(inDegree));
|
||||
inDegrees.put(node, inDegree);
|
||||
|
||||
// Add nodes with zero in-degree to the zero list
|
||||
if (inDegree == 0) {
|
||||
@ -191,7 +191,7 @@ class PartialOrderIterator<E> implements Iterator<E> {
|
||||
while (outNodes.hasNext()) {
|
||||
DigraphNode<E> node = outNodes.next();
|
||||
int inDegree = inDegrees.get(node).intValue() - 1;
|
||||
inDegrees.put(node, new Integer(inDegree));
|
||||
inDegrees.put(node, inDegree);
|
||||
|
||||
// If the in-degree has fallen to 0, place the node on the list
|
||||
if (inDegree == 0) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -168,7 +168,7 @@ public interface Doc {
|
||||
* from the print data representation object.
|
||||
* However, if the print data representation object is itself a Reader,
|
||||
* then the print data representation object is simply returned.
|
||||
* <P>
|
||||
*
|
||||
* @return Reader for reading the print data characters from this doc.
|
||||
* If a reader cannot be provided because this doc does not meet
|
||||
* the criteria stated above, null is returned.
|
||||
@ -192,7 +192,7 @@ public interface Doc {
|
||||
* object as a stream of bytes is created and returned. However, if the
|
||||
* print data representation object is itself an input stream, then the
|
||||
* print data representation object is simply returned.
|
||||
* <P>
|
||||
*
|
||||
* @return Input stream for reading the print data bytes from this doc. If
|
||||
* an input stream cannot be provided because this doc does not
|
||||
* meet the criteria stated above, null is returned.
|
||||
|
||||
@ -381,7 +381,6 @@ import java.io.Serializable;
|
||||
* <LI>
|
||||
* A line feed (LF) character standing by itself means
|
||||
* "go to column 1 of the next line."
|
||||
* <LI>
|
||||
* </UL>
|
||||
* <P>
|
||||
* The client must itself perform all plain text print data formatting not
|
||||
@ -436,7 +435,6 @@ import java.io.Serializable;
|
||||
* Java Print Service instance supports without having
|
||||
* to load the representation classes, which may be problematic for
|
||||
* limited-resource clients.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
@ -536,7 +534,7 @@ public class DocFlavor implements Serializable, Cloneable {
|
||||
* The charset for text types is a commonly useful example.
|
||||
* This convenience method will return the value of the specified
|
||||
* parameter if one was specified in the mime type for this flavor.
|
||||
* <p>
|
||||
*
|
||||
* @param paramName the name of the paramater. This name is internally
|
||||
* converted to the canonical lower case format before performing
|
||||
* the match.
|
||||
@ -638,7 +636,6 @@ public class DocFlavor implements Serializable, Cloneable {
|
||||
* Class DocFlavor.BYTE_ARRAY provides predefined static constant
|
||||
* DocFlavor objects for example doc flavors using a byte array
|
||||
* (<CODE>byte[]</CODE>) as the print data representation class.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
@ -836,7 +833,6 @@ public class DocFlavor implements Serializable, Cloneable {
|
||||
* DocFlavor objects for example doc flavors using a byte stream ({@link
|
||||
* java.io.InputStream java.io.InputStream}) as the print
|
||||
* data representation class.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
@ -1038,8 +1034,7 @@ public class DocFlavor implements Serializable, Cloneable {
|
||||
* objects.
|
||||
* For example doc flavors using a Uniform Resource Locator ({@link
|
||||
* java.net.URL java.net.URL}) as the print data
|
||||
* representation class.
|
||||
* <P>
|
||||
* representation class.
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
@ -1229,7 +1224,6 @@ public class DocFlavor implements Serializable, Cloneable {
|
||||
* DocFlavor objects for example doc flavors using a character array
|
||||
* (<CODE>char[]</CODE>) as the print data representation class. As such,
|
||||
* the character set is Unicode.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
@ -1279,7 +1273,6 @@ public class DocFlavor implements Serializable, Cloneable {
|
||||
* objects for example doc flavors using a string ({@link java.lang.String
|
||||
* java.lang.String}) as the print data representation class.
|
||||
* As such, the character set is Unicode.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
@ -1327,7 +1320,6 @@ public class DocFlavor implements Serializable, Cloneable {
|
||||
* objects for example doc flavors using a character stream ({@link
|
||||
* java.io.Reader java.io.Reader}) as the print data
|
||||
* representation class. As such, the character set is Unicode.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
@ -1376,7 +1368,6 @@ public class DocFlavor implements Serializable, Cloneable {
|
||||
* Class DocFlavor.SERVICE_FORMATTED provides predefined static constant
|
||||
* DocFlavor objects for example doc flavors for service formatted print
|
||||
* data.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -327,7 +327,6 @@ public interface PrintService {
|
||||
* that indicates bounds on the legal values -- used, for example, by an
|
||||
* integer-valued attribute that must lie within a certain range.
|
||||
* </UL>
|
||||
* <P>
|
||||
*
|
||||
* @param category Printing attribute category to test. It must be a
|
||||
* {@link java.lang.Class Class} that implements
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -199,7 +199,6 @@ public abstract class PrintServiceLookup {
|
||||
* available that is not part of the installation.
|
||||
* If the lookup service is already registered, or cannot be registered,
|
||||
* the method returns false.
|
||||
* <p>
|
||||
*
|
||||
* @param sp an implementation of a lookup service.
|
||||
* @return <code>true</code> if the new lookup service is newly
|
||||
@ -305,7 +304,6 @@ public abstract class PrintServiceLookup {
|
||||
* <p>
|
||||
* Locates MultiDoc print services which can be positively confirmed
|
||||
* to support the combination of attributes and DocFlavors specified.
|
||||
* <p>
|
||||
*
|
||||
* @param flavors of documents required. If null or empty it is ignored.
|
||||
* @param attributes required to be supported. If null this
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -131,8 +131,7 @@ public class ServiceUI {
|
||||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
* <p>
|
||||
|
||||
*
|
||||
* @param gc used to select screen. null means primary or default screen.
|
||||
* @param x location of dialog including border in screen coordinates
|
||||
* @param y location of dialog including border in screen coordinates
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -111,7 +111,7 @@ public abstract class ServiceUIFactory {
|
||||
/**
|
||||
* Get a UI object which may be cast to the requested UI type
|
||||
* by the application and used in its user interface.
|
||||
* <P>
|
||||
*
|
||||
* @param role requested. Must be one of the standard roles or
|
||||
* a private role supported by this factory.
|
||||
* @param ui type in which the role is requested.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -176,7 +176,7 @@ public final class SimpleDoc implements Doc {
|
||||
* However, if the print data representation object is itself a
|
||||
* <code>Reader</code> then the print data representation object is
|
||||
* simply returned.
|
||||
* <P>
|
||||
*
|
||||
* @return a <code>Reader</code> for reading the print data
|
||||
* characters from this doc.
|
||||
* If a reader cannot be provided because this doc does not meet
|
||||
@ -224,7 +224,7 @@ public final class SimpleDoc implements Doc {
|
||||
* However, if the print data representation object is itself an
|
||||
* input stream then the print data representation object is simply
|
||||
* returned.
|
||||
* <P>
|
||||
*
|
||||
* @return an <code>InputStream</code> for reading the print data
|
||||
* bytes from this doc. If an input stream cannot be
|
||||
* provided because this doc does not meet
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -95,7 +95,7 @@ public abstract class StreamPrintServiceFactory {
|
||||
* Although null is an acceptable value to use in the lookup of stream
|
||||
* printing services, it's typical to search for a particular
|
||||
* desired format, such as Postscript(TM).
|
||||
* <p>
|
||||
*
|
||||
* @param flavor of the input document type - null means match all
|
||||
* types.
|
||||
* @param outputMimeType representing the required output format, used to
|
||||
@ -153,7 +153,7 @@ public abstract class StreamPrintServiceFactory {
|
||||
* Implementations which allocate resources on construction should examine
|
||||
* the stream and may wish to only allocate resources if the stream is
|
||||
* non-null.
|
||||
* <p>
|
||||
*
|
||||
* @param out destination stream for generated output.
|
||||
* @return a PrintService which will generate the format specified by the
|
||||
* DocFlavor supported by this Factory.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -31,7 +31,6 @@ import java.io.Serializable;
|
||||
* Interface Attribute is the base interface implemented by any and every
|
||||
* printing attribute class to indicate that the class represents a
|
||||
* printing attribute. All printing attributes are serializable.
|
||||
* <P>
|
||||
*
|
||||
* @author David Mendenhall
|
||||
* @author Alan Kaminsky
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -54,7 +54,6 @@ import java.util.Date;
|
||||
* rather than a <code>java.util.Calendar</code> because it typically takes
|
||||
* less memory to store and less time to compare a <code>java.util.Date</code>
|
||||
* than a <code>java.util.Calendar</code>.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -36,7 +36,6 @@ package javax.print.attribute;
|
||||
* PrintRequestAttribute} as well as DocAttribute, the client may include the
|
||||
* attribute in a attribute set which specifies a print job
|
||||
* to specify a characteristic for all the docs in that job.
|
||||
* <P>
|
||||
*
|
||||
* @see DocAttributeSet
|
||||
* @see PrintRequestAttributeSet
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -40,7 +40,6 @@ package javax.print.attribute;
|
||||
* The {@link #add(Attribute) add(Attribute)}, and
|
||||
* {@link #addAll(AttributeSet) addAll(AttributeSet)} operations
|
||||
* are respecified below to guarantee this additional invariant.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -102,7 +102,6 @@ import java.io.Serializable;
|
||||
* uses some of the same integer values as the superclass. However, the
|
||||
* application in which the enumeration class and subclass are used may need to
|
||||
* have distinct integer values in the superclass and subclass.
|
||||
* <P>
|
||||
*
|
||||
* @author David Mendenhall
|
||||
* @author Alan Kaminsky
|
||||
|
||||
@ -34,7 +34,6 @@ import java.util.HashMap;
|
||||
/**
|
||||
* Class HashAttributeSet provides an <code>AttributeSet</code>
|
||||
* implementation with characteristics of a hash map.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -33,7 +33,6 @@ import java.io.Serializable;
|
||||
* inherits its implementation from class {@link HashAttributeSet
|
||||
* HashAttributeSet} and enforces the semantic restrictions of interface {@link
|
||||
* DocAttributeSet DocAttributeSet}.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -33,7 +33,6 @@ import java.io.Serializable;
|
||||
* which inherits its implementation from class {@link HashAttributeSet
|
||||
* HashAttributeSet} and enforces the semantic restrictions of interface
|
||||
* {@link PrintJobAttributeSet PrintJobAttributeSet}.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -33,7 +33,6 @@ import java.io.Serializable;
|
||||
* class {@link HashAttributeSet HashAttributeSet} and enforces the
|
||||
* semantic restrictions of interface
|
||||
* {@link PrintRequestAttributeSet PrintRequestAttributeSet}.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -32,7 +32,6 @@ import java.io.Serializable;
|
||||
* which inherits its implementation from class {@link HashAttributeSet
|
||||
* HashAttributeSet} and enforces the semantic restrictions of interface
|
||||
* {@link PrintServiceAttributeSet PrintServiceAttributeSet}.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -37,7 +37,6 @@ import java.io.Serializable;
|
||||
* established when it is constructed (see {@link #IntegerSyntax(int)
|
||||
* IntegerSyntax(int)}). Once constructed, an integer attribute's
|
||||
* value is immutable.
|
||||
* <P>
|
||||
*
|
||||
* @author David Mendenhall
|
||||
* @author Alan Kaminsky
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -34,7 +34,6 @@ package javax.print.attribute;
|
||||
* PrintRequestAttribute PrintRequestAttribute} as well as PrintJobAttribute,
|
||||
* the client may include the attribute in a attribute set to
|
||||
* specify the attribute's value for the Print Job.
|
||||
* <P>
|
||||
*
|
||||
* @see PrintRequestAttributeSet
|
||||
* @see PrintJobAttributeSet
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -39,7 +39,6 @@ package javax.print.attribute;
|
||||
* The {@link #add(Attribute) add(Attribute)}, and
|
||||
* {@link #addAll(AttributeSet) >addAll(AttributeSet)} operations
|
||||
* are respecified below to guarantee this additional invariant.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -39,7 +39,6 @@ package javax.print.attribute;
|
||||
* as well as PrintRequestAttribute, the client may include the
|
||||
* attribute in a <code>Doc</code>}'s attribute set to specify
|
||||
* a job setting which pertains just to that doc.
|
||||
* <P>
|
||||
*
|
||||
* @see DocAttributeSet
|
||||
* @see PrintRequestAttributeSet
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -40,7 +40,6 @@ package javax.print.attribute;
|
||||
* The {@link #add(Attribute) add(Attribute)}, and
|
||||
* {@link #addAll(AttributeSet) addAll(AttributeSet)} operations
|
||||
* are respecified below to guarantee this additional invariant.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -31,7 +31,6 @@ package javax.print.attribute;
|
||||
* of a Print Service or some other characteristic of a Print Service. A Print
|
||||
* Service instance adds a number of PrintServiceAttributes to a Print
|
||||
* service's attribute set to report the Print Service's status.
|
||||
* <P>
|
||||
*
|
||||
* @see PrintServiceAttributeSet
|
||||
*
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -42,7 +42,6 @@ package javax.print.attribute;
|
||||
* The {@link #add(Attribute) add(Attribute)}, and
|
||||
* {@link #addAll(AttributeSet) addAll(AttributeSet)} operations
|
||||
* are respecified below to guarantee this additional invariant.
|
||||
* <P>
|
||||
*
|
||||
* @author Alan Kaminsky
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -78,7 +78,6 @@ import java.io.Serializable;
|
||||
* mind, there is no guarantee that the conversion factor for the client's units
|
||||
* will be an exact integer. If the conversion factor isn't an exact integer,
|
||||
* resolution values in the client's units won't be stored precisely.
|
||||
* <P>
|
||||
*
|
||||
* @author David Mendenhall
|
||||
* @author Alan Kaminsky
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user