This commit is contained in:
Andrei Pangin 2008-08-19 06:02:07 -07:00
commit 059e448264
791 changed files with 57067 additions and 26704 deletions

View file

@ -5,3 +5,5 @@ bf2517e15f0c0f950e5b3143c4ca11e2df73dcc1 jdk7-b25
18dc4ba4739a537fd146f77da51db16efce28da2 jdk7-b28 18dc4ba4739a537fd146f77da51db16efce28da2 jdk7-b28
bfe4572fd301a6fcd120373cdb2eff5d2da0c72c jdk7-b29 bfe4572fd301a6fcd120373cdb2eff5d2da0c72c jdk7-b29
bee4731164a06ddece1297ae58db24aca6a1c626 jdk7-b30 bee4731164a06ddece1297ae58db24aca6a1c626 jdk7-b30
cd8b8f500face60d1566d850857a7fccadbd383a jdk7-b31
a9f1805e3ba9ca520cad199d522c84af5433e85a jdk7-b32

View file

@ -5,3 +5,5 @@ cbc8ad9dd0e085a607427ea35411990982f19a36 jdk7-b25
56652b46f328937f6b9b5130f1e4cd80f48868ef jdk7-b28 56652b46f328937f6b9b5130f1e4cd80f48868ef jdk7-b28
31e08f70e88d77c2053f91c21b49a04296bdc59a jdk7-b29 31e08f70e88d77c2053f91c21b49a04296bdc59a jdk7-b29
2dab2f712e1832c92acfa63ec0337048b9422c20 jdk7-b30 2dab2f712e1832c92acfa63ec0337048b9422c20 jdk7-b30
3300a35a0bd56d695b92fe0b34f03ebbfc939064 jdk7-b31
64da805be725721bf2004e7409a0d7a16fc8ddbc jdk7-b32

373
Makefile
View file

@ -49,27 +49,17 @@ ifndef JDK_MAKE_SHARED_DIR
JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared
endif endif
# For start and finish echo lines
TITLE_TEXT = Control $(PLATFORM) $(ARCH) $(RELEASE)
DAYE_STAMP = `$(DATE) '+%y-%m-%d %H:%M'`
START_ECHO = echo "$(TITLE_TEXT) $@ build started: $(DATE_STAMP)"
FINISH_ECHO = echo "$(TITLE_TEXT) $@ build finished: $(DATE_STAMP)"
default: all
include $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk include $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk
include ./make/Defs-internal.gmk include ./make/Defs-internal.gmk
all::
@$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: `$(DATE) '+%y-%m-%d %H:%M'`
$(MKDIR) -p $(OUTPUTDIR)
# Rules for sanity checks
include ./make/sanity-rules.gmk include ./make/sanity-rules.gmk
dev : dev-build
dev-build:
$(MAKE) DEV_ONLY=true all
dev-sanity:
$(MAKE) DEV_ONLY=true sanity
dev-clobber:
$(MAKE) DEV_ONLY=true clobber
# Rules for various components
include ./make/hotspot-rules.gmk include ./make/hotspot-rules.gmk
include ./make/langtools-rules.gmk include ./make/langtools-rules.gmk
include ./make/corba-rules.gmk include ./make/corba-rules.gmk
@ -80,11 +70,203 @@ include ./make/install-rules.gmk
include ./make/sponsors-rules.gmk include ./make/sponsors-rules.gmk
include ./make/deploy-rules.gmk include ./make/deploy-rules.gmk
all:: setup build # What "all" means
all::
@$(START_ECHO)
setup: openjdk_check all:: openjdk_check sanity all_product_build
ifeq ($(SKIP_FASTDEBUG_BUILD), false)
all:: fastdebug_build
endif
ifeq ($(SKIP_DEBUG_BUILD), false)
all:: debug_build
endif
ifneq ($(SKIP_OPENJDK_BUILD), true)
all:: openjdk_build
endif
all::
@$(FINISH_ECHO)
# Everything for a full product build
all_product_build::
@$(START_ECHO)
ifeq ($(SKIP_PRODUCT_BUILD), false)
all_product_build:: product_build
ifeq ($(BUILD_INSTALL), true)
all_product_build:: $(INSTALL)
clobber:: install-clobber
endif
ifeq ($(BUILD_SPONSORS), true)
all_product_build:: $(SPONSORS)
clobber:: sponsors-clobber
endif
ifneq ($(SKIP_COMPARE_IMAGES), true)
all_product_build:: compare-image
endif
endif
all_product_build::
@$(FINISH_ECHO)
# Generis build of basic repo series
generic_build_repo_series::
$(MKDIR) -p $(OUTPUTDIR)
$(MKDIR) -p $(OUTPUTDIR)/j2sdk-image $(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
ifeq ($(BUILD_LANGTOOLS), true)
generic_build_repo_series:: langtools
clobber:: langtools-clobber
endif
ifeq ($(BUILD_CORBA), true)
generic_build_repo_series:: corba
clobber:: corba-clobber
endif
ifeq ($(BUILD_JAXP), true)
generic_build_repo_series:: jaxp
clobber:: jaxp-clobber
endif
ifeq ($(BUILD_JAXWS), true)
generic_build_repo_series:: jaxws
clobber:: jaxws-clobber
endif
ifeq ($(BUILD_HOTSPOT), true)
generic_build_repo_series:: $(HOTSPOT)
clobber:: hotspot-clobber
endif
ifeq ($(BUILD_JDK), true)
generic_build_repo_series:: $(JDK_JAVA_EXE)
clobber:: jdk-clobber
endif
ifeq ($(BUILD_DEPLOY), true)
generic_build_repo_series:: $(DEPLOY)
clobber:: deploy-clobber
endif
ifeq ($(BUILD_JDK), true)
ifeq ($(BUNDLE_RULES_AVAILABLE), true)
generic_build_repo_series:: openjdk-binary-plugs-bundles
endif
endif
# The debug build, fastdebug or debug. Needs special handling.
# Note that debug builds do NOT do INSTALL steps, but must be done
# after the product build and before the INSTALL step of the product build.
#
# DEBUG_NAME is fastdebug or debug
# ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix
# The resulting j2sdk-image is used by the install makefiles to create a
# debug install bundle jdk-*-debug-** bundle (tar or zip)
# which will install in the debug or fastdebug subdirectory of the
# normal product install area.
# The install process needs to know what the DEBUG_NAME is, so
# look for INSTALL_DEBUG_NAME in the install rules.
#
# Location of fresh bootdir output
ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image
FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME)/j2sdk-image
create_fresh_product_bootdir: FRC
@$(START_ECHO)
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
NO_DOCS=true \
BOOT_CYCLE_SETTINGS= \
build_product_image
@$(FINISH_ECHO)
create_fresh_debug_bootdir: FRC
@$(START_ECHO)
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
NO_DOCS=true \
BOOT_CYCLE_DEBUG_SETTINGS= \
build_debug_image
@$(FINISH_ECHO)
create_fresh_fastdebug_bootdir: FRC
@$(START_ECHO)
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
NO_DOCS=true \
BOOT_CYCLE_DEBUG_SETTINGS= \
build_fastdebug_image
@$(FINISH_ECHO)
# Create boot image?
ifeq ($(SKIP_BOOT_CYCLE),false)
ifneq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
DO_BOOT_CYCLE=true
endif
endif
ifeq ($(DO_BOOT_CYCLE),true)
# Create the bootdir to use in the build
product_build:: create_fresh_product_bootdir
debug_build:: create_fresh_debug_bootdir
fastdebug_build:: create_fresh_fastdebug_bootdir
# Define variables to be used now for the boot jdk
BOOT_CYCLE_SETTINGS= \
ALT_BOOTDIR=$(FRESH_BOOTDIR) \
ALT_JDK_IMPORT_PATH=$(FRESH_BOOTDIR)
BOOT_CYCLE_DEBUG_SETTINGS= \
ALT_BOOTDIR=$(FRESH_DEBUG_BOOTDIR) \
ALT_JDK_IMPORT_PATH=$(FRESH_DEBUG_BOOTDIR)
else
# Use the supplied ALT_BOOTDIR as the boot
BOOT_CYCLE_SETTINGS=
BOOT_CYCLE_DEBUG_SETTINGS=
endif
build_product_image:
@$(START_ECHO)
$(MAKE) \
SKIP_FASTDEBUG_BUILD=true \
SKIP_DEBUG_BUILD=true \
$(BOOT_CYCLE_SETTINGS) \
generic_build_repo_series
@$(FINISH_ECHO)
generic_debug_build:
@$(START_ECHO)
$(MAKE) \
ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \
DEBUG_NAME=$(DEBUG_NAME) \
NO_DOCS=true \
$(BOOT_CYCLE_DEBUG_SETTINGS) \
generic_build_repo_series
@$(FINISH_ECHO)
build_debug_image:
$(MAKE) DEBUG_NAME=debug generic_debug_build
build_fastdebug_image:
$(MAKE) DEBUG_NAME=fastdebug generic_debug_build
# Build final image
product_build:: build_product_image
debug_build:: build_debug_image
fastdebug_build:: build_fastdebug_image
# Check on whether we really can build the openjdk, need source etc. # Check on whether we really can build the openjdk, need source etc.
openjdk_check: FRC openjdk_check: FRC
ifneq ($(SKIP_OPENJDK_BUILD), true) ifneq ($(SKIP_OPENJDK_BUILD), true)
@ -101,113 +283,6 @@ ifneq ($(SKIP_OPENJDK_BUILD), true)
@$(ECHO) " " @$(ECHO) " "
endif endif
build:: sanity
clobber::
ifeq ($(BUILD_LANGTOOLS), true)
build:: langtools
clobber:: langtools-clobber
endif
ifeq ($(BUILD_CORBA), true)
build:: corba
clobber:: corba-clobber
endif
ifeq ($(BUILD_JAXP), true)
build:: jaxp
clobber:: jaxp-clobber
endif
ifeq ($(BUILD_JAXWS), true)
build:: jaxws
clobber:: jaxws-clobber
endif
ifeq ($(BUILD_HOTSPOT), true)
build:: $(HOTSPOT)
clobber:: hotspot-clobber
endif
ifeq ($(BUILD_JDK), true)
build:: $(JDK_JAVA_EXE)
clobber:: jdk-clobber
endif
ifeq ($(BUILD_DEPLOY), true)
build:: $(DEPLOY)
clobber:: deploy-clobber
endif
#
# Generic debug build, fastdebug or debug. Needs special handling.
# Note that debug builds do NOT do INSTALL steps, but must be done
# after the product build and before the INSTALL step of the product build.
#
# DEBUG_NAME is fastdebug or debug
# ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix
# The resulting j2sdk-image is used by the install makefiles to create a
# debug install bundle jdk-*-debug-** bundle (tar or zip)
# which will install in the debug or fastdebug subdirectory of the
# normal product install area.
# The install process needs to know what the DEBUG_NAME is, so
# look for INSTALL_DEBUG_NAME in the install rules.
#
COMMON_DEBUG_FLAGS= \
DEBUG_NAME=$(DEBUG_NAME) \
ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \
NO_DOCS=true
product_build: setup
@$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'`
$(MAKE) SKIP_FASTDEBUG_BUILD=true SKIP_DEBUG_BUILD=true all
@$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'`
generic_debug_build:
@$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'`
$(MAKE) $(COMMON_DEBUG_FLAGS) setup build
@$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'`
debug_build: setup
$(MAKE) DEBUG_NAME=debug generic_debug_build
fastdebug_build: setup
$(MAKE) DEBUG_NAME=fastdebug generic_debug_build
ifeq ($(SKIP_FASTDEBUG_BUILD), false)
all:: fastdebug_build
endif
ifeq ($(SKIP_DEBUG_BUILD), false)
all:: debug_build
endif
ifeq ($(BUILD_JDK), true)
ifeq ($(BUNDLE_RULES_AVAILABLE), true)
all:: openjdk-binary-plugs-bundles
endif
endif
ifeq ($(BUILD_INSTALL), true)
all :: $(INSTALL)
clobber:: install-clobber
endif
ifeq ($(BUILD_SPONSORS), true)
all :: $(SPONSORS)
clobber:: sponsors-clobber
endif
ifneq ($(SKIP_COMPARE_IMAGES), true)
all :: compare-image
endif
ifneq ($(SKIP_OPENJDK_BUILD), true)
all :: openjdk_build
endif
# If we have bundle rules, we have a chance here to do a complete cycle # If we have bundle rules, we have a chance here to do a complete cycle
# build, of production and open build. # build, of production and open build.
# FIXUP: We should create the openjdk source bundle and build that? # FIXUP: We should create the openjdk source bundle and build that?
@ -235,6 +310,7 @@ else
endif endif
openjdk_build: openjdk_build:
@$(START_ECHO)
@$(ECHO) " " @$(ECHO) " "
@$(ECHO) "=================================================" @$(ECHO) "================================================="
@$(ECHO) "Starting openjdk build" @$(ECHO) "Starting openjdk build"
@ -245,6 +321,7 @@ openjdk_build:
$(MKDIR) -p $(OPENJDK_OUTPUTDIR) $(MKDIR) -p $(OPENJDK_OUTPUTDIR)
($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \ ($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \
OPENJDK=true \ OPENJDK=true \
NO_DOCS=true \
ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \ ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \
ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \ ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \
ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \ ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \
@ -261,6 +338,7 @@ openjdk_build:
@$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)" @$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)"
@$(ECHO) "=================================================" @$(ECHO) "================================================="
@$(ECHO) " " @$(ECHO) " "
@$(FINISH_ECHO)
endif endif
endif endif
@ -274,8 +352,18 @@ clobber::
clean: clobber clean: clobber
all:: #
@$(ECHO) Control build finished: `$(DATE) '+%y-%m-%d %H:%M'` # Dev builds
#
dev : dev-build
dev-build:
$(MAKE) DEV_ONLY=true all
dev-sanity:
$(MAKE) DEV_ONLY=true sanity
dev-clobber:
$(MAKE) DEV_ONLY=true clobber
# #
# Quick jdk verification build # Quick jdk verification build
@ -460,16 +548,6 @@ ifeq ($(BUNDLE_RULES_AVAILABLE), true)
include $(BUNDLE_RULES) include $(BUNDLE_RULES)
endif endif
################################################################
# Cycle build. Build the jdk, use it to build the jdk again.
################################################################
ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
boot_cycle:
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) product_build
$(MAKE) ALT_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image product_build
################################################################ ################################################################
# JPRT rule to build # JPRT rule to build
################################################################ ################################################################
@ -480,9 +558,20 @@ include ./make/jprt.gmk
# PHONY # PHONY
################################################################ ################################################################
.PHONY: all build what clobber insane \ .PHONY: all \
fastdebug_build debug_build product_build setup \ generic_build_repo_series \
dev dev-build dev-sanity dev-clobber what clobber insane \
dev dev-build dev-sanity dev-clobber \
product_build \
fastdebug_build \
debug_build \
build_product_image \
build_debug_image \
build_fastdebug_image \
create_fresh_product_bootdir \
create_fresh_debug_bootdir \
create_fresh_fastdebug_bootdir \
generic_debug_build
# Force target # Force target
FRC: FRC:

View file

@ -5,15 +5,12 @@
</head> </head>
<body style="background-color:lightcyan"> <body style="background-color:lightcyan">
<!-- ====================================================== --> <!-- ====================================================== -->
<table width="100%" style="background-color:white"> + <table width="100%">
<tr> <tr>
<td align="center"> <td align="center">
<a href="http://openjdk.java.net" border="0"> <img alt="OpenJDK"
<img alt="OpenJDK" src="http://openjdk.java.net/images/openjdk.png"
src="http://openjdk.java.net/images/openjdk.png" width=256 />
width=256
style="border-style: none"/>
</a>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -54,6 +51,7 @@
<li><a href="#bootjdk">Bootstrap JDK</a> </li> <li><a href="#bootjdk">Bootstrap JDK</a> </li>
<li><a href="#binaryplugs">Binary Plugs</a> </li> <li><a href="#binaryplugs">Binary Plugs</a> </li>
<li><a href="#importjdk">Optional Import JDK</a> </li> <li><a href="#importjdk">Optional Import JDK</a> </li>
<li><a href="#ant">Ant</a> </li>
<li><a href="#cacerts">Certificate Authority File (cacert)</a> </li> <li><a href="#cacerts">Certificate Authority File (cacert)</a> </li>
<li><a href="#compilers">Compilers</a> <li><a href="#compilers">Compilers</a>
<ul> <ul>
@ -134,7 +132,7 @@
See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank"> See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
SunSolve</a> for patch downloads. SunSolve</a> for patch downloads.
</td> </td>
<td>Sun Studio 11 </td> <td>Sun Studio 12</td>
</tr> </tr>
<tr> <tr>
<td>Solaris SPARCV9 (64bit)</td> <td>Solaris SPARCV9 (64bit)</td>
@ -143,7 +141,7 @@
See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank"> See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
SunSolve</a> for patch downloads. SunSolve</a> for patch downloads.
</td> </td>
<td>Sun Studio 11</td> <td>Sun Studio 12</td>
</tr> </tr>
<tr> <tr>
<td>Solaris X86 (32bit)</td> <td>Solaris X86 (32bit)</td>
@ -152,7 +150,7 @@
See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank"> See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
SunSolve</a> for patch downloads. SunSolve</a> for patch downloads.
</td> </td>
<td>Sun Studio 11</td> <td>Sun Studio 12</td>
</tr> </tr>
<tr> <tr>
<td>Solaris X64 (64bit)</td> <td>Solaris X64 (64bit)</td>
@ -161,7 +159,7 @@
See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank"> See <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/JavaSE" target="_blank">
SunSolve</a> for patch downloads. SunSolve</a> for patch downloads.
</td> </td>
<td>Sun Studio 11</td> <td>Sun Studio 12</td>
</tr> </tr>
<tr> <tr>
<td>Windows X86 (32bit)</td> <td>Windows X86 (32bit)</td>
@ -424,24 +422,37 @@
you should use <tt>gmake</tt> you should use <tt>gmake</tt>
which will be located in either the <tt>/opt/sfw/bin</tt> or which will be located in either the <tt>/opt/sfw/bin</tt> or
<tt>/usr/sfw/bin</tt> directory. <tt>/usr/sfw/bin</tt> directory.
In more recent versions of Solaris GNU make can be found
at <tt>/usr/bin/gmake</tt>.
</li> </li>
<li> <li>
<strong>Windows:</strong> <strong>Windows:</strong>
Make sure you start your build inside a bash/sh/ksh shell. Make sure you start your build inside a bash/sh/ksh shell.
<br> <br>
<b>WARNING:</b> Watch out for make version 3.81, it may <b>WARNING:</b> Watch out for make version 3.81, it may
not work due to a lack of support for drive letter paths not work due to a lack of support for MS-DOS drive letter paths
like <tt>C:/</tt>. See like <tt>C:/</tt> or <tt>C:\</tt>.
<a href="#gmake">section on gmake</a>.
Use a 3.80 version, or find a newer Use a 3.80 version, or find a newer
version that has this problem fixed. version that has this problem fixed, like 3.82.
The older 3.80 version of make.exe can be downloaded with this The older 3.80 version of make.exe can be downloaded with this
<a href="http://cygwin.paracoda.com/release/make/make-3.80-1.tar.bz2" target="_blank"> <a href="http://cygwin.paracoda.com/release/make/make-3.80-1.tar.bz2" target="_blank">
link</a>. link</a>.
Use of this older 3.80 make.exe may require that you install the
libintl2.dll library or libintl2 cygwin package which is
no longer installed by default by the cygwin installer.
<br>
Also see the Also see the
<a href="http://developer.mozilla.org/en/docs/Windows_build_prerequisites_using_cygwin#make" target="_blank"> <a href="http://developer.mozilla.org/en/docs/Windows_build_prerequisites_using_cygwin#make" target="_blank">
mozilla developer center</a> mozilla developer center</a>
on this topic. on this topic.
<br>
It's hoped that when make 3.82 starts shipping in a future cygwin
release that this MS-DOS path issue will be fixed.
In addition to the above 3.80 make.exe you can download
this
<a href="http://www.cmake.org/files/cygwin/make.exe">
www.cmake.org make.exe</a> which will not have a libintl2.dll
dependency.
</li> </li>
</ul> </ul>
<p> <p>
@ -507,6 +518,11 @@
Install or upgrade the <a href="#freetype">FreeType development Install or upgrade the <a href="#freetype">FreeType development
package</a>. package</a>.
</li> </li>
<li>
Install
<a href="#ant">Ant</a>, set
<tt><a href="#ANT_HOME">ANT_HOME</a></tt>.
</li>
</ol> </ol>
</blockquote> </blockquote>
<!-- ------------------------------------------------------ --> <!-- ------------------------------------------------------ -->
@ -567,6 +583,11 @@
<a href="#cups">CUPS Include files</a>, set <a href="#cups">CUPS Include files</a>, set
<tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>. <tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>.
</li> </li>
<li>
Install
<a href="#ant">Ant</a>, set
<tt><a href="#ANT_HOME">ANT_HOME</a></tt>.
</li>
</ol> </ol>
</blockquote> </blockquote>
<!-- ------------------------------------------------------ --> <!-- ------------------------------------------------------ -->
@ -654,6 +675,11 @@
Install Install
<a href="#dxsdk">Microsoft DirectX SDK</a>. <a href="#dxsdk">Microsoft DirectX SDK</a>.
</li> </li>
<li>
Install
<a href="#ant">Ant</a>, set
<tt><a href="#ANT_HOME">ANT_HOME</a></tt>.
</li>
</ol> </ol>
</blockquote> </blockquote>
<!-- ------------------------------------------------------ --> <!-- ------------------------------------------------------ -->
@ -736,6 +762,22 @@
and the build will copy the needed files from this import area. and the build will copy the needed files from this import area.
</blockquote> </blockquote>
<!-- ------------------------------------------------------ --> <!-- ------------------------------------------------------ -->
<h4><a name="ant">Ant</a></h4>
<blockquote>
All OpenJDK builds require access to least Ant 1.6.5.
The Ant tool is available from the
<a href="http://ant.apache.org/antlibs/bindownload.cgi" target="_blank">
Ant download site</a>.
You should always set
<tt><a href="#ANT_HOME">ANT_HOME</a></tt>
to point to the location of
the Ant installation, this is the directory pathname
that contains a <tt>bin and lib</tt>.
It's also a good idea to also place its <tt>bin</tt> directory
in the <tt>PATH</tt> environment variable, although it's
not absolutely required.
</blockquote>
<!-- ------------------------------------------------------ -->
<h4><a name="cacerts">Certificate Authority File (cacert)</a></h4> <h4><a name="cacerts">Certificate Authority File (cacert)</a></h4>
<blockquote> <blockquote>
See <a href="http://en.wikipedia.org/wiki/Certificate_Authority" target="_blank"> See <a href="http://en.wikipedia.org/wiki/Certificate_Authority" target="_blank">
@ -789,8 +831,8 @@
<blockquote> <blockquote>
At a minimum, the At a minimum, the
<a href="http://developers.sun.com/sunstudio/index.jsp" target="_blank"> <a href="http://developers.sun.com/sunstudio/index.jsp" target="_blank">
Sun Studio 11 Compilers</a> Sun Studio 12 Compilers</a>
(containing version 5.8 of the C and C++ compilers) is required, (containing version 5.9 of the C and C++ compilers) is required,
with patches from the with patches from the
<a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/patch-access" target="_blank"> <a href="http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/patch-access" target="_blank">
SunSolve web site</a>. SunSolve web site</a>.
@ -915,6 +957,21 @@
and and
<tt><a href="#ALT_FREETYPE_HEADERS_PATH">ALT_FREETYPE_HEADERS_PATH</a></tt> <tt><a href="#ALT_FREETYPE_HEADERS_PATH">ALT_FREETYPE_HEADERS_PATH</a></tt>
to refer to place where library and header files are installed. to refer to place where library and header files are installed.
<p>
Building the freetype 2 libraries from scratch is also possible,
however on Windows refer to the
<a href="http://freetype.freedesktop.org/wiki/FreeType_DLL">
Windows FreeType DLL build instructions</a>.
<p>
Note that by default FreeType is built with byte code hinting
support disabled due to licensing restrictions.
In this case, text appearance and metrics are expected to
differ from Sun's official JDK build.
See
<a href="http://freetype.sourceforge.net/freetype2/index.html">
the SourceForge FreeType2 Home Page
</a>
for more information.
</blockquote> </blockquote>
<!-- ------------------------------------------------------ --> <!-- ------------------------------------------------------ -->
<h4><a name="alsa">Advanced Linux Sound Architecture (ALSA) (Linux only)</a></h4> <h4><a name="alsa">Advanced Linux Sound Architecture (ALSA) (Linux only)</a></h4>
@ -1036,7 +1093,8 @@
<tr> <tr>
<td>make.exe</td> <td>make.exe</td>
<td>Devel</td> <td>Devel</td>
<td>make: The GNU version of the 'make' utility</td> <td>make: The GNU version of the 'make' utility<br>
<b>NOTE</b>: See <a href="#gmake">the GNU make section</a></td>
</tr> </tr>
<tr> <tr>
<td>m4.exe</td> <td>m4.exe</td>
@ -1050,7 +1108,7 @@
<td>cpio: A program to manage archives of files</td> <td>cpio: A program to manage archives of files</td>
</tr> </tr>
<tr> <tr>
<td>awk.exe</td> <td>gawk.exe</td>
<td>Utils</td> <td>Utils</td>
<td>awk: Pattern-directed scanning and processing language</td> <td>awk: Pattern-directed scanning and processing language</td>
</tr> </tr>
@ -1061,17 +1119,17 @@
</tr> </tr>
<tr> <tr>
<td>zip.exe</td> <td>zip.exe</td>
<td>Utils</td> <td>Archive</td>
<td>zip: Package and compress (archive) files</td> <td>zip: Package and compress (archive) files</td>
</tr> </tr>
<tr> <tr>
<td>unzip.exe</td> <td>unzip.exe</td>
<td>Utils</td> <td>Archive</td>
<td>unzip: Extract compressed files in a ZIP archive</td> <td>unzip: Extract compressed files in a ZIP archive</td>
</tr> </tr>
<tr> <tr>
<td>free.exe</td> <td>free.exe</td>
<td>Utils</td> <td>Procps</td>
<td>free: Display amount of free and used memory in the system</td> <td>free: Display amount of free and used memory in the system</td>
</tr> </tr>
</tbody> </tbody>
@ -1224,46 +1282,6 @@
document) that can impact the build are: document) that can impact the build are:
<blockquote> <blockquote>
<dl> <dl>
<dt><a name="path"><tt>PATH</tt></a> </dt>
<dd>Typically you want to set the <tt>PATH</tt> to include:
<ul>
<li>The location of the GNU make binary</li>
<li>The location of the Bootstrap JDK <tt>java</tt>
(see <a href="#bootjdk">Bootstrap JDK</a>)</li>
<li>The location of the C/C++ compilers
(see <a href="#compilers"><tt>compilers</tt></a>)</li>
<li>The location or locations for the Unix command utilities
(e.g. <tt>/usr/bin</tt>)</li>
</ul>
</dd>
<dt><tt>MILESTONE</tt> </dt>
<dd>
The milestone name for the build (<i>e.g.</i>"beta").
The default value is "internal".
</dd>
<dt><tt>BUILD_NUMBER</tt> </dt>
<dd>
The build number for the build (<i>e.g.</i> "b27").
The default value is "b00".
</dd>
<dt><a name="arch_data_model"><tt>ARCH_DATA_MODEL</tt></a></dt>
<dd>The <tt>ARCH_DATA_MODEL</tt> variable
is used to specify whether the build is to generate 32-bit or 64-bit
binaries.
The Solaris build supports either 32-bit or 64-bit builds, but
Windows and Linux will support only one, depending on the specific
OS being used.
Normally, setting this variable is only necessary on Solaris.
Set <tt>ARCH_DATA_MODEL</tt> to <tt>32</tt> for generating 32-bit binaries,
or to <tt>64</tt> for generating 64-bit binaries.
</dd>
<dt><a name="ALT_BOOTDIR"><tt>ALT_BOOTDIR</tt></a></dt>
<dd>
The location of the bootstrap JDK installation.
See <a href="#bootjdk">Bootstrap JDK</a> for more information.
You should always install your own local Bootstrap JDK and
always set <tt>ALT_BOOTDIR</tt> explicitly.
</dd>
<dt><a name="ALT_BINARY_PLUGS_PATH"><tt>ALT_BINARY_PLUGS_PATH</tt></a></dt> <dt><a name="ALT_BINARY_PLUGS_PATH"><tt>ALT_BINARY_PLUGS_PATH</tt></a></dt>
<dd> <dd>
The location of the binary plugs installation. The location of the binary plugs installation.
@ -1272,118 +1290,12 @@
recent Binary Plugs install image recent Binary Plugs install image
and set this variable to that location. and set this variable to that location.
</dd> </dd>
<dt><a name="ALT_JDK_IMPORT_PATH"><tt>ALT_JDK_IMPORT_PATH</tt></a></dt> <dt><a name="ALT_BOOTDIR"><tt>ALT_BOOTDIR</tt></a></dt>
<dd> <dd>
The location of a previously built JDK installation. The location of the bootstrap JDK installation.
See <a href="#importjdk">Optional Import JDK</a> for more information. See <a href="#bootjdk">Bootstrap JDK</a> for more information.
</dd> You should always install your own local Bootstrap JDK and
<dt><a name="ALT_OUTPUTDIR"><tt>ALT_OUTPUTDIR</tt></a> </dt> always set <tt>ALT_BOOTDIR</tt> explicitly.
<dd>
An override for specifying the (absolute) path of where the
build output is to go.
The default output directory will be build/<i>platform</i>.
</dd>
<dt><a name="ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> </dt>
<dd>
The location of the C/C++ compiler.
The default varies depending on the platform.
</dd>
<dt><tt><a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt></dt>
<dd>
The location of the <a href="#cacerts">cacerts</a> file.
The default will refer to
<tt>jdk/src/share/lib/security/cacerts</tt>.
</dd>
<dt><a name="ALT_CUPS_HEADERS_PATH"><tt>ALT_CUPS_HEADERS_PATH</tt></a> </dt>
<dd>
The location of the CUPS header files.
See <a href="#cups">CUPS information</a> for more information.
If this path does not exist the fallback path is
<tt>/usr/include</tt>.
</dd>
<dt><a name="ALT_FREETYPE_LIB_PATH"><tt>ALT_FREETYPE_LIB_PATH</tt></a></dt>
<dd>
The location of the FreeType shared library.
See <a href="#freetype">FreeType information</a> for details.
</dd>
<dt><a name="ALT_FREETYPE_HEADERS_PATH"><tt>ALT_FREETYPE_HEADERS_PATH</tt></a></dt>
<dd>
The location of the FreeType header files.
See <a href="#freetype">FreeType information</a> for details.
</dd>
<dt><a name="ALT_JDK_DEVTOOLS_PATH"><tt>ALT_JDK_DEVTOOLS_PATH</tt></a></dt>
<dd>
The default root location of the devtools.
The default value is
<tt>$(ALT_SLASH_JAVA)/devtools</tt>.
</dd>
<dt><tt><a name="ALT_DEVTOOLS_PATH">ALT_DEVTOOLS_PATH</a></tt> </dt>
<dd>
The location of tools like the
<a href="#zip"><tt>zip</tt> and <tt>unzip</tt></a>
binaries, but might also contain the GNU make utility
(<tt><i>gmake</i></tt>).
So this area is a bit of a grab bag, especially on Windows.
The default value depends on the platform and
Unix Commands being used.
On Linux the default will be
<tt>$(ALT_JDK_DEVTOOLS_PATH)/linux/bin</tt>,
on Solaris
<tt>$(ALT_JDK_DEVTOOLS_PATH)/<i>{sparc,i386}</i>/bin</tt>,
on Windows with MKS
<tt>%SYSTEMDRIVE%/UTILS</tt>,
and on Windows with CYGWIN
<tt>/usr/bin</tt>.
</dd>
<dt><a name="ALT_UNIXCOMMAND_PATH"><tt>ALT_UNIXCOMMAND_PATH</tt></a> </dt>
<dd>
An override for specifying where the
Unix command set are located.
The default location varies depending on the platform,
<tt>"%SYSTEMDRIVE%/MKSNT"</tt> or
<tt>$(ROOTDIR)</tt> on Windows with MKS, otherwise it's
<tt>"/bin"</tt> or <tt>/usr/bin</tt>.
</dd>
<dt><a name="ALT_UNIXCCS_PATH"><tt>ALT_UNIXCCS_PATH</tt></a></dt>
<dd>
<strong>Solaris only:</strong>
An override for specifying where the Unix CCS
command set are located.
The default location is <tt>/usr/ccs/bin</tt>
</dd>
<dt><a name="ALT_USRBIN_PATH"><tt>ALT_USRBIN_PATH</tt></a></dt>
<dd>
An override for specifying where the
Unix <tt>/usr/bin</tt> commands are located. You usually do not need
to set this variable: the default location is <tt>/usr/bin</tt>)
</dd>
<dt><a name="ALT_SLASHJAVA"><tt>ALT_SLASHJAVA</tt></a></dt>
<dd>
The default root location for many of the ALT path locations
of the following ALT variables.
The default value is
<tt>"/java"</tt> on Solaris and Linux,
<tt>"J:"</tt> on Windows.
</dd>
<dt><a name="ALT_BUILD_JDK_IMPORT_PATH"><tt>ALT_BUILD_JDK_IMPORT_PATH</tt></a></dt>
<dd>
These are useful in managing builds on multiple platforms.
The default network location for all of the import JDK images
for all platforms.
If <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>
is not set, this directory will be used and should contain
the following directories:
<tt>solaris-sparc</tt>,
<tt>solaris-i586</tt>,
<tt>solaris-sparcv9</tt>,
<tt>solaris-amd64</tt>,
<tt>linux-i586</tt>,
<tt>linux-amd64</tt>,
<tt>windows-i586</tt>,
and
<tt>windows-amd64</tt>.
Where each of these directories contain the import JDK image
for that platform.
</dd> </dd>
<dt><a name="ALT_BUILD_BINARY_PLUGS_PATH"><tt>ALT_BUILD_BINARY_PLUGS_PATH</tt></a></dt> <dt><a name="ALT_BUILD_BINARY_PLUGS_PATH"><tt>ALT_BUILD_BINARY_PLUGS_PATH</tt></a></dt>
<dd> <dd>
@ -1405,36 +1317,186 @@
Where each of these directories contain the binary plugs image Where each of these directories contain the binary plugs image
for that platform. for that platform.
</dd> </dd>
<dt><strong>Windows specific:</strong></dt> <dt><a name="ALT_BUILD_JDK_IMPORT_PATH"><tt>ALT_BUILD_JDK_IMPORT_PATH</tt></a></dt>
<dd> <dd>
<dl> These are useful in managing builds on multiple platforms.
<dt><a name="ALT_MSDEVTOOLS_PATH"><tt>ALT_MSDEVTOOLS_PATH</tt></a> </dt> The default network location for all of the import JDK images
<dd> for all platforms.
The location of the Microsoft Visual Studio .NET 2003 If <tt><a href="#ALT_JDK_IMPORT_PATH">ALT_JDK_IMPORT_PATH</a></tt>
tools 'bin' directory. is not set, this directory will be used and should contain
The default is usually derived from the following directories:
<a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>. <tt>solaris-sparc</tt>,
</dd> <tt>solaris-i586</tt>,
<dt><tt><a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt> </dt> <tt>solaris-sparcv9</tt>,
<dd> <tt>solaris-amd64</tt>,
The location of the <tt>linux-i586</tt>,
<a href="#dxsdk">Microsoft DirectX 9 SDK</a>. <tt>linux-amd64</tt>,
The default will be to try and use the DirectX environment <tt>windows-i586</tt>,
variable <tt>DXSDK_DIR</tt>, and
failing that, look in <tt>C:/DXSDK</tt>. <tt>windows-amd64</tt>.
</dd> Where each of these directories contain the import JDK image
<dt><tt><a name="ALT_MSVCRT_DLL_PATH">ALT_MSVCRT_DLL_PATH</a></tt> </dt> for that platform.
<dd> </dd>
The location of the <dt><tt><a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></tt></dt>
<a href="#msvcrt"><tt>MSVCRT.DLL</tt></a>. <dd>
</dd> The location of the <a href="#cacerts">cacerts</a> file.
<dt><tt><a name="ALT_MSVCR71_DLL_PATH">ALT_MSVCR71_DLL_PATH</a></tt> </dt> The default will refer to
<dd> <tt>jdk/src/share/lib/security/cacerts</tt>.
<strong>i586 only:</strong> </dd>
The location of the <dt><a name="ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> </dt>
<a href="#msvcr71"><tt>MSVCR71.DLL</tt></a>. <dd>
</dd> The location of the C/C++ compiler.
</dl> The default varies depending on the platform.
</dd>
<dt><a name="ALT_CUPS_HEADERS_PATH"><tt>ALT_CUPS_HEADERS_PATH</tt></a> </dt>
<dd>
The location of the CUPS header files.
See <a href="#cups">CUPS information</a> for more information.
If this path does not exist the fallback path is
<tt>/usr/include</tt>.
</dd>
<dt><tt><a name="ALT_DEVTOOLS_PATH">ALT_DEVTOOLS_PATH</a></tt> </dt>
<dd>
The location of tools like the
<a href="#zip"><tt>zip</tt> and <tt>unzip</tt></a>
binaries, but might also contain the GNU make utility
(<tt><i>gmake</i></tt>).
So this area is a bit of a grab bag, especially on Windows.
The default value depends on the platform and
Unix Commands being used.
On Linux the default will be
<tt>$(ALT_JDK_DEVTOOLS_PATH)/linux/bin</tt>,
on Solaris
<tt>$(ALT_JDK_DEVTOOLS_PATH)/<i>{sparc,i386}</i>/bin</tt>,
on Windows with MKS
<tt>%SYSTEMDRIVE%/UTILS</tt>,
and on Windows with CYGWIN
<tt>/usr/bin</tt>.
</dd>
<dt><tt><a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></tt> </dt>
<dd>
<strong>Windows Only:</strong>
The location of the
<a href="#dxsdk">Microsoft DirectX 9 SDK</a>.
The default will be to try and use the DirectX environment
variable <tt>DXSDK_DIR</tt>,
failing that, look in <tt>C:/DXSDK</tt>.
</dd>
<dt><a name="ALT_FREETYPE_HEADERS_PATH"><tt>ALT_FREETYPE_HEADERS_PATH</tt></a></dt>
<dd>
The location of the FreeType header files.
See <a href="#freetype">FreeType information</a> for details.
</dd>
<dt><a name="ALT_FREETYPE_LIB_PATH"><tt>ALT_FREETYPE_LIB_PATH</tt></a></dt>
<dd>
The location of the FreeType shared library.
See <a href="#freetype">FreeType information</a> for details.
</dd>
<dt><a name="ALT_JDK_DEVTOOLS_PATH"><tt>ALT_JDK_DEVTOOLS_PATH</tt></a></dt>
<dd>
The default root location of the devtools.
The default value is
<tt>$(ALT_SLASH_JAVA)/devtools</tt>.
</dd>
<dt><a name="ALT_JDK_IMPORT_PATH"><tt>ALT_JDK_IMPORT_PATH</tt></a></dt>
<dd>
The location of a previously built JDK installation.
See <a href="#importjdk">Optional Import JDK</a> for more information.
</dd>
<dt><a name="ALT_MSDEVTOOLS_PATH"><tt>ALT_MSDEVTOOLS_PATH</tt></a> </dt>
<dd>
<strong>Windows Only:</strong>
The location of the Microsoft Visual Studio .NET 2003
tools 'bin' directory.
The default is usually derived from
<a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a>.
</dd>
<dt><tt><a name="ALT_MSVCR71_DLL_PATH">ALT_MSVCR71_DLL_PATH</a></tt> </dt>
<dd>
<strong>Windows i586 only:</strong>
The location of the
<a href="#msvcr71"><tt>MSVCR71.DLL</tt></a>.
</dd>
<dt><tt><a name="ALT_MSVCRT_DLL_PATH">ALT_MSVCRT_DLL_PATH</a></tt> </dt>
<dd>
<strong>Windows Only:</strong>
The location of the
<a href="#msvcrt"><tt>MSVCRT.DLL</tt></a>.
</dd>
<dt><a name="ALT_OUTPUTDIR"><tt>ALT_OUTPUTDIR</tt></a> </dt>
<dd>
An override for specifying the (absolute) path of where the
build output is to go.
The default output directory will be build/<i>platform</i>.
</dd>
<dt><a name="ALT_SLASHJAVA"><tt>ALT_SLASHJAVA</tt></a></dt>
<dd>
The default root location for many of the ALT path locations
of the following ALT variables.
The default value is
<tt>"/java"</tt> on Solaris and Linux,
<tt>"J:"</tt> on Windows.
</dd>
<dt><a name="ALT_UNIXCCS_PATH"><tt>ALT_UNIXCCS_PATH</tt></a></dt>
<dd>
<strong>Solaris only:</strong>
An override for specifying where the Unix CCS
command set are located.
The default location is <tt>/usr/ccs/bin</tt>
</dd>
<dt><a name="ALT_UNIXCOMMAND_PATH"><tt>ALT_UNIXCOMMAND_PATH</tt></a> </dt>
<dd>
An override for specifying where the
Unix command set are located.
The default location varies depending on the platform,
<tt>"%SYSTEMDRIVE%/MKSNT"</tt> or
<tt>$(ROOTDIR)</tt> on Windows with MKS, otherwise it's
<tt>"/bin"</tt> or <tt>/usr/bin</tt>.
</dd>
<dt><a name="ALT_USRBIN_PATH"><tt>ALT_USRBIN_PATH</tt></a></dt>
<dd>
An override for specifying where the
Unix <tt>/usr/bin</tt> commands are located. You usually do not need
to set this variable: the default location is <tt>/usr/bin</tt>)
</dd>
<dt><a name="ANT_HOME"><tt>ANT_HOME</tt></a></dt>
<dd>
The location of the Ant installation.
See <a href="#ant">Ant</a> for more information.
You should always set <tt>ANT_HOME</tt> explicitly.
</dd>
<dt><a name="arch_data_model"><tt>ARCH_DATA_MODEL</tt></a></dt>
<dd>The <tt>ARCH_DATA_MODEL</tt> variable
is used to specify whether the build is to generate 32-bit or 64-bit
binaries.
The Solaris build supports either 32-bit or 64-bit builds, but
Windows and Linux will support only one, depending on the specific
OS being used.
Normally, setting this variable is only necessary on Solaris.
Set <tt>ARCH_DATA_MODEL</tt> to <tt>32</tt> for generating 32-bit binaries,
or to <tt>64</tt> for generating 64-bit binaries.
</dd>
<dt><tt>BUILD_NUMBER</tt> </dt>
<dd>
The build number for the build (<i>e.g.</i> "b27").
The default value is "b00".
</dd>
<dt><tt>MILESTONE</tt> </dt>
<dd>
The milestone name for the build (<i>e.g.</i>"beta").
The default value is "internal".
</dd>
<dt><a name="path"><tt>PATH</tt></a> </dt>
<dd>Typically you want to set the <tt>PATH</tt> to include:
<ul>
<li>The location of the GNU make binary</li>
<li>The location of the Bootstrap JDK <tt>java</tt>
(see <a href="#bootjdk">Bootstrap JDK</a>)</li>
<li>The location of the C/C++ compilers
(see <a href="#compilers"><tt>compilers</tt></a>)</li>
<li>The location or locations for the Unix command utilities
(e.g. <tt>/usr/bin</tt>)</li>
</ul>
</dd> </dd>
</dl> </dl>
</blockquote> </blockquote>

View file

@ -5,3 +5,5 @@ e84e9018bebbf3e5bafc5706e7882a15cb1c7d99 jdk7-b27
27509b7d21ed783b3f6eb7b7612781c675a30c2f jdk7-b28 27509b7d21ed783b3f6eb7b7612781c675a30c2f jdk7-b28
8b71960f79ce0a6fb8ddfeec03f03d400a361747 jdk7-b29 8b71960f79ce0a6fb8ddfeec03f03d400a361747 jdk7-b29
c0252adbb2abbfdd6c35595429ac6fbdd98e20ac jdk7-b30 c0252adbb2abbfdd6c35595429ac6fbdd98e20ac jdk7-b30
ef6af34d75a7b44e77083f1d4ee47631fa09d3b4 jdk7-b31
80a0f46a6203e727012bd579fe38a609b83decce jdk7-b32

View file

@ -41,4 +41,7 @@ com_sun_corba_se_impl_dynamicany_java = \
com/sun/corba/se/impl/dynamicany/DynSequenceImpl.java \ com/sun/corba/se/impl/dynamicany/DynSequenceImpl.java \
com/sun/corba/se/impl/dynamicany/DynStructImpl.java \ com/sun/corba/se/impl/dynamicany/DynStructImpl.java \
com/sun/corba/se/impl/dynamicany/DynUnionImpl.java \ com/sun/corba/se/impl/dynamicany/DynUnionImpl.java \
com/sun/corba/se/impl/dynamicany/DynValueImpl.java com/sun/corba/se/impl/dynamicany/DynValueImpl.java \
com/sun/corba/se/impl/dynamicany/DynValueBoxImpl.java \
com/sun/corba/se/impl/dynamicany/DynValueCommonImpl.java

View file

@ -52,6 +52,8 @@ com_sun_corba_se_impl_encoding_java = \
com/sun/corba/se/impl/encoding/CodeSetComponentInfo.java \ com/sun/corba/se/impl/encoding/CodeSetComponentInfo.java \
com/sun/corba/se/impl/encoding/EncapsInputStream.java \ com/sun/corba/se/impl/encoding/EncapsInputStream.java \
com/sun/corba/se/impl/encoding/EncapsOutputStream.java \ com/sun/corba/se/impl/encoding/EncapsOutputStream.java \
com/sun/corba/se/impl/encoding/IDLJavaSerializationInputStream.java \
com/sun/corba/se/impl/encoding/IDLJavaSerializationOutputStream.java \
com/sun/corba/se/impl/encoding/MarkAndResetHandler.java \ com/sun/corba/se/impl/encoding/MarkAndResetHandler.java \
com/sun/corba/se/impl/encoding/MarshalInputStream.java \ com/sun/corba/se/impl/encoding/MarshalInputStream.java \
com/sun/corba/se/impl/encoding/MarshalOutputStream.java \ com/sun/corba/se/impl/encoding/MarshalOutputStream.java \

View file

@ -63,6 +63,7 @@ com_sun_corba_se_impl_ior_java = \
com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java \ com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java \
com/sun/corba/se/impl/ior/iiop/IIOPProfileTemplateImpl.java \ com/sun/corba/se/impl/ior/iiop/IIOPProfileTemplateImpl.java \
com/sun/corba/se/impl/ior/iiop/JavaCodebaseComponentImpl.java \ com/sun/corba/se/impl/ior/iiop/JavaCodebaseComponentImpl.java \
com/sun/corba/se/impl/ior/iiop/JavaSerializationComponent.java \
com/sun/corba/se/impl/ior/iiop/MaxStreamFormatVersionComponentImpl.java \ com/sun/corba/se/impl/ior/iiop/MaxStreamFormatVersionComponentImpl.java \
com/sun/corba/se/impl/ior/iiop/RequestPartitioningComponentImpl.java \ com/sun/corba/se/impl/ior/iiop/RequestPartitioningComponentImpl.java \
com/sun/corba/se/impl/ior/iiop/ORBTypeComponentImpl.java com/sun/corba/se/impl/ior/iiop/ORBTypeComponentImpl.java

View file

@ -27,6 +27,7 @@ com_sun_corba_se_impl_orbutil_java = \
com/sun/corba/se/impl/orbutil/CacheTable.java \ com/sun/corba/se/impl/orbutil/CacheTable.java \
com/sun/corba/se/impl/orbutil/CorbaResourceUtil.java \ com/sun/corba/se/impl/orbutil/CorbaResourceUtil.java \
com/sun/corba/se/impl/orbutil/DenseIntMapImpl.java \ com/sun/corba/se/impl/orbutil/DenseIntMapImpl.java \
com/sun/corba/se/impl/orbutil/GetPropertyAction.java \
com/sun/corba/se/impl/orbutil/HexOutputStream.java \ com/sun/corba/se/impl/orbutil/HexOutputStream.java \
com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3.java \ com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3.java \
com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3_1.java \ com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3_1.java \
@ -76,6 +77,7 @@ com_sun_corba_se_impl_orbutil_java = \
com/sun/corba/se/impl/copyobject/FallbackObjectCopierImpl.java \ com/sun/corba/se/impl/copyobject/FallbackObjectCopierImpl.java \
com/sun/corba/se/impl/copyobject/ORBStreamObjectCopierImpl.java \ com/sun/corba/se/impl/copyobject/ORBStreamObjectCopierImpl.java \
com/sun/corba/se/impl/copyobject/ReferenceObjectCopierImpl.java \ com/sun/corba/se/impl/copyobject/ReferenceObjectCopierImpl.java \
com/sun/corba/se/impl/copyobject/JavaStreamObjectCopierImpl.java \
com/sun/corba/se/impl/orbutil/graph/Node.java \ com/sun/corba/se/impl/orbutil/graph/Node.java \
com/sun/corba/se/impl/orbutil/graph/NodeData.java \ com/sun/corba/se/impl/orbutil/graph/NodeData.java \
com/sun/corba/se/impl/orbutil/graph/Graph.java \ com/sun/corba/se/impl/orbutil/graph/Graph.java \

View file

@ -63,6 +63,7 @@ com_sun_corba_se_impl_protocol_java = \
com/sun/corba/se/impl/protocol/giopmsgheaders/LocateRequestMessage_1_0.java \ com/sun/corba/se/impl/protocol/giopmsgheaders/LocateRequestMessage_1_0.java \
com/sun/corba/se/impl/protocol/giopmsgheaders/LocateRequestMessage_1_1.java \ com/sun/corba/se/impl/protocol/giopmsgheaders/LocateRequestMessage_1_1.java \
com/sun/corba/se/impl/protocol/giopmsgheaders/LocateRequestMessage_1_2.java \ com/sun/corba/se/impl/protocol/giopmsgheaders/LocateRequestMessage_1_2.java \
com/sun/corba/se/impl/protocol/giopmsgheaders/LocateReplyOrReplyMessage.java \
com/sun/corba/se/impl/protocol/giopmsgheaders/Message.java \ com/sun/corba/se/impl/protocol/giopmsgheaders/Message.java \
com/sun/corba/se/impl/protocol/giopmsgheaders/MessageBase.java \ com/sun/corba/se/impl/protocol/giopmsgheaders/MessageBase.java \
com/sun/corba/se/impl/protocol/giopmsgheaders/MessageHandler.java \ com/sun/corba/se/impl/protocol/giopmsgheaders/MessageHandler.java \

View file

@ -29,6 +29,7 @@
com_sun_corba_se_spi_legacy_interceptor_java = \ com_sun_corba_se_spi_legacy_interceptor_java = \
com/sun/corba/se/spi/legacy/interceptor/IORInfoExt.java \ com/sun/corba/se/spi/legacy/interceptor/IORInfoExt.java \
com/sun/corba/se/spi/legacy/interceptor/ORBInitInfoExt.java \
com/sun/corba/se/spi/legacy/interceptor/RequestInfoExt.java \ com/sun/corba/se/spi/legacy/interceptor/RequestInfoExt.java \
com/sun/corba/se/spi/legacy/interceptor/UnknownType.java com/sun/corba/se/spi/legacy/interceptor/UnknownType.java

View file

@ -35,5 +35,6 @@ FILES_java = \
com/sun/corba/se/spi/monitoring/MonitoredObjectFactory.java \ com/sun/corba/se/spi/monitoring/MonitoredObjectFactory.java \
com/sun/corba/se/spi/monitoring/MonitoredAttribute.java \ com/sun/corba/se/spi/monitoring/MonitoredAttribute.java \
com/sun/corba/se/spi/monitoring/MonitoredAttributeInfoFactory.java \ com/sun/corba/se/spi/monitoring/MonitoredAttributeInfoFactory.java \
com/sun/corba/se/spi/monitoring/MonitoringConstants.java \
com/sun/corba/se/spi/monitoring/MonitoringManager.java \ com/sun/corba/se/spi/monitoring/MonitoringManager.java \
com/sun/corba/se/spi/monitoring/MonitoringManagerFactory.java com/sun/corba/se/spi/monitoring/MonitoringManagerFactory.java

View file

@ -27,6 +27,7 @@ com_sun_corba_se_spi_presentation_rmi_java = \
com/sun/corba/se/spi/presentation/rmi/DynamicMethodMarshaller.java \ com/sun/corba/se/spi/presentation/rmi/DynamicMethodMarshaller.java \
com/sun/corba/se/spi/presentation/rmi/DynamicStub.java \ com/sun/corba/se/spi/presentation/rmi/DynamicStub.java \
com/sun/corba/se/spi/presentation/rmi/IDLNameTranslator.java \ com/sun/corba/se/spi/presentation/rmi/IDLNameTranslator.java \
com/sun/corba/se/spi/presentation/rmi/PresentationDefaults.java \
com/sun/corba/se/spi/presentation/rmi/PresentationManager.java \ com/sun/corba/se/spi/presentation/rmi/PresentationManager.java \
com/sun/corba/se/spi/presentation/rmi/StubAdapter.java com/sun/corba/se/spi/presentation/rmi/StubAdapter.java

View file

@ -26,6 +26,7 @@
com_sun_corba_se_spi_transport_java = \ com_sun_corba_se_spi_transport_java = \
com/sun/corba/se/spi/transport/CorbaAcceptor.java \ com/sun/corba/se/spi/transport/CorbaAcceptor.java \
com/sun/corba/se/spi/transport/CorbaConnection.java \ com/sun/corba/se/spi/transport/CorbaConnection.java \
com/sun/corba/se/spi/transport/CorbaConnectionCache.java \
com/sun/corba/se/spi/transport/CorbaContactInfo.java \ com/sun/corba/se/spi/transport/CorbaContactInfo.java \
com/sun/corba/se/spi/transport/CorbaContactInfoList.java \ com/sun/corba/se/spi/transport/CorbaContactInfoList.java \
com/sun/corba/se/spi/transport/CorbaContactInfoListFactory.java \ com/sun/corba/se/spi/transport/CorbaContactInfoListFactory.java \

View file

@ -47,6 +47,7 @@ NS_GENERATED_java = \
org/omg/CosNaming/NamingContext.java \ org/omg/CosNaming/NamingContext.java \
org/omg/CosNaming/NamingContextHelper.java \ org/omg/CosNaming/NamingContextHelper.java \
org/omg/CosNaming/NamingContextHolder.java \ org/omg/CosNaming/NamingContextHolder.java \
org/omg/CosNaming/NamingContextOperations.java \
org/omg/CosNaming/_NamingContextStub.java \ org/omg/CosNaming/_NamingContextStub.java \
org/omg/CosNaming/NamingContextPackage/AlreadyBound.java \ org/omg/CosNaming/NamingContextPackage/AlreadyBound.java \
org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java \ org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java \

View file

@ -47,6 +47,10 @@ DYNANY_GENERATED_java = \
org/omg/DynamicAny/DynUnionOperations.java \ org/omg/DynamicAny/DynUnionOperations.java \
org/omg/DynamicAny/DynValue.java \ org/omg/DynamicAny/DynValue.java \
org/omg/DynamicAny/DynValueOperations.java \ org/omg/DynamicAny/DynValueOperations.java \
org/omg/DynamicAny/DynValueBox.java \
org/omg/DynamicAny/DynValueBoxOperations.java \
org/omg/DynamicAny/DynValueCommon.java \
org/omg/DynamicAny/DynValueCommonOperations.java \
org/omg/DynamicAny/NameDynAnyPair.java \ org/omg/DynamicAny/NameDynAnyPair.java \
org/omg/DynamicAny/NameValuePair.java \ org/omg/DynamicAny/NameValuePair.java \
org/omg/DynamicAny/DynAnyPackage/InvalidValue.java \ org/omg/DynamicAny/DynAnyPackage/InvalidValue.java \
@ -70,8 +74,16 @@ DYNANY_GENERATED_java = \
org/omg/DynamicAny/DynSequenceHelper.java \ org/omg/DynamicAny/DynSequenceHelper.java \
org/omg/DynamicAny/NameDynAnyPairSeqHelper.java \ org/omg/DynamicAny/NameDynAnyPairSeqHelper.java \
org/omg/DynamicAny/NameValuePairHelper.java \ org/omg/DynamicAny/NameValuePairHelper.java \
org/omg/DynamicAny/NameValuePairSeqHelper.java org/omg/DynamicAny/NameValuePairSeqHelper.java \
org/omg/DynamicAny/_DynAnyFactoryStub.java \
org/omg/DynamicAny/_DynAnyStub.java \
org/omg/DynamicAny/_DynArrayStub.java \
org/omg/DynamicAny/_DynEnumStub.java \
org/omg/DynamicAny/_DynFixedStub.java \
org/omg/DynamicAny/_DynSequenceStub.java \
org/omg/DynamicAny/_DynStructStub.java \
org/omg/DynamicAny/_DynUnionStub.java \
org/omg/DynamicAny/_DynValueStub.java
DYNANY_HELP_HOLD_java = \ DYNANY_HELP_HOLD_java = \
org/omg/DynamicAny/AnySeqHolder.java \ org/omg/DynamicAny/AnySeqHolder.java \

View file

@ -106,6 +106,7 @@ PI_GENERATED_java = \
org/omg/IOP/CodecPackage/TypeMismatchHelper.java \ org/omg/IOP/CodecPackage/TypeMismatchHelper.java \
org/omg/IOP/ENCODING_CDR_ENCAPS.java \ org/omg/IOP/ENCODING_CDR_ENCAPS.java \
org/omg/IOP/Encoding.java \ org/omg/IOP/Encoding.java \
org/omg/IOP/ExceptionDetailMessage.java \
org/omg/Dynamic/Parameter.java org/omg/Dynamic/Parameter.java
# Helper and Holder files to be removed: # Helper and Holder files to be removed:

View file

@ -46,6 +46,8 @@ CORBA_JMK_DIRECTORY=$(TOPDIR)/make/com/sun/corba/minclude/
include $(CORBA_JMK_DIRECTORY)com_sun_corba_se_PortableActivationIDL.jmk include $(CORBA_JMK_DIRECTORY)com_sun_corba_se_PortableActivationIDL.jmk
include $(CORBA_JMK_DIRECTORY)com_sun_corba_se_impl_logging.jmk include $(CORBA_JMK_DIRECTORY)com_sun_corba_se_impl_logging.jmk
FILES_java += com/sun/corba/se/org/omg/CORBA/ORB.java
# #
# Dirs # Dirs
# #

View file

@ -31,11 +31,8 @@ COMPILER_NAME=Sun Studio
# Sun Studio Compiler settings specific to Solaris # Sun Studio Compiler settings specific to Solaris
ifeq ($(PLATFORM), solaris) ifeq ($(PLATFORM), solaris)
# FIXUP: Change to SS12 when validated COMPILER_VERSION=SS12
#COMPILER_VERSION=SS12 REQUIRED_CC_VER=5.9
#REQUIRED_CC_VER=5.9
COMPILER_VERSION=SS11
REQUIRED_CC_VER=5.8
CC = $(COMPILER_PATH)cc CC = $(COMPILER_PATH)cc
CPP = $(COMPILER_PATH)cc -E CPP = $(COMPILER_PATH)cc -E
CXX = $(COMPILER_PATH)CC CXX = $(COMPILER_PATH)CC

View file

@ -35,7 +35,7 @@ include $(BUILDDIR)/common/Defs.gmk
# #
# Files to compile # Files to compile
# #
AUTO_FILES_JAVA_DIRS = javax/transaction/xa AUTO_FILES_JAVA_DIRS = javax/transaction
# #
# Rules # Rules

View file

@ -127,9 +127,7 @@ if [ "${osname}" = SunOS ] ; then
if [ "${JPRT_SOLARIS_COMPILER_NAME}" != "" ] ; then if [ "${JPRT_SOLARIS_COMPILER_NAME}" != "" ] ; then
compiler_name=${JPRT_SOLARIS_COMPILER_NAME} compiler_name=${JPRT_SOLARIS_COMPILER_NAME}
else else
# FIXUP: Change to SS12 when validated compiler_name=SS12
#compiler_name=SS12
compiler_name=SS11
fi fi
compiler_path=${jdk_devtools}/${solaris_arch}/SUNWspro/${compiler_name}/bin compiler_path=${jdk_devtools}/${solaris_arch}/SUNWspro/${compiler_name}/bin
ALT_COMPILER_PATH="${compiler_path}" ALT_COMPILER_PATH="${compiler_path}"

View file

@ -47,8 +47,8 @@ else
endif endif
FILES_java = \ FILES_java = \
$(ORG_OMG_SENDINGCONTEXT_java) \ $(org_omg_SendingContext_java) \
$(ORG_OMG_CORBA_2_3_java) \ $(org_omg_CORBA_2_3_java) \
$(ORG_OMG_CORBA_java) $(ORG_OMG_CORBA_java)
# #

View file

@ -5,3 +5,5 @@ e3d2692f8442e2d951166dc9bd9a330684754438 jdk7-b27
c14dab40ed9bf45ad21150bd70c9c80cdf655415 jdk7-b28 c14dab40ed9bf45ad21150bd70c9c80cdf655415 jdk7-b28
4f91c08b3e4498213a9c5a24898f7d9c38cf86fb jdk7-b29 4f91c08b3e4498213a9c5a24898f7d9c38cf86fb jdk7-b29
d1605aabd0a15ecf93787c47de63073c33fba52d jdk7-b30 d1605aabd0a15ecf93787c47de63073c33fba52d jdk7-b30
9c2ecc2ffb125f14fab3857fe7689598956348a0 jdk7-b31
b727c32788a906c04839516ae7443a085185a300 jdk7-b32

View file

@ -32,6 +32,12 @@ else
include $(GAMMADIR)/make/defs.make include $(GAMMADIR)/make/defs.make
endif endif
ifeq "x$(HOTSPOT_BUILD_VERSION)" "x"
SA_BUILD_VERSION=$(HOTSPOT_RELEASE_VERSION)
else
SA_BUILD_VERSION=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
endif
PKGLIST = \ PKGLIST = \
sun.jvm.hotspot \ sun.jvm.hotspot \
sun.jvm.hotspot.asm \ sun.jvm.hotspot.asm \
@ -117,7 +123,9 @@ sun.jvm.hotspot.ui.tree \
sun.jvm.hotspot.ui.treetable \ sun.jvm.hotspot.ui.treetable \
sun.jvm.hotspot.utilities \ sun.jvm.hotspot.utilities \
sun.jvm.hotspot.utilities.memo \ sun.jvm.hotspot.utilities.memo \
sun.jvm.hotspot.utilities.soql sun.jvm.hotspot.utilities.soql \
com.sun.java.swing.action \
com.sun.java.swing.ui
#END PKGLIST #END PKGLIST
# Generated using the build-filelist script # Generated using the build-filelist script
@ -198,7 +206,9 @@ sun/jvm/hotspot/ui/tree/*.java \
sun/jvm/hotspot/ui/treetable/*.java \ sun/jvm/hotspot/ui/treetable/*.java \
sun/jvm/hotspot/utilities/*.java \ sun/jvm/hotspot/utilities/*.java \
sun/jvm/hotspot/utilities/memo/*.java \ sun/jvm/hotspot/utilities/memo/*.java \
sun/jvm/hotspot/utilities/soql/*.java sun/jvm/hotspot/utilities/soql/*.java \
com/sun/java/swing/action/*.java \
com/sun/java/swing/ui/*.java
#END FILELIST #END FILELIST
ifneq "x$(ALT_BOOTDIR)" "x" ifneq "x$(ALT_BOOTDIR)" "x"
@ -220,8 +230,6 @@ else
endif endif
SRC_DIR = ../src/share/classes SRC_DIR = ../src/share/classes
LIB_DIR = ../src/share/lib
CLOSED_LIB_DIR = ../closed/src/share/lib
BUILD_DIR = ../build BUILD_DIR = ../build
OUTPUT_DIR = $(BUILD_DIR)/classes OUTPUT_DIR = $(BUILD_DIR)/classes
DOC_DIR = $(BUILD_DIR)/doc DOC_DIR = $(BUILD_DIR)/doc
@ -231,9 +239,9 @@ DOC_DIR = $(BUILD_DIR)/doc
ALLFILES := $(patsubst %,$(SRC_DIR)/%,$(FILELIST)) ALLFILES := $(patsubst %,$(SRC_DIR)/%,$(FILELIST))
ALLFILES := $(shell /bin/ls $(ALLFILES)) ALLFILES := $(shell /bin/ls $(ALLFILES))
# tools.jar is used by the sa-jdi binding
CLASSPATH = $(JDK_HOME)/lib/tools.jar
# tools.jar is needed by the JDI - SA binding
CLASSPATH = $(LIB_DIR)/maf-1_0.jar$(CPS)$(JDK_HOME)/lib/tools.jar
CLASSPATH := $(subst \,/,$(CLASSPATH)) CLASSPATH := $(subst \,/,$(CLASSPATH))
# FIXME: autogenerate call to rmic # FIXME: autogenerate call to rmic
@ -241,24 +249,36 @@ CLASSPATH := $(subst \,/,$(CLASSPATH))
SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VERSION)" SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VERSION)"
SA_PROPERTIES = $(OUTPUT_DIR)/sa.properties SA_PROPERTIES = $(OUTPUT_DIR)/sa.properties
JAVAC = $(JDK_HOME)/bin/javac
JAVADOC = $(JDK_HOME)/bin/javadoc
RMIC = $(JDK_HOME)/bin/rmic
# Tagging it on because there's no reason not to run it # Tagging it on because there's no reason not to run it
all: filelist all: filelist
@mkdir -p $(OUTPUT_DIR) @mkdir -p $(OUTPUT_DIR)
@echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES) @echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
@${JDK_HOME}/bin/javac -source 1.4 -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist $(JAVAC) -source 1.4 -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
@${JDK_HOME}/bin/rmic -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer $(RMIC) -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js
cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql
mkdir -p $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources
rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/*
cp $(SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/
cp -r $(SRC_DIR)/images/* $(OUTPUT_DIR)/
allprof: filelist allprof: filelist
@mkdir -p $(OUTPUT_DIR) @mkdir -p $(OUTPUT_DIR)
@echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES) @echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
@${JDK_HOME}/bin/javac -source 1.4 -J-Xprof -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist $(JAVAC) -source 1.4 -J-Xprof -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
@${JDK_HOME}/bin/rmic -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer $(RMIC) -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js
cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql
mkdir -p $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources
rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/*
cp $(SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/
cp -r $(SRC_DIR)/images/* $(OUTPUT_DIR)/
.PHONY: filelist
filelist: $(ALLFILES) filelist: $(ALLFILES)
@if [ ! -f $(JDK_HOME)/lib/tools.jar ] ; then \ @if [ ! -f $(JDK_HOME)/lib/tools.jar ] ; then \
echo "Missing $(JDK_HOME)/lib/tools.jar file. Use 1.6.0 or later version jdk to build SA."; \ echo "Missing $(JDK_HOME)/lib/tools.jar file. Use 1.6.0 or later version jdk to build SA."; \
@ -274,36 +294,23 @@ natives:
.PHONY: sa-jdi.jar .PHONY: sa-jdi.jar
sa-jdi.jar: sa-jdi.jar:
if [ ! -f $(JDK_HOME)/lib/tools.jar ] ; then \ echo "sa-jdi.jar is built by a hotspot build."
echo "Missing $(JDK_HOME)/lib/tools.jar file. Use 1.6.0 or later version jdk to build SA.";\
exit 1; \
fi
rm -f $(BUILD_DIR)/sa-jdi.jar
rm -f $(OUTPUT_DIR)/jdi_class_files
javac -source 1.4 ClosureFinder.java -d $(OUTPUT_DIR)
cd $(OUTPUT_DIR) ; find sun/jvm/hotspot/jdi -name "*.class" > jdi_class_files
cd $(OUTPUT_DIR) ; jar cvf ../sa-jdi.jar `java ClosureFinder jdi_class_files .`
cd $(BUILD_DIR) ; jar uvf sa-jdi.jar -C $(SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
cd $(BUILD_DIR) ; jar uvf sa-jdi.jar -C $(OUTPUT_DIR) sa.properties
rm -f $(OUTPUT_DIR)/ClosureFinder.class
rm -f $(OUTPUT_DIR)/jdi_class_files
docs: docs:
@javadoc -private -classpath $(CLASSPATH) -sourcepath $(SRC_DIR) -d $(DOC_DIR) $(PKGLIST) @$(JAVADOC) -private -classpath $(CLASSPATH) -sourcepath $(SRC_DIR) -d $(DOC_DIR) $(PKGLIST)
sizes: $(ALLFILES) sizes: $(ALLFILES)
wc -l $(ALLFILES) wc -l $(ALLFILES)
cscope: $(ALLFILES) cscope: $(ALLFILES)
rm -f java.files
echo $(ALLFILES) > java.files echo $(ALLFILES) > java.files
cscope -b -i java.files -f java.out cscope -b -i java.files -f java.out
rm -f java.files
.PHONY: sa.jar .PHONY: sa.jar
sa.jar: sa.jar:
rm -f $(BUILD_DIR)/sa.jar rm -f $(BUILD_DIR)/sa.jar
mkdir -p $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources
rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/*
cp $(SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/
cd $(OUTPUT_DIR) ; jar cvf ../sa.jar * cd $(OUTPUT_DIR) ; jar cvf ../sa.jar *
clean:: clean::

View file

@ -22,4 +22,4 @@ REM have any questions.
REM REM
REM REM
java -showversion -cp ..\build\classes;..\src\share\lib\maf-1_0.jar;..\src\share\lib\jlfgr-1_0.jar;..\src\share\lib\js.jar;sa.jar;lib\maf-1_0.jar;lib\jlfgr-1_0.jar;lib\js.jar sun.jvm.hotspot.bugspot.Main java -showversion -cp ..\build\classes;..\src\share\lib\js.jar;.\sa.jar;lib\js.jar sun.jvm.hotspot.bugspot.Main

View file

@ -42,7 +42,6 @@
<property name="app.name" value="sa"/> <property name="app.name" value="sa"/>
<property name="dist.jar" value="${app.name}.jar"/> <property name="dist.jar" value="${app.name}.jar"/>
<property name="libs" value="../src/share/lib"/>
<property name="classes" value="../build/classes"/> <property name="classes" value="../build/classes"/>
<!-- The "prepare" target is used to construct the deployment home <!-- The "prepare" target is used to construct the deployment home
@ -83,11 +82,6 @@
home directory structure will be created if needed the first time. home directory structure will be created if needed the first time.
--> -->
<path id="javac.classpath">
<pathelement path="${libs}/maf-1_0.jar" />
<pathelement path="${libs}/jlfgr-1_0.jar" />
</path>
<target name="compile" depends="prepare" description="Compiles the sources"> <target name="compile" depends="prepare" description="Compiles the sources">
<javac srcdir="../src/share/classes" <javac srcdir="../src/share/classes"
destdir="${classes}" destdir="${classes}"
@ -110,6 +104,18 @@
<copy todir="${classes}/sun/jvm/hotspot/ui/resources"> <copy todir="${classes}/sun/jvm/hotspot/ui/resources">
<fileset dir="../src/share/classes/sun/jvm/hotspot/ui/resources" includes="*.png" /> <fileset dir="../src/share/classes/sun/jvm/hotspot/ui/resources" includes="*.png" />
</copy> </copy>
<copy todir="${classes}/toolbarButtonGraphics/development/">
<fileset dir="../src/share/classes/images/toolbarButtonGraphics/development/" includes="*.gif" />
</copy>
<copy todir="${classes}/toolbarButtonGraphics/general/">
<fileset dir="../src/share/classes/images/toolbarButtonGraphics/general/" includes="*.gif" />
</copy>
<copy todir="${classes}/toolbarButtonGraphics/navigation/">
<fileset dir="../src/share/classes/images/toolbarButtonGraphics/navigation/" includes="*.gif" />
</copy>
<copy todir="${classes}/toolbarButtonGraphics/text/">
<fileset dir="../src/share/classes/images/toolbarButtonGraphics/text/" includes="*.gif" />
</copy>
<jar jarfile="${classes}/${dist.jar}" <jar jarfile="${classes}/${dist.jar}"
basedir="${classes}"/> basedir="${classes}"/>

View file

@ -22,4 +22,4 @@ REM have any questions.
REM REM
REM REM
java -showversion -cp ..\build\classes;..\src\share\lib\maf-1_0.jar;..\src\share\lib\jlfgr-1_0.jar;..\src\share\lib\js.jar;sa.jar;lib\maf-1_0.jar;lib\jlfgr-1_0.jar;lib\js.jar sun.jvm.hotspot.HSDB %1 %2 java -showversion -cp ..\build\classes;..\src\share\lib\js.jar;.\sa.jar;lib\js.jar sun.jvm.hotspot.HSDB %1 %2

View file

@ -29,4 +29,4 @@ if [ "x$SA_JAVA" = "x" ]; then
SA_JAVA=java SA_JAVA=java
fi fi
$SA_JAVA -showversion -cp $STARTDIR/../build/classes:$STARTDIR/../src/share/lib/maf-1_0.jar:$STARTDIR/../src/share/lib/jlfgr-1_0.jar:$STARTDIR/../src/share/lib/js.jar:$STARTDIR/sa.jar:$STARTDIR/lib/maf-1_0.jar:$STARTDIR/lib/jlfgr-1_0.jar:$STARTDIR/lib/js.jar sun.jvm.hotspot.HSDB $* $SA_JAVA -showversion -cp $STARTDIR/../build/classes:$STARTDIR/../src/share/lib/js.jar:$STARTDIR/sa.jar:$STARTDIR/lib/js.jar sun.jvm.hotspot.HSDB $*

View file

@ -39,7 +39,7 @@ set SA_JAVA=java
:sa_java_set :sa_java_set
set SA_CLASSPATH=..\build\classes;..\src\share\lib\maf-1_0.jar;..\src\share\lib\jlfgr-1_0.jar;..\src\share\lib\js.jar;sa.jar;lib\maf-1_0.jar;lib\jlfgr-1_0.jar;lib\js.jar set SA_CLASSPATH=..\build\classes;..\src\share\lib\js.jar;sa.jar;lib\js.jar
set SA_LIBPATH=..\src\os\win32\windbg\i386;.\win32\i386 set SA_LIBPATH=..\src\os\win32\windbg\i386;.\win32\i386

View file

@ -58,7 +58,7 @@ if [ "x$SA_DISABLE_VERS_CHK" != "x" ]; then
fi fi
SA_CLASSPATH=$STARTDIR/../build/classes:$STARTDIR/../src/share/lib/maf-1_0.jar:$STARTDIR/../src/share/lib/jlfgr-1_0.jar:$STARTDIR/../src/share/lib/js.jar:$STARTDIR/sa.jar:$STARTDIR/lib/maf-1_0.jar:$STARTDIR/lib/jlfgr-1_0.jar:$STARTDIR/lib/js.jar SA_CLASSPATH=$STARTDIR/../build/classes:$STARTDIR/../src/share/lib/js.jar:$STARTDIR/sa.jar:$STARTDIR/lib/js.jar
OPTIONS="-Djava.system.class.loader=sun.jvm.hotspot.SALauncherLoader ${OPTIONS}" OPTIONS="-Djava.system.class.loader=sun.jvm.hotspot.SALauncherLoader ${OPTIONS}"

View file

@ -43,7 +43,7 @@ set SA_JAVA=java
:sa_java_set :sa_java_set
set SA_CLASSPATH=..\build\classes;..\src\share\lib\maf-1_0.jar;..\src\share\lib\jlfgr-1_0.jar;..\src\share\lib\js.jar;sa.jar;lib\maf-1_0.jar;lib\jlfgr-1_0.jar;lib\js.jar set SA_CLASSPATH=..\build\classes;..\src\share\lib\js.jar;sa.jar;lib\js.jar
REM For now, only AMD-64, IA-64 stack walking is not working anyway REM For now, only AMD-64, IA-64 stack walking is not working anyway
set SA_LIBPATH=.\src\os\win32\windbg\amd64;.\win32\amd64 set SA_LIBPATH=.\src\os\win32\windbg\amd64;.\win32\amd64

View file

@ -55,7 +55,7 @@ if [ "x$SA_DISABLE_VERS_CHK" != "x" ]; then
OPTIONS="-Dsun.jvm.hotspot.runtime.VM.disableVersionCheck ${OPTIONS}" OPTIONS="-Dsun.jvm.hotspot.runtime.VM.disableVersionCheck ${OPTIONS}"
fi fi
SA_CLASSPATH=$STARTDIR/../build/classes:$STARTDIR/../src/share/lib/maf-1_0.jar:$STARTDIR/../src/share/lib/jlfgr-1_0.jar:$STARTDIR/../src/share/lib/js.jar:$STARTDIR/sa.jar:$STARTDIR/lib/maf-1_0.jar:$STARTDIR/lib/jlfgr-1_0.jar:$STARTDIR/lib/js.jar SA_CLASSPATH=$STARTDIR/../build/classes:$STARTDIR/../src/share/lib/js.jar:$STARTDIR/sa.jar::$STARTDIR/lib/js.jar
OPTIONS="-Djava.system.class.loader=sun.jvm.hotspot.SALauncherLoader ${OPTIONS}" OPTIONS="-Djava.system.class.loader=sun.jvm.hotspot.SALauncherLoader ${OPTIONS}"

View file

@ -0,0 +1,57 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
// Referenced classes of package com.sun.java.swing.action:
// DelegateAction, ActionManager
public class AboutAction extends DelegateAction
{
public AboutAction()
{
this("general/About16.gif");
}
public AboutAction(String iconPath)
{
super("About...", ActionManager.getIcon(iconPath));
putValue("ActionCommandKey", "about-command");
putValue("ShortDescription", "About...");
putValue("LongDescription", "System information and version of the application.");
putValue("MnemonicKey", VALUE_MNEMONIC);
}
public static final String VALUE_COMMAND = "about-command";
public static final String VALUE_NAME = "About...";
public static final String VALUE_SMALL_ICON = "general/About16.gif";
public static final String VALUE_LARGE_ICON = "general/About24.gif";
public static final Integer VALUE_MNEMONIC = new Integer(65);
public static final String VALUE_SHORT_DESCRIPTION = "About...";
public static final String VALUE_LONG_DESCRIPTION = "System information and version of the application.";
}

View file

@ -0,0 +1,95 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import java.util.HashMap;
import javax.swing.Action;
import javax.swing.ImageIcon;
// Referenced classes of package com.sun.java.swing.action:
// DelegateAction, StateChangeAction, ActionUtilities
public abstract class ActionManager
{
protected ActionManager()
{
actions = new HashMap();
addActions();
}
public static ActionManager getInstance()
{
return manager;
}
protected abstract void addActions();
protected void addAction(String cmdname, Action action)
{
actions.put(cmdname, action);
}
public Action getAction(String key)
{
return (Action)actions.get(key);
}
public DelegateAction getDelegateAction(String name)
{
Action a = getAction(name);
if(a instanceof DelegateAction)
return (DelegateAction)a;
else
return null;
}
public StateChangeAction getStateChangeAction(String name)
{
Action a = getAction(name);
if(a instanceof StateChangeAction)
return (StateChangeAction)a;
else
return null;
}
public static ImageIcon getIcon(String name)
{
return utilities.getIcon(name);
}
public void setActionEnabled(String name, boolean enabled)
{
Action action = getAction(name);
if(action != null)
action.setEnabled(enabled);
}
private HashMap actions;
private static ActionUtilities utilities = new ActionUtilities();
protected static ActionManager manager;
}

View file

@ -0,0 +1,49 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import javax.swing.ImageIcon;
class ActionUtilities
{
ActionUtilities()
{
}
public ImageIcon getIcon(String name)
{
String imagePath = "/toolbarButtonGraphics/" + name;
java.net.URL url = getClass().getResource(imagePath);
if(url != null)
return new ImageIcon(url);
else
return null;
}
public static final String IMAGE_DIR = "/toolbarButtonGraphics/";
}

View file

@ -0,0 +1,60 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import javax.swing.KeyStroke;
// Referenced classes of package com.sun.java.swing.action:
// StateChangeAction, ActionManager
public class AlignCenterAction extends StateChangeAction
{
public AlignCenterAction()
{
this("text/AlignCenter16.gif");
}
public AlignCenterAction(String iconPath)
{
super("Center", ActionManager.getIcon(iconPath));
putValue("ActionCommandKey", "align-center-command");
putValue("ShortDescription", "Center");
putValue("LongDescription", "Adjust the placement of text to the center of the line");
putValue("MnemonicKey", VALUE_MNEMONIC);
putValue("AcceleratorKey", VALUE_ACCELERATOR);
}
public static final String VALUE_COMMAND = "align-center-command";
public static final String VALUE_NAME = "Center";
public static final String VALUE_SMALL_ICON = "text/AlignCenter16.gif";
public static final String VALUE_LARGE_ICON = "text/AlignCenter24.gif";
public static final Integer VALUE_MNEMONIC = new Integer(78);
public static final KeyStroke VALUE_ACCELERATOR = KeyStroke.getKeyStroke(69, 2);
public static final String VALUE_SHORT_DESCRIPTION = "Center";
public static final String VALUE_LONG_DESCRIPTION = "Adjust the placement of text to the center of the line";
}

View file

@ -0,0 +1,60 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import javax.swing.KeyStroke;
// Referenced classes of package com.sun.java.swing.action:
// StateChangeAction, ActionManager
public class AlignLeftAction extends StateChangeAction
{
public AlignLeftAction()
{
this("text/AlignLeft16.gif");
}
public AlignLeftAction(String iconPath)
{
super("Left Align", ActionManager.getIcon(iconPath));
putValue("ActionCommandKey", "align-left-command");
putValue("ShortDescription", "Left Align");
putValue("LongDescription", "Adjust the placement of text along the left edge");
putValue("MnemonicKey", VALUE_MNEMONIC);
putValue("AcceleratorKey", VALUE_ACCELERATOR);
}
public static final String VALUE_COMMAND = "align-left-command";
public static final String VALUE_NAME = "Left Align";
public static final String VALUE_SMALL_ICON = "text/AlignLeft16.gif";
public static final String VALUE_LARGE_ICON = "text/AlignLeft24.gif";
public static final Integer VALUE_MNEMONIC = new Integer(76);
public static final KeyStroke VALUE_ACCELERATOR = KeyStroke.getKeyStroke(76, 2);
public static final String VALUE_SHORT_DESCRIPTION = "Left Align";
public static final String VALUE_LONG_DESCRIPTION = "Adjust the placement of text along the left edge";
}

View file

@ -0,0 +1,60 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import javax.swing.KeyStroke;
// Referenced classes of package com.sun.java.swing.action:
// StateChangeAction, ActionManager
public class AlignRightAction extends StateChangeAction
{
public AlignRightAction()
{
this("text/AlignRight16.gif");
}
public AlignRightAction(String iconPath)
{
super("Right Align", ActionManager.getIcon(iconPath));
putValue("ActionCommandKey", "align-right-command");
putValue("ShortDescription", "Right Align");
putValue("LongDescription", "Adjust the placement of text along the right edge");
putValue("MnemonicKey", VALUE_MNEMONIC);
putValue("AcceleratorKey", VALUE_ACCELERATOR);
}
public static final String VALUE_COMMAND = "align-right-command";
public static final String VALUE_NAME = "Right Align";
public static final String VALUE_SMALL_ICON = "text/AlignRight16.gif";
public static final String VALUE_LARGE_ICON = "text/AlignRight24.gif";
public static final Integer VALUE_MNEMONIC = new Integer(82);
public static final KeyStroke VALUE_ACCELERATOR = KeyStroke.getKeyStroke(82, 2);
public static final String VALUE_SHORT_DESCRIPTION = "Right Align";
public static final String VALUE_LONG_DESCRIPTION = "Adjust the placement of text along the right edge";
}

View file

@ -0,0 +1,60 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import javax.swing.KeyStroke;
// Referenced classes of package com.sun.java.swing.action:
// DelegateAction, ActionManager
public class ApplyAction extends DelegateAction
{
public ApplyAction()
{
this(VALUE_SMALL_ICON);
}
public ApplyAction(String iconPath)
{
super("Apply", ActionManager.getIcon(iconPath));
putValue("ActionCommandKey", "apply-command");
putValue("ShortDescription", "Apply the activity");
putValue("LongDescription", "Apply the activity");
putValue("MnemonicKey", VALUE_MNEMONIC);
putValue("AcceleratorKey", VALUE_ACCELERATOR);
}
public static final String VALUE_COMMAND = "apply-command";
public static final String VALUE_NAME = "Apply";
public static final String VALUE_SMALL_ICON = null;
public static final String VALUE_LARGE_ICON = null;
public static final Integer VALUE_MNEMONIC = new Integer(65);
public static final KeyStroke VALUE_ACCELERATOR = null;
public static final String VALUE_SHORT_DESCRIPTION = "Apply the activity";
public static final String VALUE_LONG_DESCRIPTION = "Apply the activity";
}

View file

@ -0,0 +1,60 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import javax.swing.KeyStroke;
// Referenced classes of package com.sun.java.swing.action:
// DelegateAction, ActionManager
public class BackAction extends DelegateAction
{
public BackAction()
{
this(VALUE_SMALL_ICON);
}
public BackAction(String iconPath)
{
super("< Back", ActionManager.getIcon(iconPath));
putValue("ActionCommandKey", "back-command");
putValue("ShortDescription", "Select previous item");
putValue("LongDescription", "Select previous item");
putValue("MnemonicKey", VALUE_MNEMONIC);
putValue("AcceleratorKey", VALUE_ACCELERATOR);
}
public static final String VALUE_COMMAND = "back-command";
public static final String VALUE_NAME = "< Back";
public static final String VALUE_SMALL_ICON = null;
public static final String VALUE_LARGE_ICON = null;
public static final Integer VALUE_MNEMONIC = new Integer(66);
public static final KeyStroke VALUE_ACCELERATOR = null;
public static final String VALUE_SHORT_DESCRIPTION = "Select previous item";
public static final String VALUE_LONG_DESCRIPTION = "Select previous item";
}

View file

@ -0,0 +1,60 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import javax.swing.KeyStroke;
// Referenced classes of package com.sun.java.swing.action:
// DelegateAction, ActionManager
public class CancelAction extends DelegateAction
{
public CancelAction()
{
this(VALUE_SMALL_ICON);
}
public CancelAction(String iconPath)
{
super("Cancel", ActionManager.getIcon(iconPath));
putValue("ActionCommandKey", "cancel-command");
putValue("ShortDescription", "Cancels the action");
putValue("LongDescription", "Cancels the action");
putValue("MnemonicKey", VALUE_MNEMONIC);
putValue("AcceleratorKey", VALUE_ACCELERATOR);
}
public static final String VALUE_COMMAND = "cancel-command";
public static final String VALUE_NAME = "Cancel";
public static final String VALUE_SMALL_ICON = null;
public static final String VALUE_LARGE_ICON = null;
public static final Integer VALUE_MNEMONIC = new Integer(67);
public static final KeyStroke VALUE_ACCELERATOR = null;
public static final String VALUE_SHORT_DESCRIPTION = "Cancels the action";
public static final String VALUE_LONG_DESCRIPTION = "Cancels the action";
}

View file

@ -0,0 +1,65 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.AbstractAction;
import javax.swing.Icon;
public abstract class DelegateAction extends AbstractAction
{
public DelegateAction(String name, Icon icon)
{
super(name, icon);
}
public void addActionListener(ActionListener listener)
{
this.listener = listener;
}
public void removeActionListener(ActionListener listener)
{
this.listener = null;
}
public ActionListener[] getActionListeners()
{
return (new ActionListener[] {
listener
});
}
public void actionPerformed(ActionEvent evt)
{
if(listener != null)
listener.actionPerformed(evt);
}
private ActionListener listener;
}

View file

@ -0,0 +1,55 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import javax.swing.KeyStroke;
// Referenced classes of package com.sun.java.swing.action:
// DelegateAction, ActionManager
public class ExitAction extends DelegateAction
{
public ExitAction()
{
super("Exit", ActionManager.getIcon(VALUE_SMALL_ICON));
putValue("ActionCommandKey", "exit-command");
putValue("ShortDescription", "Exits the application");
putValue("LongDescription", "Exits the application");
putValue("MnemonicKey", VALUE_MNEMONIC);
putValue("AcceleratorKey", VALUE_ACCELERATOR);
}
public static final String VALUE_COMMAND = "exit-command";
public static final String VALUE_NAME = "Exit";
public static final String VALUE_SMALL_ICON = null;
public static final String VALUE_LARGE_ICON = null;
public static final Integer VALUE_MNEMONIC = new Integer(88);
public static final KeyStroke VALUE_ACCELERATOR = null;
public static final String VALUE_SHORT_DESCRIPTION = "Exits the application";
public static final String VALUE_LONG_DESCRIPTION = "Exits the application";
}

View file

@ -0,0 +1,53 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
public class FileMenu extends AbstractAction
{
public FileMenu()
{
super("File");
putValue("ActionCommandKey", "file-menu-command");
putValue("ShortDescription", "File operations");
putValue("LongDescription", "File operations");
putValue("MnemonicKey", VALUE_MNEMONIC);
}
public void actionPerformed(ActionEvent actionevent)
{
}
public static final String VALUE_COMMAND = "file-menu-command";
public static final String VALUE_NAME = "File";
public static final Integer VALUE_MNEMONIC = new Integer(70);
public static final String VALUE_SHORT_DESCRIPTION = "File operations";
public static final String VALUE_LONG_DESCRIPTION = "File operations";
}

View file

@ -0,0 +1,60 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import javax.swing.KeyStroke;
// Referenced classes of package com.sun.java.swing.action:
// DelegateAction, ActionManager
public class FinishAction extends DelegateAction
{
public FinishAction()
{
this(VALUE_SMALL_ICON);
}
public FinishAction(String iconPath)
{
super("Finish", ActionManager.getIcon(iconPath));
putValue("ActionCommandKey", "finish-command");
putValue("ShortDescription", "Finish the activity");
putValue("LongDescription", "Finish the activity");
putValue("MnemonicKey", VALUE_MNEMONIC);
putValue("AcceleratorKey", VALUE_ACCELERATOR);
}
public static final String VALUE_COMMAND = "finish-command";
public static final String VALUE_NAME = "Finish";
public static final String VALUE_SMALL_ICON = null;
public static final String VALUE_LARGE_ICON = null;
public static final Integer VALUE_MNEMONIC = new Integer(70);
public static final KeyStroke VALUE_ACCELERATOR = null;
public static final String VALUE_SHORT_DESCRIPTION = "Finish the activity";
public static final String VALUE_LONG_DESCRIPTION = "Finish the activity";
}

View file

@ -0,0 +1,60 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import javax.swing.KeyStroke;
// Referenced classes of package com.sun.java.swing.action:
// DelegateAction, ActionManager
public class HelpAction extends DelegateAction
{
public HelpAction()
{
this("general/Help16.gif");
}
public HelpAction(String iconPath)
{
super("Help", ActionManager.getIcon(iconPath));
putValue("ActionCommandKey", "help-command");
putValue("ShortDescription", "Help...");
putValue("LongDescription", "Provide information which may aid the user.");
putValue("MnemonicKey", VALUE_MNEMONIC);
putValue("AcceleratorKey", VALUE_ACCELERATOR);
}
public static final String VALUE_COMMAND = "help-command";
public static final String VALUE_NAME = "Help";
public static final String VALUE_SMALL_ICON = "general/Help16.gif";
public static final String VALUE_LARGE_ICON = "general/Help24.gif";
public static final Integer VALUE_MNEMONIC = new Integer(72);
public static final KeyStroke VALUE_ACCELERATOR = KeyStroke.getKeyStroke(112, 0);
public static final String VALUE_SHORT_DESCRIPTION = "Help...";
public static final String VALUE_LONG_DESCRIPTION = "Provide information which may aid the user.";
}

View file

@ -0,0 +1,53 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
public class HelpMenu extends AbstractAction
{
public HelpMenu()
{
super("Help");
putValue("ActionCommandKey", "help-menu-command");
putValue("ShortDescription", "Help operations");
putValue("LongDescription", "Help operations");
putValue("MnemonicKey", VALUE_MNEMONIC);
}
public void actionPerformed(ActionEvent actionevent)
{
}
public static final String VALUE_COMMAND = "help-menu-command";
public static final String VALUE_NAME = "Help";
public static final Integer VALUE_MNEMONIC = new Integer(72);
public static final String VALUE_SHORT_DESCRIPTION = "Help operations";
public static final String VALUE_LONG_DESCRIPTION = "Help operations";
}

View file

@ -0,0 +1,60 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import javax.swing.KeyStroke;
// Referenced classes of package com.sun.java.swing.action:
// DelegateAction, ActionManager
public class NewAction extends DelegateAction
{
public NewAction()
{
this("general/New16.gif");
}
public NewAction(String iconPath)
{
super("New", ActionManager.getIcon(iconPath));
putValue("ActionCommandKey", "new-command");
putValue("ShortDescription", "Create a new object.");
putValue("LongDescription", "Create a new object.");
putValue("MnemonicKey", VALUE_MNEMONIC);
putValue("AcceleratorKey", VALUE_ACCELERATOR);
}
public static final String VALUE_COMMAND = "new-command";
public static final String VALUE_NAME = "New";
public static final String VALUE_SMALL_ICON = "general/New16.gif";
public static final String VALUE_LARGE_ICON = "general/New24.gif";
public static final Integer VALUE_MNEMONIC = new Integer(78);
public static final KeyStroke VALUE_ACCELERATOR = KeyStroke.getKeyStroke(78, 2);
public static final String VALUE_SHORT_DESCRIPTION = "Create a new object.";
public static final String VALUE_LONG_DESCRIPTION = "Create a new object.";
}

View file

@ -0,0 +1,60 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import javax.swing.KeyStroke;
// Referenced classes of package com.sun.java.swing.action:
// DelegateAction, ActionManager
public class NextAction extends DelegateAction
{
public NextAction()
{
this(VALUE_SMALL_ICON);
}
public NextAction(String iconPath)
{
super("Next >", ActionManager.getIcon(iconPath));
putValue("ActionCommandKey", "next-command");
putValue("ShortDescription", "Select next item");
putValue("LongDescription", "Select next item");
putValue("MnemonicKey", VALUE_MNEMONIC);
putValue("AcceleratorKey", VALUE_ACCELERATOR);
}
public static final String VALUE_COMMAND = "next-command";
public static final String VALUE_NAME = "Next >";
public static final String VALUE_SMALL_ICON = null;
public static final String VALUE_LARGE_ICON = null;
public static final Integer VALUE_MNEMONIC = new Integer(78);
public static final KeyStroke VALUE_ACCELERATOR = null;
public static final String VALUE_SHORT_DESCRIPTION = "Select next item";
public static final String VALUE_LONG_DESCRIPTION = "Select next item";
}

View file

@ -0,0 +1,60 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import javax.swing.KeyStroke;
// Referenced classes of package com.sun.java.swing.action:
// DelegateAction, ActionManager
public class OkAction extends DelegateAction
{
public OkAction()
{
this(VALUE_SMALL_ICON);
}
public OkAction(String iconPath)
{
super("OK", ActionManager.getIcon(iconPath));
putValue("ActionCommandKey", "ok-command");
putValue("ShortDescription", "Acknowleges the action");
putValue("LongDescription", "Acknowleges the action");
putValue("MnemonicKey", VALUE_MNEMONIC);
putValue("AcceleratorKey", VALUE_ACCELERATOR);
}
public static final String VALUE_COMMAND = "ok-command";
public static final String VALUE_NAME = "OK";
public static final String VALUE_SMALL_ICON = null;
public static final String VALUE_LARGE_ICON = null;
public static final Integer VALUE_MNEMONIC = new Integer(79);
public static final KeyStroke VALUE_ACCELERATOR = null;
public static final String VALUE_SHORT_DESCRIPTION = "Acknowleges the action";
public static final String VALUE_LONG_DESCRIPTION = "Acknowleges the action";
}

View file

@ -0,0 +1,60 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import javax.swing.KeyStroke;
// Referenced classes of package com.sun.java.swing.action:
// DelegateAction, ActionManager
public class OpenAction extends DelegateAction
{
public OpenAction()
{
this("general/Open16.gif");
}
public OpenAction(String iconPath)
{
super("Open...", ActionManager.getIcon(iconPath));
putValue("ActionCommandKey", "open-command");
putValue("ShortDescription", "Open the specified object.");
putValue("LongDescription", "Open the specified object.");
putValue("MnemonicKey", VALUE_MNEMONIC);
putValue("AcceleratorKey", VALUE_ACCELERATOR);
}
public static final String VALUE_COMMAND = "open-command";
public static final String VALUE_NAME = "Open...";
public static final String VALUE_SMALL_ICON = "general/Open16.gif";
public static final String VALUE_LARGE_ICON = "general/Open24.gif";
public static final Integer VALUE_MNEMONIC = new Integer(79);
public static final KeyStroke VALUE_ACCELERATOR = KeyStroke.getKeyStroke(79, 2);
public static final String VALUE_SHORT_DESCRIPTION = "Open the specified object.";
public static final String VALUE_LONG_DESCRIPTION = "Open the specified object.";
}

View file

@ -0,0 +1,60 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import javax.swing.KeyStroke;
// Referenced classes of package com.sun.java.swing.action:
// DelegateAction, ActionManager
public class SaveAction extends DelegateAction
{
public SaveAction()
{
this("general/Save16.gif");
}
public SaveAction(String iconPath)
{
super("Save", ActionManager.getIcon(iconPath));
putValue("ActionCommandKey", "save-command");
putValue("ShortDescription", "Commit changes to a permanent storage area");
putValue("LongDescription", "Commit changes to a permanent storage area");
putValue("MnemonicKey", VALUE_MNEMONIC);
putValue("AcceleratorKey", VALUE_ACCELERATOR);
}
public static final String VALUE_COMMAND = "save-command";
public static final String VALUE_NAME = "Save";
public static final String VALUE_SMALL_ICON = "general/Save16.gif";
public static final String VALUE_LARGE_ICON = "general/Save24.gif";
public static final Integer VALUE_MNEMONIC = new Integer(83);
public static final KeyStroke VALUE_ACCELERATOR = KeyStroke.getKeyStroke(83, 2);
public static final String VALUE_SHORT_DESCRIPTION = "Commit changes to a permanent storage area";
public static final String VALUE_LONG_DESCRIPTION = "Commit changes to a permanent storage area";
}

View file

@ -0,0 +1,57 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
// Referenced classes of package com.sun.java.swing.action:
// DelegateAction, ActionManager
public class SaveAsAction extends DelegateAction
{
public SaveAsAction()
{
this("general/SaveAs16.gif");
}
public SaveAsAction(String iconPath)
{
super("Save As", ActionManager.getIcon(iconPath));
putValue("ActionCommandKey", "save-as-command");
putValue("ShortDescription", "Save as a new file");
putValue("LongDescription", "Saves the current object as another object");
putValue("MnemonicKey", VALUE_MNEMONIC);
}
public static final String VALUE_COMMAND = "save-as-command";
public static final String VALUE_NAME = "Save As";
public static final String VALUE_SMALL_ICON = "general/SaveAs16.gif";
public static final String VALUE_LARGE_ICON = "general/SaveAs24.gif";
public static final Integer VALUE_MNEMONIC = new Integer(65);
public static final String VALUE_SHORT_DESCRIPTION = "Save as a new file";
public static final String VALUE_LONG_DESCRIPTION = "Saves the current object as another object";
}

View file

@ -0,0 +1,88 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.Icon;
// Referenced classes of package com.sun.java.swing.action:
// DelegateAction
public abstract class StateChangeAction extends DelegateAction
implements ItemListener
{
public StateChangeAction(String name)
{
super(name, null);
selected = false;
}
public StateChangeAction(String name, Icon icon)
{
super(name, icon);
selected = false;
}
public boolean isSelected()
{
return selected;
}
public synchronized void setSelected(boolean newValue)
{
boolean oldValue = selected;
if(oldValue != newValue)
{
selected = newValue;
firePropertyChange("selected", Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
}
}
public void setItemListener(ItemListener listener)
{
this.listener = listener;
}
public ItemListener getItemListener()
{
return listener;
}
public void itemStateChanged(ItemEvent evt)
{
if(evt.getStateChange() == 1)
setSelected(true);
else
setSelected(false);
if(listener != null)
listener.itemStateChanged(evt);
}
protected boolean selected;
private ItemListener listener;
}

View file

@ -0,0 +1,53 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.action;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
public class ViewMenu extends AbstractAction
{
public ViewMenu()
{
super("View");
putValue("ActionCommandKey", "view-menu-command");
putValue("ShortDescription", "View operations");
putValue("LongDescription", "View operations");
putValue("MnemonicKey", VALUE_MNEMONIC);
}
public void actionPerformed(ActionEvent actionevent)
{
}
public static final String VALUE_COMMAND = "view-menu-command";
public static final String VALUE_NAME = "View";
public static final Integer VALUE_MNEMONIC = new Integer(86);
public static final String VALUE_SHORT_DESCRIPTION = "View operations";
public static final String VALUE_LONG_DESCRIPTION = "View operations";
}

View file

@ -0,0 +1,108 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.ui;
import com.sun.java.swing.action.ActionManager;
import com.sun.java.swing.action.StateChangeAction;
import javax.swing.*;
// Referenced classes of package com.sun.java.swing.ui:
// ToggleActionPropertyChangeListener, StatusBar
public abstract class CommonMenuBar extends JMenuBar
{
protected CommonMenuBar(ActionManager manager)
{
this(manager, StatusBar.getInstance());
}
protected CommonMenuBar(ActionManager manager, StatusBar status)
{
this.manager = manager;
statusBar = status;
configureMenu();
}
protected abstract void configureMenu();
protected void configureToggleMenuItem(JMenuItem menuItem, Action action)
{
configureMenuItem(menuItem, action);
action.addPropertyChangeListener(new ToggleActionPropertyChangeListener(menuItem));
}
protected void configureMenuItem(JMenuItem menuItem, Action action)
{
menuItem.addMouseListener(statusBar);
}
protected JMenu createMenu(String name, char mnemonic)
{
JMenu menu = new JMenu(name);
menu.setMnemonic(mnemonic);
return menu;
}
protected void addMenuItem(JMenu menu, Action action)
{
JMenuItem menuItem = menu.add(action);
configureMenuItem(menuItem, action);
}
protected void addCheckBoxMenuItem(JMenu menu, StateChangeAction a)
{
addCheckBoxMenuItem(menu, a, false);
}
protected void addCheckBoxMenuItem(JMenu menu, StateChangeAction a, boolean selected)
{
JCheckBoxMenuItem mi = new JCheckBoxMenuItem(a);
mi.addItemListener(a);
mi.setSelected(selected);
menu.add(mi);
configureToggleMenuItem(mi, a);
}
protected void addRadioButtonMenuItem(JMenu menu, ButtonGroup group, StateChangeAction a)
{
addRadioButtonMenuItem(menu, group, a, false);
}
protected void addRadioButtonMenuItem(JMenu menu, ButtonGroup group, StateChangeAction a, boolean selected)
{
JRadioButtonMenuItem mi = new JRadioButtonMenuItem(a);
mi.addItemListener(a);
mi.setSelected(selected);
menu.add(mi);
if(group != null)
group.add(mi);
configureToggleMenuItem(mi, a);
}
protected ActionManager manager;
private StatusBar statusBar;
}

View file

@ -0,0 +1,95 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.ui;
import com.sun.java.swing.action.ActionManager;
import com.sun.java.swing.action.StateChangeAction;
import java.awt.Dimension;
import java.awt.Insets;
import javax.swing.*;
// Referenced classes of package com.sun.java.swing.ui:
// ToggleActionPropertyChangeListener, StatusBar, CommonUI
public abstract class CommonToolBar extends JToolBar
{
protected CommonToolBar(ActionManager manager)
{
this(manager, StatusBar.getInstance());
}
protected CommonToolBar(ActionManager manager, StatusBar status)
{
this.manager = manager;
statusBar = status;
buttonSize = new Dimension(CommonUI.buttconPrefSize);
buttonInsets = new Insets(0, 0, 0, 0);
addComponents();
}
protected abstract void addComponents();
protected void addButton(Action action)
{
javax.swing.JButton button = add(action);
configureButton(button, action);
}
protected void addToggleButton(StateChangeAction a)
{
addToggleButton(a, null);
}
protected void addToggleButton(StateChangeAction a, ButtonGroup group)
{
JToggleButton button = new JToggleButton(a);
button.addItemListener(a);
button.setSelected(a.isSelected());
if(group != null)
group.add(button);
add(button);
configureToggleButton(button, a);
}
protected void configureToggleButton(JToggleButton button, Action action)
{
configureButton(button, action);
action.addPropertyChangeListener(new ToggleActionPropertyChangeListener(button));
}
protected void configureButton(AbstractButton button, Action action)
{
button.setToolTipText((String)action.getValue("Name"));
button.setText("");
button.addMouseListener(statusBar);
}
protected ActionManager manager;
private Dimension buttonSize;
private Insets buttonInsets;
private StatusBar statusBar;
}

View file

@ -0,0 +1,392 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.ui;
import java.awt.*;
import java.awt.event.ActionListener;
import java.awt.event.KeyListener;
import java.util.StringTokenizer;
import java.util.Vector;
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.text.*;
public class CommonUI
{
private static class NumberDocument extends PlainDocument
{
public void insertString(int offs, String str, AttributeSet atts)
throws BadLocationException
{
if(!Character.isDigit(str.charAt(0)))
{
return;
} else
{
super.insertString(offs, str, atts);
return;
}
}
private NumberDocument()
{
}
}
public CommonUI()
{
}
public static JLabel createLabel(String text, int mnemonic, Component comp)
{
JLabel label = new JLabel(" " + text);
label.setMinimumSize(labelPrefSize);
if(mnemonic != -1)
label.setDisplayedMnemonic(mnemonic);
if(comp != null)
label.setLabelFor(comp);
if(text.length() == 0)
label.setPreferredSize(labelPrefSize);
return label;
}
public static JLabel createLabel(String text)
{
return createLabel(text, -1, null);
}
public static JTextField createTextField(String text, KeyListener listener, boolean numbers)
{
JTextField field = new JTextField(text);
field.setMinimumSize(textPrefSize);
if(text.length() == 0)
field.setPreferredSize(textPrefSize);
if(listener != null)
field.addKeyListener(listener);
if(numbers)
field.setDocument(new NumberDocument());
return field;
}
public static JTextField createTextField(String text, boolean numbers)
{
return createTextField(text, null, numbers);
}
public static JTextField createTextField(String text, KeyListener listener)
{
return createTextField(text, listener, false);
}
public static JTextField createTextField(String text)
{
return createTextField(text, null, false);
}
public static JRadioButton createRadioButton(String text, int mnemonic, ActionListener listener, boolean selected)
{
JRadioButton button = new JRadioButton(text);
button.setMnemonic(mnemonic);
button.setSelected(selected);
button.setMinimumSize(labelPrefSize);
if(listener != null)
button.addActionListener(listener);
if(text.length() == 0)
button.setPreferredSize(labelPrefSize);
return button;
}
public static JRadioButton createRadioButton(String text, int mnemonic, boolean selected)
{
return createRadioButton(text, mnemonic, null, selected);
}
public static JRadioButton createRadioButton(String text, int mnemonic, ActionListener listener)
{
return createRadioButton(text, mnemonic, listener, false);
}
public static JRadioButton createRadioButton(String text, int mnemonic)
{
return createRadioButton(text, mnemonic, null, false);
}
public static JRadioButton createRadioButton(String text)
{
return createRadioButton(text, -1, null, false);
}
public static JCheckBox createCheckBox(String text, int mnemonic, ActionListener listener, boolean selected)
{
JCheckBox checkbox = new JCheckBox(text);
checkbox.setMinimumSize(labelPrefSize);
if(mnemonic != -1)
checkbox.setMnemonic(mnemonic);
checkbox.setSelected(selected);
if(text.length() == 0)
checkbox.setPreferredSize(labelPrefSize);
if(listener != null)
checkbox.addActionListener(listener);
return checkbox;
}
public static JCheckBox createCheckBox(String text, int mnemonic, ActionListener listener)
{
return createCheckBox(text, mnemonic, listener, false);
}
public static JCheckBox createCheckBox(String text, int mnemonic, boolean selected)
{
return createCheckBox(text, mnemonic, null, selected);
}
public static JCheckBox createCheckBox(String text, int mnemonic)
{
return createCheckBox(text, mnemonic, null, false);
}
public static JCheckBox createCheckBox(String text)
{
return createCheckBox(text, -1, null, false);
}
public static JComboBox createComboBox(Object items[], ActionListener listener, boolean editable)
{
JComboBox comboBox = new JComboBox(items);
if(listener != null)
comboBox.addActionListener(listener);
comboBox.setEditable(editable);
return comboBox;
}
public static JComboBox createComboBox(Object items[], boolean editable)
{
return createComboBox(items, null, editable);
}
public static JComboBox createComboBox(Vector items, ActionListener listener, boolean editable)
{
JComboBox comboBox = new JComboBox(items);
if(listener != null)
comboBox.addActionListener(listener);
comboBox.setEditable(editable);
return comboBox;
}
public static JComboBox createComboBox(Vector items, boolean editable)
{
return createComboBox(items, null, editable);
}
public static JButton createButton(Action action)
{
JButton button = new JButton(action);
setButtonSize(button, buttonPrefSize);
return button;
}
public static JButton createButton(String text, ActionListener listener, int mnemonic)
{
JButton button = new JButton(text);
if(listener != null)
button.addActionListener(listener);
if(mnemonic != -1)
button.setMnemonic(mnemonic);
setButtonSize(button, buttonPrefSize);
return button;
}
private static void setButtonSize(JButton button, Dimension size)
{
String text = button.getText();
button.setMinimumSize(size);
if(text.length() == 0)
{
button.setPreferredSize(size);
} else
{
Dimension psize = button.getPreferredSize();
if(psize.width < size.width)
button.setPreferredSize(size);
}
}
public static JButton createButton(String text, ActionListener listener)
{
return createButton(text, listener, -1);
}
public static JButton createSmallButton(String text, ActionListener listener, int mnemonic)
{
JButton button = createButton(text, listener, mnemonic);
setButtonSize(button, smbuttonPrefSize);
return button;
}
public static JButton createSmallButton(String text, ActionListener listener)
{
return createSmallButton(text, listener, -1);
}
public static Border createBorder(String text)
{
Border border = BorderFactory.createEtchedBorder();
return BorderFactory.createTitledBorder(border, text, 0, 2);
}
public static Border createBorder()
{
return BorderFactory.createEmptyBorder(4, 4, 4, 4);
}
public static JScrollPane createListPane(JList list, String text)
{
JScrollPane pane = new JScrollPane(list);
pane.setBorder(BorderFactory.createCompoundBorder(createBorder(text), BorderFactory.createLoweredBevelBorder()));
return pane;
}
public static void centerComponent(Component source, Component parent)
{
Dimension dim = source.getSize();
Rectangle rect;
if(parent != null)
{
rect = parent.getBounds();
} else
{
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
rect = new Rectangle(0, 0, d.width, d.height);
}
int x = rect.x + (rect.width - dim.width) / 2;
int y = rect.y + (rect.height - dim.height) / 2;
source.setLocation(x, y);
}
public static void centerComponent(Component source)
{
centerComponent(source, null);
}
public static JFrame getParentFrame(Component source)
{
Container parent;
for(parent = source.getParent(); parent != null; parent = parent.getParent())
if(parent instanceof JFrame)
break;
if(parent == null)
return null;
else
return (JFrame)parent;
}
public static Integer msToSec(Integer ms)
{
int value = ms.intValue();
value /= 1000;
return new Integer(value);
}
public static Integer secToMs(Integer sec)
{
int value = sec.intValue();
value *= 1000;
return new Integer(value);
}
public static String stringFromStringArray(String strings[], String delim)
{
String string = "";
String separator;
if(delim == null || delim.equals(""))
separator = " ";
else
separator = delim;
for(int i = 0; i < strings.length; i++)
{
string = string + strings[i];
string = string + separator;
}
return string;
}
public static String stringFromStringArray(String strings[])
{
return stringFromStringArray(strings, "");
}
public static String[] stringArrayFromString(String string, String delim)
{
StringTokenizer st;
if(delim == null || delim.equals(""))
st = new StringTokenizer(string);
else
st = new StringTokenizer(string, delim);
int numTokens = st.countTokens();
String strings[] = new String[numTokens];
int index = 0;
while(st.hasMoreTokens())
strings[index++] = st.nextToken();
return strings;
}
public static String[] stringArrayFromString(String string)
{
return stringArrayFromString(string, "");
}
public static void setWaitCursor(Component comp)
{
comp.setCursor(Cursor.getPredefinedCursor(3));
}
public static void setDefaultCursor(Component comp)
{
comp.setCursor(Cursor.getPredefinedCursor(0));
}
public static final int BUTTON_WIDTH = 100;
public static final int BUTTON_HEIGHT = 26;
public static final int BUTTCON_WIDTH = 28;
public static final int BUTTCON_HEIGHT = 28;
public static final int SM_BUTTON_WIDTH = 72;
public static final int SM_BUTTON_HEIGHT = 26;
public static final int LABEL_WIDTH = 100;
public static final int LABEL_HEIGHT = 20;
public static final int TEXT_WIDTH = 150;
public static final int TEXT_HEIGHT = 20;
public static Dimension buttonPrefSize = new Dimension(100, 26);
public static Dimension buttconPrefSize = new Dimension(28, 28);
public static Dimension smbuttonPrefSize = new Dimension(72, 26);
public static Dimension labelPrefSize = new Dimension(100, 20);
public static Dimension textPrefSize = new Dimension(150, 20);
}

View file

@ -0,0 +1,51 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.ui;
import com.sun.java.swing.action.*;
import java.awt.event.ActionListener;
import javax.swing.JPanel;
// Referenced classes of package com.sun.java.swing.ui:
// CommonUI
public class OkCancelButtonPanel extends JPanel
{
public OkCancelButtonPanel(ActionListener listener)
{
DelegateAction okAction = new OkAction();
okAction.addActionListener(listener);
DelegateAction cancelAction = new CancelAction();
cancelAction.addActionListener(listener);
add(CommonUI.createButton(okAction));
add(CommonUI.createButton(cancelAction));
}
public static final String OK_COMMAND = "ok-command";
public static final String CANCEL_COMMAND = "cancel-command";
}

View file

@ -0,0 +1,82 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.ui;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JDialog;
import javax.swing.JPanel;
// Referenced classes of package com.sun.java.swing.ui:
// OkCancelButtonPanel, CommonUI
public class OkCancelDialog extends JDialog
implements ActionListener
{
public OkCancelDialog(String title, JPanel panel)
{
this(title, panel, true);
}
public OkCancelDialog(String title, JPanel panel, boolean modal)
{
setTitle(title);
setModal(modal);
Container pane = getContentPane();
pane.setLayout(new BorderLayout());
pane.add(panel, "Center");
pane.add(new OkCancelButtonPanel(this), "South");
pack();
CommonUI.centerComponent(this);
}
public boolean isOk()
{
return okPressed;
}
public void actionPerformed(ActionEvent evt)
{
String command = evt.getActionCommand();
if(command.equals("ok-command"))
{
okPressed = true;
setVisible(false);
dispose();
} else
if(command.equals("cancel-command"))
{
okPressed = false;
setVisible(false);
dispose();
}
}
private boolean okPressed;
}

View file

@ -0,0 +1,85 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.ui;
import java.awt.*;
import javax.swing.ImageIcon;
public class SplashScreen extends Window
{
public SplashScreen(Frame f)
{
super(f);
setBackground(Color.white);
java.net.URL url = getClass().getResource("/images/SplashScreen.jpg");
if(url != null)
{
screen = new ImageIcon(url);
MediaTracker mt = new MediaTracker(this);
mt.addImage(screen.getImage(), 0);
try
{
mt.waitForAll();
}
catch(Exception ex) { }
}
}
public void setVisible(boolean val)
{
if(screen == null)
return;
if(val)
{
setSize(screen.getIconWidth(), screen.getIconHeight());
setLocation(-500, -500);
super.setVisible(true);
Dimension d = getToolkit().getScreenSize();
Insets i = getInsets();
int w = screen.getIconWidth() + i.left + i.right;
int h = screen.getIconHeight() + i.top + i.bottom;
setSize(w, h);
setLocation(d.width / 2 - w / 2, d.height / 2 - h / 2);
} else
{
super.setVisible(false);
}
}
public void paint(Graphics g)
{
if(screen != null)
{
Dimension d = getSize();
g.setColor(Color.black);
g.drawRect(0, 0, d.width - 1, d.height - 1);
g.drawImage(screen.getImage(), 1, 1, this);
}
}
private ImageIcon screen;
}

View file

@ -0,0 +1,178 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.ui;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class StatusBar extends JPanel
implements ActionListener, MouseListener
{
public StatusBar()
{
setLayout(new FlowLayout(0));
setBorder(BorderFactory.createEtchedBorder());
progressBar = new JProgressBar(0, 0, 100);
progressBar.setPreferredSize(new Dimension(60, progressBar.getPreferredSize().height + 2));
progressBar.setVisible(false);
label = new JLabel(" ");
preferredSize = new Dimension(getWidth(label.getText()), 2 * getFontHeight());
add(progressBar);
add(label);
}
public static StatusBar getInstance()
{
if(statusBar == null)
statusBar = new StatusBar();
return statusBar;
}
public static void setInstance(StatusBar sb)
{
statusBar = sb;
}
protected int getWidth(String s)
{
FontMetrics fm = getFontMetrics(getFont());
if(fm == null)
return 0;
else
return fm.stringWidth(s);
}
protected int getFontHeight()
{
FontMetrics fm = getFontMetrics(getFont());
if(fm == null)
return 0;
else
return fm.getHeight();
}
public Dimension getPreferredSize()
{
return preferredSize;
}
public void setMessage(String message)
{
label.setText(message);
label.repaint();
}
public void startBusyBar()
{
forward = true;
if(timer == null)
{
setMessage("");
progressBar.setVisible(true);
timer = new Timer(15, this);
timer.start();
}
}
public void stopBusyBar()
{
if(timer != null)
{
timer.stop();
timer = null;
}
setMessage("");
progressBar.setVisible(false);
progressBar.setValue(0);
}
public void actionPerformed(ActionEvent evt)
{
int value = progressBar.getValue();
if(forward)
{
if(value < 100)
{
progressBar.setValue(value + 1);
} else
{
forward = false;
progressBar.setValue(value - 1);
}
} else
if(value > 0)
{
progressBar.setValue(value - 1);
} else
{
forward = true;
progressBar.setValue(value + 1);
}
}
public void mouseClicked(MouseEvent mouseevent)
{
}
public void mousePressed(MouseEvent mouseevent)
{
}
public void mouseReleased(MouseEvent mouseevent)
{
}
public void mouseExited(MouseEvent evt)
{
setMessage("");
}
public void mouseEntered(MouseEvent evt)
{
if(evt.getSource() instanceof AbstractButton)
{
AbstractButton button = (AbstractButton)evt.getSource();
Action action = button.getAction();
if(action != null)
{
String message = (String)action.getValue("LongDescription");
setMessage(message);
}
}
}
private static final int PROGRESS_MAX = 100;
private static final int PROGRESS_MIN = 0;
private JLabel label;
private Dimension preferredSize;
private JProgressBar progressBar;
private Timer timer;
private boolean forward;
private static StatusBar statusBar;
}

View file

@ -0,0 +1,221 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.ui;
import com.sun.java.swing.action.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Vector;
import javax.swing.*;
// Referenced classes of package com.sun.java.swing.ui:
// CommonUI
public class TabsDlg extends JDialog
{
private class ApplyListener
implements ActionListener
{
public void actionPerformed(ActionEvent evt)
{
if(applyListener != null)
{
applyListener.actionPerformed(evt);
enableApplyButton(false);
}
}
private ApplyListener()
{
}
}
private class CancelListener
implements ActionListener
{
public void actionPerformed(ActionEvent evt)
{
if(cancelListener != null)
cancelListener.actionPerformed(evt);
setVisible(false);
}
private CancelListener()
{
}
}
private class OkListener
implements ActionListener
{
public void actionPerformed(ActionEvent evt)
{
if(okListener != null)
okListener.actionPerformed(evt);
setVisible(false);
}
private OkListener()
{
}
}
public TabsDlg(String title, Vector panels)
{
super(new JFrame(), title, true);
okListener = null;
cancelListener = null;
applyListener = null;
Container pane = getContentPane();
pane.setLayout(new BorderLayout());
tabsPanel = new JTabbedPane();
int numPanels = panels.size();
for(int i = 0; i < numPanels; i++)
{
JPanel panel = (JPanel)panels.elementAt(i);
tabsPanel.addTab(panel.getName(), panel);
}
pane.add(tabsPanel, "Center");
pane.add(createButtonPanel(), "South");
pack();
CommonUI.centerComponent(this);
}
public static void main(String args[])
{
JPanel p1 = new JPanel();
p1.add(new JButton("One"));
p1.setName("One");
JPanel p2 = new JPanel();
p2.add(new JButton("Two"));
p2.setName("Two");
JPanel p3 = new JPanel();
p3.add(new JButton("Three"));
p3.setName("Three");
JPanel p4 = new JPanel();
p4.add(new JButton("Four"));
p4.setName("Four");
Vector panels = new Vector();
panels.addElement(p1);
panels.addElement(p2);
panels.addElement(p3);
panels.addElement(p4);
tabsDlg = new TabsDlg("Test Dialog", panels);
tabsDlg.addOkListener(new ActionListener() {
public void actionPerformed(ActionEvent evt)
{
System.exit(0);
}
}
);
tabsDlg.addCancelListener(new ActionListener() {
public void actionPerformed(ActionEvent evt)
{
System.exit(0);
}
}
);
tabsDlg.setVisible(true);
}
private JPanel createButtonPanel()
{
JPanel panel = new JPanel();
okAction = new OkAction();
cancelAction = new CancelAction();
applyAction = new ApplyAction();
okAction.addActionListener(new OkListener());
cancelAction.addActionListener(new CancelListener());
applyAction.addActionListener(new ApplyListener());
panel.add(CommonUI.createButton(okAction));
panel.add(CommonUI.createButton(cancelAction));
panel.add(CommonUI.createButton(applyAction));
JPanel p2 = new JPanel(new BorderLayout());
p2.add(panel, "Center");
p2.add(new JSeparator(), "North");
return p2;
}
public void enableApplyButton(boolean enabled)
{
applyAction.setEnabled(enabled);
}
public synchronized void addOkListener(ActionListener l)
{
okListener = AWTEventMulticaster.add(okListener, l);
}
public synchronized void removeOkListener(ActionListener l)
{
okListener = AWTEventMulticaster.remove(okListener, l);
}
public synchronized void addCancelListener(ActionListener l)
{
cancelListener = AWTEventMulticaster.add(cancelListener, l);
}
public synchronized void removeCancelListener(ActionListener l)
{
cancelListener = AWTEventMulticaster.remove(cancelListener, l);
}
public synchronized void addApplyListener(ActionListener l)
{
applyListener = AWTEventMulticaster.add(applyListener, l);
}
public synchronized void removeApplyListener(ActionListener l)
{
applyListener = AWTEventMulticaster.remove(applyListener, l);
}
private JTabbedPane tabsPanel;
private DelegateAction okAction;
private DelegateAction cancelAction;
private DelegateAction applyAction;
private ActionListener okListener;
private ActionListener cancelListener;
private ActionListener applyListener;
private static TabsDlg tabsDlg;
}

View file

@ -0,0 +1,52 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.ui;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.AbstractButton;
public class ToggleActionPropertyChangeListener
implements PropertyChangeListener
{
public ToggleActionPropertyChangeListener(AbstractButton button)
{
this.button = button;
}
public void propertyChange(PropertyChangeEvent evt)
{
String propertyName = evt.getPropertyName();
if(propertyName.equals("selected"))
{
Boolean selected = (Boolean)evt.getNewValue();
button.setSelected(selected.booleanValue());
}
}
private AbstractButton button;
}

View file

@ -0,0 +1,336 @@
/*
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
package com.sun.java.swing.ui;
import com.sun.java.swing.action.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Vector;
import javax.swing.*;
// Referenced classes of package com.sun.java.swing.ui:
// CommonUI
public class WizardDlg extends JDialog
{
private class CancelListener
implements ActionListener
{
public void actionPerformed(ActionEvent evt)
{
if(cancelListener != null)
cancelListener.actionPerformed(evt);
setVisible(false);
}
private CancelListener()
{
}
}
private class FinishListener
implements ActionListener
{
public void actionPerformed(ActionEvent evt)
{
if(finishListener != null)
finishListener.actionPerformed(evt);
setVisible(false);
}
private FinishListener()
{
}
}
private class NextListener
implements ActionListener
{
public void actionPerformed(ActionEvent evt)
{
cardShowing++;
if(cardShowing > numCards)
cardShowing = numCards;
else
panesLayout.next(panesPanel);
if(nextListener != null)
nextListener.actionPerformed(evt);
enableBackNextButtons();
}
private NextListener()
{
}
}
private class BackListener
implements ActionListener
{
public void actionPerformed(ActionEvent evt)
{
cardShowing--;
if(cardShowing < 1)
cardShowing = 1;
else
panesLayout.previous(panesPanel);
if(backListener != null)
backListener.actionPerformed(evt);
enableBackNextButtons();
}
private BackListener()
{
}
}
public WizardDlg(JFrame frame, String title, Vector panels, Vector images)
{
super(frame, title, true);
this.title = title;
this.images = images;
Container pane = getContentPane();
pane.setLayout(new BorderLayout());
panesLayout = new CardLayout();
panesPanel = new JPanel(panesLayout);
pane.add(panesPanel, "Center");
pane.add(createButtonPanel(), "South");
setPanels(panels);
pack();
CommonUI.centerComponent(this);
}
public WizardDlg(JFrame frame, String title, Vector panels)
{
this(frame, title, panels, null);
}
public WizardDlg(String title, Vector panels)
{
this(new JFrame(), title, panels, null);
}
public void setPanels(Vector panels)
{
numCards = panels.size();
cardShowing = 1;
this.panels = panels;
panesPanel.removeAll();
for(int i = 0; i < numCards; i++)
panesPanel.add((JPanel)panels.elementAt(i), (new Integer(i)).toString());
validate();
enableBackNextButtons();
}
public void reset()
{
cardShowing = 1;
panesLayout.first(panesPanel);
enableBackNextButtons();
}
public void setWestPanel(JPanel panel)
{
Container pane = getContentPane();
pane.add(panel, "West");
}
public static void main(String args[])
{
JPanel p1 = new JPanel();
p1.add(new JButton("One"));
JPanel p2 = new JPanel();
p2.add(new JButton("Two"));
JPanel p3 = new JPanel();
p3.add(new JButton("Three"));
JPanel p4 = new JPanel();
p4.add(new JButton("Four"));
Vector panels = new Vector();
panels.addElement(p1);
panels.addElement(p2);
panels.addElement(p3);
panels.addElement(p4);
wizardDlg = new WizardDlg("Test Dialog", panels);
wizardDlg.addFinishListener(new ActionListener() {
public void actionPerformed(ActionEvent evt)
{
System.exit(0);
}
}
);
wizardDlg.addCancelListener(new ActionListener() {
public void actionPerformed(ActionEvent evt)
{
System.exit(0);
}
}
);
wizardDlg.setVisible(true);
}
private JPanel createButtonPanel()
{
JPanel panel = new JPanel();
backAction = new BackAction();
nextAction = new NextAction();
finishAction = new FinishAction();
cancelAction = new CancelAction();
backAction.setEnabled(false);
finishAction.setEnabled(false);
backAction.addActionListener(new BackListener());
nextAction.addActionListener(new NextListener());
finishAction.addActionListener(new FinishListener());
cancelAction.addActionListener(new CancelListener());
panel.add(CommonUI.createButton(backAction));
panel.add(CommonUI.createButton(nextAction));
panel.add(CommonUI.createButton(finishAction));
panel.add(CommonUI.createButton(cancelAction));
JPanel p2 = new JPanel(new BorderLayout());
p2.add(panel, "Center");
p2.add(new JSeparator(), "North");
return p2;
}
private void enableBackNextButtons()
{
if(cardShowing == 1)
{
backAction.setEnabled(false);
finishAction.setEnabled(false);
if(numCards > 1)
{
nextAction.setEnabled(true);
} else
{
finishAction.setEnabled(true);
nextAction.setEnabled(false);
}
} else
if(cardShowing == numCards)
{
nextAction.setEnabled(false);
finishAction.setEnabled(true);
if(numCards > 1)
backAction.setEnabled(true);
else
backAction.setEnabled(false);
} else
{
backAction.setEnabled(true);
nextAction.setEnabled(true);
finishAction.setEnabled(false);
}
setTitle();
}
private void setTitle()
{
JPanel panel = (JPanel)panels.elementAt(cardShowing - 1);
String newTitle = title;
String panelTitle = panel.getName();
if(panelTitle != null && panelTitle.equals(""))
{
newTitle = newTitle + " - ";
newTitle = newTitle + panelTitle;
}
super.setTitle(newTitle);
}
public synchronized void addFinishListener(ActionListener l)
{
finishListener = AWTEventMulticaster.add(finishListener, l);
}
public synchronized void removeFinishListener(ActionListener l)
{
finishListener = AWTEventMulticaster.remove(finishListener, l);
}
public synchronized void addCancelListener(ActionListener l)
{
cancelListener = AWTEventMulticaster.add(cancelListener, l);
}
public synchronized void removeCancelListener(ActionListener l)
{
cancelListener = AWTEventMulticaster.remove(cancelListener, l);
}
public synchronized void addNextListener(ActionListener l)
{
nextListener = AWTEventMulticaster.add(nextListener, l);
}
public synchronized void removeNextListener(ActionListener l)
{
nextListener = AWTEventMulticaster.remove(nextListener, l);
}
public synchronized void addBackListener(ActionListener l)
{
backListener = AWTEventMulticaster.add(backListener, l);
}
public synchronized void removeBackListener(ActionListener l)
{
backListener = AWTEventMulticaster.remove(backListener, l);
}
private CardLayout panesLayout;
private JPanel panesPanel;
private DelegateAction backAction;
private DelegateAction nextAction;
private DelegateAction finishAction;
private DelegateAction cancelAction;
private ActionListener finishListener;
private ActionListener cancelListener;
private ActionListener nextListener;
private ActionListener backListener;
private int numCards;
private int cardShowing;
private String title;
private Vector panels;
private Vector images;
private static WizardDlg wizardDlg;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 677 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

View file

@ -193,8 +193,12 @@ public class HeapSummary extends Tool {
private static final double FACTOR = 1024*1024; private static final double FACTOR = 1024*1024;
private void printValMB(String title, long value) { private void printValMB(String title, long value) {
double mb = value / FACTOR; if (value < 0) {
System.out.println(alignment + title + value + " (" + mb + "MB)"); System.out.println(alignment + title + (value >>> 20) + " MB");
} else {
double mb = value/FACTOR;
System.out.println(alignment + title + value + " (" + mb + "MB)");
}
} }
private void printValue(String title, long value) { private void printValue(String title, long value) {

View file

@ -266,46 +266,52 @@ public class PermStat extends Tool {
out.println(); out.println();
} }
private static long objectSize(Oop oop) {
return oop == null ? 0L : oop.getObjectSize();
}
// Don't count the shared empty arrays
private static long arraySize(Array arr) {
return arr.getLength() != 0L ? arr.getObjectSize() : 0L;
}
private long computeSize(InstanceKlass k) { private long computeSize(InstanceKlass k) {
long size = 0L; long size = 0L;
// InstanceKlass object size // the InstanceKlass object itself
size += k.getObjectSize(); size += k.getObjectSize();
// add ConstantPool size // Constant pool
size += k.getConstants().getObjectSize(); ConstantPool cp = k.getConstants();
size += cp.getObjectSize();
size += objectSize(cp.getCache());
size += objectSize(cp.getTags());
// add ConstantPoolCache, if any // Interfaces
ConstantPoolCache cpCache = k.getConstants().getCache(); size += arraySize(k.getLocalInterfaces());
if (cpCache != null) { size += arraySize(k.getTransitiveInterfaces());
size += cpCache.getObjectSize();
}
// add interfaces size // Inner classes
ObjArray interfaces = k.getLocalInterfaces(); size += objectSize(k.getInnerClasses());
size += (interfaces.getLength() != 0L)? interfaces.getObjectSize() : 0L;
ObjArray transitiveInterfaces = k.getTransitiveInterfaces();
size += (transitiveInterfaces.getLength() != 0L)? transitiveInterfaces.getObjectSize() : 0L;
// add inner classes size // Fields
TypeArray innerClasses = k.getInnerClasses(); size += objectSize(k.getFields());
size += innerClasses.getObjectSize();
// add fields size // Methods
size += k.getFields().getObjectSize();
// add methods size
ObjArray methods = k.getMethods(); ObjArray methods = k.getMethods();
size += (methods.getLength() != 0L)? methods.getObjectSize() : 0L; int nmethods = (int) methods.getLength();
TypeArray methodOrdering = k.getMethodOrdering(); if (nmethods != 0L) {
size += (methodOrdering.getLength() != 0L)? methodOrdering.getObjectSize() : 0; size += methods.getObjectSize();
for (int i = 0; i < nmethods; ++i) {
// add each method's size Method m = (Method) methods.getObjAt(i);
int numMethods = (int) methods.getLength(); size += m.getObjectSize();
for (int i = 0; i < numMethods; i++) { size += objectSize(m.getConstMethod());
Method m = (Method) methods.getObjAt(i); }
size += m.getObjectSize();
} }
// MethodOrdering - an int array that records the original
// ordering of methods in the class file
size += arraySize(k.getMethodOrdering());
return size; return size;
} }
} }

Some files were not shown because too many files have changed in this diff Show more