Compare commits
387 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
032c4b1852 | ||
|
|
532f0a3f91 | ||
|
|
6093049cf7 | ||
|
|
fa2a7c1eba | ||
|
|
c6b433b268 | ||
|
|
b48ad24881 | ||
|
|
61e8702439 | ||
|
|
106ef27433 | ||
|
|
ae45c3387c | ||
|
|
ee05f360c5 | ||
|
|
2db9a870e7 | ||
|
|
260319ec74 | ||
|
|
9179718cb6 | ||
|
|
90276e6c00 | ||
|
|
cb188edaab | ||
|
|
589b93be04 | ||
|
|
63572dcc76 | ||
|
|
480a2f5a34 | ||
|
|
763414f5f0 | ||
|
|
e3ba0bd651 | ||
|
|
7db46ce2b2 | ||
|
|
81916a92af | ||
|
|
b85a2171c3 | ||
|
|
05dc889841 | ||
|
|
4a754a0fa2 | ||
|
|
be9b80a30a | ||
|
|
f691fe2f03 | ||
|
|
a879ad5739 | ||
|
|
94c75b0537 | ||
|
|
bff7dfddfb | ||
|
|
6ecbc2736b | ||
|
|
8cde9502f1 | ||
|
|
af0360f3ea | ||
|
|
02e0f6f078 | ||
|
|
094f03f5b3 | ||
|
|
71ee90cd7b | ||
|
|
426055c320 | ||
|
|
30ce36030d | ||
|
|
6012cd1180 | ||
|
|
1d31d1f8ff | ||
|
|
04112e6f90 | ||
|
|
e0c79eb54f | ||
|
|
6ad54fb1ea | ||
|
|
dc7abebe17 | ||
|
|
6d35b8fe59 | ||
|
|
9552363525 | ||
|
|
6a9a917161 | ||
|
|
916fec8145 | ||
|
|
a53989e85a | ||
|
|
4efa7eab3e | ||
|
|
07bf36928d | ||
|
|
c2e756ec4f | ||
|
|
3d7ac30072 | ||
|
|
3d0ec88046 | ||
|
|
2b8f6f70a0 | ||
|
|
c8d631a142 | ||
|
|
37739127c3 | ||
|
|
a26b70568a | ||
|
|
1e6f37320b | ||
|
|
f368f0f101 | ||
|
|
48b7dd874f | ||
|
|
5bb4c2a1d6 | ||
|
|
094306dc24 | ||
|
|
9b1114df30 | ||
|
|
366ceeb857 | ||
|
|
315b0ed151 | ||
|
|
2a68808b1d | ||
|
|
8bc90e970e | ||
|
|
d2820524a1 | ||
|
|
d68dcbfa37 | ||
|
|
34fa047463 | ||
|
|
a4e7fdb61c | ||
|
|
ec0d6d6b14 | ||
|
|
903775e751 | ||
|
|
13fbc2beca | ||
|
|
6f4be20e39 | ||
|
|
e5dd1ec919 | ||
|
|
ad87675353 | ||
|
|
764909ce2a | ||
|
|
74f6d29013 | ||
|
|
9820ecb77c | ||
|
|
a1fcf9fcbc | ||
|
|
8637715ecc | ||
|
|
52ee651a09 | ||
|
|
a47c5fadca | ||
|
|
33b68747b2 | ||
|
|
d53601a541 | ||
|
|
a03103bbe6 | ||
|
|
8fb03809dc | ||
|
|
3d988754d4 | ||
|
|
53c4bf9f26 | ||
|
|
140750c24d | ||
|
|
7c60ba27c5 | ||
|
|
5bd82eb264 | ||
|
|
ba6e4eb906 | ||
|
|
46fc019eeb | ||
|
|
04eebb8c56 | ||
|
|
c7257c1dae | ||
|
|
c06c4c69d3 | ||
|
|
d45e86456a | ||
|
|
924d33c6d1 | ||
|
|
63b1f82e1c | ||
|
|
39501a3d4a | ||
|
|
6003593f78 | ||
|
|
9e06cc8f01 | ||
|
|
be4f8c0d9d | ||
|
|
b89e6aed0b | ||
|
|
3d898a8024 | ||
|
|
96da48c589 | ||
|
|
241af853ea | ||
|
|
b808be6a6a | ||
|
|
0be0a018b5 | ||
|
|
48e7b547ae | ||
|
|
d4b529ad49 | ||
|
|
f779f6248c | ||
|
|
c0c871c5f9 | ||
|
|
53b86e4272 | ||
|
|
483af71639 | ||
|
|
5a9b273098 | ||
|
|
212888416b | ||
|
|
14e2b7a4ad | ||
|
|
bbdbe17e2a | ||
|
|
422fa59643 | ||
|
|
0b5119ca89 | ||
|
|
dfaa777ff5 | ||
|
|
d45e80b422 | ||
|
|
a29f19e6a2 | ||
|
|
c2eee9426f | ||
|
|
0e1d23c807 | ||
|
|
2847be73c6 | ||
|
|
6851dc3441 | ||
|
|
61dc0ea151 | ||
|
|
d295bb0bbd | ||
|
|
703cdf6b6a | ||
|
|
c606d1f8c6 | ||
|
|
65a5e450d5 | ||
|
|
c6fed2cf58 | ||
|
|
9caaac4a5a | ||
|
|
5d704a963b | ||
|
|
e9bd5f5dad | ||
|
|
32ce109355 | ||
|
|
2b03305a5f | ||
|
|
89c99c1999 | ||
|
|
8da6cec22a | ||
|
|
394e055ae6 | ||
|
|
5b814d6b34 | ||
|
|
67b1e552d8 | ||
|
|
fc2b95ea8e | ||
|
|
690696bb52 | ||
|
|
cbf4d301ee | ||
|
|
72fb9ff7c4 | ||
|
|
030f15834c | ||
|
|
c30407cb87 | ||
|
|
dbc15fb84e | ||
|
|
d6b588bdab | ||
|
|
a949f9d220 | ||
|
|
c3c85ad548 | ||
|
|
f3ca8c7869 | ||
|
|
ff04fd9429 | ||
|
|
339d11fa0d | ||
|
|
24dfabe6c3 | ||
|
|
8e6fc9365c | ||
|
|
adacc3a6f6 | ||
|
|
6aee6ac680 | ||
|
|
6b52af6446 | ||
|
|
86ca0039c0 | ||
|
|
fcdbfc43af | ||
|
|
09b06c2254 | ||
|
|
7919c20137 | ||
|
|
25777c7a28 | ||
|
|
d08b441e3c | ||
|
|
97ab23c7d5 | ||
|
|
1440ca5841 | ||
|
|
8e7d110d73 | ||
|
|
968c24866d | ||
|
|
e722edf104 | ||
|
|
fc8100802a | ||
|
|
d31903acce | ||
|
|
55e86e53bc | ||
|
|
a2dd06ca62 | ||
|
|
785032941d | ||
|
|
3ce2665aae | ||
|
|
3524ee07e7 | ||
|
|
32cbdd4cef | ||
|
|
b5bf240fd8 | ||
|
|
c3b4add398 | ||
|
|
bc7cd26d17 | ||
|
|
5f5b589458 | ||
|
|
a9bc2e51f4 | ||
|
|
a6c21c912e | ||
|
|
d3731df79d | ||
|
|
00a29ad129 | ||
|
|
7fc924f065 | ||
|
|
63130fd461 | ||
|
|
f925b24d5e | ||
|
|
9e6301fd03 | ||
|
|
4c588271e2 | ||
|
|
9699d0763a | ||
|
|
786cee5d97 | ||
|
|
37e7661f85 | ||
|
|
de1e4a9d71 | ||
|
|
9662d45e36 | ||
|
|
dffea9d701 | ||
|
|
c358cff18b | ||
|
|
2c1ee18b78 | ||
|
|
eaed1780be | ||
|
|
666e2ed685 | ||
|
|
fe339f5eab | ||
|
|
5904c3ce30 | ||
|
|
7cd1d0bc10 | ||
|
|
0a36774a6e | ||
|
|
54bd0ddc20 | ||
|
|
2fe5289178 | ||
|
|
cf7e3f86f5 | ||
|
|
acc636fa2d | ||
|
|
833d9f85a8 | ||
|
|
cef970e1ba | ||
|
|
3f02c651e5 | ||
|
|
f9902f7611 | ||
|
|
a8ec2d4116 | ||
|
|
9a20d85614 | ||
|
|
98041ba69a | ||
|
|
068ee17dc4 | ||
|
|
4b53b59313 | ||
|
|
95a43caeba | ||
|
|
34f70fb425 | ||
|
|
86316d0205 | ||
|
|
b1941dcb80 | ||
|
|
a56cb06c61 | ||
|
|
3d687d001b | ||
|
|
6e44f31b7d | ||
|
|
d68f22fe9a | ||
|
|
5f4ecfc278 | ||
|
|
7282448b4d | ||
|
|
65c02bb7e6 | ||
|
|
293c224f35 | ||
|
|
e8af601d73 | ||
|
|
df5bcf148a | ||
|
|
8453ad0462 | ||
|
|
3c09162059 | ||
|
|
916ccc45f1 | ||
|
|
4bcecb07e5 | ||
|
|
2fdb898177 | ||
|
|
bcb5ba34ac | ||
|
|
0f7c26186a | ||
|
|
6fc369e8bf | ||
|
|
6d73b25130 | ||
|
|
5d98c94ee9 | ||
|
|
28774d6878 | ||
|
|
a68dea068c | ||
|
|
45f1ff7490 | ||
|
|
be707de431 | ||
|
|
3db09e43d8 | ||
|
|
9f079c66e9 | ||
|
|
1a1fa31545 | ||
|
|
e79502c708 | ||
|
|
ef490fa465 | ||
|
|
5c13d63217 | ||
|
|
614396d63f | ||
|
|
b6bdd04e41 | ||
|
|
c75c1ef8b2 | ||
|
|
cc0faf953f | ||
|
|
0a4fdad0f2 | ||
|
|
1fd4615c04 | ||
|
|
66e5c5bc22 | ||
|
|
4f70a712e0 | ||
|
|
ee05ba1b33 | ||
|
|
6b30858be0 | ||
|
|
ab613b0f7e | ||
|
|
99fe494c59 | ||
|
|
1ac5433cb8 | ||
|
|
7326b13db1 | ||
|
|
7262736e7e | ||
|
|
8669d9d28b | ||
|
|
c8f248a936 | ||
|
|
9ea664c299 | ||
|
|
82cd480619 | ||
|
|
4a14c6f15a | ||
|
|
c4a1277c1b | ||
|
|
1ce8c3ce82 | ||
|
|
0026095202 | ||
|
|
82adbe9c25 | ||
|
|
3a43f4557f | ||
|
|
d04debc847 | ||
|
|
37dc13c603 | ||
|
|
cb4453b1d1 | ||
|
|
9d0157c362 | ||
|
|
3a7b3c67b0 | ||
|
|
c7b0ac686f | ||
|
|
15693661cc | ||
|
|
1f4ad38d23 | ||
|
|
236bd38d1b | ||
|
|
65e9ec3602 | ||
|
|
5b523f049e | ||
|
|
0e0b0d13f9 | ||
|
|
fb2bbc47fe | ||
|
|
2ac273a456 | ||
|
|
cec93cf1fd | ||
|
|
f3f2667a4c | ||
|
|
091d74a791 | ||
|
|
b1c49c3b27 | ||
|
|
431e14429c | ||
|
|
f80497c4f0 | ||
|
|
44fcbdabf8 | ||
|
|
e6f0055704 | ||
|
|
ad92fe9071 | ||
|
|
d93a5f1598 | ||
|
|
a3c220da70 | ||
|
|
a62d8b2387 | ||
|
|
d1ed8ab118 | ||
|
|
cdea1cb75d | ||
|
|
1019d8f0f2 | ||
|
|
f3ccc53e02 | ||
|
|
8d532d3f81 | ||
|
|
6df193a2af | ||
|
|
ccfe65be7f | ||
|
|
e496262aa1 | ||
|
|
641a09dd52 | ||
|
|
9279d80110 | ||
|
|
da3a816e50 | ||
|
|
277357ae73 | ||
|
|
6fb2c36529 | ||
|
|
34234263fb | ||
|
|
6dc45410b0 | ||
|
|
2bf5a7ca5c | ||
|
|
35571ba1ad | ||
|
|
cdd3529046 | ||
|
|
ba22b31a49 | ||
|
|
e2d1655703 | ||
|
|
6ea1d45fd1 | ||
|
|
6ce31e0a32 | ||
|
|
864999209d | ||
|
|
8c56d9389a | ||
|
|
0b2bdf3c49 | ||
|
|
48c9ea3f09 | ||
|
|
6246abc72f | ||
|
|
38466cbab0 | ||
|
|
ef2870ee38 | ||
|
|
c5cc28d85d | ||
|
|
9ea2011948 | ||
|
|
0651b45e13 | ||
|
|
5e183c397b | ||
|
|
deeda6fada | ||
|
|
4f46d6ba2c | ||
|
|
b965f85c1b | ||
|
|
aa09fa2c85 | ||
|
|
11a0911d65 | ||
|
|
985908cf10 | ||
|
|
c17bc728ee | ||
|
|
4851fdea0a | ||
|
|
aeea6c1ca3 | ||
|
|
adb3a4be16 | ||
|
|
b95ae60bc0 | ||
|
|
cba1501d3e | ||
|
|
7e250841df | ||
|
|
cec49aaa38 | ||
|
|
7d1d43bfa1 | ||
|
|
60be76b725 | ||
|
|
c044245410 | ||
|
|
20edebdefa | ||
|
|
ca32a66f85 | ||
|
|
dbc9f3cf91 | ||
|
|
aef17f16be | ||
|
|
fd615a5b45 | ||
|
|
b8f4b4a9ed | ||
|
|
8a44e1bb37 | ||
|
|
5faebc73d5 | ||
|
|
771ddf16ad | ||
|
|
0456745afb | ||
|
|
9b4b3fb698 | ||
|
|
1d32ff4742 | ||
|
|
a75dc73f88 | ||
|
|
6f825670bb | ||
|
|
2a92eec59d | ||
|
|
34d91c979d | ||
|
|
ccf0176c32 | ||
|
|
8fd21b3746 | ||
|
|
b71d92478d | ||
|
|
f1bb150edb | ||
|
|
1d7ed0ff75 | ||
|
|
0a92b01c17 | ||
|
|
3e4fa31780 | ||
|
|
ef104967bf | ||
|
|
70e7eb9b95 | ||
|
|
0226ce81da | ||
|
|
689f55d8c9 | ||
|
|
362b676929 |
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
JTwork
|
||||
JTreport
|
||||
*.class
|
||||
.idea/workspace.xml
|
||||
build/
|
||||
5
.idea/codeStyles/Project.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<option name="LINE_SEPARATOR" value=" " />
|
||||
</code_scheme>
|
||||
</component>
|
||||
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
</state>
|
||||
</component>
|
||||
9
.idea/copyright/JetBrains.xml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<component name="CopyrightManager">
|
||||
<copyright>
|
||||
<option name="notice" value="Copyright 2000-&#36;today.year JetBrains s.r.o. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License." />
|
||||
<option name="keyword" value="Copyright" />
|
||||
<option name="allowReplaceKeyword" value="JetBrains" />
|
||||
<option name="myName" value="JetBrains" />
|
||||
<option name="myLocal" value="true" />
|
||||
</copyright>
|
||||
</component>
|
||||
3
.idea/copyright/profiles_settings.xml
generated
Normal file
@@ -0,0 +1,3 @@
|
||||
<component name="CopyrightManager">
|
||||
<settings default="JetBrains" />
|
||||
</component>
|
||||
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
60
README.md
Normal file
@@ -0,0 +1,60 @@
|
||||
[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
|
||||
|
||||
# Downloads
|
||||
|
||||
|Windows-x64 |macOS |Linux-x64 |
|
||||
|-------------|-------------|-------------|
|
||||
|<a href="https://bintray.com/jetbrains/intellij-jdk/openjdk9-windows-x64/_latestVersion"> <img src="https://api.bintray.com/packages/jetbrains/intellij-jdk/openjdk9-windows-x64/images/download.svg"/></a>|<a href="https://bintray.com/jetbrains/intellij-jdk/openjdk9-osx-x64/_latestVersion"> <img src="https://api.bintray.com/packages/jetbrains/intellij-jdk/openjdk9-osx-x64/images/download.svg"/></a>|<a href="https://bintray.com/jetbrains/intellij-jdk/openjdk9-linux-x64/_latestVersion"><img src="https://api.bintray.com/packages/jetbrains/intellij-jdk/openjdk9-linux-x64/images/download.svg"/></a>|
|
||||
|
||||
|
||||
# How JetBrains Runtime is organised
|
||||
## Workspaces
|
||||
|
||||
[github.com/JetBrains/JetBrainsRuntime](https://github.com/JetBrains/JetBrainsRuntime)
|
||||
|
||||
## Getting sources
|
||||
__OSX, Linux:__
|
||||
```
|
||||
git config --global core.autocrlf input
|
||||
git clone git@github.com:JetBrains/JetBrainsRuntime.git
|
||||
```
|
||||
|
||||
__Windows:__
|
||||
```
|
||||
git config --global core.autocrlf false
|
||||
git clone git@github.com:JetBrains/JetBrainsRuntime.git
|
||||
```
|
||||
|
||||
# Configure Local Build Environment
|
||||
## Linux (docker)
|
||||
```
|
||||
$ cd jb/project/docker
|
||||
$ docker build .
|
||||
...
|
||||
Successfully built 942ea9900054
|
||||
|
||||
$ docker run -v `pwd`../../../../:/JetBrainsRuntime -it 942ea9900054
|
||||
|
||||
# cd /JetBrainsRuntime
|
||||
# sh ./configure
|
||||
# make images CONF=linux-x86_64-normal-server-release
|
||||
|
||||
```
|
||||
|
||||
## Linux (Ubuntu 18.10 desktop)
|
||||
```
|
||||
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev install libcups2-dev libfontconfig1-dev libasound2-dev
|
||||
|
||||
$ cd JetBrainsRuntime
|
||||
$ sh ./configure --disable-warnings-as-errors
|
||||
$ make images
|
||||
```
|
||||
|
||||
## Windows
|
||||
#### TBD
|
||||
|
||||
## OSX
|
||||
#### TBD
|
||||
|
||||
## Contribution
|
||||
We will be happy to receive your pull requests. Before you submit one, please sign our Contributor License Agreement (CLA) https://www.jetbrains.com/agreements/cla/
|
||||
9
jb/project/docker/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM centos:7
|
||||
|
||||
RUN yum -y install zip bzip2 unzip tar wget make autoconf automake libtool gcc gcc-c++ libstdc++-devel alsa-devel cups-devel xorg-x11-devel libjpeg62-devel giflib-devel freetype-devel file which libXtst-devel libXt-devel libXrender-devel alsa-lib-devel fontconfig-devel
|
||||
|
||||
# Install Java 11
|
||||
RUN wget --no-check-certificate -q --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/11.0.1+13/90cf5d8f270a4347a95050320eef3fb7/jdk-11.0.1_linux-x64_bin.tar.gz" \
|
||||
-O - | tar xz -C /
|
||||
ENV JAVA_HOME /jdk-11.0.1
|
||||
ENV PATH $JAVA_HOME/bin:$PATH
|
||||
2966
jb/project/hotspot-cmake/CMakeLists.txt
Normal file
30
jb/project/java-common.cmake
Normal file
@@ -0,0 +1,30 @@
|
||||
# common for all OS
|
||||
set(CMAKE_CXX_STANDARD 98)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE -D_REENTRANT -DVM_LITTLE_ENDIAN -D_LP64 -DTARGET_ARCH_x86 ")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DINCLUDE_SUFFIX_CPU=_x86 -DAMD64 -DHOTSPOT_LIB_ARCH='amd64' -DCOMPILER1 -DCOMPILER2")
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTARGET_COMPILER_gcc")
|
||||
endif ()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLINUX -DTARGET_OS_FAMILY_linux -DTARGET_COMPILER_gcc -D_GNU_SOURCE")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DLINUX -DTARGET_OS_FAMILY_linux -DTARGET_COMPILER_gcc -D_GNU_SOURCE")
|
||||
endif ()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_ALLBSD_SOURCE -DTARGET_OS_FAMILY_bsd")
|
||||
endif ()
|
||||
|
||||
if ("${CMAKE_SYSTEM_NAME}" MATCHES "CYGWIN") #not shure about TARGET_COMPILER
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTARGET_COMPILER_visCPP -DWIN64 -D_WINDOWS -DTARGET_OS_FAMILY_windows")
|
||||
endif ()
|
||||
|
||||
add_custom_target(configure
|
||||
COMMAND bash configure
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../)
|
||||
|
||||
add_custom_target(build_images
|
||||
COMMAND make COMPILER_WARNINGS_FATAL=false images
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../../
|
||||
DEPENDS ${SOURCE_FILES})
|
||||
9
jb/project/java-gradle/.idea/compiler.xml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel>
|
||||
<module name="java-gradle.main" target="11" />
|
||||
<module name="java-gradle.test" target="11" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
</project>
|
||||
20
jb/project/java-gradle/.idea/gradle.xml
generated
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleHome" value="/usr/share/gradle" />
|
||||
<option name="gradleJvm" value="11" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="useAutoImport" value="true" />
|
||||
<option name="useQualifiedModuleNames" value="true" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
11
jb/project/java-gradle/.idea/libraries/Gradle__com_twelvemonkeys_common_common_image_3_3_2.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: com.twelvemonkeys.common:common-image:3.3.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.common/common-image/3.3.2/9c975152864050c6dbb7226ca1100694f0aa099d/common-image-3.3.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.common/common-image/3.3.2/e6fb35a9825421ec5a634af328e22546992d536d/common-image-3.3.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
11
jb/project/java-gradle/.idea/libraries/Gradle__com_twelvemonkeys_common_common_io_3_3_2.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: com.twelvemonkeys.common:common-io:3.3.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.common/common-io/3.3.2/e00b1c744993864d3c8dc698ba7d356122019398/common-io-3.3.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.common/common-io/3.3.2/dbb242585fdfd353dc4c2c0e8b3d8b0383dffbb2/common-io-3.3.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
11
jb/project/java-gradle/.idea/libraries/Gradle__com_twelvemonkeys_common_common_lang_3_3_2.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: com.twelvemonkeys.common:common-lang:3.3.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.common/common-lang/3.3.2/ffbc5e05208c5c9cb43052438294c3ec5546aecf/common-lang-3.3.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.common/common-lang/3.3.2/b695db345614a2b9344fd43a44d9ce722df4b39/common-lang-3.3.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
11
jb/project/java-gradle/.idea/libraries/Gradle__com_twelvemonkeys_imageio_imageio_core_3_3_2.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: com.twelvemonkeys.imageio:imageio-core:3.3.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.imageio/imageio-core/3.3.2/8def41c756831dde3c23f2d525e5667cfbfa1847/imageio-core-3.3.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.imageio/imageio-core/3.3.2/abcb2beaf21364467afe0e33824dce5730bef0c3/imageio-core-3.3.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
11
jb/project/java-gradle/.idea/libraries/Gradle__com_twelvemonkeys_imageio_imageio_metadata_3_3_2.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: com.twelvemonkeys.imageio:imageio-metadata:3.3.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.imageio/imageio-metadata/3.3.2/b8a31725bde0dc6f4e6b01711784f5ca0a2275f3/imageio-metadata-3.3.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.imageio/imageio-metadata/3.3.2/6fc3b223c81afbd4b829e2c924c096aab3ed0e9e/imageio-metadata-3.3.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
11
jb/project/java-gradle/.idea/libraries/Gradle__com_twelvemonkeys_imageio_imageio_tiff_3_3_2.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: com.twelvemonkeys.imageio:imageio-tiff:3.3.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.imageio/imageio-tiff/3.3.2/9bea1214eae7d287dc0c685fb6be75102318d080/imageio-tiff-3.3.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.twelvemonkeys.imageio/imageio-tiff/3.3.2/cae5b3540dc01889dc9560db86f5f61bdc253107/imageio-tiff-3.3.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
11
jb/project/java-gradle/.idea/libraries/Gradle__junit_junit_4_12.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: junit:junit:4.12">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/a6c32b40bf3d76eca54e3c601e5d1470c86fcdfa/junit-4.12-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
11
jb/project/java-gradle/.idea/libraries/Gradle__net_java_dev_jna_jna_4_4_0.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: net.java.dev.jna:jna:4.4.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/4.4.0/cb208278274bf12ebdb56c61bd7407e6f774d65a/jna-4.4.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/4.4.0/9d45d3dc35711eef7267d8b4fc2c0dc482ef9fd2/jna-4.4.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
11
jb/project/java-gradle/.idea/libraries/Gradle__org_apache_commons_commons_lang3_3_0.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: org.apache.commons:commons-lang3:3.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.0/8873bd0bb5cb9ee37f1b04578eb7e26fcdd44cb0/commons-lang3-3.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.0/d48f964b56a931ec2712ce5d411a40d114a69753/commons-lang3-3.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
11
jb/project/java-gradle/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: org.hamcrest:hamcrest-core:1.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/1dc37250fbc78e23a65a67fbbaf71d2e9cbc3c0b/hamcrest-core-1.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
11
jb/project/java-gradle/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: org.hamcrest:hamcrest-library:1.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-library/1.3/4785a3c21320980282f9f33d0d1264a69040538f/hamcrest-library-1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-library/1.3/47a7ee46628ab7133129cd7cef1e92657bc275e/hamcrest-library-1.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
6
jb/project/java-gradle/.idea/misc.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/classes" />
|
||||
</component>
|
||||
</project>
|
||||
11
jb/project/java-gradle/.idea/modules.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/java-gradle.iml" filepath="$PROJECT_DIR$/.idea/modules/java-gradle.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/java-gradle.iml" filepath="$PROJECT_DIR$/java-gradle.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/java-gradle.main.iml" filepath="$PROJECT_DIR$/.idea/modules/java-gradle.main.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/java-gradle.test.iml" filepath="$PROJECT_DIR$/.idea/modules/java-gradle.test.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
34
jb/project/java-gradle/.idea/modules/java-gradle.main.iml
generated
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.id="java-gradle:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
|
||||
<output url="file://$MODULE_DIR$/../../out/production/classes" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$/../../src/main" />
|
||||
<content url="file://$MODULE_DIR$/../../../../../src">
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.base/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.datatransfer/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.desktop/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.instrument/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.logging/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.management.rmi/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.management/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.naming/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.prefs/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.rmi/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.scripting/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.se/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.security.jgss/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.security.sasl/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.smartcardio/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.sql.rowset/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.sql/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.xml.crypto/share/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.base/macosx/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.datatransfer/macosx/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.desktop/macosx/classes" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../src/java.prefs/macosx/classes" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
26
jb/project/java-gradle/.idea/modules/java-gradle.test.iml
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.id="java-gradle:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
|
||||
<output-test url="file://$MODULE_DIR$/../../out/test/classes" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$/../../src/test" />
|
||||
<content url="file://$MODULE_DIR$/../../../../../test">
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../../../test/jdk/jbu" isTestSource="true" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="java-gradle.main" />
|
||||
<orderEntry type="library" name="Gradle: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" name="Gradle: org.hamcrest:hamcrest-library:1.3" level="project" />
|
||||
<orderEntry type="library" name="Gradle: net.java.dev.jna:jna:4.4.0" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.twelvemonkeys.imageio:imageio-tiff:3.3.2" level="project" />
|
||||
<orderEntry type="library" name="Gradle: org.apache.commons:commons-lang3:3.0" level="project" />
|
||||
<orderEntry type="library" name="Gradle: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.twelvemonkeys.imageio:imageio-metadata:3.3.2" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.twelvemonkeys.imageio:imageio-core:3.3.2" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.twelvemonkeys.common:common-image:3.3.2" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.twelvemonkeys.common:common-io:3.3.2" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.twelvemonkeys.common:common-lang:3.3.2" level="project" />
|
||||
</component>
|
||||
<component name="TestModuleProperties" production-module="java-gradle.main" />
|
||||
</module>
|
||||
6
jb/project/java-gradle/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
119
jb/project/java-gradle/build.gradle
Normal file
@@ -0,0 +1,119 @@
|
||||
apply plugin: 'java'
|
||||
import org.gradle.internal.os.OperatingSystem
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
def test_jvm = {
|
||||
if (project.hasProperty('jbsdkhome')) {
|
||||
file(jbsdkhome + (OperatingSystem.current().isWindows()?"/bin/java.exe" : "/bin/java")).absolutePath
|
||||
} else {
|
||||
if (OperatingSystem.current().isMacOsX()) {
|
||||
file('../../../build/macosx-x86_64-normal-server-release/images/jdk-bundle/jdk-11.jdk/Contents/Home/bin/java').absolutePath
|
||||
} else if (OperatingSystem.current().isLinux()) {
|
||||
file('../../../build/linux-x86_64-normal-server-release/images/jdk/bin/java').absolutePath
|
||||
} else {
|
||||
file('../../../build/windows-x86_64-normal-server-release/images/j2sdk-image/bin/java.exe').absolutePath
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile('junit:junit:4.12'){
|
||||
exclude group: 'org.hamcrest'
|
||||
}
|
||||
testCompile 'org.hamcrest:hamcrest-library:1.3'
|
||||
testCompile 'net.java.dev.jna:jna:4.4.0'
|
||||
testCompile 'com.twelvemonkeys.imageio:imageio-tiff:3.3.2'
|
||||
testCompile 'org.apache.commons:commons-lang3:3.0'
|
||||
}
|
||||
|
||||
def jdk_modules = ["java.base", "java.logging", "java.prefs",
|
||||
"java.se.ee", "java.sql", "java.datatransfer",
|
||||
"java.management", "java.rmi", "java.security.jgss",
|
||||
"java.sql.rowset", "java.desktop", "java.management.rmi",
|
||||
"java.scripting", "java.security.sasl", "java.transaction",
|
||||
"java.instrument", "java.naming", "java.se",
|
||||
"java.smartcardio", "java.xml.crypto"]
|
||||
|
||||
def jdk_class_dirs = []
|
||||
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
new File("../../../src/" + it + "/share/classes")
|
||||
}
|
||||
|
||||
if (OperatingSystem.current().isMacOsX())
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/macosx/classes"
|
||||
}
|
||||
else if (OperatingSystem.current().isLinux()) {
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/solaris/classes"
|
||||
}
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/unix/classes"
|
||||
}
|
||||
} else
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/windows/classes"
|
||||
}
|
||||
|
||||
sourceSets.main.java.srcDirs = jdk_class_dirs
|
||||
|
||||
sourceSets {
|
||||
test {
|
||||
java {
|
||||
srcDir "../../../test/jdk/jbu"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
test.dependsOn.clear()
|
||||
|
||||
test.dependsOn tasks.compileTestJava
|
||||
|
||||
test {
|
||||
systemProperty "jb.java2d.metal", "true"
|
||||
systemProperty "testdata", file('../../../jb/tests/testdata').absolutePath
|
||||
|
||||
// Generate golden images for DroidFontTest and MixedTextTest
|
||||
// systemProperty "gentestdata", ""
|
||||
|
||||
outputs.upToDateWhen { false }
|
||||
executable = test_jvm()
|
||||
|
||||
// Enable J2D logging (only in debug build)
|
||||
// Can be turned on for J2D by adding "#define DEBUG 1" into jdk/src/share/native/sun/java2d/Trace.h
|
||||
|
||||
// environment 'J2D_TRACE_LEVEL', '4'
|
||||
}
|
||||
|
||||
def buildDir = project.buildscript.sourceFile.parentFile.parentFile.parentFile.parentFile
|
||||
|
||||
def make_cmd = "make"
|
||||
if (OperatingSystem.current().isWindows()) {
|
||||
def cyg_make_cmd = new File("c:/cygwin64/bin/make.exe")
|
||||
if (cyg_make_cmd.exists()) make_cmd = cyg_make_cmd.absolutePath
|
||||
}
|
||||
|
||||
task make_images << {
|
||||
def pb = new ProcessBuilder().command(make_cmd.toString(), "-C", buildDir.absolutePath, "images")
|
||||
def proc = pb.redirectErrorStream(true).start()
|
||||
proc.inputStream.eachLine {println it}
|
||||
assert proc.waitFor() == 0
|
||||
}
|
||||
|
||||
task make_clean << {
|
||||
def pb = new ProcessBuilder().command(make_cmd.toString(), "-C", buildDir.absolutePath, "clean")
|
||||
def proc = pb.redirectErrorStream(true).start()
|
||||
proc.inputStream.eachLine {println it}
|
||||
assert proc.waitFor() == 0
|
||||
}
|
||||
|
||||
|
||||
tasks.compileJava.enabled = false
|
||||
tasks.compileTestJava.dependsOn.clear()
|
||||
classes.dependsOn.clear()
|
||||
classes.dependsOn tasks.make_images
|
||||
tasks.cleanClasses.dependsOn tasks.make_clean
|
||||
BIN
jb/project/java-gradle/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
6
jb/project/java-gradle/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#Thu Dec 06 20:31:44 MSK 2018
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
|
||||
172
jb/project/java-gradle/gradlew
vendored
Executable file
@@ -0,0 +1,172 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
1442
jb/project/jdk-cmake/CMakeLists.txt
Normal file
BIN
jb/tests/testdata/quality/text/osx_software_rendering/droidsans0_20.png
vendored
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
jb/tests/testdata/quality/text/osx_software_rendering/droidsans1_20.png
vendored
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
jb/tests/testdata/quality/text/osx_software_rendering/droidsansmono0_20.png
vendored
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
jb/tests/testdata/quality/text/osx_software_rendering/droidsansmonodotted0_20.png
vendored
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
jb/tests/testdata/quality/text/osx_software_rendering/droidsansmonoslashed0_20.png
vendored
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
jb/tests/testdata/quality/text/osx_software_rendering/droidserif0_20.png
vendored
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
jb/tests/testdata/quality/text/osx_software_rendering/droidserif1_20.png
vendored
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
jb/tests/testdata/quality/text/osx_software_rendering/droidserif2_20.png
vendored
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
jb/tests/testdata/quality/text/osx_software_rendering/droidserif3_20.png
vendored
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
47
jb/tests/tests.iml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<content url="file://$MODULE_DIR$/../../../test/java/awt/Graphics2D">
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../test/java/awt/Graphics2D" isTestSource="false" />
|
||||
</content>
|
||||
<content url="file://$MODULE_DIR$/../../../test/sun/java2d">
|
||||
<sourceFolder url="file://$MODULE_DIR$/../../../test/sun/java2d" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="file://$APPLICATION_HOME_DIR$/lib/junit-4.12.jar" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
<jarDirectory url="file://$APPLICATION_HOME_DIR$/lib/junit-4.12.jar" recursive="false" />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="file://$APPLICATION_HOME_DIR$/lib/junit.jar" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
<jarDirectory url="file://$APPLICATION_HOME_DIR$/lib/junit.jar" recursive="false" />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="JUnit4">
|
||||
<CLASSES>
|
||||
<root url="jar://$APPLICATION_HOME_DIR$/lib/junit-4.12.jar!/" />
|
||||
<root url="jar://$APPLICATION_HOME_DIR$/lib/hamcrest-core-1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
||||
168
jbr_file_list_linux.txt
Normal file
@@ -0,0 +1,168 @@
|
||||
bin/jaotc
|
||||
bin/java
|
||||
bin/jjs
|
||||
bin/jrunscript
|
||||
bin/keytool
|
||||
bin/pack200
|
||||
bin/rmid
|
||||
bin/rmiregistry
|
||||
bin/unpack200
|
||||
conf/logging.properties
|
||||
conf/management/jmxremote.access
|
||||
conf/management/jmxremote.password.template
|
||||
conf/management/management.properties
|
||||
conf/net.properties
|
||||
conf/security/java.policy
|
||||
conf/security/java.security
|
||||
conf/security/policy/limited/default_local.policy
|
||||
conf/security/policy/limited/default_US_export.policy
|
||||
conf/security/policy/limited/exempt_local.policy
|
||||
conf/security/policy/README.txt
|
||||
conf/security/policy/unlimited/default_local.policy
|
||||
conf/security/policy/unlimited/default_US_export.policy
|
||||
conf/sound.properties
|
||||
legal/java.base/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.base/aes.md
|
||||
legal/java.base/asm.md
|
||||
legal/java.base/ASSEMBLY_EXCEPTION
|
||||
legal/java.base/c-libutl.md
|
||||
legal/java.base/cldr.md
|
||||
legal/java.base/icu.md
|
||||
legal/java.base/LICENSE
|
||||
legal/java.base/public_suffix.md
|
||||
legal/java.base/unicode.md
|
||||
legal/java.desktop/colorimaging.md
|
||||
legal/java.desktop/giflib.md
|
||||
legal/java.desktop/harfbuzz.md
|
||||
legal/java.desktop/jpeg.md
|
||||
legal/java.desktop/lcms.md
|
||||
legal/java.desktop/libpng.md
|
||||
legal/java.desktop/mesa3d.md
|
||||
legal/java.desktop/opengl.md
|
||||
legal/java.desktop/xwindows.md
|
||||
legal/java.smartcardio/pcsclite.md
|
||||
legal/java.xml/bcel.md
|
||||
legal/java.xml/dom.md
|
||||
legal/java.xml/jcup.md
|
||||
legal/java.xml/xalan.md
|
||||
legal/java.xml/xerces.md
|
||||
legal/java.xml.crypto/santuario.md
|
||||
legal/jdk.crypto.cryptoki/pkcs11cryptotoken.md
|
||||
legal/jdk.crypto.cryptoki/pkcs11wrapper.md
|
||||
legal/jdk.crypto.ec/ecc.md
|
||||
legal/jdk.dynalink/dynalink.md
|
||||
legal/jdk.internal.le/jline.md
|
||||
legal/jdk.localedata/thaidict.md
|
||||
legal/jdk.scripting.nashorn/double-conversion.md
|
||||
legal/jdk.scripting.nashorn/joni.md
|
||||
lib/classlist
|
||||
lib/jexec
|
||||
lib/jfr/default.jfc
|
||||
lib/jfr/profile.jfc
|
||||
lib/jli/libjli.so
|
||||
lib/jrt-fs.jar
|
||||
lib/jvm.cfg
|
||||
lib/libattach.so
|
||||
lib/libawt.so
|
||||
lib/libawt_headless.so
|
||||
lib/libawt_xawt.so
|
||||
lib/libdt_socket.so
|
||||
lib/libextnet.so
|
||||
lib/libfontmanager.so
|
||||
lib/libinstrument.so
|
||||
lib/libj2gss.so
|
||||
lib/libj2pcsc.so
|
||||
lib/libj2pkcs11.so
|
||||
lib/libjaas.so
|
||||
lib/libjava.so
|
||||
lib/libjavajpeg.so
|
||||
lib/libjawt.so
|
||||
lib/libjdwp.so
|
||||
lib/libjimage.so
|
||||
lib/libjsig.so
|
||||
lib/libjsound.so
|
||||
lib/liblcms.so
|
||||
lib/libmanagement.so
|
||||
lib/libmanagement_agent.so
|
||||
lib/libmanagement_ext.so
|
||||
lib/libmlib_image.so
|
||||
lib/libnet.so
|
||||
lib/libnio.so
|
||||
lib/libprefs.so
|
||||
lib/librmi.so
|
||||
lib/libsctp.so
|
||||
lib/libsplashscreen.so
|
||||
lib/libsunec.so
|
||||
lib/libunpack.so
|
||||
lib/libverify.so
|
||||
lib/libzip.so
|
||||
lib/modules
|
||||
lib/psfont.properties.ja
|
||||
lib/psfontj2d.properties
|
||||
lib/security/blacklisted.certs
|
||||
lib/security/cacerts
|
||||
lib/security/default.policy
|
||||
lib/security/public_suffix_list.dat
|
||||
lib/server/libjsig.so
|
||||
lib/server/libjvm.so
|
||||
lib/server/Xusage.txt
|
||||
lib/tzdb.dat
|
||||
man/ja_JP.UTF-8/man1/java.1
|
||||
man/ja_JP.UTF-8/man1/jjs.1
|
||||
man/ja_JP.UTF-8/man1/keytool.1
|
||||
man/ja_JP.UTF-8/man1/pack200.1
|
||||
man/ja_JP.UTF-8/man1/rmid.1
|
||||
man/ja_JP.UTF-8/man1/rmiregistry.1
|
||||
man/ja_JP.UTF-8/man1/unpack200.1
|
||||
man/man1/java.1
|
||||
man/man1/jjs.1
|
||||
man/man1/keytool.1
|
||||
man/man1/pack200.1
|
||||
man/man1/rmid.1
|
||||
man/man1/rmiregistry.1
|
||||
man/man1/unpack200.1
|
||||
release
|
||||
bin/javapackager
|
||||
lib/libjavafx_font_pango.so
|
||||
lib/libavplugin-ffmpeg-56.so
|
||||
lib/libavplugin-56.so
|
||||
lib/libglass.so
|
||||
lib/libavplugin-57.so
|
||||
lib/libavplugin-ffmpeg-57.so
|
||||
lib/libprism_sw.so
|
||||
lib/libavplugin-53.so
|
||||
lib/libjfxmedia.so
|
||||
lib/javafx.properties
|
||||
lib/libfxplugins.so
|
||||
lib/javafx-swt.jar
|
||||
lib/ant-javafx.jar
|
||||
lib/libglassgtk3.so
|
||||
lib/libjavafx_iio.so
|
||||
lib/libgstreamer-lite.so
|
||||
lib/libprism_common.so
|
||||
lib/libjavafx_font_freetype.so
|
||||
lib/libglassgtk2.so
|
||||
lib/libavplugin-54.so
|
||||
lib/libprism_es2.so
|
||||
lib/libjfxwebkit.so
|
||||
lib/libdecora_sse.so
|
||||
lib/libjavafx_font.so
|
||||
lib/libavplugin-55.so
|
||||
legal/javafx.media/glib.md
|
||||
legal/javafx.media/gstreamer.md
|
||||
legal/javafx.media/libffi.md
|
||||
legal/javafx.media/applecoreaudio.md
|
||||
legal/javafx.web/icu_v51.md
|
||||
legal/javafx.web/webkit.md
|
||||
legal/javafx.web/libxslt.md
|
||||
legal/javafx.web/libxml2.md
|
||||
legal/javafx.graphics/jpeg_v7.md
|
||||
jmods/javafx.base.jmod
|
||||
jmods/javafx.media.jmod
|
||||
jmods/javafx.swing.jmod
|
||||
jmods/javafx.controls.jmod
|
||||
jmods/jdk.packager.services.jmod
|
||||
jmods/jdk.packager.jmod
|
||||
jmods/javafx.web.jmod
|
||||
jmods/javafx.fxml.jmod
|
||||
jmods/javafx.graphics.jmod
|
||||
168
jbr_file_list_osx.txt
Normal file
@@ -0,0 +1,168 @@
|
||||
jdk/Contents/Home/bin/jaotc
|
||||
jdk/Contents/Home/bin/java
|
||||
jdk/Contents/Home/bin/jjs
|
||||
jdk/Contents/Home/bin/jrunscript
|
||||
jdk/Contents/Home/bin/keytool
|
||||
jdk/Contents/Home/bin/pack200
|
||||
jdk/Contents/Home/bin/rmid
|
||||
jdk/Contents/Home/bin/rmiregistry
|
||||
jdk/Contents/Home/bin/unpack200
|
||||
jdk/Contents/Home/conf/logging.properties
|
||||
jdk/Contents/Home/conf/management/jmxremote.access
|
||||
jdk/Contents/Home/conf/management/jmxremote.password.template
|
||||
jdk/Contents/Home/conf/management/management.properties
|
||||
jdk/Contents/Home/conf/net.properties
|
||||
jdk/Contents/Home/conf/security/java.policy
|
||||
jdk/Contents/Home/conf/security/java.security
|
||||
jdk/Contents/Home/conf/security/policy/limited/default_local.policy
|
||||
jdk/Contents/Home/conf/security/policy/limited/default_US_export.policy
|
||||
jdk/Contents/Home/conf/security/policy/limited/exempt_local.policy
|
||||
jdk/Contents/Home/conf/security/policy/README.txt
|
||||
jdk/Contents/Home/conf/security/policy/unlimited/default_local.policy
|
||||
jdk/Contents/Home/conf/security/policy/unlimited/default_US_export.policy
|
||||
jdk/Contents/Home/conf/sound.properties
|
||||
jdk/Contents/Home/legal/java.base/ADDITIONAL_LICENSE_INFO
|
||||
jdk/Contents/Home/legal/java.base/aes.md
|
||||
jdk/Contents/Home/legal/java.base/asm.md
|
||||
jdk/Contents/Home/legal/java.base/ASSEMBLY_EXCEPTION
|
||||
jdk/Contents/Home/legal/java.base/c-libutl.md
|
||||
jdk/Contents/Home/legal/java.base/cldr.md
|
||||
jdk/Contents/Home/legal/java.base/icu.md
|
||||
jdk/Contents/Home/legal/java.base/LICENSE
|
||||
jdk/Contents/Home/legal/java.base/public_suffix.md
|
||||
jdk/Contents/Home/legal/java.base/unicode.md
|
||||
jdk/Contents/Home/legal/java.desktop/colorimaging.md
|
||||
jdk/Contents/Home/legal/java.desktop/freetype.md
|
||||
jdk/Contents/Home/legal/java.desktop/giflib.md
|
||||
jdk/Contents/Home/legal/java.desktop/harfbuzz.md
|
||||
jdk/Contents/Home/legal/java.desktop/jpeg.md
|
||||
jdk/Contents/Home/legal/java.desktop/lcms.md
|
||||
jdk/Contents/Home/legal/java.desktop/libpng.md
|
||||
jdk/Contents/Home/legal/java.desktop/mesa3d.md
|
||||
jdk/Contents/Home/legal/java.desktop/opengl.md
|
||||
jdk/Contents/Home/legal/java.desktop/xwindows.md
|
||||
jdk/Contents/Home/legal/java.smartcardio/pcsclite.md
|
||||
jdk/Contents/Home/legal/java.xml/bcel.md
|
||||
jdk/Contents/Home/legal/java.xml/dom.md
|
||||
jdk/Contents/Home/legal/java.xml/jcup.md
|
||||
jdk/Contents/Home/legal/java.xml/xalan.md
|
||||
jdk/Contents/Home/legal/java.xml/xerces.md
|
||||
jdk/Contents/Home/legal/java.xml.crypto/santuario.md
|
||||
jdk/Contents/Home/legal/jdk.crypto.cryptoki/pkcs11cryptotoken.md
|
||||
jdk/Contents/Home/legal/jdk.crypto.cryptoki/pkcs11wrapper.md
|
||||
jdk/Contents/Home/legal/jdk.crypto.ec/ecc.md
|
||||
jdk/Contents/Home/legal/jdk.dynalink/dynalink.md
|
||||
jdk/Contents/Home/legal/jdk.internal.le/jline.md
|
||||
jdk/Contents/Home/legal/jdk.localedata/thaidict.md
|
||||
jdk/Contents/Home/legal/jdk.scripting.nashorn/double-conversion.md
|
||||
jdk/Contents/Home/legal/jdk.scripting.nashorn/joni.md
|
||||
jdk/Contents/Home/lib/classlist
|
||||
jdk/Contents/Home/lib/fontconfig.bfc
|
||||
jdk/Contents/Home/lib/fontconfig.properties.src
|
||||
jdk/Contents/Home/lib/jfr/default.jfc
|
||||
jdk/Contents/Home/lib/jfr/profile.jfc
|
||||
jdk/Contents/Home/lib/jli/libjli.dylib
|
||||
jdk/Contents/Home/lib/jrt-fs.jar
|
||||
jdk/Contents/Home/lib/jspawnhelper
|
||||
jdk/Contents/Home/lib/jvm.cfg
|
||||
jdk/Contents/Home/lib/libattach.dylib
|
||||
jdk/Contents/Home/lib/libawt.dylib
|
||||
jdk/Contents/Home/lib/libawt_lwawt.dylib
|
||||
jdk/Contents/Home/lib/libdt_socket.dylib
|
||||
jdk/Contents/Home/lib/libextnet.dylib
|
||||
jdk/Contents/Home/lib/libfontmanager.dylib
|
||||
jdk/Contents/Home/lib/libfreetype.dylib
|
||||
jdk/Contents/Home/lib/libinstrument.dylib
|
||||
jdk/Contents/Home/lib/libj2gss.dylib
|
||||
jdk/Contents/Home/lib/libj2pcsc.dylib
|
||||
jdk/Contents/Home/lib/libj2pkcs11.dylib
|
||||
jdk/Contents/Home/lib/libjaas.dylib
|
||||
jdk/Contents/Home/lib/libjava.dylib
|
||||
jdk/Contents/Home/lib/libjavajpeg.dylib
|
||||
jdk/Contents/Home/lib/libjawt.dylib
|
||||
jdk/Contents/Home/lib/libjdwp.dylib
|
||||
jdk/Contents/Home/lib/libjimage.dylib
|
||||
jdk/Contents/Home/lib/libjsig.dylib
|
||||
jdk/Contents/Home/lib/libjsound.dylib
|
||||
jdk/Contents/Home/lib/liblcms.dylib
|
||||
jdk/Contents/Home/lib/libmanagement.dylib
|
||||
jdk/Contents/Home/lib/libmanagement_agent.dylib
|
||||
jdk/Contents/Home/lib/libmanagement_ext.dylib
|
||||
jdk/Contents/Home/lib/libmlib_image.dylib
|
||||
jdk/Contents/Home/lib/libnet.dylib
|
||||
jdk/Contents/Home/lib/libnio.dylib
|
||||
jdk/Contents/Home/lib/libosx.dylib
|
||||
jdk/Contents/Home/lib/libosxapp.dylib
|
||||
jdk/Contents/Home/lib/libosxkrb5.dylib
|
||||
jdk/Contents/Home/lib/libosxsecurity.dylib
|
||||
jdk/Contents/Home/lib/libosxui.dylib
|
||||
jdk/Contents/Home/lib/libprefs.dylib
|
||||
jdk/Contents/Home/lib/librmi.dylib
|
||||
jdk/Contents/Home/lib/libsplashscreen.dylib
|
||||
jdk/Contents/Home/lib/libsunec.dylib
|
||||
jdk/Contents/Home/lib/libunpack.dylib
|
||||
jdk/Contents/Home/lib/libverify.dylib
|
||||
jdk/Contents/Home/lib/libzip.dylib
|
||||
jdk/Contents/Home/lib/modules
|
||||
jdk/Contents/Home/lib/psfont.properties.ja
|
||||
jdk/Contents/Home/lib/psfontj2d.properties
|
||||
jdk/Contents/Home/lib/security/blacklisted.certs
|
||||
jdk/Contents/Home/lib/security/cacerts
|
||||
jdk/Contents/Home/lib/security/default.policy
|
||||
jdk/Contents/Home/lib/security/public_suffix_list.dat
|
||||
jdk/Contents/Home/lib/server/libjsig.dylib
|
||||
jdk/Contents/Home/lib/server/libjvm.dylib
|
||||
jdk/Contents/Home/lib/server/Xusage.txt
|
||||
jdk/Contents/Home/lib/tzdb.dat
|
||||
jdk/Contents/Home/man/ja_JP.UTF-8/man1/java.1
|
||||
jdk/Contents/Home/man/ja_JP.UTF-8/man1/jjs.1
|
||||
jdk/Contents/Home/man/ja_JP.UTF-8/man1/keytool.1
|
||||
jdk/Contents/Home/man/ja_JP.UTF-8/man1/pack200.1
|
||||
jdk/Contents/Home/man/ja_JP.UTF-8/man1/rmid.1
|
||||
jdk/Contents/Home/man/ja_JP.UTF-8/man1/rmiregistry.1
|
||||
jdk/Contents/Home/man/ja_JP.UTF-8/man1/unpack200.1
|
||||
jdk/Contents/Home/man/man1/java.1
|
||||
jdk/Contents/Home/man/man1/jjs.1
|
||||
jdk/Contents/Home/man/man1/keytool.1
|
||||
jdk/Contents/Home/man/man1/pack200.1
|
||||
jdk/Contents/Home/man/man1/rmid.1
|
||||
jdk/Contents/Home/man/man1/rmiregistry.1
|
||||
jdk/Contents/Home/man/man1/unpack200.1
|
||||
jdk/Contents/Home/release
|
||||
jdk/Contents/Info.plist
|
||||
jdk/Contents/Home/bin/javapackager
|
||||
jdk/Contents/Home/lib/libjavafx_iio.dylib
|
||||
jdk/Contents/Home/lib/libjfxmedia_avf.dylib
|
||||
jdk/Contents/Home/lib/javafx.properties
|
||||
jdk/Contents/Home/lib/libglib-lite.dylib
|
||||
jdk/Contents/Home/lib/javafx-swt.jar
|
||||
jdk/Contents/Home/lib/libfxplugins.dylib
|
||||
jdk/Contents/Home/lib/ant-javafx.jar
|
||||
jdk/Contents/Home/lib/libglass.dylib
|
||||
jdk/Contents/Home/lib/libjavafx_font.dylib
|
||||
jdk/Contents/Home/lib/libgstreamer-lite.dylib
|
||||
jdk/Contents/Home/lib/libjfxwebkit.dylib
|
||||
jdk/Contents/Home/lib/libprism_common.dylib
|
||||
jdk/Contents/Home/lib/libprism_es2.dylib
|
||||
jdk/Contents/Home/lib/libdecora_sse.dylib
|
||||
jdk/Contents/Home/lib/libjfxmedia.dylib
|
||||
jdk/Contents/Home/lib/libprism_sw.dylib
|
||||
jdk/Contents/Home/legal/javafx.media/glib.md
|
||||
jdk/Contents/Home/legal/javafx.media/gstreamer.md
|
||||
jdk/Contents/Home/legal/javafx.media/libffi.md
|
||||
jdk/Contents/Home/legal/javafx.media/applecoreaudio.md
|
||||
jdk/Contents/Home/legal/javafx.web/icu_v51.md
|
||||
jdk/Contents/Home/legal/javafx.web/webkit.md
|
||||
jdk/Contents/Home/legal/javafx.web/libxslt.md
|
||||
jdk/Contents/Home/legal/javafx.web/libxml2.md
|
||||
jdk/Contents/Home/legal/javafx.graphics/jpeg_v7.md
|
||||
jdk/Contents/Home/jmods/javafx.base.jmod
|
||||
jdk/Contents/Home/jmods/javafx.media.jmod
|
||||
jdk/Contents/Home/jmods/javafx.swing.jmod
|
||||
jdk/Contents/Home/jmods/javafx.controls.jmod
|
||||
jdk/Contents/Home/jmods/jdk.packager.services.jmod
|
||||
jdk/Contents/Home/jmods/jdk.packager.jmod
|
||||
jdk/Contents/Home/jmods/javafx.web.jmod
|
||||
jdk/Contents/Home/jmods/javafx.fxml.jmod
|
||||
jdk/Contents/Home/jmods/javafx.graphics.jmod
|
||||
jdk/Contents/MacOS/libjli.dylib
|
||||
384
jbr_file_list_windows.txt
Normal file
@@ -0,0 +1,384 @@
|
||||
bin/attach.dll
|
||||
bin/awt.dll
|
||||
bin/dt_socket.dll
|
||||
bin/fontmanager.dll
|
||||
bin/freetype.dll
|
||||
bin/instrument.dll
|
||||
bin/j2gss.dll
|
||||
bin/j2pcsc.dll
|
||||
bin/j2pkcs11.dll
|
||||
bin/jaas.dll
|
||||
bin/jabswitch.exe
|
||||
bin/jaccessinspector.exe
|
||||
bin/jaccesswalker.exe
|
||||
bin/jaotc.exe
|
||||
bin/java.dll
|
||||
bin/java.exe
|
||||
bin/javaaccessbridge.dll
|
||||
bin/javajpeg.dll
|
||||
bin/javaw.exe
|
||||
bin/jawt.dll
|
||||
bin/jdwp.dll
|
||||
bin/jimage.dll
|
||||
bin/jjs.exe
|
||||
bin/jli.dll
|
||||
bin/jrunscript.exe
|
||||
bin/jsound.dll
|
||||
bin/keytool.exe
|
||||
bin/kinit.exe
|
||||
bin/klist.exe
|
||||
bin/ktab.exe
|
||||
bin/lcms.dll
|
||||
bin/le.dll
|
||||
bin/management.dll
|
||||
bin/management_agent.dll
|
||||
bin/management_ext.dll
|
||||
bin/mlib_image.dll
|
||||
bin/msvcp140.dll
|
||||
bin/net.dll
|
||||
bin/nio.dll
|
||||
bin/pack200.exe
|
||||
bin/prefs.dll
|
||||
bin/rmi.dll
|
||||
bin/rmid.exe
|
||||
bin/rmiregistry.exe
|
||||
bin/server/jvm.dll
|
||||
bin/splashscreen.dll
|
||||
bin/sunec.dll
|
||||
bin/sunmscapi.dll
|
||||
bin/unpack.dll
|
||||
bin/unpack200.exe
|
||||
bin/verify.dll
|
||||
bin/w2k_lsa_auth.dll
|
||||
bin/windowsaccessbridge-64.dll
|
||||
bin/zip.dll
|
||||
conf/logging.properties
|
||||
conf/management/jmxremote.access
|
||||
conf/management/jmxremote.password.template
|
||||
conf/management/management.properties
|
||||
conf/net.properties
|
||||
conf/security/java.policy
|
||||
conf/security/java.security
|
||||
conf/security/policy/limited/default_local.policy
|
||||
conf/security/policy/limited/default_US_export.policy
|
||||
conf/security/policy/limited/exempt_local.policy
|
||||
conf/security/policy/README.txt
|
||||
conf/security/policy/unlimited/default_local.policy
|
||||
conf/security/policy/unlimited/default_US_export.policy
|
||||
conf/sound.properties
|
||||
legal/java.base/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.base/aes.md
|
||||
legal/java.base/asm.md
|
||||
legal/java.base/ASSEMBLY_EXCEPTION
|
||||
legal/java.base/c-libutl.md
|
||||
legal/java.base/cldr.md
|
||||
legal/java.base/icu.md
|
||||
legal/java.base/LICENSE
|
||||
legal/java.base/public_suffix.md
|
||||
legal/java.base/unicode.md
|
||||
legal/java.base/zlib.md
|
||||
legal/java.compiler/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.compiler/ASSEMBLY_EXCEPTION
|
||||
legal/java.compiler/LICENSE
|
||||
legal/java.datatransfer/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.datatransfer/ASSEMBLY_EXCEPTION
|
||||
legal/java.datatransfer/LICENSE
|
||||
legal/java.desktop/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.desktop/ASSEMBLY_EXCEPTION
|
||||
legal/java.desktop/colorimaging.md
|
||||
legal/java.desktop/freetype.md
|
||||
legal/java.desktop/giflib.md
|
||||
legal/java.desktop/harfbuzz.md
|
||||
legal/java.desktop/jpeg.md
|
||||
legal/java.desktop/lcms.md
|
||||
legal/java.desktop/libpng.md
|
||||
legal/java.desktop/LICENSE
|
||||
legal/java.desktop/mesa3d.md
|
||||
legal/java.desktop/opengl.md
|
||||
legal/java.instrument/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.instrument/ASSEMBLY_EXCEPTION
|
||||
legal/java.instrument/LICENSE
|
||||
legal/java.logging/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.logging/ASSEMBLY_EXCEPTION
|
||||
legal/java.logging/LICENSE
|
||||
legal/java.management/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.management/ASSEMBLY_EXCEPTION
|
||||
legal/java.management/LICENSE
|
||||
legal/java.management.rmi/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.management.rmi/ASSEMBLY_EXCEPTION
|
||||
legal/java.management.rmi/LICENSE
|
||||
legal/java.naming/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.naming/ASSEMBLY_EXCEPTION
|
||||
legal/java.naming/LICENSE
|
||||
legal/java.net.http/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.net.http/ASSEMBLY_EXCEPTION
|
||||
legal/java.net.http/LICENSE
|
||||
legal/java.prefs/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.prefs/ASSEMBLY_EXCEPTION
|
||||
legal/java.prefs/LICENSE
|
||||
legal/java.rmi/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.rmi/ASSEMBLY_EXCEPTION
|
||||
legal/java.rmi/LICENSE
|
||||
legal/java.scripting/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.scripting/ASSEMBLY_EXCEPTION
|
||||
legal/java.scripting/LICENSE
|
||||
legal/java.se/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.se/ASSEMBLY_EXCEPTION
|
||||
legal/java.se/LICENSE
|
||||
legal/java.security.jgss/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.security.jgss/ASSEMBLY_EXCEPTION
|
||||
legal/java.security.jgss/LICENSE
|
||||
legal/java.security.sasl/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.security.sasl/ASSEMBLY_EXCEPTION
|
||||
legal/java.security.sasl/LICENSE
|
||||
legal/java.smartcardio/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.smartcardio/ASSEMBLY_EXCEPTION
|
||||
legal/java.smartcardio/LICENSE
|
||||
legal/java.sql/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.sql/ASSEMBLY_EXCEPTION
|
||||
legal/java.sql/LICENSE
|
||||
legal/java.sql.rowset/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.sql.rowset/ASSEMBLY_EXCEPTION
|
||||
legal/java.sql.rowset/LICENSE
|
||||
legal/java.transaction.xa/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.transaction.xa/ASSEMBLY_EXCEPTION
|
||||
legal/java.transaction.xa/LICENSE
|
||||
legal/java.xml/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.xml/ASSEMBLY_EXCEPTION
|
||||
legal/java.xml/bcel.md
|
||||
legal/java.xml/dom.md
|
||||
legal/java.xml/jcup.md
|
||||
legal/java.xml/LICENSE
|
||||
legal/java.xml/xalan.md
|
||||
legal/java.xml/xerces.md
|
||||
legal/java.xml.crypto/ADDITIONAL_LICENSE_INFO
|
||||
legal/java.xml.crypto/ASSEMBLY_EXCEPTION
|
||||
legal/java.xml.crypto/LICENSE
|
||||
legal/java.xml.crypto/santuario.md
|
||||
legal/jdk.accessibility/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.accessibility/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.accessibility/LICENSE
|
||||
legal/jdk.aot/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.aot/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.aot/LICENSE
|
||||
legal/jdk.charsets/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.charsets/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.charsets/LICENSE
|
||||
legal/jdk.crypto.cryptoki/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.crypto.cryptoki/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.crypto.cryptoki/LICENSE
|
||||
legal/jdk.crypto.cryptoki/pkcs11cryptotoken.md
|
||||
legal/jdk.crypto.cryptoki/pkcs11wrapper.md
|
||||
legal/jdk.crypto.ec/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.crypto.ec/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.crypto.ec/ecc.md
|
||||
legal/jdk.crypto.ec/LICENSE
|
||||
legal/jdk.crypto.mscapi/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.crypto.mscapi/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.crypto.mscapi/LICENSE
|
||||
legal/jdk.dynalink/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.dynalink/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.dynalink/dynalink.md
|
||||
legal/jdk.dynalink/LICENSE
|
||||
legal/jdk.httpserver/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.httpserver/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.httpserver/LICENSE
|
||||
legal/jdk.internal.ed/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.internal.ed/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.internal.ed/LICENSE
|
||||
legal/jdk.internal.le/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.internal.le/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.internal.le/jline.md
|
||||
legal/jdk.internal.le/LICENSE
|
||||
legal/jdk.internal.vm.ci/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.internal.vm.ci/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.internal.vm.ci/LICENSE
|
||||
legal/jdk.internal.vm.compiler/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.internal.vm.compiler/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.internal.vm.compiler/LICENSE
|
||||
legal/jdk.internal.vm.compiler.management/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.internal.vm.compiler.management/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.internal.vm.compiler.management/LICENSE
|
||||
legal/jdk.jdwp.agent/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.jdwp.agent/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.jdwp.agent/LICENSE
|
||||
legal/jdk.jfr/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.jfr/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.jfr/LICENSE
|
||||
legal/jdk.jsobject/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.jsobject/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.jsobject/LICENSE
|
||||
legal/jdk.localedata/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.localedata/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.localedata/cldr.md
|
||||
legal/jdk.localedata/LICENSE
|
||||
legal/jdk.localedata/thaidict.md
|
||||
legal/jdk.management/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.management/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.management/LICENSE
|
||||
legal/jdk.management.agent/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.management.agent/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.management.agent/LICENSE
|
||||
legal/jdk.management.jfr/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.management.jfr/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.management.jfr/LICENSE
|
||||
legal/jdk.naming.dns/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.naming.dns/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.naming.dns/LICENSE
|
||||
legal/jdk.naming.rmi/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.naming.rmi/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.naming.rmi/LICENSE
|
||||
legal/jdk.net/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.net/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.net/LICENSE
|
||||
legal/jdk.pack/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.pack/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.pack/LICENSE
|
||||
legal/jdk.scripting.nashorn/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.scripting.nashorn/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.scripting.nashorn/double-conversion.md
|
||||
legal/jdk.scripting.nashorn/joni.md
|
||||
legal/jdk.scripting.nashorn/LICENSE
|
||||
legal/jdk.scripting.nashorn.shell/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.scripting.nashorn.shell/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.scripting.nashorn.shell/LICENSE
|
||||
legal/jdk.sctp/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.sctp/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.sctp/LICENSE
|
||||
legal/jdk.security.auth/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.security.auth/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.security.auth/LICENSE
|
||||
legal/jdk.security.jgss/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.security.jgss/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.security.jgss/LICENSE
|
||||
legal/jdk.unsupported/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.unsupported/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.unsupported/LICENSE
|
||||
legal/jdk.xml.dom/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.xml.dom/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.xml.dom/LICENSE
|
||||
legal/jdk.zipfs/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.zipfs/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.zipfs/LICENSE
|
||||
lib/classlist
|
||||
lib/fontconfig.bfc
|
||||
lib/fontconfig.properties.src
|
||||
lib/jawt.lib
|
||||
lib/jfr/default.jfc
|
||||
lib/jfr/profile.jfc
|
||||
lib/jrt-fs.jar
|
||||
lib/jvm.cfg
|
||||
lib/jvm.lib
|
||||
lib/modules
|
||||
lib/psfont.properties.ja
|
||||
lib/psfontj2d.properties
|
||||
lib/security/blacklisted.certs
|
||||
lib/security/cacerts
|
||||
lib/security/default.policy
|
||||
lib/security/public_suffix_list.dat
|
||||
lib/server/Xusage.txt
|
||||
lib/tzdb.dat
|
||||
lib/tzmappings
|
||||
release
|
||||
bin/fxplugins.dll
|
||||
bin/api-ms-win-crt-time-l1-1-0.dll
|
||||
bin/api-ms-win-crt-filesystem-l1-1-0.dll
|
||||
bin/javafx_iio.dll
|
||||
bin/gstreamer-lite.dll
|
||||
bin/api-ms-win-crt-utility-l1-1-0.dll
|
||||
bin/api-ms-win-core-console-l1-1-0.dll
|
||||
bin/glass.dll
|
||||
bin/api-ms-win-core-processenvironment-l1-1-0.dll
|
||||
bin/prism_common.dll
|
||||
bin/ucrtbase.dll
|
||||
bin/prism_sw.dll
|
||||
bin/api-ms-win-core-file-l1-1-0.dll
|
||||
bin/api-ms-win-core-errorhandling-l1-1-0.dll
|
||||
bin/api-ms-win-crt-process-l1-1-0.dll
|
||||
bin/prism_d3d.dll
|
||||
bin/api-ms-win-core-heap-l1-1-0.dll
|
||||
bin/glib-lite.dll
|
||||
bin/api-ms-win-core-processthreads-l1-1-1.dll
|
||||
bin/api-ms-win-core-processthreads-l1-1-0.dll
|
||||
bin/javapackager.exe
|
||||
bin/api-ms-win-crt-convert-l1-1-0.dll
|
||||
bin/api-ms-win-crt-private-l1-1-0.dll
|
||||
bin/api-ms-win-core-file-l2-1-0.dll
|
||||
bin/jfxwebkit.dll
|
||||
bin/api-ms-win-core-debug-l1-1-0.dll
|
||||
bin/api-ms-win-crt-stdio-l1-1-0.dll
|
||||
bin/api-ms-win-core-localization-l1-2-0.dll
|
||||
bin/api-ms-win-core-datetime-l1-1-0.dll
|
||||
bin/api-ms-win-crt-math-l1-1-0.dll
|
||||
bin/api-ms-win-core-file-l1-2-0.dll
|
||||
bin/api-ms-win-core-timezone-l1-1-0.dll
|
||||
bin/api-ms-win-core-rtlsupport-l1-1-0.dll
|
||||
bin/api-ms-win-core-handle-l1-1-0.dll
|
||||
bin/decora_sse.dll
|
||||
bin/api-ms-win-core-synch-l1-1-0.dll
|
||||
bin/api-ms-win-core-string-l1-1-0.dll
|
||||
bin/api-ms-win-core-interlocked-l1-1-0.dll
|
||||
bin/api-ms-win-core-memory-l1-1-0.dll
|
||||
bin/api-ms-win-core-util-l1-1-0.dll
|
||||
bin/api-ms-win-core-namedpipe-l1-1-0.dll
|
||||
bin/api-ms-win-crt-conio-l1-1-0.dll
|
||||
bin/api-ms-win-crt-runtime-l1-1-0.dll
|
||||
bin/api-ms-win-crt-string-l1-1-0.dll
|
||||
bin/api-ms-win-crt-multibyte-l1-1-0.dll
|
||||
bin/api-ms-win-core-synch-l1-2-0.dll
|
||||
bin/api-ms-win-core-profile-l1-1-0.dll
|
||||
bin/api-ms-win-crt-locale-l1-1-0.dll
|
||||
bin/api-ms-win-crt-heap-l1-1-0.dll
|
||||
bin/api-ms-win-core-sysinfo-l1-1-0.dll
|
||||
bin/javafx_font.dll
|
||||
bin/api-ms-win-core-libraryloader-l1-1-0.dll
|
||||
bin/api-ms-win-crt-environment-l1-1-0.dll
|
||||
bin/jfxmedia.dll
|
||||
lib/javafx.properties
|
||||
lib/javafx-swt.jar
|
||||
lib/ant-javafx.jar
|
||||
legal/jdk.packager.services/LICENSE
|
||||
legal/jdk.packager.services/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.packager.services/ASSEMBLY_EXCEPTION
|
||||
legal/jdk.packager/LICENSE
|
||||
legal/jdk.packager/ADDITIONAL_LICENSE_INFO
|
||||
legal/jdk.packager/ASSEMBLY_EXCEPTION
|
||||
legal/javafx.media/glib.md
|
||||
legal/javafx.media/gstreamer.md
|
||||
legal/javafx.media/libffi.md
|
||||
legal/javafx.media/LICENSE
|
||||
legal/javafx.media/applecoreaudio.md
|
||||
legal/javafx.media/ADDITIONAL_LICENSE_INFO
|
||||
legal/javafx.media/ASSEMBLY_EXCEPTION
|
||||
legal/javafx.web/icu_v51.md
|
||||
legal/javafx.web/LICENSE
|
||||
legal/javafx.web/webkit.md
|
||||
legal/javafx.web/libxslt.md
|
||||
legal/javafx.web/ADDITIONAL_LICENSE_INFO
|
||||
legal/javafx.web/ASSEMBLY_EXCEPTION
|
||||
legal/javafx.web/libxml2.md
|
||||
legal/javafx.swing/LICENSE
|
||||
legal/javafx.swing/ADDITIONAL_LICENSE_INFO
|
||||
legal/javafx.swing/ASSEMBLY_EXCEPTION
|
||||
legal/javafx.graphics/LICENSE
|
||||
legal/javafx.graphics/ADDITIONAL_LICENSE_INFO
|
||||
legal/javafx.graphics/ASSEMBLY_EXCEPTION
|
||||
legal/javafx.graphics/jpeg_v7.md
|
||||
legal/javafx.base/LICENSE
|
||||
legal/javafx.base/ADDITIONAL_LICENSE_INFO
|
||||
legal/javafx.base/ASSEMBLY_EXCEPTION
|
||||
legal/javafx.controls/LICENSE
|
||||
legal/javafx.controls/ADDITIONAL_LICENSE_INFO
|
||||
legal/javafx.controls/ASSEMBLY_EXCEPTION
|
||||
legal/javafx.fxml/LICENSE
|
||||
legal/javafx.fxml/ADDITIONAL_LICENSE_INFO
|
||||
legal/javafx.fxml/ASSEMBLY_EXCEPTION
|
||||
jmods/javafx.base.jmod
|
||||
jmods/javafx.media.jmod
|
||||
jmods/javafx.swing.jmod
|
||||
jmods/javafx.controls.jmod
|
||||
jmods/jdk.packager.services.jmod
|
||||
jmods/jdk.packager.jmod
|
||||
jmods/javafx.web.jmod
|
||||
jmods/javafx.fxml.jmod
|
||||
jmods/javafx.graphics.jmod
|
||||
@@ -83,7 +83,7 @@ java.datatransfer_COPY += flavormap.properties
|
||||
################################################################################
|
||||
|
||||
java.desktop_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference \
|
||||
'-Xdoclint/package:java.*,javax.*' -Xlint:exports \
|
||||
'-Xdoclint/package:java.*,javax.*' -Xlint:exports -Xlint:-serial \
|
||||
--doclint-format html4
|
||||
java.desktop_COPY += .gif .png .wav .txt .xml .css .pf
|
||||
java.desktop_CLEAN += iio-plugin.properties cursors.properties
|
||||
|
||||
0
make/CopyFiles.gmk
Normal file
@@ -35,7 +35,8 @@ DISABLE_WARNINGS ?= -Xlint:all,-deprecation,-removal,-unchecked,-rawtypes,-cast,
|
||||
|
||||
# If warnings needs to be non-fatal for testing purposes use a command like:
|
||||
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
|
||||
JAVAC_WARNINGS ?= -Xlint:all -Werror
|
||||
#JAVAC_WARNINGS := -Xlint:all -Werror
|
||||
JAVAC_WARNINGS := -Xlint:all -Xmaxwarns 10000
|
||||
|
||||
# The BOOT_JAVAC setup uses the boot jdk compiler to compile the tools
|
||||
# and the interim javac, to be run by the boot jdk.
|
||||
|
||||
@@ -80,3 +80,13 @@ $(eval $(call SetupCopyLegalFiles, COPY_LEGAL, \
|
||||
TARGETS += $(COPY_LEGAL)
|
||||
|
||||
################################################################################
|
||||
|
||||
FONTFILE_SRC_DIR := $(TOPDIR)/src/java.desktop/share
|
||||
FONTFILE_SRCS := $(wildcard $(FONTFILE_SRC_DIR)/fonts/*.ttf) $(FONTFILE_SRC_DIR)/fonts/fonts.dir $(FONTFILE_SRC_DIR)/fonts/font.conf
|
||||
FONTFILE_TARGET_FILES := $(subst $(FONTFILE_SRC_DIR),$(LIB_DST_DIR),$(FONTFILE_SRCS))
|
||||
|
||||
$(LIB_DST_DIR)/fonts/%: $(FONTFILE_SRC_DIR)/fonts/%
|
||||
$(call install-file)
|
||||
|
||||
|
||||
TARGETS += $(FONTFILE_TARGET_FILES)
|
||||
|
||||
@@ -243,7 +243,7 @@ sequence.fallback=symbols,\
|
||||
|
||||
# Exclusion Ranges
|
||||
|
||||
exclusion.alphabetic=0700-1cff,1d80-1e9f,1f00-2017,2020-20ab,20ad-20b8,20bb-20bc,20be-f8ff
|
||||
exclusion.alphabetic=0700-1cff,1d80-1e9f,1f00-2017,2020-20ab,20ad-20b8,20bb-20bc,20be-24ff,2501-2501,2503-250b,250d-250f,2511-2513,2515-2517,2519-251b,251d-2523,2525-252b,252d-2533,2535-253b,253d-254f,256d-f8ff
|
||||
exclusion.chinese-gb18030=0390-03d6,2200-22ef,2701-27be
|
||||
exclusion.hebrew=0041-005a,0060-007a,007f-00ff,20ac-20ac
|
||||
|
||||
|
||||
@@ -136,6 +136,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$(TOPDIR)/src/$(MODULE)/share/native/common/font \
|
||||
$(TOPDIR)/src/$(MODULE)/share/native/common/java2d/opengl \
|
||||
$(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt/systemscale \
|
||||
$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/launcher \
|
||||
#
|
||||
endif
|
||||
|
||||
@@ -251,7 +252,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
|
||||
LIBS_windows := kernel32.lib user32.lib gdi32.lib winspool.lib \
|
||||
imm32.lib ole32.lib uuid.lib shell32.lib \
|
||||
comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
|
||||
delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib, \
|
||||
delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib dwmapi.lib, \
|
||||
VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
|
||||
RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
|
||||
-D "JDK_FNAME=awt.dll" \
|
||||
@@ -577,10 +578,12 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
|
||||
X11TextRenderer.c \
|
||||
fontpath.c \
|
||||
lcdglyph.c
|
||||
lcdglyph.c \
|
||||
lcdglyphDW.cpp
|
||||
else
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
|
||||
lcdglyph.c
|
||||
lcdglyph.c \
|
||||
lcdglyphDW.cpp
|
||||
endif
|
||||
|
||||
LIBFONTMANAGER_CFLAGS += $(X_CFLAGS) -DLE_STANDALONE -DHEADLESS
|
||||
|
||||
62
modules.list
Normal file
@@ -0,0 +1,62 @@
|
||||
java.base,
|
||||
java.compiler,
|
||||
java.datatransfer,
|
||||
java.desktop,
|
||||
java.instrument,
|
||||
java.logging,
|
||||
java.management,
|
||||
java.management.rmi,
|
||||
java.naming,
|
||||
java.net.http,
|
||||
java.prefs,
|
||||
java.rmi,
|
||||
java.scripting,
|
||||
java.se,
|
||||
java.security.jgss,
|
||||
java.security.sasl,
|
||||
java.smartcardio,
|
||||
java.sql,
|
||||
java.sql.rowset,
|
||||
java.transaction.xa,
|
||||
java.xml,
|
||||
java.xml.crypto,
|
||||
javafx.base,
|
||||
javafx.controls,
|
||||
javafx.fxml,
|
||||
javafx.graphics,
|
||||
javafx.media,
|
||||
javafx.swing,
|
||||
javafx.web,
|
||||
jdk.accessibility,
|
||||
jdk.aot,
|
||||
jdk.charsets,
|
||||
jdk.compiler,
|
||||
jdk.crypto.cryptoki,
|
||||
jdk.crypto.ec,
|
||||
jdk.dynalink,
|
||||
jdk.httpserver,
|
||||
jdk.internal.ed,
|
||||
jdk.internal.le,
|
||||
jdk.internal.vm.ci,
|
||||
jdk.internal.vm.compiler,
|
||||
jdk.internal.vm.compiler.management,
|
||||
jdk.jdi,
|
||||
jdk.jdwp.agent,
|
||||
jdk.jfr,
|
||||
jdk.jsobject,
|
||||
jdk.localedata,
|
||||
jdk.management,
|
||||
jdk.management.agent,
|
||||
jdk.management.jfr,
|
||||
jdk.naming.dns,
|
||||
jdk.naming.rmi,
|
||||
jdk.net,
|
||||
jdk.pack,
|
||||
jdk.scripting.nashorn,
|
||||
jdk.scripting.nashorn.shell,
|
||||
jdk.sctp,
|
||||
jdk.security.auth,
|
||||
jdk.security.jgss,
|
||||
jdk.unsupported,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs
|
||||
@@ -49,7 +49,7 @@
|
||||
<target name="compile" depends="init"
|
||||
description="compile the source " >
|
||||
<!-- Compile the java code from ${src} into ${build} -->
|
||||
<javac debug="off" source="1.6" target="1.6" srcdir="${src}" destdir="${build}"/>
|
||||
<javac debug="on" source="8" target="8" srcdir="${src}" destdir="${build}"/>
|
||||
</target>
|
||||
|
||||
<target name="run" depends="dist"
|
||||
|
||||
@@ -0,0 +1,320 @@
|
||||
package j2dbench.report;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.DirectoryIteratorException;
|
||||
import java.nio.file.DirectoryStream;
|
||||
import java.nio.file.FileSystem;
|
||||
import java.nio.file.FileSystems;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Vector;
|
||||
|
||||
/**
|
||||
* The class reads J2DBench scores and reports them into output stream in format applicable for TeamCity charts.
|
||||
* The directory, where J2DBench result files placed, is specified via command line parameter like follows:
|
||||
* <p>
|
||||
* <code>-basexml | -b <xml file path></code>
|
||||
* </p>
|
||||
* This directory must contain one file with pattern <code>*{openjdk}*.{res}</code> which is considered as a container
|
||||
* of reference scores and several <code>*{jbsdk}*.{res}</code>.
|
||||
* <p>
|
||||
* <p> Names of these files have several mandatory fields separated by <code>"_"</code> and look like
|
||||
* <code>osName_jdkName_renderName_*.res</code>
|
||||
* </p>
|
||||
* <p>
|
||||
* If any of score is less than corresponding reference value by 5% then exit code <code>1</code> is returned otherwise
|
||||
* exit code <code>0</code> is returned.
|
||||
* <p>
|
||||
* Standard output will contain scores in format required for TeamCity charts.
|
||||
* <p>
|
||||
* Created by vprovodin on 13/02/2017.
|
||||
*/
|
||||
public class TCChartReporter {
|
||||
|
||||
private static boolean printTCValues = false;
|
||||
private static boolean printValues = false;
|
||||
|
||||
private static final DecimalFormat decimalFormat =
|
||||
new DecimalFormat("0.00");
|
||||
|
||||
private static FileSystem defaultFileSystem = FileSystems.getDefault();
|
||||
|
||||
private static double getMeasurementError(String testCaseName, String osName) {
|
||||
if (testCaseName.contains("text.Rendering.tests.drawString") && osName.toLowerCase().contains("lin") )
|
||||
return 0.18;
|
||||
return 0.1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Level at which tests are grouped to be displayed in summary
|
||||
*/
|
||||
private static final int LEVEL = 2;
|
||||
|
||||
/**
|
||||
* Holds the groups and corresponding group-display-names
|
||||
*/
|
||||
private static List<String> groups = new ArrayList<>();
|
||||
private static Map<String, Double> referenceValues = new HashMap<>();
|
||||
private static boolean testFailed = false;
|
||||
|
||||
private static void printUsage() {
|
||||
String usage =
|
||||
"\njava TCChartReporter [options] " +
|
||||
" \n\n" +
|
||||
"where options include: " +
|
||||
" \n" +
|
||||
" -basexml | -b <xml file path> " +
|
||||
"path to base-build result";
|
||||
System.out.println(usage);
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* String = getTestResultsTableForSummary()
|
||||
*/
|
||||
private static double generateTestCaseReport(
|
||||
Object key,
|
||||
Map<String, J2DAnalyzer.ResultHolder> testCaseResult,
|
||||
Map<String, Integer> testCaseResultCount) {
|
||||
|
||||
Integer curTestCountObj = testCaseResultCount.get(key.toString());
|
||||
int curTestCount = 0;
|
||||
if (curTestCountObj != null) {
|
||||
curTestCount = curTestCountObj;
|
||||
}
|
||||
|
||||
double totalScore = 0;
|
||||
|
||||
for (int i = 0; i < curTestCount; i++) {
|
||||
J2DAnalyzer.ResultHolder resultTCR = testCaseResult.get(key.toString() + "_" + i);
|
||||
totalScore = totalScore + resultTCR.getScore();
|
||||
}
|
||||
|
||||
return totalScore;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate Testcase Summary Report for TC - *.out
|
||||
*/
|
||||
private static void generateTestCaseSummaryReport(
|
||||
String OJRname,
|
||||
Map<String, Double> consoleResult,
|
||||
Map<String, J2DAnalyzer.ResultHolder> testCaseResult,
|
||||
Map<String, Integer> testCaseResultCount,
|
||||
boolean rememberReference) {
|
||||
|
||||
String curGroupName, curTestName;
|
||||
|
||||
Object[] groupNameArray = groups.toArray();
|
||||
|
||||
Object[] testCaseList = consoleResult.keySet().toArray();
|
||||
Arrays.sort(testCaseList);
|
||||
|
||||
for (Object aGroupNameArray : groupNameArray) {
|
||||
|
||||
double value;
|
||||
curGroupName = aGroupNameArray.toString();
|
||||
|
||||
for (Object aTestCaseList : testCaseList) {
|
||||
|
||||
curTestName = aTestCaseList.toString();
|
||||
|
||||
if (curTestName.contains(curGroupName)) {
|
||||
|
||||
value = generateTestCaseReport(curTestName, testCaseResult, testCaseResultCount);
|
||||
|
||||
if (printTCValues)
|
||||
System.out.println("##teamcity[buildStatisticValue key='" + (OJRname.isEmpty() ? "" : OJRname + ".") + curTestName
|
||||
+ "' value='" + decimalFormat.format(value) + "']");
|
||||
if (printValues)
|
||||
System.out.println((OJRname.isEmpty() ? "" : OJRname + ".") + curTestName + "," + decimalFormat.format(value));
|
||||
if (rememberReference) {
|
||||
referenceValues.put(curTestName, value);
|
||||
} else {
|
||||
double refValue = referenceValues.getOrDefault(curTestName, 0.);
|
||||
if (Math.abs(value/refValue - 1) >= getMeasurementError(curTestName, OJRname)) {
|
||||
System.err.println(OJRname);
|
||||
System.err.println(curTestName);
|
||||
System.err.println("\treferenceValue=" + refValue);
|
||||
System.err.println("\t actualValue=" + value);
|
||||
System.err.println("\t diff:" + ((value / refValue - 1) * 100));
|
||||
testFailed = (value < refValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* main
|
||||
*/
|
||||
public static void main(String args[]) {
|
||||
|
||||
String baseXML = null;
|
||||
int group = 2;
|
||||
|
||||
/* ---- Analysis Mode ----
|
||||
BEST = 1;
|
||||
WORST = 2;
|
||||
AVERAGE = 3;
|
||||
MIDAVG = 4;
|
||||
------------------------ */
|
||||
int analyzerMode = 4;
|
||||
|
||||
try {
|
||||
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
|
||||
if (args[i].startsWith("-basexml") ||
|
||||
args[i].startsWith("-b")) {
|
||||
i++;
|
||||
baseXML = args[i];
|
||||
} else if (args[i].startsWith("-tc")) {
|
||||
printTCValues = true;
|
||||
} else if (args[i].startsWith("-v"))
|
||||
printValues = true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
printUsage();
|
||||
}
|
||||
|
||||
XMLHTMLReporter.setGroupLevel(group);
|
||||
J2DAnalyzer.setMode(analyzerMode);
|
||||
if (baseXML != null) {
|
||||
generateComparisonReport(defaultFileSystem.getPath(baseXML));
|
||||
} else {
|
||||
printUsage();
|
||||
}
|
||||
|
||||
if (testFailed)
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Test Group to the list
|
||||
*/
|
||||
private static void addGroup(String testName) {
|
||||
|
||||
String testNameSplit[] = testName.replace('.', '_').split("_");
|
||||
StringBuilder group = new StringBuilder(testNameSplit[0]);
|
||||
for (int i = 1; i < LEVEL; i++) {
|
||||
group.append(".").append(testNameSplit[i]);
|
||||
}
|
||||
|
||||
if (!groups.contains(group.toString()))
|
||||
groups.add(group.toString());
|
||||
}
|
||||
|
||||
private static List<Path> listResFiles(Path dir, String pattern) throws IOException {
|
||||
List<Path> result = new ArrayList<>();
|
||||
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, pattern)) {
|
||||
for (Path entry : stream) {
|
||||
result.add(entry);
|
||||
}
|
||||
} catch (DirectoryIteratorException ex) {
|
||||
throw ex.getCause();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the reports from the base & target result XML
|
||||
*/
|
||||
private static void generateComparisonReport(Path directoryToResFiles) {
|
||||
|
||||
if (directoryToResFiles.toFile().isDirectory()) {
|
||||
List<Path> jbsdkFiles, openjdkFiles;
|
||||
|
||||
try {
|
||||
jbsdkFiles = listResFiles(directoryToResFiles, "*{jbsdk,jbre}*.{res}");
|
||||
openjdkFiles = listResFiles(directoryToResFiles, "*{openjdk}*.{res}");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
readScores(openjdkFiles.get(0), true);
|
||||
|
||||
for (Path file : jbsdkFiles) {
|
||||
readScores(file, false);
|
||||
}
|
||||
} else {
|
||||
readScores(directoryToResFiles, true);
|
||||
}
|
||||
}
|
||||
|
||||
private static void readScores(Path file, boolean rememberReference) {
|
||||
String fileName = file.getName(file.getNameCount() - 1).toString();
|
||||
String osName="", jdkName="", renderName="";
|
||||
if (fileName.contains("win") || fileName.contains("linux") || fileName.contains("osx")) {
|
||||
String[] fileNameComponents = fileName.split("_");
|
||||
if (fileNameComponents.length > 0)
|
||||
osName = fileNameComponents[0];
|
||||
if (fileNameComponents.length > 1)
|
||||
jdkName = fileNameComponents[1];
|
||||
if (fileNameComponents.length > 2)
|
||||
renderName = fileNameComponents[2];
|
||||
}
|
||||
|
||||
String resultXMLFileName = file.toString();
|
||||
|
||||
J2DAnalyzer.results = new Vector();
|
||||
J2DAnalyzer.readResults(resultXMLFileName);
|
||||
J2DAnalyzer.SingleResultSetHolder baseSRSH =
|
||||
(J2DAnalyzer.SingleResultSetHolder) J2DAnalyzer.results.elementAt(0);
|
||||
Enumeration baseEnum_ = baseSRSH.getKeyEnumeration();
|
||||
Vector<String> baseKeyvector = new Vector<>();
|
||||
while (baseEnum_.hasMoreElements()) {
|
||||
baseKeyvector.add((String) baseEnum_.nextElement());
|
||||
}
|
||||
String baseKeys[] = new String[baseKeyvector.size()];
|
||||
baseKeyvector.copyInto(baseKeys);
|
||||
J2DAnalyzer.sort(baseKeys);
|
||||
|
||||
Map<String, Double> consoleBaseRes = new HashMap<>();
|
||||
|
||||
Map<String, J2DAnalyzer.ResultHolder> testCaseBaseResult = new HashMap<>();
|
||||
Map<String, Integer> testCaseResultCount = new HashMap<>();
|
||||
|
||||
for (String baseKey : baseKeys) {
|
||||
|
||||
J2DAnalyzer.ResultHolder baseTCR =
|
||||
baseSRSH.getResultByKey(baseKey);
|
||||
|
||||
Integer curTestCountObj = testCaseResultCount.get(baseTCR.getName());
|
||||
int curTestCount = 0;
|
||||
if (curTestCountObj != null) {
|
||||
curTestCount = curTestCountObj;
|
||||
}
|
||||
curTestCount++;
|
||||
testCaseBaseResult.put(baseTCR.getName() + "_" + (curTestCount - 1), baseTCR);
|
||||
testCaseResultCount.put(baseTCR.getName(), curTestCount);
|
||||
|
||||
addGroup(baseTCR.getName());
|
||||
|
||||
Double curTotalScoreObj = consoleBaseRes.get(baseTCR.getName());
|
||||
double curTotalScore = 0;
|
||||
if (curTotalScoreObj != null) {
|
||||
curTotalScore = curTotalScoreObj;
|
||||
}
|
||||
curTotalScore = curTotalScore + baseTCR.getScore();
|
||||
consoleBaseRes.put(baseTCR.getName(), curTotalScore);
|
||||
}
|
||||
|
||||
String OJRname = osName + "." + jdkName + "." + renderName;
|
||||
generateTestCaseSummaryReport((OJRname.length() == 2? "": OJRname),
|
||||
consoleBaseRes,
|
||||
testCaseBaseResult,
|
||||
testCaseResultCount,
|
||||
rememberReference);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1123,7 +1123,7 @@ bool PhaseIdealLoop::loop_predication_impl_helper(IdealLoopTree *loop, ProjNode*
|
||||
Node* idx = cmp->in(1);
|
||||
assert(!invar.is_invariant(idx), "index is variant");
|
||||
Node* rng = cmp->in(2);
|
||||
assert(rng->Opcode() == Op_LoadRange || iff->is_RangeCheck() || _igvn.type(rng)->is_int()->_lo >= 0, "must be");
|
||||
assert(rng->Opcode() == Op_LoadRange || iff->is_RangeCheck() || _igvn.type(rng)->is_int()->_lo != 0, "must be");
|
||||
assert(invar.is_invariant(rng), "range must be invariant");
|
||||
int scale = 1;
|
||||
Node* offset = zero;
|
||||
|
||||
@@ -117,7 +117,7 @@ const char* Abstract_VM_Version::vm_vendor() {
|
||||
#ifdef VENDOR
|
||||
return VENDOR;
|
||||
#else
|
||||
return "Oracle Corporation";
|
||||
return "JetBrains s.r.o";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -110,13 +110,13 @@ Java_java_lang_System_identityHashCode(JNIEnv *env, jobject this, jobject x)
|
||||
|
||||
/* Third party may overwrite these values. */
|
||||
#ifndef VENDOR
|
||||
#define VENDOR "Oracle Corporation"
|
||||
#define VENDOR "JetBrains s.r.o"
|
||||
#endif
|
||||
#ifndef VENDOR_URL
|
||||
#define VENDOR_URL "http://java.oracle.com/"
|
||||
#define VENDOR_URL "https://www.jetbrains.com/"
|
||||
#endif
|
||||
#ifndef VENDOR_URL_BUG
|
||||
#define VENDOR_URL_BUG "http://bugreport.java.com/bugreport/"
|
||||
#define VENDOR_URL_BUG "https://youtrack.jetbrains.com"
|
||||
#endif
|
||||
|
||||
#ifdef JAVA_SPECIFICATION_VENDOR /* Third party may NOT overwrite this. */
|
||||
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 9.0 KiB |
@@ -1,6 +1,5 @@
|
||||
#include "version.rc"
|
||||
|
||||
#define IDI_ICON 2000
|
||||
#include "java_rc.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
6
src/java.base/windows/native/launcher/java_rc.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef _JAVA_RC_H_
|
||||
#define _JAVA_RC_H_
|
||||
|
||||
#define IDI_ICON 2000
|
||||
|
||||
#endif // _JAVA_RC_H_
|
||||
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* 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 com.apple.concurrent;
|
||||
|
||||
import java.util.concurrent.*;
|
||||
|
||||
/**
|
||||
* Factory for {@link Executor}s and {@link ExecutorService}s backed by
|
||||
* libdispatch.
|
||||
*
|
||||
* Access is controlled through the Dispatch.getInstance() method, because
|
||||
* performed tasks occur on threads owned by libdispatch. These threads are
|
||||
* not owned by any particular AppContext or have any specific context
|
||||
* classloader installed.
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 2
|
||||
*/
|
||||
public final class Dispatch {
|
||||
/**
|
||||
* The priorities of the three default asynchronous queues.
|
||||
*/
|
||||
public enum Priority {
|
||||
LOW(-2), NORMAL(0), HIGH(2); // values from <dispatch/queue.h>
|
||||
|
||||
final int nativePriority;
|
||||
Priority(final int nativePriority) { this.nativePriority = nativePriority; }
|
||||
};
|
||||
|
||||
final static Dispatch instance = new Dispatch();
|
||||
|
||||
/**
|
||||
* Factory method returns an instnace of Dispatch if supported by the
|
||||
* underlying operating system, and if the caller's security manager
|
||||
* permits "canInvokeInSystemThreadGroup".
|
||||
*
|
||||
* @return a factory instance of Dispatch, or null if not available
|
||||
*/
|
||||
public static Dispatch getInstance() {
|
||||
checkSecurity();
|
||||
if (!LibDispatchNative.nativeIsDispatchSupported()) return null;
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
private static void checkSecurity() {
|
||||
final SecurityManager security = System.getSecurityManager();
|
||||
if (security != null) security.checkPermission(new RuntimePermission("canInvokeInSystemThreadGroup"));
|
||||
}
|
||||
|
||||
private Dispatch() { }
|
||||
|
||||
/**
|
||||
* Creates an {@link Executor} that performs tasks asynchronously. The {@link Executor}
|
||||
* cannot be shutdown, and enqueued {@link Runnable}s cannot be canceled. Passing null
|
||||
* returns the {@link Priority.NORMAL} {@link Executor}.
|
||||
*
|
||||
* @param priority - the priority of the returned {@link Executor}
|
||||
* @return an asynchronous {@link Executor}
|
||||
*/
|
||||
public Executor getAsyncExecutor(Priority priority) {
|
||||
if (priority == null) priority = Priority.NORMAL;
|
||||
final long nativeQueue = LibDispatchNative.nativeCreateConcurrentQueue(priority.nativePriority);
|
||||
if (nativeQueue == 0L) return null;
|
||||
return new LibDispatchConcurrentQueue(nativeQueue);
|
||||
}
|
||||
|
||||
int queueIndex = 0;
|
||||
/**
|
||||
* Creates an {@link ExecutorService} that performs tasks synchronously in FIFO order.
|
||||
* Useful to protect a resource against concurrent modification, in lieu of a lock.
|
||||
* Passing null returns an {@link ExecutorService} with a uniquely labeled queue.
|
||||
*
|
||||
* @param label - a label to name the queue, shown in several debugging tools
|
||||
* @return a synchronous {@link ExecutorService}
|
||||
*/
|
||||
public ExecutorService createSerialExecutor(String label) {
|
||||
if (label == null) label = "";
|
||||
if (label.length() > 256) label = label.substring(0, 256);
|
||||
String queueName = "com.apple.java.concurrent.";
|
||||
if ("".equals(label)) {
|
||||
synchronized (this) {
|
||||
queueName += queueIndex++;
|
||||
}
|
||||
} else {
|
||||
queueName += label;
|
||||
}
|
||||
|
||||
final long nativeQueue = LibDispatchNative.nativeCreateSerialQueue(queueName);
|
||||
if (nativeQueue == 0) return null;
|
||||
return new LibDispatchSerialQueue(nativeQueue);
|
||||
}
|
||||
|
||||
Executor nonBlockingMainQueue = null;
|
||||
/**
|
||||
* Returns an {@link Executor} that performs the provided Runnables on the main queue of the process.
|
||||
* Runnables submitted to this {@link Executor} will not run until the AWT is started or another native toolkit is running a CFRunLoop or NSRunLoop on the main thread.
|
||||
*
|
||||
* Submitting a Runnable to this {@link Executor} does not wait for the Runnable to complete.
|
||||
* @return an asynchronous {@link Executor} that is backed by the main queue
|
||||
*/
|
||||
public synchronized Executor getNonBlockingMainQueueExecutor() {
|
||||
if (nonBlockingMainQueue != null) return nonBlockingMainQueue;
|
||||
return nonBlockingMainQueue = new LibDispatchMainQueue.ASync();
|
||||
}
|
||||
|
||||
Executor blockingMainQueue = null;
|
||||
/**
|
||||
* Returns an {@link Executor} that performs the provided Runnables on the main queue of the process.
|
||||
* Runnables submitted to this {@link Executor} will not run until the AWT is started or another native toolkit is running a CFRunLoop or NSRunLoop on the main thread.
|
||||
*
|
||||
* Submitting a Runnable to this {@link Executor} will block until the Runnable has completed.
|
||||
* @return an {@link Executor} that is backed by the main queue
|
||||
*/
|
||||
public synchronized Executor getBlockingMainQueueExecutor() {
|
||||
if (blockingMainQueue != null) return blockingMainQueue;
|
||||
return blockingMainQueue = new LibDispatchMainQueue.Sync();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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 com.apple.concurrent;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
class LibDispatchConcurrentQueue extends LibDispatchQueue implements Executor {
|
||||
LibDispatchConcurrentQueue(final long queuePtr) {
|
||||
super(queuePtr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(final Runnable task) {
|
||||
LibDispatchNative.nativeExecuteAsync(ptr, task);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected synchronized void dispose() {
|
||||
// should not dispose the default concurrent queues
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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 com.apple.concurrent;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
abstract class LibDispatchMainQueue extends LibDispatchQueue implements Executor {
|
||||
public LibDispatchMainQueue() {
|
||||
super(LibDispatchNative.nativeGetMainQueue());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected synchronized void dispose() {
|
||||
// should not dispose the main queue
|
||||
}
|
||||
|
||||
static class Sync extends LibDispatchMainQueue {
|
||||
@Override
|
||||
public void execute(final Runnable task) {
|
||||
LibDispatchNative.nativeExecuteSync(ptr, task);
|
||||
}
|
||||
}
|
||||
|
||||
static class ASync extends LibDispatchMainQueue {
|
||||
@Override
|
||||
public void execute(final Runnable task) {
|
||||
LibDispatchNative.nativeExecuteAsync(ptr, task);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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 com.apple.concurrent;
|
||||
|
||||
final class LibDispatchNative {
|
||||
static {
|
||||
java.security.AccessController.doPrivileged(
|
||||
new java.security.PrivilegedAction<Void>() {
|
||||
public Void run() {
|
||||
System.loadLibrary("osx");
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static native boolean nativeIsDispatchSupported();
|
||||
static native long nativeGetMainQueue();
|
||||
static native long nativeCreateConcurrentQueue(int priority);
|
||||
static native long nativeCreateSerialQueue(String name);
|
||||
static native void nativeReleaseQueue(long nativeQueue);
|
||||
static native void nativeExecuteAsync(long nativeQueue, Runnable task);
|
||||
static native void nativeExecuteSync(long nativeQueue, Runnable task);
|
||||
|
||||
private LibDispatchNative() { }
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* 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 com.apple.concurrent;
|
||||
|
||||
class LibDispatchQueue extends LibDispatchRetainedResource {
|
||||
LibDispatchQueue(final long queuePtr) {
|
||||
super(queuePtr);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* 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 com.apple.concurrent;
|
||||
|
||||
class LibDispatchRetainedResource {
|
||||
protected long ptr;
|
||||
|
||||
protected LibDispatchRetainedResource(final long ptr) {
|
||||
this.ptr = ptr;
|
||||
}
|
||||
|
||||
protected synchronized void dispose() {
|
||||
if (ptr != 0) LibDispatchNative.nativeReleaseQueue(ptr);
|
||||
ptr = 0;
|
||||
}
|
||||
|
||||
protected void finalize() throws Throwable {
|
||||
dispose();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* 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 com.apple.concurrent;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.*;
|
||||
|
||||
class LibDispatchSerialQueue extends AbstractExecutorService {
|
||||
static final int RUNNING = 0;
|
||||
static final int SHUTDOWN = 1;
|
||||
// static final int STOP = 2; // not supported by GCD
|
||||
static final int TERMINATED = 3;
|
||||
|
||||
final Object lock = new Object();
|
||||
LibDispatchQueue nativeQueueWrapper;
|
||||
volatile int runState;
|
||||
|
||||
LibDispatchSerialQueue(final long queuePtr) {
|
||||
nativeQueueWrapper = new LibDispatchQueue(queuePtr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(final Runnable task) {
|
||||
if (nativeQueueWrapper == null) return;
|
||||
LibDispatchNative.nativeExecuteAsync(nativeQueueWrapper.ptr, task);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isShutdown() {
|
||||
return runState != RUNNING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTerminated() {
|
||||
return runState == TERMINATED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
synchronized (lock) {
|
||||
if (runState != RUNNING) return;
|
||||
|
||||
runState = SHUTDOWN;
|
||||
execute(new Runnable() {
|
||||
public void run() {
|
||||
synchronized (lock) {
|
||||
runState = TERMINATED;
|
||||
lock.notifyAll(); // for the benefit of awaitTermination()
|
||||
}
|
||||
}
|
||||
});
|
||||
nativeQueueWrapper = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Runnable> shutdownNow() {
|
||||
shutdown();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean awaitTermination(final long timeout, final TimeUnit unit) throws InterruptedException {
|
||||
if (runState == TERMINATED) return true;
|
||||
|
||||
final long millis = unit.toMillis(timeout);
|
||||
if (millis <= 0) return false;
|
||||
|
||||
synchronized (lock) {
|
||||
if (runState == TERMINATED) return true;
|
||||
lock.wait(timeout);
|
||||
if (runState == TERMINATED) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
Apple-specific implementations of the java.util.concurrent.* API based on libdispatch.
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
import com.apple.eawt.AppEvent.AboutEvent;
|
||||
|
||||
/**
|
||||
* An implementor receives notification when the app is asked to show it's about dialog.
|
||||
*
|
||||
* @see Application#setAboutHandler(AboutHandler)
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public interface AboutHandler {
|
||||
/**
|
||||
* Called when the application is asked to show it's about dialog.
|
||||
* @param e the request to show the about dialog.
|
||||
*/
|
||||
public void handleAbout(final AboutEvent e);
|
||||
}
|
||||
205
src/java.desktop/macosx/classes/com/apple/eawt/AppEvent.java
Normal file
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.util.*;
|
||||
import java.awt.Window;
|
||||
|
||||
/**
|
||||
* AppEvents are sent to listeners and handlers installed on the {@link Application}.
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public abstract class AppEvent extends EventObject {
|
||||
AppEvent() {
|
||||
super(Application.getApplication());
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains a list of files.
|
||||
*/
|
||||
public abstract static class FilesEvent extends AppEvent {
|
||||
final List<File> files;
|
||||
|
||||
FilesEvent(final List<File> files) {
|
||||
this.files = files;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the list of files
|
||||
*/
|
||||
public List<File> getFiles() {
|
||||
return files;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Event sent when the app is asked to open a list of files.
|
||||
*
|
||||
* @see OpenFilesHandler#openFiles(OpenFilesEvent)
|
||||
*/
|
||||
public static class OpenFilesEvent extends FilesEvent {
|
||||
final String searchTerm;
|
||||
|
||||
OpenFilesEvent(final List<File> files, final String searchTerm) {
|
||||
super(files);
|
||||
this.searchTerm = searchTerm;
|
||||
}
|
||||
|
||||
/**
|
||||
* If the files were opened using the Spotlight search menu or a Finder search window, this method obtains the search term used to find the files.
|
||||
* This is useful for highlighting the search term in the documents when they are opened.
|
||||
* @return the search term used to find the files
|
||||
*/
|
||||
public String getSearchTerm() {
|
||||
return searchTerm;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Event sent when the app is asked to print a list of files.
|
||||
*
|
||||
* @see PrintFilesHandler#printFiles(PrintFilesEvent)
|
||||
*/
|
||||
public static class PrintFilesEvent extends FilesEvent {
|
||||
PrintFilesEvent(final List<File> files) {
|
||||
super(files);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Event sent when the app is asked to open a URI.
|
||||
*
|
||||
* @see OpenURIHandler#openURI(OpenURIEvent)
|
||||
*/
|
||||
public static class OpenURIEvent extends AppEvent {
|
||||
final URI uri;
|
||||
|
||||
OpenURIEvent(final URI uri) {
|
||||
this.uri = uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the URI the app was asked to open
|
||||
*/
|
||||
public URI getURI() {
|
||||
return uri;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Event sent when the application is asked to open it's about window.
|
||||
*
|
||||
* @see AboutHandler#handleAbout()
|
||||
*/
|
||||
public static class AboutEvent extends AppEvent { AboutEvent() { } }
|
||||
|
||||
/**
|
||||
* Event sent when the application is asked to open it's preferences window.
|
||||
*
|
||||
* @see PreferencesHandler#handlePreferences()
|
||||
*/
|
||||
public static class PreferencesEvent extends AppEvent { PreferencesEvent() { } }
|
||||
|
||||
/**
|
||||
* Event sent when the application is asked to quit.
|
||||
*
|
||||
* @see QuitHandler#handleQuitRequestWith(QuitEvent, QuitResponse)
|
||||
*/
|
||||
public static class QuitEvent extends AppEvent { QuitEvent() { } }
|
||||
|
||||
/**
|
||||
* Event sent when the application is asked to re-open itself.
|
||||
*
|
||||
* @see AppReOpenedListener#appReOpened(AppReOpenedEvent)
|
||||
*/
|
||||
public static class AppReOpenedEvent extends AppEvent { AppReOpenedEvent() { } }
|
||||
|
||||
/**
|
||||
* Event sent when the application has become the foreground app, and when it has resigned being the foreground app.
|
||||
*
|
||||
* @see AppForegroundListener#appRaisedToForeground(AppForegroundEvent)
|
||||
* @see AppForegroundListener#appMovedToBackground(AppForegroundEvent)
|
||||
*/
|
||||
public static class AppForegroundEvent extends AppEvent { AppForegroundEvent() { } }
|
||||
|
||||
/**
|
||||
* Event sent when the application has been hidden or shown.
|
||||
*
|
||||
* @see AppHiddenListener#appHidden(AppHiddenEvent)
|
||||
* @see AppHiddenListener#appUnhidden(AppHiddenEvent)
|
||||
*/
|
||||
public static class AppHiddenEvent extends AppEvent { AppHiddenEvent() { } }
|
||||
|
||||
/**
|
||||
* Event sent when the user session has been changed via Fast User Switching.
|
||||
*
|
||||
* @see UserSessionListener#userSessionActivated(UserSessionEvent)
|
||||
* @see UserSessionListener#userSessionDeactivated(UserSessionEvent)
|
||||
*/
|
||||
public static class UserSessionEvent extends AppEvent { UserSessionEvent() { } }
|
||||
|
||||
/**
|
||||
* Event sent when the displays attached to the system enter and exit power save sleep.
|
||||
*
|
||||
* @see ScreenSleepListener#screenAboutToSleep(ScreenSleepEvent)
|
||||
* @see ScreenSleepListener#screenAwoke(ScreenSleepEvent)
|
||||
*/
|
||||
public static class ScreenSleepEvent extends AppEvent { ScreenSleepEvent() { } }
|
||||
|
||||
/**
|
||||
* Event sent when the system enters and exits power save sleep.
|
||||
*
|
||||
* @see SystemSleepListener#systemAboutToSleep(SystemSleepEvent)
|
||||
* @see SystemSleepListener#systemAwoke(SystemSleepEvent)
|
||||
*/
|
||||
public static class SystemSleepEvent extends AppEvent { SystemSleepEvent() { } }
|
||||
|
||||
/**
|
||||
* Event sent when a window is entering/exiting or has entered/exited full screen state.
|
||||
*
|
||||
* @see FullScreenUtilities
|
||||
*
|
||||
* @since Java for Mac OS X 10.7 Update 1
|
||||
*/
|
||||
public static class FullScreenEvent extends AppEvent {
|
||||
final Window window;
|
||||
|
||||
FullScreenEvent(final Window window) {
|
||||
this.window = window;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return window transitioning between full screen states
|
||||
*/
|
||||
public Window getWindow() {
|
||||
return window;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
/**
|
||||
* Common interface for all event listener sub-types.
|
||||
* Implementors may implement multiple sub-types, but only need to call {@link Application#addAppEventListener(AppEventListener)} once to receive all notifications.
|
||||
*
|
||||
* @see AppReOpenedListener
|
||||
* @see AppForegroundListener
|
||||
* @see AppHiddenListener
|
||||
* @see ScreenSleepListener
|
||||
* @see SystemSleepListener
|
||||
* @see UserSessionListener
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public interface AppEventListener { }
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
import com.apple.eawt.AppEvent.AppForegroundEvent;
|
||||
|
||||
/**
|
||||
* Implementors are notified when the app becomes the foreground app and when it resigns being the foreground app.
|
||||
* This notification is useful for hiding and showing transient UI like palette windows which should be hidden when the app is in the background.
|
||||
*
|
||||
* @see Application#addAppEventListener(AppEventListener)
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public interface AppForegroundListener extends AppEventListener {
|
||||
/**
|
||||
* Called when the app becomes the foreground app.
|
||||
* @param e the app became foreground notification.
|
||||
*/
|
||||
public void appRaisedToForeground(final AppForegroundEvent e);
|
||||
|
||||
/**
|
||||
* Called when the app resigns to the background and another app becomes the foreground app.
|
||||
* @param e the app resigned foreground notification.
|
||||
*/
|
||||
public void appMovedToBackground(final AppForegroundEvent e);
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
import com.apple.eawt.AppEvent.AppHiddenEvent;
|
||||
|
||||
/**
|
||||
* Implementors are notified when the app is hidden or shown by the user.
|
||||
* This notification is helpful for discontinuing a costly animation if it's not visible to the user.
|
||||
*
|
||||
* @see Application#addAppEventListener(AppEventListener)
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public interface AppHiddenListener extends AppEventListener {
|
||||
/**
|
||||
* Called the app is hidden.
|
||||
* @param e
|
||||
*/
|
||||
public void appHidden(final AppHiddenEvent e);
|
||||
|
||||
/**
|
||||
* Called when the hidden app is shown again (but not necessarily brought to the foreground).
|
||||
* @param e
|
||||
*/
|
||||
public void appUnhidden(final AppHiddenEvent e);
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
import com.apple.eawt.AppEvent.AppReOpenedEvent;
|
||||
|
||||
/**
|
||||
* Implementors receive notification when the app has been asked to open again.
|
||||
* Re-open events occur when the user clicks on the running app's Dock icon.
|
||||
* Re-open events also occur when the app is double-clicked in the Finder and the app is already running.
|
||||
*
|
||||
* This notification is useful for showing a new document when your app has no open windows.
|
||||
*
|
||||
* @see Application#addAppEventListener(AppEventListener)
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public interface AppReOpenedListener extends AppEventListener {
|
||||
/**
|
||||
* Called when the app has been re-opened (it's Dock icon was clicked on, or was double-clicked in the Finder)
|
||||
* @param e the request to re-open the app
|
||||
*/
|
||||
public void appReOpened(final AppReOpenedEvent e);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@@ -25,38 +25,18 @@
|
||||
|
||||
package com.apple.eawt;
|
||||
|
||||
import java.awt.Image;
|
||||
import java.awt.PopupMenu;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.Window;
|
||||
import java.awt.desktop.AboutHandler;
|
||||
import java.awt.desktop.AppForegroundListener;
|
||||
import java.awt.desktop.AppHiddenListener;
|
||||
import java.awt.desktop.AppReopenedListener;
|
||||
import java.awt.desktop.OpenFilesEvent;
|
||||
import java.awt.desktop.OpenFilesHandler;
|
||||
import java.awt.desktop.OpenURIEvent;
|
||||
import java.awt.desktop.OpenURIHandler;
|
||||
import java.awt.desktop.PreferencesHandler;
|
||||
import java.awt.desktop.PrintFilesEvent;
|
||||
import java.awt.desktop.PrintFilesHandler;
|
||||
import java.awt.desktop.QuitHandler;
|
||||
import java.awt.desktop.QuitResponse;
|
||||
import java.awt.desktop.QuitStrategy;
|
||||
import java.awt.desktop.ScreenSleepListener;
|
||||
import java.awt.desktop.SystemEventListener;
|
||||
import java.awt.desktop.SystemSleepListener;
|
||||
import java.awt.desktop.UserSessionListener;
|
||||
import java.awt.*;
|
||||
import java.awt.peer.*;
|
||||
import java.beans.Beans;
|
||||
|
||||
import javax.swing.JMenuBar;
|
||||
|
||||
import sun.lwawt.*;
|
||||
import sun.lwawt.macosx.*;
|
||||
import sun.awt.AWTAccessor;
|
||||
import sun.lwawt.LWWindowPeer;
|
||||
import sun.lwawt.macosx.CPlatformWindow;
|
||||
|
||||
/**
|
||||
* The {@code Application} class allows you to integrate your Java application with the native Mac OS X environment.
|
||||
* The <code>Application</code> class allows you to integrate your Java application with the native Mac OS X environment.
|
||||
* You can provide your Mac OS X users a greatly enhanced experience by implementing a few basic handlers for standard system events.
|
||||
*
|
||||
* For example:
|
||||
@@ -79,8 +59,15 @@ public class Application {
|
||||
static Application sApplication = null;
|
||||
|
||||
static {
|
||||
java.security.AccessController.doPrivileged(
|
||||
new java.security.PrivilegedAction<Void>() {
|
||||
public Void run() {
|
||||
System.loadLibrary("awt");
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
checkSecurity();
|
||||
Toolkit.getDefaultToolkit(); // Start AppKit
|
||||
if (!Beans.isDesignTime()) {
|
||||
nativeInitializeApplicationDelegate();
|
||||
}
|
||||
@@ -121,11 +108,11 @@ public class Application {
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds sub-types of {@link SystemEventListener} to listen for notifications from the native Mac OS X system.
|
||||
* Adds sub-types of {@link AppEventListener} to listen for notifications from the native Mac OS X system.
|
||||
*
|
||||
* @see AppForegroundListener
|
||||
* @see AppHiddenListener
|
||||
* @see AppReopenedListener
|
||||
* @see AppReOpenedListener
|
||||
* @see ScreenSleepListener
|
||||
* @see SystemSleepListener
|
||||
* @see UserSessionListener
|
||||
@@ -134,16 +121,16 @@ public class Application {
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public void addAppEventListener(final SystemEventListener listener) {
|
||||
public void addAppEventListener(final AppEventListener listener) {
|
||||
eventHandler.addListener(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes sub-types of {@link SystemEventListener} from listening for notifications from the native Mac OS X system.
|
||||
* Removes sub-types of {@link AppEventListener} from listening for notifications from the native Mac OS X system.
|
||||
*
|
||||
* @see AppForegroundListener
|
||||
* @see AppHiddenListener
|
||||
* @see AppReopenedListener
|
||||
* @see AppReOpenedListener
|
||||
* @see ScreenSleepListener
|
||||
* @see SystemSleepListener
|
||||
* @see UserSessionListener
|
||||
@@ -152,16 +139,16 @@ public class Application {
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public void removeAppEventListener(final SystemEventListener listener) {
|
||||
public void removeAppEventListener(final AppEventListener listener) {
|
||||
eventHandler.removeListener(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Installs a handler to show a custom About window for your application.
|
||||
*
|
||||
* Setting the {@link AboutHandler} to {@code null} reverts it to the default Cocoa About window.
|
||||
* Setting the {@link AboutHandler} to <code>null</code> reverts it to the default Cocoa About window.
|
||||
*
|
||||
* @param aboutHandler the handler to respond to the {@link AboutHandler#handleAbout} message
|
||||
* @param aboutHandler the handler to respond to the {@link AboutHandler#handleAbout()} message
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
@@ -172,7 +159,7 @@ public class Application {
|
||||
/**
|
||||
* Installs a handler to create the Preferences menu item in your application's app menu.
|
||||
*
|
||||
* Setting the {@link PreferencesHandler} to {@code null} will remove the Preferences item from the app menu.
|
||||
* Setting the {@link PreferencesHandler} to <code>null</code> will remove the Preferences item from the app menu.
|
||||
*
|
||||
* @param preferencesHandler
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
@@ -184,8 +171,8 @@ public class Application {
|
||||
|
||||
/**
|
||||
* Installs the handler which is notified when the application is asked to open a list of files.
|
||||
* The {@link OpenFilesHandler#openFiles(OpenFilesEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleDocumentTypes} array present in it's Info.plist.
|
||||
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a {@code CFBundleDocumentTypes} key to your app's Info.plist.
|
||||
* The {@link OpenFilesHandler#openFiles(AppEvent.OpenFilesEvent)} notifications are only sent if the Java app is a bundled application, with a <code>CFBundleDocumentTypes</code> array present in it's Info.plist.
|
||||
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a <code>CFBundleDocumentTypes</code> key to your app's Info.plist.
|
||||
*
|
||||
* @param openFileHandler
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
@@ -197,8 +184,8 @@ public class Application {
|
||||
|
||||
/**
|
||||
* Installs the handler which is notified when the application is asked to print a list of files.
|
||||
* The {@link PrintFilesHandler#printFiles(PrintFilesEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleDocumentTypes} array present in it's Info.plist.
|
||||
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a {@code CFBundleDocumentTypes} key to your app's Info.plist.
|
||||
* The {@link PrintFilesHandler#printFiles(AppEvent.PrintFilesEvent)} notifications are only sent if the Java app is a bundled application, with a <code>CFBundleDocumentTypes</code> array present in it's Info.plist.
|
||||
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a <code>CFBundleDocumentTypes</code> key to your app's Info.plist.
|
||||
*
|
||||
* @param printFileHandler
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
@@ -210,10 +197,10 @@ public class Application {
|
||||
|
||||
/**
|
||||
* Installs the handler which is notified when the application is asked to open a URL.
|
||||
* The {@link OpenURIHandler#openURI(OpenURIEvent)} notifications are only sent if the Java app is a bundled application, with a {@code CFBundleURLTypes} array present in it's Info.plist.
|
||||
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a {@code CFBundleURLTypes} key to your app's Info.plist.
|
||||
* The {@link OpenURIHandler#openURI(AppEvent.OpenURIEvent)} notifications are only sent if the Java app is a bundled application, with a <code>CFBundleURLTypes</code> array present in it's Info.plist.
|
||||
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a <code>CFBundleURLTypes</code> key to your app's Info.plist.
|
||||
*
|
||||
* Setting the handler to {@code null} causes all {@link OpenURIHandler#openURI(OpenURIEvent)} requests to be enqueued until another handler is set.
|
||||
* Setting the handler to <code>null</code> causes all {@link OpenURIHandler#openURI(AppEvent.OpenURIEvent)} requests to be enqueued until another handler is set.
|
||||
*
|
||||
* @param openURIHandler
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
@@ -226,7 +213,7 @@ public class Application {
|
||||
/**
|
||||
* Installs the handler which determines if the application should quit.
|
||||
* The handler is passed a one-shot {@link QuitResponse} which can cancel or proceed with the quit.
|
||||
* Setting the handler to {@code null} causes all quit requests to directly perform the default {@link QuitStrategy}.
|
||||
* Setting the handler to <code>null</code> causes all quit requests to directly perform the default {@link QuitStrategy}.
|
||||
*
|
||||
* @param quitHandler the handler that is called when the application is asked to quit
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
@@ -384,16 +371,6 @@ public class Application {
|
||||
iconHandler.setDockIconBadge(badge);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a progress bar to this application's Dock icon.
|
||||
* Acceptable values are from 0 to 100, any other disables progress indication.
|
||||
*
|
||||
* @param value progress value
|
||||
*/
|
||||
public void setDockIconProgress(final int value) {
|
||||
iconHandler.setDockIconProgress(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the default menu bar to use when there are no active frames.
|
||||
* Only used when the system property "apple.laf.useScreenMenuBar" is "true", and
|
||||
@@ -416,6 +393,7 @@ public class Application {
|
||||
*
|
||||
* @since Java for Mac OS X 10.7 Update 1
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void requestToggleFullScreen(final Window window) {
|
||||
final Object peer = AWTAccessor.getComponentAccessor().getPeer(window);
|
||||
if (!(peer instanceof LWWindowPeer)) return;
|
||||
@@ -424,4 +402,168 @@ public class Application {
|
||||
((CPlatformWindow)platformWindow).toggleFullScreen();
|
||||
}
|
||||
|
||||
|
||||
// -- DEPRECATED API --
|
||||
|
||||
/**
|
||||
* Adds the specified ApplicationListener as a receiver of callbacks from this class.
|
||||
* This method throws a RuntimeException if the newer About, Preferences, Quit, etc handlers are installed.
|
||||
*
|
||||
* @param listener an implementation of ApplicationListener that handles ApplicationEvents
|
||||
*
|
||||
* @deprecated register individual handlers for each task (About, Preferences, Open, Print, Quit, etc)
|
||||
* @since 1.4
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Deprecated
|
||||
public void addApplicationListener(final ApplicationListener listener) {
|
||||
eventHandler.legacyHandler.addLegacyAppListener(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the specified ApplicationListener from being a receiver of callbacks from this class.
|
||||
* This method throws a RuntimeException if the newer About, Preferences, Quit, etc handlers are installed.
|
||||
*
|
||||
* @param listener an implementation of ApplicationListener that had previously been registered to handle ApplicationEvents
|
||||
*
|
||||
* @deprecated unregister individual handlers for each task (About, Preferences, Open, Print, Quit, etc)
|
||||
* @since 1.4
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Deprecated
|
||||
public void removeApplicationListener(final ApplicationListener listener) {
|
||||
eventHandler.legacyHandler.removeLegacyAppListener(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables the Preferences item in the application menu. The ApplicationListener receives a callback for
|
||||
* selection of the Preferences item in the application menu only if this is set to <code>true</code>.
|
||||
*
|
||||
* If a Preferences item isn't present, this method adds and enables it.
|
||||
*
|
||||
* @param enable specifies whether the Preferences item in the application menu should be enabled (<code>true</code>) or not (<code>false</code>)
|
||||
*
|
||||
* @deprecated no replacement
|
||||
* @since 1.4
|
||||
*/
|
||||
@Deprecated
|
||||
public void setEnabledPreferencesMenu(final boolean enable) {
|
||||
menuBarHandler.setPreferencesMenuItemVisible(true);
|
||||
menuBarHandler.setPreferencesMenuItemEnabled(enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables the About item in the application menu. The ApplicationListener receives a callback for
|
||||
* selection of the About item in the application menu only if this is set to <code>true</code>. Because AWT supplies
|
||||
* a standard About window when an application may not, by default this is set to <code>true</code>.
|
||||
*
|
||||
* If the About item isn't present, this method adds and enables it.
|
||||
*
|
||||
* @param enable specifies whether the About item in the application menu should be enabled (<code>true</code>) or not (<code>false</code>)
|
||||
*
|
||||
* @deprecated no replacement
|
||||
* @since 1.4
|
||||
*/
|
||||
@Deprecated
|
||||
public void setEnabledAboutMenu(final boolean enable) {
|
||||
menuBarHandler.setAboutMenuItemEnabled(enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the Preferences item of the application menu is enabled.
|
||||
*
|
||||
* @deprecated no replacement
|
||||
* @since 1.4
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean getEnabledPreferencesMenu() {
|
||||
return menuBarHandler.isPreferencesMenuItemEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the About item of the application menu is enabled.
|
||||
*
|
||||
* @deprecated no replacement
|
||||
* @since 1.4
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean getEnabledAboutMenu() {
|
||||
return menuBarHandler.isAboutMenuItemEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the About item of the application menu is present.
|
||||
*
|
||||
* @deprecated no replacement
|
||||
* @since 1.4
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isAboutMenuItemPresent() {
|
||||
return menuBarHandler.isAboutMenuItemVisible();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the About item to the application menu if the item is not already present.
|
||||
*
|
||||
* @deprecated use {@link #setAboutHandler(AboutHandler)} with a non-null {@link AboutHandler} parameter
|
||||
* @since 1.4
|
||||
*/
|
||||
@Deprecated
|
||||
public void addAboutMenuItem() {
|
||||
menuBarHandler.setAboutMenuItemVisible(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the About item from the application menu if the item is present.
|
||||
*
|
||||
* @deprecated use {@link #setAboutHandler(AboutHandler)} with a null parameter
|
||||
* @since 1.4
|
||||
*/
|
||||
@Deprecated
|
||||
public void removeAboutMenuItem() {
|
||||
menuBarHandler.setAboutMenuItemVisible(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the About Preferences of the application menu is present. By default there is no Preferences menu item.
|
||||
*
|
||||
* @deprecated no replacement
|
||||
* @since 1.4
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isPreferencesMenuItemPresent() {
|
||||
return menuBarHandler.isPreferencesMenuItemVisible();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the Preferences item to the application menu if the item is not already present.
|
||||
*
|
||||
* @deprecated use {@link #setPreferencesHandler(PreferencesHandler)} with a non-null {@link PreferencesHandler} parameter
|
||||
* @since 1.4
|
||||
*/
|
||||
@Deprecated
|
||||
public void addPreferencesMenuItem() {
|
||||
menuBarHandler.setPreferencesMenuItemVisible(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the Preferences item from the application menu if that item is present.
|
||||
*
|
||||
* @deprecated use {@link #setPreferencesHandler(PreferencesHandler)} with a null parameter
|
||||
* @since 1.4
|
||||
*/
|
||||
@Deprecated
|
||||
public void removePreferencesMenuItem() {
|
||||
menuBarHandler.setPreferencesMenuItemVisible(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use <code>java.awt.MouseInfo.getPointerInfo().getLocation()</code>.
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
@Deprecated
|
||||
public static Point getMouseLocationOnScreen() {
|
||||
return java.awt.MouseInfo.getPointerInfo().getLocation();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
/**
|
||||
* An abstract adapter class for receiving <code>ApplicationEvents</code>.
|
||||
*
|
||||
* ApplicationEvents are deprecated. Use individual app event listeners or handlers instead.
|
||||
*
|
||||
* @see Application#addAppEventListener(AppEventListener)
|
||||
*
|
||||
* @see AboutHandler
|
||||
* @see PreferencesHandler
|
||||
* @see OpenURIHandler
|
||||
* @see OpenFilesHandler
|
||||
* @see PrintFilesHandler
|
||||
* @see QuitHandler
|
||||
*
|
||||
* @see AppReOpenedListener
|
||||
* @see AppForegroundListener
|
||||
* @see AppHiddenListener
|
||||
* @see UserSessionListener
|
||||
* @see ScreenSleepListener
|
||||
* @see SystemSleepListener
|
||||
*
|
||||
* @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReOpenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link QuitResponse}.
|
||||
* @since 1.4
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Deprecated
|
||||
public class ApplicationAdapter implements ApplicationListener {
|
||||
@Deprecated
|
||||
public void handleAbout(final ApplicationEvent event) { }
|
||||
|
||||
@Deprecated
|
||||
public void handleOpenApplication(final ApplicationEvent event) { }
|
||||
|
||||
@Deprecated
|
||||
public void handleOpenFile(final ApplicationEvent event) { }
|
||||
|
||||
@Deprecated
|
||||
public void handlePreferences(final ApplicationEvent event) { }
|
||||
|
||||
@Deprecated
|
||||
public void handlePrintFile(final ApplicationEvent event) { }
|
||||
|
||||
@Deprecated
|
||||
public void handleQuit(final ApplicationEvent event) { }
|
||||
|
||||
@Deprecated
|
||||
public void handleReOpenApplication(final ApplicationEvent event) { }
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
import java.util.EventObject;
|
||||
|
||||
/**
|
||||
* The class of events sent to the deprecated ApplicationListener callbacks.
|
||||
*
|
||||
* @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReOpenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link QuitResponse}
|
||||
* @since 1.4
|
||||
*/
|
||||
@Deprecated
|
||||
public class ApplicationEvent extends EventObject {
|
||||
private String fFilename = null;
|
||||
private boolean fHandled = false;
|
||||
|
||||
ApplicationEvent(final Object source) {
|
||||
super(source);
|
||||
}
|
||||
|
||||
ApplicationEvent(final Object source, final String filename) {
|
||||
super(source);
|
||||
fFilename = filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether an ApplicationListener has acted on a particular event.
|
||||
* An event is marked as having been handled with <code>setHandled(true)</code>.
|
||||
*
|
||||
* @return <code>true</code> if the event has been handled, otherwise <code>false</code>
|
||||
*
|
||||
* @since 1.4
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isHandled() {
|
||||
return fHandled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks the event as handled.
|
||||
* After this method handles an ApplicationEvent, it may be useful to specify that it has been handled.
|
||||
* This is usually used in conjunction with <code>getHandled()</code>.
|
||||
* Set to <code>true</code> to designate that this event has been handled. By default it is <code>false</code>.
|
||||
*
|
||||
* @param state <code>true</code> if the event has been handled, otherwise <code>false</code>.
|
||||
*
|
||||
* @since 1.4
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public void setHandled(final boolean state) {
|
||||
fHandled = state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides the filename associated with a particular AppleEvent.
|
||||
* When the ApplicationEvent corresponds to an AppleEvent that needs to act on a particular file, the ApplicationEvent carries the name of the specific file with it.
|
||||
* For example, the Print and Open events refer to specific files.
|
||||
* For these cases, this returns the appropriate file name.
|
||||
*
|
||||
* @return the full path to the file associated with the event, if applicable, otherwise <code>null</code>
|
||||
*
|
||||
* @since 1.4
|
||||
* @deprecated use {@link OpenFilesHandler} or {@link PrintFilesHandler} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public String getFilename() {
|
||||
return fFilename;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
import java.util.EventListener;
|
||||
|
||||
/**
|
||||
* ApplicationEvents are deprecated. Use individual AppEvent listeners or handlers instead.
|
||||
*
|
||||
* @see Application#addAppEventListener(AppEventListener)
|
||||
*
|
||||
* @see AboutHandler
|
||||
* @see PreferencesHandler
|
||||
* @see OpenURIHandler
|
||||
* @see OpenFilesHandler
|
||||
* @see PrintFilesHandler
|
||||
* @see QuitHandler
|
||||
*
|
||||
* @see AppReOpenedListener
|
||||
* @see AppForegroundListener
|
||||
* @see AppHiddenListener
|
||||
* @see UserSessionListener
|
||||
* @see ScreenSleepListener
|
||||
* @see SystemSleepListener
|
||||
*
|
||||
* @since 1.4
|
||||
* @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReOpenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link QuitResponse}
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Deprecated
|
||||
public interface ApplicationListener extends EventListener {
|
||||
/**
|
||||
* Called when the user selects the About item in the application menu. If <code>event</code> is not handled by
|
||||
* setting <code>isHandled(true)</code>, a default About window consisting of the application's name and icon is
|
||||
* displayed. To display a custom About window, designate the <code>event</code> as being handled and display the
|
||||
* appropriate About window.
|
||||
*
|
||||
* @param event an ApplicationEvent initiated by the user choosing About in the application menu
|
||||
* @deprecated use {@link AboutHandler}
|
||||
*/
|
||||
@Deprecated
|
||||
public void handleAbout(ApplicationEvent event);
|
||||
|
||||
/**
|
||||
* Called when the application receives an Open Application event from the Finder or another application. Usually
|
||||
* this will come from the Finder when a user double-clicks your application icon. If there is any special code
|
||||
* that you want to run when you user launches your application from the Finder or by sending an Open Application
|
||||
* event from another application, include that code as part of this handler. The Open Application event is sent
|
||||
* after AWT has been loaded.
|
||||
*
|
||||
* @param event the Open Application event
|
||||
* @deprecated no replacement
|
||||
*/
|
||||
@Deprecated
|
||||
public void handleOpenApplication(ApplicationEvent event);
|
||||
|
||||
/**
|
||||
* Called when the application receives an Open Document event from the Finder or another application. This event
|
||||
* is generated when a user double-clicks a document in the Finder. If the document is registered as belonging
|
||||
* to your application, this event is sent to your application. Documents are bound to a particular application based
|
||||
* primarily on their suffix. In the Finder, a user selects a document and then from the File Menu chooses Get Info.
|
||||
* The Info window allows users to bind a document to a particular application.
|
||||
*
|
||||
* These events are sent only if the bound application has file types listed in the Info.plist entries Document Types
|
||||
* or CFBundleDocumentTypes.
|
||||
*
|
||||
* The ApplicationEvent sent to this handler holds a reference to the file being opened.
|
||||
*
|
||||
* @param event an Open Document event with reference to the file to be opened
|
||||
* @deprecated use {@link OpenFilesHandler}
|
||||
*/
|
||||
@Deprecated
|
||||
public void handleOpenFile(ApplicationEvent event);
|
||||
|
||||
/**
|
||||
* Called when the Preference item in the application menu is selected. Native Mac OS X applications make their
|
||||
* Preferences window available through the application menu. Java applications are automatically given an application
|
||||
* menu in Mac OS X. By default, the Preferences item is disabled in that menu. If you are deploying an application
|
||||
* on Mac OS X, you should enable the preferences item with <code>setEnabledPreferencesMenu(true)</code> in the
|
||||
* Application object and then display your Preferences window in this handler.
|
||||
*
|
||||
* @param event triggered when the user selects Preferences from the application menu
|
||||
* @deprecated use {@link PreferencesHandler}
|
||||
*/
|
||||
@Deprecated
|
||||
public void handlePreferences(ApplicationEvent event);
|
||||
|
||||
/**
|
||||
* Called when the application is sent a request to print a particular file or files. You can allow other applications to
|
||||
* print files with your application by implementing this handler. If another application sends a Print Event along
|
||||
* with the name of a file that your application knows how to process, you can use this handler to determine what to
|
||||
* do with that request. You might open your entire application, or just invoke your printing classes.
|
||||
*
|
||||
* These events are sent only if the bound application has file types listed in the Info.plist entries Document Types
|
||||
* or CFBundleDocumentTypes.
|
||||
*
|
||||
* The ApplicationEvent sent to this handler holds a reference to the file being opened.
|
||||
*
|
||||
* @param event a Print Document event with a reference to the file(s) to be printed
|
||||
* @deprecated use {@link PrintFilesHandler}
|
||||
*/
|
||||
@Deprecated
|
||||
public void handlePrintFile(ApplicationEvent event);
|
||||
|
||||
/**
|
||||
* Called when the application is sent the Quit event. This event is generated when the user selects Quit from the
|
||||
* application menu, when the user types Command-Q, or when the user control clicks on your application icon in the
|
||||
* Dock and chooses Quit. You can either accept or reject the request to quit. You might want to reject the request
|
||||
* to quit if the user has unsaved work. Reject the request, move into your code to save changes, then quit your
|
||||
* application. To accept the request to quit, and terminate the application, set <code>isHandled(true)</code> for the
|
||||
* <code>event</code>. To reject the quit, set <code>isHandled(false)</code>.
|
||||
*
|
||||
* @param event a Quit Application event
|
||||
* @deprecated use {@link QuitHandler} and {@link QuitResponse}
|
||||
*/
|
||||
@Deprecated
|
||||
public void handleQuit(ApplicationEvent event);
|
||||
|
||||
/**
|
||||
* Called when the application receives a Reopen Application event from the Finder or another application. Usually
|
||||
* this will come when a user clicks on your application icon in the Dock. If there is any special code
|
||||
* that needs to run when your user clicks on your application icon in the Dock or when a Reopen Application
|
||||
* event is sent from another application, include that code as part of this handler.
|
||||
*
|
||||
* @param event the Reopen Application event
|
||||
* @deprecated use {@link AppReOpenedListener}
|
||||
*/
|
||||
@Deprecated
|
||||
public void handleReOpenApplication(ApplicationEvent event);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@@ -25,15 +25,13 @@
|
||||
|
||||
package com.apple.eawt;
|
||||
|
||||
import java.awt.Window;
|
||||
|
||||
import com.apple.eawt.event.FullScreenEvent;
|
||||
import com.apple.eawt.AppEvent.FullScreenEvent;
|
||||
|
||||
/**
|
||||
* Abstract adapter class for receiving fullscreen events. This class is provided
|
||||
* as a convenience for creating listeners.
|
||||
*
|
||||
* Subclasses registered with {@link FullScreenUtilities#addFullScreenListenerTo(Window, FullScreenListener)}
|
||||
* Subclasses registered with {@link FullScreenUtilities#addFullScreenListenerTo(javax.swing.RootPaneContainer, FullScreenListener)}
|
||||
* will receive all entering/entered/exiting/exited full screen events.
|
||||
*
|
||||
* @see FullScreenUtilities
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@@ -25,13 +25,13 @@
|
||||
|
||||
package com.apple.eawt;
|
||||
|
||||
import com.apple.eawt.event.FullScreenEvent;
|
||||
import java.awt.*;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.RootPaneContainer;
|
||||
|
||||
import com.apple.eawt.AppEvent.FullScreenEvent;
|
||||
import sun.awt.SunToolkit;
|
||||
|
||||
import java.lang.annotation.Native;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
package com.apple.eawt;
|
||||
|
||||
import com.apple.eawt.event.FullScreenEvent;
|
||||
import java.util.EventListener;
|
||||
|
||||
import com.apple.eawt.AppEvent.FullScreenEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -37,25 +37,25 @@ import java.util.EventListener;
|
||||
public interface FullScreenListener extends EventListener {
|
||||
/**
|
||||
* Invoked when a window has started to enter full screen.
|
||||
* @param e containing the specific window entering full screen.
|
||||
* @param event containing the specific window entering full screen.
|
||||
*/
|
||||
public void windowEnteringFullScreen(final FullScreenEvent e);
|
||||
|
||||
/**
|
||||
* Invoked when a window has fully entered full screen.
|
||||
* @param e containing the specific window which has entered full screen.
|
||||
* @param event containing the specific window which has entered full screen.
|
||||
*/
|
||||
public void windowEnteredFullScreen(final FullScreenEvent e);
|
||||
|
||||
/**
|
||||
* Invoked when a window has started to exit full screen.
|
||||
* @param e containing the specific window exiting full screen.
|
||||
* @param event containing the specific window exiting full screen.
|
||||
*/
|
||||
public void windowExitingFullScreen(final FullScreenEvent e);
|
||||
|
||||
/**
|
||||
* Invoked when a window has fully exited full screen.
|
||||
* @param e containing the specific window which has exited full screen.
|
||||
* @param event containing the specific window which has exited full screen.
|
||||
*/
|
||||
public void windowExitedFullScreen(final FullScreenEvent e);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@@ -25,25 +25,27 @@
|
||||
|
||||
package com.apple.eawt;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.Window;
|
||||
import java.awt.*;
|
||||
|
||||
import javax.swing.RootPaneContainer;
|
||||
|
||||
import sun.lwawt.macosx.*;
|
||||
|
||||
import com.apple.eawt.event.GestureUtilities;
|
||||
import sun.lwawt.macosx.CPlatformWindow;
|
||||
|
||||
/**
|
||||
* Utility class perform animated full screen actions to top-level {@link Window}s.
|
||||
*
|
||||
* This class manages the relationship between {@link Window}s and the {@link FullScreenListener}s
|
||||
* attached to them. It adds additional functionality to AWT Windows, without adding new API to the
|
||||
* This class manages the relationship between {@link Windows}s and the {@link FullScreenListener}s
|
||||
* attached to them. It's design is similar to the Java SE 6u10 {@link com.sun.awt.AWTUtilities}
|
||||
* class which adds additional functionality to AWT Windows, without adding new API to the
|
||||
* {@link java.awt.Window} class.
|
||||
*
|
||||
* Full screen operations can only be performed on top-level {@link Window}s that are also {@link RootPaneContainer}s.
|
||||
*
|
||||
* @see FullScreenAdapter
|
||||
* @see GestureUtilities
|
||||
* @see com.sun.awt.AWTUtilities
|
||||
*
|
||||
* @since Java for Mac OS X 10.7 Update 1
|
||||
*/
|
||||
|
||||
@@ -53,7 +53,7 @@ public class MacQuitResponse implements QuitResponse {
|
||||
*/
|
||||
@Override
|
||||
public void performQuit() {
|
||||
if (appEventHandler.currentQuitResponse != this) return;
|
||||
//if (appEventHandler.currentQuitResponse != this) return;
|
||||
appEventHandler.performQuit();
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class MacQuitResponse implements QuitResponse {
|
||||
*/
|
||||
@Override
|
||||
public void cancelQuit() {
|
||||
if (appEventHandler.currentQuitResponse != this) return;
|
||||
//if (appEventHandler.currentQuitResponse != this) return;
|
||||
appEventHandler.cancelQuit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
import com.apple.eawt.AppEvent.OpenFilesEvent;
|
||||
|
||||
/**
|
||||
* An implementor is notified when the application is asked to open a list of files.
|
||||
* This message is only sent if the application has registered that it handles CFBundleDocumentTypes in it's Info.plist.
|
||||
*
|
||||
* @see Application#setOpenFileHandler(OpenFilesHandler)
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public interface OpenFilesHandler {
|
||||
/**
|
||||
* Called when the application is asked to open a list of files.
|
||||
* @param e the request to open a list of files, and the search term used to find them, if any.
|
||||
*/
|
||||
public void openFiles(final OpenFilesEvent e);
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
import com.apple.eawt.AppEvent.OpenURIEvent;
|
||||
|
||||
/**
|
||||
* An implementor is notified when the application is asked to open a URI.
|
||||
* The application only sends {@link com.apple.eawt.EAWTEvent.OpenURIEvent}s when it has been launched as a bundled Mac application, and it's Info.plist claims URL schemes in it's <code>CFBundleURLTypes</code> entry.
|
||||
* See the <a href="http://developer.apple.com/mac/library/documentation/General/Reference/InfoPlistKeyReference">Info.plist Key Reference</a> for more information about adding a <code>CFBundleURLTypes</code> key to your app's Info.plist.
|
||||
*
|
||||
* @see Application#setOpenURIHandler(OpenURIHandler)
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public interface OpenURIHandler {
|
||||
/**
|
||||
* Called when the application is asked to open a URI
|
||||
* @param e the request to open a URI
|
||||
*/
|
||||
public void openURI(final OpenURIEvent e);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
import com.apple.eawt.AppEvent.PreferencesEvent;
|
||||
|
||||
/**
|
||||
* An implementor is notified when the app is asked to show it's preferences UI.
|
||||
*
|
||||
* @see Application#setPreferencesHandler(PreferencesHandler)
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public interface PreferencesHandler {
|
||||
/**
|
||||
* Called when the app is asked to show it's preferences UI.
|
||||
* @param e the request to show preferences.
|
||||
*/
|
||||
public void handlePreferences(final PreferencesEvent e);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
import com.apple.eawt.AppEvent.PrintFilesEvent;
|
||||
|
||||
/**
|
||||
* An implementor can respond to requests to print documents that the app has been registered to handle.
|
||||
*
|
||||
* @see Application#setPrintFileHandler(PrintFilesHandler)
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public interface PrintFilesHandler {
|
||||
/**
|
||||
* Called when the application is asked to print a list of files.
|
||||
* @param e the request to print a list of files.
|
||||
*/
|
||||
public void printFiles(final PrintFilesEvent e);
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
import com.apple.eawt.AppEvent.QuitEvent;
|
||||
|
||||
/**
|
||||
* An implementor determines if requests to quit this application should proceed or cancel.
|
||||
*
|
||||
* @see Application#setQuitHandler(QuitHandler)
|
||||
* @see Application#setQuitStrategy(QuitStrategy)
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public interface QuitHandler {
|
||||
/**
|
||||
* Invoked when the application is asked to quit.
|
||||
*
|
||||
* Implementors must call either {@link QuitResponse#cancelQuit()}, {@link QuitResponse#performQuit()}, or ensure the application terminates.
|
||||
* The process (or log-out) requesting this app to quit will be blocked until the {@link QuitResponse} is handled.
|
||||
* Apps that require complex UI to shutdown may call the {@link QuitResponse} from any thread.
|
||||
* Your app may be asked to quit multiple times before you have responded to the initial request.
|
||||
* This handler is called each time a quit is requested, and the same {@link QuitResponse} object is passed until it is handled.
|
||||
* Once used, the {@link QuitResponse} cannot be used again to change the decision.
|
||||
*
|
||||
* @param e the request to quit this application.
|
||||
* @param response the one-shot response object used to cancel or proceed with the quit action.
|
||||
*/
|
||||
public void handleQuitRequestWith(final QuitEvent e, final QuitResponse response);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
/**
|
||||
* Used to respond to a request to quit the application.
|
||||
* The QuitResponse may be used after the {@link QuitHandler#handleQuitRequestWith(AppEvent.QuitEvent, QuitResponse)} method has returned, and may be used from any thread.
|
||||
*
|
||||
* @see Application#setQuitHandler(QuitHandler)
|
||||
* @see QuitHandler
|
||||
* @see Application#setQuitStrategy(QuitStrategy)
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public class QuitResponse {
|
||||
final _AppEventHandler appEventHandler;
|
||||
|
||||
QuitResponse(final _AppEventHandler appEventHandler) {
|
||||
this.appEventHandler = appEventHandler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Notifies the external quit requester that the quit will proceed, and performs the default {@link QuitStrategy}.
|
||||
*/
|
||||
public void performQuit() {
|
||||
if (appEventHandler.currentQuitResponse != this) return;
|
||||
appEventHandler.performQuit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Notifies the external quit requester that the user has explicitly canceled the pending quit, and leaves the application running.
|
||||
* <b>Note: this will cancel a pending log-out, restart, or shutdown.</b>
|
||||
*/
|
||||
public void cancelQuit() {
|
||||
if (appEventHandler.currentQuitResponse != this) return;
|
||||
appEventHandler.cancelQuit();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
/**
|
||||
* The strategy use to shut down the application, if Sudden Termination is not enabled.
|
||||
*
|
||||
* @see Application#setQuitHandler(QuitHandler)
|
||||
* @see Application#setQuitStrategy(QuitStrategy)
|
||||
* @see Application#enableSuddenTermination()
|
||||
* @see Application#disableSuddenTermination()
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public enum QuitStrategy {
|
||||
/**
|
||||
* Shuts down the application by calling <code>System.exit(0)</code>. This is the default strategy.
|
||||
*/
|
||||
SYSTEM_EXIT_0,
|
||||
|
||||
/**
|
||||
* Shuts down the application by closing each window from back-to-front.
|
||||
*/
|
||||
CLOSE_ALL_WINDOWS
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
import com.apple.eawt.AppEvent.ScreenSleepEvent;
|
||||
|
||||
/**
|
||||
* Implementors receive notification when the displays attached to the system have entered power save sleep.
|
||||
*
|
||||
* This notification is useful for discontinuing a costly animation, or indicating that the user is no longer present on a network service.
|
||||
*
|
||||
* This message is not sent on Mac OS X versions prior to 10.6.
|
||||
*
|
||||
* @see Application#addAppEventListener(AppEventListener)
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public interface ScreenSleepListener extends AppEventListener {
|
||||
/**
|
||||
* Called when the system displays have entered power save sleep.
|
||||
* @param e the screen sleep event
|
||||
*/
|
||||
public void screenAboutToSleep(final ScreenSleepEvent e);
|
||||
|
||||
/**
|
||||
* Called when the system displays have awoke from power save sleep.
|
||||
* @param e the screen sleep event
|
||||
*/
|
||||
public void screenAwoke(final ScreenSleepEvent e);
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
import com.apple.eawt.AppEvent.SystemSleepEvent;
|
||||
|
||||
/**
|
||||
* Implementors receive notification as the system is entering sleep, and after the system wakes.
|
||||
*
|
||||
* This notification is useful for disconnecting from network services prior to sleep, or re-establishing a connection if the network configuration has changed during sleep.
|
||||
*
|
||||
* @see Application#addAppEventListener(AppEventListener)
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public interface SystemSleepListener extends AppEventListener {
|
||||
/**
|
||||
* Called when the system is about to sleep.
|
||||
* Note: This message may not be delivered prior to the actual system sleep, and may be processed after the corresponding wake has occurred.
|
||||
* @param e the system sleep event
|
||||
*/
|
||||
public void systemAboutToSleep(final SystemSleepEvent e);
|
||||
|
||||
/**
|
||||
* Called after the system has awoke from sleeping.
|
||||
* @param e the system sleep event
|
||||
*/
|
||||
public void systemAwoke(final SystemSleepEvent e);
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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 com.apple.eawt;
|
||||
|
||||
import com.apple.eawt.AppEvent.UserSessionEvent;
|
||||
|
||||
/**
|
||||
* Implementors receive notification when Fast User Switching changes the user session.
|
||||
*
|
||||
* This notification is useful for discontinuing a costly animation, or indicating that the user is no longer present on a network service.
|
||||
*
|
||||
* @see Application#addAppEventListener(AppEventListener)
|
||||
*
|
||||
* @since Java for Mac OS X 10.6 Update 3
|
||||
* @since Java for Mac OS X 10.5 Update 8
|
||||
*/
|
||||
public interface UserSessionListener extends AppEventListener {
|
||||
/**
|
||||
* Called when the user session has been switched away.
|
||||
* @param e the user session switch event
|
||||
*/
|
||||
public void userSessionDeactivated(final UserSessionEvent e);
|
||||
|
||||
/**
|
||||
* Called when the user session has been switched to.
|
||||
* @param e the user session switch event
|
||||
*/
|
||||
public void userSessionActivated(final UserSessionEvent e);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@@ -28,14 +28,13 @@ package com.apple.eawt;
|
||||
import java.awt.*;
|
||||
import java.lang.reflect.*;
|
||||
|
||||
import sun.awt.AWTAccessor;
|
||||
import sun.lwawt.macosx.*;
|
||||
import sun.lwawt.macosx.CImage.Creator;
|
||||
import sun.awt.AWTAccessor;
|
||||
|
||||
class _AppDockIconHandler {
|
||||
private static native void nativeSetDockMenu(final long cmenu);
|
||||
private static native void nativeSetDockIconImage(final long image);
|
||||
private static native void nativeSetDockIconProgress(final int value);
|
||||
private static native long nativeGetDockIconImage();
|
||||
private static native void nativeSetDockIconBadge(final String badge);
|
||||
|
||||
@@ -43,6 +42,7 @@ class _AppDockIconHandler {
|
||||
|
||||
_AppDockIconHandler() { }
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setDockMenu(final PopupMenu menu) {
|
||||
fDockMenu = menu;
|
||||
|
||||
@@ -72,8 +72,9 @@ class _AppDockIconHandler {
|
||||
|
||||
public void setDockIconImage(final Image image) {
|
||||
try {
|
||||
final CImage cImage = CImage.createFromImage(image);
|
||||
cImage.execute(_AppDockIconHandler::nativeSetDockIconImage);
|
||||
final CImage cImage = getCImageCreator().createFromImage(image);
|
||||
final long nsImagePtr = getNSImagePtrFrom(cImage);
|
||||
nativeSetDockIconImage(nsImagePtr);
|
||||
} catch (final Throwable e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -83,11 +84,7 @@ class _AppDockIconHandler {
|
||||
try {
|
||||
final long dockNSImage = nativeGetDockIconImage();
|
||||
if (dockNSImage == 0) return null;
|
||||
final Method getCreatorMethod = CImage.class.getDeclaredMethod(
|
||||
"getCreator", new Class<?>[]{});
|
||||
getCreatorMethod.setAccessible(true);
|
||||
Creator imageCreator = (Creator) getCreatorMethod.invoke(null, new Object[]{});
|
||||
return imageCreator.createImageUsingNativeSize(dockNSImage);
|
||||
return getCImageCreator().createImageUsingNativeSize(dockNSImage);
|
||||
} catch (final Throwable e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -97,7 +94,26 @@ class _AppDockIconHandler {
|
||||
nativeSetDockIconBadge(badge);
|
||||
}
|
||||
|
||||
void setDockIconProgress(int value) {
|
||||
nativeSetDockIconProgress(value);
|
||||
@SuppressWarnings("rawtypes")
|
||||
static Creator getCImageCreator() {
|
||||
try {
|
||||
final Method getCreatorMethod = CImage.class.getDeclaredMethod("getCreator", new Class[] {});
|
||||
getCreatorMethod.setAccessible(true);
|
||||
return (Creator)getCreatorMethod.invoke(null, new Object[] {});
|
||||
} catch (final Throwable e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
static long getNSImagePtrFrom(final CImage cImage) {
|
||||
if (cImage == null) return 0;
|
||||
|
||||
try {
|
||||
final Field cImagePtrField = CFRetainedResource.class.getDeclaredField("ptr");
|
||||
cImagePtrField.setAccessible(true);
|
||||
return cImagePtrField.getLong(cImage);
|
||||
} catch (final Throwable e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@@ -25,47 +25,17 @@
|
||||
|
||||
package com.apple.eawt;
|
||||
|
||||
import java.awt.EventQueue;
|
||||
import java.awt.Frame;
|
||||
import java.awt.desktop.AboutEvent;
|
||||
import java.awt.desktop.AboutHandler;
|
||||
import java.awt.desktop.AppForegroundEvent;
|
||||
import java.awt.desktop.AppForegroundListener;
|
||||
import java.awt.desktop.AppHiddenEvent;
|
||||
import java.awt.desktop.AppHiddenListener;
|
||||
import java.awt.desktop.AppReopenedEvent;
|
||||
import java.awt.desktop.AppReopenedListener;
|
||||
import java.awt.desktop.OpenFilesEvent;
|
||||
import java.awt.desktop.OpenFilesHandler;
|
||||
import java.awt.desktop.OpenURIEvent;
|
||||
import java.awt.desktop.OpenURIHandler;
|
||||
import java.awt.desktop.PreferencesEvent;
|
||||
import java.awt.desktop.PreferencesHandler;
|
||||
import java.awt.desktop.PrintFilesEvent;
|
||||
import java.awt.desktop.PrintFilesHandler;
|
||||
import java.awt.desktop.QuitEvent;
|
||||
import java.awt.desktop.QuitHandler;
|
||||
import java.awt.desktop.QuitStrategy;
|
||||
import java.awt.desktop.ScreenSleepEvent;
|
||||
import java.awt.desktop.ScreenSleepListener;
|
||||
import java.awt.desktop.SystemEventListener;
|
||||
import java.awt.desktop.SystemSleepEvent;
|
||||
import java.awt.desktop.SystemSleepListener;
|
||||
import java.awt.desktop.UserSessionEvent;
|
||||
import java.awt.desktop.UserSessionEvent.Reason;
|
||||
import java.awt.desktop.UserSessionListener;
|
||||
import java.awt.*;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.IdentityHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.net.*;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import sun.awt.AppContext;
|
||||
import sun.awt.SunToolkit;
|
||||
|
||||
import com.apple.eawt.AppEvent.*;
|
||||
|
||||
class _AppEventHandler {
|
||||
private static final int NOTIFY_ABOUT = 1;
|
||||
private static final int NOTIFY_PREFS = 2;
|
||||
@@ -92,7 +62,7 @@ class _AppEventHandler {
|
||||
private static native void nativeReplyToAppShouldTerminate(final boolean shouldTerminate);
|
||||
private static native void nativeRegisterForNotification(final int notification);
|
||||
|
||||
static final _AppEventHandler instance = new _AppEventHandler();
|
||||
final static _AppEventHandler instance = new _AppEventHandler();
|
||||
static _AppEventHandler getInstance() {
|
||||
return instance;
|
||||
}
|
||||
@@ -114,7 +84,9 @@ class _AppEventHandler {
|
||||
final _ScreenSleepDispatcher screenSleepDispatcher = new _ScreenSleepDispatcher();
|
||||
final _SystemSleepDispatcher systemSleepDispatcher = new _SystemSleepDispatcher();
|
||||
|
||||
QuitStrategy defaultQuitAction = QuitStrategy.NORMAL_EXIT;
|
||||
final _AppEventLegacyHandler legacyHandler = new _AppEventLegacyHandler(this);
|
||||
|
||||
QuitStrategy defaultQuitAction = QuitStrategy.SYSTEM_EXIT_0;
|
||||
|
||||
_AppEventHandler() {
|
||||
final String strategyProp = System.getProperty("apple.eawt.quitStrategy");
|
||||
@@ -122,16 +94,15 @@ class _AppEventHandler {
|
||||
|
||||
if ("CLOSE_ALL_WINDOWS".equals(strategyProp)) {
|
||||
setDefaultQuitStrategy(QuitStrategy.CLOSE_ALL_WINDOWS);
|
||||
} else if ("SYSTEM_EXIT_O".equals(strategyProp)
|
||||
|| "NORMAL_EXIT".equals(strategyProp)) {
|
||||
setDefaultQuitStrategy(QuitStrategy.NORMAL_EXIT);
|
||||
} else if ("SYSTEM_EXIT_O".equals(strategyProp)) {
|
||||
setDefaultQuitStrategy(QuitStrategy.SYSTEM_EXIT_0);
|
||||
} else {
|
||||
System.err.println("unrecognized apple.eawt.quitStrategy: " + strategyProp);
|
||||
}
|
||||
}
|
||||
|
||||
void addListener(final SystemEventListener listener) {
|
||||
if (listener instanceof AppReopenedListener) reOpenAppDispatcher.addListener((AppReopenedListener)listener);
|
||||
void addListener(final AppEventListener listener) {
|
||||
if (listener instanceof AppReOpenedListener) reOpenAppDispatcher.addListener((AppReOpenedListener)listener);
|
||||
if (listener instanceof AppForegroundListener) foregroundAppDispatcher.addListener((AppForegroundListener)listener);
|
||||
if (listener instanceof AppHiddenListener) hiddenAppDispatcher.addListener((AppHiddenListener)listener);
|
||||
if (listener instanceof UserSessionListener) userSessionDispatcher.addListener((UserSessionListener)listener);
|
||||
@@ -139,8 +110,8 @@ class _AppEventHandler {
|
||||
if (listener instanceof SystemSleepListener) systemSleepDispatcher.addListener((SystemSleepListener)listener);
|
||||
}
|
||||
|
||||
void removeListener(final SystemEventListener listener) {
|
||||
if (listener instanceof AppReopenedListener) reOpenAppDispatcher.removeListener((AppReopenedListener)listener);
|
||||
void removeListener(final AppEventListener listener) {
|
||||
if (listener instanceof AppReOpenedListener) reOpenAppDispatcher.removeListener((AppReOpenedListener)listener);
|
||||
if (listener instanceof AppForegroundListener) foregroundAppDispatcher.removeListener((AppForegroundListener)listener);
|
||||
if (listener instanceof AppHiddenListener) hiddenAppDispatcher.removeListener((AppHiddenListener)listener);
|
||||
if (listener instanceof UserSessionListener) userSessionDispatcher.removeListener((UserSessionListener)listener);
|
||||
@@ -156,10 +127,10 @@ class _AppEventHandler {
|
||||
this.defaultQuitAction = defaultQuitAction;
|
||||
}
|
||||
|
||||
MacQuitResponse currentQuitResponse;
|
||||
synchronized MacQuitResponse obtainQuitResponse() {
|
||||
QuitResponse currentQuitResponse;
|
||||
synchronized QuitResponse obtainQuitResponse() {
|
||||
if (currentQuitResponse != null) return currentQuitResponse;
|
||||
return currentQuitResponse = new MacQuitResponse(this);
|
||||
return currentQuitResponse = new QuitResponse(this);
|
||||
}
|
||||
|
||||
synchronized void cancelQuit() {
|
||||
@@ -171,8 +142,7 @@ class _AppEventHandler {
|
||||
currentQuitResponse = null;
|
||||
|
||||
try {
|
||||
if (defaultQuitAction == QuitStrategy.NORMAL_EXIT
|
||||
|| _AppMiscHandlers.isSuddenTerminationEnbaled()) System.exit(0);
|
||||
if (defaultQuitAction == QuitStrategy.SYSTEM_EXIT_0) System.exit(0);
|
||||
|
||||
if (defaultQuitAction != QuitStrategy.CLOSE_ALL_WINDOWS) {
|
||||
throw new RuntimeException("Unknown quit action");
|
||||
@@ -300,10 +270,10 @@ class _AppEventHandler {
|
||||
}
|
||||
}
|
||||
|
||||
class _AppReOpenedDispatcher extends _AppEventMultiplexor<AppReopenedListener> {
|
||||
void performOnListener(AppReopenedListener listener, final _NativeEvent event) {
|
||||
final AppReopenedEvent e = new AppReopenedEvent();
|
||||
listener.appReopened(e);
|
||||
class _AppReOpenedDispatcher extends _AppEventMultiplexor<AppReOpenedListener> {
|
||||
void performOnListener(AppReOpenedListener listener, final _NativeEvent event) {
|
||||
final AppReOpenedEvent e = new AppReOpenedEvent();
|
||||
listener.appReOpened(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,9 +302,7 @@ class _AppEventHandler {
|
||||
}
|
||||
|
||||
class _UserSessionDispatcher extends _BooleanAppEventMultiplexor<UserSessionListener, UserSessionEvent> {
|
||||
UserSessionEvent createEvent(final boolean isTrue) {
|
||||
return new UserSessionEvent(Reason.UNSPECIFIED);
|
||||
}
|
||||
UserSessionEvent createEvent(final boolean isTrue) { return new UserSessionEvent(); }
|
||||
|
||||
void performFalseEventOn(final UserSessionListener listener, final UserSessionEvent e) {
|
||||
listener.userSessionDeactivated(e);
|
||||
@@ -423,11 +391,7 @@ class _AppEventHandler {
|
||||
}
|
||||
|
||||
void performUsing(final QuitHandler handler, final _NativeEvent event) {
|
||||
if (_AppMiscHandlers.isSuddenTerminationEnbaled()) {
|
||||
performDefaultAction(event);
|
||||
return;
|
||||
}
|
||||
final MacQuitResponse response = obtainQuitResponse(); // obtains the "current" quit response
|
||||
final QuitResponse response = obtainQuitResponse(); // obtains the "current" quit response
|
||||
handler.handleQuitRequestWith(new QuitEvent(), response);
|
||||
}
|
||||
}
|
||||
@@ -560,6 +524,9 @@ class _AppEventHandler {
|
||||
|
||||
setHandlerContext(AppContext.getAppContext());
|
||||
|
||||
// if a new handler is installed, block addition of legacy ApplicationListeners
|
||||
if (handler == legacyHandler) return;
|
||||
legacyHandler.blockLegacyAPI();
|
||||
}
|
||||
|
||||
void performDefaultAction(final _NativeEvent event) { } // by default, do nothing
|
||||
@@ -607,6 +574,10 @@ class _AppEventHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if a new handler is installed, block addition of legacy ApplicationListeners
|
||||
if (handler == legacyHandler) return;
|
||||
legacyHandler.blockLegacyAPI();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.apple.eawt;
|
||||
|
||||
import java.awt.Toolkit;
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
|
||||
import com.apple.eawt.AppEvent.*;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
class _AppEventLegacyHandler implements AboutHandler, PreferencesHandler, _OpenAppHandler, AppReOpenedListener, OpenFilesHandler, PrintFilesHandler, QuitHandler {
|
||||
final _AppEventHandler parent;
|
||||
final Vector<ApplicationListener> legacyAppListeners = new Vector<ApplicationListener>();
|
||||
boolean blockLegacyAPI;
|
||||
boolean initializedParentDispatchers;
|
||||
|
||||
_AppEventLegacyHandler(final _AppEventHandler parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
void blockLegacyAPI() {
|
||||
blockLegacyAPI = true;
|
||||
}
|
||||
|
||||
void checkIfLegacyAPIBlocked() {
|
||||
if (!blockLegacyAPI) return;
|
||||
throw new IllegalStateException("Cannot add com.apple.eawt.ApplicationListener after installing an app event handler");
|
||||
}
|
||||
|
||||
void addLegacyAppListener(final ApplicationListener listener) {
|
||||
checkIfLegacyAPIBlocked();
|
||||
|
||||
if (!initializedParentDispatchers) {
|
||||
final _AppMenuBarHandler menuBarHandler = Application.getApplication().menuBarHandler;
|
||||
final boolean prefsMenuAlreadyExplicitlySet = menuBarHandler.prefsMenuItemExplicitlySet;
|
||||
|
||||
parent.aboutDispatcher.setHandler(this);
|
||||
parent.preferencesDispatcher.setHandler(this);
|
||||
if (!prefsMenuAlreadyExplicitlySet) {
|
||||
menuBarHandler.setPreferencesMenuItemVisible(false); // default behavior is not to have a preferences item
|
||||
}
|
||||
parent.openAppDispatcher.setHandler(this);
|
||||
parent.reOpenAppDispatcher.addListener(this);
|
||||
parent.openFilesDispatcher.setHandler(this);
|
||||
parent.printFilesDispatcher.setHandler(this);
|
||||
parent.quitDispatcher.setHandler(this);
|
||||
|
||||
initializedParentDispatchers = true;
|
||||
}
|
||||
|
||||
synchronized (legacyAppListeners) {
|
||||
legacyAppListeners.addElement(listener);
|
||||
}
|
||||
}
|
||||
|
||||
public void removeLegacyAppListener(final ApplicationListener listener) {
|
||||
checkIfLegacyAPIBlocked();
|
||||
|
||||
synchronized (legacyAppListeners) {
|
||||
legacyAppListeners.removeElement(listener);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleAbout(final AboutEvent e) {
|
||||
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit());
|
||||
sendEventToEachListenerUntilHandled(ae, new EventDispatcher() {
|
||||
public void dispatchEvent(final ApplicationListener listener) {
|
||||
listener.handleAbout(ae);
|
||||
}
|
||||
});
|
||||
|
||||
if (ae.isHandled()) return;
|
||||
parent.openCocoaAboutWindow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlePreferences(final PreferencesEvent e) {
|
||||
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit());
|
||||
sendEventToEachListenerUntilHandled(ae, new EventDispatcher() {
|
||||
public void dispatchEvent(final ApplicationListener listener) {
|
||||
listener.handlePreferences(ae);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleOpenApp() {
|
||||
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit());
|
||||
sendEventToEachListenerUntilHandled(ae, new EventDispatcher() {
|
||||
public void dispatchEvent(final ApplicationListener listener) {
|
||||
listener.handleOpenApplication(ae);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appReOpened(final AppReOpenedEvent e) {
|
||||
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit());
|
||||
sendEventToEachListenerUntilHandled(ae, new EventDispatcher() {
|
||||
public void dispatchEvent(final ApplicationListener listener) {
|
||||
listener.handleReOpenApplication(ae);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openFiles(final OpenFilesEvent e) {
|
||||
final List<File> files = e.getFiles();
|
||||
for (final File file : files) { // legacy ApplicationListeners only understood one file at a time
|
||||
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit(), file.getAbsolutePath());
|
||||
sendEventToEachListenerUntilHandled(ae, new EventDispatcher() {
|
||||
public void dispatchEvent(final ApplicationListener listener) {
|
||||
listener.handleOpenFile(ae);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printFiles(PrintFilesEvent e) {
|
||||
final List<File> files = e.getFiles();
|
||||
for (final File file : files) { // legacy ApplicationListeners only understood one file at a time
|
||||
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit(), file.getAbsolutePath());
|
||||
sendEventToEachListenerUntilHandled(ae, new EventDispatcher() {
|
||||
public void dispatchEvent(final ApplicationListener listener) {
|
||||
listener.handlePrintFile(ae);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleQuitRequestWith(final QuitEvent e, final QuitResponse response) {
|
||||
final ApplicationEvent ae = new ApplicationEvent(Toolkit.getDefaultToolkit());
|
||||
sendEventToEachListenerUntilHandled(ae, new EventDispatcher() {
|
||||
public void dispatchEvent(final ApplicationListener listener) {
|
||||
listener.handleQuit(ae);
|
||||
}
|
||||
});
|
||||
|
||||
if (ae.isHandled()) {
|
||||
parent.performQuit();
|
||||
} else {
|
||||
parent.cancelQuit();
|
||||
}
|
||||
}
|
||||
|
||||
interface EventDispatcher {
|
||||
void dispatchEvent(final ApplicationListener listener);
|
||||
}
|
||||
|
||||
// helper that cycles through the loop and aborts if the event is handled, or there are no listeners
|
||||
void sendEventToEachListenerUntilHandled(final ApplicationEvent event, final EventDispatcher dispatcher) {
|
||||
synchronized (legacyAppListeners) {
|
||||
if (legacyAppListeners.size() == 0) return;
|
||||
|
||||
final Enumeration<ApplicationListener> e = legacyAppListeners.elements();
|
||||
while (e.hasMoreElements() && !event.isHandled()) {
|
||||
dispatcher.dispatchEvent(e.nextElement());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@@ -25,20 +25,17 @@
|
||||
|
||||
package com.apple.eawt;
|
||||
|
||||
import java.awt.Container;
|
||||
import java.awt.Frame;
|
||||
import java.awt.peer.MenuComponentPeer;
|
||||
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLayeredPane;
|
||||
import javax.swing.JMenuBar;
|
||||
import javax.swing.*;
|
||||
import javax.swing.plaf.MenuBarUI;
|
||||
|
||||
import com.apple.laf.ScreenMenuBar;
|
||||
import sun.awt.AWTAccessor;
|
||||
import sun.lwawt.macosx.CMenuBar;
|
||||
|
||||
import com.apple.laf.AquaMenuBarUI;
|
||||
import sun.awt.AWTAccessor;
|
||||
|
||||
class _AppMenuBarHandler {
|
||||
private static final int MENU_ABOUT = 1;
|
||||
@@ -52,13 +49,8 @@ class _AppMenuBarHandler {
|
||||
return instance;
|
||||
}
|
||||
|
||||
private static ScreenMenuBar defaultMenuBar;
|
||||
|
||||
// callback from the native delegate -init function
|
||||
private static void initMenuStates(final boolean aboutMenuItemVisible,
|
||||
final boolean aboutMenuItemEnabled,
|
||||
final boolean prefsMenuItemVisible,
|
||||
final boolean prefsMenuItemEnabled) {
|
||||
private static void initMenuStates(final boolean aboutMenuItemVisible, final boolean aboutMenuItemEnabled, final boolean prefsMenuItemVisible, final boolean prefsMenuItemEnabled) {
|
||||
synchronized (instance) {
|
||||
instance.aboutMenuItemVisible = aboutMenuItemVisible;
|
||||
instance.aboutMenuItemEnabled = aboutMenuItemEnabled;
|
||||
@@ -78,9 +70,6 @@ class _AppMenuBarHandler {
|
||||
|
||||
void setDefaultMenuBar(final JMenuBar menuBar) {
|
||||
installDefaultMenuBar(menuBar);
|
||||
if (menuBar == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// scan the current frames, and see if any are foreground
|
||||
final Frame[] frames = Frame.getFrames();
|
||||
@@ -104,27 +93,18 @@ class _AppMenuBarHandler {
|
||||
return (frame.getExtendedState() & Frame.ICONIFIED) != 0;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
static void installDefaultMenuBar(final JMenuBar menuBar) {
|
||||
|
||||
if (menuBar == null) {
|
||||
// intentionally clearing the default menu
|
||||
if (defaultMenuBar != null) {
|
||||
defaultMenuBar.removeNotify();
|
||||
defaultMenuBar = null;
|
||||
}
|
||||
nativeSetDefaultMenuBar(0);
|
||||
return;
|
||||
}
|
||||
|
||||
Container parent = menuBar.getParent();
|
||||
if (parent instanceof JLayeredPane) {
|
||||
((JLayeredPane) parent).remove(menuBar);
|
||||
}
|
||||
|
||||
MenuBarUI ui = menuBar.getUI();
|
||||
final MenuBarUI ui = menuBar.getUI();
|
||||
if (!(ui instanceof AquaMenuBarUI)) {
|
||||
ui = new AquaMenuBarUI();
|
||||
menuBar.setUI(ui);
|
||||
// Aqua was not installed
|
||||
throw new IllegalStateException("Application.setDefaultMenuBar() only works with the Aqua Look and Feel");
|
||||
}
|
||||
|
||||
final AquaMenuBarUI aquaUI = (AquaMenuBarUI)ui;
|
||||
@@ -134,14 +114,7 @@ class _AppMenuBarHandler {
|
||||
throw new IllegalStateException("Application.setDefaultMenuBar() only works if apple.laf.useScreenMenuBar=true");
|
||||
}
|
||||
|
||||
if (screenMenuBar != defaultMenuBar) {
|
||||
if (defaultMenuBar != null) {
|
||||
defaultMenuBar.removeNotify();
|
||||
}
|
||||
defaultMenuBar = screenMenuBar;
|
||||
screenMenuBar.addNotify();
|
||||
}
|
||||
|
||||
screenMenuBar.addNotify();
|
||||
final Object peer = AWTAccessor.getMenuComponentAccessor().getPeer(screenMenuBar);
|
||||
if (!(peer instanceof CMenuBar)) {
|
||||
// such a thing should not be possible
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
package com.apple.eawt;
|
||||
|
||||
class _AppMiscHandlers {
|
||||
private static boolean isSuddenTerminationEnabled;
|
||||
|
||||
private static native void nativeOpenHelpViewer();
|
||||
|
||||
private static native void nativeRequestActivation(final boolean allWindows);
|
||||
@@ -49,16 +47,10 @@ class _AppMiscHandlers {
|
||||
}
|
||||
|
||||
static void enableSuddenTermination() {
|
||||
isSuddenTerminationEnabled = true;
|
||||
nativeEnableSuddenTermination();
|
||||
}
|
||||
|
||||
static void disableSuddenTermination() {
|
||||
isSuddenTerminationEnabled = false;
|
||||
nativeDisableSuddenTermination();
|
||||
}
|
||||
|
||||
public static boolean isSuddenTerminationEnbaled() {
|
||||
return isSuddenTerminationEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,4 +27,4 @@ package com.apple.eawt;
|
||||
|
||||
interface _OpenAppHandler {
|
||||
void handleOpenApp();
|
||||
}
|
||||
}
|
||||