mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-16 21:35:25 +00:00
Merge
This commit is contained in:
commit
2ef954a0ff
@ -130,11 +130,13 @@ $(CLASSDESTDIR)/%_Stub.class: $(CLASSDESTDIR)/%.class
|
||||
$(RMIC) -classpath "$(CLASSDESTDIR)" \
|
||||
-d $(CLASSDESTDIR) \
|
||||
-iiop -v1.2 \
|
||||
-emitPermissionCheck \
|
||||
$(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%))
|
||||
$(RMIC) $(HOTSPOT_INTERPRETER_FLAG) -classpath "$(CLASSDESTDIR)" \
|
||||
-d $(CLASSDESTDIR) \
|
||||
-iiop -v1.2 \
|
||||
-standardPackage \
|
||||
-emitPermissionCheck \
|
||||
$(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%))
|
||||
@$(java-vm-cleanup)
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@ SUNWprivate_1.1 {
|
||||
Java_sun_management_GcInfoBuilder_fillGcAttributeInfo;
|
||||
Java_sun_management_GcInfoBuilder_getLastGcInfo0;
|
||||
Java_sun_management_GcInfoBuilder_getNumGcExtAttributes;
|
||||
Java_sun_management_HotSpotDiagnostic_dumpHeap;
|
||||
Java_sun_management_HotSpotDiagnostic_dumpHeap0;
|
||||
Java_sun_management_HotspotThread_getInternalThreadCount;
|
||||
Java_sun_management_HotspotThread_getInternalThreadTimes0;
|
||||
Java_sun_management_MemoryImpl_getMemoryManagers0;
|
||||
|
||||
@ -145,8 +145,6 @@ ifeq ($(PLATFORM), macosx)
|
||||
#
|
||||
# Files
|
||||
#
|
||||
include FILES_c_macosx.gmk
|
||||
include FILES_export_macosx.gmk
|
||||
|
||||
FILES_objc = $(FILES_AWT_objc)
|
||||
OTHER_LDLIBS = -lmlib_image $(JVMLIB) $(LIBM) \
|
||||
|
||||
@ -21,4 +21,4 @@
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
tzdata2013d
|
||||
tzdata2013g
|
||||
|
||||
@ -881,13 +881,23 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou
|
||||
# transitions would be 2013-07-07 and 2013-08-10; see:
|
||||
# http://www.maroc.ma/en/news/morocco-suspends-daylight-saving-time-july-7-aug10
|
||||
|
||||
# From Paul Eggert (2013-07-03):
|
||||
# From Steffen Thorsen (2013-09-28):
|
||||
# Morocco extends DST by one month, on very short notice, just 1 day
|
||||
# before it was going to end. There is a new decree (2.13.781) for
|
||||
# this, where DST from now on goes from last Sunday of March at 02:00
|
||||
# to last Sunday of October at 03:00, similar to EU rules. Official
|
||||
# source (French):
|
||||
# http://www.maroc.gov.ma/fr/actualites/lhoraire-dete-gmt1-maintenu-jusquau-27-octobre-2013
|
||||
# Another source (specifying the time for start and end in the decree):
|
||||
# http://www.lemag.ma/Heure-d-ete-au-Maroc-jusqu-au-27-octobre_a75620.html
|
||||
|
||||
# From Paul Eggert (2013-09-30):
|
||||
# To estimate what the Moroccan government will do in future years,
|
||||
# transition dates for 2014 through 2021 were determined by running
|
||||
# transition dates for 2014 through 2037 were determined by running
|
||||
# the following program under GNU Emacs 24.3:
|
||||
#
|
||||
# (let ((islamic-year 1435))
|
||||
# (while (< islamic-year 1444)
|
||||
# (while (< islamic-year 1460)
|
||||
# (let ((a
|
||||
# (calendar-gregorian-from-absolute
|
||||
# (calendar-islamic-to-absolute (list 9 1 islamic-year))))
|
||||
@ -902,13 +912,14 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou
|
||||
# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b)))))
|
||||
# (setq islamic-year (+ 1 islamic-year))))
|
||||
#
|
||||
# with the results hand-edited for 2020-2022, when the normal spring-forward
|
||||
# date falls during the estimated Ramadan.
|
||||
#
|
||||
# From 2023 through 2038 Ramadan is not predicted to overlap with
|
||||
# daylight saving time. Starting in 2039 there will be overlap again,
|
||||
# with spring-forward transitions removed for 2023-2025, when the
|
||||
# normal spring-forward date falls during the estimated Ramadan; with
|
||||
# all transitions removed for 2026-2035, where the estimated Ramadan
|
||||
# falls entirely outside daylight-saving time; and with fall-back
|
||||
# transitions removed for 2036-2037, where the normal fall-back
|
||||
# date falls during the estimated Ramadan. Problems continue after that,
|
||||
# but 32-bit time_t values roll around in 2038 so for now do not worry
|
||||
# about dates after 2038.
|
||||
# about dates after 2037.
|
||||
|
||||
# RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
|
||||
@ -935,12 +946,14 @@ Rule Morocco 2010 only - May 2 0:00 1:00 S
|
||||
Rule Morocco 2010 only - Aug 8 0:00 0 -
|
||||
Rule Morocco 2011 only - Apr 3 0:00 1:00 S
|
||||
Rule Morocco 2011 only - Jul 31 0 0 -
|
||||
Rule Morocco 2012 2019 - Apr lastSun 2:00 1:00 S
|
||||
Rule Morocco 2012 max - Sep lastSun 3:00 0 -
|
||||
Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S
|
||||
Rule Morocco 2012 only - Sep 30 3:00 0 -
|
||||
Rule Morocco 2012 only - Jul 20 3:00 0 -
|
||||
Rule Morocco 2012 only - Aug 20 2:00 1:00 S
|
||||
Rule Morocco 2013 only - Jul 7 3:00 0 -
|
||||
Rule Morocco 2013 only - Aug 10 2:00 1:00 S
|
||||
Rule Morocco 2013 2035 - Oct lastSun 3:00 0 -
|
||||
Rule Morocco 2014 2022 - Mar lastSun 2:00 1:00 S
|
||||
Rule Morocco 2014 only - Jun 29 3:00 0 -
|
||||
Rule Morocco 2014 only - Jul 29 2:00 1:00 S
|
||||
Rule Morocco 2015 only - Jun 18 3:00 0 -
|
||||
@ -953,10 +966,21 @@ Rule Morocco 2018 only - May 16 3:00 0 -
|
||||
Rule Morocco 2018 only - Jun 15 2:00 1:00 S
|
||||
Rule Morocco 2019 only - May 6 3:00 0 -
|
||||
Rule Morocco 2019 only - Jun 5 2:00 1:00 S
|
||||
Rule Morocco 2020 only - Apr 24 3:00 0 -
|
||||
Rule Morocco 2020 only - May 24 2:00 1:00 S
|
||||
Rule Morocco 2021 only - Apr 13 3:00 0 -
|
||||
Rule Morocco 2021 only - May 13 2:00 1:00 S
|
||||
Rule Morocco 2022 only - Apr 3 3:00 0 -
|
||||
Rule Morocco 2022 only - May 3 2:00 1:00 S
|
||||
Rule Morocco 2023 max - Apr lastSun 2:00 1:00 S
|
||||
Rule Morocco 2023 only - Apr 22 2:00 1:00 S
|
||||
Rule Morocco 2024 only - Apr 10 2:00 1:00 S
|
||||
Rule Morocco 2025 only - Mar 31 2:00 1:00 S
|
||||
Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S
|
||||
Rule Morocco 2036 only - Oct 21 3:00 0 -
|
||||
Rule Morocco 2037 only - Oct 11 3:00 0 -
|
||||
Rule Morocco 2038 only - Sep 30 3:00 0 -
|
||||
Rule Morocco 2038 only - Oct 30 2:00 1:00 S
|
||||
Rule Morocco 2038 max - Oct lastSun 3:00 0 -
|
||||
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26
|
||||
@ -1123,9 +1147,7 @@ Zone Africa/Khartoum 2:10:08 - LMT 1931
|
||||
3:00 - EAT
|
||||
|
||||
# South Sudan
|
||||
Zone Africa/Juba 2:06:24 - LMT 1931
|
||||
2:00 Sudan CA%sT 2000 Jan 15 12:00
|
||||
3:00 - EAT
|
||||
Link Africa/Khartoum Africa/Juba
|
||||
|
||||
# Swaziland
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
|
||||
@ -39,9 +39,9 @@
|
||||
#
|
||||
# Except for the French entries,
|
||||
# I made up all time zone abbreviations mentioned here; corrections welcome!
|
||||
# FORMAT is `zzz' and GMTOFF is 0 for locations while uninhabited.
|
||||
# FORMAT is 'zzz' and GMTOFF is 0 for locations while uninhabited.
|
||||
|
||||
# These rules are stolen from the `southamerica' file.
|
||||
# These rules are stolen from the 'southamerica' file.
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule ArgAQ 1964 1966 - Mar 1 0:00 0 -
|
||||
Rule ArgAQ 1964 1966 - Oct 15 0:00 1:00 S
|
||||
@ -251,9 +251,10 @@ Zone Antarctica/Syowa 0 - zzz 1957 Jan 29
|
||||
# Scott Island (never inhabited)
|
||||
#
|
||||
# year-round base
|
||||
# Scott, Ross Island, since 1957-01, is like Antarctica/McMurdo.
|
||||
# Scott Base, Ross Island, since 1957-01.
|
||||
# See Pacific/Auckland.
|
||||
#
|
||||
# These rules for New Zealand are stolen from the `australasia' file.
|
||||
# These rules for New Zealand are stolen from the 'australasia' file.
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule NZAQ 1974 only - Nov 3 2:00s 1:00 D
|
||||
Rule NZAQ 1975 1988 - Oct lastSun 2:00s 1:00 D
|
||||
@ -291,11 +292,11 @@ Rule NZAQ 2008 max - Apr Sun>=1 2:00s 0 S
|
||||
# From Lee Hotz (2001-03-08):
|
||||
# I queried the folks at Columbia who spent the summer at Vostok and this is
|
||||
# what they had to say about time there:
|
||||
# ``in the US Camp (East Camp) we have been on New Zealand (McMurdo)
|
||||
# "in the US Camp (East Camp) we have been on New Zealand (McMurdo)
|
||||
# time, which is 12 hours ahead of GMT. The Russian Station Vostok was
|
||||
# 6 hours behind that (although only 2 miles away, i.e. 6 hours ahead
|
||||
# of GMT). This is a time zone I think two hours east of Moscow. The
|
||||
# natural time zone is in between the two: 8 hours ahead of GMT.''
|
||||
# natural time zone is in between the two: 8 hours ahead of GMT."
|
||||
#
|
||||
# From Paul Eggert (2001-05-04):
|
||||
# This seems to be hopelessly confusing, so I asked Lee Hotz about it
|
||||
@ -360,16 +361,8 @@ Zone Antarctica/Palmer 0 - zzz 1965
|
||||
-4:00 ChileAQ CL%sT
|
||||
#
|
||||
#
|
||||
# McMurdo, Ross Island, since 1955-12
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/McMurdo 0 - zzz 1956
|
||||
12:00 NZAQ NZ%sT
|
||||
#
|
||||
# Amundsen-Scott, South Pole, continuously occupied since 1956-11-20
|
||||
#
|
||||
# From Paul Eggert (1996-09-03):
|
||||
# Normally it wouldn't have a separate entry, since it's like the
|
||||
# larger Antarctica/McMurdo since 1970, but it's too famous to omit.
|
||||
# McMurdo Station, Ross Island, since 1955-12
|
||||
# Amundsen-Scott South Pole Station, continuously occupied since 1956-11-20
|
||||
#
|
||||
# From Chris Carrier (1996-06-27):
|
||||
# Siple, the first commander of the South Pole station,
|
||||
@ -391,4 +384,4 @@ Zone Antarctica/McMurdo 0 - zzz 1956
|
||||
# we have to go around and set them back 5 minutes or so.
|
||||
# Maybe if we let them run fast all of the time, we'd get to leave here sooner!!
|
||||
#
|
||||
Link Antarctica/McMurdo Antarctica/South_Pole
|
||||
# See 'australasia' for Antarctica/McMurdo.
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
# go ahead and edit the file (and please send any changes to
|
||||
# tz@iana.org for general use in the future).
|
||||
|
||||
# From Paul Eggert (2013-02-21):
|
||||
# From Paul Eggert (2013-08-11):
|
||||
#
|
||||
# A good source for time zone historical data outside the U.S. is
|
||||
# Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
|
||||
@ -67,11 +67,11 @@
|
||||
# 4:00 GST Gulf*
|
||||
# 5:30 IST India
|
||||
# 7:00 ICT Indochina*
|
||||
# 7:00 WIT west Indonesia
|
||||
# 8:00 CIT central Indonesia
|
||||
# 7:00 WIB west Indonesia (Waktu Indonesia Barat)
|
||||
# 8:00 WITA central Indonesia (Waktu Indonesia Tengah)
|
||||
# 8:00 CST China
|
||||
# 9:00 CJT Central Japanese Time (1896/1937)*
|
||||
# 9:00 EIT east Indonesia
|
||||
# 9:00 WIT east Indonesia (Waktu Indonesia Timur)
|
||||
# 9:00 JST JDT Japan
|
||||
# 9:00 KST KDT Korea
|
||||
# 9:30 CST (Australian) Central Standard Time
|
||||
@ -779,7 +779,7 @@ Zone Asia/Dili 8:22:20 - LMT 1912
|
||||
8:00 - TLT 1942 Feb 21 23:00 # E Timor Time
|
||||
9:00 - JST 1945 Sep 23
|
||||
9:00 - TLT 1976 May 3
|
||||
8:00 - CIT 2000 Sep 17 00:00
|
||||
8:00 - WITA 2000 Sep 17 00:00
|
||||
9:00 - TLT
|
||||
|
||||
# India
|
||||
@ -816,36 +816,53 @@ Zone Asia/Kolkata 5:53:28 - LMT 1880 # Kolkata
|
||||
# (Hollandia). For now, assume all Indonesian locations other than Jayapura
|
||||
# switched on 1945-09-23.
|
||||
#
|
||||
# From Paul Eggert (2013-08-11):
|
||||
# Normally the tz database uses English-language abbreviations, but in
|
||||
# Indonesia it's typical to use Indonesian-language abbreviations even
|
||||
# when writing in English. For example, see the English-language
|
||||
# summary published by the Time and Frequency Laboratory of the
|
||||
# Research Center for Calibration, Instrumentation and Metrology,
|
||||
# Indonesia, <http://time.kim.lipi.go.id/time-eng.php> (2006-09-29).
|
||||
# The abbreviations are:
|
||||
#
|
||||
# WIB - UTC+7 - Waktu Indonesia Barat (Indonesia western time)
|
||||
# WITA - UTC+8 - Waktu Indonesia Tengah (Indonesia central time)
|
||||
# WIT - UTC+9 - Waktu Indonesia Timur (Indonesia eastern time)
|
||||
#
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
# Java, Sumatra
|
||||
Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10
|
||||
# Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13,
|
||||
# but this must be a typo.
|
||||
7:07:12 - JMT 1923 Dec 31 23:47:12 # Jakarta
|
||||
7:07:12 - BMT 1923 Dec 31 23:47:12 # Batavia
|
||||
7:20 - JAVT 1932 Nov # Java Time
|
||||
7:30 - WIT 1942 Mar 23
|
||||
7:30 - WIB 1942 Mar 23
|
||||
9:00 - JST 1945 Sep 23
|
||||
7:30 - WIT 1948 May
|
||||
8:00 - WIT 1950 May
|
||||
7:30 - WIT 1964
|
||||
7:00 - WIT
|
||||
7:30 - WIB 1948 May
|
||||
8:00 - WIB 1950 May
|
||||
7:30 - WIB 1964
|
||||
7:00 - WIB
|
||||
# west and central Borneo
|
||||
Zone Asia/Pontianak 7:17:20 - LMT 1908 May
|
||||
7:17:20 - PMT 1932 Nov # Pontianak MT
|
||||
7:30 - WIT 1942 Jan 29
|
||||
7:30 - WIB 1942 Jan 29
|
||||
9:00 - JST 1945 Sep 23
|
||||
7:30 - WIT 1948 May
|
||||
8:00 - WIT 1950 May
|
||||
7:30 - WIT 1964
|
||||
8:00 - CIT 1988 Jan 1
|
||||
7:00 - WIT
|
||||
7:30 - WIB 1948 May
|
||||
8:00 - WIB 1950 May
|
||||
7:30 - WIB 1964
|
||||
8:00 - WITA 1988 Jan 1
|
||||
7:00 - WIB
|
||||
# Sulawesi, Lesser Sundas, east and south Borneo
|
||||
Zone Asia/Makassar 7:57:36 - LMT 1920
|
||||
7:57:36 - MMT 1932 Nov # Macassar MT
|
||||
8:00 - CIT 1942 Feb 9
|
||||
8:00 - WITA 1942 Feb 9
|
||||
9:00 - JST 1945 Sep 23
|
||||
8:00 - CIT
|
||||
8:00 - WITA
|
||||
# Maluku Islands, West Papua, Papua
|
||||
Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov
|
||||
9:00 - EIT 1944 Sep 1
|
||||
9:00 - WIT 1944 Sep 1
|
||||
9:30 - CST 1964
|
||||
9:00 - EIT
|
||||
9:00 - WIT
|
||||
|
||||
# Iran
|
||||
|
||||
@ -1387,9 +1404,11 @@ Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u
|
||||
# until about the same time next year (at least).
|
||||
# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950
|
||||
#
|
||||
# From Paul Eggert (2012-10-25):
|
||||
# For now, assume this is just a one-year measure. If it becomes
|
||||
# permanent, we should move Jordan from EET to AST effective tomorrow.
|
||||
# From Paul Eggert (2013-09-21):
|
||||
# It's looking like this change will be permanent; see
|
||||
# Petra News Agency, Cancelling winter saved Jordan $7 million (2013-02-20)
|
||||
# <http://www.albawaba.com/business/jordan-winter-electricity--472005>.
|
||||
# So move Jordan to UTC+3 as of the abovementioned date.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule Jordan 1973 only - Jun 6 0:00 1:00 S
|
||||
@ -1415,15 +1434,15 @@ Rule Jordan 1995 1998 - Sep Fri>=15 0:00s 0 -
|
||||
Rule Jordan 1999 only - Jul 1 0:00s 1:00 S
|
||||
Rule Jordan 1999 2002 - Sep lastFri 0:00s 0 -
|
||||
Rule Jordan 2000 2001 - Mar lastThu 0:00s 1:00 S
|
||||
Rule Jordan 2002 max - Mar lastThu 24:00 1:00 S
|
||||
Rule Jordan 2002 2012 - Mar lastThu 24:00 1:00 S
|
||||
Rule Jordan 2003 only - Oct 24 0:00s 0 -
|
||||
Rule Jordan 2004 only - Oct 15 0:00s 0 -
|
||||
Rule Jordan 2005 only - Sep lastFri 0:00s 0 -
|
||||
Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 -
|
||||
Rule Jordan 2013 max - Oct lastFri 0:00s 0 -
|
||||
Rule Jordan 2006 2012 - Oct lastFri 0:00s 0 -
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Asia/Amman 2:23:44 - LMT 1931
|
||||
2:00 Jordan EE%sT
|
||||
2:00 Jordan EE%sT 2012 Oct 26 0:00s
|
||||
3:00 - AST
|
||||
|
||||
|
||||
# Kazakhstan
|
||||
@ -2303,9 +2322,18 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
|
||||
# http://www.samanews.com/index.php?act=Show&id=154120
|
||||
# http://safa.ps/details/news/99844/%D8%B1%D8%A7%D9%85-%D8%A7%D9%84%D9%84%D9%87-%D8%A8%D8%AF%D8%A1-%D8%A7%D9%84%D8%AA%D9%88%D9%82%D9%8A%D8%AA-%D8%A7%D9%84%D8%B5%D9%8A%D9%81%D9%8A-29-%D8%A7%D9%84%D8%AC%D8%A7%D8%B1%D9%8A.html
|
||||
|
||||
# From Paul Eggert (2013-04-15):
|
||||
# From Steffen Thorsen (2013-09-24):
|
||||
# The Gaza and West Bank are ending DST Thursday at midnight
|
||||
# (2013-09-27 00:00:00) (one hour earlier than last year...).
|
||||
# This source in English, says "that winter time will go into effect
|
||||
# at midnight on Thursday in the West Bank and Gaza Strip":
|
||||
# http://english.wafa.ps/index.php?action=detail&id=23246
|
||||
# official source...:
|
||||
# http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252
|
||||
|
||||
# From Paul Eggert (2013-09-24):
|
||||
# For future dates, guess the last Thursday in March at 24:00 through
|
||||
# the first Friday on or after September 21 at 01:00. This is consistent with
|
||||
# the first Friday on or after September 21 at 00:00. This is consistent with
|
||||
# the predictions in today's editions of the following URLs,
|
||||
# which are for Gaza and Hebron respectively:
|
||||
# http://www.timeanddate.com/worldclock/timezone.html?n=702
|
||||
@ -2336,7 +2364,8 @@ Rule Palestine 2011 only - Aug 1 0:00 0 -
|
||||
Rule Palestine 2011 only - Aug 30 0:00 1:00 S
|
||||
Rule Palestine 2011 only - Sep 30 0:00 0 -
|
||||
Rule Palestine 2012 max - Mar lastThu 24:00 1:00 S
|
||||
Rule Palestine 2012 max - Sep Fri>=21 1:00 0 -
|
||||
Rule Palestine 2012 only - Sep 21 1:00 0 -
|
||||
Rule Palestine 2013 max - Sep Fri>=21 0:00 0 -
|
||||
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Asia/Gaza 2:17:52 - LMT 1900 Oct
|
||||
|
||||
@ -375,16 +375,25 @@ Zone Indian/Cocos 6:27:40 - LMT 1900
|
||||
# today confirmed that Fiji will start daylight savings at 2 am on Sunday 21st
|
||||
# October 2012 and end at 3 am on Sunday 20th January 2013.
|
||||
# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=6702&catid=71&Itemid=155
|
||||
|
||||
# From the Fijian Government Media Center (2013-08-30) via David Wheeler:
|
||||
# Fiji will start daylight savings on Sunday 27th October, 2013 and end at 3am
|
||||
# on Sunday 19th January, 2014.... move clocks forward by one hour from 2am
|
||||
# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-27th-OCTOBER-201.aspx
|
||||
#
|
||||
# From Paul Eggert (2012-08-31):
|
||||
# For now, guess a pattern of the penultimate Sundays in October and January.
|
||||
# From Paul Eggert (2013-09-09):
|
||||
# For now, guess that Fiji springs forward the Sunday before the fourth
|
||||
# Monday in October. This matches both recent practice and
|
||||
# timeanddate.com's current spring-forward prediction.
|
||||
# For the January 2014 transition we guessed right while timeanddate.com
|
||||
# guessed wrong, so leave the fall-back prediction alone.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 S
|
||||
Rule Fiji 1999 2000 - Feb lastSun 3:00 0 -
|
||||
Rule Fiji 2009 only - Nov 29 2:00 1:00 S
|
||||
Rule Fiji 2010 only - Mar lastSun 3:00 0 -
|
||||
Rule Fiji 2010 max - Oct Sun>=18 2:00 1:00 S
|
||||
Rule Fiji 2010 max - Oct Sun>=21 2:00 1:00 S
|
||||
Rule Fiji 2011 only - Mar Sun>=1 3:00 0 -
|
||||
Rule Fiji 2012 max - Jan Sun>=18 3:00 0 -
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
@ -510,6 +519,7 @@ Zone Pacific/Auckland 11:39:04 - LMT 1868 Nov 2
|
||||
Zone Pacific/Chatham 12:13:48 - LMT 1957 Jan 1
|
||||
12:45 Chatham CHA%sT
|
||||
|
||||
Link Pacific/Auckland Antarctica/McMurdo
|
||||
|
||||
# Auckland Is
|
||||
# uninhabited; Maori and Moriori, colonial settlers, pastoralists, sealers,
|
||||
@ -759,7 +769,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901
|
||||
# 1886-1891; Baker was similar but exact dates are not known.
|
||||
# Inhabited by civilians 1935-1942; U.S. military bases 1943-1944;
|
||||
# uninhabited thereafter.
|
||||
# Howland observed Hawaii Standard Time (UTC-10:30) in 1937;
|
||||
# Howland observed Hawaii Standard Time (UT-10:30) in 1937;
|
||||
# see page 206 of Elgen M. Long and Marie K. Long,
|
||||
# Amelia Earhart: the Mystery Solved, Simon & Schuster (2000).
|
||||
# So most likely Howland and Baker observed Hawaii Time from 1935
|
||||
@ -772,8 +782,17 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901
|
||||
# no information; was probably like Pacific/Kiritimati
|
||||
|
||||
# Johnston
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Pacific/Johnston -10:00 - HST
|
||||
#
|
||||
# From Paul Eggert (2013-09-03):
|
||||
# In his memoirs of June 6th to October 4, 1945
|
||||
# <http://www.315bw.org/Herb_Bach.htm> (2005), Herbert C. Bach writes,
|
||||
# "We started our letdown to Kwajalein Atoll and landed there at 5:00 AM
|
||||
# Johnston time, 1:30 AM Kwajalein time." This was in June 1945, and
|
||||
# confirms that Johnston kept the same time as Honolulu in summer 1945.
|
||||
# We have no better information, so for now, assume this has been true
|
||||
# indefinitely into the past.
|
||||
#
|
||||
# See 'northamerica' for Pacific/Johnston.
|
||||
|
||||
# Kingman
|
||||
# uninhabited
|
||||
|
||||
@ -45,15 +45,17 @@ Link America/Kentucky/Louisville America/Louisville
|
||||
Link America/Argentina/Mendoza America/Mendoza
|
||||
Link America/Rio_Branco America/Porto_Acre
|
||||
Link America/Argentina/Cordoba America/Rosario
|
||||
Link America/St_Thomas America/Virgin
|
||||
Link America/Denver America/Shiprock
|
||||
Link America/Port_of_Spain America/Virgin
|
||||
Link Pacific/Auckland Antarctica/South_Pole
|
||||
Link Asia/Ashgabat Asia/Ashkhabad
|
||||
Link Asia/Kolkata Asia/Calcutta
|
||||
Link Asia/Chongqing Asia/Chungking
|
||||
Link Asia/Dhaka Asia/Dacca
|
||||
Link Asia/Kathmandu Asia/Katmandu
|
||||
Link Asia/Kolkata Asia/Calcutta
|
||||
Link Asia/Macau Asia/Macao
|
||||
Link Asia/Jerusalem Asia/Tel_Aviv
|
||||
Link Asia/Ho_Chi_Minh Asia/Saigon
|
||||
Link Asia/Jerusalem Asia/Tel_Aviv
|
||||
Link Asia/Thimphu Asia/Thimbu
|
||||
Link Asia/Makassar Asia/Ujung_Pandang
|
||||
Link Asia/Ulaanbaatar Asia/Ulan_Bator
|
||||
@ -111,10 +113,10 @@ Link Pacific/Auckland NZ
|
||||
Link Pacific/Chatham NZ-CHAT
|
||||
Link America/Denver Navajo
|
||||
Link Asia/Shanghai PRC
|
||||
Link Pacific/Pago_Pago Pacific/Samoa
|
||||
Link Pacific/Chuuk Pacific/Yap
|
||||
Link Pacific/Chuuk Pacific/Truk
|
||||
Link Pacific/Pohnpei Pacific/Ponape
|
||||
Link Pacific/Pago_Pago Pacific/Samoa
|
||||
Link Pacific/Chuuk Pacific/Truk
|
||||
Link Pacific/Chuuk Pacific/Yap
|
||||
Link Europe/Warsaw Poland
|
||||
Link Europe/Lisbon Portugal
|
||||
Link Asia/Taipei ROC
|
||||
|
||||
@ -54,9 +54,9 @@ Link Etc/GMT Etc/GMT0
|
||||
# even though this is the opposite of what many people expect.
|
||||
# POSIX has positive signs west of Greenwich, but many people expect
|
||||
# positive signs east of Greenwich. For example, TZ='Etc/GMT+4' uses
|
||||
# the abbreviation "GMT+4" and corresponds to 4 hours behind UTC
|
||||
# the abbreviation "GMT+4" and corresponds to 4 hours behind UT
|
||||
# (i.e. west of Greenwich) even though many people would expect it to
|
||||
# mean 4 hours ahead of UTC (i.e. east of Greenwich).
|
||||
# mean 4 hours ahead of UT (i.e. east of Greenwich).
|
||||
#
|
||||
# In the draft 5 of POSIX 1003.1-200x, the angle bracket notation allows for
|
||||
# TZ='<GMT-4>+4'; if you want time zone abbreviations conforming to
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
# </a> (1998-09-21, in Portuguese)
|
||||
|
||||
#
|
||||
# I invented the abbreviations marked `*' in the following table;
|
||||
# I invented the abbreviations marked '*' in the following table;
|
||||
# the rest are from earlier versions of this file, or from other sources.
|
||||
# Corrections are welcome!
|
||||
# std dst 2dst
|
||||
@ -119,7 +119,7 @@
|
||||
# and a sketch map showing some of the sightlines involved. One paragraph
|
||||
# of the text said:
|
||||
#
|
||||
# `An old stone obelisk marking a forgotten terrestrial meridian stands
|
||||
# 'An old stone obelisk marking a forgotten terrestrial meridian stands
|
||||
# beside the river at Kew. In the 18th century, before time and longitude
|
||||
# was standardised by the Royal Observatory in Greenwich, scholars observed
|
||||
# this stone and the movement of stars from Kew Observatory nearby. They
|
||||
@ -163,7 +163,7 @@
|
||||
# From Paul Eggert (2003-09-27):
|
||||
# Summer Time was first seriously proposed by William Willett (1857-1915),
|
||||
# a London builder and member of the Royal Astronomical Society
|
||||
# who circulated a pamphlet ``The Waste of Daylight'' (1907)
|
||||
# who circulated a pamphlet "The Waste of Daylight" (1907)
|
||||
# that proposed advancing clocks 20 minutes on each of four Sundays in April,
|
||||
# and retarding them by the same amount on four Sundays in September.
|
||||
# A bill was drafted in 1909 and introduced in Parliament several times,
|
||||
@ -188,10 +188,10 @@
|
||||
# </a>
|
||||
|
||||
# From Paul Eggert (1996-09-03):
|
||||
# The OED Supplement says that the English originally said ``Daylight Saving''
|
||||
# The OED Supplement says that the English originally said "Daylight Saving"
|
||||
# when they were debating the adoption of DST in 1908; but by 1916 this
|
||||
# term appears only in quotes taken from DST's opponents, whereas the
|
||||
# proponents (who eventually won the argument) are quoted as using ``Summer''.
|
||||
# proponents (who eventually won the argument) are quoted as using "Summer".
|
||||
|
||||
# From Arthur David Olson (1989-01-19):
|
||||
#
|
||||
@ -231,9 +231,9 @@
|
||||
# which could not be said to run counter to any official description.
|
||||
|
||||
# From Paul Eggert (2000-10-02):
|
||||
# Howse writes (p 157) `DBST' too, but `BDST' seems to have been common
|
||||
# Howse writes (p 157) 'DBST' too, but 'BDST' seems to have been common
|
||||
# and follows the more usual convention of putting the location name first,
|
||||
# so we use `BDST'.
|
||||
# so we use 'BDST'.
|
||||
|
||||
# Peter Ilieve (1998-04-19) described at length
|
||||
# the history of summer time legislation in the United Kingdom.
|
||||
@ -454,6 +454,8 @@ Rule GB-Eire 1981 1989 - Oct Sun>=23 1:00u 0 GMT
|
||||
Rule GB-Eire 1990 1995 - Oct Sun>=22 1:00u 0 GMT
|
||||
# Summer Time Order 1997 (S.I. 1997/2982)
|
||||
# See EU for rules starting in 1996.
|
||||
#
|
||||
# Use Europe/London for Jersey, Guernsey, and the Isle of Man.
|
||||
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Europe/London -0:01:15 - LMT 1847 Dec 1 0:00s
|
||||
@ -820,7 +822,7 @@ Zone Europe/Brussels 0:17:30 - LMT 1880
|
||||
1:00 EU CE%sT
|
||||
|
||||
# Bosnia and Herzegovina
|
||||
# see Serbia
|
||||
# See Europe/Belgrade.
|
||||
|
||||
# Bulgaria
|
||||
#
|
||||
@ -848,10 +850,10 @@ Zone Europe/Sofia 1:33:16 - LMT 1880
|
||||
2:00 EU EE%sT
|
||||
|
||||
# Croatia
|
||||
# see Serbia
|
||||
# See Europe/Belgrade.
|
||||
|
||||
# Cyprus
|
||||
# Please see the `asia' file for Asia/Nicosia.
|
||||
# Please see the 'asia' file for Asia/Nicosia.
|
||||
|
||||
# Czech Republic
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
@ -868,6 +870,7 @@ Zone Europe/Prague 0:57:44 - LMT 1850
|
||||
1:00 C-Eur CE%sT 1944 Sep 17 2:00s
|
||||
1:00 Czech CE%sT 1979
|
||||
1:00 EU CE%sT
|
||||
# Use Europe/Prague also for Slovakia.
|
||||
|
||||
# Denmark, Faroe Islands, and Greenland
|
||||
|
||||
@ -1031,12 +1034,12 @@ Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik air base
|
||||
# From Peter Ilieve (1996-10-28):
|
||||
# [IATA SSIM (1992/1996) claims that the Baltic republics switch at 01:00s,
|
||||
# but a relative confirms that Estonia still switches at 02:00s, writing:]
|
||||
# ``I do not [know] exactly but there are some little different
|
||||
# "I do not [know] exactly but there are some little different
|
||||
# (confusing) rules for International Air and Railway Transport Schedules
|
||||
# conversion in Sunday connected with end of summer time in Estonia....
|
||||
# A discussion is running about the summer time efficiency and effect on
|
||||
# human physiology. It seems that Estonia maybe will not change to
|
||||
# summer time next spring.''
|
||||
# summer time next spring."
|
||||
|
||||
# From Peter Ilieve (1998-11-04), heavily edited:
|
||||
# <a href="http://trip.rk.ee/cgi-bin/thw?${BASE}=akt&${OOHTML}=rtd&TA=1998&TO=1&AN=1390">
|
||||
@ -1091,7 +1094,7 @@ Zone Europe/Tallinn 1:39:00 - LMT 1880
|
||||
# Well, here in Helsinki we're just changing from summer time to regular one,
|
||||
# and it's supposed to change at 4am...
|
||||
|
||||
# From Janne Snabb (2010-0715):
|
||||
# From Janne Snabb (2010-07-15):
|
||||
#
|
||||
# I noticed that the Finland data is not accurate for years 1981 and 1982.
|
||||
# During these two first trial years the DST adjustment was made one hour
|
||||
@ -1148,7 +1151,7 @@ Link Europe/Helsinki Europe/Mariehamn
|
||||
|
||||
|
||||
#
|
||||
# Shank & Pottenger seem to use `24:00' ambiguously; resolve it with Whitman.
|
||||
# Shank & Pottenger seem to use '24:00' ambiguously; resolve it with Whitman.
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule France 1916 only - Jun 14 23:00s 1:00 S
|
||||
Rule France 1916 1919 - Oct Sun>=1 23:00s 0 -
|
||||
@ -1438,7 +1441,7 @@ Zone Atlantic/Reykjavik -1:27:24 - LMT 1837
|
||||
# <a href="http://toi.iriti.cnr.it/uk/ienitlt.html">
|
||||
# Day-light Saving Time in Italy (2006-02-03)
|
||||
# </a>
|
||||
# (`FP' below), taken from an Italian National Electrotechnical Institute
|
||||
# ('FP' below), taken from an Italian National Electrotechnical Institute
|
||||
# publication. When the three sources disagree, guess who's right, as follows:
|
||||
#
|
||||
# year FP Shanks&P. (S) Whitman (W) Go with:
|
||||
@ -1584,10 +1587,22 @@ Zone Europe/Riga 1:36:24 - LMT 1880
|
||||
2:00 EU EE%sT
|
||||
|
||||
# Liechtenstein
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Europe/Vaduz 0:38:04 - LMT 1894 Jun
|
||||
1:00 - CET 1981
|
||||
1:00 EU CE%sT
|
||||
|
||||
# From Paul Eggert (2013-09-09):
|
||||
# Shanks & Pottenger say Vaduz is like Zurich.
|
||||
|
||||
# From Alois Treindl (2013-09-18):
|
||||
# http://www.eliechtensteinensia.li/LIJ/1978/1938-1978/1941.pdf
|
||||
# ... confirms on p. 6 that Liechtenstein followed Switzerland in 1941 and 1942.
|
||||
# I ... translate only the last two paragraphs:
|
||||
# ... during second world war, in the years 1941 and 1942, Liechtenstein
|
||||
# introduced daylight saving time, adapting to Switzerland. From 1943 on
|
||||
# central European time was in force throughout the year.
|
||||
# From a report of the duke's government to the high council,
|
||||
# regarding the introduction of a time law, of 31 May 1977.
|
||||
|
||||
Link Europe/Zurich Europe/Vaduz
|
||||
|
||||
|
||||
# Lithuania
|
||||
|
||||
@ -1675,7 +1690,7 @@ Zone Europe/Luxembourg 0:24:36 - LMT 1904 Jun
|
||||
1:00 EU CE%sT
|
||||
|
||||
# Macedonia
|
||||
# see Serbia
|
||||
# See Europe/Belgrade.
|
||||
|
||||
# Malta
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
@ -1768,7 +1783,7 @@ Zone Europe/Monaco 0:29:32 - LMT 1891 Mar 15
|
||||
1:00 EU CE%sT
|
||||
|
||||
# Montenegro
|
||||
# see Serbia
|
||||
# See Europe/Belgrade.
|
||||
|
||||
# Netherlands
|
||||
|
||||
@ -1883,7 +1898,7 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1
|
||||
# before 1895, and therefore probably changed the local time somewhere
|
||||
# between 1895 and 1925 (inclusive).
|
||||
|
||||
# From Paul Eggert (2001-05-01):
|
||||
# From Paul Eggert (2013-09-04):
|
||||
#
|
||||
# Actually, Jan Mayen was never occupied by Germany during World War II,
|
||||
# so it must have diverged from Oslo time during the war, as Oslo was
|
||||
@ -1894,7 +1909,7 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1
|
||||
# 1941 with a small Norwegian garrison and continued operations despite
|
||||
# frequent air ttacks from Germans. In 1943 the Americans established a
|
||||
# radiolocating station on the island, called "Atlantic City". Possibly
|
||||
# the UTC offset changed during the war, but I think it unlikely that
|
||||
# the UT offset changed during the war, but I think it unlikely that
|
||||
# Jan Mayen used German daylight-saving rules.
|
||||
#
|
||||
# Svalbard is more complicated, as it was raided in August 1941 by an
|
||||
@ -1907,9 +1922,8 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1
|
||||
# the German armed forces at the Svalbard weather station code-named
|
||||
# Haudegen did not surrender to the Allies until September 1945.
|
||||
#
|
||||
# All these events predate our cutoff date of 1970. Unless we can
|
||||
# come up with more definitive info about the timekeeping during the
|
||||
# war years it's probably best just do...the following for now:
|
||||
# All these events predate our cutoff date of 1970, so use Europe/Oslo
|
||||
# for these regions.
|
||||
Link Europe/Oslo Arctic/Longyearbyen
|
||||
|
||||
# Poland
|
||||
@ -2167,7 +2181,7 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct
|
||||
# so we (Novosibirsk) simply did not switch.
|
||||
#
|
||||
# From Andrey A. Chernov (1996-10-04):
|
||||
# `MSK' and `MSD' were born and used initially on Moscow computers with
|
||||
# 'MSK' and 'MSD' were born and used initially on Moscow computers with
|
||||
# UNIX-like OSes by several developer groups (e.g. Demos group, Kiae group)....
|
||||
# The next step was the UUCP network, the Relcom predecessor
|
||||
# (used mainly for mail), and MSK/MSD was actively used there.
|
||||
@ -2466,6 +2480,9 @@ Zone Asia/Anadyr 11:49:56 - LMT 1924 May 2
|
||||
11:00 Russia ANA%sT 2011 Mar 27 2:00s
|
||||
12:00 - ANAT
|
||||
|
||||
# San Marino
|
||||
# See Europe/Rome.
|
||||
|
||||
# Serbia
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Europe/Belgrade 1:22:00 - LMT 1884
|
||||
@ -2488,7 +2505,7 @@ Link Europe/Belgrade Europe/Zagreb # Croatia
|
||||
Link Europe/Prague Europe/Bratislava
|
||||
|
||||
# Slovenia
|
||||
# see Serbia
|
||||
# See Europe/Belgrade.
|
||||
|
||||
# Spain
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
@ -2622,7 +2639,7 @@ Zone Europe/Stockholm 1:12:12 - LMT 1879 Jan 1
|
||||
# and their performance improved enormously. Communities began to keep
|
||||
# mean time in preference to apparent time -- Geneva from 1780 ....
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
# From Whitman (who writes ``Midnight?''):
|
||||
# From Whitman (who writes "Midnight?"):
|
||||
# Rule Swiss 1940 only - Nov 2 0:00 1:00 S
|
||||
# Rule Swiss 1940 only - Dec 31 0:00 0 -
|
||||
# From Shanks & Pottenger:
|
||||
@ -2667,23 +2684,53 @@ Zone Europe/Stockholm 1:12:12 - LMT 1879 Jan 1
|
||||
# The 1940 rules must be deleted.
|
||||
#
|
||||
# One further detail for Switzerland, which is probably out of scope for
|
||||
# most users of tzdata:
|
||||
# The zone file
|
||||
# Zone Europe/Zurich 0:34:08 - LMT 1848 Sep 12
|
||||
# 0:29:44 - BMT 1894 Jun #Bern Mean Time
|
||||
# 1:00 Swiss CE%sT 1981
|
||||
# 1:00 EU CE%sT
|
||||
# most users of tzdata: The [Europe/Zurich zone] ...
|
||||
# describes all of Switzerland correctly, with the exception of
|
||||
# the Cantone Geneve (Geneva, Genf). Between 1848 and 1894 Geneve did not
|
||||
# follow Bern Mean Time but kept its own local mean time.
|
||||
# To represent this, an extra zone would be needed.
|
||||
#
|
||||
# From Alois Treindl (2013-09-11):
|
||||
# The Federal regulations say
|
||||
# http://www.admin.ch/opc/de/classified-compilation/20071096/index.html
|
||||
# ... the meridian for Bern mean time ... is 7 degrees 26'22.50".
|
||||
# Expressed in time, it is 0h29m45.5s.
|
||||
|
||||
# From Pierre-Yves Berger (2013-09-11):
|
||||
# the "Circulaire du conseil federal" (December 11 1893)
|
||||
# <http://www.amtsdruckschriften.bar.admin.ch/viewOrigDoc.do?id=10071353> ...
|
||||
# clearly states that the [1894-06-01] change should be done at midnight
|
||||
# but if no one is present after 11 at night, could be postponed until one
|
||||
# hour before the beginning of service.
|
||||
|
||||
# From Paul Eggert (2013-09-11):
|
||||
# Round BMT to the nearest even second, 0:29:46.
|
||||
#
|
||||
# We can find no reliable source for Shanks's assertion that all of Switzerland
|
||||
# except Geneva switched to Bern Mean Time at 00:00 on 1848-09-12. This book:
|
||||
#
|
||||
# Jakob Messerli. Gleichmassig, punktlich, schnell: Zeiteinteilung und
|
||||
# Zeitgebrauch in der Schweiz im 19. Jahrhundert. Chronos, Zurich 1995,
|
||||
# ISBN 3-905311-68-2, OCLC 717570797.
|
||||
#
|
||||
# suggests that the transition was more gradual, and that the Swiss did not
|
||||
# agree about civil time during the transition. The timekeeping it gives the
|
||||
# most detail for is postal and telegraph time: here, federal legislation (the
|
||||
# "Bundesgesetz uber die Erstellung von elektrischen Telegraphen") passed on
|
||||
# 1851-11-23, and an official implementation notice was published 1853-07-16
|
||||
# (Bundesblatt 1853, Bd. II, S. 859). On p 72 Messerli writes that in
|
||||
# practice since July 1853 Bernese time was used in "all postal and telegraph
|
||||
# offices in Switzerland from Geneva to St. Gallen and Basel to Chiasso"
|
||||
# (Google translation). For now, model this transition as occurring on
|
||||
# 1853-07-16, though it probably occurred at some other date in Zurich, and
|
||||
# legal civil time probably changed at still some other transition date.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule Swiss 1941 1942 - May Mon>=1 1:00 1:00 S
|
||||
Rule Swiss 1941 1942 - Oct Mon>=1 2:00 0 -
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Europe/Zurich 0:34:08 - LMT 1848 Sep 12
|
||||
0:29:44 - BMT 1894 Jun # Bern Mean Time
|
||||
Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment.
|
||||
0:29:46 - BMT 1894 Jun # Bern Mean Time
|
||||
1:00 Swiss CE%sT 1981
|
||||
1:00 EU CE%sT
|
||||
|
||||
@ -2907,7 +2954,7 @@ Zone Europe/Simferopol 2:16:24 - LMT 1880
|
||||
# From Paul Eggert (2006-03-22):
|
||||
# The _Economist_ (1994-05-28, p 45) reports that central Crimea switched
|
||||
# from Kiev to Moscow time sometime after the January 1994 elections.
|
||||
# Shanks (1999) says ``date of change uncertain'', but implies that it happened
|
||||
# Shanks (1999) says "date of change uncertain", but implies that it happened
|
||||
# sometime between the 1994 DST switches. Shanks & Pottenger simply say
|
||||
# 1994-09-25 03:00, but that can't be right. For now, guess it
|
||||
# changed in May.
|
||||
@ -2921,6 +2968,9 @@ Zone Europe/Simferopol 2:16:24 - LMT 1880
|
||||
3:00 - MSK 1997 Mar lastSun 1:00u
|
||||
2:00 EU EE%sT
|
||||
|
||||
# Vatican City
|
||||
# See Europe/Rome.
|
||||
|
||||
###############################################################################
|
||||
|
||||
# One source shows that Bulgaria, Cyprus, Finland, and Greece observe DST from
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
# 1. ISO 3166-1 alpha-2 country code, current as of
|
||||
# ISO 3166-1 Newsletter VI-15 (2013-05-10). See: Updates on ISO 3166
|
||||
# http://www.iso.org/iso/home/standards/country_codes/updates_on_iso_3166.htm
|
||||
# 2. The usual English name for the country,
|
||||
# 2. The usual English name for the coded region,
|
||||
# chosen so that alphabetic sorting of subsets produces helpful lists.
|
||||
# This is not the same as the English name in the ISO 3166 tables.
|
||||
#
|
||||
@ -46,7 +46,7 @@
|
||||
# to take or endorse any position on legal or territorial claims.
|
||||
#
|
||||
#country-
|
||||
#code country name
|
||||
#code name of country, territory, area, or subdivision
|
||||
AD Andorra
|
||||
AE United Arab Emirates
|
||||
AF Afghanistan
|
||||
@ -76,7 +76,7 @@ BL St Barthelemy
|
||||
BM Bermuda
|
||||
BN Brunei
|
||||
BO Bolivia
|
||||
BQ Bonaire, St Eustatius & Saba
|
||||
BQ Caribbean Netherlands
|
||||
BR Brazil
|
||||
BS Bahamas
|
||||
BT Bhutan
|
||||
|
||||
@ -20,18 +20,24 @@
|
||||
# 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.
|
||||
#
|
||||
# <pre>
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# Allowance for leapseconds added to each timezone file.
|
||||
|
||||
# This file is in the public domain.
|
||||
|
||||
# This file is generated automatically from the data in the public-domain
|
||||
# leap-seconds.list file available from most NIST time servers.
|
||||
# If the URL <ftp://time.nist.gov/pub/leap-seconds.list> does not work,
|
||||
# you should be able to pick up leap-seconds.list from a secondary NIST server.
|
||||
# For more about leap-seconds.list, please see
|
||||
# The NTP Timescale and Leap Seconds
|
||||
# <http://www.eecis.udel.edu/~mills/leap.html>.
|
||||
|
||||
# The International Earth Rotation Service periodically uses leap seconds
|
||||
# to keep UTC to within 0.9 s of UT1
|
||||
# (which measures the true angular orientation of the earth in space); see
|
||||
# Terry J Quinn, The BIPM and the accurate measure of time,
|
||||
# Proc IEEE 79, 7 (July 1991), 894-905.
|
||||
# Proc IEEE 79, 7 (July 1991), 894-905 <http://dx.doi.org/10.1109/5.84965>.
|
||||
# There were no leap seconds before 1972, because the official mechanism
|
||||
# accounting for the discrepancy between atomic time and the earth's rotation
|
||||
# did not exist until the early 1970s.
|
||||
@ -42,8 +48,8 @@
|
||||
# or
|
||||
# Leap YEAR MON DAY 23:59:59 - R/S
|
||||
|
||||
# If the leapsecond is Rolling (R) the given time is local time
|
||||
# If the leapsecond is Stationary (S) the given time is UTC
|
||||
# If the leapsecond is Rolling (R) the given time is local time.
|
||||
# If the leapsecond is Stationary (S) the given time is UTC.
|
||||
|
||||
# Leap YEAR MONTH DAY HH:MM:SS CORR R/S
|
||||
Leap 1972 Jun 30 23:59:60 + S
|
||||
@ -71,53 +77,3 @@ Leap 1998 Dec 31 23:59:60 + S
|
||||
Leap 2005 Dec 31 23:59:60 + S
|
||||
Leap 2008 Dec 31 23:59:60 + S
|
||||
Leap 2012 Jun 30 23:59:60 + S
|
||||
|
||||
# INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
|
||||
#
|
||||
# SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE
|
||||
#
|
||||
#
|
||||
# SERVICE DE LA ROTATION TERRESTRE
|
||||
# OBSERVATOIRE DE PARIS
|
||||
# 61, Av. de l'Observatoire 75014 PARIS (France)
|
||||
# Tel. : 33 (0) 1 40 51 22 26
|
||||
# FAX : 33 (0) 1 40 51 22 91
|
||||
# e-mail : (E-Mail Removed)
|
||||
# http://hpiers.obspm.fr/eop-pc
|
||||
#
|
||||
# Paris, 5 January 2012
|
||||
#
|
||||
#
|
||||
# Bulletin C 43
|
||||
#
|
||||
# To authorities responsible
|
||||
# for the measurement and
|
||||
# distribution of time
|
||||
#
|
||||
#
|
||||
# UTC TIME STEP
|
||||
# on the 1st of July 2012
|
||||
#
|
||||
#
|
||||
# A positive leap second will be introduced at the end of June 2012.
|
||||
# The sequence of dates of the UTC second markers will be:
|
||||
#
|
||||
# 2012 June 30, 23h 59m 59s
|
||||
# 2012 June 30, 23h 59m 60s
|
||||
# 2012 July 1, 0h 0m 0s
|
||||
#
|
||||
# The difference between UTC and the International Atomic Time TAI is:
|
||||
#
|
||||
# from 2009 January 1, 0h UTC, to 2012 July 1 0h UTC : UTC-TAI = - 34s
|
||||
# from 2012 July 1, 0h UTC, until further notice : UTC-TAI = - 35s
|
||||
#
|
||||
# Leap seconds can be introduced in UTC at the end of the months of December
|
||||
# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
|
||||
# six months, either to announce a time step in UTC or to confirm that there
|
||||
# will be no time step at the next possible date.
|
||||
#
|
||||
#
|
||||
# Daniel GAMBIS
|
||||
# Head
|
||||
# Earth Orientation Center of IERS
|
||||
# Observatoire de Paris, France
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
# Howse writes (pp 121-125) that time zones were invented by
|
||||
# Professor Charles Ferdinand Dowd (1825-1904),
|
||||
# Principal of Temple Grove Ladies' Seminary (Saratoga Springs, NY).
|
||||
# His pamphlet ``A System of National Time for Railroads'' (1870)
|
||||
# His pamphlet "A System of National Time for Railroads" (1870)
|
||||
# was the result of his proposals at the Convention of Railroad Trunk Lines
|
||||
# in New York City (1869-10). His 1870 proposal was based on Washington, DC,
|
||||
# but in 1872-05 he moved the proposed origin to Greenwich.
|
||||
@ -63,8 +63,8 @@
|
||||
|
||||
# From Paul Eggert (2001-03-06):
|
||||
# Daylight Saving Time was first suggested as a joke by Benjamin Franklin
|
||||
# in his whimsical essay ``An Economical Project for Diminishing the Cost
|
||||
# of Light'' published in the Journal de Paris (1784-04-26).
|
||||
# in his whimsical essay "An Economical Project for Diminishing the Cost
|
||||
# of Light" published in the Journal de Paris (1784-04-26).
|
||||
# Not everyone is happy with the results:
|
||||
#
|
||||
# I don't really care how time is reckoned so long as there is some
|
||||
@ -190,8 +190,8 @@ Zone PST8PDT -8:00 US P%sT
|
||||
# of the Aleutian islands. No DST.
|
||||
|
||||
# From Paul Eggert (1995-12-19):
|
||||
# The tables below use `NST', not `NT', for Nome Standard Time.
|
||||
# I invented `CAWT' for Central Alaska War Time.
|
||||
# The tables below use 'NST', not 'NT', for Nome Standard Time.
|
||||
# I invented 'CAWT' for Central Alaska War Time.
|
||||
|
||||
# From U. S. Naval Observatory (1989-01-19):
|
||||
# USA EASTERN 5 H BEHIND UTC NEW YORK, WASHINGTON
|
||||
@ -260,9 +260,9 @@ Zone PST8PDT -8:00 US P%sT
|
||||
# H.R. 6, Energy Policy Act of 2005, SEC. 110. DAYLIGHT SAVINGS.
|
||||
# (a) Amendment- Section 3(a) of the Uniform Time Act of 1966 (15
|
||||
# U.S.C. 260a(a)) is amended--
|
||||
# (1) by striking `first Sunday of April' and inserting `second
|
||||
# (1) by striking 'first Sunday of April' and inserting 'second
|
||||
# Sunday of March'; and
|
||||
# (2) by striking `last Sunday of October' and inserting `first
|
||||
# (2) by striking 'last Sunday of October' and inserting 'first
|
||||
# Sunday of November'.
|
||||
# (b) Effective Date- Subsection (a) shall take effect 1 year after the
|
||||
# date of enactment of this Act or March 1, 2007, whichever is later.
|
||||
@ -623,6 +623,8 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00 #Schmitt&Cox
|
||||
-10:30 - HST 1947 Jun 8 2:00 #Schmitt&Cox+2
|
||||
-10:00 - HST
|
||||
|
||||
Link Pacific/Honolulu Pacific/Johnston
|
||||
|
||||
# Now we turn to US areas that have diverged from the consensus since 1970.
|
||||
|
||||
# Arizona mostly uses MST.
|
||||
@ -659,8 +661,9 @@ Zone America/Phoenix -7:28:18 - LMT 1883 Nov 18 11:31:42
|
||||
# Navajo Nation participates in the Daylight Saving Time policy, due to its
|
||||
# large size and location in three states." (The "only" means that other
|
||||
# tribal nations don't use DST.)
|
||||
|
||||
Link America/Denver America/Shiprock
|
||||
#
|
||||
# From Paul Eggert (2013-08-26):
|
||||
# See America/Denver for a zone appropriate for the Navajo Nation.
|
||||
|
||||
# Southern Idaho (Ada, Adams, Bannock, Bear Lake, Bingham, Blaine,
|
||||
# Boise, Bonneville, Butte, Camas, Canyon, Caribou, Cassia, Clark,
|
||||
@ -700,13 +703,13 @@ Zone America/Boise -7:44:49 - LMT 1883 Nov 18 12:15:11
|
||||
# and Switzerland counties have their own time zone histories as noted below.
|
||||
#
|
||||
# Shanks partitioned Indiana into 345 regions, each with its own time history,
|
||||
# and wrote ``Even newspaper reports present contradictory information.''
|
||||
# and wrote "Even newspaper reports present contradictory information."
|
||||
# Those Hoosiers! Such a flighty and changeable people!
|
||||
# Fortunately, most of the complexity occurred before our cutoff date of 1970.
|
||||
#
|
||||
# Other than Indianapolis, the Indiana place names are so nondescript
|
||||
# that they would be ambiguous if we left them at the `America' level.
|
||||
# So we reluctantly put them all in a subdirectory `America/Indiana'.
|
||||
# that they would be ambiguous if we left them at the 'America' level.
|
||||
# So we reluctantly put them all in a subdirectory 'America/Indiana'.
|
||||
|
||||
# From Paul Eggert (2005-08-16):
|
||||
# http://www.mccsc.edu/time.html says that Indiana will use DST starting 2006.
|
||||
@ -970,8 +973,8 @@ Zone America/Kentucky/Monticello -5:39:24 - LMT 1883 Nov 18 12:20:36
|
||||
# This story is too entertaining to be false, so go with Howse over Shanks.
|
||||
#
|
||||
# From Paul Eggert (2001-03-06):
|
||||
# Garland (1927) writes ``Cleveland and Detroit advanced their clocks
|
||||
# one hour in 1914.'' This change is not in Shanks. We have no more
|
||||
# Garland (1927) writes "Cleveland and Detroit advanced their clocks
|
||||
# one hour in 1914." This change is not in Shanks. We have no more
|
||||
# info, so omit this for now.
|
||||
#
|
||||
# Most of Michigan observed DST from 1973 on, but was a bit late in 1975.
|
||||
@ -1011,7 +1014,7 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
|
||||
# occupied 1857/1900 by the Navassa Phosphate Co
|
||||
# US lighthouse 1917/1996-09
|
||||
# currently uninhabited
|
||||
# see Mark Fineman, ``An Isle Rich in Guano and Discord'',
|
||||
# see Mark Fineman, "An Isle Rich in Guano and Discord",
|
||||
# _Los Angeles Times_ (1998-11-10), A1, A10; it cites
|
||||
# Jimmy Skaggs, _The Great Guano Rush_ (1994).
|
||||
|
||||
@ -1045,7 +1048,7 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
|
||||
# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
|
||||
# <http://www.jstor.org/stable/1774359>.
|
||||
#
|
||||
# See the `europe' file for Greenland.
|
||||
# See the 'europe' file for Greenland.
|
||||
|
||||
# Canada
|
||||
|
||||
@ -1246,7 +1249,7 @@ Zone America/St_Johns -3:30:52 - LMT 1884
|
||||
|
||||
# most of east Labrador
|
||||
|
||||
# The name `Happy Valley-Goose Bay' is too long; use `Goose Bay'.
|
||||
# The name 'Happy Valley-Goose Bay' is too long; use 'Goose Bay'.
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Goose_Bay -4:01:40 - LMT 1884 # Happy Valley-Goose Bay
|
||||
-3:30:52 - NST 1918
|
||||
@ -1363,25 +1366,27 @@ Zone America/Moncton -4:19:08 - LMT 1883 Dec 9
|
||||
|
||||
# Quebec
|
||||
|
||||
# From Paul Eggert (2006-07-09):
|
||||
# Shanks & Pottenger write that since 1970 most of Quebec has been
|
||||
# like Montreal.
|
||||
# From Paul Eggert (2013-08-30):
|
||||
# Since 1970 most of Quebec has been like Toronto.
|
||||
# However, because earlier versions of the tz database mistakenly relied on data
|
||||
# from Shanks & Pottenger saying that Quebec differed from Ontario after 1970,
|
||||
# a separate entry was created for most of Quebec. We're loath to lose
|
||||
# its pre-1970 info, even though the tz database is normally limited to
|
||||
# zones that differ after 1970, so keep this otherwise out-of-scope entry.
|
||||
|
||||
# From Paul Eggert (2006-06-27):
|
||||
# Matthews and Vincent (1998) also write that Quebec east of the -63
|
||||
# meridian is supposed to observe AST, but residents as far east as
|
||||
# Natashquan use EST/EDT, and residents east of Natashquan use AST.
|
||||
# In "Official time in Quebec" the Quebec department of justice writes in
|
||||
# http://www.justice.gouv.qc.ca/english/publications/generale/temps-regl-1-a.htm
|
||||
# that "The residents of the Municipality of the
|
||||
# Cote-Nord-du-Golfe-Saint-Laurent and the municipalities of Saint-Augustin,
|
||||
# Bonne-Esperance and Blanc-Sablon apply the Official Time Act as it is
|
||||
# written and use Atlantic standard time all year round. The same applies to
|
||||
# the residents of the Native facilities along the lower North Shore."
|
||||
# <http://www.assnat.qc.ca/eng/37legislature2/Projets-loi/Publics/06-a002.htm>
|
||||
# The Quebec department of justice writes in
|
||||
# "The situation in Minganie and Basse-Cote-Nord"
|
||||
# http://www.justice.gouv.qc.ca/english/publications/generale/temps-minganie-a.htm
|
||||
# that the coastal strip from just east of Natashquan to Blanc-Sablon
|
||||
# observes Atlantic standard time all year round.
|
||||
# http://www.assnat.qc.ca/Media/Process.aspx?MediaId=ANQ.Vigie.Bll.DocumentGenerique_8845en
|
||||
# says this common practice was codified into law as of 2007.
|
||||
# For lack of better info, guess this practice began around 1970, contra to
|
||||
# Shanks & Pottenger who have this region observing AST/ADT.
|
||||
# for post-1970 data America/Puerto_Rico.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule Mont 1917 only - Mar 25 2:00 1:00 D
|
||||
@ -1425,7 +1430,6 @@ Zone America/Montreal -4:54:16 - LMT 1884
|
||||
-5:00 Mont E%sT 1974
|
||||
-5:00 Canada E%sT
|
||||
|
||||
|
||||
# Ontario
|
||||
|
||||
# From Paul Eggert (2006-07-09):
|
||||
@ -1644,7 +1648,7 @@ Zone America/Thunder_Bay -5:57:00 - LMT 1895
|
||||
-6:00 - CST 1910
|
||||
-5:00 - EST 1942
|
||||
-5:00 Canada E%sT 1970
|
||||
-5:00 Mont E%sT 1973
|
||||
-5:00 Toronto E%sT 1973
|
||||
-5:00 - EST 1974
|
||||
-5:00 Canada E%sT
|
||||
Zone America/Nipigon -5:53:04 - LMT 1895
|
||||
@ -2231,7 +2235,7 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
|
||||
# From Paul Eggert (1996-06-12):
|
||||
# For an English translation of the decree, see
|
||||
# <a href="http://mexico-travel.com/extra/timezone_eng.html">
|
||||
# ``Diario Oficial: Time Zone Changeover'' (1996-01-04).
|
||||
# "Diario Oficial: Time Zone Changeover" (1996-01-04).
|
||||
# </a>
|
||||
|
||||
# From Rives McDow (1998-10-08):
|
||||
@ -2568,9 +2572,7 @@ Zone America/Santa_Isabel -7:39:28 - LMT 1922 Jan 1 0:20:32
|
||||
###############################################################################
|
||||
|
||||
# Anguilla
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Anguilla -4:12:16 - LMT 1912 Mar 2
|
||||
-4:00 - AST
|
||||
# See 'southamerica'.
|
||||
|
||||
# Antigua and Barbuda
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
@ -2639,13 +2641,13 @@ Zone America/Belize -5:52:48 - LMT 1912 Apr
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Atlantic/Bermuda -4:19:18 - LMT 1930 Jan 1 2:00 # Hamilton
|
||||
-4:00 - AST 1974 Apr 28 2:00
|
||||
-4:00 Bahamas A%sT 1976
|
||||
-4:00 Canada A%sT 1976
|
||||
-4:00 US A%sT
|
||||
|
||||
# Cayman Is
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown
|
||||
-5:07:12 - KMT 1912 Feb # Kingston Mean Time
|
||||
-5:07:11 - KMT 1912 Feb # Kingston Mean Time
|
||||
-5:00 - EST
|
||||
|
||||
# Costa Rica
|
||||
@ -2660,7 +2662,7 @@ Rule CR 1991 1992 - Jan Sat>=15 0:00 1:00 D
|
||||
# go with Shanks & Pottenger.
|
||||
Rule CR 1991 only - Jul 1 0:00 0 S
|
||||
Rule CR 1992 only - Mar 15 0:00 0 S
|
||||
# There are too many San Joses elsewhere, so we'll use `Costa Rica'.
|
||||
# There are too many San Joses elsewhere, so we'll use 'Costa Rica'.
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Costa_Rica -5:36:13 - LMT 1890 # San Jose
|
||||
-5:36:13 - SJMT 1921 Jan 15 # San Jose Mean Time
|
||||
@ -2892,9 +2894,7 @@ Zone America/Havana -5:29:28 - LMT 1890
|
||||
-5:00 Cuba C%sT
|
||||
|
||||
# Dominica
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Dominica -4:05:36 - LMT 1911 Jul 1 0:01 # Roseau
|
||||
-4:00 - AST
|
||||
# See 'southamerica'.
|
||||
|
||||
# Dominican Republic
|
||||
|
||||
@ -2943,18 +2943,10 @@ Zone America/El_Salvador -5:56:48 - LMT 1921 # San Salvador
|
||||
-6:00 Salv C%sT
|
||||
|
||||
# Grenada
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Grenada -4:07:00 - LMT 1911 Jul # St George's
|
||||
-4:00 - AST
|
||||
|
||||
# Guadeloupe
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Guadeloupe -4:06:08 - LMT 1911 Jun 8 # Pointe a Pitre
|
||||
-4:00 - AST
|
||||
# St Barthelemy
|
||||
Link America/Guadeloupe America/St_Barthelemy
|
||||
# St Martin (French part)
|
||||
Link America/Guadeloupe America/Marigot
|
||||
# See 'southamerica'.
|
||||
|
||||
# Guatemala
|
||||
#
|
||||
@ -3097,17 +3089,12 @@ Zone America/Tegucigalpa -5:48:52 - LMT 1921 Apr
|
||||
# Great Swan I ceded by US to Honduras in 1972
|
||||
|
||||
# Jamaica
|
||||
|
||||
# From Bob Devine (1988-01-28):
|
||||
# Follows US rules.
|
||||
|
||||
# From U. S. Naval Observatory (1989-01-19):
|
||||
# JAMAICA 5 H BEHIND UTC
|
||||
|
||||
# From Shanks & Pottenger:
|
||||
# Shanks & Pottenger give -5:07:12, but Milne records -5:07:10.41 from an
|
||||
# unspecified official document, and says "This time is used throughout the
|
||||
# island". Go with Milne. Round to the nearest second as required by zic.
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Jamaica -5:07:12 - LMT 1890 # Kingston
|
||||
-5:07:12 - KMT 1912 Feb # Kingston Mean Time
|
||||
Zone America/Jamaica -5:07:11 - LMT 1890 # Kingston
|
||||
-5:07:11 - KMT 1912 Feb # Kingston Mean Time
|
||||
-5:00 - EST 1974 Apr 28 2:00
|
||||
-5:00 US E%sT 1984
|
||||
-5:00 - EST
|
||||
@ -3121,12 +3108,7 @@ Zone America/Martinique -4:04:20 - LMT 1890 # Fort-de-France
|
||||
-4:00 - AST
|
||||
|
||||
# Montserrat
|
||||
# From Paul Eggert (2006-03-22):
|
||||
# In 1995 volcanic eruptions forced evacuation of Plymouth, the capital.
|
||||
# world.gazetteer.com says Cork Hill is the most populous location now.
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Montserrat -4:08:52 - LMT 1911 Jul 1 0:01 # Cork Hill
|
||||
-4:00 - AST
|
||||
# See 'southamerica'.
|
||||
|
||||
# Nicaragua
|
||||
#
|
||||
@ -3200,7 +3182,7 @@ Zone America/Panama -5:18:08 - LMT 1890
|
||||
-5:00 - EST
|
||||
|
||||
# Puerto Rico
|
||||
# There are too many San Juans elsewhere, so we'll use `Puerto_Rico'.
|
||||
# There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'.
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Puerto_Rico -4:24:25 - LMT 1899 Mar 28 12:00 # San Juan
|
||||
-4:00 - AST 1942 May 3
|
||||
@ -3208,18 +3190,11 @@ Zone America/Puerto_Rico -4:24:25 - LMT 1899 Mar 28 12:00 # San Juan
|
||||
-4:00 - AST
|
||||
|
||||
# St Kitts-Nevis
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/St_Kitts -4:10:52 - LMT 1912 Mar 2 # Basseterre
|
||||
-4:00 - AST
|
||||
|
||||
# St Lucia
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/St_Lucia -4:04:00 - LMT 1890 # Castries
|
||||
-4:04:00 - CMT 1912 # Castries Mean Time
|
||||
-4:00 - AST
|
||||
# See 'southamerica'.
|
||||
|
||||
# St Pierre and Miquelon
|
||||
# There are too many St Pierres elsewhere, so we'll use `Miquelon'.
|
||||
# There are too many St Pierres elsewhere, so we'll use 'Miquelon'.
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Miquelon -3:44:40 - LMT 1911 May 15 # St Pierre
|
||||
-4:00 - AST 1980 May
|
||||
@ -3227,10 +3202,7 @@ Zone America/Miquelon -3:44:40 - LMT 1911 May 15 # St Pierre
|
||||
-3:00 Canada PM%sT
|
||||
|
||||
# St Vincent and the Grenadines
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/St_Vincent -4:04:56 - LMT 1890 # Kingstown
|
||||
-4:04:56 - KMT 1912 # Kingstown Mean Time
|
||||
-4:00 - AST
|
||||
# See 'southamerica'.
|
||||
|
||||
# Turks and Caicos
|
||||
#
|
||||
@ -3260,15 +3232,9 @@ Rule TC 2007 max - Mar Sun>=8 2:00 1:00 D
|
||||
Rule TC 2007 max - Nov Sun>=1 2:00 0 S
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Grand_Turk -4:44:32 - LMT 1890
|
||||
-5:07:12 - KMT 1912 Feb # Kingston Mean Time
|
||||
-5:07:11 - KMT 1912 Feb # Kingston Mean Time
|
||||
-5:00 TC E%sT
|
||||
|
||||
# British Virgin Is
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Tortola -4:18:28 - LMT 1911 Jul # Road Town
|
||||
-4:00 - AST
|
||||
|
||||
# Virgin Is
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/St_Thomas -4:19:44 - LMT 1911 Jul # Charlotte Amalie
|
||||
-4:00 - AST
|
||||
# See 'southamerica'.
|
||||
|
||||
@ -474,6 +474,17 @@ Rule Arg 2008 only - Oct Sun>=15 0:00 1:00 S
|
||||
# rules...San Luis is still using "Western ARgentina Time" and it got
|
||||
# stuck on Summer daylight savings time even though the summer is over.
|
||||
|
||||
# From Paul Eggert (2013-09-05):
|
||||
# Perhaps San Luis operates on the legal fiction that it is at UTC-4
|
||||
# with perpetual summer time, but ordinary usage typically seems to
|
||||
# just say it's at UTC-3; see, for example,
|
||||
# <http://es.wikipedia.org/wiki/Hora_oficial_argentina>.
|
||||
# We've documented similar situations as being plain changes to
|
||||
# standard time, so let's do that here too. This does not change UTC
|
||||
# offsets, only tm_isdst and the time zone abbreviations. One minor
|
||||
# plus is that this silences a zic complaint that there's no POSIX TZ
|
||||
# setting for time stamps past 2038.
|
||||
|
||||
# From Paul Eggert (2013-02-21):
|
||||
# Milne says Cordoba time was -4:16:48.2. Round to the nearest second.
|
||||
|
||||
@ -611,7 +622,7 @@ Zone America/Argentina/Mendoza -4:35:16 - LMT 1894 Oct 31
|
||||
# San Luis (SL)
|
||||
|
||||
Rule SanLuis 2008 2009 - Mar Sun>=8 0:00 0 -
|
||||
Rule SanLuis 2007 2009 - Oct Sun>=8 0:00 1:00 S
|
||||
Rule SanLuis 2007 2008 - Oct Sun>=8 0:00 1:00 S
|
||||
|
||||
Zone America/Argentina/San_Luis -4:25:24 - LMT 1894 Oct 31
|
||||
-4:16:48 - CMT 1920 May
|
||||
@ -627,7 +638,8 @@ Zone America/Argentina/San_Luis -4:25:24 - LMT 1894 Oct 31
|
||||
-3:00 - ART 2004 May 31
|
||||
-4:00 - WART 2004 Jul 25
|
||||
-3:00 Arg AR%sT 2008 Jan 21
|
||||
-4:00 SanLuis WAR%sT
|
||||
-4:00 SanLuis WAR%sT 2009 Oct 11
|
||||
-3:00 - ART
|
||||
#
|
||||
# Santa Cruz (SC)
|
||||
Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31
|
||||
@ -654,10 +666,7 @@ Zone America/Argentina/Ushuaia -4:33:12 - LMT 1894 Oct 31
|
||||
-3:00 - ART
|
||||
|
||||
# Aruba
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Aruba -4:40:24 - LMT 1912 Feb 12 # Oranjestad
|
||||
-4:30 - ANT 1965 # Netherlands Antilles Time
|
||||
-4:00 - AST
|
||||
Link America/Curacao America/Aruba
|
||||
|
||||
# Bolivia
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
@ -859,6 +868,12 @@ Zone America/La_Paz -4:32:36 - LMT 1890
|
||||
# Tocantins state will have DST.
|
||||
# http://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html
|
||||
|
||||
# From Steffen Thorsen (2013-09-20):
|
||||
# Tocantins in Brazil is very likely not to observe DST from October....
|
||||
# http://conexaoto.com.br/2013/09/18/ministerio-confirma-que-tocantins-esta-fora-do-horario-de-verao-em-2013-mas-falta-publicacao-de-decreto
|
||||
# We will keep this article updated when this is confirmed:
|
||||
# http://www.timeanddate.com/news/time/brazil-starts-dst-2013.html
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
# Decree <a href="http://pcdsh01.on.br/HV20466.htm">20,466</a> (1931-10-01)
|
||||
# Decree <a href="http://pcdsh01.on.br/HV21896.htm">21,896</a> (1932-01-10)
|
||||
@ -1078,7 +1093,8 @@ Zone America/Araguaina -3:12:48 - LMT 1914
|
||||
-3:00 - BRT 1995 Sep 14
|
||||
-3:00 Brazil BR%sT 2003 Sep 24
|
||||
-3:00 - BRT 2012 Oct 21
|
||||
-3:00 Brazil BR%sT
|
||||
-3:00 Brazil BR%sT 2013 Sep
|
||||
-3:00 - BRT
|
||||
#
|
||||
# Alagoas (AL), Sergipe (SE)
|
||||
Zone America/Maceio -2:22:52 - LMT 1914
|
||||
@ -1373,12 +1389,12 @@ Zone America/Curacao -4:35:47 - LMT 1912 Feb 12 # Willemstad
|
||||
-4:00 - AST
|
||||
|
||||
# From Arthur David Olson (2011-06-15):
|
||||
# At least for now, use links for places with new iso3166 codes.
|
||||
# use links for places with new iso3166 codes.
|
||||
# The name "Lower Prince's Quarter" is both longer than fourteen charaters
|
||||
# and contains an apostrophe; use "Lower_Princes" below.
|
||||
|
||||
Link America/Curacao America/Lower_Princes # Sint Maarten
|
||||
Link America/Curacao America/Kralendijk # Bonaire, Sint Estatius and Saba
|
||||
Link America/Curacao America/Lower_Princes # Sint Maarten
|
||||
Link America/Curacao America/Kralendijk # Caribbean Netherlands
|
||||
|
||||
# Ecuador
|
||||
#
|
||||
@ -1519,10 +1535,16 @@ Zone America/Guyana -3:52:40 - LMT 1915 Mar # Georgetown
|
||||
-4:00 - GYT
|
||||
|
||||
# Paraguay
|
||||
#
|
||||
# From Paul Eggert (2006-03-22):
|
||||
# Shanks & Pottenger say that spring transitions are from 01:00 -> 02:00,
|
||||
# and autumn transitions are from 00:00 -> 23:00. Go with pre-1999
|
||||
# editions of Shanks, and with the IATA, who say transitions occur at 00:00.
|
||||
#
|
||||
# From Waldemar Villamayor-Venialbo (2013-09-20):
|
||||
# No time of the day is established for the adjustment, so people normally
|
||||
# adjust their clocks at 0 hour of the given dates.
|
||||
#
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule Para 1975 1988 - Oct 1 0:00 1:00 S
|
||||
Rule Para 1975 1978 - Mar 1 0:00 0 -
|
||||
@ -1656,6 +1678,19 @@ Zone America/Paramaribo -3:40:40 - LMT 1911
|
||||
Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2
|
||||
-4:00 - AST
|
||||
|
||||
Link America/Port_of_Spain America/Anguilla
|
||||
Link America/Port_of_Spain America/Dominica
|
||||
Link America/Port_of_Spain America/Grenada
|
||||
Link America/Port_of_Spain America/Guadeloupe
|
||||
Link America/Port_of_Spain America/Marigot
|
||||
Link America/Port_of_Spain America/Montserrat
|
||||
Link America/Port_of_Spain America/St_Barthelemy
|
||||
Link America/Port_of_Spain America/St_Kitts
|
||||
Link America/Port_of_Spain America/St_Lucia
|
||||
Link America/Port_of_Spain America/St_Thomas
|
||||
Link America/Port_of_Spain America/St_Vincent
|
||||
Link America/Port_of_Spain America/Tortola
|
||||
|
||||
# Uruguay
|
||||
# From Paul Eggert (1993-11-18):
|
||||
# Uruguay wins the prize for the strangest peacetime manipulation of the rules.
|
||||
@ -1673,7 +1708,7 @@ Rule Uruguay 1937 1941 - Mar lastSun 0:00 0 -
|
||||
# Whitman gives 1937 Oct 3; go with Shanks & Pottenger.
|
||||
Rule Uruguay 1937 1940 - Oct lastSun 0:00 0:30 HS
|
||||
# Whitman gives 1941 Oct 24 - 1942 Mar 27, 1942 Dec 14 - 1943 Apr 13,
|
||||
# and 1943 Apr 13 ``to present time''; go with Shanks & Pottenger.
|
||||
# and 1943 Apr 13 "to present time"; go with Shanks & Pottenger.
|
||||
Rule Uruguay 1941 only - Aug 1 0:00 0:30 HS
|
||||
Rule Uruguay 1942 only - Jan 1 0:00 0 -
|
||||
Rule Uruguay 1942 only - Dec 14 0:00 1:00 S
|
||||
|
||||
@ -26,27 +26,30 @@
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
#
|
||||
# From Paul Eggert (2013-05-27):
|
||||
# From Paul Eggert (2013-08-14):
|
||||
#
|
||||
# This file contains a table with the following columns:
|
||||
# 1. ISO 3166 2-character country code. See the file `iso3166.tab'.
|
||||
# This identifies a country that overlaps the zone. The country may
|
||||
# overlap other zones and the zone may overlap other countries.
|
||||
# 2. Latitude and longitude of the zone's principal location
|
||||
# This file contains a table where each row stands for an area that is
|
||||
# the intersection of a region identified by a country code and of a
|
||||
# zone where civil clocks have agreed since 1970. The columns of the
|
||||
# table are as follows:
|
||||
#
|
||||
# 1. ISO 3166 2-character country code. See the file 'iso3166.tab'.
|
||||
# 2. Latitude and longitude of the area's principal location
|
||||
# in ISO 6709 sign-degrees-minutes-seconds format,
|
||||
# either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
|
||||
# first latitude (+ is north), then longitude (+ is east).
|
||||
# This location need not lie within the column-1 country.
|
||||
# 3. Zone name used in value of TZ environment variable.
|
||||
# Please see the 'Theory' file for how zone names are chosen.
|
||||
# If multiple zones overlap a country, each has a row in the
|
||||
# table, with column 1 being duplicated.
|
||||
# 4. Comments; present if and only if the country has multiple rows.
|
||||
#
|
||||
# Columns are separated by a single tab.
|
||||
# The table is sorted first by country, then an order within the country that
|
||||
# (1) makes some geographical sense, and
|
||||
# (2) puts the most populous zones first, where that does not contradict (1).
|
||||
# (2) puts the most populous areas first, where that does not contradict (1).
|
||||
#
|
||||
# Lines beginning with `#' are comments.
|
||||
# Lines beginning with '#' are comments.
|
||||
#
|
||||
# This table is intended as an aid for users, to help them select time
|
||||
# zone data appropriate for their practical needs. It is not intended
|
||||
@ -62,8 +65,7 @@ AI +1812-06304 America/Anguilla
|
||||
AL +4120+01950 Europe/Tirane
|
||||
AM +4011+04430 Asia/Yerevan
|
||||
AO -0848+01314 Africa/Luanda
|
||||
AQ -7750+16636 Antarctica/McMurdo McMurdo Station, Ross Island
|
||||
AQ -9000+00000 Antarctica/South_Pole Amundsen-Scott Station, South Pole
|
||||
AQ -7750+16636 Antarctica/McMurdo McMurdo, South Pole, Scott (New Zealand time)
|
||||
AQ -6734-06808 Antarctica/Rothera Rothera Station, Adelaide Island
|
||||
AQ -6448-06406 Antarctica/Palmer Palmer Station, Anvers Island
|
||||
AQ -6736+06253 Antarctica/Mawson Mawson Station, Holme Bay
|
||||
@ -143,8 +145,7 @@ CA +4612-05957 America/Glace_Bay Atlantic Time - Nova Scotia - places that did n
|
||||
CA +4606-06447 America/Moncton Atlantic Time - New Brunswick
|
||||
CA +5320-06025 America/Goose_Bay Atlantic Time - Labrador - most locations
|
||||
CA +5125-05707 America/Blanc-Sablon Atlantic Standard Time - Quebec - Lower North Shore
|
||||
CA +4531-07334 America/Montreal Eastern Time - Quebec - most locations
|
||||
CA +4339-07923 America/Toronto Eastern Time - Ontario - most locations
|
||||
CA +4339-07923 America/Toronto Eastern Time - Ontario & Quebec - most locations
|
||||
CA +4901-08816 America/Nipigon Eastern Time - Ontario & Quebec - places that did not observe DST 1967-1973
|
||||
CA +4823-08915 America/Thunder_Bay Eastern Time - Thunder Bay, Ontario
|
||||
CA +6344-06828 America/Iqaluit Eastern Time - east Nunavut - most locations
|
||||
@ -255,7 +256,7 @@ IR +3540+05126 Asia/Tehran
|
||||
IS +6409-02151 Atlantic/Reykjavik
|
||||
IT +4154+01229 Europe/Rome
|
||||
JE +4912-00207 Europe/Jersey
|
||||
JM +1800-07648 America/Jamaica
|
||||
JM +175805-0764736 America/Jamaica
|
||||
JO +3157+03556 Asia/Amman
|
||||
JP +353916+1394441 Asia/Tokyo
|
||||
KE -0117+03649 Africa/Nairobi
|
||||
@ -444,8 +445,7 @@ US +465042-1012439 America/North_Dakota/New_Salem Central Time - North Dakota -
|
||||
US +471551-1014640 America/North_Dakota/Beulah Central Time - North Dakota - Mercer County
|
||||
US +394421-1045903 America/Denver Mountain Time
|
||||
US +433649-1161209 America/Boise Mountain Time - south Idaho & east Oregon
|
||||
US +364708-1084111 America/Shiprock Mountain Time - Navajo
|
||||
US +332654-1120424 America/Phoenix Mountain Standard Time - Arizona
|
||||
US +332654-1120424 America/Phoenix Mountain Standard Time - Arizona (except Navajo)
|
||||
US +340308-1181434 America/Los_Angeles Pacific Time
|
||||
US +611305-1495401 America/Anchorage Alaska Time
|
||||
US +581807-1342511 America/Juneau Alaska Time - Alaska panhandle
|
||||
|
||||
@ -173,6 +173,12 @@ class JarMetaIndex {
|
||||
*/
|
||||
private HashMap<String, HashSet<String>> knownPrefixMap = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Special value for the HashSet to indicate that there are classes in
|
||||
* the top-level package.
|
||||
*/
|
||||
private static final String TOP_LEVEL = "TOP";
|
||||
|
||||
/*
|
||||
* A class for mapping package prefixes to the number of
|
||||
* levels of package elements to include.
|
||||
@ -212,7 +218,7 @@ class JarMetaIndex {
|
||||
|
||||
|
||||
/*
|
||||
* We add maximum 5 second level entries to "sun", "java" and
|
||||
* We add maximum 5 second level entries to "sun", "jdk", "java" and
|
||||
* "javax" entries. Tune this parameter to get a balance on the
|
||||
* cold start and footprint.
|
||||
*/
|
||||
@ -223,6 +229,7 @@ class JarMetaIndex {
|
||||
JarMetaIndex(String fileName) throws IOException {
|
||||
jar = new JarFile(fileName);
|
||||
knownPrefixMap.put("sun", new HashSet<String>());
|
||||
knownPrefixMap.put("jdk", new HashSet<String>());
|
||||
knownPrefixMap.put("java", new HashSet<String>());
|
||||
knownPrefixMap.put("javax", new HashSet<String>());
|
||||
}
|
||||
@ -336,12 +343,12 @@ class JarMetaIndex {
|
||||
return false;
|
||||
}
|
||||
|
||||
String secondPkgElement = name.substring(firstSlashIndex + 1,
|
||||
name.indexOf("/",
|
||||
firstSlashIndex + 1));
|
||||
|
||||
/* Add the second level package name to the corresponding hashset. */
|
||||
if (secondPkgElement != null) {
|
||||
int secondSlashIndex = name.indexOf("/", firstSlashIndex+1);
|
||||
if (secondSlashIndex == -1) {
|
||||
pkgSet.add(TOP_LEVEL);
|
||||
} else {
|
||||
String secondPkgElement = name.substring(firstSlashIndex+1, secondSlashIndex);
|
||||
pkgSet.add(secondPkgElement);
|
||||
}
|
||||
|
||||
@ -368,8 +375,9 @@ class JarMetaIndex {
|
||||
if (setSize == 0) {
|
||||
continue;
|
||||
}
|
||||
else if (setSize > JarMetaIndex.MAX_PKGS_WITH_KNOWN_PREFIX) {
|
||||
indexSet.add(key + "/");
|
||||
if (setSize > JarMetaIndex.MAX_PKGS_WITH_KNOWN_PREFIX ||
|
||||
pkgSetStartsWithKey.contains(TOP_LEVEL)) {
|
||||
indexSet.add(key + "/");
|
||||
} else {
|
||||
/* If the set contains less than MAX_PKGS_WITH_KNOWN_PREFIX, add
|
||||
* them to the indexSet of the MetaIndex object.
|
||||
|
||||
@ -52,8 +52,7 @@ endif
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
ORIGIN_ARG:=$(call SET_EXECUTABLE_ORIGIN)
|
||||
else
|
||||
ORIGIN_ARG:=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli) \
|
||||
$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli)
|
||||
ORIGIN_ARG:=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli)
|
||||
endif
|
||||
|
||||
#
|
||||
@ -62,8 +61,7 @@ endif
|
||||
# devloper documentation of JAWT and what worked with OpenJDK6.
|
||||
#
|
||||
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),)
|
||||
ORIGIN_ARG+=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)) \
|
||||
$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR))
|
||||
ORIGIN_ARG+=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR))
|
||||
endif
|
||||
|
||||
define SetupLauncher
|
||||
|
||||
@ -559,11 +559,7 @@ endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||
LIBAWT_FILES += awt_LoadLibrary.c img_colors.c
|
||||
LIBAWT_DIRS += $(JDK_TOPDIR)/src/macosx/native/com/apple/resources
|
||||
LIBAWT_FILES += awt_LoadLibrary.c MacOSXResourceBundle.m
|
||||
LIBAWT_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks
|
||||
|
||||
LIBAWT_MacOSXResourceBundle.m_CFLAGS:=-O0
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
|
||||
|
||||
@ -983,8 +983,6 @@ ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||
JARINDEX:=true))
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
||||
# This file is imported from hotspot in Import.gmk. Copying it into images/lib so that
|
||||
# all jars can be found in one place when creating images in Images.gmk. It needs to be
|
||||
# done here so that clean targets can be simple and accurate.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, 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
|
||||
@ -44,17 +44,17 @@ TEXT_SOURCES = $(TEXT_PKG)/BreakIteratorRules.java \
|
||||
BREAK_ITERATOR_DIR = $(JDK_OUTPUTDIR)/break_iterator
|
||||
BREAK_ITERATOR_CLASSES = $(BREAK_ITERATOR_DIR)/classes
|
||||
|
||||
# JAVAC_SOURCE_PATH_UGLY_OVERRIDE is set to isolate the compile to just those
|
||||
# JAVAC_SOURCE_PATH_OVERRIDE is set to isolate the compile to just those
|
||||
# two files in that directory and not get anything implicit from
|
||||
# surrounding directories which aren't jdk 6 compatible.
|
||||
# Because we are targeting jdk 6, but the surrounding source code is jdk 7. Ugh.
|
||||
# surrounding directories which aren't jdk N-1 compatible.
|
||||
# Because we are targeting jdk N-1, but the surrounding source code is jdk N.
|
||||
# These two files should be moved out to a build tool! We have to disable
|
||||
# sjavac here as well.
|
||||
$(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR,\
|
||||
SETUP:=GENERATE_OLDBYTECODE,\
|
||||
SRC:=$(TEXT_SRCDIR),\
|
||||
DISABLE_SJAVAC:=true,\
|
||||
JAVAC_SOURCE_PATH_UGLY_OVERRIDE:=$(TEXT_SRCDIR)/$(TEXT_PKG),\
|
||||
JAVAC_SOURCE_PATH_OVERRIDE := $(TEXT_SRCDIR)/$(TEXT_PKG), \
|
||||
INCLUDES:=$(TEXT_PKG),\
|
||||
INCLUDE_FILES:=$(TEXT_SOURCES),\
|
||||
BIN:=$(BREAK_ITERATOR_CLASSES)))
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, 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
|
||||
@ -28,12 +28,33 @@ default: all
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include RMICompilation.gmk
|
||||
include JavaCompilation.gmk
|
||||
include Setup.gmk
|
||||
|
||||
# To ensure the latest stub generator files are picked up from corba repo
|
||||
# when available, we need to run with latest rmic version available.
|
||||
ifneq ($(COMPILE_TYPE),cross)
|
||||
RMIC := $(FIXPATH) $(JDK_OUTPUTDIR)/bin/rmic
|
||||
endif
|
||||
##########################################################################################
|
||||
|
||||
RMIC_PKGS := \
|
||||
sun/rmi/rmic \
|
||||
sun/tools/asm \
|
||||
sun/tools/java \
|
||||
sun/tools/javac \
|
||||
sun/tools/tree \
|
||||
sun/tools/util \
|
||||
#
|
||||
|
||||
$(eval $(call SetupJavaCompilation,BUILD_BOOTSTRAP_RMIC, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(JDK_TOPDIR)/src/share/classes, \
|
||||
INCLUDES := $(RMIC_PKGS), \
|
||||
BIN := $(JDK_OUTPUTDIR)/btclasses_rmic, \
|
||||
COPY := .properties, \
|
||||
JAVAC_SOURCE_PATH_OVERRIDE := $(addprefix $(JDK_TOPDIR)/src/share/classes/, $(RMIC_PKGS))))
|
||||
|
||||
##########################################################################################
|
||||
|
||||
BTRMIC_CP := $(CORBA_OUTPUTDIR)/btjars/btcorba.jar$(PATH_SEP)$(JDK_OUTPUTDIR)/btclasses_rmic$(PATH_SEP)$(BOOTSTRAP_JAVAC_JAR)
|
||||
BTRMIC_ARGS := "-Xbootclasspath/p:$(BTRMIC_CP)" -cp "$(BTRMIC_CP)"
|
||||
RMIC := $(JAVA) $(BTRMIC_ARGS) sun.rmi.rmic.Main
|
||||
|
||||
CLASSES_DIR := $(JDK_OUTPUTDIR)/classes
|
||||
# NOTE: If the smart javac dependency management is reintroduced, these classes risk
|
||||
@ -91,6 +112,8 @@ GENCLASSES += $(filter %.java,$(RMI_SRC))
|
||||
|
||||
##########################################################################################
|
||||
|
||||
$(RMI_12) $(RMI_11) $(RMI_IIOP) $(RMI_SRC): $(BUILD_BOOTSTRAP_RMIC)
|
||||
|
||||
$(RMIC_GENSRC_DIR)/_the.classes.removed: $(GENCLASSES)
|
||||
$(FIND) $(RMIC_GENSRC_DIR) -name "*.class" $(FIND_DELETE)
|
||||
$(TOUCH) $@
|
||||
|
||||
@ -238,6 +238,11 @@ ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
JDK_LIB_FILES += jexec
|
||||
endif
|
||||
|
||||
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),) # If Linux or Solaris
|
||||
JDK_LIB_FILES += $(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
|
||||
$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)
|
||||
endif
|
||||
|
||||
# Find all files to copy from $(JDK_OUTPUTDIR)/lib
|
||||
# Jar files are not expected to be here
|
||||
ALL_JDKOUT_LIB_LIST := $(call not-containing,_the.,$(filter-out %.jar,\
|
||||
|
||||
@ -29,13 +29,18 @@ DISABLE_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-de
|
||||
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
|
||||
JAVAC_WARNINGS:=-Xlint:-unchecked,-deprecation,-overrides,classfile,dep-ann,divzero,varargs -Werror
|
||||
|
||||
# Any java code executed during a JDK build to build other parts of the JDK must be
|
||||
# executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this
|
||||
# purpose must be built with -target PREVIOUS for bootstrapping purposes, which
|
||||
# requires restricting to language level and api of previous JDK.
|
||||
#
|
||||
# The generate old bytecode javac setup uses the new compiler to compile for the
|
||||
# boot jdk to generate tools that need to be run with the boot jdk.
|
||||
# Thus we force the target bytecode to 7.
|
||||
# Thus we force the target bytecode to the previous JDK version.
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE,\
|
||||
JVM:=$(JAVA),\
|
||||
JAVAC:=$(NEW_JAVAC),\
|
||||
FLAGS:=-source 7 -target 7 -bootclasspath $(BOOT_RTJAR) $(DISABLE_WARNINGS),\
|
||||
FLAGS := $(BOOT_JDK_SOURCETARGET) -bootclasspath $(BOOT_RTJAR) $(DISABLE_WARNINGS), \
|
||||
SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
|
||||
SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@ SUNWprivate_1.1 {
|
||||
Java_sun_management_GcInfoBuilder_fillGcAttributeInfo;
|
||||
Java_sun_management_GcInfoBuilder_getLastGcInfo0;
|
||||
Java_sun_management_GcInfoBuilder_getNumGcExtAttributes;
|
||||
Java_sun_management_HotSpotDiagnostic_dumpHeap;
|
||||
Java_sun_management_HotSpotDiagnostic_dumpHeap0;
|
||||
Java_sun_management_HotspotThread_getInternalThreadCount;
|
||||
Java_sun_management_HotspotThread_getInternalThreadTimes0;
|
||||
Java_sun_management_MemoryImpl_getMemoryManagers0;
|
||||
|
||||
@ -155,7 +155,7 @@ public class AppleScriptEngine implements ScriptEngine {
|
||||
TRACE("init()");
|
||||
// set up our context
|
||||
/* TODO -- name of current executable? bad java documentation at:
|
||||
* http://java.sun.com/javase/6/docs/api/javax/script/ScriptEngine.html#FILENAME */
|
||||
* http://docs.oracle.com/javase/6/docs/api/javax/script/ScriptEngine.html#FILENAME */
|
||||
put(ScriptEngine.FILENAME, "");
|
||||
put(ScriptEngine.ENGINE, getEngine());
|
||||
put(ScriptEngine.ENGINE_VERSION, getEngineVersion());
|
||||
|
||||
@ -31,10 +31,6 @@ import java.util.*;
|
||||
|
||||
import com.apple.eawt.AppEvent.*;
|
||||
|
||||
interface _OpenAppHandler {
|
||||
void handleOpenApp();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
class _AppEventLegacyHandler implements AboutHandler, PreferencesHandler, _OpenAppHandler, AppReOpenedListener, OpenFilesHandler, PrintFilesHandler, QuitHandler {
|
||||
final _AppEventHandler parent;
|
||||
|
||||
30
jdk/src/macosx/classes/com/apple/eawt/_OpenAppHandler.java
Normal file
30
jdk/src/macosx/classes/com/apple/eawt/_OpenAppHandler.java
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 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;
|
||||
|
||||
interface _OpenAppHandler {
|
||||
void handleOpenApp();
|
||||
}
|
||||
@ -25,141 +25,11 @@
|
||||
|
||||
package com.apple.laf;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.plaf.UIResource;
|
||||
|
||||
import sun.swing.SwingUtilities2;
|
||||
|
||||
class AquaComboBoxRenderer extends AquaComboBoxRendererInternal implements UIResource {
|
||||
public AquaComboBoxRenderer(final JComboBox comboBox) {
|
||||
super(comboBox);
|
||||
}
|
||||
}
|
||||
|
||||
class AquaComboBoxRendererInternal extends JLabel implements ListCellRenderer {
|
||||
final JComboBox fComboBox;
|
||||
boolean fSelected;
|
||||
boolean fChecked;
|
||||
boolean fInList;
|
||||
boolean fEditable;
|
||||
boolean fDrawCheckedItem = true;
|
||||
|
||||
// Provides space for a checkbox, and is translucent
|
||||
public AquaComboBoxRendererInternal(final JComboBox comboBox) {
|
||||
super();
|
||||
fComboBox = comboBox;
|
||||
}
|
||||
|
||||
// Don't include checkIcon space, because this is also used for button size calculations
|
||||
// - the popup-size calc will get checkIcon space from getInsets
|
||||
public Dimension getPreferredSize() {
|
||||
// From BasicComboBoxRenderer - trick to avoid zero-height items
|
||||
final Dimension size;
|
||||
|
||||
final String text = getText();
|
||||
if ((text == null) || ("".equals(text))) {
|
||||
setText(" ");
|
||||
size = super.getPreferredSize();
|
||||
setText("");
|
||||
} else {
|
||||
size = super.getPreferredSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
// Don't paint the border here, it gets painted by the UI
|
||||
protected void paintBorder(final Graphics g) {
|
||||
|
||||
}
|
||||
|
||||
public int getBaseline(int width, int height) {
|
||||
return super.getBaseline(width, height) - 1;
|
||||
}
|
||||
|
||||
// Really means is the one with the mouse over it
|
||||
public Component getListCellRendererComponent(final JList list, final Object value, int index, final boolean isSelected, final boolean cellHasFocus) {
|
||||
fInList = (index >= 0); // When the button wants the item painted, it passes in -1
|
||||
fSelected = isSelected;
|
||||
if (index < 0) {
|
||||
index = fComboBox.getSelectedIndex();
|
||||
}
|
||||
|
||||
// changed this to not ask for selected index but directly compare the current item and selected item
|
||||
// different from basic because basic has no concept of checked, just has the last one selected,
|
||||
// and the user changes selection. We have selection and a check mark.
|
||||
// we used to call fComboBox.getSelectedIndex which ends up being a very bad call for large checkboxes
|
||||
// it does a linear compare of every object in the checkbox until it finds the selected one, so if
|
||||
// we have a 5000 element list we will 5000 * (selected index) .equals() of objects.
|
||||
// See Radar #3141307
|
||||
|
||||
// Fix for Radar # 3204287 where we ask for an item at a negative index!
|
||||
if (index >= 0) {
|
||||
final Object item = fComboBox.getItemAt(index);
|
||||
fChecked = fInList && item != null && item.equals(fComboBox.getSelectedItem());
|
||||
} else {
|
||||
fChecked = false;
|
||||
}
|
||||
|
||||
fEditable = fComboBox.isEditable();
|
||||
if (isSelected) {
|
||||
if (fEditable) {
|
||||
setBackground(UIManager.getColor("List.selectionBackground"));
|
||||
setForeground(UIManager.getColor("List.selectionForeground"));
|
||||
} else {
|
||||
setBackground(list.getSelectionBackground());
|
||||
setForeground(list.getSelectionForeground());
|
||||
}
|
||||
} else {
|
||||
if (fEditable) {
|
||||
setBackground(UIManager.getColor("List.background"));
|
||||
setForeground(UIManager.getColor("List.foreground"));
|
||||
} else {
|
||||
setBackground(list.getBackground());
|
||||
setForeground(list.getForeground());
|
||||
}
|
||||
}
|
||||
|
||||
setFont(list.getFont());
|
||||
|
||||
if (value instanceof Icon) {
|
||||
setIcon((Icon)value);
|
||||
} else {
|
||||
setText((value == null) ? " " : value.toString());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Insets getInsets(Insets insets) {
|
||||
if (insets == null) insets = new Insets(0, 0, 0, 0);
|
||||
insets.top = 1;
|
||||
insets.bottom = 1;
|
||||
insets.right = 5;
|
||||
insets.left = (fInList && !fEditable ? 16 + 7 : 5);
|
||||
return insets;
|
||||
}
|
||||
|
||||
protected void setDrawCheckedItem(final boolean drawCheckedItem) {
|
||||
this.fDrawCheckedItem = drawCheckedItem;
|
||||
}
|
||||
|
||||
// Paint this component, and a checkbox if it's the selected item and not in the button
|
||||
protected void paintComponent(final Graphics g) {
|
||||
if (fInList) {
|
||||
if (fSelected && !fEditable) {
|
||||
AquaMenuPainter.instance().paintSelectedMenuItemBackground(g, getWidth(), getHeight());
|
||||
} else {
|
||||
g.setColor(getBackground());
|
||||
g.fillRect(0, 0, getWidth(), getHeight());
|
||||
}
|
||||
|
||||
if (fChecked && !fEditable && fDrawCheckedItem) {
|
||||
final int y = getHeight() - 4;
|
||||
g.setColor(getForeground());
|
||||
SwingUtilities2.drawString(fComboBox, g, "\u2713", 6, y);
|
||||
}
|
||||
}
|
||||
super.paintComponent(g);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,157 @@
|
||||
/*
|
||||
* Copyright (c) 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.laf;
|
||||
|
||||
import sun.swing.SwingUtilities2;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
class AquaComboBoxRendererInternal extends JLabel implements ListCellRenderer {
|
||||
final JComboBox fComboBox;
|
||||
boolean fSelected;
|
||||
boolean fChecked;
|
||||
boolean fInList;
|
||||
boolean fEditable;
|
||||
boolean fDrawCheckedItem = true;
|
||||
|
||||
// Provides space for a checkbox, and is translucent
|
||||
public AquaComboBoxRendererInternal(final JComboBox comboBox) {
|
||||
super();
|
||||
fComboBox = comboBox;
|
||||
}
|
||||
|
||||
// Don't include checkIcon space, because this is also used for button size calculations
|
||||
// - the popup-size calc will get checkIcon space from getInsets
|
||||
public Dimension getPreferredSize() {
|
||||
// From BasicComboBoxRenderer - trick to avoid zero-height items
|
||||
final Dimension size;
|
||||
|
||||
final String text = getText();
|
||||
if ((text == null) || ("".equals(text))) {
|
||||
setText(" ");
|
||||
size = super.getPreferredSize();
|
||||
setText("");
|
||||
} else {
|
||||
size = super.getPreferredSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
// Don't paint the border here, it gets painted by the UI
|
||||
protected void paintBorder(final Graphics g) {
|
||||
|
||||
}
|
||||
|
||||
public int getBaseline(int width, int height) {
|
||||
return super.getBaseline(width, height) - 1;
|
||||
}
|
||||
|
||||
// Really means is the one with the mouse over it
|
||||
public Component getListCellRendererComponent(final JList list, final Object value, int index, final boolean isSelected, final boolean cellHasFocus) {
|
||||
fInList = (index >= 0); // When the button wants the item painted, it passes in -1
|
||||
fSelected = isSelected;
|
||||
if (index < 0) {
|
||||
index = fComboBox.getSelectedIndex();
|
||||
}
|
||||
|
||||
// changed this to not ask for selected index but directly compare the current item and selected item
|
||||
// different from basic because basic has no concept of checked, just has the last one selected,
|
||||
// and the user changes selection. We have selection and a check mark.
|
||||
// we used to call fComboBox.getSelectedIndex which ends up being a very bad call for large checkboxes
|
||||
// it does a linear compare of every object in the checkbox until it finds the selected one, so if
|
||||
// we have a 5000 element list we will 5000 * (selected index) .equals() of objects.
|
||||
// See Radar #3141307
|
||||
|
||||
// Fix for Radar # 3204287 where we ask for an item at a negative index!
|
||||
if (index >= 0) {
|
||||
final Object item = fComboBox.getItemAt(index);
|
||||
fChecked = fInList && item != null && item.equals(fComboBox.getSelectedItem());
|
||||
} else {
|
||||
fChecked = false;
|
||||
}
|
||||
|
||||
fEditable = fComboBox.isEditable();
|
||||
if (isSelected) {
|
||||
if (fEditable) {
|
||||
setBackground(UIManager.getColor("List.selectionBackground"));
|
||||
setForeground(UIManager.getColor("List.selectionForeground"));
|
||||
} else {
|
||||
setBackground(list.getSelectionBackground());
|
||||
setForeground(list.getSelectionForeground());
|
||||
}
|
||||
} else {
|
||||
if (fEditable) {
|
||||
setBackground(UIManager.getColor("List.background"));
|
||||
setForeground(UIManager.getColor("List.foreground"));
|
||||
} else {
|
||||
setBackground(list.getBackground());
|
||||
setForeground(list.getForeground());
|
||||
}
|
||||
}
|
||||
|
||||
setFont(list.getFont());
|
||||
|
||||
if (value instanceof Icon) {
|
||||
setIcon((Icon)value);
|
||||
} else {
|
||||
setText((value == null) ? " " : value.toString());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Insets getInsets(Insets insets) {
|
||||
if (insets == null) insets = new Insets(0, 0, 0, 0);
|
||||
insets.top = 1;
|
||||
insets.bottom = 1;
|
||||
insets.right = 5;
|
||||
insets.left = (fInList && !fEditable ? 16 + 7 : 5);
|
||||
return insets;
|
||||
}
|
||||
|
||||
protected void setDrawCheckedItem(final boolean drawCheckedItem) {
|
||||
this.fDrawCheckedItem = drawCheckedItem;
|
||||
}
|
||||
|
||||
// Paint this component, and a checkbox if it's the selected item and not in the button
|
||||
protected void paintComponent(final Graphics g) {
|
||||
if (fInList) {
|
||||
if (fSelected && !fEditable) {
|
||||
AquaMenuPainter.instance().paintSelectedMenuItemBackground(g, getWidth(), getHeight());
|
||||
} else {
|
||||
g.setColor(getBackground());
|
||||
g.fillRect(0, 0, getWidth(), getHeight());
|
||||
}
|
||||
|
||||
if (fChecked && !fEditable && fDrawCheckedItem) {
|
||||
final int y = getHeight() - 4;
|
||||
g.setColor(getForeground());
|
||||
SwingUtilities2.drawString(fComboBox, g, "\u2713", 6, y);
|
||||
}
|
||||
}
|
||||
super.paintComponent(g);
|
||||
}
|
||||
}
|
||||
@ -281,12 +281,16 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
actionMap.put("aquaSelectPageUp", highlightPageUpAction);
|
||||
actionMap.put("aquaSelectPageDown", highlightPageDownAction);
|
||||
|
||||
actionMap.put("aquaHidePopup", hideAction);
|
||||
|
||||
SwingUtilities.replaceUIActionMap(comboBox, actionMap);
|
||||
}
|
||||
|
||||
abstract class ComboBoxAction extends AbstractAction {
|
||||
private abstract class ComboBoxAction extends AbstractAction {
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
if (!comboBox.isEnabled() || !comboBox.isShowing()) return;
|
||||
if (!comboBox.isEnabled() || !comboBox.isShowing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (comboBox.isPopupVisible()) {
|
||||
final AquaComboBoxUI ui = (AquaComboBoxUI)comboBox.getUI();
|
||||
@ -302,7 +306,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
/**
|
||||
* Hilight _but do not select_ the next item in the list.
|
||||
*/
|
||||
Action highlightNextAction = new ComboBoxAction() {
|
||||
private Action highlightNextAction = new ComboBoxAction() {
|
||||
@Override
|
||||
public void performComboBoxAction(AquaComboBoxUI ui) {
|
||||
final int si = listBox.getSelectedIndex();
|
||||
@ -318,7 +322,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
/**
|
||||
* Hilight _but do not select_ the previous item in the list.
|
||||
*/
|
||||
Action highlightPreviousAction = new ComboBoxAction() {
|
||||
private Action highlightPreviousAction = new ComboBoxAction() {
|
||||
@Override
|
||||
void performComboBoxAction(final AquaComboBoxUI ui) {
|
||||
final int si = listBox.getSelectedIndex();
|
||||
@ -330,7 +334,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
}
|
||||
};
|
||||
|
||||
Action highlightFirstAction = new ComboBoxAction() {
|
||||
private Action highlightFirstAction = new ComboBoxAction() {
|
||||
@Override
|
||||
void performComboBoxAction(final AquaComboBoxUI ui) {
|
||||
listBox.setSelectedIndex(0);
|
||||
@ -338,7 +342,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
}
|
||||
};
|
||||
|
||||
Action highlightLastAction = new ComboBoxAction() {
|
||||
private Action highlightLastAction = new ComboBoxAction() {
|
||||
@Override
|
||||
void performComboBoxAction(final AquaComboBoxUI ui) {
|
||||
final int size = listBox.getModel().getSize();
|
||||
@ -347,7 +351,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
}
|
||||
};
|
||||
|
||||
Action highlightPageUpAction = new ComboBoxAction() {
|
||||
private Action highlightPageUpAction = new ComboBoxAction() {
|
||||
@Override
|
||||
void performComboBoxAction(final AquaComboBoxUI ui) {
|
||||
final int current = listBox.getSelectedIndex();
|
||||
@ -367,7 +371,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
}
|
||||
};
|
||||
|
||||
Action highlightPageDownAction = new ComboBoxAction() {
|
||||
private Action highlightPageDownAction = new ComboBoxAction() {
|
||||
@Override
|
||||
void performComboBoxAction(final AquaComboBoxUI ui) {
|
||||
final int current = listBox.getSelectedIndex();
|
||||
@ -482,13 +486,13 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
|
||||
// This is somewhat messy. The difference here from BasicComboBoxUI.EnterAction is that
|
||||
// arrow up or down does not automatically select the
|
||||
static final Action triggerSelectionAction = new AbstractAction() {
|
||||
private static final Action triggerSelectionAction = new AbstractAction() {
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
triggerSelectionEvent((JComboBox)e.getSource(), e);
|
||||
}
|
||||
};
|
||||
|
||||
static final Action toggleSelectionAction = new AbstractAction() {
|
||||
private static final Action toggleSelectionAction = new AbstractAction() {
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
final JComboBox comboBox = (JComboBox)e.getSource();
|
||||
if (!comboBox.isEnabled()) return;
|
||||
@ -506,6 +510,18 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
}
|
||||
};
|
||||
|
||||
private static Action hideAction = new AbstractAction() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
final JComboBox comboBox = (JComboBox)e.getSource();
|
||||
|
||||
if (comboBox.isPopupVisible()) {
|
||||
comboBox.firePopupMenuCanceled();
|
||||
comboBox.setPopupVisible(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public void applySizeFor(final JComponent c, final Size size) {
|
||||
if (arrowButton == null) return;
|
||||
final Border border = arrowButton.getBorder();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 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
|
||||
@ -209,7 +209,7 @@ public class AquaKeyBindings {
|
||||
|
||||
LateBoundInputMap getComboBoxInputMap() {
|
||||
return new LateBoundInputMap(new SimpleBinding(new String[] {
|
||||
"ESCAPE", "hidePopup",
|
||||
"ESCAPE", "aquaHidePopup",
|
||||
"PAGE_UP", "aquaSelectPageUp",
|
||||
"PAGE_DOWN", "aquaSelectPageDown",
|
||||
"HOME", "aquaSelectHome",
|
||||
|
||||
@ -37,8 +37,6 @@ import javax.swing.plaf.basic.BasicLookAndFeel;
|
||||
import sun.swing.*;
|
||||
import apple.laf.*;
|
||||
|
||||
import com.apple.resources.MacOSXResourceBundle;
|
||||
|
||||
public class AquaLookAndFeel extends BasicLookAndFeel {
|
||||
static final String sOldPropertyPrefix = "com.apple.macos."; // old prefix for things like 'useScreenMenuBar'
|
||||
static final String sPropertyPrefix = "apple.laf."; // new prefix for things like 'useScreenMenuBar'
|
||||
@ -252,7 +250,7 @@ public class AquaLookAndFeel extends BasicLookAndFeel {
|
||||
table.setDefaultLocale(Locale.getDefault());
|
||||
table.addResourceBundle(PKG_PREFIX + "resources.aqua");
|
||||
try {
|
||||
final ResourceBundle aquaProperties = MacOSXResourceBundle.getMacResourceBundle(PKG_PREFIX + "resources.aqua");
|
||||
final ResourceBundle aquaProperties = ResourceBundle.getBundle(PKG_PREFIX + "resources.aqua");
|
||||
final Enumeration<String> propertyKeys = aquaProperties.getKeys();
|
||||
|
||||
while (propertyKeys.hasMoreElements()) {
|
||||
|
||||
@ -73,8 +73,9 @@ public class AquaMenuBarUI extends BasicMenuBarUI implements ScreenMenuBarProvid
|
||||
|
||||
public Dimension getPreferredSize(final JComponent c) {
|
||||
if (isScreenMenuBar((JMenuBar)c)) {
|
||||
if (setScreenMenuBar((JFrame)(c.getTopLevelAncestor()))) ;
|
||||
return new Dimension(0, 0);
|
||||
if (setScreenMenuBar((JFrame)(c.getTopLevelAncestor()))) {
|
||||
return new Dimension(0, 0);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 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
|
||||
@ -29,6 +29,7 @@ import java.awt.*;
|
||||
import java.awt.image.*;
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.lang.reflect.Method;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.*;
|
||||
|
||||
@ -41,56 +42,68 @@ import sun.awt.AppContext;
|
||||
import sun.lwawt.macosx.CImage;
|
||||
import sun.lwawt.macosx.CImage.Creator;
|
||||
import sun.lwawt.macosx.CPlatformWindow;
|
||||
import sun.misc.Launcher;
|
||||
import sun.reflect.misc.ReflectUtil;
|
||||
import sun.security.action.GetPropertyAction;
|
||||
import sun.swing.SwingUtilities2;
|
||||
|
||||
import com.apple.laf.AquaImageFactory.SlicedImageControl;
|
||||
|
||||
public class AquaUtils {
|
||||
final static String ANIMATIONS_SYSTEM_PROPERTY = "swing.enableAnimations";
|
||||
final class AquaUtils {
|
||||
|
||||
/*
|
||||
private static final String ANIMATIONS_PROPERTY = "swing.enableAnimations";
|
||||
|
||||
/**
|
||||
* Suppresses default constructor, ensuring non-instantiability.
|
||||
*/
|
||||
private AquaUtils() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience function for determining ComponentOrientation. Helps us
|
||||
* avoid having Munge directives throughout the code.
|
||||
*/
|
||||
public static boolean isLeftToRight(final Component c) {
|
||||
static boolean isLeftToRight(final Component c) {
|
||||
return c.getComponentOrientation().isLeftToRight();
|
||||
}
|
||||
|
||||
public static void enforceComponentOrientation(Component c, ComponentOrientation orientation) {
|
||||
static void enforceComponentOrientation(final Component c, final ComponentOrientation orientation) {
|
||||
c.setComponentOrientation(orientation);
|
||||
if (c instanceof Container) {
|
||||
for (Component child : ((Container)c).getComponents()) {
|
||||
for (final Component child : ((Container)c).getComponents()) {
|
||||
enforceComponentOrientation(child, orientation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static CImage.Creator getCImageCreatorInternal() {
|
||||
return java.security.AccessController.doPrivileged(new PrivilegedAction<CImage.Creator>() {
|
||||
private static Creator getCImageCreatorInternal() {
|
||||
return AccessController.doPrivileged(new PrivilegedAction<Creator>() {
|
||||
@Override
|
||||
public Creator run() {
|
||||
try {
|
||||
final Method getCreatorMethod = CImage.class.getDeclaredMethod("getCreator", new Class[] {});
|
||||
getCreatorMethod.setAccessible(true);
|
||||
return (CImage.Creator)getCreatorMethod.invoke(null, new Object[] {});
|
||||
} catch (final Exception e) {
|
||||
return (Creator)getCreatorMethod.invoke(null, new Object[] {});
|
||||
} catch (final Exception ignored) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static final RecyclableSingleton<CImage.Creator> cImageCreator = new RecyclableSingleton<CImage.Creator>() {
|
||||
private static final RecyclableSingleton<Creator> cImageCreator = new RecyclableSingleton<Creator>() {
|
||||
@Override
|
||||
protected Creator getInstance() {
|
||||
return getCImageCreatorInternal();
|
||||
}
|
||||
};
|
||||
static CImage.Creator getCImageCreator() {
|
||||
static Creator getCImageCreator() {
|
||||
return cImageCreator.get();
|
||||
}
|
||||
|
||||
protected static Image generateSelectedDarkImage(final Image image) {
|
||||
static Image generateSelectedDarkImage(final Image image) {
|
||||
final ImageProducer prod = new FilteredImageSource(image.getSource(), new IconImageFilter() {
|
||||
@Override
|
||||
int getGreyFor(final int gray) {
|
||||
return gray * 75 / 100;
|
||||
}
|
||||
@ -98,8 +111,9 @@ public class AquaUtils {
|
||||
return Toolkit.getDefaultToolkit().createImage(prod);
|
||||
}
|
||||
|
||||
protected static Image generateDisabledImage(final Image image) {
|
||||
static Image generateDisabledImage(final Image image) {
|
||||
final ImageProducer prod = new FilteredImageSource(image.getSource(), new IconImageFilter() {
|
||||
@Override
|
||||
int getGreyFor(final int gray) {
|
||||
return 255 - ((255 - gray) * 65 / 100);
|
||||
}
|
||||
@ -107,19 +121,20 @@ public class AquaUtils {
|
||||
return Toolkit.getDefaultToolkit().createImage(prod);
|
||||
}
|
||||
|
||||
protected static Image generateLightenedImage(final Image image, final int percent) {
|
||||
static Image generateLightenedImage(final Image image, final int percent) {
|
||||
final GrayFilter filter = new GrayFilter(true, percent);
|
||||
final ImageProducer prod = new FilteredImageSource(image.getSource(), filter);
|
||||
return Toolkit.getDefaultToolkit().createImage(prod);
|
||||
}
|
||||
|
||||
static abstract class IconImageFilter extends RGBImageFilter {
|
||||
public IconImageFilter() {
|
||||
private abstract static class IconImageFilter extends RGBImageFilter {
|
||||
IconImageFilter() {
|
||||
super();
|
||||
canFilterIndexColorModel = true;
|
||||
}
|
||||
|
||||
public int filterRGB(final int x, final int y, final int rgb) {
|
||||
@Override
|
||||
public final int filterRGB(final int x, final int y, final int rgb) {
|
||||
final int red = (rgb >> 16) & 0xff;
|
||||
final int green = (rgb >> 8) & 0xff;
|
||||
final int blue = rgb & 0xff;
|
||||
@ -135,14 +150,14 @@ public class AquaUtils {
|
||||
return result;
|
||||
}
|
||||
|
||||
abstract int getGreyFor(final int gray);
|
||||
abstract int getGreyFor(int gray);
|
||||
}
|
||||
|
||||
public abstract static class RecyclableObject<T> {
|
||||
protected SoftReference<T> objectRef = null;
|
||||
abstract static class RecyclableObject<T> {
|
||||
private SoftReference<T> objectRef;
|
||||
|
||||
public T get() {
|
||||
T referent = null;
|
||||
T get() {
|
||||
T referent;
|
||||
if (objectRef != null && (referent = objectRef.get()) != null) return referent;
|
||||
referent = create();
|
||||
objectRef = new SoftReference<T>(referent);
|
||||
@ -152,8 +167,8 @@ public class AquaUtils {
|
||||
protected abstract T create();
|
||||
}
|
||||
|
||||
public abstract static class RecyclableSingleton<T> {
|
||||
public T get() {
|
||||
abstract static class RecyclableSingleton<T> {
|
||||
final T get() {
|
||||
final AppContext appContext = AppContext.getAppContext();
|
||||
SoftReference<T> ref = (SoftReference<T>) appContext.get(this);
|
||||
if (ref != null) {
|
||||
@ -166,38 +181,36 @@ public class AquaUtils {
|
||||
return object;
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
AppContext appContext = AppContext.getAppContext();
|
||||
appContext.remove(this);
|
||||
void reset() {
|
||||
AppContext.getAppContext().remove(this);
|
||||
}
|
||||
|
||||
protected abstract T getInstance();
|
||||
abstract T getInstance();
|
||||
}
|
||||
|
||||
public static class RecyclableSingletonFromDefaultConstructor<T> extends RecyclableSingleton<T> {
|
||||
protected final Class<T> clazz;
|
||||
static class RecyclableSingletonFromDefaultConstructor<T> extends RecyclableSingleton<T> {
|
||||
private final Class<T> clazz;
|
||||
|
||||
public RecyclableSingletonFromDefaultConstructor(final Class<T> clazz) {
|
||||
RecyclableSingletonFromDefaultConstructor(final Class<T> clazz) {
|
||||
this.clazz = clazz;
|
||||
}
|
||||
|
||||
protected T getInstance() {
|
||||
@Override
|
||||
T getInstance() {
|
||||
try {
|
||||
ReflectUtil.checkPackageAccess(clazz);
|
||||
return clazz.newInstance();
|
||||
} catch (final InstantiationException e) {
|
||||
e.printStackTrace();
|
||||
} catch (final IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InstantiationException | IllegalAccessException ignored) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract static class LazyKeyedSingleton<K, V> {
|
||||
protected Map<K, V> refs;
|
||||
abstract static class LazyKeyedSingleton<K, V> {
|
||||
private Map<K, V> refs;
|
||||
|
||||
public V get(final K key) {
|
||||
if (refs == null) refs = new HashMap<K, V>();
|
||||
V get(final K key) {
|
||||
if (refs == null) refs = new HashMap<>();
|
||||
|
||||
final V cachedValue = refs.get(key);
|
||||
if (cachedValue != null) return cachedValue;
|
||||
@ -207,44 +220,45 @@ public class AquaUtils {
|
||||
return value;
|
||||
}
|
||||
|
||||
protected abstract V getInstance(final K key);
|
||||
protected abstract V getInstance(K key);
|
||||
}
|
||||
|
||||
static final RecyclableSingleton<Boolean> enableAnimations = new RecyclableSingleton<Boolean>() {
|
||||
private static final RecyclableSingleton<Boolean> enableAnimations = new RecyclableSingleton<Boolean>() {
|
||||
@Override
|
||||
protected Boolean getInstance() {
|
||||
final String sizeProperty = (String)java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.GetPropertyAction(ANIMATIONS_SYSTEM_PROPERTY));
|
||||
return new Boolean(!"false".equals(sizeProperty)); // should be true by default
|
||||
final String sizeProperty = (String) AccessController.doPrivileged((PrivilegedAction<?>)new GetPropertyAction(
|
||||
ANIMATIONS_PROPERTY));
|
||||
return !"false".equals(sizeProperty); // should be true by default
|
||||
}
|
||||
};
|
||||
static boolean animationsEnabled() {
|
||||
private static boolean animationsEnabled() {
|
||||
return enableAnimations.get();
|
||||
}
|
||||
|
||||
static final int MENU_BLINK_DELAY = 50; // 50ms == 3/60 sec, according to the spec
|
||||
protected static void blinkMenu(final Selectable selectable) {
|
||||
private static final int MENU_BLINK_DELAY = 50; // 50ms == 3/60 sec, according to the spec
|
||||
static void blinkMenu(final Selectable selectable) {
|
||||
if (!animationsEnabled()) return;
|
||||
try {
|
||||
selectable.paintSelected(false);
|
||||
Thread.sleep(MENU_BLINK_DELAY);
|
||||
selectable.paintSelected(true);
|
||||
Thread.sleep(MENU_BLINK_DELAY);
|
||||
} catch (final InterruptedException e) { }
|
||||
} catch (final InterruptedException ignored) { }
|
||||
}
|
||||
|
||||
interface Selectable {
|
||||
void paintSelected(final boolean selected);
|
||||
void paintSelected(boolean selected);
|
||||
}
|
||||
|
||||
interface JComponentPainter {
|
||||
public void paint(JComponent c, Graphics g, int x, int y, int w, int h);
|
||||
void paint(JComponent c, Graphics g, int x, int y, int w, int h);
|
||||
}
|
||||
|
||||
interface Painter {
|
||||
public void paint(final Graphics g, int x, int y, int w, int h);
|
||||
void paint(Graphics g, int x, int y, int w, int h);
|
||||
}
|
||||
|
||||
public static void paintDropShadowText(final Graphics g, final JComponent c, final Font font, final FontMetrics metrics, final int x, final int y, final int offsetX, final int offsetY, final Color textColor, final Color shadowColor, final String text) {
|
||||
static void paintDropShadowText(final Graphics g, final JComponent c, final Font font, final FontMetrics metrics, final int x, final int y, final int offsetX, final int offsetY, final Color textColor, final Color shadowColor, final String text) {
|
||||
g.setFont(font);
|
||||
g.setColor(shadowColor);
|
||||
SwingUtilities2.drawString(c, g, text, x + offsetX, y + offsetY + metrics.getAscent());
|
||||
@ -252,22 +266,22 @@ public class AquaUtils {
|
||||
SwingUtilities2.drawString(c, g, text, x, y + metrics.getAscent());
|
||||
}
|
||||
|
||||
public static class ShadowBorder implements Border {
|
||||
final Painter prePainter;
|
||||
final Painter postPainter;
|
||||
static class ShadowBorder implements Border {
|
||||
private final Painter prePainter;
|
||||
private final Painter postPainter;
|
||||
|
||||
final int offsetX;
|
||||
final int offsetY;
|
||||
final float distance;
|
||||
final int blur;
|
||||
final Insets insets;
|
||||
final ConvolveOp blurOp;
|
||||
private final int offsetX;
|
||||
private final int offsetY;
|
||||
private final float distance;
|
||||
private final int blur;
|
||||
private final Insets insets;
|
||||
private final ConvolveOp blurOp;
|
||||
|
||||
public ShadowBorder(final Painter prePainter, final Painter postPainter, final int offsetX, final int offsetY, final float distance, final float intensity, final int blur) {
|
||||
ShadowBorder(final Painter prePainter, final Painter postPainter, final int offsetX, final int offsetY, final float distance, final float intensity, final int blur) {
|
||||
this.prePainter = prePainter; this.postPainter = postPainter;
|
||||
this.offsetX = offsetX; this.offsetY = offsetY; this.distance = distance; this.blur = blur;
|
||||
final int halfBlur = blur / 2;
|
||||
this.insets = new Insets(halfBlur - offsetY, halfBlur - offsetX, halfBlur + offsetY, halfBlur + offsetX);
|
||||
insets = new Insets(halfBlur - offsetY, halfBlur - offsetX, halfBlur + offsetY, halfBlur + offsetX);
|
||||
|
||||
final float blurry = intensity / (blur * blur);
|
||||
final float[] blurKernel = new float[blur * blur];
|
||||
@ -275,14 +289,17 @@ public class AquaUtils {
|
||||
blurOp = new ConvolveOp(new Kernel(blur, blur, blurKernel));
|
||||
}
|
||||
|
||||
public boolean isBorderOpaque() {
|
||||
@Override
|
||||
public final boolean isBorderOpaque() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Insets getBorderInsets(final Component c) {
|
||||
@Override
|
||||
public final Insets getBorderInsets(final Component c) {
|
||||
return insets;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paintBorder(final Component c, final Graphics g, final int x, final int y, final int width, final int height) {
|
||||
final BufferedImage img = new BufferedImage(width + blur * 2, height + blur * 2, BufferedImage.TYPE_INT_ARGB_PRE);
|
||||
paintToImage(img, x, y, width, height);
|
||||
@ -290,7 +307,7 @@ public class AquaUtils {
|
||||
g.drawImage(img, -blur, -blur, null);
|
||||
}
|
||||
|
||||
protected void paintToImage(final BufferedImage img, final int x, final int y, final int width, final int height) {
|
||||
private void paintToImage(final BufferedImage img, final int x, final int y, final int width, final int height) {
|
||||
// clear the prior image
|
||||
Graphics2D imgG = (Graphics2D)img.getGraphics();
|
||||
imgG.setComposite(AlphaComposite.Clear);
|
||||
@ -319,10 +336,10 @@ public class AquaUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static class SlicedShadowBorder extends ShadowBorder {
|
||||
final SlicedImageControl slices;
|
||||
static class SlicedShadowBorder extends ShadowBorder {
|
||||
private final SlicedImageControl slices;
|
||||
|
||||
public SlicedShadowBorder(final Painter prePainter, final Painter postPainter, final int offsetX, final int offsetY, final float distance, final float intensity, final int blur, final int templateWidth, final int templateHeight, final int leftCut, final int topCut, final int rightCut, final int bottomCut) {
|
||||
SlicedShadowBorder(final Painter prePainter, final Painter postPainter, final int offsetX, final int offsetY, final float distance, final float intensity, final int blur, final int templateWidth, final int templateHeight, final int leftCut, final int topCut, final int rightCut, final int bottomCut) {
|
||||
super(prePainter, postPainter, offsetX, offsetY, distance, intensity, blur);
|
||||
|
||||
final BufferedImage i = new BufferedImage(templateWidth, templateHeight, BufferedImage.TYPE_INT_ARGB_PRE);
|
||||
@ -331,15 +348,12 @@ public class AquaUtils {
|
||||
slices = new SlicedImageControl(i, leftCut, topCut, rightCut, bottomCut, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paintBorder(final Component c, final Graphics g, final int x, final int y, final int width, final int height) {
|
||||
slices.paint(g, x, y, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
public interface NineSliceMetricsProvider {
|
||||
|
||||
}
|
||||
|
||||
// static void debugFrame(String name, Image image) {
|
||||
// JFrame f = new JFrame(name);
|
||||
// f.setContentPane(new JLabel(new ImageIcon(image)));
|
||||
@ -350,28 +364,30 @@ public class AquaUtils {
|
||||
// special casing naughty applications, like InstallAnywhere
|
||||
// <rdar://problem/4851533> REGR: JButton: Myst IV: the buttons of 1.0.3 updater have redraw issue
|
||||
static boolean shouldUseOpaqueButtons() {
|
||||
final ClassLoader launcherClassLoader = sun.misc.Launcher.getLauncher().getClassLoader();
|
||||
final ClassLoader launcherClassLoader = Launcher.getLauncher().getClassLoader();
|
||||
if (classExists(launcherClassLoader, "com.installshield.wizard.platform.macosx.MacOSXUtils")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static boolean classExists(final ClassLoader classLoader, final String clazzName) {
|
||||
private static boolean classExists(final ClassLoader classLoader, final String clazzName) {
|
||||
try {
|
||||
return Class.forName(clazzName, false, classLoader) != null;
|
||||
} catch (final Throwable e) { }
|
||||
} catch (final Throwable ignored) { }
|
||||
return false;
|
||||
}
|
||||
|
||||
private static RecyclableSingleton<Method> getJComponentGetFlagMethod = new RecyclableSingleton<Method>() {
|
||||
private static final RecyclableSingleton<Method> getJComponentGetFlagMethod = new RecyclableSingleton<Method>() {
|
||||
@Override
|
||||
protected Method getInstance() {
|
||||
return java.security.AccessController.doPrivileged(
|
||||
return AccessController.doPrivileged(
|
||||
new PrivilegedAction<Method>() {
|
||||
@Override
|
||||
public Method run() {
|
||||
try {
|
||||
final Method method = JComponent.class.getDeclaredMethod("getFlag", new Class[] { int.class });
|
||||
method.setAccessible(true);
|
||||
return method;
|
||||
} catch (final Throwable e) {
|
||||
} catch (final Throwable ignored) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -380,18 +396,18 @@ public class AquaUtils {
|
||||
}
|
||||
};
|
||||
|
||||
private static final Integer OPAQUE_SET_FLAG = new Integer(24); // private int JComponent.OPAQUE_SET
|
||||
protected static boolean hasOpaqueBeenExplicitlySet(final JComponent c) {
|
||||
private static final Integer OPAQUE_SET_FLAG = 24; // private int JComponent.OPAQUE_SET
|
||||
static boolean hasOpaqueBeenExplicitlySet(final JComponent c) {
|
||||
final Method method = getJComponentGetFlagMethod.get();
|
||||
if (method == null) return false;
|
||||
try {
|
||||
return Boolean.TRUE.equals(method.invoke(c, OPAQUE_SET_FLAG));
|
||||
} catch (final Throwable e) {
|
||||
} catch (final Throwable ignored) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected static boolean isWindowTextured(final Component c) {
|
||||
private static boolean isWindowTextured(final Component c) {
|
||||
if (!(c instanceof JComponent)) {
|
||||
return false;
|
||||
}
|
||||
@ -412,13 +428,12 @@ public class AquaUtils {
|
||||
return new Color(color.getRed(), color.getGreen(), color.getBlue(), 0);
|
||||
}
|
||||
|
||||
protected static void fillRect(final Graphics g, final Component c) {
|
||||
static void fillRect(final Graphics g, final Component c) {
|
||||
fillRect(g, c, c.getBackground(), 0, 0, c.getWidth(), c.getHeight());
|
||||
}
|
||||
|
||||
protected static void fillRect(final Graphics g, final Component c,
|
||||
final Color color, final int x, final int y,
|
||||
final int w, final int h) {
|
||||
static void fillRect(final Graphics g, final Component c, final Color color,
|
||||
final int x, final int y, final int w, final int h) {
|
||||
if (!(g instanceof Graphics2D)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -36,7 +36,10 @@ import sun.awt.SunToolkit;
|
||||
import sun.lwawt.LWToolkit;
|
||||
import sun.lwawt.macosx.*;
|
||||
|
||||
class ScreenMenu extends Menu implements ContainerListener, ComponentListener, ScreenMenuPropertyHandler {
|
||||
final class ScreenMenu extends Menu
|
||||
implements ContainerListener, ComponentListener,
|
||||
ScreenMenuPropertyHandler {
|
||||
|
||||
static {
|
||||
java.security.AccessController.doPrivileged(
|
||||
new java.security.PrivilegedAction<Void>() {
|
||||
@ -48,20 +51,22 @@ class ScreenMenu extends Menu implements ContainerListener, ComponentListener, S
|
||||
}
|
||||
|
||||
// screen menu stuff
|
||||
public static native long addMenuListeners(ScreenMenu listener, long nativeMenu);
|
||||
public static native void removeMenuListeners(long modelPtr);
|
||||
private static native long addMenuListeners(ScreenMenu listener, long nativeMenu);
|
||||
private static native void removeMenuListeners(long modelPtr);
|
||||
|
||||
long fModelPtr = 0;
|
||||
private transient long fModelPtr;
|
||||
|
||||
Hashtable<Component, MenuItem> fItems;
|
||||
JMenu fInvoker;
|
||||
private final Hashtable<Component, MenuItem> fItems;
|
||||
private final JMenu fInvoker;
|
||||
|
||||
Component fLastMouseEventTarget;
|
||||
Rectangle fLastTargetRect;
|
||||
private Component fLastMouseEventTarget;
|
||||
private Rectangle fLastTargetRect;
|
||||
private volatile Rectangle[] fItemBounds;
|
||||
|
||||
private ScreenMenuPropertyListener fPropertyListener;
|
||||
|
||||
// Array of child hashes used to see if we need to recreate the Menu.
|
||||
int childHashArray[];
|
||||
private int childHashArray[];
|
||||
|
||||
ScreenMenu(final JMenu invoker) {
|
||||
super(invoker.getText());
|
||||
@ -74,25 +79,12 @@ class ScreenMenu extends Menu implements ContainerListener, ComponentListener, S
|
||||
updateItems();
|
||||
}
|
||||
|
||||
// I'm always 'visible', but never on screen
|
||||
static class ScreenMenuComponent extends Container {
|
||||
public boolean isVisible() { return true; }
|
||||
public boolean isShowing() { return true; }
|
||||
public void setVisible(final boolean b) {}
|
||||
public void show() {}
|
||||
}
|
||||
|
||||
ScreenMenuComponent makeScreenMenuComponent() {
|
||||
return new ScreenMenuComponent();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine if we need to tear down the Menu and re-create it, since the contents may have changed in the Menu opened listener and
|
||||
* we do not get notified of it, because EDT is busy in our code. We only need to update if the menu contents have changed in some
|
||||
* way, such as the number of menu items, the text of the menuitems, icon, shortcut etc.
|
||||
*/
|
||||
static boolean needsUpdate(final Component items[], final int childHashArray[]) {
|
||||
private static boolean needsUpdate(final Component items[], final int childHashArray[]) {
|
||||
if (items == null || childHashArray == null) {
|
||||
return true;
|
||||
}
|
||||
@ -112,7 +104,7 @@ class ScreenMenu extends Menu implements ContainerListener, ComponentListener, S
|
||||
* Used to recreate the AWT based Menu structure that implements the Screen Menu.
|
||||
* Also computes hashcode and stores them so that we can compare them later in needsUpdate.
|
||||
*/
|
||||
void updateItems() {
|
||||
private void updateItems() {
|
||||
final int count = fInvoker.getMenuComponentCount();
|
||||
final Component[] items = fInvoker.getMenuComponents();
|
||||
if (needsUpdate(items, childHashArray)) {
|
||||
@ -163,16 +155,14 @@ class ScreenMenu extends Menu implements ContainerListener, ComponentListener, S
|
||||
LWCToolkit.invokeAndWait(new Runnable() {
|
||||
public void run() {
|
||||
invoker.setSelected(false);
|
||||
|
||||
// Null out the tracking rectangles and the array.
|
||||
// Null out the tracking rectangles and the array.
|
||||
if (fItemBounds != null) {
|
||||
for (int i = 0; i < fItemBounds.length; i++) {
|
||||
fItemBounds[i] = null;
|
||||
}
|
||||
for (int i = 0; i < fItemBounds.length; i++) {
|
||||
fItemBounds[i] = null;
|
||||
}
|
||||
}
|
||||
|
||||
fItemBounds = null;
|
||||
}
|
||||
fItemBounds = null;
|
||||
}
|
||||
}, invoker);
|
||||
} catch (final Exception e) {
|
||||
e.printStackTrace();
|
||||
@ -237,49 +227,56 @@ class ScreenMenu extends Menu implements ContainerListener, ComponentListener, S
|
||||
});
|
||||
}
|
||||
|
||||
ScreenMenuPropertyListener fPropertyListener;
|
||||
@Override
|
||||
public void addNotify() {
|
||||
super.addNotify();
|
||||
if (fModelPtr == 0) {
|
||||
fInvoker.addContainerListener(this);
|
||||
fInvoker.addComponentListener(this);
|
||||
fPropertyListener = new ScreenMenuPropertyListener(this);
|
||||
fInvoker.addPropertyChangeListener(fPropertyListener);
|
||||
synchronized (getTreeLock()) {
|
||||
super.addNotify();
|
||||
if (fModelPtr == 0) {
|
||||
fInvoker.addContainerListener(this);
|
||||
fInvoker.addComponentListener(this);
|
||||
fPropertyListener = new ScreenMenuPropertyListener(this);
|
||||
fInvoker.addPropertyChangeListener(fPropertyListener);
|
||||
|
||||
final Icon icon = fInvoker.getIcon();
|
||||
if (icon != null) {
|
||||
this.setIcon(icon);
|
||||
}
|
||||
final Icon icon = fInvoker.getIcon();
|
||||
if (icon != null) {
|
||||
setIcon(icon);
|
||||
}
|
||||
|
||||
final String tooltipText = fInvoker.getToolTipText();
|
||||
if (tooltipText != null) {
|
||||
this.setToolTipText(tooltipText);
|
||||
}
|
||||
final MenuComponentPeer peer = getPeer();
|
||||
if (peer instanceof CMenu) {
|
||||
final CMenu menu = (CMenu)peer;
|
||||
final long nativeMenu = menu.getNativeMenu();
|
||||
fModelPtr = addMenuListeners(this, nativeMenu);
|
||||
final String tooltipText = fInvoker.getToolTipText();
|
||||
if (tooltipText != null) {
|
||||
setToolTipText(tooltipText);
|
||||
}
|
||||
final MenuComponentPeer peer = getPeer();
|
||||
if (peer instanceof CMenu) {
|
||||
final CMenu menu = (CMenu) peer;
|
||||
final long nativeMenu = menu.getNativeMenu();
|
||||
fModelPtr = addMenuListeners(this, nativeMenu);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeNotify() {
|
||||
// Call super so that the NSMenu has been removed, before we release the delegate in removeMenuListeners
|
||||
super.removeNotify();
|
||||
fItems.clear();
|
||||
if (fModelPtr != 0) {
|
||||
removeMenuListeners(fModelPtr);
|
||||
fModelPtr = 0;
|
||||
fInvoker.removeContainerListener(this);
|
||||
fInvoker.removeComponentListener(this);
|
||||
fInvoker.removePropertyChangeListener(fPropertyListener);
|
||||
synchronized (getTreeLock()) {
|
||||
// Call super so that the NSMenu has been removed, before we release
|
||||
// the delegate in removeMenuListeners
|
||||
super.removeNotify();
|
||||
fItems.clear();
|
||||
if (fModelPtr != 0) {
|
||||
removeMenuListeners(fModelPtr);
|
||||
fModelPtr = 0;
|
||||
fInvoker.removeContainerListener(this);
|
||||
fInvoker.removeComponentListener(this);
|
||||
fInvoker.removePropertyChangeListener(fPropertyListener);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked when a component has been added to the container.
|
||||
*/
|
||||
@Override
|
||||
public void componentAdded(final ContainerEvent e) {
|
||||
addItem(e.getChild());
|
||||
}
|
||||
@ -287,23 +284,26 @@ class ScreenMenu extends Menu implements ContainerListener, ComponentListener, S
|
||||
/**
|
||||
* Invoked when a component has been removed from the container.
|
||||
*/
|
||||
@Override
|
||||
public void componentRemoved(final ContainerEvent e) {
|
||||
final Component child = e.getChild();
|
||||
final MenuItem sm = fItems.get(child);
|
||||
if (sm == null) return;
|
||||
|
||||
remove(sm);
|
||||
fItems.remove(sm);
|
||||
}
|
||||
remove(sm);
|
||||
fItems.remove(sm);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked when the component's size changes.
|
||||
*/
|
||||
@Override
|
||||
public void componentResized(final ComponentEvent e) {}
|
||||
|
||||
/**
|
||||
* Invoked when the component's position changes.
|
||||
*/
|
||||
@Override
|
||||
public void componentMoved(final ComponentEvent e) {}
|
||||
|
||||
/**
|
||||
@ -311,6 +311,7 @@ class ScreenMenu extends Menu implements ContainerListener, ComponentListener, S
|
||||
* See componentHidden - we should still have a MenuItem
|
||||
* it just isn't inserted
|
||||
*/
|
||||
@Override
|
||||
public void componentShown(final ComponentEvent e) {
|
||||
setVisible(true);
|
||||
}
|
||||
@ -321,11 +322,12 @@ class ScreenMenu extends Menu implements ContainerListener, ComponentListener, S
|
||||
* so we remove the ScreenMenuItem from the ScreenMenu
|
||||
* but leave it in fItems
|
||||
*/
|
||||
@Override
|
||||
public void componentHidden(final ComponentEvent e) {
|
||||
setVisible(false);
|
||||
}
|
||||
|
||||
public void setVisible(final boolean b) {
|
||||
private void setVisible(final boolean b) {
|
||||
// Tell our parent to add/remove us
|
||||
final MenuContainer parent = getParent();
|
||||
|
||||
@ -333,20 +335,24 @@ class ScreenMenu extends Menu implements ContainerListener, ComponentListener, S
|
||||
if (parent instanceof ScreenMenu) {
|
||||
final ScreenMenu sm = (ScreenMenu)parent;
|
||||
sm.setChildVisible(fInvoker, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setChildVisible(final JMenuItem child, final boolean b) {
|
||||
fItems.remove(child);
|
||||
updateItems();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAccelerator(final KeyStroke ks) {}
|
||||
|
||||
// only check and radio items can be indeterminate
|
||||
@Override
|
||||
public void setIndeterminate(boolean indeterminate) { }
|
||||
|
||||
@Override
|
||||
public void setToolTipText(final String text) {
|
||||
final MenuComponentPeer peer = getPeer();
|
||||
if (!(peer instanceof CMenuItem)) return;
|
||||
@ -355,6 +361,7 @@ class ScreenMenu extends Menu implements ContainerListener, ComponentListener, S
|
||||
cmi.setToolTipText(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIcon(final Icon i) {
|
||||
final MenuComponentPeer peer = getPeer();
|
||||
if (!(peer instanceof CMenuItem)) return;
|
||||
@ -374,9 +381,8 @@ class ScreenMenu extends Menu implements ContainerListener, ComponentListener, S
|
||||
/**
|
||||
* Gets a hashCode for a JMenu or JMenuItem or subclass so that we can compare for
|
||||
* changes in the Menu.
|
||||
*
|
||||
*/
|
||||
static int getHashCode(final Component m) {
|
||||
private static int getHashCode(final Component m) {
|
||||
int hashCode = m.hashCode();
|
||||
|
||||
if (m instanceof JMenuItem) {
|
||||
@ -408,7 +414,7 @@ class ScreenMenu extends Menu implements ContainerListener, ComponentListener, S
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
void addItem(final Component m) {
|
||||
private void addItem(final Component m) {
|
||||
if (!m.isVisible()) return;
|
||||
MenuItem sm = fItems.get(m);
|
||||
|
||||
|
||||
@ -1,110 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.apple.resources;
|
||||
|
||||
import java.security.*;
|
||||
import java.util.PropertyResourceBundle;
|
||||
import java.util.ResourceBundle;
|
||||
import java.io.*;
|
||||
|
||||
public class MacOSXResourceBundle extends PropertyResourceBundle {
|
||||
MacOSXResourceBundle(InputStream stream) throws IOException {
|
||||
super(stream);
|
||||
}
|
||||
|
||||
void setItsParent(ResourceBundle rb) {
|
||||
setParent(rb);
|
||||
}
|
||||
|
||||
public static ResourceBundle getMacResourceBundle(String baseJavaBundle) throws Exception {
|
||||
return getMacResourceBundle(baseJavaBundle, null);
|
||||
}
|
||||
|
||||
public static ResourceBundle getMacResourceBundle(String baseJavaBundle, String filename) throws Exception {
|
||||
LoadNativeBundleAction lnba = new LoadNativeBundleAction(baseJavaBundle, filename);
|
||||
return (ResourceBundle)java.security.AccessController.doPrivileged(lnba);
|
||||
}
|
||||
}
|
||||
|
||||
class LoadNativeBundleAction implements PrivilegedExceptionAction {
|
||||
String mBaseJavaBundle;
|
||||
String mFilenameOverride;
|
||||
|
||||
LoadNativeBundleAction(String baseJavaBundle, String filenameOverride) {
|
||||
mBaseJavaBundle = baseJavaBundle;
|
||||
mFilenameOverride = filenameOverride;
|
||||
}
|
||||
|
||||
public Object run() {
|
||||
java.util.ResourceBundle returnValue = null;
|
||||
MacOSXResourceBundle macOSrb = null;
|
||||
|
||||
// Load the Mac OS X resources.
|
||||
// Use a base filename if we were given one. Otherwise, we will look for the last piece of the bundle path
|
||||
// with '.properties' appended. Either way, the native method will take care of the extension.
|
||||
String filename = mFilenameOverride;
|
||||
|
||||
if (filename == null) {
|
||||
filename = mBaseJavaBundle.substring(mBaseJavaBundle.lastIndexOf('.') + 1);
|
||||
}
|
||||
|
||||
File propsFile = null;
|
||||
String propertyFileName = getPathToBundleFile(filename);
|
||||
InputStream stream = null;
|
||||
|
||||
try {
|
||||
propsFile = new File(propertyFileName);
|
||||
stream = new FileInputStream(propsFile);
|
||||
stream = new java.io.BufferedInputStream(stream);
|
||||
macOSrb = new MacOSXResourceBundle(stream);
|
||||
} catch (Exception e) {
|
||||
//e.printStackTrace();
|
||||
//System.out.println("Failed to create resources from application bundle. Using Java-based resources.");
|
||||
} finally {
|
||||
try {
|
||||
if (stream != null) stream.close();
|
||||
stream = null;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
returnValue = ResourceBundle.getBundle(mBaseJavaBundle);
|
||||
|
||||
// If we have a platform-specific bundle, make it the parent of the generic bundle, so failures propagate up to the parent.
|
||||
if (returnValue != null) {
|
||||
if (macOSrb != null) {
|
||||
macOSrb.setItsParent(returnValue);
|
||||
returnValue = macOSrb;
|
||||
}
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
private static native String getPathToBundleFile(String filename);
|
||||
}
|
||||
|
||||
@ -181,6 +181,9 @@ public final class CGraphicsEnvironment extends SunGraphicsEnvironment {
|
||||
initDevices();
|
||||
|
||||
d = devices.get(mainDisplayID);
|
||||
if (d == null) {
|
||||
throw new AWTError("no screen devices");
|
||||
}
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
@ -385,11 +385,6 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
|
||||
|
||||
// ---- PEER METHODS ---- //
|
||||
|
||||
@Override
|
||||
public Toolkit getToolkit() {
|
||||
return LWToolkit.getLWToolkit();
|
||||
}
|
||||
|
||||
// Just a helper method
|
||||
public LWToolkit getLWToolkit() {
|
||||
return LWToolkit.getLWToolkit();
|
||||
@ -1010,13 +1005,13 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
|
||||
@Override
|
||||
public boolean prepareImage(Image img, int w, int h, ImageObserver o) {
|
||||
// TODO: is it a right/complete implementation?
|
||||
return getToolkit().prepareImage(img, w, h, o);
|
||||
return Toolkit.getDefaultToolkit().prepareImage(img, w, h, o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int checkImage(Image img, int w, int h, ImageObserver o) {
|
||||
// TODO: is it a right/complete implementation?
|
||||
return getToolkit().checkImage(img, w, h, o);
|
||||
return Toolkit.getDefaultToolkit().checkImage(img, w, h, o);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -71,13 +71,14 @@ abstract class LWTextComponentPeer<T extends TextComponent, D extends JComponent
|
||||
}
|
||||
setEditable(getTarget().isEditable());
|
||||
setText(getTarget().getText());
|
||||
setCaretPosition(getTarget().getCaretPosition());
|
||||
getTarget().addInputMethodListener(this);
|
||||
final int start = getTarget().getSelectionStart();
|
||||
final int end = getTarget().getSelectionEnd();
|
||||
if (end > start) {
|
||||
// Should be called after setText() and setCaretPosition()
|
||||
select(start, end);
|
||||
}
|
||||
setCaretPosition(getTarget().getCaretPosition());
|
||||
firstChangeSkipped = true;
|
||||
}
|
||||
|
||||
@ -122,7 +123,7 @@ abstract class LWTextComponentPeer<T extends TextComponent, D extends JComponent
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void setText(final String l) {
|
||||
public final void setText(final String text) {
|
||||
synchronized (getDelegateLock()) {
|
||||
// JTextArea.setText() posts two different events (remove & insert).
|
||||
// Since we make no differences between text events,
|
||||
@ -130,7 +131,7 @@ abstract class LWTextComponentPeer<T extends TextComponent, D extends JComponent
|
||||
// JTextArea.setText() is called.
|
||||
final Document document = getTextComponent().getDocument();
|
||||
document.removeDocumentListener(this);
|
||||
getTextComponent().setText(l);
|
||||
getTextComponent().setText(text);
|
||||
revalidate();
|
||||
if (firstChangeSkipped) {
|
||||
postEvent(new TextEvent(getTarget(),
|
||||
|
||||
@ -317,9 +317,25 @@ public class LWWindowPeer
|
||||
op |= SET_SIZE;
|
||||
}
|
||||
|
||||
// Don't post ComponentMoved/Resized and Paint events
|
||||
// until we've got a notification from the delegate
|
||||
Rectangle cb = constrainBounds(x, y, w, h);
|
||||
setBounds(cb.x, cb.y, cb.width, cb.height, op, false, false);
|
||||
// Get updated bounds, so we don't have to handle 'op' here manually
|
||||
Rectangle r = getBounds();
|
||||
platformWindow.setBounds(r.x, r.y, r.width, r.height);
|
||||
}
|
||||
|
||||
public Rectangle constrainBounds(Rectangle bounds) {
|
||||
return constrainBounds(bounds.x, bounds.y, bounds.width, bounds.height);
|
||||
}
|
||||
|
||||
public Rectangle constrainBounds(int x, int y, int w, int h) {
|
||||
|
||||
if (w < MINIMUM_WIDTH) {
|
||||
w = MINIMUM_WIDTH;
|
||||
}
|
||||
|
||||
if (h < MINIMUM_HEIGHT) {
|
||||
h = MINIMUM_HEIGHT;
|
||||
}
|
||||
@ -334,12 +350,7 @@ public class LWWindowPeer
|
||||
h = maxH;
|
||||
}
|
||||
|
||||
// Don't post ComponentMoved/Resized and Paint events
|
||||
// until we've got a notification from the delegate
|
||||
setBounds(x, y, w, h, op, false, false);
|
||||
// Get updated bounds, so we don't have to handle 'op' here manually
|
||||
Rectangle r = getBounds();
|
||||
platformWindow.setBounds(r.x, r.y, r.width, r.height);
|
||||
return new Rectangle(x, y, w, h);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -393,8 +404,12 @@ public class LWWindowPeer
|
||||
@Override
|
||||
public void setModalBlocked(Dialog blocker, boolean blocked) {
|
||||
synchronized (getPeerTreeLock()) {
|
||||
this.blocker = !blocked ? null :
|
||||
(LWWindowPeer) AWTAccessor.getComponentAccessor().getPeer(blocker);
|
||||
ComponentPeer peer = AWTAccessor.getComponentAccessor().getPeer(blocker);
|
||||
if (blocked && (peer instanceof LWWindowPeer)) {
|
||||
this.blocker = (LWWindowPeer) peer;
|
||||
} else {
|
||||
this.blocker = null;
|
||||
}
|
||||
}
|
||||
|
||||
platformWindow.setModalBlocked(blocked);
|
||||
@ -1146,8 +1161,11 @@ public class LWWindowPeer
|
||||
return false;
|
||||
}
|
||||
|
||||
Window currentActive = KeyboardFocusManager.
|
||||
getCurrentKeyboardFocusManager().getActiveWindow();
|
||||
AppContext targetAppContext = AWTAccessor.getComponentAccessor().getAppContext(getTarget());
|
||||
KeyboardFocusManager kfm = AWTAccessor.getKeyboardFocusManagerAccessor()
|
||||
.getCurrentKeyboardFocusManager(targetAppContext);
|
||||
Window currentActive = kfm.getActiveWindow();
|
||||
|
||||
|
||||
Window opposite = LWKeyboardFocusManagerPeer.getInstance().
|
||||
getCurrentFocusedWindow();
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
package sun.lwawt.macosx;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.dnd.DropTarget;
|
||||
|
||||
import sun.awt.dnd.SunDropTargetContextPeer;
|
||||
import sun.awt.dnd.SunDropTargetEvent;
|
||||
@ -38,7 +39,7 @@ final class CDropTargetContextPeer extends SunDropTargetContextPeer {
|
||||
private long fNativeDropTransfer = 0;
|
||||
private long fNativeDataAvailable = 0;
|
||||
private Object fNativeData = null;
|
||||
private boolean insideTarget = true;
|
||||
private DropTarget insideTarget = null;
|
||||
|
||||
Object awtLockAccess = new Object();
|
||||
|
||||
@ -88,26 +89,19 @@ final class CDropTargetContextPeer extends SunDropTargetContextPeer {
|
||||
return fNativeData;
|
||||
}
|
||||
|
||||
// We need to take care of dragExit message because for some reason it is not being
|
||||
// generated for lightweight components
|
||||
// We need to take care of dragEnter and dragExit messages because
|
||||
// native system generates them only for heavyweights
|
||||
@Override
|
||||
protected void processMotionMessage(SunDropTargetEvent event, boolean operationChanged) {
|
||||
Component eventSource = (Component)event.getComponent();
|
||||
Point screenPoint = event.getPoint();
|
||||
SwingUtilities.convertPointToScreen(screenPoint, eventSource);
|
||||
Rectangle screenBounds = new Rectangle(eventSource.getLocationOnScreen().x,
|
||||
eventSource.getLocationOnScreen().y,
|
||||
eventSource.getWidth(), eventSource.getHeight());
|
||||
if(insideTarget) {
|
||||
if(!screenBounds.contains(screenPoint)) {
|
||||
boolean eventInsideTarget = isEventInsideTarget(event);
|
||||
if (event.getComponent().getDropTarget() == insideTarget) {
|
||||
if (!eventInsideTarget) {
|
||||
processExitMessage(event);
|
||||
insideTarget = false;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if(screenBounds.contains(screenPoint)) {
|
||||
if (eventInsideTarget) {
|
||||
processEnterMessage(event);
|
||||
insideTarget = true;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
@ -115,17 +109,52 @@ final class CDropTargetContextPeer extends SunDropTargetContextPeer {
|
||||
super.processMotionMessage(event, operationChanged);
|
||||
}
|
||||
|
||||
/**
|
||||
* Could be called when DnD enters a heavyweight or synthesized in processMotionMessage
|
||||
*/
|
||||
@Override
|
||||
protected void processEnterMessage(SunDropTargetEvent event) {
|
||||
Component c = event.getComponent();
|
||||
DropTarget dt = event.getComponent().getDropTarget();
|
||||
if (isEventInsideTarget(event)
|
||||
&& dt != insideTarget
|
||||
&& c.isShowing()
|
||||
&& dt != null
|
||||
&& dt.isActive()) {
|
||||
insideTarget = dt;
|
||||
super.processEnterMessage(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Could be called when DnD exits a heavyweight or synthesized in processMotionMessage
|
||||
*/
|
||||
@Override
|
||||
protected void processExitMessage(SunDropTargetEvent event) {
|
||||
if (event.getComponent().getDropTarget() == insideTarget) {
|
||||
insideTarget = null;
|
||||
super.processExitMessage(event);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processDropMessage(SunDropTargetEvent event) {
|
||||
Component eventSource = (Component)event.getComponent();
|
||||
if (isEventInsideTarget(event)) {
|
||||
super.processDropMessage(event);
|
||||
insideTarget = null;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isEventInsideTarget(SunDropTargetEvent event) {
|
||||
Component eventSource = event.getComponent();
|
||||
Point screenPoint = event.getPoint();
|
||||
SwingUtilities.convertPointToScreen(screenPoint, eventSource);
|
||||
Rectangle screenBounds = new Rectangle(eventSource.getLocationOnScreen().x,
|
||||
eventSource.getLocationOnScreen().y,
|
||||
eventSource.getWidth(), eventSource.getHeight());
|
||||
if(screenBounds.contains(screenPoint)) {
|
||||
super.processDropMessage(event);
|
||||
}
|
||||
Point locationOnScreen = eventSource.getLocationOnScreen();
|
||||
Rectangle screenBounds = new Rectangle(locationOnScreen.x,
|
||||
locationOnScreen.y,
|
||||
eventSource.getWidth(),
|
||||
eventSource.getHeight());
|
||||
return screenBounds.contains(screenPoint);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -326,11 +326,6 @@ class CFileDialog implements FileDialogPeer {
|
||||
return getMinimumSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Toolkit getToolkit() {
|
||||
return Toolkit.getDefaultToolkit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleEvent(AWTEvent e) {
|
||||
}
|
||||
|
||||
@ -210,7 +210,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||
private boolean undecorated; // initialized in getInitialStyleBits()
|
||||
private Rectangle normalBounds = null; // not-null only for undecorated maximized windows
|
||||
private CPlatformResponder responder;
|
||||
private volatile boolean zoomed = false; // from native perspective
|
||||
|
||||
public CPlatformWindow() {
|
||||
super(0, true);
|
||||
@ -231,7 +230,9 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||
contentView.initialize(peer, responder);
|
||||
|
||||
final long ownerPtr = owner != null ? owner.getNSWindowPtr() : 0L;
|
||||
final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), ownerPtr, styleBits, 0, 0, 0, 0);
|
||||
Rectangle bounds = _peer.constrainBounds(_target.getBounds());
|
||||
final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(),
|
||||
ownerPtr, styleBits, bounds.x, bounds.y, bounds.width, bounds.height);
|
||||
setPtr(nativeWindowPtr);
|
||||
|
||||
if (target instanceof javax.swing.RootPaneContainer) {
|
||||
@ -466,7 +467,8 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||
}
|
||||
|
||||
private boolean isMaximized() {
|
||||
return undecorated ? this.normalBounds != null : zoomed;
|
||||
return undecorated ? this.normalBounds != null
|
||||
: CWrapper.NSWindow.isZoomed(getNSWindowPtr());
|
||||
}
|
||||
|
||||
private void maximize() {
|
||||
@ -474,7 +476,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||
return;
|
||||
}
|
||||
if (!undecorated) {
|
||||
zoomed = true;
|
||||
CWrapper.NSWindow.zoom(getNSWindowPtr());
|
||||
} else {
|
||||
deliverZoom(true);
|
||||
@ -496,7 +497,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||
return;
|
||||
}
|
||||
if (!undecorated) {
|
||||
zoomed = false;
|
||||
CWrapper.NSWindow.zoom(getNSWindowPtr());
|
||||
} else {
|
||||
deliverZoom(false);
|
||||
|
||||
@ -68,6 +68,7 @@ public final class CWrapper {
|
||||
|
||||
public static native void miniaturize(long window);
|
||||
public static native void deminiaturize(long window);
|
||||
public static native boolean isZoomed(long window);
|
||||
public static native void zoom(long window);
|
||||
|
||||
public static native void makeFirstResponder(long window, long responder);
|
||||
|
||||
@ -76,5 +76,6 @@ FILE_NAME=application/x-java-file-list;class=java.util.List
|
||||
text/uri-list=application/x-java-file-list;class=java.util.List
|
||||
PNG=image/x-java-image;class=java.awt.Image
|
||||
JFIF=image/x-java-image;class=java.awt.Image
|
||||
TIFF=image/x-java-image;class=java.awt.Image
|
||||
RICH_TEXT=text/rtf
|
||||
HTML=text/html;charset=utf-8;eoln="\r\n";terminators=1
|
||||
|
||||
@ -1,110 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#import <dlfcn.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <JavaNativeFoundation/JavaNativeFoundation.h>
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN PATH_MAX
|
||||
#endif
|
||||
|
||||
static jboolean
|
||||
GetPathFromCurrentBinary(char *buf, jint bufsize)
|
||||
{
|
||||
Dl_info dlinfo;
|
||||
dladdr((void *)GetPathFromCurrentBinary, &dlinfo);
|
||||
if (realpath(dlinfo.dli_fname, buf) == NULL) {
|
||||
// fprintf(stderr, "Error: realpath(`%s') failed.\n", dlinfo.dli_fname);
|
||||
return JNI_FALSE;
|
||||
}
|
||||
|
||||
const char *libawt = "lib/libawt.dylib";
|
||||
int strLen, libawtLen;
|
||||
|
||||
strLen = strlen(buf);
|
||||
libawtLen = strlen(libawt);
|
||||
|
||||
if (strLen < libawtLen ||
|
||||
strcmp(buf + strLen - libawtLen, libawt) != 0) {
|
||||
return JNI_FALSE;
|
||||
}
|
||||
|
||||
buf[strLen - libawtLen] = '\0';
|
||||
|
||||
return JNI_TRUE;
|
||||
}
|
||||
|
||||
#define JAVA_DLL "libjava.dylib"
|
||||
|
||||
static jboolean
|
||||
GetJREPath(char *buf, jint bufsize)
|
||||
{
|
||||
/* try to get the path from the current binary, if not, bail to the framework */
|
||||
if (GetPathFromCurrentBinary(buf, bufsize) == JNI_TRUE) {
|
||||
/* does the rest of the JRE exist? */
|
||||
char libjava[MAXPATHLEN];
|
||||
snprintf(libjava, MAXPATHLEN, "%s/lib/" JAVA_DLL, buf);
|
||||
if (access(libjava, F_OK) == 0) {
|
||||
return JNI_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return JNI_FALSE;
|
||||
}
|
||||
|
||||
static NSString *getRunningJavaBundle()
|
||||
{
|
||||
char path[MAXPATHLEN];
|
||||
GetJREPath(path, MAXPATHLEN);
|
||||
return [[NSString alloc] initWithFormat:@"%@/bundle", [NSString stringWithUTF8String:path]];
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: com_apple_resources_LoadNativeBundleAction
|
||||
* Method: getPathToBundleFile
|
||||
* Signature: (Ljava/lang/String)Ljava/lang/String;
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_com_apple_resources_LoadNativeBundleAction_getPathToBundleFile
|
||||
(JNIEnv *env, jclass klass, jstring filename)
|
||||
{
|
||||
jstring returnVal = NULL;
|
||||
if (filename == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
JNF_COCOA_ENTER(env);
|
||||
NSBundle *javaBundle = [NSBundle bundleWithPath:getRunningJavaBundle()];
|
||||
NSString *baseFilename = JNFJavaToNSString(env, filename);
|
||||
NSString *propertyFilePath = [javaBundle pathForResource:baseFilename ofType:@"properties"];
|
||||
|
||||
if (propertyFilePath != nil) {
|
||||
returnVal = JNFNSToJavaString(env, propertyFilePath);
|
||||
}
|
||||
JNF_COCOA_EXIT(env);
|
||||
|
||||
return returnVal;
|
||||
}
|
||||
@ -366,7 +366,7 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||
|
||||
- (BOOL) canBecomeMainWindow {
|
||||
AWT_ASSERT_APPKIT_THREAD;
|
||||
if(!self.isEnabled){
|
||||
if (!self.isEnabled) {
|
||||
// Native system can bring up the NSWindow to
|
||||
// the top even if the window is not main.
|
||||
// We should bring up the modal dialog manually
|
||||
@ -377,7 +377,7 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||
if (platformWindow != NULL) {
|
||||
static JNF_MEMBER_CACHE(jm_checkBlockingAndOrder, jc_CPlatformWindow,
|
||||
"checkBlockingAndOrder", "()Z");
|
||||
JNFCallVoidMethod(env, platformWindow, jm_checkBlockingAndOrder);
|
||||
JNFCallBooleanMethod(env, platformWindow, jm_checkBlockingAndOrder);
|
||||
(*env)->DeleteLocalRef(env, platformWindow);
|
||||
}
|
||||
}
|
||||
|
||||
@ -477,6 +477,8 @@ extern JNFClassInfo jc_CDropTargetContextPeer;
|
||||
sDraggingExited = FALSE;
|
||||
sDraggingLocation = [sender draggingLocation];
|
||||
NSPoint javaLocation = [fView convertPoint:sDraggingLocation fromView:nil];
|
||||
javaLocation.y = fView.window.frame.size.height - javaLocation.y;
|
||||
|
||||
DLog5(@"+ dragEnter: loc native %f, %f, java %f, %f\n", sDraggingLocation.x, sDraggingLocation.y, javaLocation.x, javaLocation.y);
|
||||
|
||||
////////// BEGIN Calculate the current drag actions //////////
|
||||
@ -570,8 +572,7 @@ extern JNFClassInfo jc_CDropTargetContextPeer;
|
||||
// Should we notify Java things have changed?
|
||||
if (sDraggingError == FALSE && notifyJava) {
|
||||
NSPoint javaLocation = [fView convertPoint:sDraggingLocation fromView:nil];
|
||||
// For some reason even after the convertPoint drag events come with the y coordinate reverted
|
||||
javaLocation.y = fView.window.frame.size.height - javaLocation.y;
|
||||
javaLocation.y = fView.window.frame.size.height - javaLocation.y;
|
||||
//DLog5(@" : dragMoved: loc native %f, %f, java %f, %f\n", sDraggingLocation.x, sDraggingLocation.y, javaLocation.x, javaLocation.y);
|
||||
|
||||
jlongArray formats = sDraggingFormats;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 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
|
||||
@ -93,6 +93,14 @@ canChooseDirectories:(BOOL)inChooseDirectories
|
||||
- (void)safeSaveOrLoad {
|
||||
NSSavePanel *thePanel = nil;
|
||||
|
||||
/*
|
||||
* 8013553: turns off extension hiding for the native file dialog.
|
||||
* This way is used because setExtensionHidden(NO) doesn't work
|
||||
* as expected.
|
||||
*/
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
[defaults setBool:NO forKey:@"NSNavLastUserSetHideExtensionButtonState"];
|
||||
|
||||
if (fMode == java_awt_FileDialog_SAVE) {
|
||||
thePanel = [NSSavePanel savePanel];
|
||||
[thePanel setAllowsOtherFileTypes:YES];
|
||||
@ -110,7 +118,7 @@ canChooseDirectories:(BOOL)inChooseDirectories
|
||||
if (fMode == java_awt_FileDialog_LOAD) {
|
||||
NSOpenPanel *openPanel = (NSOpenPanel *)thePanel;
|
||||
[openPanel setAllowsMultipleSelection:fMultipleMode];
|
||||
[openPanel setCanChooseFiles:YES];
|
||||
[openPanel setCanChooseFiles:!fChooseDirectories];
|
||||
[openPanel setCanChooseDirectories:fChooseDirectories];
|
||||
[openPanel setCanCreateDirectories:YES];
|
||||
}
|
||||
|
||||
@ -435,6 +435,29 @@ JNF_COCOA_ENTER(env);
|
||||
JNF_COCOA_EXIT(env);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: sun_lwawt_macosx_CWrapper$NSWindow
|
||||
* Method: isZoomed
|
||||
* Signature: (J)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_sun_lwawt_macosx_CWrapper_00024NSWindow_isZoomed
|
||||
(JNIEnv *env, jclass cls, jlong windowPtr)
|
||||
{
|
||||
__block jboolean isZoomed = JNI_FALSE;
|
||||
|
||||
JNF_COCOA_ENTER(env);
|
||||
|
||||
NSWindow *window = (NSWindow *)jlong_to_ptr(windowPtr);
|
||||
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
|
||||
isZoomed = [window isZoomed];
|
||||
}];
|
||||
|
||||
JNF_COCOA_EXIT(env);
|
||||
|
||||
return isZoomed;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: sun_lwawt_macosx_CWrapper$NSWindow
|
||||
* Method: zoom
|
||||
|
||||
@ -227,7 +227,7 @@ static void AWT_NSUncaughtExceptionHandler(NSException *exception) {
|
||||
id jrsAppKitAWTClass = objc_getClass("JRSAppKitAWT");
|
||||
SEL markAppSel = @selector(markAppIsDaemon);
|
||||
if (![jrsAppKitAWTClass respondsToSelector:markAppSel]) return NO;
|
||||
return (BOOL)[jrsAppKitAWTClass performSelector:markAppSel];
|
||||
return [jrsAppKitAWTClass performSelector:markAppSel] ? YES : NO;
|
||||
}
|
||||
|
||||
+ (void)appKitIsRunning:(id)arg {
|
||||
@ -337,6 +337,8 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||
|
||||
// Headless mode trumps either ordinary AWT or SWT-in-AWT mode. Declare us a daemon and return.
|
||||
if (headless) {
|
||||
// Note that we don't install run loop observers in headless mode
|
||||
// because we don't need them (see 7174704)
|
||||
if (!forceEmbeddedMode) {
|
||||
setUpAppKitThreadName();
|
||||
}
|
||||
|
||||
@ -271,22 +271,6 @@ javax.crypto.interfaces.DHPrivateKey, Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
String LINE_SEP = System.getProperty("line.separator");
|
||||
|
||||
StringBuffer strbuf
|
||||
= new StringBuffer("SunJCE Diffie-Hellman Private Key:"
|
||||
+ LINE_SEP + "x:" + LINE_SEP
|
||||
+ Debug.toHexString(this.x)
|
||||
+ LINE_SEP + "p:" + LINE_SEP
|
||||
+ Debug.toHexString(this.p)
|
||||
+ LINE_SEP + "g:" + LINE_SEP
|
||||
+ Debug.toHexString(this.g));
|
||||
if (this.l != 0)
|
||||
strbuf.append(LINE_SEP + "l:" + LINE_SEP + " " + this.l);
|
||||
return strbuf.toString();
|
||||
}
|
||||
|
||||
private void parseKeyBits() throws InvalidKeyException {
|
||||
try {
|
||||
DerInputStream in = new DerInputStream(this.key);
|
||||
|
||||
@ -53,7 +53,10 @@ public class Tracker {
|
||||
|
||||
public static void ObjectInit(Object obj)
|
||||
{
|
||||
if ( engaged != 0 ) {
|
||||
if ( engaged != 0) {
|
||||
if (obj == null) {
|
||||
throw new IllegalArgumentException("Null object.");
|
||||
}
|
||||
nativeObjectInit(Thread.currentThread(), obj);
|
||||
}
|
||||
}
|
||||
@ -66,7 +69,10 @@ public class Tracker {
|
||||
|
||||
public static void NewArray(Object obj)
|
||||
{
|
||||
if ( engaged != 0 ) {
|
||||
if ( engaged != 0) {
|
||||
if (obj == null) {
|
||||
throw new IllegalArgumentException("Null object.");
|
||||
}
|
||||
nativeNewArray(Thread.currentThread(), obj);
|
||||
}
|
||||
}
|
||||
@ -82,6 +88,14 @@ public class Tracker {
|
||||
public static void CallSite(int cnum, int mnum)
|
||||
{
|
||||
if ( engaged != 0 ) {
|
||||
if (cnum < 0) {
|
||||
throw new IllegalArgumentException("Negative class index");
|
||||
}
|
||||
|
||||
if (mnum < 0) {
|
||||
throw new IllegalArgumentException("Negative method index");
|
||||
}
|
||||
|
||||
nativeCallSite(Thread.currentThread(), cnum, mnum);
|
||||
}
|
||||
}
|
||||
@ -95,6 +109,14 @@ public class Tracker {
|
||||
public static void ReturnSite(int cnum, int mnum)
|
||||
{
|
||||
if ( engaged != 0 ) {
|
||||
if (cnum < 0) {
|
||||
throw new IllegalArgumentException("Negative class index");
|
||||
}
|
||||
|
||||
if (mnum < 0) {
|
||||
throw new IllegalArgumentException("Negative method index");
|
||||
}
|
||||
|
||||
nativeReturnSite(Thread.currentThread(), cnum, mnum);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 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.sun.imageio.plugins.bmp;
|
||||
|
||||
public class BMPCompressionTypes {
|
||||
|
||||
private static final String[] compressionTypeNames =
|
||||
{"BI_RGB", "BI_RLE8", "BI_RLE4", "BI_BITFIELDS", "BI_JPEG", "BI_PNG"};
|
||||
|
||||
static int getType(String typeString) {
|
||||
for (int i = 0; i < compressionTypeNames.length; i++)
|
||||
if (compressionTypeNames[i].equals(typeString))
|
||||
return i;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static String getName(int type) {
|
||||
return compressionTypeNames[type];
|
||||
}
|
||||
|
||||
public static String[] getCompressionTypes() {
|
||||
return compressionTypeNames.clone();
|
||||
}
|
||||
}
|
||||
@ -47,7 +47,4 @@ public interface BMPConstants {
|
||||
static final int BI_BITFIELDS = 3;
|
||||
static final int BI_JPEG = 4;
|
||||
static final int BI_PNG = 5;
|
||||
|
||||
static final String[] compressionTypeNames =
|
||||
{"BI_RGB", "BI_RLE8", "BI_RLE4", "BI_BITFIELDS", "BI_JPEG", "BI_PNG"};
|
||||
}
|
||||
|
||||
@ -25,7 +25,6 @@
|
||||
|
||||
package com.sun.imageio.plugins.bmp;
|
||||
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.image.ColorModel;
|
||||
import java.awt.image.ComponentSampleModel;
|
||||
@ -42,7 +41,6 @@ import java.awt.image.Raster;
|
||||
import java.awt.image.RenderedImage;
|
||||
import java.awt.image.SampleModel;
|
||||
import java.awt.image.SinglePixelPackedSampleModel;
|
||||
import java.awt.image.WritableRaster;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -51,22 +49,16 @@ import java.nio.ByteOrder;
|
||||
import java.util.Iterator;
|
||||
|
||||
import javax.imageio.IIOImage;
|
||||
import javax.imageio.IIOException;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.imageio.ImageTypeSpecifier;
|
||||
import javax.imageio.ImageWriteParam;
|
||||
import javax.imageio.ImageWriter;
|
||||
import javax.imageio.metadata.IIOMetadata;
|
||||
import javax.imageio.metadata.IIOMetadataNode;
|
||||
import javax.imageio.metadata.IIOMetadataFormatImpl;
|
||||
import javax.imageio.metadata.IIOInvalidTreeException;
|
||||
import javax.imageio.spi.ImageWriterSpi;
|
||||
import javax.imageio.stream.ImageOutputStream;
|
||||
import javax.imageio.event.IIOWriteProgressListener;
|
||||
import javax.imageio.event.IIOWriteWarningListener;
|
||||
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import javax.imageio.plugins.bmp.BMPImageWriteParam;
|
||||
import com.sun.imageio.plugins.common.ImageUtil;
|
||||
@ -129,7 +121,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
meta.compression = getPreferredCompressionType(imageType);
|
||||
if (param != null
|
||||
&& param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) {
|
||||
meta.compression = getCompressionType(param.getCompressionType());
|
||||
meta.compression = BMPCompressionTypes.getType(param.getCompressionType());
|
||||
}
|
||||
meta.bitsPerPixel = (short)imageType.getColorModel().getPixelSize();
|
||||
return meta;
|
||||
@ -308,7 +300,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
|
||||
switch(bmpParam.getCompressionMode()) {
|
||||
case ImageWriteParam.MODE_EXPLICIT:
|
||||
compressionType = getCompressionType(bmpParam.getCompressionType());
|
||||
compressionType = BMPCompressionTypes.getType(bmpParam.getCompressionType());
|
||||
break;
|
||||
case ImageWriteParam.MODE_COPY_FROM_METADATA:
|
||||
compressionType = bmpImageMetadata.compression;
|
||||
@ -323,12 +315,12 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
|
||||
if (!canEncodeImage(compressionType, colorModel, sampleModel)) {
|
||||
throw new IOException("Image can not be encoded with compression type "
|
||||
+ compressionTypeNames[compressionType]);
|
||||
+ BMPCompressionTypes.getName(compressionType));
|
||||
}
|
||||
|
||||
byte r[] = null, g[] = null, b[] = null, a[] = null;
|
||||
|
||||
if (compressionType == BMPConstants.BI_BITFIELDS) {
|
||||
if (compressionType == BI_BITFIELDS) {
|
||||
bitsPerPixel =
|
||||
DataBuffer.getDataTypeSize(sampleModel.getDataType());
|
||||
|
||||
@ -372,7 +364,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
// an exception related to unsupported image format
|
||||
throw new IOException("Image can not be encoded with " +
|
||||
"compression type " +
|
||||
compressionTypeNames[compressionType]);
|
||||
BMPCompressionTypes.getName(compressionType));
|
||||
}
|
||||
}
|
||||
writeMaskToPalette(rmask, 0, r, g, b, a);
|
||||
@ -511,8 +503,8 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
* Images with any other compression type must be wrote in the
|
||||
* bottom-up layout.
|
||||
*/
|
||||
if (compressionType == BMPConstants.BI_RGB ||
|
||||
compressionType == BMPConstants.BI_BITFIELDS)
|
||||
if (compressionType == BI_RGB ||
|
||||
compressionType == BI_BITFIELDS)
|
||||
{
|
||||
isTopDown = bmpParam.isTopDown();
|
||||
} else {
|
||||
@ -543,7 +535,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
if (isPalette == true) {
|
||||
|
||||
// write palette
|
||||
if (compressionType == BMPConstants.BI_BITFIELDS) {
|
||||
if (compressionType == BI_BITFIELDS) {
|
||||
// write masks for red, green and blue components.
|
||||
for (int i=0; i<3; i++) {
|
||||
int mask = (a[i]&0xFF) + ((r[i]&0xFF)*0x100) + ((g[i]&0xFF)*0x10000) + ((b[i]&0xFF)*0x1000000);
|
||||
@ -571,8 +563,8 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
|
||||
int l;
|
||||
|
||||
if (compressionType == BMPConstants.BI_JPEG ||
|
||||
compressionType == BMPConstants.BI_PNG) {
|
||||
if (compressionType == BI_JPEG ||
|
||||
compressionType == BI_PNG) {
|
||||
|
||||
// prepare embedded buffer
|
||||
embedded_stream = new ByteArrayOutputStream();
|
||||
@ -657,7 +649,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
pos = sppsm.getOffset(startX, startY);
|
||||
}
|
||||
|
||||
if (compressionType == BMPConstants.BI_RGB || compressionType == BMPConstants.BI_BITFIELDS){
|
||||
if (compressionType == BI_RGB || compressionType == BI_BITFIELDS){
|
||||
switch(dataType) {
|
||||
case DataBuffer.TYPE_BYTE:
|
||||
byte[] bdata =
|
||||
@ -687,7 +679,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
for(int k=0; k<padding; k++) {
|
||||
stream.writeByte(0);
|
||||
}
|
||||
} else if (compressionType == BMPConstants.BI_RLE4) {
|
||||
} else if (compressionType == BI_RLE4) {
|
||||
if (bpixels == null || bpixels.length < scanlineBytes)
|
||||
bpixels = new byte[scanlineBytes];
|
||||
src.getPixels(srcRect.x, srcRect.y,
|
||||
@ -696,7 +688,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
bpixels[h] = (byte)pixels[h];
|
||||
}
|
||||
encodeRLE4(bpixels, scanlineBytes);
|
||||
} else if (compressionType == BMPConstants.BI_RLE8) {
|
||||
} else if (compressionType == BI_RLE8) {
|
||||
//byte[] bdata =
|
||||
// ((DataBufferByte)src.getDataBuffer()).getData();
|
||||
//System.out.println("bdata.length="+bdata.length);
|
||||
@ -734,8 +726,8 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
processImageProgress(100.0f * (((float)i) / ((float)h)));
|
||||
}
|
||||
|
||||
if (compressionType == BMPConstants.BI_RLE4 ||
|
||||
compressionType == BMPConstants.BI_RLE8) {
|
||||
if (compressionType == BI_RLE4 ||
|
||||
compressionType == BI_RLE8) {
|
||||
// Write the RLE EOF marker and
|
||||
stream.writeByte(0);
|
||||
stream.writeByte(1);
|
||||
@ -793,7 +785,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (compressionType == BMPConstants.BI_RLE4){
|
||||
if (compressionType == BI_RLE4){
|
||||
byte[] bipixels = new byte[scanlineBytes];
|
||||
for (int h=0; h<scanlineBytes; h++) {
|
||||
bipixels[h] = (byte)pixels[l++];
|
||||
@ -814,7 +806,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
break;
|
||||
|
||||
case 8:
|
||||
if(compressionType == BMPConstants.BI_RLE8) {
|
||||
if(compressionType == BI_RLE8) {
|
||||
for (int h=0; h<scanlineBytes; h++) {
|
||||
bpixels[h] = (byte)pixels[l++];
|
||||
}
|
||||
@ -841,7 +833,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
*/
|
||||
for (int j = 0, m = 0; j < scanlineBytes; m++) {
|
||||
spixels[m] = 0;
|
||||
if (compressionType == BMPConstants.BI_RGB) {
|
||||
if (compressionType == BI_RGB) {
|
||||
/*
|
||||
* please note that despite other cases,
|
||||
* the 16bpp BI_RGB requires the RGB data order
|
||||
@ -910,7 +902,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
*/
|
||||
for (int j = 0, m = 0; j < scanlineBytes; m++) {
|
||||
ipixels[m] = 0;
|
||||
if (compressionType == BMPConstants.BI_RGB) {
|
||||
if (compressionType == BI_RGB) {
|
||||
ipixels[m] =
|
||||
((0xff & pixels[j + 2]) << 16) |
|
||||
((0xff & pixels[j + 1]) << 8) |
|
||||
@ -945,8 +937,8 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
}
|
||||
|
||||
// Write out the padding
|
||||
if (compressionType == BMPConstants.BI_RGB ||
|
||||
compressionType == BMPConstants.BI_BITFIELDS)
|
||||
if (compressionType == BI_RGB ||
|
||||
compressionType == BI_BITFIELDS)
|
||||
{
|
||||
for(k=0; k<padding; k++) {
|
||||
stream.writeByte(0);
|
||||
@ -1329,17 +1321,10 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
stream = null;
|
||||
}
|
||||
|
||||
private int getCompressionType(String typeString) {
|
||||
for (int i = 0; i < BMPConstants.compressionTypeNames.length; i++)
|
||||
if (BMPConstants.compressionTypeNames[i].equals(typeString))
|
||||
return i;
|
||||
return 0;
|
||||
}
|
||||
|
||||
private void writeEmbedded(IIOImage image,
|
||||
ImageWriteParam bmpParam) throws IOException {
|
||||
String format =
|
||||
compressionType == BMPConstants.BI_JPEG ? "jpeg" : "png";
|
||||
compressionType == BI_JPEG ? "jpeg" : "png";
|
||||
Iterator iterator = ImageIO.getImageWritersByFormatName(format);
|
||||
ImageWriter writer = null;
|
||||
if (iterator.hasNext())
|
||||
|
||||
@ -219,7 +219,7 @@ public class BMPMetadata extends IIOMetadata implements BMPConstants {
|
||||
|
||||
// CompressionTypeName
|
||||
IIOMetadataNode subNode = new IIOMetadataNode("CompressionTypeName");
|
||||
subNode.setAttribute("value", compressionTypeNames[compression]);
|
||||
subNode.setAttribute("value", BMPCompressionTypes.getName(compression));
|
||||
node.appendChild(subNode);
|
||||
return node;
|
||||
}
|
||||
|
||||
@ -25,11 +25,8 @@
|
||||
|
||||
package com.sun.imageio.plugins.gif;
|
||||
|
||||
import javax.imageio.ImageTypeSpecifier;
|
||||
import javax.imageio.metadata.IIOInvalidTreeException;
|
||||
import javax.imageio.metadata.IIOMetadata;
|
||||
import javax.imageio.metadata.IIOMetadataNode;
|
||||
import javax.imageio.metadata.IIOMetadataFormat;
|
||||
import javax.imageio.metadata.IIOMetadataFormatImpl;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
@ -41,7 +38,7 @@ public class GIFStreamMetadata extends GIFMetadata {
|
||||
static final String
|
||||
nativeMetadataFormatName = "javax_imageio_gif_stream_1.0";
|
||||
|
||||
public static final String[] versionStrings = { "87a", "89a" };
|
||||
static final String[] versionStrings = { "87a", "89a" };
|
||||
|
||||
public String version; // 87a or 89a
|
||||
public int logicalScreenWidth;
|
||||
@ -52,7 +49,7 @@ public class GIFStreamMetadata extends GIFMetadata {
|
||||
public int backgroundColorIndex; // Valid if globalColorTable != null
|
||||
public boolean sortFlag; // Valid if globalColorTable != null
|
||||
|
||||
public static final String[] colorTableSizes = {
|
||||
static final String[] colorTableSizes = {
|
||||
"2", "4", "8", "16", "32", "64", "128", "256"
|
||||
};
|
||||
|
||||
|
||||
@ -25,14 +25,11 @@
|
||||
|
||||
package com.sun.imageio.plugins.jpeg;
|
||||
|
||||
import javax.imageio.metadata.IIOMetadataFormatImpl;
|
||||
import javax.imageio.ImageTypeSpecifier;
|
||||
import javax.imageio.plugins.jpeg.JPEGQTable;
|
||||
import javax.imageio.plugins.jpeg.JPEGHuffmanTable;
|
||||
|
||||
import java.awt.image.ColorModel;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.DataBuffer;
|
||||
import java.awt.color.ColorSpace;
|
||||
import java.awt.color.ICC_ColorSpace;
|
||||
|
||||
@ -172,9 +169,9 @@ public class JPEG {
|
||||
public static final String vendor = "Oracle Corporation";
|
||||
public static final String version = "0.5";
|
||||
// Names of the formats we can read or write
|
||||
public static final String [] names = {"JPEG", "jpeg", "JPG", "jpg"};
|
||||
public static final String [] suffixes = {"jpg", "jpeg"};
|
||||
public static final String [] MIMETypes = {"image/jpeg"};
|
||||
static final String [] names = {"JPEG", "jpeg", "JPG", "jpg"};
|
||||
static final String [] suffixes = {"jpg", "jpeg"};
|
||||
static final String [] MIMETypes = {"image/jpeg"};
|
||||
public static final String nativeImageMetadataFormatName =
|
||||
"javax_imageio_jpeg_image_1.0";
|
||||
public static final String nativeImageMetadataFormatClassName =
|
||||
@ -201,12 +198,12 @@ public class JPEG {
|
||||
public static final int NUM_JCS_CODES = JCS_YCCK+1;
|
||||
|
||||
/** IJG can handle up to 4-channel JPEGs */
|
||||
public static final int [] [] bandOffsets = {{0},
|
||||
static final int [] [] bandOffsets = {{0},
|
||||
{0, 1},
|
||||
{0, 1, 2},
|
||||
{0, 1, 2, 3}};
|
||||
|
||||
public static final int [] bOffsRGB = { 2, 1, 0 };
|
||||
static final int [] bOffsRGB = { 2, 1, 0 };
|
||||
|
||||
/* These are kept in the inner class to avoid static initialization
|
||||
* of the CMM class until someone actually needs it.
|
||||
|
||||
@ -1165,6 +1165,11 @@ public class JPEGImageReader extends ImageReader {
|
||||
target = imRas;
|
||||
}
|
||||
int [] bandSizes = target.getSampleModel().getSampleSize();
|
||||
for (int i = 0; i < bandSizes.length; i++) {
|
||||
if (bandSizes[i] <= 0 || bandSizes[i] > 8) {
|
||||
throw new IIOException("Illegal band size: should be 0 < size <= 8");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If the process is sequential, and we have restart markers,
|
||||
|
||||
@ -495,8 +495,8 @@ public class JPEGImageWriter extends ImageWriter {
|
||||
// handle <= 8-bit samples. We now check the band sizes and throw
|
||||
// an exception for images, such as USHORT_GRAY, with > 8 bits
|
||||
// per sample.
|
||||
if (bandSizes[i] > 8) {
|
||||
throw new IIOException("Sample size must be <= 8");
|
||||
if (bandSizes[i] <= 0 || bandSizes[i] > 8) {
|
||||
throw new IIOException("Illegal band size: should be 0 < size <= 8");
|
||||
}
|
||||
// 4450894 part 2: We expand IndexColorModel images to full 24-
|
||||
// or 32-bit in grabPixels() for each scanline. For indexed
|
||||
|
||||
@ -29,12 +29,10 @@ import java.awt.image.ColorModel;
|
||||
import java.awt.image.IndexColorModel;
|
||||
import java.awt.image.SampleModel;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.StringTokenizer;
|
||||
import javax.imageio.ImageTypeSpecifier;
|
||||
import javax.imageio.metadata.IIOInvalidTreeException;
|
||||
import javax.imageio.metadata.IIOMetadata;
|
||||
import javax.imageio.metadata.IIOMetadataFormat;
|
||||
import javax.imageio.metadata.IIOMetadataFormatImpl;
|
||||
import javax.imageio.metadata.IIOMetadataNode;
|
||||
import org.w3c.dom.Node;
|
||||
@ -49,42 +47,42 @@ public class PNGMetadata extends IIOMetadata implements Cloneable {
|
||||
= "com.sun.imageio.plugins.png.PNGMetadataFormat";
|
||||
|
||||
// Color types for IHDR chunk
|
||||
public static final String[] IHDR_colorTypeNames = {
|
||||
static final String[] IHDR_colorTypeNames = {
|
||||
"Grayscale", null, "RGB", "Palette",
|
||||
"GrayAlpha", null, "RGBAlpha"
|
||||
};
|
||||
|
||||
public static final int[] IHDR_numChannels = {
|
||||
static final int[] IHDR_numChannels = {
|
||||
1, 0, 3, 3, 2, 0, 4
|
||||
};
|
||||
|
||||
// Bit depths for IHDR chunk
|
||||
public static final String[] IHDR_bitDepths = {
|
||||
static final String[] IHDR_bitDepths = {
|
||||
"1", "2", "4", "8", "16"
|
||||
};
|
||||
|
||||
// Compression methods for IHDR chunk
|
||||
public static final String[] IHDR_compressionMethodNames = {
|
||||
static final String[] IHDR_compressionMethodNames = {
|
||||
"deflate"
|
||||
};
|
||||
|
||||
// Filter methods for IHDR chunk
|
||||
public static final String[] IHDR_filterMethodNames = {
|
||||
static final String[] IHDR_filterMethodNames = {
|
||||
"adaptive"
|
||||
};
|
||||
|
||||
// Interlace methods for IHDR chunk
|
||||
public static final String[] IHDR_interlaceMethodNames = {
|
||||
static final String[] IHDR_interlaceMethodNames = {
|
||||
"none", "adam7"
|
||||
};
|
||||
|
||||
// Compression methods for iCCP chunk
|
||||
public static final String[] iCCP_compressionMethodNames = {
|
||||
static final String[] iCCP_compressionMethodNames = {
|
||||
"deflate"
|
||||
};
|
||||
|
||||
// Compression methods for zTXt chunk
|
||||
public static final String[] zTXt_compressionMethodNames = {
|
||||
static final String[] zTXt_compressionMethodNames = {
|
||||
"deflate"
|
||||
};
|
||||
|
||||
@ -95,12 +93,12 @@ public class PNGMetadata extends IIOMetadata implements Cloneable {
|
||||
public static final int PHYS_UNIT_METER = 1;
|
||||
|
||||
// Unit specifiers for pHYs chunk
|
||||
public static final String[] unitSpecifierNames = {
|
||||
static final String[] unitSpecifierNames = {
|
||||
"unknown", "meter"
|
||||
};
|
||||
|
||||
// Rendering intents for sRGB chunk
|
||||
public static final String[] renderingIntentNames = {
|
||||
static final String[] renderingIntentNames = {
|
||||
"Perceptual", // 0
|
||||
"Relative colorimetric", // 1
|
||||
"Saturation", // 2
|
||||
@ -109,7 +107,7 @@ public class PNGMetadata extends IIOMetadata implements Cloneable {
|
||||
};
|
||||
|
||||
// Color space types for Chroma->ColorSpaceType node
|
||||
public static final String[] colorSpaceTypeNames = {
|
||||
static final String[] colorSpaceTypeNames = {
|
||||
"GRAY", null, "RGB", "RGB",
|
||||
"GRAY", null, "RGB"
|
||||
};
|
||||
|
||||
@ -85,42 +85,42 @@ public class WBMPImageReaderSpi extends ImageReaderSpi {
|
||||
ImageInputStream stream = (ImageInputStream)source;
|
||||
|
||||
stream.mark();
|
||||
int type = stream.readByte(); // TypeField
|
||||
int fixHeaderField = stream.readByte();
|
||||
// check WBMP "header"
|
||||
if (type != 0 || fixHeaderField != 0) {
|
||||
// while WBMP reader does not support ext WBMP headers
|
||||
try {
|
||||
int type = stream.readByte(); // TypeField
|
||||
int fixHeaderField = stream.readByte();
|
||||
// check WBMP "header"
|
||||
if (type != 0 || fixHeaderField != 0) {
|
||||
// while WBMP reader does not support ext WBMP headers
|
||||
return false;
|
||||
}
|
||||
|
||||
int width = ReaderUtil.readMultiByteInteger(stream);
|
||||
int height = ReaderUtil.readMultiByteInteger(stream);
|
||||
// check image dimension
|
||||
if (width <= 0 || height <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
long dataLength = stream.length();
|
||||
if (dataLength == -1) {
|
||||
// We can't verify that amount of data in the stream
|
||||
// corresponds to image dimension because we do not know
|
||||
// the length of the data stream.
|
||||
// Assuming that wbmp image are used for mobile devices,
|
||||
// let's introduce an upper limit for image dimension.
|
||||
// In case if exact amount of raster data is unknown,
|
||||
// let's reject images with dimension above the limit.
|
||||
return (width < MAX_WBMP_WIDTH) && (height < MAX_WBMP_HEIGHT);
|
||||
}
|
||||
|
||||
dataLength -= stream.getStreamPosition();
|
||||
|
||||
long scanSize = (width / 8) + ((width % 8) == 0 ? 0 : 1);
|
||||
|
||||
return (dataLength == scanSize * height);
|
||||
} finally {
|
||||
stream.reset();
|
||||
return false;
|
||||
}
|
||||
|
||||
int width = ReaderUtil.readMultiByteInteger(stream);
|
||||
int height = ReaderUtil.readMultiByteInteger(stream);
|
||||
// check image dimension
|
||||
if (width <= 0 || height <= 0) {
|
||||
stream.reset();
|
||||
return false;
|
||||
}
|
||||
|
||||
long dataLength = stream.length();
|
||||
if (dataLength == -1) {
|
||||
// We can't verify that amount of data in the stream
|
||||
// corresponds to image dimension because we do not know
|
||||
// the length of the data stream.
|
||||
// Assuming that wbmp image are used for mobile devices,
|
||||
// let's introduce an upper limit for image dimension.
|
||||
// In case if exact amount of raster data is unknown,
|
||||
// let's reject images with dimension above the limit.
|
||||
stream.reset();
|
||||
return (width < MAX_WBMP_WIDTH) && (height < MAX_WBMP_HEIGHT);
|
||||
}
|
||||
|
||||
dataLength -= stream.getStreamPosition();
|
||||
stream.reset();
|
||||
|
||||
long scanSize = (width / 8) + ((width % 8) == 0 ? 0 : 1);
|
||||
|
||||
return (dataLength == scanSize * height);
|
||||
}
|
||||
|
||||
public ImageReader createReaderInstance(Object extension)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009,2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -36,13 +36,34 @@ import java.rmi.RemoteException;
|
||||
import java.rmi.NoSuchObjectException;
|
||||
|
||||
import com.sun.jmx.remote.internal.IIOPProxy;
|
||||
import java.io.SerializablePermission;
|
||||
import java.security.AccessControlContext;
|
||||
import java.security.AccessController;
|
||||
import java.security.Permissions;
|
||||
import java.security.PrivilegedActionException;
|
||||
import java.security.PrivilegedExceptionAction;
|
||||
import java.security.ProtectionDomain;
|
||||
|
||||
/**
|
||||
* An implementatin of IIOPProxy that simply delegates to the appropriate
|
||||
* An implementation of IIOPProxy that simply delegates to the appropriate
|
||||
* RMI-IIOP and CORBA APIs.
|
||||
*/
|
||||
|
||||
public class IIOPProxyImpl implements IIOPProxy {
|
||||
// special ACC used to initialize the IIOP stub
|
||||
// the only allowed privilege is SerializablePermission("enableSubclassImplementation")
|
||||
private static final AccessControlContext STUB_ACC;
|
||||
|
||||
static {
|
||||
Permissions p = new Permissions();
|
||||
p.add(new SerializablePermission("enableSubclassImplementation"));
|
||||
STUB_ACC = new AccessControlContext(
|
||||
new ProtectionDomain[]{
|
||||
new ProtectionDomain(null, p)
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public IIOPProxyImpl() { }
|
||||
|
||||
@Override
|
||||
@ -113,7 +134,24 @@ public class IIOPProxyImpl implements IIOPProxy {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Remote toStub(Remote obj) throws NoSuchObjectException {
|
||||
return PortableRemoteObject.toStub(obj);
|
||||
public Remote toStub(final Remote obj) throws NoSuchObjectException {
|
||||
if (System.getSecurityManager() == null) {
|
||||
return PortableRemoteObject.toStub(obj);
|
||||
} else {
|
||||
try {
|
||||
return AccessController.doPrivileged(new PrivilegedExceptionAction<Remote>() {
|
||||
|
||||
@Override
|
||||
public Remote run() throws Exception {
|
||||
return PortableRemoteObject.toStub(obj);
|
||||
}
|
||||
}, STUB_ACC);
|
||||
} catch (PrivilegedActionException e) {
|
||||
if (e.getException() instanceof NoSuchObjectException) {
|
||||
throw (NoSuchObjectException)e.getException();
|
||||
}
|
||||
throw new RuntimeException("Unexpected exception type", e.getException());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,11 +25,12 @@
|
||||
|
||||
package com.sun.jndi.ldap;
|
||||
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.net.MalformedURLException;
|
||||
import java.security.AccessControlContext;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import sun.misc.SharedSecrets;
|
||||
|
||||
final class VersionHelper12 extends VersionHelper {
|
||||
|
||||
@ -82,12 +83,16 @@ final class VersionHelper12 extends VersionHelper {
|
||||
}
|
||||
|
||||
Thread createThread(final Runnable r) {
|
||||
final AccessControlContext acc = AccessController.getContext();
|
||||
// 4290486: doPrivileged is needed to create a thread in
|
||||
// an environment that restricts "modifyThreadGroup".
|
||||
return AccessController.doPrivileged(
|
||||
new PrivilegedAction<Thread>() {
|
||||
public Thread run() {
|
||||
return new Thread(r);
|
||||
new PrivilegedAction<Thread>() {
|
||||
public Thread run() {
|
||||
return SharedSecrets.getJavaLangAccess()
|
||||
.newThreadWithAcc(r, acc);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,6 +67,11 @@ public interface HotSpotDiagnosticMXBean extends PlatformManagedObject {
|
||||
* cannot be created, opened, or written to.
|
||||
* @throws UnsupportedOperationException if this operation is not supported.
|
||||
* @throws NullPointerException if <tt>outputFile</tt> is <tt>null</tt>.
|
||||
* @throws SecurityException
|
||||
* If a security manager exists and its {@link
|
||||
* java.lang.SecurityManager#checkWrite(java.lang.String)}
|
||||
* method denies write access to the named file
|
||||
* or the caller does not have ManagmentPermission("control").
|
||||
*/
|
||||
public void dumpHeap(String outputFile, boolean live) throws java.io.IOException;
|
||||
|
||||
|
||||
@ -187,9 +187,18 @@ final class JSSecurityManager {
|
||||
|
||||
static <T> List<T> getProviders(final Class<T> providerClass) {
|
||||
List<T> p = new ArrayList<>();
|
||||
// ServiceLoader creates "lazy" iterator instance, so it doesn't,
|
||||
// require do be called from privileged section
|
||||
final Iterator<T> ps = ServiceLoader.load(providerClass).iterator();
|
||||
// ServiceLoader creates "lazy" iterator instance, but it ensures that
|
||||
// next/hasNext run with permissions that are restricted by whatever
|
||||
// creates the ServiceLoader instance, so it requires to be called from
|
||||
// privileged section
|
||||
final PrivilegedAction<Iterator<T>> psAction =
|
||||
new PrivilegedAction<Iterator<T>>() {
|
||||
@Override
|
||||
public Iterator<T> run() {
|
||||
return ServiceLoader.load(providerClass).iterator();
|
||||
}
|
||||
};
|
||||
final Iterator<T> ps = AccessController.doPrivileged(psAction);
|
||||
|
||||
// the iterator's hasNext() method looks through classpath for
|
||||
// the provider class names, so it requires read permissions
|
||||
|
||||
@ -35,7 +35,7 @@ import org.w3c.dom.Element;
|
||||
/**
|
||||
* Handles SubjectKeyIdentifier (SKI) for X.509v3.
|
||||
*
|
||||
* @see <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/security/cert/X509Extension.html">
|
||||
* @see <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/security/cert/X509Extension.html">
|
||||
* Interface X509Extension</A>
|
||||
*/
|
||||
public class XMLX509SKI extends SignatureElementProxy implements XMLX509DataContent {
|
||||
|
||||
@ -56,7 +56,7 @@ import com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverS
|
||||
* </PRE>
|
||||
*
|
||||
* @see <A HREF="http://www.javaworld.com/javaworld/javatips/jw-javatip42_p.html">Java Tip 42: Write Java apps that work with proxy-based firewalls</A>
|
||||
* @see <A HREF="http://java.sun.com/j2se/1.4/docs/guide/net/properties.html">SUN J2SE docs for network properties</A>
|
||||
* @see <A HREF="http://docs.oracle.com/javase/1.4.2/docs/guide/net/properties.html">SUN J2SE docs for network properties</A>
|
||||
* @see <A HREF="http://metalab.unc.edu/javafaq/javafaq.html#proxy">The JAVA FAQ Question 9.5: How do I make Java work with a proxy server?</A>
|
||||
*/
|
||||
public class ResolverDirectHTTP extends ResourceResolverSpi {
|
||||
|
||||
@ -84,7 +84,7 @@ class AllClassesQuery extends QueryHandler {
|
||||
lastPackage = pkg;
|
||||
printClass(clazz);
|
||||
if (clazz.getId() != -1) {
|
||||
out.print(" [" + clazz.getIdString() + "]");
|
||||
print(" [" + clazz.getIdString() + "]");
|
||||
}
|
||||
out.println("<br>");
|
||||
}
|
||||
|
||||
@ -112,12 +112,12 @@ class ClassQuery extends QueryHandler {
|
||||
out.println("<h2>Instances</h2>");
|
||||
|
||||
printAnchorStart();
|
||||
out.print("instances/" + encodeForURL(clazz));
|
||||
print("instances/" + encodeForURL(clazz));
|
||||
out.print("\">");
|
||||
out.println("Exclude subclasses</a><br>");
|
||||
|
||||
printAnchorStart();
|
||||
out.print("allInstances/" + encodeForURL(clazz));
|
||||
print("allInstances/" + encodeForURL(clazz));
|
||||
out.print("\">");
|
||||
out.println("Include subclasses</a><br>");
|
||||
|
||||
@ -126,19 +126,19 @@ class ClassQuery extends QueryHandler {
|
||||
out.println("<h2>New Instances</h2>");
|
||||
|
||||
printAnchorStart();
|
||||
out.print("newInstances/" + encodeForURL(clazz));
|
||||
print("newInstances/" + encodeForURL(clazz));
|
||||
out.print("\">");
|
||||
out.println("Exclude subclasses</a><br>");
|
||||
|
||||
printAnchorStart();
|
||||
out.print("allNewInstances/" + encodeForURL(clazz));
|
||||
print("allNewInstances/" + encodeForURL(clazz));
|
||||
out.print("\">");
|
||||
out.println("Include subclasses</a><br>");
|
||||
}
|
||||
|
||||
out.println("<h2>References summary by Type</h2>");
|
||||
printAnchorStart();
|
||||
out.print("refsByType/" + encodeForURL(clazz));
|
||||
print("refsByType/" + encodeForURL(clazz));
|
||||
out.print("\">");
|
||||
out.println("References summary by type</a>");
|
||||
|
||||
|
||||
@ -41,21 +41,17 @@ package com.sun.tools.hat.internal.server;
|
||||
|
||||
|
||||
import java.net.Socket;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.InetAddress;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.BufferedOutputStream;
|
||||
|
||||
import com.sun.tools.hat.internal.model.Snapshot;
|
||||
import com.sun.tools.hat.internal.oql.OQLEngine;
|
||||
import com.sun.tools.hat.internal.util.Misc;
|
||||
|
||||
public class HttpReader implements Runnable {
|
||||
|
||||
@ -87,7 +83,7 @@ public class HttpReader implements Runnable {
|
||||
outputError("Protocol error");
|
||||
}
|
||||
int data;
|
||||
StringBuffer queryBuf = new StringBuffer();
|
||||
StringBuilder queryBuf = new StringBuilder();
|
||||
while ((data = in.read()) != -1 && data != ' ') {
|
||||
char ch = (char) data;
|
||||
queryBuf.append(ch);
|
||||
@ -217,7 +213,7 @@ public class HttpReader implements Runnable {
|
||||
private void outputError(String msg) {
|
||||
out.println();
|
||||
out.println("<html><body bgcolor=\"#ffffff\">");
|
||||
out.println(msg);
|
||||
out.println(Misc.encodeHtml(msg));
|
||||
out.println("</body></html>");
|
||||
}
|
||||
|
||||
|
||||
@ -102,7 +102,7 @@ class InstancesCountQuery extends QueryHandler {
|
||||
int count = clazz.getInstancesCount(false);
|
||||
print("" + count);
|
||||
printAnchorStart();
|
||||
out.print("instances/" + encodeForURL(classes[i]));
|
||||
print("instances/" + encodeForURL(classes[i]));
|
||||
out.print("\"> ");
|
||||
if (count == 1) {
|
||||
print("instance");
|
||||
@ -121,7 +121,7 @@ class InstancesCountQuery extends QueryHandler {
|
||||
}
|
||||
print("(");
|
||||
printAnchorStart();
|
||||
out.print("newInstances/" + encodeForURL(classes[i]));
|
||||
print("newInstances/" + encodeForURL(classes[i]));
|
||||
out.print("\">");
|
||||
print("" + newInst + " new");
|
||||
out.print("</a>) ");
|
||||
|
||||
@ -54,10 +54,7 @@ class OQLHelp extends QueryHandler {
|
||||
out.print((char)ch);
|
||||
}
|
||||
} catch (Exception exp) {
|
||||
out.println(exp.getMessage());
|
||||
out.println("<pre>");
|
||||
exp.printStackTrace(out);
|
||||
out.println("</pre>");
|
||||
printException(exp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,10 +32,7 @@
|
||||
|
||||
package com.sun.tools.hat.internal.server;
|
||||
|
||||
import com.sun.tools.hat.internal.model.*;
|
||||
import com.sun.tools.hat.internal.oql.*;
|
||||
import com.sun.tools.hat.internal.util.ArraySorter;
|
||||
import com.sun.tools.hat.internal.util.Comparer;
|
||||
|
||||
/**
|
||||
* This handles Object Query Language (OQL) queries.
|
||||
@ -68,7 +65,7 @@ class OQLQuery extends QueryHandler {
|
||||
out.println("<p align='center'>");
|
||||
out.println("<textarea name='query' cols=80 rows=10>");
|
||||
if (oql != null) {
|
||||
out.println(oql);
|
||||
println(oql);
|
||||
}
|
||||
out.println("</textarea>");
|
||||
out.println("</p>");
|
||||
@ -91,10 +88,7 @@ class OQLQuery extends QueryHandler {
|
||||
try {
|
||||
out.println(engine.toHtml(o));
|
||||
} catch (Exception e) {
|
||||
out.println(e.getMessage());
|
||||
out.println("<pre>");
|
||||
e.printStackTrace(out);
|
||||
out.println("</pre>");
|
||||
printException(e);
|
||||
}
|
||||
out.println("</td></tr>");
|
||||
return false;
|
||||
@ -102,10 +96,7 @@ class OQLQuery extends QueryHandler {
|
||||
});
|
||||
out.println("</table>");
|
||||
} catch (OQLException exp) {
|
||||
out.println(exp.getMessage());
|
||||
out.println("<pre>");
|
||||
exp.printStackTrace(out);
|
||||
out.println("</pre>");
|
||||
printException(exp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -36,6 +36,7 @@ import java.io.PrintWriter;
|
||||
|
||||
import com.sun.tools.hat.internal.model.*;
|
||||
import com.sun.tools.hat.internal.util.Misc;
|
||||
import java.io.StringWriter;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
@ -96,7 +97,7 @@ abstract class QueryHandler {
|
||||
}
|
||||
|
||||
protected void error(String msg) {
|
||||
out.println(msg);
|
||||
println(msg);
|
||||
}
|
||||
|
||||
protected void printAnchorStart() {
|
||||
@ -160,7 +161,6 @@ abstract class QueryHandler {
|
||||
out.println("null");
|
||||
return;
|
||||
}
|
||||
String name = clazz.getName();
|
||||
printAnchorStart();
|
||||
out.print("class/");
|
||||
print(encodeForURL(clazz));
|
||||
@ -208,6 +208,15 @@ abstract class QueryHandler {
|
||||
}
|
||||
}
|
||||
|
||||
protected void printException(Throwable t) {
|
||||
println(t.getMessage());
|
||||
out.println("<pre>");
|
||||
StringWriter sw = new StringWriter();
|
||||
t.printStackTrace(new PrintWriter(sw));
|
||||
print(sw.toString());
|
||||
out.println("</pre>");
|
||||
}
|
||||
|
||||
protected void printHex(long addr) {
|
||||
if (snapshot.getIdentifierSize() == 4) {
|
||||
out.print(Misc.toHex((int)addr));
|
||||
@ -223,4 +232,8 @@ abstract class QueryHandler {
|
||||
protected void print(String str) {
|
||||
out.print(Misc.encodeHtml(str));
|
||||
}
|
||||
|
||||
protected void println(String str) {
|
||||
out.println(Misc.encodeHtml(str));
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ public class RefsByTypeQuery extends QueryHandler {
|
||||
out.println("<p align='center'>");
|
||||
printClass(clazz);
|
||||
if (clazz.getId() != -1) {
|
||||
out.println("[" + clazz.getIdString() + "]");
|
||||
println("[" + clazz.getIdString() + "]");
|
||||
}
|
||||
out.println("</p>");
|
||||
|
||||
@ -125,9 +125,9 @@ public class RefsByTypeQuery extends QueryHandler {
|
||||
JavaClass clazz = classes[i];
|
||||
out.println("<tr><td>");
|
||||
out.print("<a href='/refsByType/");
|
||||
out.print(clazz.getIdString());
|
||||
print(clazz.getIdString());
|
||||
out.print("'>");
|
||||
out.print(clazz.getName());
|
||||
print(clazz.getName());
|
||||
out.println("</a>");
|
||||
out.println("</td><td>");
|
||||
out.println(map.get(clazz));
|
||||
|
||||
@ -143,11 +143,11 @@ public class Applet extends Panel {
|
||||
* For example, suppose an applet is contained
|
||||
* within the document:
|
||||
* <blockquote><pre>
|
||||
* http://java.sun.com/products/jdk/1.2/index.html
|
||||
* http://www.oracle.com/technetwork/java/index.html
|
||||
* </pre></blockquote>
|
||||
* The document base is:
|
||||
* <blockquote><pre>
|
||||
* http://java.sun.com/products/jdk/1.2/index.html
|
||||
* http://www.oracle.com/technetwork/java/index.html
|
||||
* </pre></blockquote>
|
||||
*
|
||||
* @return the {@link java.net.URL} of the document that contains this
|
||||
|
||||
@ -54,11 +54,11 @@ public interface AppletStub {
|
||||
* For example, suppose an applet is contained
|
||||
* within the document:
|
||||
* <blockquote><pre>
|
||||
* http://java.sun.com/products/jdk/1.2/index.html
|
||||
* http://www.oracle.com/technetwork/java/index.html
|
||||
* </pre></blockquote>
|
||||
* The document base is:
|
||||
* <blockquote><pre>
|
||||
* http://java.sun.com/products/jdk/1.2/index.html
|
||||
* http://www.oracle.com/technetwork/java/index.html
|
||||
* </pre></blockquote>
|
||||
*
|
||||
* @return the {@link java.net.URL} of the document that contains the
|
||||
|
||||
@ -96,7 +96,7 @@ import java.util.Hashtable;
|
||||
* alt="Diagram of an applet demonstrating BorderLayout.
|
||||
* Each section of the BorderLayout contains a Button corresponding to its position in the layout, one of:
|
||||
* North, West, Center, East, or South."
|
||||
* ALIGN=center HSPACE=10 VSPACE=7>
|
||||
* style="float:center; margin: 7px 10px;">
|
||||
* <p>
|
||||
* The code for this applet is as follows:
|
||||
* <p>
|
||||
|
||||
@ -40,7 +40,7 @@ import javax.accessibility.*;
|
||||
* under the Solaris operating system:
|
||||
* <p>
|
||||
* <img src="doc-files/Button-1.gif" alt="The following context describes the graphic"
|
||||
* ALIGN=center HSPACE=10 VSPACE=7>
|
||||
* style="float:center; margin: 7px 10px;">
|
||||
* <p>
|
||||
* The first view shows the button as it appears normally.
|
||||
* The second view shows the button
|
||||
|
||||
@ -53,7 +53,7 @@ import javax.accessibility.*;
|
||||
* created by this code example:
|
||||
* <p>
|
||||
* <img src="doc-files/Checkbox-1.gif" alt="The following context describes the graphic."
|
||||
* ALIGN=center HSPACE=10 VSPACE=7>
|
||||
* style="float:center; margin: 7px 10px;">
|
||||
* <p>
|
||||
* The button labeled <code>one</code> is in the "on" state, and the
|
||||
* other two are in the "off" state. In this example, which uses the
|
||||
|
||||
@ -48,7 +48,7 @@ package java.awt;
|
||||
* <p>
|
||||
* <img src="doc-files/CheckboxGroup-1.gif"
|
||||
* alt="Shows three checkboxes, arranged vertically, labeled one, two, and three. Checkbox one is in the on state."
|
||||
* ALIGN=center HSPACE=10 VSPACE=7>
|
||||
* style="float:center; margin: 7px 10px;">
|
||||
* <p>
|
||||
* @author Sami Shaio
|
||||
* @see java.awt.Checkbox
|
||||
|
||||
@ -44,7 +44,7 @@ import sun.awt.AWTAccessor;
|
||||
* <p>
|
||||
* <img src="doc-files/MenuBar-1.gif"
|
||||
* alt="Menu labeled Examples, containing items Basic, Simple, Check, and More Examples. The Check item is a CheckBoxMenuItem instance, in the off state."
|
||||
* ALIGN=center HSPACE=10 VSPACE=7>
|
||||
* style="float:center; margin: 7px 10px;">
|
||||
* <p>
|
||||
* The item labeled <code>Check</code> shows a check box menu item
|
||||
* in its "off" state.
|
||||
|
||||
@ -52,7 +52,7 @@ import javax.accessibility.*;
|
||||
* it appears as follows in its normal state:
|
||||
* <p>
|
||||
* <img src="doc-files/Choice-1.gif" alt="The following text describes the graphic"
|
||||
* ALIGN=center HSPACE=10 VSPACE=7>
|
||||
* style="float:center; margin: 7px 10px;">
|
||||
* <p>
|
||||
* In the picture, <code>"Green"</code> is the current choice.
|
||||
* Pushing the mouse button down on the object causes a menu to
|
||||
|
||||
@ -823,7 +823,7 @@ public class Color implements Paint, java.io.Serializable {
|
||||
* <p>
|
||||
* The integer that is returned by <code>HSBtoRGB</code> encodes the
|
||||
* value of a color in bits 0-23 of an integer value that is the same
|
||||
* format used by the method {@link #getRGB() <code>getRGB</code>}.
|
||||
* format used by the method {@link #getRGB() getRGB}.
|
||||
* This integer can be supplied as an argument to the
|
||||
* <code>Color</code> constructor that takes a single integer argument.
|
||||
* @param hue the hue component of the color
|
||||
|
||||
@ -173,10 +173,10 @@ import sun.util.logging.PlatformLogger;
|
||||
* <b>Note</b>: For more information on the paint mechanisms utilitized
|
||||
* by AWT and Swing, including information on how to write the most
|
||||
* efficient painting code, see
|
||||
* <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
|
||||
* <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
|
||||
* <p>
|
||||
* For details on the focus subsystem, see
|
||||
* <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
|
||||
* <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
|
||||
* How to Use the Focus Subsystem</a>,
|
||||
* a section in <em>The Java Tutorial</em>, and the
|
||||
* <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
|
||||
@ -1223,10 +1223,6 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
* be called on the toolkit thread.
|
||||
*/
|
||||
final Toolkit getToolkitImpl() {
|
||||
ComponentPeer peer = this.peer;
|
||||
if ((peer != null) && ! (peer instanceof LightweightPeer)){
|
||||
return peer.getToolkit();
|
||||
}
|
||||
Container parent = this.parent;
|
||||
if (parent != null) {
|
||||
return parent.getToolkitImpl();
|
||||
@ -3205,7 +3201,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
* <b>Note</b>: For more information on the paint mechanisms utilitized
|
||||
* by AWT and Swing, including information on how to write the most
|
||||
* efficient painting code, see
|
||||
* <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
|
||||
* <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
|
||||
*
|
||||
* @param g the graphics context to use for painting
|
||||
* @see #update
|
||||
@ -3240,7 +3236,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
* <b>Note</b>: For more information on the paint mechanisms utilitized
|
||||
* by AWT and Swing, including information on how to write the most
|
||||
* efficient painting code, see
|
||||
* <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
|
||||
* <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
|
||||
*
|
||||
* @param g the specified context to use for updating
|
||||
* @see #paint
|
||||
@ -3301,7 +3297,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
* <b>Note</b>: For more information on the paint mechanisms utilitized
|
||||
* by AWT and Swing, including information on how to write the most
|
||||
* efficient painting code, see
|
||||
* <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
|
||||
* <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
|
||||
|
||||
*
|
||||
* @see #update(Graphics)
|
||||
@ -3319,7 +3315,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
* <b>Note</b>: For more information on the paint mechanisms utilitized
|
||||
* by AWT and Swing, including information on how to write the most
|
||||
* efficient painting code, see
|
||||
* <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
|
||||
* <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
|
||||
*
|
||||
* @param tm maximum time in milliseconds before update
|
||||
* @see #paint
|
||||
@ -3341,7 +3337,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
* <b>Note</b>: For more information on the paint mechanisms utilitized
|
||||
* by AWT and Swing, including information on how to write the most
|
||||
* efficient painting code, see
|
||||
* <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
|
||||
* <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
|
||||
*
|
||||
* @param x the <i>x</i> coordinate
|
||||
* @param y the <i>y</i> coordinate
|
||||
@ -3366,7 +3362,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
* <b>Note</b>: For more information on the paint mechanisms utilitized
|
||||
* by AWT and Swing, including information on how to write the most
|
||||
* efficient painting code, see
|
||||
* <a href="http://java.sun.com/products/jfc/tsc/articles/painting/index.html">Painting in AWT and Swing</a>.
|
||||
* <a href="http://www.oracle.com/technetwork/java/painting-140037.html">Painting in AWT and Swing</a>.
|
||||
*
|
||||
* @param tm maximum time in milliseconds before update
|
||||
* @param x the <i>x</i> coordinate
|
||||
|
||||
@ -75,7 +75,7 @@ import sun.security.action.GetBooleanAction;
|
||||
* (and hence to the bottom of the stacking order).
|
||||
* <p>
|
||||
* <b>Note</b>: For details on the focus subsystem, see
|
||||
* <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
|
||||
* <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
|
||||
* How to Use the Focus Subsystem</a>,
|
||||
* a section in <em>The Java Tutorial</em>, and the
|
||||
* <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
|
||||
|
||||
@ -54,7 +54,7 @@ import java.awt.peer.ComponentPeer;
|
||||
* impact, the focusability of the Component itself.
|
||||
* <p>
|
||||
* Please see
|
||||
* <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
|
||||
* <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
|
||||
* How to Use the Focus Subsystem</a>,
|
||||
* a section in <em>The Java Tutorial</em>, and the
|
||||
* <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
|
||||
|
||||
@ -49,7 +49,7 @@ import sun.awt.TimedWindowEvent;
|
||||
* Container's FocusTraversalPolicy.
|
||||
* <p>
|
||||
* Please see
|
||||
* <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
|
||||
* <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
|
||||
* How to Use the Focus Subsystem</a>,
|
||||
* a section in <em>The Java Tutorial</em>, and the
|
||||
* <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
|
||||
|
||||
@ -35,7 +35,7 @@ import java.lang.annotation.Native;
|
||||
* (see {@link GraphicsDevice#isDisplayChangeSupported}).
|
||||
* <p>
|
||||
* For more information on full-screen exclusive mode API, see the
|
||||
* <a href="http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html">
|
||||
* <a href="http://docs.oracle.com/javase/tutorial/extra/fullscreen/index.html">
|
||||
* Full-Screen Exclusive Mode API Tutorial</a>.
|
||||
*
|
||||
* @see GraphicsDevice
|
||||
|
||||
@ -652,7 +652,7 @@ public class EventQueue {
|
||||
* Dispatches an event. The manner in which the event is
|
||||
* dispatched depends upon the type of the event and the
|
||||
* type of the event's source object:
|
||||
* <p> </p>
|
||||
* <p>
|
||||
* <table border=1 summary="Event types, source types, and dispatch methods">
|
||||
* <tr>
|
||||
* <th>Event Type</th>
|
||||
@ -680,7 +680,7 @@ public class EventQueue {
|
||||
* <td>No action (ignored)</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
* <p> </p>
|
||||
* <p>
|
||||
* @param event an instance of <code>java.awt.AWTEvent</code>,
|
||||
* or a subclass of it
|
||||
* @throws NullPointerException if <code>event</code> is <code>null</code>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
@ -457,9 +457,16 @@ public class FileDialog extends Dialog {
|
||||
* specified file. This file becomes the default file if it is set
|
||||
* before the file dialog window is first shown.
|
||||
* <p>
|
||||
* When the dialog is shown, the specified file is selected. The kind of
|
||||
* selection depends on the file existence, the dialog type, and the native
|
||||
* platform. E.g., the file could be highlighted in the file list, or a
|
||||
* file name editbox could be populated with the file name.
|
||||
* <p>
|
||||
* This method accepts either a full file path, or a file name with an
|
||||
* extension if used together with the {@code setDirectory} method.
|
||||
* <p>
|
||||
* Specifying "" as the file is exactly equivalent to specifying
|
||||
* <code>null</code>
|
||||
* as the file.
|
||||
* {@code null} as the file.
|
||||
*
|
||||
* @param file the file being set
|
||||
* @see #getFile
|
||||
|
||||
@ -54,7 +54,7 @@ import java.io.IOException;
|
||||
* <p>
|
||||
* <img src="doc-files/FlowLayout-1.gif"
|
||||
* ALT="Graphic of Layout for Three Buttons"
|
||||
* ALIGN=center HSPACE=10 VSPACE=7>
|
||||
* style="float:center; margin: 7px 10px;">
|
||||
* <p>
|
||||
* Here is the code for this applet:
|
||||
* <p>
|
||||
|
||||
@ -49,7 +49,7 @@ package java.awt;
|
||||
* policy is used to perform the search operation.
|
||||
* <p>
|
||||
* Please see
|
||||
* <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html">
|
||||
* <a href="http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html">
|
||||
* How to Use the Focus Subsystem</a>,
|
||||
* a section in <em>The Java Tutorial</em>, and the
|
||||
* <a href="../../java/awt/doc-files/FocusSpec.html">Focus Specification</a>
|
||||
|
||||
@ -127,7 +127,7 @@ import static sun.font.EAttribute.*;
|
||||
* <p>
|
||||
* For a discussion of the relative advantages and disadvantages of using
|
||||
* physical or logical fonts, see the
|
||||
* <a href="http://java.sun.com/j2se/corejava/intl/reference/faqs/index.html#desktop-rendering">Internationalization FAQ</a>
|
||||
* <a href="http://www.oracle.com/technetwork/java/javase/tech/faq-jsp-138165.html">Internationalization FAQ</a>
|
||||
* document.
|
||||
*
|
||||
* <h4>Font Faces and Names</h4>
|
||||
|
||||
@ -51,8 +51,8 @@ import java.text.CharacterIterator;
|
||||
* <li>{@link #charsWidth(char[], int, int)}
|
||||
* </ul>
|
||||
* <p>
|
||||
* <img src="doc-files/FontMetrics-1.gif" alt="The letter 'p' showing its 'reference point'" border=15 align
|
||||
* ALIGN=right HSPACE=10 VSPACE=7>
|
||||
* <img src="doc-files/FontMetrics-1.gif" alt="The letter 'p' showing its 'reference point'"
|
||||
* style="border:15px; float:right; margin: 7px 10px;">
|
||||
* Note that the implementations of these methods are
|
||||
* inefficient, so they are usually overridden with more efficient
|
||||
* toolkit-specific implementations.
|
||||
|
||||
@ -83,7 +83,7 @@ import javax.accessibility.*;
|
||||
* <img src="doc-files/MultiScreen.gif"
|
||||
* alt="Diagram of virtual device encompassing three physical screens and one primary physical screen. The primary physical screen
|
||||
* shows (0,0) coords while a different physical screen shows (-80,-100) coords."
|
||||
* ALIGN=center HSPACE=10 VSPACE=7>
|
||||
* style="float:center; margin: 7px 10px;">
|
||||
* <p>
|
||||
* In such an environment, when calling <code>setLocation</code>,
|
||||
* you must pass a virtual coordinate to this method. Similarly,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -69,7 +69,7 @@ import sun.awt.SunToolkit;
|
||||
* </pre>
|
||||
* <p>
|
||||
* For more information on full-screen exclusive mode API, see the
|
||||
* <a href="http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html">
|
||||
* <a href="http://docs.oracle.com/javase/tutorial/extra/fullscreen/index.html">
|
||||
* Full-Screen Exclusive Mode API Tutorial</a>.
|
||||
*
|
||||
* @see GraphicsEnvironment
|
||||
@ -334,11 +334,12 @@ public abstract class GraphicsDevice {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the <code>Window</code> object representing the
|
||||
* Returns the {@code Window} object representing the
|
||||
* full-screen window if the device is in full-screen mode.
|
||||
*
|
||||
* @return the full-screen window, or <code>null</code> if the device is
|
||||
* not in full-screen mode.
|
||||
* @return the full-screen window, or {@code null} if the device is
|
||||
* not in full-screen mode. The {@code Window} object can differ
|
||||
* from the object previously set by {@code setFullScreenWindow}.
|
||||
* @see #setFullScreenWindow(Window)
|
||||
* @since 1.4
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user