mirror of git://gcc.gnu.org/git/gcc.git
Imported GNU Classpath 0.90
Imported GNU Classpath 0.90
* scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore.
* gnu/classpath/jdwp/VMFrame.java (SIZE): New constant.
* java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5.
* java/lang/Math.java: New override file.
* java/lang/Character.java: Merged from Classpath.
(start, end): Now 'int's.
(canonicalName): New field.
(CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
(UnicodeBlock): Added argument.
(of): New overload.
(forName): New method.
Updated unicode blocks.
(sets): Updated.
* sources.am: Regenerated.
* Makefile.in: Likewise.
From-SVN: r111942
This commit is contained in:
parent
27079765d0
commit
8aa540d2f7
|
|
@ -1,3 +1,22 @@
|
||||||
|
2006-03-09 Mark Wielaard <mark@klomp.org>
|
||||||
|
|
||||||
|
Imported GNU Classpath 0.90
|
||||||
|
* scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore.
|
||||||
|
* gnu/classpath/jdwp/VMFrame.java (SIZE): New constant.
|
||||||
|
* java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5.
|
||||||
|
* java/lang/Math.java: New override file.
|
||||||
|
* java/lang/Character.java: Merged from Classpath.
|
||||||
|
(start, end): Now 'int's.
|
||||||
|
(canonicalName): New field.
|
||||||
|
(CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
|
||||||
|
(UnicodeBlock): Added argument.
|
||||||
|
(of): New overload.
|
||||||
|
(forName): New method.
|
||||||
|
Updated unicode blocks.
|
||||||
|
(sets): Updated.
|
||||||
|
* sources.am: Regenerated.
|
||||||
|
* Makefile.in: Likewise.
|
||||||
|
|
||||||
2006-03-09 Tom Tromey <tromey@redhat.com>
|
2006-03-09 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
PR libgcj/23495:
|
PR libgcj/23495:
|
||||||
|
|
|
||||||
1286
libjava/Makefile.in
1286
libjava/Makefile.in
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry excluding=".externalToolBuilders/|.settings/|ChangeLog*|Makefile*|autom4te.cache/|compat/|config*|doc/|examples/|external/|gnu/javax/swing/plaf/|include/|install/|lib/|m4/|native/|resource/|scripts/|test/|testsuite/|vm/reference/" kind="src" path=""/>
|
<classpathentry excluding=".externalToolBuilders/|.settings/|ChangeLog*|Makefile*|autom4te.cache/|compat/|config*|doc/|examples/|external/|gnu/javax/swing/plaf/|include/|install/|lib/|m4/|native/|resource/|scripts/|test/|testsuite/|vm/reference/|tools/|external/relaxngDatatype/" kind="src" path=""/>
|
||||||
|
<classpathentry kind="src" path="external/relaxngDatatype"/>
|
||||||
|
<classpathentry kind="src" path="tools"/>
|
||||||
<classpathentry kind="src" path="resource"/>
|
<classpathentry kind="src" path="resource"/>
|
||||||
<classpathentry kind="src" path="vm/reference"/>
|
<classpathentry kind="src" path="vm/reference"/>
|
||||||
<classpathentry kind="src" path="external/sax"/>
|
<classpathentry kind="src" path="external/sax"/>
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,11 @@
|
||||||
</dictionary>
|
</dictionary>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
||||||
<triggers>auto,full,incremental,</triggers>
|
<triggers>auto,full,incremental,</triggers>
|
||||||
|
|
@ -55,11 +60,6 @@
|
||||||
</dictionary>
|
</dictionary>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
||||||
<triggers>auto,full,incremental,</triggers>
|
<triggers>auto,full,incremental,</triggers>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#Tue Sep 13 16:15:04 MDT 2005
|
#Tue Feb 07 05:21:36 EST 2006
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
|
||||||
|
|
@ -72,14 +72,15 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_e
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=18
|
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=18
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=82
|
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=82
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=18
|
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=18
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18
|
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18
|
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
|
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=17
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=17
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||||
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||||
|
|
@ -111,7 +112,7 @@ org.eclipse.jdt.core.formatter.comment.format_source_code=true
|
||||||
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
|
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
|
||||||
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
|
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
|
||||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
|
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
|
||||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
|
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
|
||||||
org.eclipse.jdt.core.formatter.comment.line_length=80
|
org.eclipse.jdt.core.formatter.comment.line_length=80
|
||||||
org.eclipse.jdt.core.formatter.compact_else_if=true
|
org.eclipse.jdt.core.formatter.compact_else_if=true
|
||||||
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
||||||
|
|
@ -128,7 +129,7 @@ org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
|
||||||
org.eclipse.jdt.core.formatter.indentation.size=4
|
org.eclipse.jdt.core.formatter.indentation.size=4
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
|
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
|
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
|
||||||
|
|
@ -198,7 +199,7 @@ org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=insert
|
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||||
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||||
|
|
@ -302,3 +303,4 @@ org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||||
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
||||||
org.eclipse.jdt.core.formatter.tabulation.char=space
|
org.eclipse.jdt.core.formatter.tabulation.char=space
|
||||||
org.eclipse.jdt.core.formatter.tabulation.size=2
|
org.eclipse.jdt.core.formatter.tabulation.size=2
|
||||||
|
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ Anthony Green (green@redhat.com)
|
||||||
Jochen Hoenicke (Jochen.Hoenicke@Informatik.Uni-Oldenburg.de)
|
Jochen Hoenicke (Jochen.Hoenicke@Informatik.Uni-Oldenburg.de)
|
||||||
Kazumitsu Ito (kaz@maczuka.gcd.org)
|
Kazumitsu Ito (kaz@maczuka.gcd.org)
|
||||||
Andrew John Hughes (gnu_andrew@member.fsf.org)
|
Andrew John Hughes (gnu_andrew@member.fsf.org)
|
||||||
|
Olivier Jolly (olivier.jolly@pcedev.com)
|
||||||
Brian Jones (cbj@gnu.org)
|
Brian Jones (cbj@gnu.org)
|
||||||
Roman Kennke (roman@kennke.org)
|
Roman Kennke (roman@kennke.org)
|
||||||
Michael Koch (konqueror@gmx.de)
|
Michael Koch (konqueror@gmx.de)
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -298,3 +298,51 @@ terms:
|
||||||
for any purpose is hereby granted without fee, provided that the
|
for any purpose is hereby granted without fee, provided that the
|
||||||
above copyright notice and this permission notice are included in
|
above copyright notice and this permission notice are included in
|
||||||
all copies or substantial portions of the software.
|
all copies or substantial portions of the software.
|
||||||
|
|
||||||
|
|
||||||
|
Directory external/relaxngDatatype
|
||||||
|
RELAX NG Pluggable Datatype Libraries. All files are distributed under
|
||||||
|
the following notice:
|
||||||
|
|
||||||
|
Copyright (c) 2001, Thai Open Source Software Center Ltd, Sun
|
||||||
|
Microsystems. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or
|
||||||
|
without
|
||||||
|
modification, are permitted provided that the following
|
||||||
|
conditions are met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above
|
||||||
|
copyright
|
||||||
|
notice, this list of conditions and the following
|
||||||
|
disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials
|
||||||
|
provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
Neither the names of the copyright holders nor the names of
|
||||||
|
its
|
||||||
|
contributors may be used to endorse or promote products
|
||||||
|
derived
|
||||||
|
from this software without specific prior written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||||
|
CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
|
||||||
|
NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||||
|
SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||||
|
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
|
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
## Input file for automake to generate the Makefile.in used by configure
|
## Input file for automake to generate the Makefile.in used by configure
|
||||||
|
|
||||||
# lib first, to compile .class files before native code, last examples
|
# lib first, to compile .class files before native code, last examples
|
||||||
SUBDIRS = lib doc external include native resource scripts $(EXAMPLESDIR)
|
SUBDIRS = lib doc external include native resource scripts tools $(EXAMPLESDIR)
|
||||||
DIST_SUBDIRS = lib doc external include native resource scripts examples
|
DIST_SUBDIRS = lib doc external include native resource scripts tools examples
|
||||||
|
|
||||||
## GCJ LOCAL: we need an extra -I here.
|
## GCJ LOCAL: we need an extra -I here.
|
||||||
ACLOCAL_AMFLAGS = -I m4 -I ../.. -I ../../config
|
ACLOCAL_AMFLAGS = -I m4 -I ../.. -I ../../config
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CLASSPATH_INCLUDES = @CLASSPATH_INCLUDES@
|
CLASSPATH_INCLUDES = @CLASSPATH_INCLUDES@
|
||||||
CLASSPATH_MODULE = @CLASSPATH_MODULE@
|
CLASSPATH_MODULE = @CLASSPATH_MODULE@
|
||||||
|
COLLECTIONS_PREFIX = @COLLECTIONS_PREFIX@
|
||||||
CP = @CP@
|
CP = @CP@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
|
@ -103,6 +104,8 @@ CREATE_ALSA_LIBRARIES_FALSE = @CREATE_ALSA_LIBRARIES_FALSE@
|
||||||
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
|
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
|
||||||
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
|
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
|
||||||
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
|
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
|
||||||
|
CREATE_COLLECTIONS_FALSE = @CREATE_COLLECTIONS_FALSE@
|
||||||
|
CREATE_COLLECTIONS_TRUE = @CREATE_COLLECTIONS_TRUE@
|
||||||
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
|
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
|
||||||
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
|
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
|
||||||
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
|
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
|
||||||
|
|
@ -133,6 +136,7 @@ EGREP = @EGREP@
|
||||||
ERROR_CFLAGS = @ERROR_CFLAGS@
|
ERROR_CFLAGS = @ERROR_CFLAGS@
|
||||||
EXAMPLESDIR = @EXAMPLESDIR@
|
EXAMPLESDIR = @EXAMPLESDIR@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
FASTJAR = @FASTJAR@
|
||||||
FIND = @FIND@
|
FIND = @FIND@
|
||||||
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
|
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
|
||||||
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
|
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
|
||||||
|
|
@ -144,6 +148,8 @@ FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
|
||||||
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
|
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
|
||||||
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
|
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
|
||||||
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
|
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
|
||||||
|
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
|
||||||
|
FREETYPE2_LIBS = @FREETYPE2_LIBS@
|
||||||
GCJ = @GCJ@
|
GCJ = @GCJ@
|
||||||
GCJX = @GCJX@
|
GCJX = @GCJX@
|
||||||
GJDOC = @GJDOC@
|
GJDOC = @GJDOC@
|
||||||
|
|
@ -194,6 +200,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
||||||
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PERL = @PERL@
|
||||||
PKG_CONFIG = @PKG_CONFIG@
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
QT_CFLAGS = @QT_CFLAGS@
|
QT_CFLAGS = @QT_CFLAGS@
|
||||||
QT_LIBS = @QT_LIBS@
|
QT_LIBS = @QT_LIBS@
|
||||||
|
|
@ -273,8 +280,8 @@ target_vendor = @target_vendor@
|
||||||
vm_classes = @vm_classes@
|
vm_classes = @vm_classes@
|
||||||
|
|
||||||
# lib first, to compile .class files before native code, last examples
|
# lib first, to compile .class files before native code, last examples
|
||||||
SUBDIRS = lib doc external include native resource scripts $(EXAMPLESDIR)
|
SUBDIRS = lib doc external include native resource scripts tools $(EXAMPLESDIR)
|
||||||
DIST_SUBDIRS = lib doc external include native resource scripts examples
|
DIST_SUBDIRS = lib doc external include native resource scripts tools examples
|
||||||
ACLOCAL_AMFLAGS = -I m4 -I ../.. -I ../../config
|
ACLOCAL_AMFLAGS = -I m4 -I ../.. -I ../../config
|
||||||
EXTRA_DIST = HACKING BUGS THANKYOU mauve-classpath LICENSE \
|
EXTRA_DIST = HACKING BUGS THANKYOU mauve-classpath LICENSE \
|
||||||
ChangeLog-2003 ChangeLog-2004 ChangeLog-2005 \
|
ChangeLog-2003 ChangeLog-2004 ChangeLog-2005 \
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,74 @@
|
||||||
|
New in release 0.90 (March 6, 2006)
|
||||||
|
|
||||||
|
* Free Swing improvements: JTable columns are rearrangeable and
|
||||||
|
resizeable with mouse. Painting and scrolling are now much
|
||||||
|
faster. Plain text components now support highlighting and
|
||||||
|
copy+paste to the system clipboard. Support for styled text has been
|
||||||
|
improved, including some very basic HTML support. JFileChooser is
|
||||||
|
now usable. Global event dispatching has been implemented. Memory
|
||||||
|
consumption of Swing components has been reduced. Lots of general
|
||||||
|
bugfixes. Added new system property to turn off Graphics2D use in
|
||||||
|
Swing, even if Graphics2D is available: gnu.javax.swing.noGraphics2D
|
||||||
|
|
||||||
|
* AWT. Improved support for mixing "lightweight" and "heavyweight"
|
||||||
|
Components in Containers. Better support for dynamically updated
|
||||||
|
menus. Better 1.0 event model support for Scrollbars. Better class
|
||||||
|
documentation of gtk+ awt peers.
|
||||||
|
|
||||||
|
* GNU Crypto and Jessie have been merged into GNU Classpath; this
|
||||||
|
provides Classpath with a wide array of cryptographic algorithms
|
||||||
|
(ciphers, message digests, etc.) and implementations of SSL version
|
||||||
|
3 and TLS version 1. These roughly complement the public
|
||||||
|
`java.security.' `javax.crypto,' and `javax.net.ssl' packages, and
|
||||||
|
are service providers implementing the underlying algorithms.
|
||||||
|
|
||||||
|
* Updated HTTP and FTP URLConnection protocol handlers. HTTPS support
|
||||||
|
out of the box.
|
||||||
|
|
||||||
|
* Unicode 4.0.0 is supported. Character now includes support for using
|
||||||
|
ether a char or an int to identify code points.
|
||||||
|
|
||||||
|
* More correct handling of Object methods and serialization support
|
||||||
|
for Proxy and abstract classes.
|
||||||
|
|
||||||
|
* The new folder tools includes GIOP and RMI stub and tie source code
|
||||||
|
generators, IOR parser and both transient and persistent GIOP naming
|
||||||
|
services.
|
||||||
|
|
||||||
|
* Added experimental support for dynamic creation of the RMI stubs
|
||||||
|
using proxy classes. The rmic compiler is no longer required (unless
|
||||||
|
for research and specific stubs).
|
||||||
|
|
||||||
|
* XML validaton support for RELAX NG and W3C XML schema namespace
|
||||||
|
URIs. RELAX NG pluggable XML schema datatype library API and an
|
||||||
|
implementation for XML Schema Datatypes
|
||||||
|
(http://www.w3.org/TR/xmlschema-2/).
|
||||||
|
|
||||||
|
* Updated StAX implementaton to be compatible with final JSWDP 2.0.
|
||||||
|
|
||||||
|
* The default back end for java.util.prefs has been changed. The new
|
||||||
|
default is capable of saving and restoring preferences to and from
|
||||||
|
the file system.
|
||||||
|
|
||||||
|
* javax.imageio.plugins.bmp implementation.
|
||||||
|
|
||||||
|
* Added --enable-collections configure option which builds
|
||||||
|
"collections.jar", a 1.1 VM compatibility jar.
|
||||||
|
|
||||||
|
* gnu.regexp updated from GNU/Posix syntax to support util.regex
|
||||||
|
syntax including various Unicode blocks, categories and properties.
|
||||||
|
|
||||||
|
Runtime interface changes:
|
||||||
|
|
||||||
|
* A new class, VMMath, is now available which separates the native
|
||||||
|
mathematical functions from java.lang.Math. The previous fdlibm
|
||||||
|
implementation now forms the reference material for this class.
|
||||||
|
|
||||||
|
* Updated VMObjectInputStream class to return Thread context class
|
||||||
|
loader if no other class loader is found.
|
||||||
|
|
||||||
|
* Updated documentation on InstrumentationImpl in vmintegration guide.
|
||||||
|
|
||||||
New in release 0.20 (Jan 13, 2006)
|
New in release 0.20 (Jan 13, 2006)
|
||||||
|
|
||||||
* New StAX pull parser and SAX-over-StAX driver. Lots of DOM, SAX/StAX,
|
* New StAX pull parser and SAX-over-StAX driver. Lots of DOM, SAX/StAX,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.59 for GNU Classpath 0.20.
|
# Generated by GNU Autoconf 2.59 for GNU Classpath 0.90.
|
||||||
#
|
#
|
||||||
# Report bugs to <classpath@gnu.org>.
|
# Report bugs to <classpath@gnu.org>.
|
||||||
#
|
#
|
||||||
|
|
@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='GNU Classpath'
|
PACKAGE_NAME='GNU Classpath'
|
||||||
PACKAGE_TARNAME='classpath'
|
PACKAGE_TARNAME='classpath'
|
||||||
PACKAGE_VERSION='0.20'
|
PACKAGE_VERSION='0.90'
|
||||||
PACKAGE_STRING='GNU Classpath 0.20'
|
PACKAGE_STRING='GNU Classpath 0.90'
|
||||||
PACKAGE_BUGREPORT='classpath@gnu.org'
|
PACKAGE_BUGREPORT='classpath@gnu.org'
|
||||||
|
|
||||||
ac_unique_file="java/lang/System.java"
|
ac_unique_file="java/lang/System.java"
|
||||||
|
|
@ -312,7 +312,7 @@ ac_includes_default="\
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif"
|
#endif"
|
||||||
|
|
||||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os LIBVERSION CLASSPATH_MODULE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CREATE_JNI_LIBRARIES_TRUE CREATE_JNI_LIBRARIES_FALSE CREATE_CORE_JNI_LIBRARIES_TRUE CREATE_CORE_JNI_LIBRARIES_FALSE default_toolkit CREATE_XMLJ_LIBRARY_TRUE CREATE_XMLJ_LIBRARY_FALSE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP CREATE_ALSA_LIBRARIES_TRUE CREATE_ALSA_LIBRARIES_FALSE CREATE_DSSI_LIBRARIES_TRUE CREATE_DSSI_LIBRARIES_FALSE CREATE_GTK_PEER_LIBRARIES_TRUE CREATE_GTK_PEER_LIBRARIES_FALSE GTK_CAIRO_ENABLED GTK_CAIRO_TRUE GTK_CAIRO_FALSE CREATE_QT_PEER_LIBRARIES_TRUE CREATE_QT_PEER_LIBRARIES_FALSE nativelibdir glibjdir CREATE_JNI_HEADERS_TRUE CREATE_JNI_HEADERS_FALSE LN_S RANLIB ac_ct_RANLIB LIBTOOL CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP LIBICONV LTLIBICONV WARNING_CFLAGS STRICT_WARNING_CFLAGS ERROR_CFLAGS PKG_CONFIG XML_CFLAGS XML_LIBS XSLT_CFLAGS XSLT_LIBS X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS GTK_CFLAGS GTK_LIBS CAIRO_CFLAGS CAIRO_LIBS PANGOFT2_CFLAGS PANGOFT2_LIBS QT_CFLAGS QT_LIBS MOC USER_JAVAH USER_SPECIFIED_JAVAH_TRUE USER_SPECIFIED_JAVAH_FALSE CLASSPATH_INCLUDES GCJ JIKES JIKESENCODING JIKESWARNINGS KJC GCJX ECJ FOUND_GCJ_TRUE FOUND_GCJ_FALSE FOUND_JIKES_TRUE FOUND_JIKES_FALSE FOUND_ECJ_TRUE FOUND_ECJ_FALSE FOUND_KJC_TRUE FOUND_KJC_FALSE FOUND_GCJX_TRUE FOUND_GCJX_FALSE USER_CLASSLIB USER_SPECIFIED_CLASSLIB_TRUE USER_SPECIFIED_CLASSLIB_FALSE vm_classes MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBDEBUG INIT_LOAD_LIBRARY JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION REMOVE MKDIR CP DATE FIND ZIP INSTALL_GLIBJ_ZIP_TRUE INSTALL_GLIBJ_ZIP_FALSE INSTALL_CLASS_FILES_TRUE INSTALL_CLASS_FILES_FALSE BUILD_CLASS_FILES_TRUE BUILD_CLASS_FILES_FALSE EXAMPLESDIR GJDOC CREATE_API_DOCS_TRUE CREATE_API_DOCS_FALSE JAY JAY_SKELETON REGEN_PARSERS_TRUE REGEN_PARSERS_FALSE LIBOBJS LTLIBOBJS'
|
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os LIBVERSION CLASSPATH_MODULE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CREATE_COLLECTIONS_TRUE CREATE_COLLECTIONS_FALSE CREATE_JNI_LIBRARIES_TRUE CREATE_JNI_LIBRARIES_FALSE CREATE_CORE_JNI_LIBRARIES_TRUE CREATE_CORE_JNI_LIBRARIES_FALSE default_toolkit CREATE_XMLJ_LIBRARY_TRUE CREATE_XMLJ_LIBRARY_FALSE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP CREATE_ALSA_LIBRARIES_TRUE CREATE_ALSA_LIBRARIES_FALSE CREATE_DSSI_LIBRARIES_TRUE CREATE_DSSI_LIBRARIES_FALSE CREATE_GTK_PEER_LIBRARIES_TRUE CREATE_GTK_PEER_LIBRARIES_FALSE GTK_CAIRO_ENABLED GTK_CAIRO_TRUE GTK_CAIRO_FALSE CREATE_QT_PEER_LIBRARIES_TRUE CREATE_QT_PEER_LIBRARIES_FALSE nativelibdir glibjdir CREATE_JNI_HEADERS_TRUE CREATE_JNI_HEADERS_FALSE LN_S RANLIB ac_ct_RANLIB LIBTOOL CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP PERL COLLECTIONS_PREFIX LIBICONV LTLIBICONV WARNING_CFLAGS STRICT_WARNING_CFLAGS ERROR_CFLAGS PKG_CONFIG XML_CFLAGS XML_LIBS XSLT_CFLAGS XSLT_LIBS X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS GTK_CFLAGS GTK_LIBS CAIRO_CFLAGS CAIRO_LIBS FREETYPE2_CFLAGS FREETYPE2_LIBS PANGOFT2_CFLAGS PANGOFT2_LIBS QT_CFLAGS QT_LIBS MOC USER_JAVAH USER_SPECIFIED_JAVAH_TRUE USER_SPECIFIED_JAVAH_FALSE CLASSPATH_INCLUDES GCJ JIKES JIKESENCODING JIKESWARNINGS KJC GCJX ECJ FOUND_GCJ_TRUE FOUND_GCJ_FALSE FOUND_JIKES_TRUE FOUND_JIKES_FALSE FOUND_ECJ_TRUE FOUND_ECJ_FALSE FOUND_KJC_TRUE FOUND_KJC_FALSE FOUND_GCJX_TRUE FOUND_GCJX_FALSE USER_CLASSLIB USER_SPECIFIED_CLASSLIB_TRUE USER_SPECIFIED_CLASSLIB_FALSE vm_classes MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBDEBUG INIT_LOAD_LIBRARY JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION REMOVE MKDIR CP DATE FIND ZIP FASTJAR INSTALL_GLIBJ_ZIP_TRUE INSTALL_GLIBJ_ZIP_FALSE INSTALL_CLASS_FILES_TRUE INSTALL_CLASS_FILES_FALSE BUILD_CLASS_FILES_TRUE BUILD_CLASS_FILES_FALSE EXAMPLESDIR GJDOC CREATE_API_DOCS_TRUE CREATE_API_DOCS_FALSE JAY JAY_SKELETON REGEN_PARSERS_TRUE REGEN_PARSERS_FALSE LIBOBJS LTLIBOBJS'
|
||||||
ac_subst_files=''
|
ac_subst_files=''
|
||||||
|
|
||||||
# Initialize some variables set by options.
|
# Initialize some variables set by options.
|
||||||
|
|
@ -793,7 +793,7 @@ if test "$ac_init_help" = "long"; then
|
||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures GNU Classpath 0.20 to adapt to many kinds of systems.
|
\`configure' configures GNU Classpath 0.90 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
|
|
@ -864,13 +864,14 @@ fi
|
||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of GNU Classpath 0.20:";;
|
short | recursive ) echo "Configuration of GNU Classpath 0.90:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
Optional Features:
|
Optional Features:
|
||||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||||
|
--enable-collections create collections.jar default=no
|
||||||
--enable-jni compile JNI source default=yes
|
--enable-jni compile JNI source default=yes
|
||||||
--enable-core-jni compile JNI sources for core default=yes
|
--enable-core-jni compile JNI sources for core default=yes
|
||||||
--enable-Werror whether to compile C code with -Werror which turns
|
--enable-Werror whether to compile C code with -Werror which turns
|
||||||
|
|
@ -931,6 +932,7 @@ Optional Packages:
|
||||||
--with-ecj bytecode compilation with ecj
|
--with-ecj bytecode compilation with ecj
|
||||||
--with-classpath specify path to a classes.zip like file
|
--with-classpath specify path to a classes.zip like file
|
||||||
--with-vm-classes specify path to VM override source files
|
--with-vm-classes specify path to VM override source files
|
||||||
|
--with-fastjar=PATH define to use a fastjar style tool
|
||||||
--with-glibj define what to install (zip|flat|both|none|build)
|
--with-glibj define what to install (zip|flat|both|none|build)
|
||||||
[default=zip]
|
[default=zip]
|
||||||
--with-gjdoc generate documentation using gjdoc (default is NO)
|
--with-gjdoc generate documentation using gjdoc (default is NO)
|
||||||
|
|
@ -1048,7 +1050,7 @@ fi
|
||||||
test -n "$ac_init_help" && exit 0
|
test -n "$ac_init_help" && exit 0
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
GNU Classpath configure 0.20
|
GNU Classpath configure 0.90
|
||||||
generated by GNU Autoconf 2.59
|
generated by GNU Autoconf 2.59
|
||||||
|
|
||||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||||
|
|
@ -1062,7 +1064,7 @@ cat >&5 <<_ACEOF
|
||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by GNU Classpath $as_me 0.20, which was
|
It was created by GNU Classpath $as_me 0.90, which was
|
||||||
generated by GNU Autoconf 2.59. Invocation command line was
|
generated by GNU Autoconf 2.59. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
|
|
@ -1807,7 +1809,7 @@ fi
|
||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='classpath'
|
PACKAGE='classpath'
|
||||||
VERSION='0.20'
|
VERSION='0.90'
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
|
@ -2022,6 +2024,29 @@ echo "${ECHO_T}$am_cv_prog_tar_ustar" >&6
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --enable-collections or --disable-collections was given.
|
||||||
|
if test "${enable_collections+set}" = set; then
|
||||||
|
enableval="$enable_collections"
|
||||||
|
case x"${enableval}" in
|
||||||
|
xyes) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;;
|
||||||
|
xno) COMPILE_COLLECTIONS=no ;;
|
||||||
|
x) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;;
|
||||||
|
*) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"${enableval}\"" ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
COMPILE_COLLECTIONS=no
|
||||||
|
fi;
|
||||||
|
|
||||||
|
|
||||||
|
if test "x${COMPILE_COLLECTIONS}" = xyes; then
|
||||||
|
CREATE_COLLECTIONS_TRUE=
|
||||||
|
CREATE_COLLECTIONS_FALSE='#'
|
||||||
|
else
|
||||||
|
CREATE_COLLECTIONS_TRUE='#'
|
||||||
|
CREATE_COLLECTIONS_FALSE=
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Check whether --enable-jni or --disable-jni was given.
|
# Check whether --enable-jni or --disable-jni was given.
|
||||||
if test "${enable_jni+set}" = set; then
|
if test "${enable_jni+set}" = set; then
|
||||||
enableval="$enable_jni"
|
enableval="$enable_jni"
|
||||||
|
|
@ -5121,7 +5146,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
|
||||||
case $host in
|
case $host in
|
||||||
*-*-irix6*)
|
*-*-irix6*)
|
||||||
# Find out which ABI we are using.
|
# Find out which ABI we are using.
|
||||||
echo '#line 5124 "configure"' > conftest.$ac_ext
|
echo '#line 5149 "configure"' > conftest.$ac_ext
|
||||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||||
(eval $ac_compile) 2>&5
|
(eval $ac_compile) 2>&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
|
|
@ -7188,6 +7213,54 @@ exec 5>>./config.log
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if test "x${COMPILE_COLLECTIONS}" = xyes; then
|
||||||
|
# Extract the first word of "perl", so it can be a program name with args.
|
||||||
|
set dummy perl; ac_word=$2
|
||||||
|
echo "$as_me:$LINENO: checking for $ac_word" >&5
|
||||||
|
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
|
||||||
|
if test "${ac_cv_path_PERL+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
case $PERL in
|
||||||
|
[\\/]* | ?:[\\/]*)
|
||||||
|
ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||||
|
for as_dir in $PATH
|
||||||
|
do
|
||||||
|
IFS=$as_save_IFS
|
||||||
|
test -z "$as_dir" && as_dir=.
|
||||||
|
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||||
|
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||||
|
ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
|
||||||
|
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
PERL=$ac_cv_path_PERL
|
||||||
|
|
||||||
|
if test -n "$PERL"; then
|
||||||
|
echo "$as_me:$LINENO: result: $PERL" >&5
|
||||||
|
echo "${ECHO_T}$PERL" >&6
|
||||||
|
else
|
||||||
|
echo "$as_me:$LINENO: result: no" >&5
|
||||||
|
echo "${ECHO_T}no" >&6
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ac_config_files="$ac_config_files lib/mkcollections.pl"
|
||||||
|
|
||||||
|
ac_config_commands="$ac_config_commands mkcollections.pl"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
if test "x${COMPILE_JNI}" = xyes; then
|
if test "x${COMPILE_JNI}" = xyes; then
|
||||||
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
|
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
|
||||||
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
|
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
|
||||||
|
|
@ -11371,6 +11444,104 @@ esac
|
||||||
fi
|
fi
|
||||||
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
|
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
|
||||||
|
|
||||||
|
if test -n "$PKG_CONFIG"; then
|
||||||
|
echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
|
||||||
|
echo "${ECHO_T}$PKG_CONFIG" >&6
|
||||||
|
else
|
||||||
|
echo "$as_me:$LINENO: result: no" >&5
|
||||||
|
echo "${ECHO_T}no" >&6
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$PKG_CONFIG" = "no" ; then
|
||||||
|
echo "*** The pkg-config script could not be found. Make sure it is"
|
||||||
|
echo "*** in your path, or set the PKG_CONFIG environment variable"
|
||||||
|
echo "*** to the full path to pkg-config."
|
||||||
|
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
|
||||||
|
else
|
||||||
|
PKG_CONFIG_MIN_VERSION=0.9.0
|
||||||
|
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
|
||||||
|
echo "$as_me:$LINENO: checking for freetype2" >&5
|
||||||
|
echo $ECHO_N "checking for freetype2... $ECHO_C" >&6
|
||||||
|
|
||||||
|
if $PKG_CONFIG --exists "freetype2" ; then
|
||||||
|
echo "$as_me:$LINENO: result: yes" >&5
|
||||||
|
echo "${ECHO_T}yes" >&6
|
||||||
|
succeeded=yes
|
||||||
|
|
||||||
|
echo "$as_me:$LINENO: checking FREETYPE2_CFLAGS" >&5
|
||||||
|
echo $ECHO_N "checking FREETYPE2_CFLAGS... $ECHO_C" >&6
|
||||||
|
FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2"`
|
||||||
|
echo "$as_me:$LINENO: result: $FREETYPE2_CFLAGS" >&5
|
||||||
|
echo "${ECHO_T}$FREETYPE2_CFLAGS" >&6
|
||||||
|
|
||||||
|
echo "$as_me:$LINENO: checking FREETYPE2_LIBS" >&5
|
||||||
|
echo $ECHO_N "checking FREETYPE2_LIBS... $ECHO_C" >&6
|
||||||
|
FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2"`
|
||||||
|
echo "$as_me:$LINENO: result: $FREETYPE2_LIBS" >&5
|
||||||
|
echo "${ECHO_T}$FREETYPE2_LIBS" >&6
|
||||||
|
else
|
||||||
|
FREETYPE2_CFLAGS=""
|
||||||
|
FREETYPE2_LIBS=""
|
||||||
|
## If we have a custom action on failure, don't print errors, but
|
||||||
|
## do set a variable so people can do so.
|
||||||
|
FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
|
||||||
|
echo $FREETYPE2_PKG_ERRORS
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
|
||||||
|
echo "*** See http://www.freedesktop.org/software/pkgconfig"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $succeeded = yes; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
{ { echo "$as_me:$LINENO: error: Library requirements (freetype2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
|
||||||
|
echo "$as_me: error: Library requirements (freetype2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
|
||||||
|
{ (exit 1); exit 1; }; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
succeeded=no
|
||||||
|
|
||||||
|
if test -z "$PKG_CONFIG"; then
|
||||||
|
# Extract the first word of "pkg-config", so it can be a program name with args.
|
||||||
|
set dummy pkg-config; ac_word=$2
|
||||||
|
echo "$as_me:$LINENO: checking for $ac_word" >&5
|
||||||
|
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
|
||||||
|
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
case $PKG_CONFIG in
|
||||||
|
[\\/]* | ?:[\\/]*)
|
||||||
|
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||||
|
for as_dir in $PATH
|
||||||
|
do
|
||||||
|
IFS=$as_save_IFS
|
||||||
|
test -z "$as_dir" && as_dir=.
|
||||||
|
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||||
|
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||||
|
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
|
||||||
|
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
|
||||||
|
|
||||||
if test -n "$PKG_CONFIG"; then
|
if test -n "$PKG_CONFIG"; then
|
||||||
echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
|
echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
|
||||||
echo "${ECHO_T}$PKG_CONFIG" >&6
|
echo "${ECHO_T}$PKG_CONFIG" >&6
|
||||||
|
|
@ -11440,6 +11611,8 @@ echo "$as_me: error: Library requirements (pangoft2) not met; consider adjusting
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x${COMPILE_QT_PEER}" = xyes; then
|
if test "x${COMPILE_QT_PEER}" = xyes; then
|
||||||
|
|
@ -13734,9 +13907,9 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if test "x${GCJ}" = x && test "x${JIKES}" = x && test "x${user_specified_javac}" != xkjc && test "x${user_specified_javac}" != xgcjx; then
|
if test "x${GCJ}" = x && test "x${JIKES}" = x && test "x${user_specified_javac}" != xkjc && test "x${user_specified_javac}" != xgcjx && test "x${user_specified_javac}" != xecj; then
|
||||||
# FIXME: use autoconf error function
|
# FIXME: use autoconf error function
|
||||||
echo "configure: cannot find javac, try --with-gcj, --with-jikes, --with-kjc, or --with-gcjx" 1>&2
|
echo "configure: cannot find javac, try --with-gcj, --with-jikes, --with-kjc, --with-ecj, or --with-gcjx" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -14073,6 +14246,62 @@ echo "${ECHO_T}no" >&6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --with-fastjar or --without-fastjar was given.
|
||||||
|
if test "${with_fastjar+set}" = set; then
|
||||||
|
withval="$with_fastjar"
|
||||||
|
|
||||||
|
echo "$as_me:$LINENO: checking for user supplied fastjar" >&5
|
||||||
|
echo $ECHO_N "checking for user supplied fastjar... $ECHO_C" >&6
|
||||||
|
FASTJAR=${withval}
|
||||||
|
echo "$as_me:$LINENO: result: ${FASTJAR}" >&5
|
||||||
|
echo "${ECHO_T}${FASTJAR}" >&6
|
||||||
|
|
||||||
|
else
|
||||||
|
# Extract the first word of "fastjar", so it can be a program name with args.
|
||||||
|
set dummy fastjar; ac_word=$2
|
||||||
|
echo "$as_me:$LINENO: checking for $ac_word" >&5
|
||||||
|
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
|
||||||
|
if test "${ac_cv_path_FASTJAR+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
case $FASTJAR in
|
||||||
|
[\\/]* | ?:[\\/]*)
|
||||||
|
ac_cv_path_FASTJAR="$FASTJAR" # Let the user override the test with a path.
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||||
|
for as_dir in $PATH
|
||||||
|
do
|
||||||
|
IFS=$as_save_IFS
|
||||||
|
test -z "$as_dir" && as_dir=.
|
||||||
|
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||||
|
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||||
|
ac_cv_path_FASTJAR="$as_dir/$ac_word$ac_exec_ext"
|
||||||
|
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
FASTJAR=$ac_cv_path_FASTJAR
|
||||||
|
|
||||||
|
if test -n "$FASTJAR"; then
|
||||||
|
echo "$as_me:$LINENO: result: $FASTJAR" >&5
|
||||||
|
echo "${ECHO_T}$FASTJAR" >&6
|
||||||
|
else
|
||||||
|
echo "$as_me:$LINENO: result: no" >&5
|
||||||
|
echo "${ECHO_T}no" >&6
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi;
|
||||||
|
if test x"${FASTJAR}" != x; then
|
||||||
|
ZIP=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Check whether --with-glibj or --without-glibj was given.
|
# Check whether --with-glibj or --without-glibj was given.
|
||||||
if test "${with_glibj+set}" = set; then
|
if test "${with_glibj+set}" = set; then
|
||||||
withval="$with_glibj"
|
withval="$with_glibj"
|
||||||
|
|
@ -17194,7 +17423,7 @@ echo "${ECHO_T}make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_re
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ac_config_files="$ac_config_files Makefile doc/Makefile doc/api/Makefile external/Makefile external/sax/Makefile external/w3c_dom/Makefile gnu/classpath/Configuration.java include/Makefile native/Makefile native/fdlibm/Makefile native/jawt/Makefile native/jni/Makefile native/jni/classpath/Makefile native/jni/java-io/Makefile native/jni/java-lang/Makefile native/jni/java-net/Makefile native/jni/java-nio/Makefile native/jni/java-util/Makefile native/jni/gtk-peer/Makefile native/jni/qt-peer/Makefile native/jni/xmlj/Makefile native/jni/midi-alsa/Makefile native/jni/midi-dssi/Makefile native/target/Makefile native/target/Linux/Makefile native/target/generic/Makefile resource/Makefile scripts/Makefile scripts/classpath.spec lib/Makefile lib/gen-classlist.sh lib/copy-vmresources.sh examples/Makefile examples/Makefile.jawt"
|
ac_config_files="$ac_config_files Makefile doc/Makefile doc/api/Makefile external/Makefile external/sax/Makefile external/w3c_dom/Makefile external/relaxngDatatype/Makefile gnu/classpath/Configuration.java include/Makefile native/Makefile native/fdlibm/Makefile native/jawt/Makefile native/jni/Makefile native/jni/classpath/Makefile native/jni/java-io/Makefile native/jni/java-lang/Makefile native/jni/java-net/Makefile native/jni/java-nio/Makefile native/jni/java-util/Makefile native/jni/gtk-peer/Makefile native/jni/qt-peer/Makefile native/jni/xmlj/Makefile native/jni/midi-alsa/Makefile native/jni/midi-dssi/Makefile native/target/Makefile native/target/Linux/Makefile native/target/generic/Makefile resource/Makefile scripts/Makefile scripts/classpath.spec lib/Makefile lib/gen-classlist.sh lib/copy-vmresources.sh tools/Makefile examples/Makefile examples/Makefile.jawt"
|
||||||
|
|
||||||
ac_config_commands="$ac_config_commands gen-classlist"
|
ac_config_commands="$ac_config_commands gen-classlist"
|
||||||
|
|
||||||
|
|
@ -17291,6 +17520,13 @@ LIBOBJS=$ac_libobjs
|
||||||
LTLIBOBJS=$ac_ltlibobjs
|
LTLIBOBJS=$ac_ltlibobjs
|
||||||
|
|
||||||
|
|
||||||
|
if test -z "${CREATE_COLLECTIONS_TRUE}" && test -z "${CREATE_COLLECTIONS_FALSE}"; then
|
||||||
|
{ { echo "$as_me:$LINENO: error: conditional \"CREATE_COLLECTIONS\" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally." >&5
|
||||||
|
echo "$as_me: error: conditional \"CREATE_COLLECTIONS\" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally." >&2;}
|
||||||
|
{ (exit 1); exit 1; }; }
|
||||||
|
fi
|
||||||
if test -z "${CREATE_JNI_LIBRARIES_TRUE}" && test -z "${CREATE_JNI_LIBRARIES_FALSE}"; then
|
if test -z "${CREATE_JNI_LIBRARIES_TRUE}" && test -z "${CREATE_JNI_LIBRARIES_FALSE}"; then
|
||||||
{ { echo "$as_me:$LINENO: error: conditional \"CREATE_JNI_LIBRARIES\" was never defined.
|
{ { echo "$as_me:$LINENO: error: conditional \"CREATE_JNI_LIBRARIES\" was never defined.
|
||||||
Usually this means the macro was only invoked conditionally." >&5
|
Usually this means the macro was only invoked conditionally." >&5
|
||||||
|
|
@ -17765,7 +18001,7 @@ _ASBOX
|
||||||
} >&5
|
} >&5
|
||||||
cat >&5 <<_CSEOF
|
cat >&5 <<_CSEOF
|
||||||
|
|
||||||
This file was extended by GNU Classpath $as_me 0.20, which was
|
This file was extended by GNU Classpath $as_me 0.90, which was
|
||||||
generated by GNU Autoconf 2.59. Invocation command line was
|
generated by GNU Autoconf 2.59. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
|
|
@ -17831,7 +18067,7 @@ _ACEOF
|
||||||
|
|
||||||
cat >>$CONFIG_STATUS <<_ACEOF
|
cat >>$CONFIG_STATUS <<_ACEOF
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
GNU Classpath config.status 0.20
|
GNU Classpath config.status 0.90
|
||||||
configured by $0, generated by GNU Autoconf 2.59,
|
configured by $0, generated by GNU Autoconf 2.59,
|
||||||
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
||||||
|
|
||||||
|
|
@ -17959,12 +18195,14 @@ for ac_config_target in $ac_config_targets
|
||||||
do
|
do
|
||||||
case "$ac_config_target" in
|
case "$ac_config_target" in
|
||||||
# Handling of arguments.
|
# Handling of arguments.
|
||||||
|
"lib/mkcollections.pl" ) CONFIG_FILES="$CONFIG_FILES lib/mkcollections.pl" ;;
|
||||||
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
||||||
"doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
|
"doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
|
||||||
"doc/api/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/api/Makefile" ;;
|
"doc/api/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/api/Makefile" ;;
|
||||||
"external/Makefile" ) CONFIG_FILES="$CONFIG_FILES external/Makefile" ;;
|
"external/Makefile" ) CONFIG_FILES="$CONFIG_FILES external/Makefile" ;;
|
||||||
"external/sax/Makefile" ) CONFIG_FILES="$CONFIG_FILES external/sax/Makefile" ;;
|
"external/sax/Makefile" ) CONFIG_FILES="$CONFIG_FILES external/sax/Makefile" ;;
|
||||||
"external/w3c_dom/Makefile" ) CONFIG_FILES="$CONFIG_FILES external/w3c_dom/Makefile" ;;
|
"external/w3c_dom/Makefile" ) CONFIG_FILES="$CONFIG_FILES external/w3c_dom/Makefile" ;;
|
||||||
|
"external/relaxngDatatype/Makefile" ) CONFIG_FILES="$CONFIG_FILES external/relaxngDatatype/Makefile" ;;
|
||||||
"gnu/classpath/Configuration.java" ) CONFIG_FILES="$CONFIG_FILES gnu/classpath/Configuration.java" ;;
|
"gnu/classpath/Configuration.java" ) CONFIG_FILES="$CONFIG_FILES gnu/classpath/Configuration.java" ;;
|
||||||
"include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
|
"include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
|
||||||
"native/Makefile" ) CONFIG_FILES="$CONFIG_FILES native/Makefile" ;;
|
"native/Makefile" ) CONFIG_FILES="$CONFIG_FILES native/Makefile" ;;
|
||||||
|
|
@ -17991,10 +18229,12 @@ do
|
||||||
"lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
|
"lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
|
||||||
"lib/gen-classlist.sh" ) CONFIG_FILES="$CONFIG_FILES lib/gen-classlist.sh" ;;
|
"lib/gen-classlist.sh" ) CONFIG_FILES="$CONFIG_FILES lib/gen-classlist.sh" ;;
|
||||||
"lib/copy-vmresources.sh" ) CONFIG_FILES="$CONFIG_FILES lib/copy-vmresources.sh" ;;
|
"lib/copy-vmresources.sh" ) CONFIG_FILES="$CONFIG_FILES lib/copy-vmresources.sh" ;;
|
||||||
|
"tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
|
||||||
"examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
|
"examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
|
||||||
"examples/Makefile.jawt" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile.jawt" ;;
|
"examples/Makefile.jawt" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile.jawt" ;;
|
||||||
"$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
|
"$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
|
||||||
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
|
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
|
||||||
|
"mkcollections.pl" ) CONFIG_COMMANDS="$CONFIG_COMMANDS mkcollections.pl" ;;
|
||||||
"$ac_stdint_h" ) CONFIG_COMMANDS="$CONFIG_COMMANDS $ac_stdint_h" ;;
|
"$ac_stdint_h" ) CONFIG_COMMANDS="$CONFIG_COMMANDS $ac_stdint_h" ;;
|
||||||
"gen-classlist" ) CONFIG_COMMANDS="$CONFIG_COMMANDS gen-classlist" ;;
|
"gen-classlist" ) CONFIG_COMMANDS="$CONFIG_COMMANDS gen-classlist" ;;
|
||||||
"copy-vmresources" ) CONFIG_COMMANDS="$CONFIG_COMMANDS copy-vmresources" ;;
|
"copy-vmresources" ) CONFIG_COMMANDS="$CONFIG_COMMANDS copy-vmresources" ;;
|
||||||
|
|
@ -18121,6 +18361,8 @@ s,@am__leading_dot@,$am__leading_dot,;t t
|
||||||
s,@AMTAR@,$AMTAR,;t t
|
s,@AMTAR@,$AMTAR,;t t
|
||||||
s,@am__tar@,$am__tar,;t t
|
s,@am__tar@,$am__tar,;t t
|
||||||
s,@am__untar@,$am__untar,;t t
|
s,@am__untar@,$am__untar,;t t
|
||||||
|
s,@CREATE_COLLECTIONS_TRUE@,$CREATE_COLLECTIONS_TRUE,;t t
|
||||||
|
s,@CREATE_COLLECTIONS_FALSE@,$CREATE_COLLECTIONS_FALSE,;t t
|
||||||
s,@CREATE_JNI_LIBRARIES_TRUE@,$CREATE_JNI_LIBRARIES_TRUE,;t t
|
s,@CREATE_JNI_LIBRARIES_TRUE@,$CREATE_JNI_LIBRARIES_TRUE,;t t
|
||||||
s,@CREATE_JNI_LIBRARIES_FALSE@,$CREATE_JNI_LIBRARIES_FALSE,;t t
|
s,@CREATE_JNI_LIBRARIES_FALSE@,$CREATE_JNI_LIBRARIES_FALSE,;t t
|
||||||
s,@CREATE_CORE_JNI_LIBRARIES_TRUE@,$CREATE_CORE_JNI_LIBRARIES_TRUE,;t t
|
s,@CREATE_CORE_JNI_LIBRARIES_TRUE@,$CREATE_CORE_JNI_LIBRARIES_TRUE,;t t
|
||||||
|
|
@ -18172,6 +18414,8 @@ s,@CXXDEPMODE@,$CXXDEPMODE,;t t
|
||||||
s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
|
s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
|
||||||
s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
|
s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
|
||||||
s,@CXXCPP@,$CXXCPP,;t t
|
s,@CXXCPP@,$CXXCPP,;t t
|
||||||
|
s,@PERL@,$PERL,;t t
|
||||||
|
s,@COLLECTIONS_PREFIX@,$COLLECTIONS_PREFIX,;t t
|
||||||
s,@LIBICONV@,$LIBICONV,;t t
|
s,@LIBICONV@,$LIBICONV,;t t
|
||||||
s,@LTLIBICONV@,$LTLIBICONV,;t t
|
s,@LTLIBICONV@,$LTLIBICONV,;t t
|
||||||
s,@WARNING_CFLAGS@,$WARNING_CFLAGS,;t t
|
s,@WARNING_CFLAGS@,$WARNING_CFLAGS,;t t
|
||||||
|
|
@ -18190,6 +18434,8 @@ s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
|
||||||
s,@GTK_LIBS@,$GTK_LIBS,;t t
|
s,@GTK_LIBS@,$GTK_LIBS,;t t
|
||||||
s,@CAIRO_CFLAGS@,$CAIRO_CFLAGS,;t t
|
s,@CAIRO_CFLAGS@,$CAIRO_CFLAGS,;t t
|
||||||
s,@CAIRO_LIBS@,$CAIRO_LIBS,;t t
|
s,@CAIRO_LIBS@,$CAIRO_LIBS,;t t
|
||||||
|
s,@FREETYPE2_CFLAGS@,$FREETYPE2_CFLAGS,;t t
|
||||||
|
s,@FREETYPE2_LIBS@,$FREETYPE2_LIBS,;t t
|
||||||
s,@PANGOFT2_CFLAGS@,$PANGOFT2_CFLAGS,;t t
|
s,@PANGOFT2_CFLAGS@,$PANGOFT2_CFLAGS,;t t
|
||||||
s,@PANGOFT2_LIBS@,$PANGOFT2_LIBS,;t t
|
s,@PANGOFT2_LIBS@,$PANGOFT2_LIBS,;t t
|
||||||
s,@QT_CFLAGS@,$QT_CFLAGS,;t t
|
s,@QT_CFLAGS@,$QT_CFLAGS,;t t
|
||||||
|
|
@ -18232,6 +18478,7 @@ s,@CP@,$CP,;t t
|
||||||
s,@DATE@,$DATE,;t t
|
s,@DATE@,$DATE,;t t
|
||||||
s,@FIND@,$FIND,;t t
|
s,@FIND@,$FIND,;t t
|
||||||
s,@ZIP@,$ZIP,;t t
|
s,@ZIP@,$ZIP,;t t
|
||||||
|
s,@FASTJAR@,$FASTJAR,;t t
|
||||||
s,@INSTALL_GLIBJ_ZIP_TRUE@,$INSTALL_GLIBJ_ZIP_TRUE,;t t
|
s,@INSTALL_GLIBJ_ZIP_TRUE@,$INSTALL_GLIBJ_ZIP_TRUE,;t t
|
||||||
s,@INSTALL_GLIBJ_ZIP_FALSE@,$INSTALL_GLIBJ_ZIP_FALSE,;t t
|
s,@INSTALL_GLIBJ_ZIP_FALSE@,$INSTALL_GLIBJ_ZIP_FALSE,;t t
|
||||||
s,@INSTALL_CLASS_FILES_TRUE@,$INSTALL_CLASS_FILES_TRUE,;t t
|
s,@INSTALL_CLASS_FILES_TRUE@,$INSTALL_CLASS_FILES_TRUE,;t t
|
||||||
|
|
@ -19069,6 +19316,7 @@ echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
mkcollections.pl ) chmod 755 lib/mkcollections.pl ;;
|
||||||
$ac_stdint_h )
|
$ac_stdint_h )
|
||||||
{ echo "$as_me:$LINENO: creating $ac_stdint_h : $_ac_stdint_h" >&5
|
{ echo "$as_me:$LINENO: creating $ac_stdint_h : $_ac_stdint_h" >&5
|
||||||
echo "$as_me: creating $ac_stdint_h : $_ac_stdint_h" >&6;}
|
echo "$as_me: creating $ac_stdint_h : $_ac_stdint_h" >&6;}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ dnl -----------------------------------------------------------
|
||||||
dnl define([AC_CACHE_LOAD], )dnl
|
dnl define([AC_CACHE_LOAD], )dnl
|
||||||
dnl define([AC_CACHE_SAVE], )dnl
|
dnl define([AC_CACHE_SAVE], )dnl
|
||||||
|
|
||||||
AC_INIT([GNU Classpath],[0.20],[classpath@gnu.org],[classpath])
|
AC_INIT([GNU Classpath],[0.90],[classpath@gnu.org],[classpath])
|
||||||
AC_CONFIG_SRCDIR(java/lang/System.java)
|
AC_CONFIG_SRCDIR(java/lang/System.java)
|
||||||
|
|
||||||
AC_CANONICAL_TARGET
|
AC_CANONICAL_TARGET
|
||||||
|
|
@ -38,6 +38,20 @@ AM_INIT_AUTOMAKE([1.9.0 gnu std-options tar-ustar])
|
||||||
AC_CONFIG_HEADERS([include/config.h])
|
AC_CONFIG_HEADERS([include/config.h])
|
||||||
AC_PREFIX_DEFAULT(/usr/local/classpath)
|
AC_PREFIX_DEFAULT(/usr/local/classpath)
|
||||||
|
|
||||||
|
dnl -----------------------------------------------------------
|
||||||
|
dnl Enable collections.jar (disabled by default)
|
||||||
|
dnl -----------------------------------------------------------
|
||||||
|
AC_ARG_ENABLE([collections],
|
||||||
|
[AS_HELP_STRING(--enable-collections,create collections.jar [default=no])],
|
||||||
|
[case x"${enableval}" in
|
||||||
|
xyes) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;;
|
||||||
|
xno) COMPILE_COLLECTIONS=no ;;
|
||||||
|
x) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;;
|
||||||
|
*) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"${enableval}\"" ;;
|
||||||
|
esac],
|
||||||
|
[COMPILE_COLLECTIONS=no])
|
||||||
|
AM_CONDITIONAL(CREATE_COLLECTIONS, test "x${COMPILE_COLLECTIONS}" = xyes)
|
||||||
|
|
||||||
dnl -----------------------------------------------------------
|
dnl -----------------------------------------------------------
|
||||||
dnl Enable JNI libraries (enabled by default)
|
dnl Enable JNI libraries (enabled by default)
|
||||||
dnl -----------------------------------------------------------
|
dnl -----------------------------------------------------------
|
||||||
|
|
@ -238,6 +252,14 @@ AC_PROG_CC
|
||||||
AC_PROG_CPP
|
AC_PROG_CPP
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
|
|
||||||
|
if test "x${COMPILE_COLLECTIONS}" = xyes; then
|
||||||
|
AC_PATH_PROG(PERL, [perl])
|
||||||
|
AC_SUBST(PERL)
|
||||||
|
AC_SUBST(COLLECTIONS_PREFIX)
|
||||||
|
AC_CONFIG_FILES([lib/mkcollections.pl])
|
||||||
|
AC_CONFIG_COMMANDS([mkcollections.pl],[chmod 755 lib/mkcollections.pl])
|
||||||
|
fi
|
||||||
|
|
||||||
if test "x${COMPILE_JNI}" = xyes; then
|
if test "x${COMPILE_JNI}" = xyes; then
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
|
|
||||||
|
|
@ -359,12 +381,15 @@ if test "x${COMPILE_JNI}" = xyes; then
|
||||||
PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.0)
|
PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.0)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES(FREETYPE2, freetype2)
|
||||||
PKG_CHECK_MODULES(PANGOFT2, pangoft2)
|
PKG_CHECK_MODULES(PANGOFT2, pangoft2)
|
||||||
|
|
||||||
AC_SUBST(GTK_CFLAGS)
|
AC_SUBST(GTK_CFLAGS)
|
||||||
AC_SUBST(GTK_LIBS)
|
AC_SUBST(GTK_LIBS)
|
||||||
AC_SUBST(CAIRO_LIBS)
|
AC_SUBST(CAIRO_LIBS)
|
||||||
AC_SUBST(CAIRO_CFLAGS)
|
AC_SUBST(CAIRO_CFLAGS)
|
||||||
|
AC_SUBST(FREETYPE2_LIBS)
|
||||||
|
AC_SUBST(FREETYPE2_CFLAGS)
|
||||||
AC_SUBST(PANGOFT2_LIBS)
|
AC_SUBST(PANGOFT2_LIBS)
|
||||||
AC_SUBST(PANGOFT2_CFLAGS)
|
AC_SUBST(PANGOFT2_CFLAGS)
|
||||||
fi
|
fi
|
||||||
|
|
@ -572,6 +597,7 @@ doc/api/Makefile
|
||||||
external/Makefile
|
external/Makefile
|
||||||
external/sax/Makefile
|
external/sax/Makefile
|
||||||
external/w3c_dom/Makefile
|
external/w3c_dom/Makefile
|
||||||
|
external/relaxngDatatype/Makefile
|
||||||
gnu/classpath/Configuration.java
|
gnu/classpath/Configuration.java
|
||||||
include/Makefile
|
include/Makefile
|
||||||
native/Makefile
|
native/Makefile
|
||||||
|
|
@ -598,6 +624,7 @@ scripts/classpath.spec
|
||||||
lib/Makefile
|
lib/Makefile
|
||||||
lib/gen-classlist.sh
|
lib/gen-classlist.sh
|
||||||
lib/copy-vmresources.sh
|
lib/copy-vmresources.sh
|
||||||
|
tools/Makefile
|
||||||
examples/Makefile
|
examples/Makefile
|
||||||
examples/Makefile.jawt])
|
examples/Makefile.jawt])
|
||||||
AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
|
AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CLASSPATH_INCLUDES = @CLASSPATH_INCLUDES@
|
CLASSPATH_INCLUDES = @CLASSPATH_INCLUDES@
|
||||||
CLASSPATH_MODULE = @CLASSPATH_MODULE@
|
CLASSPATH_MODULE = @CLASSPATH_MODULE@
|
||||||
|
COLLECTIONS_PREFIX = @COLLECTIONS_PREFIX@
|
||||||
CP = @CP@
|
CP = @CP@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
|
@ -87,6 +88,8 @@ CREATE_ALSA_LIBRARIES_FALSE = @CREATE_ALSA_LIBRARIES_FALSE@
|
||||||
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
|
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
|
||||||
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
|
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
|
||||||
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
|
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
|
||||||
|
CREATE_COLLECTIONS_FALSE = @CREATE_COLLECTIONS_FALSE@
|
||||||
|
CREATE_COLLECTIONS_TRUE = @CREATE_COLLECTIONS_TRUE@
|
||||||
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
|
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
|
||||||
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
|
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
|
||||||
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
|
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
|
||||||
|
|
@ -117,6 +120,7 @@ EGREP = @EGREP@
|
||||||
ERROR_CFLAGS = @ERROR_CFLAGS@
|
ERROR_CFLAGS = @ERROR_CFLAGS@
|
||||||
EXAMPLESDIR = @EXAMPLESDIR@
|
EXAMPLESDIR = @EXAMPLESDIR@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
FASTJAR = @FASTJAR@
|
||||||
FIND = @FIND@
|
FIND = @FIND@
|
||||||
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
|
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
|
||||||
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
|
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
|
||||||
|
|
@ -128,6 +132,8 @@ FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
|
||||||
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
|
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
|
||||||
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
|
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
|
||||||
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
|
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
|
||||||
|
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
|
||||||
|
FREETYPE2_LIBS = @FREETYPE2_LIBS@
|
||||||
GCJ = @GCJ@
|
GCJ = @GCJ@
|
||||||
GCJX = @GCJX@
|
GCJX = @GCJX@
|
||||||
GJDOC = @GJDOC@
|
GJDOC = @GJDOC@
|
||||||
|
|
@ -178,6 +184,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
||||||
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PERL = @PERL@
|
||||||
PKG_CONFIG = @PKG_CONFIG@
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
QT_CFLAGS = @QT_CFLAGS@
|
QT_CFLAGS = @QT_CFLAGS@
|
||||||
QT_LIBS = @QT_LIBS@
|
QT_LIBS = @QT_LIBS@
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ classes in the above packages.
|
||||||
|
|
||||||
. org.xml.sax.* ... SAX2 interfaces
|
. org.xml.sax.* ... SAX2 interfaces
|
||||||
. org.w3c.dom.* ... DOM Level 3 interfaces
|
. org.w3c.dom.* ... DOM Level 3 interfaces
|
||||||
|
. org.relaxng.datatype.* ... RELAX NG pluggable datatypes API
|
||||||
|
|
||||||
CONFORMANCE
|
CONFORMANCE
|
||||||
|
|
||||||
|
|
@ -175,3 +176,29 @@ using thread context variables.
|
||||||
Update: thread context variables have been introduced. This is very
|
Update: thread context variables have been introduced. This is very
|
||||||
untested though, libxmll therefore still has the single thread
|
untested though, libxmll therefore still has the single thread
|
||||||
bottleneck.
|
bottleneck.
|
||||||
|
|
||||||
|
|
||||||
|
Validation
|
||||||
|
===================================================
|
||||||
|
|
||||||
|
Pluggable datatypes
|
||||||
|
---------------------------------------------------
|
||||||
|
Validators should use the RELAX NG pluggable datatypes API to retrieve
|
||||||
|
datatype (XML Schema simple type) implementations in a schema-neutral
|
||||||
|
fashion. The following code demonstrates looking up a W3C XML Schema
|
||||||
|
nonNegativeInteger datatype:
|
||||||
|
|
||||||
|
DatatypeLibrary xsd = DatatypeLibraryLoader
|
||||||
|
.createDatatypeLibrary(XMLConstants.W3C_XML_SCHEMA_NS_URI);
|
||||||
|
Datatype nonNegativeInteger = xsd.createDatatype("nonNegativeInteger");
|
||||||
|
|
||||||
|
It is also possible to create new types by derivation. For instance,
|
||||||
|
to create a datatype that will match a US ZIP code:
|
||||||
|
|
||||||
|
DatatypeBuilder b = xsd.createDatatypeBuilder("string");
|
||||||
|
b.addParameter("pattern", "(^[0-9]{5}$)|(^[0-9]{5}-[0-9]{4}$)");
|
||||||
|
Datatype zipCode = b.createDatatype();
|
||||||
|
|
||||||
|
A datatype library implementation for XML Schema is provided; other
|
||||||
|
library implementations may be added.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ create_html:
|
||||||
-licensetext \
|
-licensetext \
|
||||||
-linksource \
|
-linksource \
|
||||||
-splitindex \
|
-splitindex \
|
||||||
|
-validhtml \
|
||||||
-d html \
|
-d html \
|
||||||
-doctitle "GNU Classpath $(VERSION)" \
|
-doctitle "GNU Classpath $(VERSION)" \
|
||||||
-windowtitle "GNU Classpath $(VERSION) Documentation" \
|
-windowtitle "GNU Classpath $(VERSION) Documentation" \
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CLASSPATH_INCLUDES = @CLASSPATH_INCLUDES@
|
CLASSPATH_INCLUDES = @CLASSPATH_INCLUDES@
|
||||||
CLASSPATH_MODULE = @CLASSPATH_MODULE@
|
CLASSPATH_MODULE = @CLASSPATH_MODULE@
|
||||||
|
COLLECTIONS_PREFIX = @COLLECTIONS_PREFIX@
|
||||||
CP = @CP@
|
CP = @CP@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
|
@ -80,6 +81,8 @@ CREATE_ALSA_LIBRARIES_FALSE = @CREATE_ALSA_LIBRARIES_FALSE@
|
||||||
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
|
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
|
||||||
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
|
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
|
||||||
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
|
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
|
||||||
|
CREATE_COLLECTIONS_FALSE = @CREATE_COLLECTIONS_FALSE@
|
||||||
|
CREATE_COLLECTIONS_TRUE = @CREATE_COLLECTIONS_TRUE@
|
||||||
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
|
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
|
||||||
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
|
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
|
||||||
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
|
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
|
||||||
|
|
@ -110,6 +113,7 @@ EGREP = @EGREP@
|
||||||
ERROR_CFLAGS = @ERROR_CFLAGS@
|
ERROR_CFLAGS = @ERROR_CFLAGS@
|
||||||
EXAMPLESDIR = @EXAMPLESDIR@
|
EXAMPLESDIR = @EXAMPLESDIR@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
FASTJAR = @FASTJAR@
|
||||||
FIND = @FIND@
|
FIND = @FIND@
|
||||||
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
|
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
|
||||||
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
|
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
|
||||||
|
|
@ -121,6 +125,8 @@ FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
|
||||||
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
|
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
|
||||||
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
|
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
|
||||||
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
|
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
|
||||||
|
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
|
||||||
|
FREETYPE2_LIBS = @FREETYPE2_LIBS@
|
||||||
GCJ = @GCJ@
|
GCJ = @GCJ@
|
||||||
GCJX = @GCJX@
|
GCJX = @GCJX@
|
||||||
GJDOC = @GJDOC@
|
GJDOC = @GJDOC@
|
||||||
|
|
@ -171,6 +177,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
||||||
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PERL = @PERL@
|
||||||
PKG_CONFIG = @PKG_CONFIG@
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
QT_CFLAGS = @QT_CFLAGS@
|
QT_CFLAGS = @QT_CFLAGS@
|
||||||
QT_LIBS = @QT_LIBS@
|
QT_LIBS = @QT_LIBS@
|
||||||
|
|
@ -449,6 +456,7 @@ create_html:
|
||||||
-licensetext \
|
-licensetext \
|
||||||
-linksource \
|
-linksource \
|
||||||
-splitindex \
|
-splitindex \
|
||||||
|
-validhtml \
|
||||||
-d html \
|
-d html \
|
||||||
-doctitle "GNU Classpath $(VERSION)" \
|
-doctitle "GNU Classpath $(VERSION)" \
|
||||||
-windowtitle "GNU Classpath $(VERSION) Documentation" \
|
-windowtitle "GNU Classpath $(VERSION) Documentation" \
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,133 @@
|
||||||
|
# Blocks-4.0.0.txt
|
||||||
|
# Correlated with Unicode 4.0
|
||||||
|
# Note: The casing of block names is not normative.
|
||||||
|
# For example, "Basic Latin" and "BASIC LATIN" are equivalent.
|
||||||
|
#
|
||||||
|
# Code points not explicitly listed in this file are given the value No_Block.
|
||||||
|
#
|
||||||
|
# Start Code..End Code; Block Name
|
||||||
|
0000..007F; Basic Latin
|
||||||
|
0080..00FF; Latin-1 Supplement
|
||||||
|
0100..017F; Latin Extended-A
|
||||||
|
0180..024F; Latin Extended-B
|
||||||
|
0250..02AF; IPA Extensions
|
||||||
|
02B0..02FF; Spacing Modifier Letters
|
||||||
|
0300..036F; Combining Diacritical Marks
|
||||||
|
0370..03FF; Greek and Coptic
|
||||||
|
0400..04FF; Cyrillic
|
||||||
|
0500..052F; Cyrillic Supplementary
|
||||||
|
0530..058F; Armenian
|
||||||
|
0590..05FF; Hebrew
|
||||||
|
0600..06FF; Arabic
|
||||||
|
0700..074F; Syriac
|
||||||
|
0780..07BF; Thaana
|
||||||
|
0900..097F; Devanagari
|
||||||
|
0980..09FF; Bengali
|
||||||
|
0A00..0A7F; Gurmukhi
|
||||||
|
0A80..0AFF; Gujarati
|
||||||
|
0B00..0B7F; Oriya
|
||||||
|
0B80..0BFF; Tamil
|
||||||
|
0C00..0C7F; Telugu
|
||||||
|
0C80..0CFF; Kannada
|
||||||
|
0D00..0D7F; Malayalam
|
||||||
|
0D80..0DFF; Sinhala
|
||||||
|
0E00..0E7F; Thai
|
||||||
|
0E80..0EFF; Lao
|
||||||
|
0F00..0FFF; Tibetan
|
||||||
|
1000..109F; Myanmar
|
||||||
|
10A0..10FF; Georgian
|
||||||
|
1100..11FF; Hangul Jamo
|
||||||
|
1200..137F; Ethiopic
|
||||||
|
13A0..13FF; Cherokee
|
||||||
|
1400..167F; Unified Canadian Aboriginal Syllabics
|
||||||
|
1680..169F; Ogham
|
||||||
|
16A0..16FF; Runic
|
||||||
|
1700..171F; Tagalog
|
||||||
|
1720..173F; Hanunoo
|
||||||
|
1740..175F; Buhid
|
||||||
|
1760..177F; Tagbanwa
|
||||||
|
1780..17FF; Khmer
|
||||||
|
1800..18AF; Mongolian
|
||||||
|
1900..194F; Limbu
|
||||||
|
1950..197F; Tai Le
|
||||||
|
19E0..19FF; Khmer Symbols
|
||||||
|
1D00..1D7F; Phonetic Extensions
|
||||||
|
1E00..1EFF; Latin Extended Additional
|
||||||
|
1F00..1FFF; Greek Extended
|
||||||
|
2000..206F; General Punctuation
|
||||||
|
2070..209F; Superscripts and Subscripts
|
||||||
|
20A0..20CF; Currency Symbols
|
||||||
|
20D0..20FF; Combining Diacritical Marks for Symbols
|
||||||
|
2100..214F; Letterlike Symbols
|
||||||
|
2150..218F; Number Forms
|
||||||
|
2190..21FF; Arrows
|
||||||
|
2200..22FF; Mathematical Operators
|
||||||
|
2300..23FF; Miscellaneous Technical
|
||||||
|
2400..243F; Control Pictures
|
||||||
|
2440..245F; Optical Character Recognition
|
||||||
|
2460..24FF; Enclosed Alphanumerics
|
||||||
|
2500..257F; Box Drawing
|
||||||
|
2580..259F; Block Elements
|
||||||
|
25A0..25FF; Geometric Shapes
|
||||||
|
2600..26FF; Miscellaneous Symbols
|
||||||
|
2700..27BF; Dingbats
|
||||||
|
27C0..27EF; Miscellaneous Mathematical Symbols-A
|
||||||
|
27F0..27FF; Supplemental Arrows-A
|
||||||
|
2800..28FF; Braille Patterns
|
||||||
|
2900..297F; Supplemental Arrows-B
|
||||||
|
2980..29FF; Miscellaneous Mathematical Symbols-B
|
||||||
|
2A00..2AFF; Supplemental Mathematical Operators
|
||||||
|
2B00..2BFF; Miscellaneous Symbols and Arrows
|
||||||
|
2E80..2EFF; CJK Radicals Supplement
|
||||||
|
2F00..2FDF; Kangxi Radicals
|
||||||
|
2FF0..2FFF; Ideographic Description Characters
|
||||||
|
3000..303F; CJK Symbols and Punctuation
|
||||||
|
3040..309F; Hiragana
|
||||||
|
30A0..30FF; Katakana
|
||||||
|
3100..312F; Bopomofo
|
||||||
|
3130..318F; Hangul Compatibility Jamo
|
||||||
|
3190..319F; Kanbun
|
||||||
|
31A0..31BF; Bopomofo Extended
|
||||||
|
31F0..31FF; Katakana Phonetic Extensions
|
||||||
|
3200..32FF; Enclosed CJK Letters and Months
|
||||||
|
3300..33FF; CJK Compatibility
|
||||||
|
3400..4DBF; CJK Unified Ideographs Extension A
|
||||||
|
4DC0..4DFF; Yijing Hexagram Symbols
|
||||||
|
4E00..9FFF; CJK Unified Ideographs
|
||||||
|
A000..A48F; Yi Syllables
|
||||||
|
A490..A4CF; Yi Radicals
|
||||||
|
AC00..D7AF; Hangul Syllables
|
||||||
|
D800..DB7F; High Surrogates
|
||||||
|
DB80..DBFF; High Private Use Surrogates
|
||||||
|
DC00..DFFF; Low Surrogates
|
||||||
|
E000..F8FF; Private Use Area
|
||||||
|
F900..FAFF; CJK Compatibility Ideographs
|
||||||
|
FB00..FB4F; Alphabetic Presentation Forms
|
||||||
|
FB50..FDFF; Arabic Presentation Forms-A
|
||||||
|
FE00..FE0F; Variation Selectors
|
||||||
|
FE20..FE2F; Combining Half Marks
|
||||||
|
FE30..FE4F; CJK Compatibility Forms
|
||||||
|
FE50..FE6F; Small Form Variants
|
||||||
|
FE70..FEFF; Arabic Presentation Forms-B
|
||||||
|
FF00..FFEF; Halfwidth and Fullwidth Forms
|
||||||
|
FFF0..FFFF; Specials
|
||||||
|
10000..1007F; Linear B Syllabary
|
||||||
|
10080..100FF; Linear B Ideograms
|
||||||
|
10100..1013F; Aegean Numbers
|
||||||
|
10300..1032F; Old Italic
|
||||||
|
10330..1034F; Gothic
|
||||||
|
10380..1039F; Ugaritic
|
||||||
|
10400..1044F; Deseret
|
||||||
|
10450..1047F; Shavian
|
||||||
|
10480..104AF; Osmanya
|
||||||
|
10800..1083F; Cypriot Syllabary
|
||||||
|
1D000..1D0FF; Byzantine Musical Symbols
|
||||||
|
1D100..1D1FF; Musical Symbols
|
||||||
|
1D300..1D35F; Tai Xuan Jing Symbols
|
||||||
|
1D400..1D7FF; Mathematical Alphanumeric Symbols
|
||||||
|
20000..2A6DF; CJK Unified Ideographs Extension B
|
||||||
|
2F800..2FA1F; CJK Compatibility Ideographs Supplement
|
||||||
|
E0000..E007F; Tags
|
||||||
|
E0100..E01EF; Variation Selectors Supplement
|
||||||
|
F0000..FFFFF; Supplementary Private Use Area-A
|
||||||
|
100000..10FFFF; Supplementary Private Use Area-B
|
||||||
|
|
@ -0,0 +1,256 @@
|
||||||
|
# SpecialCasing-4.0.0.txt
|
||||||
|
# Date: 2003-03-14, 20:22:04 GMT [MD]
|
||||||
|
#
|
||||||
|
# Special Casing Properties
|
||||||
|
#
|
||||||
|
# This file is a supplement to the UnicodeData file.
|
||||||
|
# It contains additional information about the casing of Unicode characters.
|
||||||
|
# (For compatibility, the UnicodeData.txt file only contains case mappings for
|
||||||
|
# characters where they are 1-1, and does not have locale-specific mappings.)
|
||||||
|
# For more information, see the discussion of Case Mappings in the Unicode Standard.
|
||||||
|
#
|
||||||
|
# All code points not listed in this file that do not have a simple case mappings
|
||||||
|
# in UnicodeData.txt map to themselves.
|
||||||
|
# ================================================================================
|
||||||
|
# Format
|
||||||
|
# ================================================================================
|
||||||
|
# The entries in this file are in the following machine-readable format:
|
||||||
|
#
|
||||||
|
# <code>; <lower> ; <title> ; <upper> ; (<condition_list> ;)? # <comment>
|
||||||
|
#
|
||||||
|
# <code>, <lower>, <title>, and <upper> provide character values in hex. If there is more than
|
||||||
|
# one character, they are separated by spaces. Other than as used to separate elements,
|
||||||
|
# spaces are to be ignored.
|
||||||
|
#
|
||||||
|
# The <condition_list> is optional. Where present, it consists of one or more locales or contexts,
|
||||||
|
# separated by spaces. In these conditions:
|
||||||
|
# - A condition list overrides the normal behavior if all of the listed conditions are true.
|
||||||
|
# - The context is always the context of the characters in the original string,
|
||||||
|
# NOT in the resulting string.
|
||||||
|
# - Case distinctions in the condition list are not significant.
|
||||||
|
# - Conditions preceded by "Not_" represent the negation of the condition.
|
||||||
|
#
|
||||||
|
# A locale is defined as:
|
||||||
|
# <locale> := <ISO_639_code> ( "_" <ISO_3166_code> ( "_" <variant> )? )?
|
||||||
|
# <ISO_3166_code> := 2-letter ISO country code,
|
||||||
|
# <ISO_639_code> := 2-letter ISO language code
|
||||||
|
#
|
||||||
|
# A context is one of the following, as defined in the Unicode Standard:
|
||||||
|
# Final_Sigma, After_Soft_Dotted, More_Above, Before_Dot, Not_Before_Dot, After_I
|
||||||
|
#
|
||||||
|
# Parsers of this file must be prepared to deal with future additions to this format:
|
||||||
|
# * Additional contexts
|
||||||
|
# * Additional fields
|
||||||
|
# ================================================================================
|
||||||
|
|
||||||
|
# ================================================================================
|
||||||
|
# Unconditional mappings
|
||||||
|
# ================================================================================
|
||||||
|
|
||||||
|
# The German es-zed is special--the normal mapping is to SS.
|
||||||
|
# Note: the titlecase should never occur in practice. It is equal to titlecase(uppercase(<es-zed>))
|
||||||
|
|
||||||
|
00DF; 00DF; 0053 0073; 0053 0053; # LATIN SMALL LETTER SHARP S
|
||||||
|
|
||||||
|
# Preserve canonical equivalence for I with dot. Turkic is handled below.
|
||||||
|
|
||||||
|
0130; 0069 0307; 0130; 0130; # LATIN CAPITAL LETTER I WITH DOT ABOVE
|
||||||
|
|
||||||
|
# Ligatures
|
||||||
|
|
||||||
|
FB00; FB00; 0046 0066; 0046 0046; # LATIN SMALL LIGATURE FF
|
||||||
|
FB01; FB01; 0046 0069; 0046 0049; # LATIN SMALL LIGATURE FI
|
||||||
|
FB02; FB02; 0046 006C; 0046 004C; # LATIN SMALL LIGATURE FL
|
||||||
|
FB03; FB03; 0046 0066 0069; 0046 0046 0049; # LATIN SMALL LIGATURE FFI
|
||||||
|
FB04; FB04; 0046 0066 006C; 0046 0046 004C; # LATIN SMALL LIGATURE FFL
|
||||||
|
FB05; FB05; 0053 0074; 0053 0054; # LATIN SMALL LIGATURE LONG S T
|
||||||
|
FB06; FB06; 0053 0074; 0053 0054; # LATIN SMALL LIGATURE ST
|
||||||
|
|
||||||
|
0587; 0587; 0535 0582; 0535 0552; # ARMENIAN SMALL LIGATURE ECH YIWN
|
||||||
|
FB13; FB13; 0544 0576; 0544 0546; # ARMENIAN SMALL LIGATURE MEN NOW
|
||||||
|
FB14; FB14; 0544 0565; 0544 0535; # ARMENIAN SMALL LIGATURE MEN ECH
|
||||||
|
FB15; FB15; 0544 056B; 0544 053B; # ARMENIAN SMALL LIGATURE MEN INI
|
||||||
|
FB16; FB16; 054E 0576; 054E 0546; # ARMENIAN SMALL LIGATURE VEW NOW
|
||||||
|
FB17; FB17; 0544 056D; 0544 053D; # ARMENIAN SMALL LIGATURE MEN XEH
|
||||||
|
|
||||||
|
# No corresponding uppercase precomposed character
|
||||||
|
|
||||||
|
0149; 0149; 02BC 004E; 02BC 004E; # LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
|
||||||
|
0390; 0390; 0399 0308 0301; 0399 0308 0301; # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
|
||||||
|
03B0; 03B0; 03A5 0308 0301; 03A5 0308 0301; # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
|
||||||
|
01F0; 01F0; 004A 030C; 004A 030C; # LATIN SMALL LETTER J WITH CARON
|
||||||
|
1E96; 1E96; 0048 0331; 0048 0331; # LATIN SMALL LETTER H WITH LINE BELOW
|
||||||
|
1E97; 1E97; 0054 0308; 0054 0308; # LATIN SMALL LETTER T WITH DIAERESIS
|
||||||
|
1E98; 1E98; 0057 030A; 0057 030A; # LATIN SMALL LETTER W WITH RING ABOVE
|
||||||
|
1E99; 1E99; 0059 030A; 0059 030A; # LATIN SMALL LETTER Y WITH RING ABOVE
|
||||||
|
1E9A; 1E9A; 0041 02BE; 0041 02BE; # LATIN SMALL LETTER A WITH RIGHT HALF RING
|
||||||
|
1F50; 1F50; 03A5 0313; 03A5 0313; # GREEK SMALL LETTER UPSILON WITH PSILI
|
||||||
|
1F52; 1F52; 03A5 0313 0300; 03A5 0313 0300; # GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA
|
||||||
|
1F54; 1F54; 03A5 0313 0301; 03A5 0313 0301; # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA
|
||||||
|
1F56; 1F56; 03A5 0313 0342; 03A5 0313 0342; # GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI
|
||||||
|
1FB6; 1FB6; 0391 0342; 0391 0342; # GREEK SMALL LETTER ALPHA WITH PERISPOMENI
|
||||||
|
1FC6; 1FC6; 0397 0342; 0397 0342; # GREEK SMALL LETTER ETA WITH PERISPOMENI
|
||||||
|
1FD2; 1FD2; 0399 0308 0300; 0399 0308 0300; # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA
|
||||||
|
1FD3; 1FD3; 0399 0308 0301; 0399 0308 0301; # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
|
||||||
|
1FD6; 1FD6; 0399 0342; 0399 0342; # GREEK SMALL LETTER IOTA WITH PERISPOMENI
|
||||||
|
1FD7; 1FD7; 0399 0308 0342; 0399 0308 0342; # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI
|
||||||
|
1FE2; 1FE2; 03A5 0308 0300; 03A5 0308 0300; # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA
|
||||||
|
1FE3; 1FE3; 03A5 0308 0301; 03A5 0308 0301; # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA
|
||||||
|
1FE4; 1FE4; 03A1 0313; 03A1 0313; # GREEK SMALL LETTER RHO WITH PSILI
|
||||||
|
1FE6; 1FE6; 03A5 0342; 03A5 0342; # GREEK SMALL LETTER UPSILON WITH PERISPOMENI
|
||||||
|
1FE7; 1FE7; 03A5 0308 0342; 03A5 0308 0342; # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI
|
||||||
|
1FF6; 1FF6; 03A9 0342; 03A9 0342; # GREEK SMALL LETTER OMEGA WITH PERISPOMENI
|
||||||
|
|
||||||
|
# IMPORTANT-when capitalizing iota-subscript (0345)
|
||||||
|
# It MUST be in normalized form--moved to the end of any sequence of combining marks.
|
||||||
|
# This is because logically it represents a following base character!
|
||||||
|
# E.g. <iota_subscript> (<Mn> | <Mc> | <Me>)+ => (<Mn> | <Mc> | <Me>)+ <iota_subscript>
|
||||||
|
# It should never be the first character in a word, so in titlecasing it can be left as is.
|
||||||
|
|
||||||
|
# The following cases are already in the UnicodeData file, so are only commented here.
|
||||||
|
|
||||||
|
# 0345; 0345; 0345; 0399; # COMBINING GREEK YPOGEGRAMMENI
|
||||||
|
|
||||||
|
# All letters with YPOGEGRAMMENI (iota-subscript) or PROSGEGRAMMENI (iota adscript)
|
||||||
|
# have special uppercases.
|
||||||
|
# Note: characters with PROSGEGRAMMENI are actually titlecase, not uppercase!
|
||||||
|
|
||||||
|
1F80; 1F80; 1F88; 1F08 0399; # GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI
|
||||||
|
1F81; 1F81; 1F89; 1F09 0399; # GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI
|
||||||
|
1F82; 1F82; 1F8A; 1F0A 0399; # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI
|
||||||
|
1F83; 1F83; 1F8B; 1F0B 0399; # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI
|
||||||
|
1F84; 1F84; 1F8C; 1F0C 0399; # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI
|
||||||
|
1F85; 1F85; 1F8D; 1F0D 0399; # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI
|
||||||
|
1F86; 1F86; 1F8E; 1F0E 0399; # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI
|
||||||
|
1F87; 1F87; 1F8F; 1F0F 0399; # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI
|
||||||
|
1F88; 1F80; 1F88; 1F08 0399; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI
|
||||||
|
1F89; 1F81; 1F89; 1F09 0399; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI
|
||||||
|
1F8A; 1F82; 1F8A; 1F0A 0399; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI
|
||||||
|
1F8B; 1F83; 1F8B; 1F0B 0399; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI
|
||||||
|
1F8C; 1F84; 1F8C; 1F0C 0399; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI
|
||||||
|
1F8D; 1F85; 1F8D; 1F0D 0399; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI
|
||||||
|
1F8E; 1F86; 1F8E; 1F0E 0399; # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
|
||||||
|
1F8F; 1F87; 1F8F; 1F0F 0399; # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
|
||||||
|
1F90; 1F90; 1F98; 1F28 0399; # GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI
|
||||||
|
1F91; 1F91; 1F99; 1F29 0399; # GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI
|
||||||
|
1F92; 1F92; 1F9A; 1F2A 0399; # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI
|
||||||
|
1F93; 1F93; 1F9B; 1F2B 0399; # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI
|
||||||
|
1F94; 1F94; 1F9C; 1F2C 0399; # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI
|
||||||
|
1F95; 1F95; 1F9D; 1F2D 0399; # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI
|
||||||
|
1F96; 1F96; 1F9E; 1F2E 0399; # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI
|
||||||
|
1F97; 1F97; 1F9F; 1F2F 0399; # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI
|
||||||
|
1F98; 1F90; 1F98; 1F28 0399; # GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI
|
||||||
|
1F99; 1F91; 1F99; 1F29 0399; # GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI
|
||||||
|
1F9A; 1F92; 1F9A; 1F2A 0399; # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI
|
||||||
|
1F9B; 1F93; 1F9B; 1F2B 0399; # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI
|
||||||
|
1F9C; 1F94; 1F9C; 1F2C 0399; # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI
|
||||||
|
1F9D; 1F95; 1F9D; 1F2D 0399; # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI
|
||||||
|
1F9E; 1F96; 1F9E; 1F2E 0399; # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
|
||||||
|
1F9F; 1F97; 1F9F; 1F2F 0399; # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
|
||||||
|
1FA0; 1FA0; 1FA8; 1F68 0399; # GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI
|
||||||
|
1FA1; 1FA1; 1FA9; 1F69 0399; # GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI
|
||||||
|
1FA2; 1FA2; 1FAA; 1F6A 0399; # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI
|
||||||
|
1FA3; 1FA3; 1FAB; 1F6B 0399; # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI
|
||||||
|
1FA4; 1FA4; 1FAC; 1F6C 0399; # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI
|
||||||
|
1FA5; 1FA5; 1FAD; 1F6D 0399; # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI
|
||||||
|
1FA6; 1FA6; 1FAE; 1F6E 0399; # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI
|
||||||
|
1FA7; 1FA7; 1FAF; 1F6F 0399; # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI
|
||||||
|
1FA8; 1FA0; 1FA8; 1F68 0399; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI
|
||||||
|
1FA9; 1FA1; 1FA9; 1F69 0399; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI
|
||||||
|
1FAA; 1FA2; 1FAA; 1F6A 0399; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI
|
||||||
|
1FAB; 1FA3; 1FAB; 1F6B 0399; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI
|
||||||
|
1FAC; 1FA4; 1FAC; 1F6C 0399; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI
|
||||||
|
1FAD; 1FA5; 1FAD; 1F6D 0399; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI
|
||||||
|
1FAE; 1FA6; 1FAE; 1F6E 0399; # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
|
||||||
|
1FAF; 1FA7; 1FAF; 1F6F 0399; # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
|
||||||
|
1FB3; 1FB3; 1FBC; 0391 0399; # GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI
|
||||||
|
1FBC; 1FB3; 1FBC; 0391 0399; # GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI
|
||||||
|
1FC3; 1FC3; 1FCC; 0397 0399; # GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI
|
||||||
|
1FCC; 1FC3; 1FCC; 0397 0399; # GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI
|
||||||
|
1FF3; 1FF3; 1FFC; 03A9 0399; # GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI
|
||||||
|
1FFC; 1FF3; 1FFC; 03A9 0399; # GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI
|
||||||
|
|
||||||
|
# Some characters with YPOGEGRAMMENI are also have no corresponding titlecases
|
||||||
|
|
||||||
|
1FB2; 1FB2; 1FBA 0345; 1FBA 0399; # GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI
|
||||||
|
1FB4; 1FB4; 0386 0345; 0386 0399; # GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI
|
||||||
|
1FC2; 1FC2; 1FCA 0345; 1FCA 0399; # GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI
|
||||||
|
1FC4; 1FC4; 0389 0345; 0389 0399; # GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI
|
||||||
|
1FF2; 1FF2; 1FFA 0345; 1FFA 0399; # GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI
|
||||||
|
1FF4; 1FF4; 038F 0345; 038F 0399; # GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI
|
||||||
|
|
||||||
|
1FB7; 1FB7; 0391 0342 0345; 0391 0342 0399; # GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI
|
||||||
|
1FC7; 1FC7; 0397 0342 0345; 0397 0342 0399; # GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI
|
||||||
|
1FF7; 1FF7; 03A9 0342 0345; 03A9 0342 0399; # GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI
|
||||||
|
|
||||||
|
# ================================================================================
|
||||||
|
# Conditional mappings
|
||||||
|
# ================================================================================
|
||||||
|
|
||||||
|
# Special case for final form of sigma
|
||||||
|
|
||||||
|
03A3; 03C2; 03A3; 03A3; Final_Sigma; # GREEK CAPITAL LETTER SIGMA
|
||||||
|
|
||||||
|
# Note: the following cases for non-final are already in the UnicodeData file.
|
||||||
|
|
||||||
|
# 03A3; 03C3; 03A3; 03A3; # GREEK CAPITAL LETTER SIGMA
|
||||||
|
# 03C3; 03C3; 03A3; 03A3; # GREEK SMALL LETTER SIGMA
|
||||||
|
# 03C2; 03C2; 03A3; 03A3; # GREEK SMALL LETTER FINAL SIGMA
|
||||||
|
|
||||||
|
# Note: the following cases are not included, since they would case-fold in lowercasing
|
||||||
|
|
||||||
|
# 03C3; 03C2; 03A3; 03A3; Final_Sigma; # GREEK SMALL LETTER SIGMA
|
||||||
|
# 03C2; 03C3; 03A3; 03A3; Not_Final_Sigma; # GREEK SMALL LETTER FINAL SIGMA
|
||||||
|
|
||||||
|
# ================================================================================
|
||||||
|
# Locale-sensitive mappings
|
||||||
|
# ================================================================================
|
||||||
|
|
||||||
|
# Lithuanian
|
||||||
|
|
||||||
|
# Lithuanian retains the dot in a lowercase i when followed by accents.
|
||||||
|
|
||||||
|
# Remove DOT ABOVE after "i" with upper or titlecase
|
||||||
|
|
||||||
|
0307; 0307; ; ; lt After_Soft_Dotted; # COMBINING DOT ABOVE
|
||||||
|
|
||||||
|
# Introduce an explicit dot above when lowercasing capital I's and J's
|
||||||
|
# whenever there are more accents above.
|
||||||
|
# (of the accents used in Lithuanian: grave, acute, tilde above, and ogonek)
|
||||||
|
|
||||||
|
0049; 0069 0307; 0049; 0049; lt More_Above; # LATIN CAPITAL LETTER I
|
||||||
|
004A; 006A 0307; 004A; 004A; lt More_Above; # LATIN CAPITAL LETTER J
|
||||||
|
012E; 012F 0307; 012E; 012E; lt More_Above; # LATIN CAPITAL LETTER I WITH OGONEK
|
||||||
|
00CC; 0069 0307 0300; 00CC; 00CC; lt; # LATIN CAPITAL LETTER I WITH GRAVE
|
||||||
|
00CD; 0069 0307 0301; 00CD; 00CD; lt; # LATIN CAPITAL LETTER I WITH ACUTE
|
||||||
|
0128; 0069 0307 0303; 0128; 0128; lt; # LATIN CAPITAL LETTER I WITH TILDE
|
||||||
|
|
||||||
|
# ================================================================================
|
||||||
|
|
||||||
|
# Turkish and Azeri
|
||||||
|
|
||||||
|
# I and i-dotless; I-dot and i are case pairs in Turkish and Azeri
|
||||||
|
# The following rules handle those cases.
|
||||||
|
|
||||||
|
0130; 0069; 0130; 0130; tr; # LATIN CAPITAL LETTER I WITH DOT ABOVE
|
||||||
|
0130; 0069; 0130; 0130; az; # LATIN CAPITAL LETTER I WITH DOT ABOVE
|
||||||
|
|
||||||
|
# When lowercasing, remove dot_above in the sequence I + dot_above, which will turn into i.
|
||||||
|
# This matches the behavior of the canonically equivalent I-dot_above
|
||||||
|
|
||||||
|
0307; ; 0307; 0307; tr After_I; # COMBINING DOT ABOVE
|
||||||
|
0307; ; 0307; 0307; az After_I; # COMBINING DOT ABOVE
|
||||||
|
|
||||||
|
# When lowercasing, unless an I is before a dot_above, it turns into a dotless i.
|
||||||
|
|
||||||
|
0049; 0131; 0049; 0049; tr Not_Before_Dot; # LATIN CAPITAL LETTER I
|
||||||
|
0049; 0131; 0049; 0049; az Not_Before_Dot; # LATIN CAPITAL LETTER I
|
||||||
|
|
||||||
|
# When uppercasing, i turns into a dotted capital I
|
||||||
|
|
||||||
|
0069; 0069; 0130; 0130; tr; # LATIN SMALL LETTER I
|
||||||
|
0069; 0069; 0130; 0130; az; # LATIN SMALL LETTER I
|
||||||
|
|
||||||
|
# Note: the following case is already in the UnicodeData file.
|
||||||
|
|
||||||
|
# 0131; 0131; 0049; 0049; tr; # LATIN SMALL LETTER DOTLESS I
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -227,6 +227,7 @@ become operable.
|
||||||
* java.lang.VMString::
|
* java.lang.VMString::
|
||||||
* java.lang.VMThread::
|
* java.lang.VMThread::
|
||||||
* java.lang.VMInstrumentationImpl::
|
* java.lang.VMInstrumentationImpl::
|
||||||
|
* java.lang.VMMath::
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@node java.lang.VMClass, java.lang.VMObject ,java.lang,java.lang
|
@node java.lang.VMClass, java.lang.VMObject ,java.lang,java.lang
|
||||||
|
|
@ -684,17 +685,18 @@ having returned true, and is thus deprecated as a result.
|
||||||
@end itemize
|
@end itemize
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@node java.lang.VMInstrumentationImpl,, java.lang.VMThread, java.lang
|
@node java.lang.VMInstrumentationImpl, java.lang.VMMath, java.lang.VMThread, java.lang
|
||||||
@subsection @code{java.lang.VMInstrumentationImpl}
|
@subsection @code{java.lang.VMInstrumentationImpl}
|
||||||
|
|
||||||
The @code{java.lang.VMInstrumentationImpl} and
|
The @code{java.lang.VMInstrumentationImpl} and
|
||||||
@code{java.lang.InstrumentationImpl} provides an implementation of the
|
@code{java.lang.InstrumentationImpl} classes provide an implementation of the
|
||||||
@code{java.lang.instrument.Instrument} interface. This interface is for java
|
@code{java.lang.instrument.Instrument} interface. This interface is for java
|
||||||
1.5 and is only in the generics branch.
|
1.5 and is only in the generics branch.
|
||||||
A @code{InstrumentationImpl} object should be given to any agent
|
A @code{InstrumentationImpl} object should be created by the VM when agents
|
||||||
given in the command line (see the @code{java.lang.instrument} package
|
are given in the command line (see the @code{java.lang.instrument} package
|
||||||
documentation). A VM has to implement the static native methods of the
|
documentation). The VM has to set the static field
|
||||||
@code{VMInstrumentationImpl} class.
|
@code{VMClassLoader.instrumenter} to this object. The VM should implement the
|
||||||
|
static native methods of the @code{VMInstrumentationImpl} class.
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item @code{isRedefineClassesSupported()} -- Returns true if the JVM supports
|
@item @code{isRedefineClassesSupported()} -- Returns true if the JVM supports
|
||||||
|
|
@ -707,21 +709,72 @@ by a specific class loader.
|
||||||
@item @code{getObjectSize()} -- Gives the size of an object.
|
@item @code{getObjectSize()} -- Gives the size of an object.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
When agents are defined, the VM has to call transformers of the
|
Instrumentation allows to modify the bytecode of a class before it gets read
|
||||||
@code{InstrumentImpl} object each time a class is loaded, eg a call to
|
by the VM. In GNU Classpath, the @code{ClassLoader.defineClass} method calls
|
||||||
@code{VMClassLoader.defineClass}. The @code{InstrumentationImpl} class defines
|
the @code{VMClassLoader.defineClassWithTransformers} method which first checks
|
||||||
a method that has to be called before reading a class file in the VM.
|
if @code{VMClassLoader.instrumenter} is @code{null}. If it's the case, it
|
||||||
|
directly calls @code{VMClassLoader.defineClass}. If it's not the case, the
|
||||||
|
method calls at first the @code{InstrumentationImpl.callTransformers} method,
|
||||||
|
which calls each transformer registered to the @code{InstrumentationImpl}
|
||||||
|
object and returns a new bytecode array. Then, it calls the
|
||||||
|
@code{VMClassLoader.defineClass} method with this new bytecode array.
|
||||||
|
|
||||||
|
The second use of instrumentation is to redefine a class after it has been
|
||||||
|
loaded by the VM. This is done in the Java application by calling the
|
||||||
|
@code{Instrumentation.redefineClasses} method of the standard interface on
|
||||||
|
a @code{Instrumentation} object. The @code{InstrumentationImpl.redefineClasses}
|
||||||
|
method calls the @code{VMInstrumentationImpl.redefineClasses} native method
|
||||||
|
which must be implemented by the VM. The implementation should call the
|
||||||
|
@code{InstrumentationImpl.callTransformers} method.
|
||||||
|
|
||||||
|
@node java.lang.VMMath, , java.lang.VMInstrumentationImpl, java.lang
|
||||||
|
@subsection @code{java.lang.VMMath}
|
||||||
|
|
||||||
|
The @code{VMMath} class provides a series of native methods
|
||||||
|
for some of the mathematical functions present in @code{java.lang.Math}.
|
||||||
|
Classpath provides a default implementation of these which maps the
|
||||||
|
functions to those provided by @code{fdlibm}. VM implementors are welcome
|
||||||
|
to replace this with more efficent implementations, as long as the accuracy
|
||||||
|
contract of these methods, specified in @code{java.lang.Math}, is maintained.
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item @code{callTransformers} -- Calls each transformer registered to
|
@item 1.0
|
||||||
the @code{InstrumentationImpl} object and returns a new bytecode file.
|
@itemize @bullet
|
||||||
|
@item @code{sin(double)} -- Returns the sine value for the given angle.
|
||||||
|
@item @code{cos(double)} -- Returns the cosine value for the given angle.
|
||||||
|
@item @code{tan(double)} -- Returns the tangent value for the given angle.
|
||||||
|
@item @code{asin(double)} -- Returns the arc sine value for the given angle.
|
||||||
|
@item @code{acos(double)} -- Returns the arc cosine value for the given angle.
|
||||||
|
@item @code{atan(double)} -- Returns the arc tangent value for the given angle.
|
||||||
|
@item @code{atan2(double,double)} -- Returns the arc tangent of the ratio of
|
||||||
|
the two arguments.
|
||||||
|
@item @code{exp(double)} -- Returns the exponent raised to the given power.
|
||||||
|
@item @code{log(double)} -- Returns the natural logarithm for the given value.
|
||||||
|
@item @code{sqrt(double)} -- Returns the square root of the value.
|
||||||
|
@item @code{pow(double,double)} -- Returns x to the power of y.
|
||||||
|
@item @code{IEEEremainder(double,double)} -- Returns the IEEE 754 remainder
|
||||||
|
for the two values.
|
||||||
|
@item @code{ceil(double)} -- Returns the nearest integer >= the value.
|
||||||
|
@item @code{floor(double)} -- Returns the nearest integer <= the value.
|
||||||
|
@item @code{rint(double)} -- Returns the nearest integer or the even one
|
||||||
|
if the distance between the two is equal.
|
||||||
|
@end itemize
|
||||||
|
@item 1.5
|
||||||
|
@itemize @bullet
|
||||||
|
@item @code{cbrt(double)} -- Returns the cube root of the value.
|
||||||
|
@item @code{cosh(double)} -- Returns the hyperbolic cosine value for the given
|
||||||
|
angle.
|
||||||
|
@item @code{expm1(double)} -- Returns the exponent of the value minus one.
|
||||||
|
@item @code{hypot(double,double)} -- Returns the hypotenuse corresponding to
|
||||||
|
x and y.
|
||||||
|
@item @code{log10(double)} -- Returns the base 10 logarithm of the given value.
|
||||||
|
@item @code{log1p(double)} -- Returns the natural logarithm of the value plus
|
||||||
|
one.
|
||||||
|
@item @code{sinh(double)} -- Returns the hyperbolic sine value for the given
|
||||||
|
angle.
|
||||||
|
@item @code{tanh(double)} -- Returns the hyperbolic tangent value for the given angle.
|
||||||
|
@end itemize
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
No default implementation is provided in gnu classpath for the
|
|
||||||
@code{VMInstrumentationImpl} methods. A default implementation will perhaps
|
|
||||||
be written, but it might break the @code{ClassLoader/VMClassLoader} interface
|
|
||||||
for calling the @code{InstrumentationImpl.callTransformers} when a class byte
|
|
||||||
code is defined with @code{ClassLoader.defineClass}.
|
|
||||||
|
|
||||||
@node gnu.classpath, java.util, java.lang, Classpath Hooks
|
@node gnu.classpath, java.util, java.lang, Classpath Hooks
|
||||||
@section @code{gnu.classpath}
|
@section @code{gnu.classpath}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,289 @@
|
||||||
|
#!wml --include=..
|
||||||
|
|
||||||
|
#use wml::std::page
|
||||||
|
#use wml::std::lang
|
||||||
|
#use wml::fmt::isolatin
|
||||||
|
#use wml::std::case global=upper
|
||||||
|
|
||||||
|
<lang:star:slice:>
|
||||||
|
|
||||||
|
<set-var last-modified-author="mjw">
|
||||||
|
|
||||||
|
#include <include/macros.wml>
|
||||||
|
|
||||||
|
<header title="GNU Classpath 0.20 Announcement (2006-01-13)">
|
||||||
|
<pre>
|
||||||
|
GNU Classpath 0.20 released
|
||||||
|
|
||||||
|
GNU Classpath, essential libraries for java, is a project to create
|
||||||
|
free core class libraries for use with runtimes, compilers and tools
|
||||||
|
for the java programming language.
|
||||||
|
|
||||||
|
The GNU Classpath developer snapshot releases are not directly aimed
|
||||||
|
at the end user but are meant to be integrated into larger development
|
||||||
|
platforms. For example the GCC (gcj) and Kaffe projects will use the
|
||||||
|
developer snapshots as a base for future versions. More projects based
|
||||||
|
on GNU Classpath: http://www.gnu.org/software/classpath/stories.html
|
||||||
|
|
||||||
|
Some highlights of changes in this release (more extensive list below):
|
||||||
|
|
||||||
|
New StAX pull parser and SAX-over-StAX driver. Full XMLEncoder
|
||||||
|
implementation. The packages javax.sound.sampled, javax.print.attribute
|
||||||
|
and javax.print.event have been implemented. Lots of new datatransfer,
|
||||||
|
print, swing and swing.text work. Performance improvements in the
|
||||||
|
painting/layout mechanism. Additional 1.5 support, including (separate)
|
||||||
|
generic branch release. SecurityManager cleanups and start of review
|
||||||
|
of all Permission checks. Buildable on cygwin. Fully buildable as
|
||||||
|
"in-workspace" library-plus-vm inside (native) Eclipse. Real world
|
||||||
|
Free Swing and CORBA example added.
|
||||||
|
|
||||||
|
GNU Classpath 0.20 also comes in a "generic" version.
|
||||||
|
classpath-0.20-generics contains a version of the core library
|
||||||
|
that uses the new 1.5 language features such as generics and
|
||||||
|
enumerations. ECJ, JamVM, IKVM and Cacao are known to support the
|
||||||
|
generics release (*). And you should be able to run Eclipse 3.1 with
|
||||||
|
it to develop programs that use the new 1.5 language and core library
|
||||||
|
additions. classpath-generics is a work in progress and not as
|
||||||
|
extensively tested as our regular releases. But please try it out if
|
||||||
|
you want to help us test the new 1.5 support of the core libraries.
|
||||||
|
|
||||||
|
(*) There is one additional VM interface needed for the VMClassLoader
|
||||||
|
static final Class defineClassWithTransformers(ClassLoader loader,
|
||||||
|
String name, byte[] data, int offset, int len, ProtectionDomain pd)
|
||||||
|
Which is used for the new java.management.instrumentation support.
|
||||||
|
See the VM Integration Guide for more details:
|
||||||
|
http://www.gnu.org/software/classpath/docs/vmintegration.html
|
||||||
|
|
||||||
|
Thanks to a donation of Berkeley Signal Inc GNU Classpath now has an
|
||||||
|
official autobuilder machine which is used for quality assurance,
|
||||||
|
regression testing, conformance reports and for publishing continous
|
||||||
|
snapshots. The machine can be reached as http://builder.classpath.org/
|
||||||
|
|
||||||
|
40 people actively contributed to this release and made
|
||||||
|
605 CVS commits during the last two months of development
|
||||||
|
(excluding the generics branch work). diffstat since 0.19:
|
||||||
|
617 files changed, 89622 insertions(+), 37478 deletions(-)
|
||||||
|
|
||||||
|
More details about the various changes and contributions below.
|
||||||
|
|
||||||
|
A full list of bug reports fixed for this release can be found at:
|
||||||
|
http://gcc.gnu.org/bugzilla/buglist.cgi?product=classpath&target_milestone=0.20
|
||||||
|
|
||||||
|
The GNU Classpath developers site http://developer.classpath.org/
|
||||||
|
provides detailed information on how to start with helping the GNU
|
||||||
|
Classpath project and gives an overview of the core class library
|
||||||
|
packages currently provided. For each snapshot release generated
|
||||||
|
documentation is provided through the GNU Classpath Tools gjdoc
|
||||||
|
project. A documentation generation framework for java source
|
||||||
|
files used by the GNU project. Full documentation on the currently
|
||||||
|
implementated packages and classes can be found at:
|
||||||
|
http://developer.classpath.org/doc/
|
||||||
|
|
||||||
|
For more information about the project see also:
|
||||||
|
|
||||||
|
- GNU Classpath home page:
|
||||||
|
http://www.gnu.org/software/classpath/
|
||||||
|
|
||||||
|
- Developer information (wiki):
|
||||||
|
http://developer.classpath.org/
|
||||||
|
|
||||||
|
- Full class documentation
|
||||||
|
http://developer.classpath.org/doc/
|
||||||
|
|
||||||
|
- GNU Classpath hackers:
|
||||||
|
http://planet.classpath.org/
|
||||||
|
|
||||||
|
- Autobuilder, current build status, build snapshots:
|
||||||
|
http://builder.classpath.org/
|
||||||
|
|
||||||
|
- Application test pages (wiki)
|
||||||
|
http://developer.classpath.org/mediation/FreeAWTTestApps
|
||||||
|
http://developer.classpath.org/mediation/FreeSwingTestApps
|
||||||
|
http://developer.classpath.org/mediation/FreeSWTTestApps
|
||||||
|
|
||||||
|
- GNU Classpath hacking with Eclipse (wiki)
|
||||||
|
http://developer.classpath.org/mediation/ClasspathHackingWithEclipse
|
||||||
|
|
||||||
|
- GNU Classpath promotion banners:
|
||||||
|
http://developer.classpath.org/mediation/ClasspathBanners
|
||||||
|
|
||||||
|
- GNU Classpath and Friends meeting (Feb 25/26, Brussels, Fosdem):
|
||||||
|
http://www.gnu.org/software/classpath/events/fosdem06.html
|
||||||
|
|
||||||
|
This release depends on gtk+ 2.4 for AWT support. But gtk+ 2.6 or
|
||||||
|
higher is recommended. Included, but not activated by default in this
|
||||||
|
release is a Graphics2D implementation based on the Cairo Graphics
|
||||||
|
framework (http://www.cairographics.org). Enabling this makes programs
|
||||||
|
like JFreeChart and JEdit start up on GNU Classpath based runtimes.
|
||||||
|
To enable this support install the cairo 0.5.x snapshot, configure GNU
|
||||||
|
Classpath with --enable-gtk-cairo.
|
||||||
|
|
||||||
|
One of the major focuses of the GNU Classpath project is expanding and
|
||||||
|
using the Mauve test suite for Compatibility, Completeness and
|
||||||
|
Correctness checking. Various groups around GNU Classpath collaborate
|
||||||
|
on the free software Mauve test suite which contains around 36.000
|
||||||
|
core library tests. Mauve has various modules for testing core class
|
||||||
|
library implementations, byte code verifiers, source to byte code and
|
||||||
|
native code compiler tests. Mauve also contains the Wonka visual test
|
||||||
|
suite and the Jacks Compiler Killer Suite.
|
||||||
|
See for more information: http://www.sourceware.org/mauve/
|
||||||
|
This release passes 35534 out of 36255 Mauve core library tests.
|
||||||
|
|
||||||
|
Conformance reports for the included jaxp support can be found in the
|
||||||
|
doc/README.jaxp file.
|
||||||
|
|
||||||
|
GNU Classpath 0.20 can be downloaded from
|
||||||
|
ftp://ftp.gnu.org/pub/gnu/classpath/
|
||||||
|
or one of the ftp.gnu.org mirrors
|
||||||
|
http://www.gnu.org/order/ftp.html
|
||||||
|
|
||||||
|
File: classpath-0.20.tar.gz
|
||||||
|
MD5sum: 21e34b8e8acb4f7b31296bfaf4ad560a
|
||||||
|
SHA1sum: c1a38c6c6b67d8c8092cc6af6d86d8c99dad272a
|
||||||
|
|
||||||
|
File: classpath-0.20-generics.tar.gz (EXPERIMENTAL)
|
||||||
|
MD5sum: db3c235b1ea497d7d2e5852f167d2b31
|
||||||
|
SHA1sum: 3d5f5cdd3dc51651f8b2c3765e30454931f45419
|
||||||
|
|
||||||
|
New in release 0.20 (Jan 13, 2006)
|
||||||
|
(See the ChangeLog file for a full list of changes.)
|
||||||
|
|
||||||
|
* New StAX pull parser and SAX-over-StAX driver. Lots of DOM, SAX/StAX,
|
||||||
|
XPath and XSLT improvements. Support for XInclude and XML Base added.
|
||||||
|
Conformance is now regularly tested against various test-suites at
|
||||||
|
http://builder.classpath.org/xml/ See also doc/README.jaxp.
|
||||||
|
|
||||||
|
* Full beans XMLEncoder implementation.
|
||||||
|
|
||||||
|
* javax.sound.sampled implementation.
|
||||||
|
|
||||||
|
* javax.print.attribute and javax.print.event implementated.
|
||||||
|
|
||||||
|
* Lots of new datatransfer, print swing and swing.text work and optimization.
|
||||||
|
|
||||||
|
* Additional 1.5 support. Including new (separate) generic branch release.
|
||||||
|
|
||||||
|
* SecurityManager cleanups and start of review of all Permission checks
|
||||||
|
(includes adding lots of new checks to the Mauve test-suite).
|
||||||
|
|
||||||
|
* Buildable on cygwin.
|
||||||
|
|
||||||
|
* Fully buildable as "in-workspace" library-plus-vm inside (native) Eclipse
|
||||||
|
see http://developer.classpath.org/mediation/ClasspathHackingWithEclipse
|
||||||
|
|
||||||
|
* Full example that shows a real world CORBA and Free Swing implementation.
|
||||||
|
See examples/gnu/classpath/examples/CORBA/swing/README.html
|
||||||
|
|
||||||
|
Runtime interface changes:
|
||||||
|
|
||||||
|
* New method VMStackWalker.getClassLoader() was added to avoid an infinite
|
||||||
|
loop between getCallingClassLoader() and Class.getClassLoader().
|
||||||
|
|
||||||
|
* The included fdlibm implementation has seen several cleanups to handle
|
||||||
|
new architectures and namespacing issues (in particular for ppc, darwin
|
||||||
|
and non-C99 compilers). Please double check any arithmetic test against
|
||||||
|
new platforms/runtimes.
|
||||||
|
|
||||||
|
* The gnu.java.net.Plain[Datagram]Socket implementations have been
|
||||||
|
turned into VM reference classes with JNI/Posix implementations.
|
||||||
|
|
||||||
|
New/Untested/Disabled Features:
|
||||||
|
|
||||||
|
The following new features are included, but not ready for
|
||||||
|
production yet. They are explicitly disabled and not supported. But
|
||||||
|
if you want to help with the development of these new features we
|
||||||
|
are interested in feedback. You will have to explicitly enable them
|
||||||
|
to try them out (and they will most likely contain bugs). If you are
|
||||||
|
interested in any of these then please join the mailing-list and
|
||||||
|
follow development in CVS.
|
||||||
|
|
||||||
|
* Cairo Gtk+ Graphics2D support, enabled by giving configure
|
||||||
|
--enable-gtk-cairo.
|
||||||
|
* QT4 AWT peers, enable by giving configure --enable-qt-peer.
|
||||||
|
|
||||||
|
The following people helped with this release:
|
||||||
|
|
||||||
|
Andreas Tobler
|
||||||
|
Qt-4.1 support
|
||||||
|
Andrew Haley
|
||||||
|
Jar work and Jonas fixes
|
||||||
|
Andrew John Hughes
|
||||||
|
1.5 generics language work
|
||||||
|
Anthony Balkissoon
|
||||||
|
Free Swing work
|
||||||
|
Anthony Green
|
||||||
|
Socket work
|
||||||
|
Archie Cobbs
|
||||||
|
New VMStackWalker work and JCVM integration
|
||||||
|
Audrius Meskauskas
|
||||||
|
Free CORBA work and various Free Swing fixes
|
||||||
|
Bryce McKinlay
|
||||||
|
Jar fixes
|
||||||
|
Caolan McNamara
|
||||||
|
Dom fixes and OpenOffice fixes
|
||||||
|
Casey Marshall
|
||||||
|
Crypto work
|
||||||
|
Chris Burdess
|
||||||
|
XML GNU JAXP work
|
||||||
|
Christian Thalinger
|
||||||
|
Various fixes, 64bit work and Cacao integration
|
||||||
|
Dalibor Topic
|
||||||
|
Build cleanups and Kaffe integration
|
||||||
|
David Daney
|
||||||
|
libgcj integration
|
||||||
|
David Gilbert
|
||||||
|
Free Swing work
|
||||||
|
Freebeans
|
||||||
|
Mysaifu Windows CE port and bug reports
|
||||||
|
Fridjof Siebert
|
||||||
|
Hashtable work
|
||||||
|
Gary Benson
|
||||||
|
Securitymanager and Permission work
|
||||||
|
Guilhem Lavaux
|
||||||
|
fdlibm cleanups, performance work and Kaffe integration
|
||||||
|
Ingo Proetel
|
||||||
|
Various fixes
|
||||||
|
Ito Kazumitsu
|
||||||
|
Regex, text and character conversion support
|
||||||
|
Jan Roehrich
|
||||||
|
Datatransfer work
|
||||||
|
Jeroen Frijters
|
||||||
|
SecurityManager, collections and IKVM integration
|
||||||
|
Joao Victor
|
||||||
|
Free Swing Timer work
|
||||||
|
John Zigman
|
||||||
|
SocketChannel testing
|
||||||
|
Keith Seitz
|
||||||
|
JDWP work
|
||||||
|
Lillian Angel
|
||||||
|
Free Swing work
|
||||||
|
Mark Wielaard
|
||||||
|
Bug fixes, packaging and release management
|
||||||
|
Nicolas Geoffray
|
||||||
|
1.5 Class Instrumentation work
|
||||||
|
Paul Jenner
|
||||||
|
Installation and cygwin work
|
||||||
|
Petteri Raty
|
||||||
|
Configuration and Gentoo integration work
|
||||||
|
Raif S. Naffah
|
||||||
|
Security work and Eclipse integration
|
||||||
|
Riccardo Mottola
|
||||||
|
Powerpc work
|
||||||
|
Robert Schuster
|
||||||
|
XMLEncoder and beans work
|
||||||
|
Roman Kennke
|
||||||
|
Free Swing and AWT work, VM interface
|
||||||
|
Roman Schnider
|
||||||
|
AWT work
|
||||||
|
Sven de Marothy
|
||||||
|
Print and GTK+ work
|
||||||
|
Thomas Fitzsimmons
|
||||||
|
Free Swing and AWT work
|
||||||
|
Tom Tromey
|
||||||
|
Eclipse, gcj and gcjx integration
|
||||||
|
Wolfgang Baer
|
||||||
|
javax.print and friends
|
||||||
|
|
||||||
|
We would also like to thank the numerous bug reporters and testers!
|
||||||
|
</pre>
|
||||||
|
<footer>
|
||||||
|
|
@ -77,10 +77,10 @@ sub mylink {
|
||||||
<download-block>
|
<download-block>
|
||||||
|
|
||||||
<download
|
<download
|
||||||
date="02 November 2005"
|
date="13 January 2006"
|
||||||
version="0.19"
|
version="0.20"
|
||||||
url="ftp://ftp.gnu.org/gnu/classpath/classpath-0.19.tar.gz"
|
url="ftp://ftp.gnu.org/gnu/classpath/classpath-0.20.tar.gz"
|
||||||
notes="http://www.gnu.org/software/classpath/announce/20051102.html"
|
notes="http://www.gnu.org/software/classpath/announce/20060113.html"
|
||||||
>
|
>
|
||||||
|
|
||||||
<!-- download
|
<!-- download
|
||||||
|
|
@ -99,6 +99,12 @@ sub mylink {
|
||||||
<boxitem>
|
<boxitem>
|
||||||
|
|
||||||
<download-block>
|
<download-block>
|
||||||
|
<download
|
||||||
|
date="02 November 2005"
|
||||||
|
version="0.19"
|
||||||
|
url="ftp://ftp.gnu.org/gnu/classpath/classpath-0.19.tar.gz"
|
||||||
|
notes="http://www.gnu.org/software/classpath/announce/20051102.html"
|
||||||
|
>
|
||||||
<download
|
<download
|
||||||
date="06 September 2005"
|
date="06 September 2005"
|
||||||
version="0.18"
|
version="0.18"
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,11 @@
|
||||||
url="events/fosdem06.html">
|
url="events/fosdem06.html">
|
||||||
</newsitem>
|
</newsitem>
|
||||||
|
|
||||||
|
<newsitem date="13 Jan 2006">
|
||||||
|
<createlink name="GNU Classpath 0.20"
|
||||||
|
url="announce/20060113.html">
|
||||||
|
</newsitem>
|
||||||
|
|
||||||
<newsitem date="02 Nov 2005">
|
<newsitem date="02 Nov 2005">
|
||||||
<createlink name="GNU Classpath 0.19"
|
<createlink name="GNU Classpath 0.19"
|
||||||
url="announce/20051102.html">
|
url="announce/20051102.html">
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,10 @@ $(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES)
|
||||||
mkdir -p classes/gnu/classpath/examples/icons
|
mkdir -p classes/gnu/classpath/examples/icons
|
||||||
cp $(EXAMPLE_ICONS) classes/gnu/classpath/examples/icons
|
cp $(EXAMPLE_ICONS) classes/gnu/classpath/examples/icons
|
||||||
$(JCOMPILER) -d classes $(EXAMPLE_JAVA_FILES)
|
$(JCOMPILER) -d classes $(EXAMPLE_JAVA_FILES)
|
||||||
cd classes; $(ZIP) -r ../$(EXAMPLE_ZIP) .; cd ..
|
(cd classes; \
|
||||||
|
if test "$(ZIP)" != ""; then $(ZIP) -r ../$(EXAMPLE_ZIP) .; fi; \
|
||||||
|
if test "$(FASTJAR)" != ""; then $(FASTJAR) cf ../$(EXAMPLE_ZIP) .; fi; \
|
||||||
|
cd ..)
|
||||||
rm -rf classes
|
rm -rf classes
|
||||||
|
|
||||||
# Zip file be gone! (and make sure the classes are gone too)
|
# Zip file be gone! (and make sure the classes are gone too)
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,7 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CLASSPATH_INCLUDES = @CLASSPATH_INCLUDES@
|
CLASSPATH_INCLUDES = @CLASSPATH_INCLUDES@
|
||||||
CLASSPATH_MODULE = @CLASSPATH_MODULE@
|
CLASSPATH_MODULE = @CLASSPATH_MODULE@
|
||||||
|
COLLECTIONS_PREFIX = @COLLECTIONS_PREFIX@
|
||||||
CP = @CP@
|
CP = @CP@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
|
@ -89,6 +90,8 @@ CREATE_ALSA_LIBRARIES_FALSE = @CREATE_ALSA_LIBRARIES_FALSE@
|
||||||
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
|
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
|
||||||
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
|
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
|
||||||
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
|
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
|
||||||
|
CREATE_COLLECTIONS_FALSE = @CREATE_COLLECTIONS_FALSE@
|
||||||
|
CREATE_COLLECTIONS_TRUE = @CREATE_COLLECTIONS_TRUE@
|
||||||
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
|
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
|
||||||
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
|
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
|
||||||
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
|
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
|
||||||
|
|
@ -119,6 +122,7 @@ EGREP = @EGREP@
|
||||||
ERROR_CFLAGS = @ERROR_CFLAGS@
|
ERROR_CFLAGS = @ERROR_CFLAGS@
|
||||||
EXAMPLESDIR = @EXAMPLESDIR@
|
EXAMPLESDIR = @EXAMPLESDIR@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
FASTJAR = @FASTJAR@
|
||||||
FIND = @FIND@
|
FIND = @FIND@
|
||||||
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
|
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
|
||||||
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
|
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
|
||||||
|
|
@ -130,6 +134,8 @@ FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
|
||||||
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
|
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
|
||||||
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
|
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
|
||||||
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
|
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
|
||||||
|
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
|
||||||
|
FREETYPE2_LIBS = @FREETYPE2_LIBS@
|
||||||
GCJ = @GCJ@
|
GCJ = @GCJ@
|
||||||
GCJX = @GCJX@
|
GCJX = @GCJX@
|
||||||
GJDOC = @GJDOC@
|
GJDOC = @GJDOC@
|
||||||
|
|
@ -180,6 +186,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
||||||
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PERL = @PERL@
|
||||||
PKG_CONFIG = @PKG_CONFIG@
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
QT_CFLAGS = @QT_CFLAGS@
|
QT_CFLAGS = @QT_CFLAGS@
|
||||||
QT_LIBS = @QT_LIBS@
|
QT_LIBS = @QT_LIBS@
|
||||||
|
|
@ -532,7 +539,10 @@ $(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES)
|
||||||
mkdir -p classes/gnu/classpath/examples/icons
|
mkdir -p classes/gnu/classpath/examples/icons
|
||||||
cp $(EXAMPLE_ICONS) classes/gnu/classpath/examples/icons
|
cp $(EXAMPLE_ICONS) classes/gnu/classpath/examples/icons
|
||||||
$(JCOMPILER) -d classes $(EXAMPLE_JAVA_FILES)
|
$(JCOMPILER) -d classes $(EXAMPLE_JAVA_FILES)
|
||||||
cd classes; $(ZIP) -r ../$(EXAMPLE_ZIP) .; cd ..
|
(cd classes; \
|
||||||
|
if test "$(ZIP)" != ""; then $(ZIP) -r ../$(EXAMPLE_ZIP) .; fi; \
|
||||||
|
if test "$(FASTJAR)" != ""; then $(FASTJAR) cf ../$(EXAMPLE_ZIP) .; fi; \
|
||||||
|
cd ..)
|
||||||
rm -rf classes
|
rm -rf classes
|
||||||
|
|
||||||
# Zip file be gone! (and make sure the classes are gone too)
|
# Zip file be gone! (and make sure the classes are gone too)
|
||||||
|
|
|
||||||
|
|
@ -433,7 +433,6 @@ public class PlayingDesk
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
blacks.add(new Point(x, y));
|
blacks.add(new Point(x, y));
|
||||||
repaint();
|
|
||||||
|
|
||||||
if (victory != null)
|
if (victory != null)
|
||||||
{
|
{
|
||||||
|
|
@ -447,7 +446,8 @@ public class PlayingDesk
|
||||||
frame.talk(Color.black, "Partner goes " + x + "-" + y
|
frame.talk(Color.black, "Partner goes " + x + "-" + y
|
||||||
+ ". Your move?");
|
+ ". Your move?");
|
||||||
player.set_current_state(I_THINK);
|
player.set_current_state(I_THINK);
|
||||||
}
|
}
|
||||||
|
repaint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (RemoteException rex)
|
catch (RemoteException rex)
|
||||||
|
|
|
||||||
|
|
@ -57,13 +57,8 @@ import org.omg.PortableServer.Servant;
|
||||||
* Tie on the client side. The Game Manager methods contain the code for remote
|
* Tie on the client side. The Game Manager methods contain the code for remote
|
||||||
* invocation.
|
* invocation.
|
||||||
*
|
*
|
||||||
* This class is normally generated with rmic from the {@link GameManagerImpl}:
|
* This class is normally generated with rmic or grmic from the
|
||||||
*
|
* {@link GameManagerImpl}. See tools/gnu/classpath/tools/giop/README.
|
||||||
* <pre>
|
|
||||||
* rmic -iiop -poa -keep gnu.classpath.examples.CORBA.swing.x5.GameManagerImpl
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* (the compiled package must be present in the current folder).
|
|
||||||
*
|
*
|
||||||
* In this example the class was manually edited and commented for better
|
* In this example the class was manually edited and commented for better
|
||||||
* understanding of functionality.
|
* understanding of functionality.
|
||||||
|
|
|
||||||
|
|
@ -58,11 +58,8 @@ import org.omg.PortableServer.Servant;
|
||||||
* rmic -iiop -poa -keep gnu.classpath.examples.CORBA.swing.x5.PlayerImpl
|
* rmic -iiop -poa -keep gnu.classpath.examples.CORBA.swing.x5.PlayerImpl
|
||||||
* (the compiled package must be present in the current folder).
|
* (the compiled package must be present in the current folder).
|
||||||
*
|
*
|
||||||
* This class is normally generated with rmic from the {@link PlayerImpl}:
|
* This class is normally generated with rmic or grmic from the
|
||||||
* <pre>
|
* {@link PlayerImpl}. See tools/gnu/classpath/tools/giop/README.
|
||||||
* rmic -iiop -poa -keep gnu.classpath.examples.CORBA.swing.x5.PlayerImpl
|
|
||||||
* </pre>
|
|
||||||
* (the compiled package must be present in the current folder).
|
|
||||||
*
|
*
|
||||||
* In this example the class was manually edited and commented for better
|
* In this example the class was manually edited and commented for better
|
||||||
* understanding of functionality.
|
* understanding of functionality.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* ButtonDemo.java -- An example showing various buttons in Swing.
|
/* ButtonDemo.java -- An example showing various buttons in Swing.
|
||||||
Copyright (C) 2005, Free Software Foundation, Inc.
|
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath examples.
|
This file is part of GNU Classpath examples.
|
||||||
|
|
||||||
|
|
@ -46,6 +46,8 @@ public class ButtonDemo
|
||||||
implements ActionListener
|
implements ActionListener
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private JPanel content;
|
||||||
|
|
||||||
private JCheckBox buttonState;
|
private JCheckBox buttonState;
|
||||||
private JButton button1;
|
private JButton button1;
|
||||||
private JButton button2;
|
private JButton button2;
|
||||||
|
|
@ -77,6 +79,19 @@ public class ButtonDemo
|
||||||
{
|
{
|
||||||
super(title);
|
super(title);
|
||||||
JPanel content = createContent();
|
JPanel content = createContent();
|
||||||
|
// initFrameContent() is only called (from main) when running this app
|
||||||
|
// standalone
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When the demo is run independently, the frame is displayed, so we should
|
||||||
|
* initialise the content panel (including the demo content and a close
|
||||||
|
* button). But when the demo is run as part of the Swing activity board,
|
||||||
|
* only the demo content panel is used, the frame itself is never displayed,
|
||||||
|
* so we can avoid this step.
|
||||||
|
*/
|
||||||
|
public void initFrameContent()
|
||||||
|
{
|
||||||
JPanel closePanel = new JPanel();
|
JPanel closePanel = new JPanel();
|
||||||
JButton closeButton = new JButton("Close");
|
JButton closeButton = new JButton("Close");
|
||||||
closeButton.setActionCommand("CLOSE");
|
closeButton.setActionCommand("CLOSE");
|
||||||
|
|
@ -95,13 +110,16 @@ public class ButtonDemo
|
||||||
*/
|
*/
|
||||||
JPanel createContent()
|
JPanel createContent()
|
||||||
{
|
{
|
||||||
JPanel content = new JPanel(new BorderLayout());
|
if (content == null)
|
||||||
JPanel panel = new JPanel(new GridLayout(4, 1));
|
{
|
||||||
panel.add(createButtonPanel());
|
content = new JPanel(new BorderLayout());
|
||||||
panel.add(createTogglePanel());
|
JPanel panel = new JPanel(new GridLayout(4, 1));
|
||||||
panel.add(createCheckBoxPanel());
|
panel.add(createButtonPanel());
|
||||||
panel.add(createRadioPanel());
|
panel.add(createTogglePanel());
|
||||||
content.add(panel);
|
panel.add(createCheckBoxPanel());
|
||||||
|
panel.add(createRadioPanel());
|
||||||
|
content.add(panel);
|
||||||
|
}
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -277,6 +295,7 @@ public class ButtonDemo
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
ButtonDemo app = new ButtonDemo("Button Demo");
|
ButtonDemo app = new ButtonDemo("Button Demo");
|
||||||
|
app.initFrameContent();
|
||||||
app.pack();
|
app.pack();
|
||||||
app.setVisible(true);
|
app.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* ComboBoxDemo.java -- An example showing various combo boxes in Swing.
|
/* ComboBoxDemo.java -- An example showing various combo boxes in Swing.
|
||||||
Copyright (C) 2005, Free Software Foundation, Inc.
|
Copyright (C) 2005, 2006, Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath examples.
|
This file is part of GNU Classpath examples.
|
||||||
|
|
||||||
|
|
@ -69,6 +69,7 @@ public class ComboBoxDemo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private JPanel content;
|
||||||
private JCheckBox comboState1;
|
private JCheckBox comboState1;
|
||||||
private JComboBox combo1;
|
private JComboBox combo1;
|
||||||
private JComboBox combo2;
|
private JComboBox combo2;
|
||||||
|
|
@ -102,6 +103,19 @@ public class ComboBoxDemo
|
||||||
{
|
{
|
||||||
super(title);
|
super(title);
|
||||||
JPanel content = createContent();
|
JPanel content = createContent();
|
||||||
|
// initFrameContent() is only called (from main) when running this app
|
||||||
|
// standalone
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When the demo is run independently, the frame is displayed, so we should
|
||||||
|
* initialise the content panel (including the demo content and a close
|
||||||
|
* button). But when the demo is run as part of the Swing activity board,
|
||||||
|
* only the demo content panel is used, the frame itself is never displayed,
|
||||||
|
* so we can avoid this step.
|
||||||
|
*/
|
||||||
|
public void initFrameContent()
|
||||||
|
{
|
||||||
JPanel closePanel = new JPanel();
|
JPanel closePanel = new JPanel();
|
||||||
JButton closeButton = new JButton("Close");
|
JButton closeButton = new JButton("Close");
|
||||||
closeButton.setActionCommand("CLOSE");
|
closeButton.setActionCommand("CLOSE");
|
||||||
|
|
@ -120,15 +134,18 @@ public class ComboBoxDemo
|
||||||
*/
|
*/
|
||||||
JPanel createContent()
|
JPanel createContent()
|
||||||
{
|
{
|
||||||
JPanel content = new JPanel(new BorderLayout());
|
if (content == null)
|
||||||
JPanel panel = new JPanel(new GridLayout(6, 1));
|
{
|
||||||
panel.add(createPanel1());
|
content = new JPanel(new BorderLayout());
|
||||||
panel.add(createPanel2());
|
JPanel panel = new JPanel(new GridLayout(6, 1));
|
||||||
panel.add(createPanel3());
|
panel.add(createPanel1());
|
||||||
panel.add(createPanel4());
|
panel.add(createPanel2());
|
||||||
panel.add(createPanel5());
|
panel.add(createPanel3());
|
||||||
panel.add(createPanel6());
|
panel.add(createPanel4());
|
||||||
content.add(panel);
|
panel.add(createPanel5());
|
||||||
|
panel.add(createPanel6());
|
||||||
|
content.add(panel);
|
||||||
|
}
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -353,6 +370,7 @@ public class ComboBoxDemo
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
ComboBoxDemo app = new ComboBoxDemo("ComboBox Demo");
|
ComboBoxDemo app = new ComboBoxDemo("ComboBox Demo");
|
||||||
|
app.initFrameContent();
|
||||||
app.pack();
|
app.pack();
|
||||||
app.setVisible(true);
|
app.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* SwingDemo.java -- An example of using the javax.swing UI.
|
/* SwingDemo.java -- An example of using the javax.swing UI.
|
||||||
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath examples.
|
This file is part of GNU Classpath examples.
|
||||||
|
|
||||||
|
|
@ -163,18 +163,6 @@ public class Demo
|
||||||
new PopUpAction("Buttons",
|
new PopUpAction("Buttons",
|
||||||
(new ButtonDemo("Button Demo")).createContent(),
|
(new ButtonDemo("Button Demo")).createContent(),
|
||||||
examples);
|
examples);
|
||||||
|
|
||||||
new PopUpAction("Toggles",
|
|
||||||
mkToggle("cool and refreshing"),
|
|
||||||
examples);
|
|
||||||
|
|
||||||
new PopUpAction("Checkbox",
|
|
||||||
mkCheckbox("ice cold"),
|
|
||||||
examples);
|
|
||||||
|
|
||||||
new PopUpAction("Radio",
|
|
||||||
mkRadio("delicious"),
|
|
||||||
examples);
|
|
||||||
|
|
||||||
new PopUpAction("Slider",
|
new PopUpAction("Slider",
|
||||||
(new SliderDemo("Slider Demo")).createContent(),
|
(new SliderDemo("Slider Demo")).createContent(),
|
||||||
|
|
@ -214,8 +202,7 @@ public class Demo
|
||||||
examples);
|
examples);
|
||||||
|
|
||||||
new PopUpAction("Spinner",
|
new PopUpAction("Spinner",
|
||||||
mkSpinner(),
|
new SpinnerDemo("Spinner Demo").createContent(), examples);
|
||||||
examples);
|
|
||||||
|
|
||||||
new PopUpAction("TextField",
|
new PopUpAction("TextField",
|
||||||
(new TextFieldDemo("TextField Demo")).createContent(),
|
(new TextFieldDemo("TextField Demo")).createContent(),
|
||||||
|
|
@ -715,6 +702,7 @@ public class Demo
|
||||||
main.add(mkButtonBar());
|
main.add(mkButtonBar());
|
||||||
component.add(main, BorderLayout.CENTER);
|
component.add(main, BorderLayout.CENTER);
|
||||||
frame.pack();
|
frame.pack();
|
||||||
|
frame.setSize(800, 600);
|
||||||
frame.show();
|
frame.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -732,26 +720,6 @@ public class Demo
|
||||||
SwingUtilities.invokeLater(new LaterMain());
|
SwingUtilities.invokeLater(new LaterMain());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static JCheckBox mkCheckbox(String label)
|
|
||||||
{
|
|
||||||
JCheckBox c = new JCheckBox(label);
|
|
||||||
c.setFont(new Font("Luxi", Font.PLAIN, 14));
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static JPanel mkRadio(String label)
|
|
||||||
{
|
|
||||||
JPanel p = new JPanel();
|
|
||||||
JRadioButton c = new JRadioButton(label);
|
|
||||||
JRadioButton d = new JRadioButton("not " + label);
|
|
||||||
ButtonGroup bg = new ButtonGroup();
|
|
||||||
bg.add(c);
|
|
||||||
bg.add(d);
|
|
||||||
p.add(c);
|
|
||||||
p.add(d);
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static JList mkList(Object[] elts)
|
public static JList mkList(Object[] elts)
|
||||||
{
|
{
|
||||||
JList list = new JList(elts);
|
JList list = new JList(elts);
|
||||||
|
|
@ -775,12 +743,6 @@ public class Demo
|
||||||
return box;
|
return box;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static JSpinner mkSpinner()
|
|
||||||
{
|
|
||||||
JSpinner spinner = new JSpinner();
|
|
||||||
return spinner;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static JButton mkBigButton(String title)
|
public static JButton mkBigButton(String title)
|
||||||
{
|
{
|
||||||
JButton b = new JButton(title);
|
JButton b = new JButton(title);
|
||||||
|
|
@ -789,14 +751,6 @@ public class Demo
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static JToggleButton mkToggle(String title)
|
|
||||||
{
|
|
||||||
JToggleButton b = new JToggleButton(title);
|
|
||||||
b.setMargin(new Insets(5,5,5,5));
|
|
||||||
b.setFont(new Font("Luxi", Font.PLAIN, 14));
|
|
||||||
return b;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static JPanel mkPanel(JComponent[] inners)
|
public static JPanel mkPanel(JComponent[] inners)
|
||||||
{
|
{
|
||||||
JPanel p = new JPanel();
|
JPanel p = new JPanel();
|
||||||
|
|
@ -947,37 +901,16 @@ public class Demo
|
||||||
return editorPane;
|
return editorPane;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static JTree mkTree()
|
/**
|
||||||
|
* Create the tree.
|
||||||
|
*
|
||||||
|
* @return thr scroll pane, containing the tree.
|
||||||
|
*/
|
||||||
|
private static JComponent mkTree()
|
||||||
{
|
{
|
||||||
DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root node");
|
DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root node");
|
||||||
DefaultMutableTreeNode child1 = new DefaultMutableTreeNode("Child node 1");
|
|
||||||
DefaultMutableTreeNode child11 =
|
addChildren("Node", root, 12);
|
||||||
new DefaultMutableTreeNode("Child node 1.1");
|
|
||||||
DefaultMutableTreeNode child12 =
|
|
||||||
new DefaultMutableTreeNode("Child node 1.2");
|
|
||||||
DefaultMutableTreeNode child13 =
|
|
||||||
new DefaultMutableTreeNode("Child node 1.3");
|
|
||||||
DefaultMutableTreeNode child2 = new DefaultMutableTreeNode("Child node 2");
|
|
||||||
DefaultMutableTreeNode child21 =
|
|
||||||
new DefaultMutableTreeNode("Child node 2.1");
|
|
||||||
DefaultMutableTreeNode child22 =
|
|
||||||
new DefaultMutableTreeNode("Child node 2.2");
|
|
||||||
DefaultMutableTreeNode child23 =
|
|
||||||
new DefaultMutableTreeNode("Child node 2.3");
|
|
||||||
DefaultMutableTreeNode child24 =
|
|
||||||
new DefaultMutableTreeNode("Child node 2.4");
|
|
||||||
|
|
||||||
DefaultMutableTreeNode child3 = new DefaultMutableTreeNode("Child node 3");
|
|
||||||
root.add(child1);
|
|
||||||
root.add(child2);
|
|
||||||
root.add(child3);
|
|
||||||
child1.add(child11);
|
|
||||||
child1.add(child12);
|
|
||||||
child1.add(child13);
|
|
||||||
child2.add(child21);
|
|
||||||
child2.add(child22);
|
|
||||||
child2.add(child23);
|
|
||||||
child2.add(child24);
|
|
||||||
|
|
||||||
JTree tree = new JTree(root);
|
JTree tree = new JTree(root);
|
||||||
tree.setLargeModel(true);
|
tree.setLargeModel(true);
|
||||||
|
|
@ -985,60 +918,58 @@ public class Demo
|
||||||
dtsm.setSelectionMode(DefaultTreeSelectionModel.SINGLE_TREE_SELECTION);
|
dtsm.setSelectionMode(DefaultTreeSelectionModel.SINGLE_TREE_SELECTION);
|
||||||
tree.setSelectionModel(dtsm);
|
tree.setSelectionModel(dtsm);
|
||||||
|
|
||||||
return tree;
|
// Make it editable.
|
||||||
|
tree.setEditable(true);
|
||||||
|
|
||||||
|
JComponent t = mkScrollPane(tree);
|
||||||
|
t.setPreferredSize(new Dimension(200,200));
|
||||||
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static JTable mkTable()
|
/**
|
||||||
|
* Add the specified number of children to this parent node. For each
|
||||||
|
* child, the method is called recursively adding the nChildren-3 number of
|
||||||
|
* grandchildren.
|
||||||
|
*
|
||||||
|
* @param parent the parent node
|
||||||
|
* @param nChildren the number of children
|
||||||
|
*/
|
||||||
|
private static void addChildren(String name, DefaultMutableTreeNode parent,
|
||||||
|
int nChildren)
|
||||||
{
|
{
|
||||||
Object[][] tableData = new Object[][] {
|
for (int i = 0; i < nChildren; i++)
|
||||||
{
|
{
|
||||||
"Field 1", "Field 2" , "Field 3"
|
String child_name = parent+"."+i;
|
||||||
},
|
DefaultMutableTreeNode child = new DefaultMutableTreeNode
|
||||||
{
|
(child_name);
|
||||||
"Field 4", "Field 5" , "Field 6"
|
parent.add(child);
|
||||||
},
|
addChildren(child_name, child, nChildren-3);
|
||||||
{
|
|
||||||
"Field 7", "Field 8" , "Field 9"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Field 10", "Field 11" , "Field 12"
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
Object[] columnNames = new Object[] {"Column 1", "Column 2", "Column 3"};
|
|
||||||
|
/**
|
||||||
JTable table = new JTable(tableData, columnNames);
|
* Make a sample table component.
|
||||||
return table;
|
*/
|
||||||
|
private static JPanel mkTable()
|
||||||
|
{
|
||||||
|
return new TableDemo("Table demo, double click to edit")
|
||||||
|
.createContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
private JPanel mkButtonBar()
|
private JPanel mkButtonBar()
|
||||||
{
|
{
|
||||||
JPanel panel = new JPanel (new GridLayout(2, 1));
|
JPanel panel = new JPanel(new FlowLayout());
|
||||||
JPanel panelA = new JPanel(new FlowLayout());
|
|
||||||
JPanel panelB = new JPanel(new FlowLayout());
|
|
||||||
|
|
||||||
new PopUpAction("Buttons",
|
new PopUpAction("Buttons",
|
||||||
(new ButtonDemo("Button Demo")).createContent(),
|
(new ButtonDemo("Button Demo")).createContent(),
|
||||||
panelA);
|
panel);
|
||||||
|
|
||||||
new PopUpAction("Toggles",
|
|
||||||
mkToggle("cool and refreshing"),
|
|
||||||
panelA);
|
|
||||||
|
|
||||||
new PopUpAction("Checkbox",
|
|
||||||
mkCheckbox("ice cold"),
|
|
||||||
panelA);
|
|
||||||
|
|
||||||
new PopUpAction("Radio",
|
|
||||||
mkRadio("delicious"),
|
|
||||||
panelA);
|
|
||||||
|
|
||||||
new PopUpAction("Slider",
|
new PopUpAction("Slider",
|
||||||
(new SliderDemo("Slider Demo")).createContent(),
|
(new SliderDemo("Slider Demo")).createContent(),
|
||||||
panelA);
|
panel);
|
||||||
|
|
||||||
new PopUpAction("ProgressBar",
|
new PopUpAction("ProgressBar",
|
||||||
ProgressBarDemo.createContent(),
|
ProgressBarDemo.createContent(),
|
||||||
panelA);
|
panel);
|
||||||
|
|
||||||
|
|
||||||
new PopUpAction("List",
|
new PopUpAction("List",
|
||||||
|
|
@ -1050,60 +981,59 @@ public class Demo
|
||||||
"that",
|
"that",
|
||||||
"wraps",
|
"wraps",
|
||||||
"over"}),
|
"over"}),
|
||||||
panelA);
|
panel);
|
||||||
|
|
||||||
new PopUpAction("Scrollbar",
|
new PopUpAction("Scrollbar",
|
||||||
(new ScrollBarDemo("ScrollBar Demo")).createContent(),
|
(new ScrollBarDemo("ScrollBar Demo")).createContent(),
|
||||||
panelA);
|
panel);
|
||||||
|
|
||||||
new PopUpAction("Viewport",
|
new PopUpAction("Viewport",
|
||||||
mkViewportBox(mkBigButton("View Me!")),
|
mkViewportBox(mkBigButton("View Me!")),
|
||||||
panelA);
|
panel);
|
||||||
|
|
||||||
new PopUpAction("ScrollPane",
|
new PopUpAction("ScrollPane",
|
||||||
mkScrollPane(mkBigButton("Scroll Me!")),
|
mkScrollPane(mkBigButton("Scroll Me!")),
|
||||||
panelA);
|
panel);
|
||||||
|
|
||||||
new PopUpAction("TabPane",
|
new PopUpAction("TabPane",
|
||||||
mkTabs(new String[] {"happy",
|
mkTabs(new String[] {"happy",
|
||||||
"sad",
|
"sad",
|
||||||
"indifferent"}),
|
"indifferent"}),
|
||||||
panelB);
|
panel);
|
||||||
|
|
||||||
new PopUpAction("Spinner",
|
new PopUpAction("Spinner",
|
||||||
mkSpinner(),
|
new SpinnerDemo("Spinner Demo").createContent(), panel);
|
||||||
panelB);
|
|
||||||
|
|
||||||
new PopUpAction("TextField",
|
new PopUpAction("TextField",
|
||||||
(new TextFieldDemo("TextField Demo")).createContent(),
|
(new TextFieldDemo("TextField Demo")).createContent(),
|
||||||
panelB);
|
panel);
|
||||||
|
|
||||||
new PopUpAction("FileChooser",
|
new PopUpAction("FileChooser",
|
||||||
(new FileChooserDemo("FileChooser Demo")).createContent(),
|
(new FileChooserDemo("FileChooser Demo")).createContent(),
|
||||||
panelB);
|
panel);
|
||||||
|
|
||||||
new PopUpAction("ColorChooser",
|
new PopUpAction("ColorChooser",
|
||||||
mkColorChooser(),
|
mkColorChooser(),
|
||||||
panelB);
|
panel);
|
||||||
|
|
||||||
new PopUpAction("ComboBox",
|
new PopUpAction("ComboBox",
|
||||||
(new ComboBoxDemo("ComboBox Demo")).createContent(),
|
(new ComboBoxDemo("ComboBox Demo")).createContent(),
|
||||||
panelB);
|
panel);
|
||||||
|
|
||||||
new PopUpAction("Editor",
|
new PopUpAction("Editor",
|
||||||
mkEditorPane(),
|
mkEditorPane(),
|
||||||
panelB);
|
panel);
|
||||||
|
|
||||||
new PopUpAction("Tree",
|
new PopUpAction("Tree",
|
||||||
mkTree(),
|
mkTree(),
|
||||||
panelB);
|
panel);
|
||||||
|
|
||||||
new PopUpAction("Table",
|
new PopUpAction("Table",
|
||||||
mkTable(),
|
mkTable(),
|
||||||
panelB);
|
panel);
|
||||||
|
|
||||||
JButton exitDisposer = mkDisposerButton(frame);
|
JButton exitDisposer = mkDisposerButton(frame);
|
||||||
panelB.add(exitDisposer);
|
panel.add(exitDisposer);
|
||||||
exitDisposer.addActionListener(new ActionListener()
|
exitDisposer.addActionListener(new ActionListener()
|
||||||
{
|
{
|
||||||
public void actionPerformed(ActionEvent e)
|
public void actionPerformed(ActionEvent e)
|
||||||
|
|
@ -1111,8 +1041,6 @@ public class Demo
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
panel.add(panelA);
|
|
||||||
panel.add(panelB);
|
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* FileChooserDemo.java -- An example showing file choosers in Swing.
|
/* FileChooserDemo.java -- An example showing file choosers in Swing.
|
||||||
Copyright (C) 2005, Free Software Foundation, Inc.
|
Copyright (C) 2005, 2006, Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath examples.
|
This file is part of GNU Classpath examples.
|
||||||
|
|
||||||
|
|
@ -63,7 +63,9 @@ public class FileChooserDemo extends JFrame implements ActionListener
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private JPanel content;
|
||||||
|
|
||||||
/** A label to display the selected file. */
|
/** A label to display the selected file. */
|
||||||
JLabel selectedFileLabel;
|
JLabel selectedFileLabel;
|
||||||
|
|
||||||
|
|
@ -85,6 +87,19 @@ public class FileChooserDemo extends JFrame implements ActionListener
|
||||||
{
|
{
|
||||||
super(frameTitle);
|
super(frameTitle);
|
||||||
JPanel content = createContent();
|
JPanel content = createContent();
|
||||||
|
// initFrameContent() is only called (from main) when running this app
|
||||||
|
// standalone
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When the demo is run independently, the frame is displayed, so we should
|
||||||
|
* initialise the content panel (including the demo content and a close
|
||||||
|
* button). But when the demo is run as part of the Swing activity board,
|
||||||
|
* only the demo content panel is used, the frame itself is never displayed,
|
||||||
|
* so we can avoid this step.
|
||||||
|
*/
|
||||||
|
public void initFrameContent()
|
||||||
|
{
|
||||||
JPanel closePanel = new JPanel();
|
JPanel closePanel = new JPanel();
|
||||||
JButton closeButton = new JButton("Close");
|
JButton closeButton = new JButton("Close");
|
||||||
closeButton.setActionCommand("CLOSE");
|
closeButton.setActionCommand("CLOSE");
|
||||||
|
|
@ -102,52 +117,56 @@ public class FileChooserDemo extends JFrame implements ActionListener
|
||||||
* added if this demo is being run as a standalone demo).
|
* added if this demo is being run as a standalone demo).
|
||||||
*/
|
*/
|
||||||
JPanel createContent()
|
JPanel createContent()
|
||||||
{
|
{
|
||||||
JPanel panel = new JPanel(new BorderLayout());
|
if (content == null)
|
||||||
|
{
|
||||||
// create a panel of buttons to select the different styles of file
|
JPanel panel = new JPanel(new BorderLayout());
|
||||||
// chooser...
|
|
||||||
JPanel buttonPanel = new JPanel(new GridLayout(5, 1));
|
|
||||||
JButton openButton = new JButton("Open...");
|
|
||||||
openButton.setActionCommand("OPEN");
|
|
||||||
openButton.addActionListener(this);
|
|
||||||
buttonPanel.add(openButton);
|
|
||||||
JButton saveButton = new JButton("Save...");
|
|
||||||
saveButton.setActionCommand("SAVE");
|
|
||||||
saveButton.addActionListener(this);
|
|
||||||
buttonPanel.add(saveButton);
|
|
||||||
JButton queryButton = new JButton("Select Directory...");
|
|
||||||
queryButton.setActionCommand("SELECT_DIRECTORY");
|
|
||||||
queryButton.addActionListener(this);
|
|
||||||
buttonPanel.add(queryButton);
|
|
||||||
JButton openJavaButton = new JButton("Open Java file...");
|
|
||||||
openJavaButton.setActionCommand("OPEN_JAVA");
|
|
||||||
openJavaButton.addActionListener(this);
|
|
||||||
buttonPanel.add(openJavaButton);
|
|
||||||
JButton openMultiButton = new JButton("Open multiple files...");
|
|
||||||
openMultiButton.setActionCommand("OPEN_MULTI");
|
|
||||||
openMultiButton.addActionListener(this);
|
|
||||||
buttonPanel.add(openMultiButton);
|
|
||||||
panel.add(buttonPanel, BorderLayout.WEST);
|
|
||||||
|
|
||||||
// create a panel to display the selected file(s) and the return code
|
|
||||||
JPanel displayPanel = new JPanel(new BorderLayout());
|
|
||||||
|
|
||||||
selectedFileLabel = new JLabel("-");
|
|
||||||
selectedFileLabel.setBorder(BorderFactory.createTitledBorder("Selected File/Directory: "));
|
|
||||||
displayPanel.add(selectedFileLabel, BorderLayout.NORTH);
|
|
||||||
|
|
||||||
selectedFilesList = new JList();
|
// create a panel of buttons to select the different styles of file
|
||||||
JScrollPane sp = new JScrollPane(selectedFilesList);
|
// chooser...
|
||||||
sp.setBorder(BorderFactory.createTitledBorder("Selected Files: "));
|
JPanel buttonPanel = new JPanel(new GridLayout(5, 1));
|
||||||
displayPanel.add(sp);
|
JButton openButton = new JButton("Open...");
|
||||||
|
openButton.setActionCommand("OPEN");
|
||||||
returnCodeLabel = new JLabel("0");
|
openButton.addActionListener(this);
|
||||||
returnCodeLabel.setBorder(BorderFactory.createTitledBorder("Return Code:"));
|
buttonPanel.add(openButton);
|
||||||
displayPanel.add(returnCodeLabel, BorderLayout.SOUTH);
|
JButton saveButton = new JButton("Save...");
|
||||||
|
saveButton.setActionCommand("SAVE");
|
||||||
|
saveButton.addActionListener(this);
|
||||||
|
buttonPanel.add(saveButton);
|
||||||
|
JButton queryButton = new JButton("Select Directory...");
|
||||||
|
queryButton.setActionCommand("SELECT_DIRECTORY");
|
||||||
|
queryButton.addActionListener(this);
|
||||||
|
buttonPanel.add(queryButton);
|
||||||
|
JButton openJavaButton = new JButton("Open Java file...");
|
||||||
|
openJavaButton.setActionCommand("OPEN_JAVA");
|
||||||
|
openJavaButton.addActionListener(this);
|
||||||
|
buttonPanel.add(openJavaButton);
|
||||||
|
JButton openMultiButton = new JButton("Open multiple files...");
|
||||||
|
openMultiButton.setActionCommand("OPEN_MULTI");
|
||||||
|
openMultiButton.addActionListener(this);
|
||||||
|
buttonPanel.add(openMultiButton);
|
||||||
|
panel.add(buttonPanel, BorderLayout.WEST);
|
||||||
|
|
||||||
panel.add(displayPanel);
|
// create a panel to display the selected file(s) and the return code
|
||||||
return panel;
|
JPanel displayPanel = new JPanel(new BorderLayout());
|
||||||
|
|
||||||
|
selectedFileLabel = new JLabel("-");
|
||||||
|
selectedFileLabel.setBorder(BorderFactory.createTitledBorder("Selected File/Directory: "));
|
||||||
|
displayPanel.add(selectedFileLabel, BorderLayout.NORTH);
|
||||||
|
|
||||||
|
selectedFilesList = new JList();
|
||||||
|
JScrollPane sp = new JScrollPane(selectedFilesList);
|
||||||
|
sp.setBorder(BorderFactory.createTitledBorder("Selected Files: "));
|
||||||
|
displayPanel.add(sp);
|
||||||
|
|
||||||
|
returnCodeLabel = new JLabel("0");
|
||||||
|
returnCodeLabel.setBorder(BorderFactory.createTitledBorder("Return Code:"));
|
||||||
|
displayPanel.add(returnCodeLabel, BorderLayout.SOUTH);
|
||||||
|
|
||||||
|
panel.add(displayPanel);
|
||||||
|
content = panel;
|
||||||
|
}
|
||||||
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -221,6 +240,7 @@ public class FileChooserDemo extends JFrame implements ActionListener
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
FileChooserDemo app = new FileChooserDemo("File Chooser Demo");
|
FileChooserDemo app = new FileChooserDemo("File Chooser Demo");
|
||||||
|
app.initFrameContent();
|
||||||
app.pack();
|
app.pack();
|
||||||
app.setVisible(true);
|
app.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,233 @@
|
||||||
|
/* MiniDemo.java -- A Swing demo suitable for embedded environments
|
||||||
|
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
GNU Classpath is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GNU Classpath 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
02110-1301 USA.
|
||||||
|
|
||||||
|
Linking this library statically or dynamically with other modules is
|
||||||
|
making a combined work based on this library. Thus, the terms and
|
||||||
|
conditions of the GNU General Public License cover the whole
|
||||||
|
combination.
|
||||||
|
|
||||||
|
As a special exception, the copyright holders of this library give you
|
||||||
|
permission to link this library with independent modules to produce an
|
||||||
|
executable, regardless of the license terms of these independent
|
||||||
|
modules, and to copy and distribute the resulting executable under
|
||||||
|
terms of your choice, provided that you also meet, for each linked
|
||||||
|
independent module, the terms and conditions of the license of that
|
||||||
|
module. An independent module is a module which is not derived from
|
||||||
|
or based on this library. If you modify this library, you may extend
|
||||||
|
this exception to your version of the library, but you are not
|
||||||
|
obligated to do so. If you do not wish to do so, delete this
|
||||||
|
exception statement from your version. */
|
||||||
|
|
||||||
|
|
||||||
|
package gnu.classpath.examples.swing;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Font;
|
||||||
|
import java.awt.GridLayout;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
|
||||||
|
import javax.swing.Box;
|
||||||
|
import javax.swing.BoxLayout;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JCheckBox;
|
||||||
|
import javax.swing.JComboBox;
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JList;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JScrollPane;
|
||||||
|
import javax.swing.JTabbedPane;
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
import javax.swing.SwingUtilities;
|
||||||
|
import javax.swing.plaf.metal.DefaultMetalTheme;
|
||||||
|
import javax.swing.plaf.metal.MetalIconFactory;
|
||||||
|
import javax.swing.plaf.metal.MetalLookAndFeel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A Swing demo suitable for embedded environments (e.g. small display,
|
||||||
|
* b/w graphics etc).
|
||||||
|
*
|
||||||
|
* @author Roman Kennke (kennke@aicas.com)
|
||||||
|
*/
|
||||||
|
public class MiniDemo extends JFrame
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new MiniDemo instance.
|
||||||
|
*/
|
||||||
|
MiniDemo()
|
||||||
|
{
|
||||||
|
createGUI();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createGUI()
|
||||||
|
{
|
||||||
|
JTabbedPane tabPane = new JTabbedPane(JTabbedPane.TOP,
|
||||||
|
JTabbedPane.SCROLL_TAB_LAYOUT);
|
||||||
|
|
||||||
|
// Setup scrolling list in first tab.
|
||||||
|
Object[] listData = new Object[]{"Milk", "Beer", "Wine", "Water",
|
||||||
|
"Orange juice", "Tea", "Coffee", "Whiskey",
|
||||||
|
"Lemonade", "Apple juice", "Gin Tonic",
|
||||||
|
"Pangalactic Garleblaster", "Coke"};
|
||||||
|
JList list = new JList(listData);
|
||||||
|
JScrollPane sp = new JScrollPane(list);
|
||||||
|
tabPane.addTab("List", sp);
|
||||||
|
|
||||||
|
// Setup some buttons in the second tab.
|
||||||
|
JPanel buttonPanel = new JPanel();
|
||||||
|
buttonPanel.setLayout(new GridLayout(4, 1));
|
||||||
|
// JButtons
|
||||||
|
JPanel jButtonPanel = new JPanel();
|
||||||
|
jButtonPanel.setLayout(new BorderLayout());
|
||||||
|
final JCheckBox buttonState1 = new JCheckBox("Enabled", true);
|
||||||
|
jButtonPanel.add(buttonState1, BorderLayout.EAST);
|
||||||
|
JPanel jButtonContainer = new JPanel();
|
||||||
|
final JButton jButton1 = new JButton("JButton");
|
||||||
|
final JButton jButton2 =
|
||||||
|
new JButton(MetalIconFactory.getInternalFrameDefaultMenuIcon());
|
||||||
|
jButtonContainer.add(jButton1);
|
||||||
|
jButtonContainer.add(jButton2);
|
||||||
|
jButtonPanel.add(jButtonContainer, BorderLayout.CENTER);
|
||||||
|
buttonState1.addActionListener(
|
||||||
|
new ActionListener()
|
||||||
|
{
|
||||||
|
public void actionPerformed(ActionEvent ev)
|
||||||
|
{
|
||||||
|
boolean enabled = buttonState1.isSelected();
|
||||||
|
jButton1.setEnabled(enabled);
|
||||||
|
jButton2.setEnabled(enabled);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
buttonPanel.add(jButtonPanel);
|
||||||
|
// JToggleButtons
|
||||||
|
JPanel jToggleButtonPanel = new JPanel();
|
||||||
|
jToggleButtonPanel.setLayout(new BorderLayout());
|
||||||
|
final JCheckBox buttonState2 = new JCheckBox("Enabled", true);
|
||||||
|
jToggleButtonPanel.add(buttonState2, BorderLayout.EAST);
|
||||||
|
JPanel jToggleButtonContainer = new JPanel();
|
||||||
|
final JButton jToggleButton1 = new JButton("JToggleButton");
|
||||||
|
final JButton jToggleButton2 =
|
||||||
|
new JButton(MetalIconFactory.getInternalFrameDefaultMenuIcon());
|
||||||
|
jToggleButtonContainer.add(jToggleButton1);
|
||||||
|
jToggleButtonContainer.add(jToggleButton2);
|
||||||
|
jToggleButtonPanel.add(jToggleButtonContainer, BorderLayout.CENTER);
|
||||||
|
buttonState2.addActionListener(
|
||||||
|
new ActionListener()
|
||||||
|
{
|
||||||
|
public void actionPerformed(ActionEvent ev)
|
||||||
|
{
|
||||||
|
boolean enabled = buttonState2.isSelected();
|
||||||
|
jToggleButton1.setEnabled(enabled);
|
||||||
|
jToggleButton2.setEnabled(enabled);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
buttonPanel.add(jToggleButtonPanel);
|
||||||
|
tabPane.addTab("Buttons", buttonPanel);
|
||||||
|
|
||||||
|
// ComboBoxes
|
||||||
|
JPanel comboBoxPanel = new JPanel();
|
||||||
|
JComboBox comboBox = new JComboBox(listData);
|
||||||
|
comboBoxPanel.add(comboBox);
|
||||||
|
tabPane.add("ComboBox", comboBoxPanel);
|
||||||
|
|
||||||
|
// TextFields
|
||||||
|
JPanel textFieldPanel = new JPanel();
|
||||||
|
textFieldPanel.setLayout(new BoxLayout(textFieldPanel, BoxLayout.Y_AXIS));
|
||||||
|
textFieldPanel.add(Box.createVerticalStrut(70));
|
||||||
|
JPanel leftAlignedPanel = new JPanel(new BorderLayout());
|
||||||
|
JPanel textFieldPanel1 = new JPanel();
|
||||||
|
textFieldPanel1.setLayout(new BoxLayout(textFieldPanel1,
|
||||||
|
BoxLayout.X_AXIS));
|
||||||
|
final JTextField textfield1 = new JTextField("Hello World!");
|
||||||
|
textfield1.setHorizontalAlignment(JTextField.LEFT);
|
||||||
|
textfield1.setFont(new Font("Dialog", Font.PLAIN, 8));
|
||||||
|
textFieldPanel1.add(textfield1);
|
||||||
|
final JTextField textfield2 = new JTextField("Hello World!");
|
||||||
|
textfield2.setHorizontalAlignment(JTextField.LEFT);
|
||||||
|
textfield2.setFont(new Font("Dialog", Font.ITALIC, 12));
|
||||||
|
textFieldPanel1.add(textfield2);
|
||||||
|
final JTextField textfield3 = new JTextField("Hello World!");
|
||||||
|
textfield3.setHorizontalAlignment(JTextField.LEFT);
|
||||||
|
textfield3.setFont(new Font("Dialog", Font.BOLD, 14));
|
||||||
|
textFieldPanel1.add(textfield3);
|
||||||
|
leftAlignedPanel.add(textFieldPanel1);
|
||||||
|
JPanel statePanel = new JPanel();
|
||||||
|
statePanel.setLayout(new BoxLayout(statePanel, BoxLayout.Y_AXIS));
|
||||||
|
statePanel.add(Box.createVerticalGlue());
|
||||||
|
final JCheckBox enabled1 = new JCheckBox("enabled");
|
||||||
|
enabled1.setSelected(true);
|
||||||
|
enabled1.addActionListener(
|
||||||
|
new ActionListener()
|
||||||
|
{
|
||||||
|
public void actionPerformed(ActionEvent ev)
|
||||||
|
{
|
||||||
|
boolean enabled = enabled1.isSelected();
|
||||||
|
textfield1.setEnabled(enabled);
|
||||||
|
textfield2.setEnabled(enabled);
|
||||||
|
textfield3.setEnabled(enabled);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
statePanel.add(enabled1);
|
||||||
|
final JCheckBox editable1 = new JCheckBox("editable");
|
||||||
|
editable1.setSelected(true);
|
||||||
|
editable1.addActionListener(
|
||||||
|
new ActionListener()
|
||||||
|
{
|
||||||
|
public void actionPerformed(ActionEvent ev)
|
||||||
|
{
|
||||||
|
boolean editable = editable1.isSelected();
|
||||||
|
textfield1.setEditable(editable);
|
||||||
|
textfield2.setEditable(editable);
|
||||||
|
textfield3.setEditable(editable);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
statePanel.add(editable1);
|
||||||
|
statePanel.add(Box.createVerticalGlue());
|
||||||
|
leftAlignedPanel.add(statePanel, BorderLayout.EAST);
|
||||||
|
textFieldPanel.add(leftAlignedPanel);
|
||||||
|
System.err.println(leftAlignedPanel.getPreferredSize());
|
||||||
|
textFieldPanel.add(Box.createVerticalStrut(70));
|
||||||
|
//panel.add(rightAlignedPanel);
|
||||||
|
tabPane.add("TextField", textFieldPanel);
|
||||||
|
setContentPane(tabPane);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Starts the demo application.
|
||||||
|
*
|
||||||
|
* @param args the command line arguments (ignored)
|
||||||
|
*/
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
|
||||||
|
MiniDemo demo = new MiniDemo();
|
||||||
|
demo.setSize(320, 200);
|
||||||
|
demo.setUndecorated(true);
|
||||||
|
demo.setVisible(true);
|
||||||
|
demo.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* ScrollBarDemo.java -- An example showing scroll bars in Swing.
|
/* ScrollBarDemo.java -- An example showing scroll bars in Swing.
|
||||||
Copyright (C) 2005, Free Software Foundation, Inc.
|
Copyright (C) 2005, 2006, Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath examples.
|
This file is part of GNU Classpath examples.
|
||||||
|
|
||||||
|
|
@ -40,6 +40,8 @@ public class ScrollBarDemo
|
||||||
implements ActionListener
|
implements ActionListener
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private JPanel content;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new demo instance.
|
* Creates a new demo instance.
|
||||||
*
|
*
|
||||||
|
|
@ -49,6 +51,19 @@ public class ScrollBarDemo
|
||||||
{
|
{
|
||||||
super(title);
|
super(title);
|
||||||
JPanel content = createContent();
|
JPanel content = createContent();
|
||||||
|
// initFrameContent() is only called (from main) when running this app
|
||||||
|
// standalone
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When the demo is run independently, the frame is displayed, so we should
|
||||||
|
* initialise the content panel (including the demo content and a close
|
||||||
|
* button). But when the demo is run as part of the Swing activity board,
|
||||||
|
* only the demo content panel is used, the frame itself is never displayed,
|
||||||
|
* so we can avoid this step.
|
||||||
|
*/
|
||||||
|
public void initFrameContent()
|
||||||
|
{
|
||||||
JPanel closePanel = new JPanel();
|
JPanel closePanel = new JPanel();
|
||||||
JButton closeButton = new JButton("Close");
|
JButton closeButton = new JButton("Close");
|
||||||
closeButton.setActionCommand("CLOSE");
|
closeButton.setActionCommand("CLOSE");
|
||||||
|
|
@ -67,9 +82,12 @@ public class ScrollBarDemo
|
||||||
*/
|
*/
|
||||||
JPanel createContent()
|
JPanel createContent()
|
||||||
{
|
{
|
||||||
JPanel content = new JPanel(new BorderLayout());
|
if (content == null)
|
||||||
JPanel panel = createScrollBarPanel();
|
{
|
||||||
content.add(panel);
|
content = new JPanel(new BorderLayout());
|
||||||
|
JPanel panel = createScrollBarPanel();
|
||||||
|
content.add(panel);
|
||||||
|
}
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -134,6 +152,7 @@ public class ScrollBarDemo
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
ScrollBarDemo app = new ScrollBarDemo("ScrollBar Demo");
|
ScrollBarDemo app = new ScrollBarDemo("ScrollBar Demo");
|
||||||
|
app.initFrameContent();
|
||||||
app.pack();
|
app.pack();
|
||||||
app.setVisible(true);
|
app.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* SliderDemo.java -- An example showing JSlider in various configurations.
|
/* SliderDemo.java -- An example showing JSlider in various configurations.
|
||||||
Copyright (C) 2005, Free Software Foundation, Inc.
|
Copyright (C) 2005, 2006, Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath examples.
|
This file is part of GNU Classpath examples.
|
||||||
|
|
||||||
|
|
@ -35,7 +35,9 @@ import javax.swing.JSlider;
|
||||||
|
|
||||||
public class SliderDemo extends JFrame implements ActionListener
|
public class SliderDemo extends JFrame implements ActionListener
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private JPanel content;
|
||||||
|
|
||||||
JSlider hslider1;
|
JSlider hslider1;
|
||||||
JSlider hslider2;
|
JSlider hslider2;
|
||||||
JSlider hslider3;
|
JSlider hslider3;
|
||||||
|
|
@ -59,7 +61,20 @@ public class SliderDemo extends JFrame implements ActionListener
|
||||||
public SliderDemo(String frameTitle)
|
public SliderDemo(String frameTitle)
|
||||||
{
|
{
|
||||||
super(frameTitle);
|
super(frameTitle);
|
||||||
JPanel content = createContent();
|
content = createContent();
|
||||||
|
// initFrameContent() is only called (from main) when running this app
|
||||||
|
// standalone
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When the demo is run independently, the frame is displayed, so we should
|
||||||
|
* initialise the content panel (including the demo content and a close
|
||||||
|
* button). But when the demo is run as part of the Swing activity board,
|
||||||
|
* only the demo content panel is used, the frame itself is never displayed,
|
||||||
|
* so we can avoid this step.
|
||||||
|
*/
|
||||||
|
public void initFrameContent()
|
||||||
|
{
|
||||||
JPanel closePanel = new JPanel();
|
JPanel closePanel = new JPanel();
|
||||||
JButton closeButton = new JButton("Close");
|
JButton closeButton = new JButton("Close");
|
||||||
closeButton.setActionCommand("CLOSE");
|
closeButton.setActionCommand("CLOSE");
|
||||||
|
|
@ -78,20 +93,23 @@ public class SliderDemo extends JFrame implements ActionListener
|
||||||
*/
|
*/
|
||||||
JPanel createContent()
|
JPanel createContent()
|
||||||
{
|
{
|
||||||
JPanel content = new JPanel(new BorderLayout());
|
if (content == null)
|
||||||
JPanel panel = new JPanel(new GridLayout(1, 2));
|
{
|
||||||
panel.add(createHorizontalPanel());
|
content = new JPanel(new BorderLayout());
|
||||||
panel.add(createVerticalPanel());
|
JPanel panel = new JPanel(new GridLayout(1, 2));
|
||||||
enabledCheckBox = new JCheckBox("Enabled");
|
panel.add(createHorizontalPanel());
|
||||||
enabledCheckBox.setSelected(true);
|
panel.add(createVerticalPanel());
|
||||||
enabledCheckBox.setActionCommand("TOGGLE_ENABLED");
|
enabledCheckBox = new JCheckBox("Enabled");
|
||||||
enabledCheckBox.addActionListener(this);
|
enabledCheckBox.setSelected(true);
|
||||||
JPanel checkBoxPanel = new JPanel();
|
enabledCheckBox.setActionCommand("TOGGLE_ENABLED");
|
||||||
checkBoxPanel.add(enabledCheckBox);
|
enabledCheckBox.addActionListener(this);
|
||||||
JPanel panel2 = new JPanel(new BorderLayout());
|
JPanel checkBoxPanel = new JPanel();
|
||||||
panel2.add(panel);
|
checkBoxPanel.add(enabledCheckBox);
|
||||||
panel2.add(checkBoxPanel, BorderLayout.SOUTH);
|
JPanel panel2 = new JPanel(new BorderLayout());
|
||||||
content.add(panel2);
|
panel2.add(panel);
|
||||||
|
panel2.add(checkBoxPanel, BorderLayout.SOUTH);
|
||||||
|
content.add(panel2);
|
||||||
|
}
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -242,6 +260,7 @@ public class SliderDemo extends JFrame implements ActionListener
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
SliderDemo app = new SliderDemo("Slider Demo");
|
SliderDemo app = new SliderDemo("Slider Demo");
|
||||||
|
app.initFrameContent();
|
||||||
app.pack();
|
app.pack();
|
||||||
app.setVisible(true);
|
app.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,230 @@
|
||||||
|
/* SpinnerDemo.java -- An example showing various spinners in Swing.
|
||||||
|
Copyright (C) 2006, Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GNU Classpath examples.
|
||||||
|
|
||||||
|
GNU Classpath is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GNU Classpath 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
02110-1301 USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package gnu.classpath.examples.swing;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Font;
|
||||||
|
import java.awt.GridLayout;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import javax.swing.BorderFactory;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JCheckBox;
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JSpinner;
|
||||||
|
import javax.swing.SpinnerDateModel;
|
||||||
|
import javax.swing.SpinnerListModel;
|
||||||
|
import javax.swing.SpinnerNumberModel;
|
||||||
|
import javax.swing.UIManager;
|
||||||
|
import javax.swing.plaf.metal.DefaultMetalTheme;
|
||||||
|
import javax.swing.plaf.metal.MetalLookAndFeel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple demo showing various spinners in different states.
|
||||||
|
*/
|
||||||
|
public class SpinnerDemo
|
||||||
|
extends JFrame
|
||||||
|
implements ActionListener
|
||||||
|
{
|
||||||
|
private JPanel content;
|
||||||
|
private JCheckBox spinnerState1;
|
||||||
|
private JSpinner spinner1;
|
||||||
|
private JSpinner spinner2;
|
||||||
|
|
||||||
|
private JCheckBox spinnerState2;
|
||||||
|
private JSpinner spinner3;
|
||||||
|
private JSpinner spinner4;
|
||||||
|
|
||||||
|
private JCheckBox spinnerState3;
|
||||||
|
private JSpinner spinner5;
|
||||||
|
private JSpinner spinner6;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new demo instance.
|
||||||
|
*
|
||||||
|
* @param title the frame title.
|
||||||
|
*/
|
||||||
|
public SpinnerDemo(String title)
|
||||||
|
{
|
||||||
|
super(title);
|
||||||
|
JPanel content = createContent();
|
||||||
|
// initFrameContent() is only called (from main) when running this app
|
||||||
|
// standalone
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When the demo is run independently, the frame is displayed, so we should
|
||||||
|
* initialise the content panel (including the demo content and a close
|
||||||
|
* button). But when the demo is run as part of the Swing activity board,
|
||||||
|
* only the demo content panel is used, the frame itself is never displayed,
|
||||||
|
* so we can avoid this step.
|
||||||
|
*/
|
||||||
|
public void initFrameContent()
|
||||||
|
{
|
||||||
|
JPanel closePanel = new JPanel();
|
||||||
|
JButton closeButton = new JButton("Close");
|
||||||
|
closeButton.setActionCommand("CLOSE");
|
||||||
|
closeButton.addActionListener(this);
|
||||||
|
closePanel.add(closeButton);
|
||||||
|
content.add(closePanel, BorderLayout.SOUTH);
|
||||||
|
getContentPane().add(content);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a panel with the demo content. The panel
|
||||||
|
* uses a BorderLayout(), and the BorderLayout.SOUTH area
|
||||||
|
* is empty, to allow callers to add controls to the
|
||||||
|
* bottom of the panel if they want to (a close button is
|
||||||
|
* added if this demo is being run as a standalone demo).
|
||||||
|
*/
|
||||||
|
JPanel createContent()
|
||||||
|
{
|
||||||
|
if (content == null)
|
||||||
|
{
|
||||||
|
content = new JPanel(new BorderLayout());
|
||||||
|
JPanel panel = new JPanel(new GridLayout(3, 1));
|
||||||
|
panel.add(createPanel1());
|
||||||
|
panel.add(createPanel2());
|
||||||
|
panel.add(createPanel3());
|
||||||
|
content.add(panel);
|
||||||
|
}
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel createPanel1()
|
||||||
|
{
|
||||||
|
JPanel panel = new JPanel(new BorderLayout());
|
||||||
|
this.spinnerState1 = new JCheckBox("Enabled", true);
|
||||||
|
this.spinnerState1.setActionCommand("COMBO_STATE1");
|
||||||
|
this.spinnerState1.addActionListener(this);
|
||||||
|
panel.add(this.spinnerState1, BorderLayout.EAST);
|
||||||
|
|
||||||
|
JPanel controlPanel = new JPanel();
|
||||||
|
controlPanel.setBorder(BorderFactory.createTitledBorder(
|
||||||
|
"Number Spinner: "));
|
||||||
|
this.spinner1 = new JSpinner(new SpinnerNumberModel(5.0, 0.0, 10.0, 0.5));
|
||||||
|
this.spinner2 = new JSpinner(new SpinnerNumberModel(50, 0, 100, 5));
|
||||||
|
this.spinner2.setFont(new Font("Dialog", Font.PLAIN, 20));
|
||||||
|
controlPanel.add(this.spinner1);
|
||||||
|
controlPanel.add(this.spinner2);
|
||||||
|
|
||||||
|
panel.add(controlPanel);
|
||||||
|
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel createPanel2()
|
||||||
|
{
|
||||||
|
JPanel panel = new JPanel(new BorderLayout());
|
||||||
|
this.spinnerState2 = new JCheckBox("Enabled", true);
|
||||||
|
this.spinnerState2.setActionCommand("COMBO_STATE2");
|
||||||
|
this.spinnerState2.addActionListener(this);
|
||||||
|
panel.add(this.spinnerState2, BorderLayout.EAST);
|
||||||
|
|
||||||
|
JPanel controlPanel = new JPanel();
|
||||||
|
controlPanel.setBorder(BorderFactory.createTitledBorder("Date Spinner: "));
|
||||||
|
this.spinner3 = new JSpinner(new SpinnerDateModel(new Date(), null, null,
|
||||||
|
Calendar.DATE));
|
||||||
|
|
||||||
|
this.spinner4 = new JSpinner(new SpinnerDateModel(new Date(), null, null,
|
||||||
|
Calendar.YEAR));
|
||||||
|
this.spinner4.setFont(new Font("Dialog", Font.PLAIN, 20));
|
||||||
|
|
||||||
|
controlPanel.add(this.spinner3);
|
||||||
|
controlPanel.add(this.spinner4);
|
||||||
|
|
||||||
|
panel.add(controlPanel);
|
||||||
|
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel createPanel3()
|
||||||
|
{
|
||||||
|
JPanel panel = new JPanel(new BorderLayout());
|
||||||
|
this.spinnerState3 = new JCheckBox("Enabled", true);
|
||||||
|
this.spinnerState3.setActionCommand("COMBO_STATE3");
|
||||||
|
this.spinnerState3.addActionListener(this);
|
||||||
|
panel.add(this.spinnerState3, BorderLayout.EAST);
|
||||||
|
|
||||||
|
JPanel controlPanel = new JPanel();
|
||||||
|
controlPanel.setBorder(BorderFactory.createTitledBorder("List Spinner: "));
|
||||||
|
this.spinner5 = new JSpinner(new SpinnerListModel(new Object[] {"Red",
|
||||||
|
"Orange", "Yellow", "Green", "Blue", "Indigo", "Violet"}));
|
||||||
|
|
||||||
|
this.spinner6 = new JSpinner(new SpinnerListModel(new Object[] {"Red",
|
||||||
|
"Orange", "Yellow", "Green", "Blue", "Indigo", "Violet"}));
|
||||||
|
this.spinner6.setValue("Yellow");
|
||||||
|
this.spinner6.setFont(new Font("Dialog", Font.PLAIN, 20));
|
||||||
|
|
||||||
|
controlPanel.add(this.spinner5);
|
||||||
|
controlPanel.add(this.spinner6);
|
||||||
|
|
||||||
|
panel.add(controlPanel);
|
||||||
|
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void actionPerformed(ActionEvent e)
|
||||||
|
{
|
||||||
|
if (e.getActionCommand().equals("COMBO_STATE1"))
|
||||||
|
{
|
||||||
|
spinner1.setEnabled(spinnerState1.isSelected());
|
||||||
|
spinner2.setEnabled(spinnerState1.isSelected());
|
||||||
|
}
|
||||||
|
else if (e.getActionCommand().equals("COMBO_STATE2"))
|
||||||
|
{
|
||||||
|
spinner3.setEnabled(spinnerState2.isSelected());
|
||||||
|
spinner4.setEnabled(spinnerState2.isSelected());
|
||||||
|
}
|
||||||
|
else if (e.getActionCommand().equals("COMBO_STATE3"))
|
||||||
|
{
|
||||||
|
spinner5.setEnabled(spinnerState3.isSelected());
|
||||||
|
spinner6.setEnabled(spinnerState3.isSelected());
|
||||||
|
}
|
||||||
|
else if (e.getActionCommand().equals("CLOSE"))
|
||||||
|
{
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
|
||||||
|
UIManager.setLookAndFeel(new javax.swing.plaf.metal.MetalLookAndFeel());
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
SpinnerDemo app = new SpinnerDemo("Spinner Demo");
|
||||||
|
app.initFrameContent();
|
||||||
|
app.pack();
|
||||||
|
app.setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,236 @@
|
||||||
|
/* TableDemo.java -- Demonstrates the use of JTable.
|
||||||
|
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
GNU Classpath is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GNU Classpath 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
02110-1301 USA.
|
||||||
|
|
||||||
|
Linking this library statically or dynamically with other modules is
|
||||||
|
making a combined work based on this library. Thus, the terms and
|
||||||
|
conditions of the GNU General Public License cover the whole
|
||||||
|
combination.
|
||||||
|
|
||||||
|
As a special exception, the copyright holders of this library give you
|
||||||
|
permission to link this library with independent modules to produce an
|
||||||
|
executable, regardless of the license terms of these independent
|
||||||
|
modules, and to copy and distribute the resulting executable under
|
||||||
|
terms of your choice, provided that you also meet, for each linked
|
||||||
|
independent module, the terms and conditions of the license of that
|
||||||
|
module. An independent module is a module which is not derived from
|
||||||
|
or based on this library. If you modify this library, you may extend
|
||||||
|
this exception to your version of the library, but you are not
|
||||||
|
obligated to do so. If you do not wish to do so, delete this
|
||||||
|
exception statement from your version. */
|
||||||
|
|
||||||
|
|
||||||
|
package gnu.classpath.examples.swing;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JScrollPane;
|
||||||
|
import javax.swing.JTable;
|
||||||
|
import javax.swing.table.DefaultTableColumnModel;
|
||||||
|
import javax.swing.table.DefaultTableModel;
|
||||||
|
import javax.swing.table.TableColumn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displays the editable table. The first column consists of check boxes.
|
||||||
|
*
|
||||||
|
* @author Audrius Meskauskas (audriusa@bioinformatics.org)
|
||||||
|
*/
|
||||||
|
public class TableDemo extends JFrame
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The initial row count for this table.
|
||||||
|
*/
|
||||||
|
static int rows = 32;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The initial column count for this table.
|
||||||
|
*/
|
||||||
|
static int cols = 7;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table model.
|
||||||
|
*/
|
||||||
|
class TModel extends DefaultTableModel
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if the cell is editable. All cells are editable.
|
||||||
|
*/
|
||||||
|
public boolean isCellEditable(int parm1, int parm2)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the number of the table rows.
|
||||||
|
*/
|
||||||
|
public int getRowCount()
|
||||||
|
{
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the number of the table columns.
|
||||||
|
*/
|
||||||
|
public int getColumnCount()
|
||||||
|
{
|
||||||
|
return cols;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value at the given position
|
||||||
|
*/
|
||||||
|
public void setValueAt(Object aValue, int aRow, int aColumn)
|
||||||
|
{
|
||||||
|
values[aRow][aColumn] = aValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value at the given position.
|
||||||
|
*/
|
||||||
|
public Object getValueAt(int aRow, int aColumn)
|
||||||
|
{
|
||||||
|
return values[aRow][aColumn];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column name, as suggested by model. This header should not be
|
||||||
|
* visible, as it is overridden by setting the header name with
|
||||||
|
* {@link TableColumn#setHeaderValue} in {@link TableDemo#createContent}.
|
||||||
|
*/
|
||||||
|
public String getColumnName(int column)
|
||||||
|
{
|
||||||
|
return "Error "+column;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The first column contains booleans, others - default class.
|
||||||
|
*/
|
||||||
|
public Class getColumnClass(int column)
|
||||||
|
{
|
||||||
|
if (column == 0)
|
||||||
|
return Boolean.class;
|
||||||
|
else
|
||||||
|
return super.getColumnClass(column);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table being displayed.
|
||||||
|
*/
|
||||||
|
JTable table = new JTable();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table model.
|
||||||
|
*/
|
||||||
|
TModel model = new TModel();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table value array.
|
||||||
|
*/
|
||||||
|
Object[][] values;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the table demo with the given titel.
|
||||||
|
*
|
||||||
|
* @param title the frame title.
|
||||||
|
*/
|
||||||
|
public TableDemo(String title)
|
||||||
|
{
|
||||||
|
super(title);
|
||||||
|
getContentPane().add(createContent(), BorderLayout.CENTER);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a panel with the demo content. The panel uses a BorderLayout(), and
|
||||||
|
* the BorderLayout.SOUTH area is empty, to allow callers to add controls to
|
||||||
|
* the bottom of the panel if they want to (a close button is added if this
|
||||||
|
* demo is being run as a standalone demo).
|
||||||
|
*/
|
||||||
|
JPanel createContent()
|
||||||
|
{
|
||||||
|
if (content == null)
|
||||||
|
{
|
||||||
|
JPanel p = new JPanel();
|
||||||
|
p.setLayout(new BorderLayout());
|
||||||
|
values = new Object[rows][];
|
||||||
|
for (int i = 0; i < values.length; i++)
|
||||||
|
{
|
||||||
|
values[i] = new Object[cols];
|
||||||
|
for (int j = 1; j < cols; j++)
|
||||||
|
{
|
||||||
|
values[i][j] = "" + ((char) ('a' + j)) + i;
|
||||||
|
}
|
||||||
|
values [i][0] = i % 2 == 0? Boolean.TRUE : Boolean.FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.setModel(model);
|
||||||
|
|
||||||
|
// Make the columns with gradually increasing width:
|
||||||
|
DefaultTableColumnModel cm = new DefaultTableColumnModel();
|
||||||
|
for (int i = 0; i < cols; i++)
|
||||||
|
{
|
||||||
|
TableColumn column = new TableColumn(i);
|
||||||
|
|
||||||
|
// Showing the variable width columns.
|
||||||
|
int width = 100+20*i;
|
||||||
|
column.setPreferredWidth(width);
|
||||||
|
|
||||||
|
// If we do not set the header value here, the value, returned
|
||||||
|
// by model, is used.
|
||||||
|
column.setHeaderValue("Width +"+(20*i));
|
||||||
|
|
||||||
|
cm.addColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
table.setColumnModel(cm);
|
||||||
|
|
||||||
|
// Create the table, place it into scroll pane and place
|
||||||
|
// the pane into this frame.
|
||||||
|
JScrollPane scroll = new JScrollPane();
|
||||||
|
|
||||||
|
// The horizontal scroll bar is never needed.
|
||||||
|
scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
|
||||||
|
scroll.getViewport().add(table);
|
||||||
|
p.add(scroll, BorderLayout.CENTER);
|
||||||
|
content = p;
|
||||||
|
}
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The executable method to display the editable table.
|
||||||
|
*
|
||||||
|
* @param args
|
||||||
|
* unused.
|
||||||
|
*/
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
TableDemo frame = new TableDemo("Table double click on the cell to edit.");
|
||||||
|
frame.setSize(new Dimension(640, 100));
|
||||||
|
frame.validate();
|
||||||
|
frame.setVisible(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* TextFieldDemo.java -- An example showing various textfields in Swing.
|
/* TextFieldDemo.java -- An example showing various textfields in Swing.
|
||||||
Copyright (C) 2005, Free Software Foundation, Inc.
|
Copyright (C) 2005, 2006, Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath examples.
|
This file is part of GNU Classpath examples.
|
||||||
|
|
||||||
|
|
@ -107,6 +107,8 @@ public class TextFieldDemo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private JPanel content;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The left aligned textfields and state buttons.
|
* The left aligned textfields and state buttons.
|
||||||
*/
|
*/
|
||||||
|
|
@ -115,7 +117,7 @@ public class TextFieldDemo
|
||||||
JTextField textfield3;
|
JTextField textfield3;
|
||||||
JCheckBox enabled1;
|
JCheckBox enabled1;
|
||||||
JCheckBox editable1;
|
JCheckBox editable1;
|
||||||
JPanel textFieldPanel1;
|
JPanel textFieldPanel1;
|
||||||
/**
|
/**
|
||||||
* The right aligned textfields and state buttons.
|
* The right aligned textfields and state buttons.
|
||||||
*/
|
*/
|
||||||
|
|
@ -162,6 +164,19 @@ JPanel textFieldPanel1;
|
||||||
{
|
{
|
||||||
super(title);
|
super(title);
|
||||||
JPanel content = createContent();
|
JPanel content = createContent();
|
||||||
|
// initFrameContent() is only called (from main) when running this app
|
||||||
|
// standalone
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When the demo is run independently, the frame is displayed, so we should
|
||||||
|
* initialise the content panel (including the demo content and a close
|
||||||
|
* button). But when the demo is run as part of the Swing activity board,
|
||||||
|
* only the demo content panel is used, the frame itself is never displayed,
|
||||||
|
* so we can avoid this step.
|
||||||
|
*/
|
||||||
|
public void initFrameContent()
|
||||||
|
{
|
||||||
JPanel closePanel = new JPanel();
|
JPanel closePanel = new JPanel();
|
||||||
JButton closeButton = new JButton("Close");
|
JButton closeButton = new JButton("Close");
|
||||||
closeButton.setActionCommand("CLOSE");
|
closeButton.setActionCommand("CLOSE");
|
||||||
|
|
@ -180,15 +195,18 @@ JPanel textFieldPanel1;
|
||||||
*/
|
*/
|
||||||
JPanel createContent()
|
JPanel createContent()
|
||||||
{
|
{
|
||||||
JPanel content = new JPanel(new BorderLayout());
|
if (content == null)
|
||||||
JPanel panel = new JPanel(new GridLayout(5, 1));
|
{
|
||||||
panel.add(createLeftAlignedPanel());
|
content = new JPanel(new BorderLayout());
|
||||||
panel.add(createRightAlignedPanel());
|
JPanel panel = new JPanel(new GridLayout(5, 1));
|
||||||
panel.add(createCenteredPanel());
|
panel.add(createLeftAlignedPanel());
|
||||||
panel.add(createCustomColoredPanel());
|
panel.add(createRightAlignedPanel());
|
||||||
panel.add(createMiscPanel());
|
panel.add(createCenteredPanel());
|
||||||
content.add(panel);
|
panel.add(createCustomColoredPanel());
|
||||||
//content.setPreferredSize(new Dimension(400, 300));
|
panel.add(createMiscPanel());
|
||||||
|
content.add(panel);
|
||||||
|
//content.setPreferredSize(new Dimension(400, 300));
|
||||||
|
}
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -481,6 +499,7 @@ JPanel textFieldPanel1;
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
TextFieldDemo app = new TextFieldDemo("TextField Demo");
|
TextFieldDemo app = new TextFieldDemo("TextField Demo");
|
||||||
|
app.initFrameContent();
|
||||||
app.pack();
|
app.pack();
|
||||||
app.setVisible(true);
|
app.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
## Input file for automake to generate the Makefile.in used by configure
|
## Input file for automake to generate the Makefile.in used by configure
|
||||||
|
|
||||||
SUBDIRS = sax w3c_dom
|
SUBDIRS = sax w3c_dom relaxngDatatype
|
||||||
|
|
||||||
EXTRA_DIST = README
|
EXTRA_DIST = README
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CLASSPATH_INCLUDES = @CLASSPATH_INCLUDES@
|
CLASSPATH_INCLUDES = @CLASSPATH_INCLUDES@
|
||||||
CLASSPATH_MODULE = @CLASSPATH_MODULE@
|
CLASSPATH_MODULE = @CLASSPATH_MODULE@
|
||||||
|
COLLECTIONS_PREFIX = @COLLECTIONS_PREFIX@
|
||||||
CP = @CP@
|
CP = @CP@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
|
@ -87,6 +88,8 @@ CREATE_ALSA_LIBRARIES_FALSE = @CREATE_ALSA_LIBRARIES_FALSE@
|
||||||
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
|
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
|
||||||
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
|
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
|
||||||
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
|
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
|
||||||
|
CREATE_COLLECTIONS_FALSE = @CREATE_COLLECTIONS_FALSE@
|
||||||
|
CREATE_COLLECTIONS_TRUE = @CREATE_COLLECTIONS_TRUE@
|
||||||
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
|
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
|
||||||
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
|
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
|
||||||
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
|
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
|
||||||
|
|
@ -117,6 +120,7 @@ EGREP = @EGREP@
|
||||||
ERROR_CFLAGS = @ERROR_CFLAGS@
|
ERROR_CFLAGS = @ERROR_CFLAGS@
|
||||||
EXAMPLESDIR = @EXAMPLESDIR@
|
EXAMPLESDIR = @EXAMPLESDIR@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
FASTJAR = @FASTJAR@
|
||||||
FIND = @FIND@
|
FIND = @FIND@
|
||||||
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
|
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
|
||||||
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
|
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
|
||||||
|
|
@ -128,6 +132,8 @@ FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
|
||||||
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
|
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
|
||||||
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
|
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
|
||||||
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
|
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
|
||||||
|
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
|
||||||
|
FREETYPE2_LIBS = @FREETYPE2_LIBS@
|
||||||
GCJ = @GCJ@
|
GCJ = @GCJ@
|
||||||
GCJX = @GCJX@
|
GCJX = @GCJX@
|
||||||
GJDOC = @GJDOC@
|
GJDOC = @GJDOC@
|
||||||
|
|
@ -178,6 +184,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
||||||
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PERL = @PERL@
|
||||||
PKG_CONFIG = @PKG_CONFIG@
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
QT_CFLAGS = @QT_CFLAGS@
|
QT_CFLAGS = @QT_CFLAGS@
|
||||||
QT_LIBS = @QT_LIBS@
|
QT_LIBS = @QT_LIBS@
|
||||||
|
|
@ -255,7 +262,7 @@ target_cpu = @target_cpu@
|
||||||
target_os = @target_os@
|
target_os = @target_os@
|
||||||
target_vendor = @target_vendor@
|
target_vendor = @target_vendor@
|
||||||
vm_classes = @vm_classes@
|
vm_classes = @vm_classes@
|
||||||
SUBDIRS = sax w3c_dom
|
SUBDIRS = sax w3c_dom relaxngDatatype
|
||||||
EXTRA_DIST = README
|
EXTRA_DIST = README
|
||||||
all: all-recursive
|
all: all-recursive
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
## Input file for automake to generate the Makefile.in used by configure
|
||||||
|
|
||||||
|
EXTRA_DIST = README.txt \
|
||||||
|
copying.txt \
|
||||||
|
org/relaxng/datatype/Datatype.java \
|
||||||
|
org/relaxng/datatype/DatatypeBuilder.java \
|
||||||
|
org/relaxng/datatype/DatatypeException.java \
|
||||||
|
org/relaxng/datatype/DatatypeLibrary.java \
|
||||||
|
org/relaxng/datatype/DatatypeLibraryFactory.java \
|
||||||
|
org/relaxng/datatype/DatatypeStreamingValidator.java \
|
||||||
|
org/relaxng/datatype/ValidationContext.java \
|
||||||
|
org/relaxng/datatype/helpers/DatatypeLibraryLoader.java \
|
||||||
|
org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java \
|
||||||
|
org/relaxng/datatype/helpers/StreamingValidatorImpl.java
|
||||||
|
|
@ -0,0 +1,432 @@
|
||||||
|
# Makefile.in generated by automake 1.9.3 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
# 2003, 2004 Free Software Foundation, Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
top_builddir = ../..
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
target_triplet = @target@
|
||||||
|
subdir = external/relaxngDatatype
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \
|
||||||
|
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
|
||||||
|
$(top_srcdir)/m4/acinclude.m4 \
|
||||||
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
|
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||||
|
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||||
|
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||||
|
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMDEP_FALSE = @AMDEP_FALSE@
|
||||||
|
AMDEP_TRUE = @AMDEP_TRUE@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
BUILD_CLASS_FILES_FALSE = @BUILD_CLASS_FILES_FALSE@
|
||||||
|
BUILD_CLASS_FILES_TRUE = @BUILD_CLASS_FILES_TRUE@
|
||||||
|
CAIRO_CFLAGS = @CAIRO_CFLAGS@
|
||||||
|
CAIRO_LIBS = @CAIRO_LIBS@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CLASSPATH_INCLUDES = @CLASSPATH_INCLUDES@
|
||||||
|
CLASSPATH_MODULE = @CLASSPATH_MODULE@
|
||||||
|
COLLECTIONS_PREFIX = @COLLECTIONS_PREFIX@
|
||||||
|
CP = @CP@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CREATE_ALSA_LIBRARIES_FALSE = @CREATE_ALSA_LIBRARIES_FALSE@
|
||||||
|
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
|
||||||
|
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
|
||||||
|
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
|
||||||
|
CREATE_COLLECTIONS_FALSE = @CREATE_COLLECTIONS_FALSE@
|
||||||
|
CREATE_COLLECTIONS_TRUE = @CREATE_COLLECTIONS_TRUE@
|
||||||
|
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
|
||||||
|
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
|
||||||
|
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
|
||||||
|
CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@
|
||||||
|
CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@
|
||||||
|
CREATE_GTK_PEER_LIBRARIES_TRUE = @CREATE_GTK_PEER_LIBRARIES_TRUE@
|
||||||
|
CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
|
||||||
|
CREATE_JNI_HEADERS_TRUE = @CREATE_JNI_HEADERS_TRUE@
|
||||||
|
CREATE_JNI_LIBRARIES_FALSE = @CREATE_JNI_LIBRARIES_FALSE@
|
||||||
|
CREATE_JNI_LIBRARIES_TRUE = @CREATE_JNI_LIBRARIES_TRUE@
|
||||||
|
CREATE_QT_PEER_LIBRARIES_FALSE = @CREATE_QT_PEER_LIBRARIES_FALSE@
|
||||||
|
CREATE_QT_PEER_LIBRARIES_TRUE = @CREATE_QT_PEER_LIBRARIES_TRUE@
|
||||||
|
CREATE_XMLJ_LIBRARY_FALSE = @CREATE_XMLJ_LIBRARY_FALSE@
|
||||||
|
CREATE_XMLJ_LIBRARY_TRUE = @CREATE_XMLJ_LIBRARY_TRUE@
|
||||||
|
CXX = @CXX@
|
||||||
|
CXXCPP = @CXXCPP@
|
||||||
|
CXXDEPMODE = @CXXDEPMODE@
|
||||||
|
CXXFLAGS = @CXXFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DATE = @DATE@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
ECJ = @ECJ@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
ERROR_CFLAGS = @ERROR_CFLAGS@
|
||||||
|
EXAMPLESDIR = @EXAMPLESDIR@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FASTJAR = @FASTJAR@
|
||||||
|
FIND = @FIND@
|
||||||
|
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
|
||||||
|
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
|
||||||
|
FOUND_GCJX_FALSE = @FOUND_GCJX_FALSE@
|
||||||
|
FOUND_GCJX_TRUE = @FOUND_GCJX_TRUE@
|
||||||
|
FOUND_GCJ_FALSE = @FOUND_GCJ_FALSE@
|
||||||
|
FOUND_GCJ_TRUE = @FOUND_GCJ_TRUE@
|
||||||
|
FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
|
||||||
|
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
|
||||||
|
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
|
||||||
|
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
|
||||||
|
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
|
||||||
|
FREETYPE2_LIBS = @FREETYPE2_LIBS@
|
||||||
|
GCJ = @GCJ@
|
||||||
|
GCJX = @GCJX@
|
||||||
|
GJDOC = @GJDOC@
|
||||||
|
GTK_CAIRO_ENABLED = @GTK_CAIRO_ENABLED@
|
||||||
|
GTK_CAIRO_FALSE = @GTK_CAIRO_FALSE@
|
||||||
|
GTK_CAIRO_TRUE = @GTK_CAIRO_TRUE@
|
||||||
|
GTK_CFLAGS = @GTK_CFLAGS@
|
||||||
|
GTK_LIBS = @GTK_LIBS@
|
||||||
|
INIT_LOAD_LIBRARY = @INIT_LOAD_LIBRARY@
|
||||||
|
INSTALL_CLASS_FILES_FALSE = @INSTALL_CLASS_FILES_FALSE@
|
||||||
|
INSTALL_CLASS_FILES_TRUE = @INSTALL_CLASS_FILES_TRUE@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_GLIBJ_ZIP_FALSE = @INSTALL_GLIBJ_ZIP_FALSE@
|
||||||
|
INSTALL_GLIBJ_ZIP_TRUE = @INSTALL_GLIBJ_ZIP_TRUE@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@
|
||||||
|
JAY = @JAY@
|
||||||
|
JAY_SKELETON = @JAY_SKELETON@
|
||||||
|
JIKES = @JIKES@
|
||||||
|
JIKESENCODING = @JIKESENCODING@
|
||||||
|
JIKESWARNINGS = @JIKESWARNINGS@
|
||||||
|
KJC = @KJC@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBDEBUG = @LIBDEBUG@
|
||||||
|
LIBICONV = @LIBICONV@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIBVERSION = @LIBVERSION@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBICONV = @LTLIBICONV@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||||
|
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MKDIR = @MKDIR@
|
||||||
|
MOC = @MOC@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
||||||
|
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PERL = @PERL@
|
||||||
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
QT_CFLAGS = @QT_CFLAGS@
|
||||||
|
QT_LIBS = @QT_LIBS@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
REGEN_PARSERS_FALSE = @REGEN_PARSERS_FALSE@
|
||||||
|
REGEN_PARSERS_TRUE = @REGEN_PARSERS_TRUE@
|
||||||
|
REMOVE = @REMOVE@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRICT_WARNING_CFLAGS = @STRICT_WARNING_CFLAGS@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
USER_CLASSLIB = @USER_CLASSLIB@
|
||||||
|
USER_JAVAH = @USER_JAVAH@
|
||||||
|
USER_SPECIFIED_CLASSLIB_FALSE = @USER_SPECIFIED_CLASSLIB_FALSE@
|
||||||
|
USER_SPECIFIED_CLASSLIB_TRUE = @USER_SPECIFIED_CLASSLIB_TRUE@
|
||||||
|
USER_SPECIFIED_JAVAH_FALSE = @USER_SPECIFIED_JAVAH_FALSE@
|
||||||
|
USER_SPECIFIED_JAVAH_TRUE = @USER_SPECIFIED_JAVAH_TRUE@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||||
|
XML_CFLAGS = @XML_CFLAGS@
|
||||||
|
XML_LIBS = @XML_LIBS@
|
||||||
|
XSLT_CFLAGS = @XSLT_CFLAGS@
|
||||||
|
XSLT_LIBS = @XSLT_LIBS@
|
||||||
|
X_CFLAGS = @X_CFLAGS@
|
||||||
|
X_EXTRA_LIBS = @X_EXTRA_LIBS@
|
||||||
|
X_LIBS = @X_LIBS@
|
||||||
|
X_PRE_LIBS = @X_PRE_LIBS@
|
||||||
|
ZIP = @ZIP@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_CXX = @ac_ct_CXX@
|
||||||
|
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||||
|
ac_ct_STRIP = @ac_ct_STRIP@
|
||||||
|
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||||
|
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||||
|
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||||
|
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
datadir = @datadir@
|
||||||
|
default_toolkit = @default_toolkit@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
glibjdir = @glibjdir@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
nativelibdir = @nativelibdir@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target = @target@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
target_cpu = @target_cpu@
|
||||||
|
target_os = @target_os@
|
||||||
|
target_vendor = @target_vendor@
|
||||||
|
vm_classes = @vm_classes@
|
||||||
|
EXTRA_DIST = README.txt \
|
||||||
|
copying.txt \
|
||||||
|
org/relaxng/datatype/Datatype.java \
|
||||||
|
org/relaxng/datatype/DatatypeBuilder.java \
|
||||||
|
org/relaxng/datatype/DatatypeException.java \
|
||||||
|
org/relaxng/datatype/DatatypeLibrary.java \
|
||||||
|
org/relaxng/datatype/DatatypeLibraryFactory.java \
|
||||||
|
org/relaxng/datatype/DatatypeStreamingValidator.java \
|
||||||
|
org/relaxng/datatype/ValidationContext.java \
|
||||||
|
org/relaxng/datatype/helpers/DatatypeLibraryLoader.java \
|
||||||
|
org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java \
|
||||||
|
org/relaxng/datatype/helpers/StreamingValidatorImpl.java
|
||||||
|
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||||
|
&& exit 0; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu external/relaxngDatatype/Makefile'; \
|
||||||
|
cd $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --gnu external/relaxngDatatype/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
|
||||||
|
distclean-libtool:
|
||||||
|
-rm -f libtool
|
||||||
|
uninstall-info-am:
|
||||||
|
tags: TAGS
|
||||||
|
TAGS:
|
||||||
|
|
||||||
|
ctags: CTAGS
|
||||||
|
CTAGS:
|
||||||
|
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
$(mkdir_p) $(distdir)/org/relaxng/datatype $(distdir)/org/relaxng/datatype/helpers
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||||
|
list='$(DISTFILES)'; for file in $$list; do \
|
||||||
|
case $$file in \
|
||||||
|
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||||
|
esac; \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||||
|
dir="/$$dir"; \
|
||||||
|
$(mkdir_p) "$(distdir)$$dir"; \
|
||||||
|
else \
|
||||||
|
dir=''; \
|
||||||
|
fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||||
|
fi; \
|
||||||
|
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f $(distdir)/$$file \
|
||||||
|
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile
|
||||||
|
installdirs:
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
`test -z '$(STRIP)' || \
|
||||||
|
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic distclean-libtool
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am: uninstall-info-am
|
||||||
|
|
||||||
|
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||||
|
distclean distclean-generic distclean-libtool distdir dvi \
|
||||||
|
dvi-am html html-am info info-am install install-am \
|
||||||
|
install-data install-data-am install-exec install-exec-am \
|
||||||
|
install-info install-info-am install-man install-strip \
|
||||||
|
installcheck installcheck-am installdirs maintainer-clean \
|
||||||
|
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||||
|
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
|
||||||
|
uninstall-info-am
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
======================================================================
|
||||||
|
README FILE FOR DATATYPE INTERFACES FOR RELAX NG
|
||||||
|
======================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
RELAX NG supports multiple datatype vocabularies. To achive this, an
|
||||||
|
interface between datatype vocabularies and schema processors is
|
||||||
|
necessary. This interface is intended to be a standard Java interface
|
||||||
|
for this purpose.
|
||||||
|
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
LICENSE
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
|
See copying.txt.
|
||||||
|
|
||||||
|
Note: this license is the BSD license.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
FOR DEVELOPER
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
|
If you are planning to implement a datatype library, A sample datatype
|
||||||
|
library implementation by James Clark is available at [1], which
|
||||||
|
comes with documentation and source code.
|
||||||
|
|
||||||
|
If you are planning to implement a schema processor, then don't forget
|
||||||
|
to check out org.relaxng.datatype.helpers.DatatypeLibraryLoader, as
|
||||||
|
this allows you to dynamically locate datatype implementations.
|
||||||
|
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
LINKS
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
|
* OASIS RELAX NG TC
|
||||||
|
http://www.oasis-open.org/committees/relax-ng/
|
||||||
|
* RELAX home page
|
||||||
|
http://www.xml.gr.jp/relax/
|
||||||
|
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
REFERENCES
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
[1] Sample datatype library implementation by James Clark
|
||||||
|
http://www.thaiopensource.com/relaxng/datatype-sample.zip
|
||||||
|
|
||||||
|
Document written by Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
|
||||||
|
======================================================================
|
||||||
|
END OF README
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
Copyright (c) 2001, Thai Open Source Software Center Ltd, Sun Microsystems.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in
|
||||||
|
the documentation and/or other materials provided with the
|
||||||
|
distribution.
|
||||||
|
|
||||||
|
Neither the names of the copyright holders nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
237
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/Datatype.java
vendored
Executable file
237
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/Datatype.java
vendored
Executable file
|
|
@ -0,0 +1,237 @@
|
||||||
|
package org.relaxng.datatype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Datatype object.
|
||||||
|
*
|
||||||
|
* This object has the following functionality:
|
||||||
|
*
|
||||||
|
* <ol>
|
||||||
|
* <li> functionality to identify a class of character sequences. This is
|
||||||
|
* done through the isValid method.
|
||||||
|
*
|
||||||
|
* <li> functionality to produce a "value object" from a character sequence and
|
||||||
|
* context information.
|
||||||
|
*
|
||||||
|
* <li> functionality to test the equality of two value objects.
|
||||||
|
* </ol>
|
||||||
|
*
|
||||||
|
* This interface also defines the createStreamingValidator method,
|
||||||
|
* which is intended to efficiently support the validation of
|
||||||
|
* large character sequences.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jjc@jclark.com">James Clark</a>
|
||||||
|
* @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
|
||||||
|
*/
|
||||||
|
public interface Datatype {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the specified 'literal' matches this Datatype
|
||||||
|
* with respect to the current context.
|
||||||
|
*
|
||||||
|
* @param literal
|
||||||
|
* the lexical representation to be checked.
|
||||||
|
* @param context
|
||||||
|
* If this datatype is context-dependent
|
||||||
|
* (i.e. the {@link #isContextDependent} method returns true),
|
||||||
|
* then the caller must provide a non-null valid context object.
|
||||||
|
* Otherwise, the caller can pass null.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* true if the 'literal' is a member of this Datatype;
|
||||||
|
* false if it's not a member of this Datatype.
|
||||||
|
*/
|
||||||
|
boolean isValid( String literal, ValidationContext context );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Similar to the isValid method but throws an exception with diagnosis
|
||||||
|
* in case of errors.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* If the specified 'literal' is a valid lexical representation for this
|
||||||
|
* datatype, then this method must return without throwing any exception.
|
||||||
|
* If not, the callee must throw an exception (with diagnosis message,
|
||||||
|
* if possible.)
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* The application can use this method to provide detailed error message
|
||||||
|
* to users. This method is kept separate from the isValid method to
|
||||||
|
* achieve higher performance during normal validation.
|
||||||
|
*
|
||||||
|
* @exception DatatypeException
|
||||||
|
* If the given literal is invalid, then this exception is thrown.
|
||||||
|
* If the callee supports error diagnosis, then the exception should
|
||||||
|
* contain a diagnosis message.
|
||||||
|
*/
|
||||||
|
void checkValid( String literal, ValidationContext context )
|
||||||
|
throws DatatypeException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an instance of a streaming validator for this type.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* By using streaming validators instead of the isValid method,
|
||||||
|
* the caller can avoid keeping the entire string, which is
|
||||||
|
* sometimes quite big, in memory.
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* If this datatype is context-dependent
|
||||||
|
* (i.e. the {@link #isContextDependent} method returns true),
|
||||||
|
* then the caller must provide a non-null valid context object.
|
||||||
|
* Otherwise, the caller can pass null.
|
||||||
|
* The callee may keep a reference to this context object
|
||||||
|
* only while the returned streaming validator is being used.
|
||||||
|
*/
|
||||||
|
DatatypeStreamingValidator createStreamingValidator( ValidationContext context );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts lexcial value and the current context to the corresponding
|
||||||
|
* value object.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* The caller cannot generally assume that the value object is
|
||||||
|
* a meaningful Java object. For example, the caller cannot expect
|
||||||
|
* this method to return <code>java.lang.Number</code> type for
|
||||||
|
* the "integer" type of XML Schema Part 2.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* Also, the caller cannot assume that the equals method and
|
||||||
|
* the hashCode method of the value object are consistent with
|
||||||
|
* the semantics of the datatype. For that purpose, the sameValue
|
||||||
|
* method and the valueHashCode method have to be used. Note that
|
||||||
|
* this means you cannot use classes like
|
||||||
|
* <code>java.util.Hashtable</code> to store the value objects.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* The returned value object should be used solely for the sameValue
|
||||||
|
* and valueHashCode methods.
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* If this datatype is context-dependent
|
||||||
|
* (when the {@link #isContextDependent} method returns true),
|
||||||
|
* then the caller must provide a non-null valid context object.
|
||||||
|
* Otherwise, the caller can pass null.
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
* when the given lexical value is not a valid lexical
|
||||||
|
* value for this type.
|
||||||
|
*/
|
||||||
|
Object createValue( String literal, ValidationContext context );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests the equality of two value objects which were originally
|
||||||
|
* created by the createValue method of this object.
|
||||||
|
*
|
||||||
|
* The behavior is undefined if objects not created by this type
|
||||||
|
* are passed. It is the caller's responsibility to ensure that
|
||||||
|
* value objects belong to this type.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* true if two value objects are considered equal according to
|
||||||
|
* the definition of this datatype; false if otherwise.
|
||||||
|
*/
|
||||||
|
boolean sameValue( Object value1, Object value2 );
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computes the hash code for a value object,
|
||||||
|
* which is consistent with the sameValue method.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* hash code for the specified value object.
|
||||||
|
*/
|
||||||
|
int valueHashCode( Object value );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that the datatype doesn't have ID/IDREF semantics.
|
||||||
|
*
|
||||||
|
* This value is one of the possible return values of the
|
||||||
|
* {@link #getIdType} method.
|
||||||
|
*/
|
||||||
|
public static final int ID_TYPE_NULL = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that RELAX NG compatibility processors should
|
||||||
|
* treat this datatype as having ID semantics.
|
||||||
|
*
|
||||||
|
* This value is one of the possible return values of the
|
||||||
|
* {@link #getIdType} method.
|
||||||
|
*/
|
||||||
|
public static final int ID_TYPE_ID = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that RELAX NG compatibility processors should
|
||||||
|
* treat this datatype as having IDREF semantics.
|
||||||
|
*
|
||||||
|
* This value is one of the possible return values of the
|
||||||
|
* {@link #getIdType} method.
|
||||||
|
*/
|
||||||
|
public static final int ID_TYPE_IDREF = 2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that RELAX NG compatibility processors should
|
||||||
|
* treat this datatype as having IDREFS semantics.
|
||||||
|
*
|
||||||
|
* This value is one of the possible return values of the
|
||||||
|
* {@link #getIdType} method.
|
||||||
|
*/
|
||||||
|
public static final int ID_TYPE_IDREFS = 3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the ID/IDREF semantics is associated with this
|
||||||
|
* datatype.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* This method is introduced to support the RELAX NG DTD
|
||||||
|
* compatibility spec. (Of course it's always free to use
|
||||||
|
* this method for other purposes.)
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* If you are implementing a datatype library and have no idea about
|
||||||
|
* the "RELAX NG DTD compatibility" thing, just return
|
||||||
|
* <code>ID_TYPE_NULL</code> is fine.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* If this datatype doesn't have any ID/IDREF semantics,
|
||||||
|
* it returns {@link #ID_TYPE_NULL}. If it has such a semantics
|
||||||
|
* (for example, XSD:ID, XSD:IDREF and comp:ID type), then
|
||||||
|
* it returns {@link #ID_TYPE_ID}, {@link #ID_TYPE_IDREF} or
|
||||||
|
* {@link #ID_TYPE_IDREFS}.
|
||||||
|
*/
|
||||||
|
public int getIdType();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if this datatype may need a context object for
|
||||||
|
* the validation.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* The callee must return true even when the context
|
||||||
|
* is not always necessary. (For example, the "QName" type
|
||||||
|
* doesn't need a context object when validating unprefixed
|
||||||
|
* string. But nonetheless QName must return true.)
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* XSD's <code>string</code> and <code>short</code> types
|
||||||
|
* are examples of context-independent datatypes.
|
||||||
|
* Its <code>QName</code> and <code>ENTITY</code> types
|
||||||
|
* are examples of context-dependent datatypes.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* When a datatype is context-independent, then
|
||||||
|
* the {@link #isValid} method, the {@link #checkValid} method,
|
||||||
|
* the {@link #createStreamingValidator} method and
|
||||||
|
* the {@link #createValue} method can be called without
|
||||||
|
* providing a context object.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* <b>true</b> if this datatype is context-dependent
|
||||||
|
* (it needs a context object sometimes);
|
||||||
|
*
|
||||||
|
* <b>false</b> if this datatype is context-<b>in</b>dependent
|
||||||
|
* (it never needs a context object).
|
||||||
|
*/
|
||||||
|
public boolean isContextDependent();
|
||||||
|
}
|
||||||
45
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeBuilder.java
vendored
Executable file
45
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeBuilder.java
vendored
Executable file
|
|
@ -0,0 +1,45 @@
|
||||||
|
package org.relaxng.datatype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a user-defined type by adding parameters to
|
||||||
|
* the pre-defined type.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jjc@jclark.com">James Clark</a>
|
||||||
|
* @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
|
||||||
|
*/
|
||||||
|
public interface DatatypeBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a new parameter.
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* The name of the parameter to be added.
|
||||||
|
* @param strValue
|
||||||
|
* The raw value of the parameter. Caller may not normalize
|
||||||
|
* this value because any white space is potentially significant.
|
||||||
|
* @param context
|
||||||
|
* The context information which can be used by the callee to
|
||||||
|
* acquire additional information. This context object is
|
||||||
|
* valid only during this method call. The callee may not
|
||||||
|
* keep a reference to this object.
|
||||||
|
* @exception DatatypeException
|
||||||
|
* When the given parameter is inappropriate for some reason.
|
||||||
|
* The callee is responsible to recover from this error.
|
||||||
|
* That is, the object should behave as if no such error
|
||||||
|
* was occured.
|
||||||
|
*/
|
||||||
|
void addParameter( String name, String strValue, ValidationContext context )
|
||||||
|
throws DatatypeException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Derives a new Datatype from a Datatype by parameters that
|
||||||
|
* were already set through the addParameter method.
|
||||||
|
*
|
||||||
|
* @exception DatatypeException
|
||||||
|
* DatatypeException must be thrown if the derivation is
|
||||||
|
* somehow invalid. For example, a required parameter is missing,
|
||||||
|
* etc. The exception should contain a diagnosis message
|
||||||
|
* if possible.
|
||||||
|
*/
|
||||||
|
Datatype createDatatype() throws DatatypeException;
|
||||||
|
}
|
||||||
39
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeException.java
vendored
Executable file
39
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeException.java
vendored
Executable file
|
|
@ -0,0 +1,39 @@
|
||||||
|
package org.relaxng.datatype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Signals Datatype related exceptions.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jjc@jclark.com">James Clark</a>
|
||||||
|
* @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
|
||||||
|
*/
|
||||||
|
public class DatatypeException extends Exception {
|
||||||
|
|
||||||
|
public DatatypeException( int index, String msg ) {
|
||||||
|
super(msg);
|
||||||
|
this.index = index;
|
||||||
|
}
|
||||||
|
public DatatypeException( String msg ) {
|
||||||
|
this(UNKNOWN,msg);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* A constructor for those datatype libraries which don't support any
|
||||||
|
* diagnostic information at all.
|
||||||
|
*/
|
||||||
|
public DatatypeException() {
|
||||||
|
this(UNKNOWN,null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private final int index;
|
||||||
|
|
||||||
|
public static final int UNKNOWN = -1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the index of the content where the error occured.
|
||||||
|
* UNKNOWN can be returned to indicate that no index information
|
||||||
|
* is available.
|
||||||
|
*/
|
||||||
|
public int getIndex() {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
}
|
||||||
37
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeLibrary.java
vendored
Executable file
37
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeLibrary.java
vendored
Executable file
|
|
@ -0,0 +1,37 @@
|
||||||
|
package org.relaxng.datatype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A Datatype library
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jjc@jclark.com">James Clark</a>
|
||||||
|
* @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
|
||||||
|
*/
|
||||||
|
public interface DatatypeLibrary {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new instance of DatatypeBuilder.
|
||||||
|
*
|
||||||
|
* The callee should throw a DatatypeException in case of an error.
|
||||||
|
*
|
||||||
|
* @param baseTypeLocalName
|
||||||
|
* The local name of the base type.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* A non-null valid datatype object.
|
||||||
|
*/
|
||||||
|
DatatypeBuilder createDatatypeBuilder( String baseTypeLocalName )
|
||||||
|
throws DatatypeException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets or creates a pre-defined type.
|
||||||
|
*
|
||||||
|
* This is just a short-cut of
|
||||||
|
* <code>createDatatypeBuilder(typeLocalName).createDatatype();</code>
|
||||||
|
*
|
||||||
|
* The callee should throw a DatatypeException in case of an error.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* A non-null valid datatype object.
|
||||||
|
*/
|
||||||
|
Datatype createDatatype( String typeLocalName ) throws DatatypeException;
|
||||||
|
}
|
||||||
26
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeLibraryFactory.java
vendored
Executable file
26
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeLibraryFactory.java
vendored
Executable file
|
|
@ -0,0 +1,26 @@
|
||||||
|
package org.relaxng.datatype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Factory class for the DatatypeLibrary class.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* The datatype library should provide the implementation of
|
||||||
|
* this interface if it wants to be found by the schema processors.
|
||||||
|
* The implementor also have to place a file in your jar file.
|
||||||
|
* See the reference datatype library implementation for detail.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jjc@jclark.com">James Clark</a>
|
||||||
|
* @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
|
||||||
|
*/
|
||||||
|
public interface DatatypeLibraryFactory
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Creates a new instance of a DatatypeLibrary that supports
|
||||||
|
* the specified namespace URI.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* <code>null</code> if the specified namespace URI is not
|
||||||
|
* supported.
|
||||||
|
*/
|
||||||
|
DatatypeLibrary createDatatypeLibrary( String namespaceURI );
|
||||||
|
}
|
||||||
46
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeStreamingValidator.java
vendored
Executable file
46
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeStreamingValidator.java
vendored
Executable file
|
|
@ -0,0 +1,46 @@
|
||||||
|
package org.relaxng.datatype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Datatype streaming validator.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* The streaming validator is an optional feature that is useful for
|
||||||
|
* certain Datatypes. It allows the caller to incrementally provide
|
||||||
|
* the literal.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jjc@jclark.com">James Clark</a>
|
||||||
|
* @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
|
||||||
|
*/
|
||||||
|
public interface DatatypeStreamingValidator {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Passes an additional fragment of the literal.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* The application can call this method several times, then call
|
||||||
|
* the isValid method (or the checkValid method) to check the validity
|
||||||
|
* of the accumulated characters.
|
||||||
|
*/
|
||||||
|
void addCharacters( char[] buf, int start, int len );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tells if the accumulated literal is valid with respect to
|
||||||
|
* the underlying Datatype.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* True if it is valid. False if otherwise.
|
||||||
|
*/
|
||||||
|
boolean isValid();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Similar to the isValid method, but this method throws
|
||||||
|
* Exception (with possibly diagnostic information), instead of
|
||||||
|
* returning false.
|
||||||
|
*
|
||||||
|
* @exception DatatypeException
|
||||||
|
* If the callee supports the diagnosis and the accumulated
|
||||||
|
* literal is invalid, then this exception that possibly
|
||||||
|
* contains diagnosis information is thrown.
|
||||||
|
*/
|
||||||
|
void checkValid() throws DatatypeException;
|
||||||
|
}
|
||||||
66
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/ValidationContext.java
vendored
Executable file
66
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/ValidationContext.java
vendored
Executable file
|
|
@ -0,0 +1,66 @@
|
||||||
|
package org.relaxng.datatype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An interface that must be implemented by caller to
|
||||||
|
* provide context information that is necessary to
|
||||||
|
* perform validation of some Datatypes.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jjc@jclark.com">James Clark</a>
|
||||||
|
* @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
|
||||||
|
*/
|
||||||
|
public interface ValidationContext {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resolves a namespace prefix to the corresponding namespace URI.
|
||||||
|
*
|
||||||
|
* This method is used for validating the QName type, for example.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* If the prefix is "" (empty string), it indicates
|
||||||
|
* an unprefixed value. The callee
|
||||||
|
* should resolve it as for an unprefixed
|
||||||
|
* element, rather than for an unprefixed attribute.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* If the prefix is "xml", then the callee must resolve
|
||||||
|
* this prefix into "http://www.w3.org/XML/1998/namespace",
|
||||||
|
* as defined in the XML Namespaces Recommendation.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* namespace URI of this prefix.
|
||||||
|
* If the specified prefix is not declared,
|
||||||
|
* the implementation must return null.
|
||||||
|
*/
|
||||||
|
String resolveNamespacePrefix( String prefix );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the base URI of the context. The null string may be returned
|
||||||
|
* if no base URI is known.
|
||||||
|
*/
|
||||||
|
String getBaseUri();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if an unparsed entity is declared with the
|
||||||
|
* specified name.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* true
|
||||||
|
* if the DTD has an unparsed entity declaration for
|
||||||
|
* the specified name.
|
||||||
|
* false
|
||||||
|
* otherwise.
|
||||||
|
*/
|
||||||
|
boolean isUnparsedEntity( String entityName );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a notation is declared with the
|
||||||
|
* specified name.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* true
|
||||||
|
* if the DTD has a notation declaration for the specified name.
|
||||||
|
* false
|
||||||
|
* otherwise.
|
||||||
|
*/
|
||||||
|
boolean isNotation( String notationName );
|
||||||
|
}
|
||||||
262
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/helpers/DatatypeLibraryLoader.java
vendored
Executable file
262
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/helpers/DatatypeLibraryLoader.java
vendored
Executable file
|
|
@ -0,0 +1,262 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) 2001, Thai Open Source Software Center Ltd
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are
|
||||||
|
* met:
|
||||||
|
*
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in
|
||||||
|
* the documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
*
|
||||||
|
* Neither the name of the Thai Open Source Software Center Ltd nor
|
||||||
|
* the names of its contributors may be used to endorse or promote
|
||||||
|
* products derived from this software without specific prior written
|
||||||
|
* permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package org.relaxng.datatype.helpers;
|
||||||
|
|
||||||
|
import org.relaxng.datatype.DatatypeLibraryFactory;
|
||||||
|
import org.relaxng.datatype.DatatypeLibrary;
|
||||||
|
import java.util.Enumeration;
|
||||||
|
import java.util.NoSuchElementException;
|
||||||
|
import java.util.Vector;
|
||||||
|
import java.io.Reader;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Discovers the datatype library implementation from the classpath.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* The call of the createDatatypeLibrary method finds an implementation
|
||||||
|
* from a given datatype library URI at run-time.
|
||||||
|
*/
|
||||||
|
public class DatatypeLibraryLoader implements DatatypeLibraryFactory {
|
||||||
|
private final Service service = new Service(DatatypeLibraryFactory.class);
|
||||||
|
|
||||||
|
public DatatypeLibrary createDatatypeLibrary(String uri) {
|
||||||
|
for (Enumeration e = service.getProviders();
|
||||||
|
e.hasMoreElements();) {
|
||||||
|
DatatypeLibraryFactory factory
|
||||||
|
= (DatatypeLibraryFactory)e.nextElement();
|
||||||
|
DatatypeLibrary library = factory.createDatatypeLibrary(uri);
|
||||||
|
if (library != null)
|
||||||
|
return library;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class Service {
|
||||||
|
private final Class serviceClass;
|
||||||
|
private final Enumeration configFiles;
|
||||||
|
private Enumeration classNames = null;
|
||||||
|
private final Vector providers = new Vector();
|
||||||
|
private Loader loader;
|
||||||
|
|
||||||
|
private class ProviderEnumeration implements Enumeration {
|
||||||
|
private int nextIndex = 0;
|
||||||
|
|
||||||
|
public boolean hasMoreElements() {
|
||||||
|
return nextIndex < providers.size() || moreProviders();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object nextElement() {
|
||||||
|
try {
|
||||||
|
return providers.elementAt(nextIndex++);
|
||||||
|
}
|
||||||
|
catch (ArrayIndexOutOfBoundsException e) {
|
||||||
|
throw new NoSuchElementException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class Singleton implements Enumeration {
|
||||||
|
private Object obj;
|
||||||
|
private Singleton(Object obj) {
|
||||||
|
this.obj = obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasMoreElements() {
|
||||||
|
return obj != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object nextElement() {
|
||||||
|
if (obj == null)
|
||||||
|
throw new NoSuchElementException();
|
||||||
|
Object tem = obj;
|
||||||
|
obj = null;
|
||||||
|
return tem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// JDK 1.1
|
||||||
|
private static class Loader {
|
||||||
|
Enumeration getResources(String resName) {
|
||||||
|
ClassLoader cl = Loader.class.getClassLoader();
|
||||||
|
URL url;
|
||||||
|
if (cl == null)
|
||||||
|
url = ClassLoader.getSystemResource(resName);
|
||||||
|
else
|
||||||
|
url = cl.getResource(resName);
|
||||||
|
return new Singleton(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
Class loadClass(String name) throws ClassNotFoundException {
|
||||||
|
return Class.forName(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// JDK 1.2+
|
||||||
|
private static class Loader2 extends Loader {
|
||||||
|
private ClassLoader cl;
|
||||||
|
|
||||||
|
Loader2() {
|
||||||
|
cl = Loader2.class.getClassLoader();
|
||||||
|
// If the thread context class loader has the class loader
|
||||||
|
// of this class as an ancestor, use the thread context class
|
||||||
|
// loader. Otherwise, the thread context class loader
|
||||||
|
// probably hasn't been set up properly, so don't use it.
|
||||||
|
ClassLoader clt = Thread.currentThread().getContextClassLoader();
|
||||||
|
for (ClassLoader tem = clt; tem != null; tem = tem.getParent())
|
||||||
|
if (tem == cl) {
|
||||||
|
cl = clt;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Enumeration getResources(String resName) {
|
||||||
|
try {
|
||||||
|
return cl.getResources(resName);
|
||||||
|
}
|
||||||
|
catch (IOException e) {
|
||||||
|
return new Singleton(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class loadClass(String name) throws ClassNotFoundException {
|
||||||
|
return Class.forName(name, true, cl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Service(Class cls) {
|
||||||
|
try {
|
||||||
|
loader = new Loader2();
|
||||||
|
}
|
||||||
|
catch (NoSuchMethodError e) {
|
||||||
|
loader = new Loader();
|
||||||
|
}
|
||||||
|
serviceClass = cls;
|
||||||
|
String resName = "META-INF/services/" + serviceClass.getName();
|
||||||
|
configFiles = loader.getResources(resName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Enumeration getProviders() {
|
||||||
|
return new ProviderEnumeration();
|
||||||
|
}
|
||||||
|
|
||||||
|
synchronized private boolean moreProviders() {
|
||||||
|
for (;;) {
|
||||||
|
while (classNames == null) {
|
||||||
|
if (!configFiles.hasMoreElements())
|
||||||
|
return false;
|
||||||
|
classNames = parseConfigFile((URL)configFiles.nextElement());
|
||||||
|
}
|
||||||
|
while (classNames.hasMoreElements()) {
|
||||||
|
String className = (String)classNames.nextElement();
|
||||||
|
try {
|
||||||
|
Class cls = loader.loadClass(className);
|
||||||
|
Object obj = cls.newInstance();
|
||||||
|
if (serviceClass.isInstance(obj)) {
|
||||||
|
providers.addElement(obj);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (ClassNotFoundException e) { }
|
||||||
|
catch (InstantiationException e) { }
|
||||||
|
catch (IllegalAccessException e) { }
|
||||||
|
catch (LinkageError e) { }
|
||||||
|
}
|
||||||
|
classNames = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final int START = 0;
|
||||||
|
private static final int IN_NAME = 1;
|
||||||
|
private static final int IN_COMMENT = 2;
|
||||||
|
|
||||||
|
private static Enumeration parseConfigFile(URL url) {
|
||||||
|
try {
|
||||||
|
InputStream in = url.openStream();
|
||||||
|
Reader r;
|
||||||
|
try {
|
||||||
|
r = new InputStreamReader(in, "UTF-8");
|
||||||
|
}
|
||||||
|
catch (UnsupportedEncodingException e) {
|
||||||
|
r = new InputStreamReader(in, "UTF8");
|
||||||
|
}
|
||||||
|
r = new BufferedReader(r);
|
||||||
|
Vector tokens = new Vector();
|
||||||
|
StringBuffer tokenBuf = new StringBuffer();
|
||||||
|
int state = START;
|
||||||
|
for (;;) {
|
||||||
|
int n = r.read();
|
||||||
|
if (n < 0)
|
||||||
|
break;
|
||||||
|
char c = (char)n;
|
||||||
|
switch (c) {
|
||||||
|
case '\r':
|
||||||
|
case '\n':
|
||||||
|
state = START;
|
||||||
|
break;
|
||||||
|
case ' ':
|
||||||
|
case '\t':
|
||||||
|
break;
|
||||||
|
case '#':
|
||||||
|
state = IN_COMMENT;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (state != IN_COMMENT) {
|
||||||
|
state = IN_NAME;
|
||||||
|
tokenBuf.append(c);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (tokenBuf.length() != 0 && state != IN_NAME) {
|
||||||
|
tokens.addElement(tokenBuf.toString());
|
||||||
|
tokenBuf.setLength(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tokenBuf.length() != 0)
|
||||||
|
tokens.addElement(tokenBuf.toString());
|
||||||
|
return tokens.elements();
|
||||||
|
}
|
||||||
|
catch (IOException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
42
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java
vendored
Executable file
42
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java
vendored
Executable file
|
|
@ -0,0 +1,42 @@
|
||||||
|
package org.relaxng.datatype.helpers;
|
||||||
|
|
||||||
|
import org.relaxng.datatype.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dummy implementation of {@link DatatypeBuilder}.
|
||||||
|
*
|
||||||
|
* This implementation can be used for Datatypes which have no parameters.
|
||||||
|
* Any attempt to add parameters will be rejected.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* Typical usage would be:
|
||||||
|
* <PRE><XMP>
|
||||||
|
* class MyDatatypeLibrary implements DatatypeLibrary {
|
||||||
|
* ....
|
||||||
|
* DatatypeBuilder createDatatypeBuilder( String typeName ) {
|
||||||
|
* return new ParameterleessDatatypeBuilder(createDatatype(typeName));
|
||||||
|
* }
|
||||||
|
* ....
|
||||||
|
* }
|
||||||
|
* </XMP></PRE>
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
|
||||||
|
*/
|
||||||
|
public final class ParameterlessDatatypeBuilder implements DatatypeBuilder {
|
||||||
|
|
||||||
|
/** This type object is returned for the derive method. */
|
||||||
|
private final Datatype baseType;
|
||||||
|
|
||||||
|
public ParameterlessDatatypeBuilder( Datatype baseType ) {
|
||||||
|
this.baseType = baseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addParameter( String name, String strValue, ValidationContext context )
|
||||||
|
throws DatatypeException {
|
||||||
|
throw new DatatypeException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Datatype createDatatype() throws DatatypeException {
|
||||||
|
return baseType;
|
||||||
|
}
|
||||||
|
}
|
||||||
55
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/helpers/StreamingValidatorImpl.java
vendored
Executable file
55
libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/helpers/StreamingValidatorImpl.java
vendored
Executable file
|
|
@ -0,0 +1,55 @@
|
||||||
|
package org.relaxng.datatype.helpers;
|
||||||
|
|
||||||
|
import org.relaxng.datatype.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dummy implementation of {@link DatatypeStreamingValidator}.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* This implementation can be used as a quick hack when the performance
|
||||||
|
* of streaming validation is not important. And this implementation
|
||||||
|
* also shows you how to implement the DatatypeStreamingValidator interface.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* Typical usage would be:
|
||||||
|
* <PRE><XMP>
|
||||||
|
* class MyDatatype implements Datatype {
|
||||||
|
* ....
|
||||||
|
* public DatatypeStreamingValidator createStreamingValidator( ValidationContext context ) {
|
||||||
|
* return new StreamingValidatorImpl(this,context);
|
||||||
|
* }
|
||||||
|
* ....
|
||||||
|
* }
|
||||||
|
* </XMP></PRE>
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
|
||||||
|
*/
|
||||||
|
public final class StreamingValidatorImpl implements DatatypeStreamingValidator {
|
||||||
|
|
||||||
|
/** This buffer accumulates characters. */
|
||||||
|
private final StringBuffer buffer = new StringBuffer();
|
||||||
|
|
||||||
|
/** Datatype obejct that creates this streaming validator. */
|
||||||
|
private final Datatype baseType;
|
||||||
|
|
||||||
|
/** The current context. */
|
||||||
|
private final ValidationContext context;
|
||||||
|
|
||||||
|
public void addCharacters( char[] buf, int start, int len ) {
|
||||||
|
// append characters to the current buffer.
|
||||||
|
buffer.append(buf,start,len);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isValid() {
|
||||||
|
return baseType.isValid(buffer.toString(),context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void checkValid() throws DatatypeException {
|
||||||
|
baseType.checkValid(buffer.toString(),context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public StreamingValidatorImpl( Datatype baseType, ValidationContext context ) {
|
||||||
|
this.baseType = baseType;
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -71,6 +71,7 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CLASSPATH_INCLUDES = @CLASSPATH_INCLUDES@
|
CLASSPATH_INCLUDES = @CLASSPATH_INCLUDES@
|
||||||
CLASSPATH_MODULE = @CLASSPATH_MODULE@
|
CLASSPATH_MODULE = @CLASSPATH_MODULE@
|
||||||
|
COLLECTIONS_PREFIX = @COLLECTIONS_PREFIX@
|
||||||
CP = @CP@
|
CP = @CP@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
|
@ -78,6 +79,8 @@ CREATE_ALSA_LIBRARIES_FALSE = @CREATE_ALSA_LIBRARIES_FALSE@
|
||||||
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
|
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
|
||||||
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
|
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
|
||||||
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
|
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
|
||||||
|
CREATE_COLLECTIONS_FALSE = @CREATE_COLLECTIONS_FALSE@
|
||||||
|
CREATE_COLLECTIONS_TRUE = @CREATE_COLLECTIONS_TRUE@
|
||||||
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
|
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
|
||||||
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
|
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
|
||||||
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
|
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
|
||||||
|
|
@ -108,6 +111,7 @@ EGREP = @EGREP@
|
||||||
ERROR_CFLAGS = @ERROR_CFLAGS@
|
ERROR_CFLAGS = @ERROR_CFLAGS@
|
||||||
EXAMPLESDIR = @EXAMPLESDIR@
|
EXAMPLESDIR = @EXAMPLESDIR@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
FASTJAR = @FASTJAR@
|
||||||
FIND = @FIND@
|
FIND = @FIND@
|
||||||
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
|
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
|
||||||
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
|
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
|
||||||
|
|
@ -119,6 +123,8 @@ FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
|
||||||
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
|
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
|
||||||
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
|
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
|
||||||
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
|
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
|
||||||
|
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
|
||||||
|
FREETYPE2_LIBS = @FREETYPE2_LIBS@
|
||||||
GCJ = @GCJ@
|
GCJ = @GCJ@
|
||||||
GCJX = @GCJX@
|
GCJX = @GCJX@
|
||||||
GJDOC = @GJDOC@
|
GJDOC = @GJDOC@
|
||||||
|
|
@ -169,6 +175,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
||||||
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PERL = @PERL@
|
||||||
PKG_CONFIG = @PKG_CONFIG@
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
QT_CFLAGS = @QT_CFLAGS@
|
QT_CFLAGS = @QT_CFLAGS@
|
||||||
QT_LIBS = @QT_LIBS@
|
QT_LIBS = @QT_LIBS@
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CLASSPATH_INCLUDES = @CLASSPATH_INCLUDES@
|
CLASSPATH_INCLUDES = @CLASSPATH_INCLUDES@
|
||||||
CLASSPATH_MODULE = @CLASSPATH_MODULE@
|
CLASSPATH_MODULE = @CLASSPATH_MODULE@
|
||||||
|
COLLECTIONS_PREFIX = @COLLECTIONS_PREFIX@
|
||||||
CP = @CP@
|
CP = @CP@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
|
@ -78,6 +79,8 @@ CREATE_ALSA_LIBRARIES_FALSE = @CREATE_ALSA_LIBRARIES_FALSE@
|
||||||
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
|
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
|
||||||
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
|
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
|
||||||
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
|
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
|
||||||
|
CREATE_COLLECTIONS_FALSE = @CREATE_COLLECTIONS_FALSE@
|
||||||
|
CREATE_COLLECTIONS_TRUE = @CREATE_COLLECTIONS_TRUE@
|
||||||
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
|
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
|
||||||
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
|
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
|
||||||
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
|
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
|
||||||
|
|
@ -108,6 +111,7 @@ EGREP = @EGREP@
|
||||||
ERROR_CFLAGS = @ERROR_CFLAGS@
|
ERROR_CFLAGS = @ERROR_CFLAGS@
|
||||||
EXAMPLESDIR = @EXAMPLESDIR@
|
EXAMPLESDIR = @EXAMPLESDIR@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
FASTJAR = @FASTJAR@
|
||||||
FIND = @FIND@
|
FIND = @FIND@
|
||||||
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
|
FOUND_ECJ_FALSE = @FOUND_ECJ_FALSE@
|
||||||
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
|
FOUND_ECJ_TRUE = @FOUND_ECJ_TRUE@
|
||||||
|
|
@ -119,6 +123,8 @@ FOUND_JIKES_FALSE = @FOUND_JIKES_FALSE@
|
||||||
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
|
FOUND_JIKES_TRUE = @FOUND_JIKES_TRUE@
|
||||||
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
|
FOUND_KJC_FALSE = @FOUND_KJC_FALSE@
|
||||||
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
|
FOUND_KJC_TRUE = @FOUND_KJC_TRUE@
|
||||||
|
FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
|
||||||
|
FREETYPE2_LIBS = @FREETYPE2_LIBS@
|
||||||
GCJ = @GCJ@
|
GCJ = @GCJ@
|
||||||
GCJX = @GCJX@
|
GCJX = @GCJX@
|
||||||
GJDOC = @GJDOC@
|
GJDOC = @GJDOC@
|
||||||
|
|
@ -169,6 +175,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
PANGOFT2_CFLAGS = @PANGOFT2_CFLAGS@
|
||||||
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
PANGOFT2_LIBS = @PANGOFT2_LIBS@
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PERL = @PERL@
|
||||||
PKG_CONFIG = @PKG_CONFIG@
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
QT_CFLAGS = @QT_CFLAGS@
|
QT_CFLAGS = @QT_CFLAGS@
|
||||||
QT_LIBS = @QT_LIBS@
|
QT_LIBS = @QT_LIBS@
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,27 @@ public class IOR
|
||||||
b.append(' ');
|
b.append(' ');
|
||||||
return b.toString();
|
return b.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a better formatted multiline string representation.
|
||||||
|
*/
|
||||||
|
public String toStringFormatted()
|
||||||
|
{
|
||||||
|
StringBuffer b = new StringBuffer();
|
||||||
|
b.append("\n Native set " + name(native_set));
|
||||||
|
if (conversion != null && conversion.length > 0)
|
||||||
|
{
|
||||||
|
b.append("\n Other supported sets:\n ");
|
||||||
|
for (int i = 0; i < conversion.length; i++)
|
||||||
|
{
|
||||||
|
b.append(name(conversion[i]));
|
||||||
|
b.append(' ');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
b.append("\n");
|
||||||
|
return b.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write into CDR stream.
|
* Write into CDR stream.
|
||||||
|
|
@ -590,6 +611,39 @@ public class IOR
|
||||||
|
|
||||||
return b.toString();
|
return b.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a multiline formatted human readable string representation of
|
||||||
|
* this IOR object.
|
||||||
|
*/
|
||||||
|
public String toStringFormatted()
|
||||||
|
{
|
||||||
|
StringBuffer b = new StringBuffer();
|
||||||
|
b.append("\nObject Id:\n ");
|
||||||
|
b.append(Id);
|
||||||
|
b.append("\nObject is accessible at:\n ");
|
||||||
|
b.append(Internet);
|
||||||
|
|
||||||
|
if (Big_Endian)
|
||||||
|
b.append("\n Big endian encoding");
|
||||||
|
else
|
||||||
|
b.append("\n Little endian encoding.");
|
||||||
|
|
||||||
|
b.append("\nObject Key\n ");
|
||||||
|
|
||||||
|
for (int i = 0; i < key.length; i++)
|
||||||
|
{
|
||||||
|
b.append(Integer.toHexString(key[i] & 0xFF));
|
||||||
|
}
|
||||||
|
|
||||||
|
b.append("\nSupported code sets:");
|
||||||
|
b.append("\n Wide:");
|
||||||
|
b.append(Internet.CodeSets.wide.toStringFormatted());
|
||||||
|
b.append(" Narrow:");
|
||||||
|
b.append(Internet.CodeSets.wide.toStringFormatted());
|
||||||
|
|
||||||
|
return b.toString();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returs a stringified reference.
|
* Returs a stringified reference.
|
||||||
|
|
|
||||||
|
|
@ -58,11 +58,11 @@ public class NamingMap
|
||||||
/**
|
/**
|
||||||
* The actual map.
|
* The actual map.
|
||||||
*/
|
*/
|
||||||
private final TreeMap map;
|
protected final TreeMap map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an instance of the naming map, intialising the comparator
|
* Creates an instance of the naming map, intialising the comparator
|
||||||
* to the {@link cmpNameComparator}.
|
* to the {@link NameComponentComparator}.
|
||||||
*/
|
*/
|
||||||
public NamingMap()
|
public NamingMap()
|
||||||
{
|
{
|
||||||
|
|
@ -70,7 +70,7 @@ public class NamingMap
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Put the given CORBA object, specifying the given name as a key.
|
* Put the given GIOP object, specifying the given name as a key.
|
||||||
* If the entry with the given name already exists, or if the given
|
* If the entry with the given name already exists, or if the given
|
||||||
* object is already mapped under another name, the
|
* object is already mapped under another name, the
|
||||||
* {@link AlreadyBound} exception will be thrown.
|
* {@link AlreadyBound} exception will be thrown.
|
||||||
|
|
@ -93,8 +93,11 @@ public class NamingMap
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (containsValue(object))
|
if (containsValue(object))
|
||||||
throw new AlreadyBound("Tha object has another name");
|
throw new AlreadyBound("The object has another name");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// There are no restrictions in binding the object.
|
||||||
|
rebind(name, object);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -141,7 +144,7 @@ public class NamingMap
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Put the given CORBA object, specifying the given name as a key.
|
* Put the given GIOP object, specifying the given name as a key.
|
||||||
* Remove all pre - existing mappings for the given name and object.
|
* Remove all pre - existing mappings for the given name and object.
|
||||||
*
|
*
|
||||||
* @param name the name.
|
* @param name the name.
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ public class NamingServiceTransient
|
||||||
System.out.println("GNU Classpath transient naming service "
|
System.out.println("GNU Classpath transient naming service "
|
||||||
+ "started at " + iorr.Internet.host + ":" + iorr.Internet.port
|
+ "started at " + iorr.Internet.host + ":" + iorr.Internet.port
|
||||||
+ " key 'NameService'.\n\n"
|
+ " key 'NameService'.\n\n"
|
||||||
+ "Copyright (C) 2005 Free Software Foundation\n"
|
+ "Copyright (C) 2006 Free Software Foundation\n"
|
||||||
+ "This tool comes with ABSOLUTELY NO WARRANTY. "
|
+ "This tool comes with ABSOLUTELY NO WARRANTY. "
|
||||||
+ "This is free software, and you are\nwelcome to "
|
+ "This is free software, and you are\nwelcome to "
|
||||||
+ "redistribute it under conditions, defined in "
|
+ "redistribute it under conditions, defined in "
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class implements the transient naming service, defined by
|
* This class implements the transient naming service, defined by
|
||||||
* {@link NamingContex}. The 'transient' means that the service does
|
* {@link NamingContext}. The 'transient' means that the service does
|
||||||
* not store its state into the persistent memory. If the service is
|
* not store its state into the persistent memory. If the service is
|
||||||
* restarted, the named objects must be re-registered again.
|
* restarted, the named objects must be re-registered again.
|
||||||
*
|
*
|
||||||
|
|
@ -71,15 +71,40 @@ public class TransientContext
|
||||||
extends _NamingContextImplBase
|
extends _NamingContextImplBase
|
||||||
implements NamingContext, NamingContextOperations
|
implements NamingContext, NamingContextOperations
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Use serial version UID for interoperability.
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The already named contexts.
|
* The already named contexts.
|
||||||
*/
|
*/
|
||||||
protected final NamingMap named_contexts = new NamingMap();
|
protected final NamingMap named_contexts;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The already named objects.
|
* The already named objects.
|
||||||
*/
|
*/
|
||||||
protected final NamingMap named_objects = new NamingMap();
|
protected final NamingMap named_objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the naming conetxt with default (transient) naming maps.
|
||||||
|
*/
|
||||||
|
public TransientContext()
|
||||||
|
{
|
||||||
|
this(new NamingMap(), new NamingMap());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the naming conetxt with the two provided naming maps.
|
||||||
|
*
|
||||||
|
* @param context_map the map for contexts
|
||||||
|
* @param object_map the map for objectss
|
||||||
|
*/
|
||||||
|
public TransientContext(NamingMap context_map, NamingMap object_map)
|
||||||
|
{
|
||||||
|
named_contexts = context_map;
|
||||||
|
named_objects = object_map;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gives the object a name, valid in this context.
|
* Gives the object a name, valid in this context.
|
||||||
|
|
@ -376,7 +401,7 @@ public class TransientContext
|
||||||
/**
|
/**
|
||||||
* Create a binding.
|
* Create a binding.
|
||||||
*
|
*
|
||||||
* @param entry the entry, defining the bound object.
|
* @param an_entry the entry, defining the bound object.
|
||||||
* @param type the binding type.
|
* @param type the binding type.
|
||||||
* @return the created binding.
|
* @return the created binding.
|
||||||
*/
|
*/
|
||||||
|
|
@ -396,7 +421,7 @@ public class TransientContext
|
||||||
* name, and pass the remainder (without the first node)
|
* name, and pass the remainder (without the first node)
|
||||||
* of the name for that context to resolve.
|
* of the name for that context to resolve.
|
||||||
*
|
*
|
||||||
* @param name the name to resolve.
|
* @param a_name the name to resolve.
|
||||||
*
|
*
|
||||||
* @return the resolved context
|
* @return the resolved context
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,7 @@ public final class ServiceFactory
|
||||||
* An iterator over service providers that are listed in service
|
* An iterator over service providers that are listed in service
|
||||||
* provider configuration files, which get passed as an Enumeration
|
* provider configuration files, which get passed as an Enumeration
|
||||||
* of URLs. This is a helper class for {@link
|
* of URLs. This is a helper class for {@link
|
||||||
* ServiceFactory#lookupProviders}.
|
* ServiceFactory#lookupProviders(Class, ClassLoader)}.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:brawer@dandelis.ch">Sascha Brawer</a>
|
* @author <a href="mailto:brawer@dandelis.ch">Sascha Brawer</a>
|
||||||
*/
|
*/
|
||||||
|
|
@ -314,7 +314,8 @@ public final class ServiceFactory
|
||||||
* The security context used when loading and initializing service
|
* The security context used when loading and initializing service
|
||||||
* providers. We want to load and initialize all plug-in service
|
* providers. We want to load and initialize all plug-in service
|
||||||
* providers under the same security context, namely the one that
|
* providers under the same security context, namely the one that
|
||||||
* was active when {@link #lookupProviders} has been called.
|
* was active when {@link #lookupProviders(Class, ClassLoader)} has
|
||||||
|
* been called.
|
||||||
*/
|
*/
|
||||||
private final AccessControlContext securityContext;
|
private final AccessControlContext securityContext;
|
||||||
|
|
||||||
|
|
@ -527,7 +528,7 @@ public final class ServiceFactory
|
||||||
* framework. This call returns very quickly if no log message will
|
* framework. This call returns very quickly if no log message will
|
||||||
* be produced, so there is not much overhead in the standard case.
|
* be produced, so there is not much overhead in the standard case.
|
||||||
*
|
*
|
||||||
* @param the severity of the message, for instance {@link
|
* @param level the severity of the message, for instance {@link
|
||||||
* Level#WARNING}.
|
* Level#WARNING}.
|
||||||
*
|
*
|
||||||
* @param msg the log message, for instance <code>“Could not
|
* @param msg the log message, for instance <code>“Could not
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,9 @@ import java.security.PrivilegedExceptionAction;
|
||||||
* <code>PriviledgedAction</code> in order to restrict the loaded
|
* <code>PriviledgedAction</code> in order to restrict the loaded
|
||||||
* service providers to the {@link java.security.AccessControlContext}
|
* service providers to the {@link java.security.AccessControlContext}
|
||||||
* that was active when {@link
|
* that was active when {@link
|
||||||
* gnu.classpath.ServiceFactory#lookupProviders} was called, even
|
* gnu.classpath.ServiceFactory#lookupProviders(Class, ClassLoader)} was
|
||||||
* though the actual loading is delayed to the time when the provider
|
* called, even though the actual loading is delayed to the time when the
|
||||||
* is actually needed.
|
* provider is actually needed.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:brawer@dandelis.ch">Sascha Brawer</a>
|
* @author <a href="mailto:brawer@dandelis.ch">Sascha Brawer</a>
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -89,9 +89,9 @@ public final class Component extends Level
|
||||||
public static final Component SSL_HANDSHAKE = new Component ("SSL HANDSHAKE", 0);
|
public static final Component SSL_HANDSHAKE = new Component ("SSL HANDSHAKE", 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Traces the application messages during SSL communications.
|
* Traces record layer messages during SSL communications.
|
||||||
*/
|
*/
|
||||||
public static final Component SSL_APPLICATION = new Component ("SSL APPLICATION", 1);
|
public static final Component SSL_RECORD_LAYER = new Component ("SSL RECORD LAYER", 1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trace details about the SSL key exchange.
|
* Trace details about the SSL key exchange.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,153 @@
|
||||||
|
/* Simple1LineFormatter.java -- A simple 1-line logging formatter
|
||||||
|
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
GNU Classpath is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GNU Classpath 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
02110-1301 USA.
|
||||||
|
|
||||||
|
Linking this library statically or dynamically with other modules is
|
||||||
|
making a combined work based on this library. Thus, the terms and
|
||||||
|
conditions of the GNU General Public License cover the whole
|
||||||
|
combination.
|
||||||
|
|
||||||
|
As a special exception, the copyright holders of this library give you
|
||||||
|
permission to link this library with independent modules to produce an
|
||||||
|
executable, regardless of the license terms of these independent
|
||||||
|
modules, and to copy and distribute the resulting executable under
|
||||||
|
terms of your choice, provided that you also meet, for each linked
|
||||||
|
independent module, the terms and conditions of the license of that
|
||||||
|
module. An independent module is a module which is not derived from
|
||||||
|
or based on this library. If you modify this library, you may extend
|
||||||
|
this exception to your version of the library, but you are not
|
||||||
|
obligated to do so. If you do not wish to do so, delete this
|
||||||
|
exception statement from your version. */
|
||||||
|
|
||||||
|
|
||||||
|
package gnu.classpath.debug;
|
||||||
|
|
||||||
|
import gnu.classpath.SystemProperties;
|
||||||
|
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.text.NumberFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.logging.Formatter;
|
||||||
|
import java.util.logging.LogRecord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple 1-line formatter to use instead of the 2-line SimpleFormatter used
|
||||||
|
* by default in the JDK logging handlers.
|
||||||
|
* <p>
|
||||||
|
* The fixed format of this formatter is as follows:
|
||||||
|
* <p>
|
||||||
|
* <ol>
|
||||||
|
* <li>Date: As a yyyy-MM-dd string.</li>
|
||||||
|
* <li>Time: As a HH:mm:ss.SSSS Z string.</li>
|
||||||
|
* <li>Thread identifier, right-justified, and framed in an 11-digit field.</li>
|
||||||
|
* <li>Class name, without its package name, left-justified, and framed in a
|
||||||
|
* 32-character field.</li>
|
||||||
|
* <li>Method name, left-justified, and framed in a 32-character field.</li>
|
||||||
|
* <li>Level name, left-justified, and framed in a 6-character field.</li>
|
||||||
|
* <li>User message and arguments.</li>
|
||||||
|
* <li>Platform-dependent line-separator.</li>
|
||||||
|
* <li>Optionally, if the log-record contains a thrown exception, that
|
||||||
|
* exception's stack trace is appended to the output.</li>
|
||||||
|
* </ol>
|
||||||
|
* <p>
|
||||||
|
* Here is an example of the output generated by this formatter:
|
||||||
|
* <p>
|
||||||
|
* <pre>
|
||||||
|
* 2006-02-27 21:59:12.0881 +1100 -1343151280 EncodedKeyFactory engineGeneratePublic() FINER - ENTRY java.security.spec.X509EncodedKeySpec@b00d7fc0
|
||||||
|
* 2006-02-27 21:59:12.0887 +1100 -1343151280 EncodedKeyFactory engineGeneratePublic() FINE - Exception in DSSPublicKey.valueOf(). Ignore
|
||||||
|
* java.security.InvalidParameterException: Unexpected OID: 1.2.840.113549.1.1.1
|
||||||
|
* at gnu.java.security.key.dss.DSSKeyPairX509Codec.decodePublicKey (DSSKeyPairX509Codec.java:205)
|
||||||
|
* at gnu.java.security.key.dss.DSSPublicKey.valueOf (DSSPublicKey.java:136)
|
||||||
|
* at gnu.java.security.jce.sig.EncodedKeyFactory.engineGeneratePublic (EncodedKeyFactory.java:218)
|
||||||
|
* at java.security.KeyFactory.generatePublic (KeyFactory.java:219)
|
||||||
|
* at gnu.java.security.x509.X509Certificate.parse (X509Certificate.java:657)
|
||||||
|
* at gnu.java.security.x509.X509Certificate.<init> (X509Certificate.java:163)
|
||||||
|
* ...
|
||||||
|
* 2006-02-27 21:59:12.0895 +1100 -1343151280 RSAKeyPairX509Codec decodePublicKey() FINER - ENTRY [B@b00d7fd0
|
||||||
|
* 2006-02-27 21:59:12.0897 +1100 -1343151280 RSAKeyPairX509Codec decodePublicKey() FINER - RETURN gnu.java.security.key.rsa.GnuRSAPublicKey@b00fb940
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public class Simple1LineFormatter
|
||||||
|
extends Formatter
|
||||||
|
{
|
||||||
|
private static final String DAT_PATTERN = "yyyy-MM-dd HH:mm:ss.SSSS Z ";
|
||||||
|
private static final DateFormat DAT_FORMAT = new SimpleDateFormat(DAT_PATTERN);
|
||||||
|
private static final String THREAD_PATTERN = " #########0;-#########0";
|
||||||
|
private static final NumberFormat THREAD_FORMAT = new DecimalFormat(THREAD_PATTERN);
|
||||||
|
private static final String SPACES_32 = " ";
|
||||||
|
private static final String SPACES_6 = " ";
|
||||||
|
private static final String LS = SystemProperties.getProperty("line.separator");
|
||||||
|
|
||||||
|
// default 0-arguments constructor
|
||||||
|
|
||||||
|
public String format(LogRecord record)
|
||||||
|
{
|
||||||
|
StringBuffer sb = new StringBuffer(180)
|
||||||
|
.append(DAT_FORMAT.format(new Date(record.getMillis())))
|
||||||
|
.append(THREAD_FORMAT.format(record.getThreadID()))
|
||||||
|
.append(" ");
|
||||||
|
String s = record.getSourceClassName();
|
||||||
|
if (s == null)
|
||||||
|
sb.append(SPACES_32);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
s = s.trim();
|
||||||
|
int i = s.lastIndexOf(".");
|
||||||
|
if (i != - 1)
|
||||||
|
s = s.substring(i + 1);
|
||||||
|
|
||||||
|
s = (s + SPACES_32).substring(0, 32);
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(s).append(" ");
|
||||||
|
s = record.getSourceMethodName();
|
||||||
|
if (s == null)
|
||||||
|
sb.append(SPACES_32);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
s = s.trim();
|
||||||
|
if (s.endsWith("()"))
|
||||||
|
s = (s.trim() + SPACES_32).substring(0, 32);
|
||||||
|
else
|
||||||
|
s = (s.trim() + "()" + SPACES_32).substring(0, 32);
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(s).append(" ");
|
||||||
|
s = String.valueOf(record.getLevel());
|
||||||
|
if (s == null)
|
||||||
|
sb.append(SPACES_6);
|
||||||
|
else
|
||||||
|
s = (s.trim() + SPACES_6).substring(0, 6);
|
||||||
|
|
||||||
|
sb.append(s).append(" - ").append(formatMessage(record)).append(LS);
|
||||||
|
Throwable cause = record.getThrown();
|
||||||
|
if (cause != null)
|
||||||
|
{
|
||||||
|
StringWriter sw = new StringWriter();
|
||||||
|
cause.printStackTrace(new PrintWriter(sw, true));
|
||||||
|
sb.append(sw.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* Jdwp.java -- Virtual machine to JDWP back-end programming interface
|
/* Jdwp.java -- Virtual machine to JDWP back-end programming interface
|
||||||
Copyright (C) 2005 Free Software Foundation
|
Copyright (C) 2005, 2006 Free Software Foundation
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -159,7 +159,7 @@ public class Jdwp
|
||||||
{
|
{
|
||||||
AccessController.doPrivileged (_packetProcessor);
|
AccessController.doPrivileged (_packetProcessor);
|
||||||
}
|
}
|
||||||
});
|
}, "packet processor");
|
||||||
_ppThread.start ();
|
_ppThread.start ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -258,7 +258,7 @@ public class Jdwp
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EventRequest.SUSPEND_THREAD:
|
case EventRequest.SUSPEND_THREAD:
|
||||||
VMVirtualMachine.suspendThread (this);
|
VMVirtualMachine.suspendThread (Thread.currentThread ());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EventRequest.SUSPEND_ALL:
|
case EventRequest.SUSPEND_ALL:
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* EventRequest.java -- an event request from the debugger
|
/* EventRequest.java -- an event request from the debugger
|
||||||
Copyright (C) 2005 Free Software Foundation
|
Copyright (C) 2005, 2006 Free Software Foundation
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -44,8 +44,9 @@ import gnu.classpath.jdwp.event.filters.*;
|
||||||
import gnu.classpath.jdwp.exception.JdwpIllegalArgumentException;
|
import gnu.classpath.jdwp.exception.JdwpIllegalArgumentException;
|
||||||
import gnu.classpath.jdwp.id.*;
|
import gnu.classpath.jdwp.id.*;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.ListIterator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class which represents a request by the debugger for an event
|
* A class which represents a request by the debugger for an event
|
||||||
|
|
@ -319,6 +320,14 @@ public class EventRequest
|
||||||
_filters.add (filter);
|
_filters.add (filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the filters attached to this request
|
||||||
|
*/
|
||||||
|
public Collection getFilters ()
|
||||||
|
{
|
||||||
|
return _filters;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the suspend policy for this request
|
* Returns the suspend policy for this request
|
||||||
*/
|
*/
|
||||||
|
|
@ -363,7 +372,7 @@ public class EventRequest
|
||||||
// Loop through filters; all must match
|
// Loop through filters; all must match
|
||||||
// Note that we must allow EVERY filter to evaluate. This way
|
// Note that we must allow EVERY filter to evaluate. This way
|
||||||
// things like CountFilter will work.
|
// things like CountFilter will work.
|
||||||
ListIterator iter = _filters.listIterator ();
|
Iterator iter = _filters.iterator ();
|
||||||
while (iter.hasNext ())
|
while (iter.hasNext ())
|
||||||
{
|
{
|
||||||
IEventFilter filter = (IEventFilter) iter.next ();
|
IEventFilter filter = (IEventFilter) iter.next ();
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* JdwpId.java -- base class for all object ID types
|
/* JdwpId.java -- base class for all object ID types
|
||||||
Copyright (C) 2005 Free Software Foundation
|
Copyright (C) 2005, 2006 Free Software Foundation
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -50,6 +50,11 @@ import java.lang.ref.SoftReference;
|
||||||
*/
|
*/
|
||||||
public abstract class JdwpId
|
public abstract class JdwpId
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* The size of an ID. The default is 8 bytes (a long).
|
||||||
|
*/
|
||||||
|
public static final int SIZE = 8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID assigned to this object
|
* ID assigned to this object
|
||||||
*/
|
*/
|
||||||
|
|
@ -121,11 +126,6 @@ public abstract class JdwpId
|
||||||
return (id.getId () == getId ());
|
return (id.getId () == getId ());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns size of this type (used by IDSizes)
|
|
||||||
*/
|
|
||||||
public abstract int size ();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes the contents of this type to the <code>DataOutputStream</code>
|
* Writes the contents of this type to the <code>DataOutputStream</code>
|
||||||
* @param outStream the <code>DataOutputStream</code> to use
|
* @param outStream the <code>DataOutputStream</code> to use
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* ObjectId.java -- object IDs
|
/* ObjectId.java -- object IDs
|
||||||
Copyright (C) 2005 Free Software Foundation
|
Copyright (C) 2005, 2006 Free Software Foundation
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -82,14 +82,6 @@ public class ObjectId
|
||||||
super (tag);
|
super (tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the size of this id type
|
|
||||||
*/
|
|
||||||
public int size ()
|
|
||||||
{
|
|
||||||
return 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the object referred to by this ID
|
* Returns the object referred to by this ID
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* ReferenceTypeId.java -- a base class for all reference type IDs
|
/* ReferenceTypeId.java -- a base class for all reference type IDs
|
||||||
Copyright (C) 2005 Free Software Foundation
|
Copyright (C) 2005, 2006 Free Software Foundation
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -61,14 +61,6 @@ public class ReferenceTypeId
|
||||||
super (tag);
|
super (tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the size of this ID type
|
|
||||||
*/
|
|
||||||
public int size ()
|
|
||||||
{
|
|
||||||
return 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the class associated with this ID
|
* Gets the class associated with this ID
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* VirtualMachineCommandSet.java -- class to implement the VirtualMachine
|
/* VirtualMachineCommandSet.java -- class to implement the VirtualMachine
|
||||||
Command Set
|
Command Set
|
||||||
Copyright (C) 2005 Free Software Foundation
|
Copyright (C) 2005, 2006 Free Software Foundation
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -40,6 +40,7 @@ exception statement from your version. */
|
||||||
package gnu.classpath.jdwp.processor;
|
package gnu.classpath.jdwp.processor;
|
||||||
|
|
||||||
import gnu.classpath.jdwp.JdwpConstants;
|
import gnu.classpath.jdwp.JdwpConstants;
|
||||||
|
import gnu.classpath.jdwp.VMFrame;
|
||||||
import gnu.classpath.jdwp.VMVirtualMachine;
|
import gnu.classpath.jdwp.VMVirtualMachine;
|
||||||
import gnu.classpath.jdwp.exception.JdwpException;
|
import gnu.classpath.jdwp.exception.JdwpException;
|
||||||
import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
|
import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
|
||||||
|
|
@ -298,12 +299,11 @@ public class VirtualMachineCommandSet
|
||||||
private void executeIDsizes(ByteBuffer bb, DataOutputStream os)
|
private void executeIDsizes(ByteBuffer bb, DataOutputStream os)
|
||||||
throws JdwpException, IOException
|
throws JdwpException, IOException
|
||||||
{
|
{
|
||||||
ObjectId oid = new ObjectId();
|
os.writeInt(ObjectId.SIZE); // fieldId FIXME
|
||||||
os.writeInt(oid.size()); // fieldId
|
os.writeInt(ObjectId.SIZE); // methodId FIXME
|
||||||
os.writeInt(oid.size()); // methodId
|
os.writeInt(ObjectId.SIZE); // objectId
|
||||||
os.writeInt(oid.size()); // objectId
|
os.writeInt(ReferenceTypeId.SIZE); // referenceTypeId
|
||||||
os.writeInt(new ReferenceTypeId((byte) 0x00).size()); // referenceTypeId
|
os.writeInt(VMFrame.SIZE); // frameId
|
||||||
os.writeInt(oid.size()); // frameId
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void executeSuspend(ByteBuffer bb, DataOutputStream os)
|
private void executeSuspend(ByteBuffer bb, DataOutputStream os)
|
||||||
|
|
|
||||||
|
|
@ -229,9 +229,9 @@ public class GLightweightPeer
|
||||||
|
|
||||||
public void repaint(long tm, int x, int y, int width, int height)
|
public void repaint(long tm, int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
Component p = comp.getParent ();
|
Component p = comp.getParent();
|
||||||
if(p != null)
|
if (p != null)
|
||||||
p.repaint(tm,x+comp.getX(),y+comp.getY(),width,height);
|
p.repaint(tm, x + comp.getX(), y + comp.getY(), width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void requestFocus() {}
|
public void requestFocus() {}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* GtkButtonPeer.java -- Implements ButtonPeer with GTK
|
/* GtkButtonPeer.java -- Implements ButtonPeer with GTK
|
||||||
Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2004, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -57,7 +57,10 @@ public class GtkButtonPeer extends GtkComponentPeer
|
||||||
|
|
||||||
public native void connectSignals ();
|
public native void connectSignals ();
|
||||||
|
|
||||||
native void gtkWidgetModifyFont (String name, int style, int size);
|
/**
|
||||||
|
* Overridden to set Font of Label inside Button inside EventBox.
|
||||||
|
*/
|
||||||
|
protected native void gtkWidgetModifyFont(String name, int style, int size);
|
||||||
native void gtkSetLabel (String label);
|
native void gtkSetLabel (String label);
|
||||||
native void gtkWidgetSetForeground (int red, int green, int blue);
|
native void gtkWidgetSetForeground (int red, int green, int blue);
|
||||||
native void gtkWidgetSetBackground (int red, int green, int blue);
|
native void gtkWidgetSetBackground (int red, int green, int blue);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* GtkCheckboxMenuItemPeer.java -- Implements CheckboxMenuItemPeer with GTK+
|
/* GtkCheckboxMenuItemPeer.java -- Implements CheckboxMenuItemPeer with GTK+
|
||||||
Copyright (C) 1999, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1999, 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ import java.awt.peer.CheckboxMenuItemPeer;
|
||||||
public class GtkCheckboxMenuItemPeer extends GtkMenuItemPeer
|
public class GtkCheckboxMenuItemPeer extends GtkMenuItemPeer
|
||||||
implements CheckboxMenuItemPeer
|
implements CheckboxMenuItemPeer
|
||||||
{
|
{
|
||||||
native void create (String label);
|
protected native void create (String label);
|
||||||
|
|
||||||
public GtkCheckboxMenuItemPeer (CheckboxMenuItem menu)
|
public GtkCheckboxMenuItemPeer (CheckboxMenuItem menu)
|
||||||
{
|
{
|
||||||
|
|
@ -56,6 +56,11 @@ public class GtkCheckboxMenuItemPeer extends GtkMenuItemPeer
|
||||||
|
|
||||||
public native void setState(boolean t);
|
public native void setState(boolean t);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called from the signal handler of the gtk widget. Posts a
|
||||||
|
* ItemEvent to indicate a state changed, then calls super to post
|
||||||
|
* an ActionEvent.
|
||||||
|
*/
|
||||||
protected void postMenuActionEvent ()
|
protected void postMenuActionEvent ()
|
||||||
{
|
{
|
||||||
CheckboxMenuItem item = (CheckboxMenuItem)awtWidget;
|
CheckboxMenuItem item = (CheckboxMenuItem)awtWidget;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* GtkCheckboxPeer.java -- Implements CheckboxPeer with GTK
|
/* GtkCheckboxPeer.java -- Implements CheckboxPeer with GTK
|
||||||
Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2002, 2003, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -42,6 +42,8 @@ import java.awt.Checkbox;
|
||||||
import java.awt.CheckboxGroup;
|
import java.awt.CheckboxGroup;
|
||||||
import java.awt.peer.CheckboxPeer;
|
import java.awt.peer.CheckboxPeer;
|
||||||
|
|
||||||
|
import java.awt.event.ItemEvent;
|
||||||
|
|
||||||
public class GtkCheckboxPeer extends GtkComponentPeer
|
public class GtkCheckboxPeer extends GtkComponentPeer
|
||||||
implements CheckboxPeer
|
implements CheckboxPeer
|
||||||
{
|
{
|
||||||
|
|
@ -49,12 +51,15 @@ public class GtkCheckboxPeer extends GtkComponentPeer
|
||||||
public GtkCheckboxGroupPeer old_group;
|
public GtkCheckboxGroupPeer old_group;
|
||||||
// The current state of the GTK checkbox.
|
// The current state of the GTK checkbox.
|
||||||
private boolean currentState;
|
private boolean currentState;
|
||||||
private boolean changing = false;
|
|
||||||
|
|
||||||
public native void create (GtkCheckboxGroupPeer group);
|
public native void create (GtkCheckboxGroupPeer group);
|
||||||
public native void nativeSetCheckboxGroup (GtkCheckboxGroupPeer group);
|
public native void nativeSetCheckboxGroup (GtkCheckboxGroupPeer group);
|
||||||
public native void connectSignals ();
|
public native void connectSignals ();
|
||||||
native void gtkWidgetModifyFont (String name, int style, int size);
|
|
||||||
|
/**
|
||||||
|
* Overridden to set Font of label inside button.
|
||||||
|
*/
|
||||||
|
protected native void gtkWidgetModifyFont(String name, int style, int size);
|
||||||
native void gtkButtonSetLabel (String label);
|
native void gtkButtonSetLabel (String label);
|
||||||
native void gtkToggleButtonSetActive (boolean is_active);
|
native void gtkToggleButtonSetActive (boolean is_active);
|
||||||
|
|
||||||
|
|
@ -71,23 +76,24 @@ public class GtkCheckboxPeer extends GtkComponentPeer
|
||||||
CheckboxGroup g = checkbox.getCheckboxGroup ();
|
CheckboxGroup g = checkbox.getCheckboxGroup ();
|
||||||
old_group = GtkCheckboxGroupPeer.getCheckboxGroupPeer (g);
|
old_group = GtkCheckboxGroupPeer.getCheckboxGroupPeer (g);
|
||||||
create (old_group);
|
create (old_group);
|
||||||
gtkToggleButtonSetActive (checkbox.getState ());
|
currentState = checkbox.getState();
|
||||||
|
gtkToggleButtonSetActive(currentState);
|
||||||
gtkButtonSetLabel (checkbox.getLabel ());
|
gtkButtonSetLabel (checkbox.getLabel ());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setState (boolean state)
|
/**
|
||||||
|
* Sets native GtkCheckButton is state is different from current
|
||||||
|
* state. Will set currentState to state to prevent posting an
|
||||||
|
* event since events should only be posted for user initiated
|
||||||
|
* clicks on the GtkCheckButton.
|
||||||
|
*/
|
||||||
|
synchronized public void setState (boolean state)
|
||||||
{
|
{
|
||||||
// prevent item_toggled_cb -> postItemEvent ->
|
|
||||||
// awtComponent.setState -> this.setState ->
|
|
||||||
// gtkToggleButtonSetActive self-deadlock on the GDK lock.
|
|
||||||
if (changing && Thread.currentThread() == GtkToolkit.mainThread)
|
|
||||||
{
|
|
||||||
changing = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentState != state)
|
if (currentState != state)
|
||||||
gtkToggleButtonSetActive (state);
|
{
|
||||||
|
currentState = state;
|
||||||
|
gtkToggleButtonSetActive(state);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLabel (String label)
|
public void setLabel (String label)
|
||||||
|
|
@ -111,22 +117,15 @@ public class GtkCheckboxPeer extends GtkComponentPeer
|
||||||
// Override the superclass postItemEvent so that the peer doesn't
|
// Override the superclass postItemEvent so that the peer doesn't
|
||||||
// need information that we have.
|
// need information that we have.
|
||||||
// called back by native side: item_toggled_cb
|
// called back by native side: item_toggled_cb
|
||||||
public void postItemEvent (Object item, int stateChange)
|
synchronized public void postItemEvent(Object item, boolean state)
|
||||||
{
|
{
|
||||||
Checkbox currentCheckBox = ((Checkbox)awtComponent);
|
// Only fire event is state actually changed.
|
||||||
// A firing of the event is only desired if the state has changed due to a
|
if (currentState != state)
|
||||||
// button press. The currentCheckBox's state must be different from the
|
{
|
||||||
// one that the stateChange is changing to.
|
currentState = state;
|
||||||
// stateChange = 1 if it goes from false -> true
|
super.postItemEvent(awtComponent,
|
||||||
// stateChange = 2 if it goes from true -> false
|
state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
|
||||||
if (( !currentCheckBox.getState() && stateChange == 1)
|
}
|
||||||
|| (currentCheckBox.getState() && stateChange == 2))
|
|
||||||
{
|
|
||||||
super.postItemEvent (awtComponent, stateChange);
|
|
||||||
currentState = !currentCheckBox.getState();
|
|
||||||
changing = true;
|
|
||||||
currentCheckBox.setState(currentState);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dispose ()
|
public void dispose ()
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
/* GtkComponentPeer.java -- Implements ComponentPeer with GTK
|
/* GtkComponentPeer.java -- Implements ComponentPeer with GTK
|
||||||
Copyright (C) 1998, 1999, 2002, 2004, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2002, 2004, 2005, 2006
|
||||||
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -46,10 +47,10 @@ import java.awt.Component;
|
||||||
import java.awt.Container;
|
import java.awt.Container;
|
||||||
import java.awt.Cursor;
|
import java.awt.Cursor;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
|
import java.awt.EventQueue;
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
import java.awt.FontMetrics;
|
import java.awt.FontMetrics;
|
||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
import java.awt.Graphics2D;
|
|
||||||
import java.awt.GraphicsConfiguration;
|
import java.awt.GraphicsConfiguration;
|
||||||
import java.awt.Image;
|
import java.awt.Image;
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
|
|
@ -87,8 +88,6 @@ public class GtkComponentPeer extends GtkGenericPeer
|
||||||
|
|
||||||
boolean isInRepaint;
|
boolean isInRepaint;
|
||||||
|
|
||||||
static final Timer repaintTimer = new Timer (true);
|
|
||||||
|
|
||||||
/* this isEnabled differs from Component.isEnabled, in that it
|
/* this isEnabled differs from Component.isEnabled, in that it
|
||||||
knows if a parent is disabled. In that case Component.isEnabled
|
knows if a parent is disabled. In that case Component.isEnabled
|
||||||
may return true, but our isEnabled will always return false */
|
may return true, but our isEnabled will always return false */
|
||||||
|
|
@ -146,12 +145,7 @@ public class GtkComponentPeer extends GtkGenericPeer
|
||||||
|
|
||||||
Component parent = awtComponent.getParent ();
|
Component parent = awtComponent.getParent ();
|
||||||
|
|
||||||
// Only set our parent on the GTK side if our parent on the AWT
|
setParentAndBounds ();
|
||||||
// side is not showing. Otherwise the gtk peer will be shown
|
|
||||||
// before we've had a chance to position and size it properly.
|
|
||||||
if (awtComponent instanceof Window
|
|
||||||
|| (parent != null && ! parent.isShowing ()))
|
|
||||||
setParentAndBounds ();
|
|
||||||
|
|
||||||
setNativeEventMask ();
|
setNativeEventMask ();
|
||||||
|
|
||||||
|
|
@ -202,11 +196,6 @@ public class GtkComponentPeer extends GtkGenericPeer
|
||||||
void setComponentBounds ()
|
void setComponentBounds ()
|
||||||
{
|
{
|
||||||
Rectangle bounds = awtComponent.getBounds ();
|
Rectangle bounds = awtComponent.getBounds ();
|
||||||
|
|
||||||
if (bounds.x == 0 && bounds.y == 0
|
|
||||||
&& bounds.width == 0 && bounds.height == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
setBounds (bounds.x, bounds.y, bounds.width, bounds.height);
|
setBounds (bounds.x, bounds.y, bounds.width, bounds.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -303,29 +292,29 @@ public class GtkComponentPeer extends GtkGenericPeer
|
||||||
{
|
{
|
||||||
case PaintEvent.PAINT:
|
case PaintEvent.PAINT:
|
||||||
case PaintEvent.UPDATE:
|
case PaintEvent.UPDATE:
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Graphics g = getGraphics ();
|
Graphics g = getGraphics();
|
||||||
|
|
||||||
// Some peers like GtkFileDialogPeer are repainted by Gtk itself
|
|
||||||
if (g == null)
|
|
||||||
break;
|
|
||||||
|
|
||||||
g.setClip (((PaintEvent) event).getUpdateRect());
|
if (!awtComponent.isShowing() || awtComponent.getWidth() < 1
|
||||||
|
|| awtComponent.getHeight() < 1 || g == null)
|
||||||
|
break;
|
||||||
|
|
||||||
if (id == PaintEvent.PAINT)
|
g.setClip(((PaintEvent) event).getUpdateRect());
|
||||||
awtComponent.paint (g);
|
|
||||||
else
|
|
||||||
awtComponent.update (g);
|
|
||||||
|
|
||||||
g.dispose ();
|
if (id == PaintEvent.PAINT)
|
||||||
}
|
awtComponent.paint(g);
|
||||||
catch (InternalError e)
|
else
|
||||||
{
|
awtComponent.update(g);
|
||||||
System.err.println (e);
|
|
||||||
}
|
g.dispose();
|
||||||
}
|
}
|
||||||
|
catch (InternalError e)
|
||||||
|
{
|
||||||
|
System.err.println(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case KeyEvent.KEY_PRESSED:
|
case KeyEvent.KEY_PRESSED:
|
||||||
ke = (KeyEvent) event;
|
ke = (KeyEvent) event;
|
||||||
|
|
@ -383,19 +372,30 @@ public class GtkComponentPeer extends GtkGenericPeer
|
||||||
if (x == 0 && y == 0 && width == 0 && height == 0)
|
if (x == 0 && y == 0 && width == 0 && height == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
repaintTimer.schedule(new RepaintTimerTask(x, y, width, height), tm);
|
if (tm <= 0)
|
||||||
|
q().postEvent(new PaintEvent(awtComponent, PaintEvent.UPDATE,
|
||||||
|
new Rectangle(x, y, width, height)));
|
||||||
|
else
|
||||||
|
RepaintTimerTask.schedule(tm, x, y, width, height, awtComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RepaintTimerTask extends TimerTask
|
/**
|
||||||
|
* Used for scheduling delayed paint updates on the event queue.
|
||||||
|
*/
|
||||||
|
private static class RepaintTimerTask extends TimerTask
|
||||||
{
|
{
|
||||||
private int x, y, width, height;
|
private static final Timer repaintTimer = new Timer(true);
|
||||||
|
|
||||||
RepaintTimerTask(int x, int y, int width, int height)
|
private int x, y, width, height;
|
||||||
|
private Component awtComponent;
|
||||||
|
|
||||||
|
RepaintTimerTask(Component c, int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
this.width = width;
|
this.width = width;
|
||||||
this.height = height;
|
this.height = height;
|
||||||
|
this.awtComponent = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run()
|
public void run()
|
||||||
|
|
@ -403,6 +403,12 @@ public class GtkComponentPeer extends GtkGenericPeer
|
||||||
q().postEvent (new PaintEvent (awtComponent, PaintEvent.UPDATE,
|
q().postEvent (new PaintEvent (awtComponent, PaintEvent.UPDATE,
|
||||||
new Rectangle (x, y, width, height)));
|
new Rectangle (x, y, width, height)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void schedule(long tm, int x, int y, int width, int height,
|
||||||
|
Component c)
|
||||||
|
{
|
||||||
|
repaintTimer.schedule(new RepaintTimerTask(c, x, y, width, height), tm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void requestFocus ()
|
public void requestFocus ()
|
||||||
|
|
@ -429,8 +435,7 @@ public class GtkComponentPeer extends GtkGenericPeer
|
||||||
int new_y = y;
|
int new_y = y;
|
||||||
|
|
||||||
Component parent = awtComponent.getParent ();
|
Component parent = awtComponent.getParent ();
|
||||||
Component next_parent;
|
|
||||||
|
|
||||||
// Heavyweight components that are children of one or more
|
// Heavyweight components that are children of one or more
|
||||||
// lightweight containers have to be handled specially. Because
|
// lightweight containers have to be handled specially. Because
|
||||||
// calls to GLightweightPeer.setBounds do nothing, GTK has no
|
// calls to GLightweightPeer.setBounds do nothing, GTK has no
|
||||||
|
|
@ -441,33 +446,19 @@ public class GtkComponentPeer extends GtkGenericPeer
|
||||||
// so we need to continue adding offsets until we reach a
|
// so we need to continue adding offsets until we reach a
|
||||||
// container whose position GTK knows -- that is, the first
|
// container whose position GTK knows -- that is, the first
|
||||||
// non-lightweight.
|
// non-lightweight.
|
||||||
boolean lightweightChild = false;
|
Insets i;
|
||||||
Insets i;
|
while (parent.isLightweight())
|
||||||
while (parent.isLightweight ())
|
|
||||||
{
|
{
|
||||||
lightweightChild = true;
|
i = ((Container) parent).getInsets();
|
||||||
|
|
||||||
next_parent = parent.getParent ();
|
new_x += parent.getX() + i.left;
|
||||||
|
new_y += parent.getY() + i.top;
|
||||||
i = ((Container) parent).getInsets ();
|
|
||||||
|
parent = parent.getParent();
|
||||||
if (next_parent instanceof Window)
|
|
||||||
{
|
|
||||||
new_x += i.left;
|
|
||||||
new_y += i.top;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
new_x += parent.getX () + i.left;
|
|
||||||
new_y += parent.getY () + i.top;
|
|
||||||
}
|
|
||||||
|
|
||||||
parent = next_parent;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// We only need to convert from Java to GTK coordinates if we're
|
// We only need to convert from Java to GTK coordinates if we're
|
||||||
// placing a heavyweight component in a Window.
|
// placing a heavyweight component in a Window.
|
||||||
if (parent instanceof Window && !lightweightChild)
|
if (parent instanceof Window)
|
||||||
{
|
{
|
||||||
GtkWindowPeer peer = (GtkWindowPeer) parent.getPeer ();
|
GtkWindowPeer peer = (GtkWindowPeer) parent.getPeer ();
|
||||||
// important: we want the window peer's insets here, not the
|
// important: we want the window peer's insets here, not the
|
||||||
|
|
@ -479,12 +470,17 @@ public class GtkComponentPeer extends GtkGenericPeer
|
||||||
int menuBarHeight = 0;
|
int menuBarHeight = 0;
|
||||||
if (peer instanceof GtkFramePeer)
|
if (peer instanceof GtkFramePeer)
|
||||||
menuBarHeight = ((GtkFramePeer) peer).getMenuBarHeight ();
|
menuBarHeight = ((GtkFramePeer) peer).getMenuBarHeight ();
|
||||||
|
|
||||||
new_x = x - insets.left;
|
new_x -= insets.left;
|
||||||
new_y = y - insets.top + menuBarHeight;
|
new_y -= insets.top;
|
||||||
|
new_y += menuBarHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
setNativeBounds (new_x, new_y, width, height);
|
setNativeBounds (new_x, new_y, width, height);
|
||||||
|
|
||||||
|
// If the height or width were (or are now) smaller than zero
|
||||||
|
// then we want to adjust the visibility.
|
||||||
|
setVisible(awtComponent.isVisible());
|
||||||
}
|
}
|
||||||
|
|
||||||
void setCursor ()
|
void setCursor ()
|
||||||
|
|
@ -535,6 +531,13 @@ public class GtkComponentPeer extends GtkGenericPeer
|
||||||
|
|
||||||
public void setVisible (boolean b)
|
public void setVisible (boolean b)
|
||||||
{
|
{
|
||||||
|
// Only really set visible when component is bigger than zero pixels.
|
||||||
|
if (b)
|
||||||
|
{
|
||||||
|
Rectangle bounds = awtComponent.getBounds();
|
||||||
|
b = (bounds.width > 0) && (bounds.height > 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (Thread.currentThread() == GtkToolkit.mainThread)
|
if (Thread.currentThread() == GtkToolkit.mainThread)
|
||||||
setVisibleNativeUnlocked (b);
|
setVisibleNativeUnlocked (b);
|
||||||
else
|
else
|
||||||
|
|
@ -571,6 +574,8 @@ public class GtkComponentPeer extends GtkGenericPeer
|
||||||
KeyEvent keyEvent = new KeyEvent (awtComponent, id, when, mods,
|
KeyEvent keyEvent = new KeyEvent (awtComponent, id, when, mods,
|
||||||
keyCode, keyChar, keyLocation);
|
keyCode, keyChar, keyLocation);
|
||||||
|
|
||||||
|
EventQueue q = q();
|
||||||
|
|
||||||
// Also post a KEY_TYPED event if keyEvent is a key press that
|
// Also post a KEY_TYPED event if keyEvent is a key press that
|
||||||
// doesn't represent an action or modifier key.
|
// doesn't represent an action or modifier key.
|
||||||
if (keyEvent.getID () == KeyEvent.KEY_PRESSED
|
if (keyEvent.getID () == KeyEvent.KEY_PRESSED
|
||||||
|
|
@ -579,15 +584,17 @@ public class GtkComponentPeer extends GtkGenericPeer
|
||||||
&& keyCode != KeyEvent.VK_CONTROL
|
&& keyCode != KeyEvent.VK_CONTROL
|
||||||
&& keyCode != KeyEvent.VK_ALT))
|
&& keyCode != KeyEvent.VK_ALT))
|
||||||
{
|
{
|
||||||
synchronized (q)
|
synchronized(q)
|
||||||
{
|
{
|
||||||
q().postEvent (keyEvent);
|
q.postEvent(keyEvent);
|
||||||
q().postEvent (new KeyEvent (awtComponent, KeyEvent.KEY_TYPED, when, mods,
|
keyEvent = new KeyEvent(awtComponent, KeyEvent.KEY_TYPED, when,
|
||||||
KeyEvent.VK_UNDEFINED, keyChar, keyLocation));
|
mods, KeyEvent.VK_UNDEFINED, keyChar,
|
||||||
|
keyLocation);
|
||||||
|
q.postEvent(keyEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
q().postEvent (keyEvent);
|
q.postEvent(keyEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void postFocusEvent (int id, boolean temporary)
|
protected void postFocusEvent (int id, boolean temporary)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* GtkContainerPeer.java -- Implements ContainerPeer with GTK
|
/* GtkContainerPeer.java -- Implements ContainerPeer with GTK
|
||||||
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -65,29 +65,6 @@ public class GtkContainerPeer extends GtkComponentPeer
|
||||||
|
|
||||||
public void endValidate ()
|
public void endValidate ()
|
||||||
{
|
{
|
||||||
Component parent = awtComponent.getParent ();
|
|
||||||
|
|
||||||
// Only set our parent on the GTK side if our parent on the AWT
|
|
||||||
// side is not showing. Otherwise the gtk peer will be shown
|
|
||||||
// before we've had a chance to position and size it properly.
|
|
||||||
if (parent != null && parent.isShowing ())
|
|
||||||
{
|
|
||||||
Component[] components = ((Container) awtComponent).getComponents ();
|
|
||||||
int ncomponents = components.length;
|
|
||||||
|
|
||||||
for (int i = 0; i < ncomponents; i++)
|
|
||||||
{
|
|
||||||
ComponentPeer peer = components[i].getPeer ();
|
|
||||||
|
|
||||||
// Skip lightweight peers.
|
|
||||||
if (peer instanceof GtkComponentPeer)
|
|
||||||
((GtkComponentPeer) peer).setParentAndBounds ();
|
|
||||||
}
|
|
||||||
|
|
||||||
// GTK windows don't have parents.
|
|
||||||
if (!(awtComponent instanceof Window))
|
|
||||||
setParentAndBounds ();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Insets getInsets()
|
public Insets getInsets()
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,6 @@ package gnu.java.awt.peer.gtk;
|
||||||
import java.awt.Dialog;
|
import java.awt.Dialog;
|
||||||
import java.awt.FileDialog;
|
import java.awt.FileDialog;
|
||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
import java.awt.Window;
|
|
||||||
import java.awt.event.ComponentEvent;
|
|
||||||
import java.awt.peer.FileDialogPeer;
|
import java.awt.peer.FileDialogPeer;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FilenameFilter;
|
import java.io.FilenameFilter;
|
||||||
|
|
@ -68,7 +66,8 @@ public class GtkFileDialogPeer extends GtkDialogPeer implements FileDialogPeer
|
||||||
((FileDialog) awtComponent).getMode());
|
((FileDialog) awtComponent).getMode());
|
||||||
|
|
||||||
FileDialog fd = (FileDialog) awtComponent;
|
FileDialog fd = (FileDialog) awtComponent;
|
||||||
|
|
||||||
|
nativeSetDirectory(System.getProperty("user.dir"));
|
||||||
setDirectory(fd.getDirectory());
|
setDirectory(fd.getDirectory());
|
||||||
setFile(fd.getFile());
|
setFile(fd.getFile());
|
||||||
|
|
||||||
|
|
@ -117,13 +116,9 @@ public class GtkFileDialogPeer extends GtkDialogPeer implements FileDialogPeer
|
||||||
// is not absolute, let's construct it based on current directory.
|
// is not absolute, let's construct it based on current directory.
|
||||||
currentFile = fileName;
|
currentFile = fileName;
|
||||||
if (fileName.indexOf(FS) == 0)
|
if (fileName.indexOf(FS) == 0)
|
||||||
{
|
nativeSetFile(fileName);
|
||||||
nativeSetFile (fileName);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
nativeSetFile(nativeGetDirectory() + FS + fileName);
|
||||||
nativeSetFile (nativeGetDirectory() + FS + fileName);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDirectory (String directory)
|
public void setDirectory (String directory)
|
||||||
|
|
@ -132,18 +127,24 @@ public class GtkFileDialogPeer extends GtkDialogPeer implements FileDialogPeer
|
||||||
the only way we have to set the directory in FileDialog is by
|
the only way we have to set the directory in FileDialog is by
|
||||||
calling its setDirectory which will call us back. */
|
calling its setDirectory which will call us back. */
|
||||||
if ((directory == null && currentDirectory == null)
|
if ((directory == null && currentDirectory == null)
|
||||||
|| (directory != null && directory.equals (currentDirectory)))
|
|| (directory != null && directory.equals(currentDirectory)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (directory == null || directory.equals (""))
|
if (directory == null || directory.equals(""))
|
||||||
{
|
{
|
||||||
currentDirectory = FS;
|
currentDirectory = FS;
|
||||||
nativeSetFile (FS);
|
nativeSetDirectory(FS);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GtkFileChooser requires absolute directory names. If the given directory
|
||||||
|
// name is not absolute, construct it based on current directory if it is not
|
||||||
|
// null. Otherwise, use FS.
|
||||||
currentDirectory = directory;
|
currentDirectory = directory;
|
||||||
nativeSetDirectory (directory);
|
if (directory.indexOf(FS) == 0)
|
||||||
|
nativeSetDirectory(directory);
|
||||||
|
else
|
||||||
|
nativeSetDirectory(nativeGetDirectory() + FS + directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFilenameFilter (FilenameFilter filter)
|
public void setFilenameFilter (FilenameFilter filter)
|
||||||
|
|
|
||||||
|
|
@ -43,10 +43,7 @@ import java.awt.Graphics;
|
||||||
import java.awt.Image;
|
import java.awt.Image;
|
||||||
import java.awt.MenuBar;
|
import java.awt.MenuBar;
|
||||||
import java.awt.Rectangle;
|
import java.awt.Rectangle;
|
||||||
import java.awt.Window;
|
|
||||||
import java.awt.event.ComponentEvent;
|
|
||||||
import java.awt.event.PaintEvent;
|
import java.awt.event.PaintEvent;
|
||||||
import java.awt.image.ColorModel;
|
|
||||||
import java.awt.peer.FramePeer;
|
import java.awt.peer.FramePeer;
|
||||||
import java.awt.peer.MenuBarPeer;
|
import java.awt.peer.MenuBarPeer;
|
||||||
|
|
||||||
|
|
@ -77,7 +74,10 @@ public class GtkFramePeer extends GtkWindowPeer
|
||||||
removeMenuBarPeer ();
|
removeMenuBarPeer ();
|
||||||
insets.top -= menuBarHeight;
|
insets.top -= menuBarHeight;
|
||||||
menuBarHeight = 0;
|
menuBarHeight = 0;
|
||||||
awtComponent.validate ();
|
// if component has already been validated, we need to revalidate.
|
||||||
|
// otherwise, it will be validated when it is shown.
|
||||||
|
if (awtComponent.isValid())
|
||||||
|
awtComponent.validate ();
|
||||||
gtkFixedSetVisible (true);
|
gtkFixedSetVisible (true);
|
||||||
}
|
}
|
||||||
else if (bar != null && menuBar == null)
|
else if (bar != null && menuBar == null)
|
||||||
|
|
@ -92,7 +92,10 @@ public class GtkFramePeer extends GtkWindowPeer
|
||||||
setMenuBarWidth (menuBar, menuBarWidth);
|
setMenuBarWidth (menuBar, menuBarWidth);
|
||||||
menuBarHeight = getMenuBarHeight ();
|
menuBarHeight = getMenuBarHeight ();
|
||||||
insets.top += menuBarHeight;
|
insets.top += menuBarHeight;
|
||||||
awtComponent.validate ();
|
// if component has already been validated, we need to revalidate.
|
||||||
|
// otherwise, it will be validated when it is shown.
|
||||||
|
if (awtComponent.isValid())
|
||||||
|
awtComponent.validate ();
|
||||||
gtkFixedSetVisible (true);
|
gtkFixedSetVisible (true);
|
||||||
}
|
}
|
||||||
else if (bar != null && menuBar != null)
|
else if (bar != null && menuBar != null)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* GtkGenericPeer.java - Has a hashcode. Yuck.
|
/* GtkGenericPeer.java - Has a hashcode. Yuck.
|
||||||
Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2002, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -39,23 +39,28 @@ exception statement from your version. */
|
||||||
package gnu.java.awt.peer.gtk;
|
package gnu.java.awt.peer.gtk;
|
||||||
|
|
||||||
import java.awt.EventQueue;
|
import java.awt.EventQueue;
|
||||||
|
import java.awt.Font;
|
||||||
import java.awt.Toolkit;
|
import java.awt.Toolkit;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
|
|
||||||
public class GtkGenericPeer
|
public class GtkGenericPeer
|
||||||
{
|
{
|
||||||
|
// Used by Native State Association (NSA) functions to map
|
||||||
|
// gtk_widget to peer object.
|
||||||
final int native_state = getUniqueInteger ();
|
final int native_state = getUniqueInteger ();
|
||||||
|
|
||||||
// Next native state value we will assign.
|
// Next native state value we will assign.
|
||||||
private static int next_native_state = 0;
|
private static int next_native_state = 0;
|
||||||
|
|
||||||
// The widget or other java-side object we wrap.
|
// The widget or other java-side object we wrap.
|
||||||
protected Object awtWidget;
|
protected final Object awtWidget;
|
||||||
|
|
||||||
// Global event queue.
|
/**
|
||||||
protected static EventQueue q = null;
|
* Dispose of our native state. Calls gtk_widget_destroy on the
|
||||||
|
* native widget and removes the awtWidget from the native state
|
||||||
// Dispose of our native state.
|
* tables. Should be overridden by subclasses if this is not (all)
|
||||||
|
* that needs to be done.
|
||||||
|
*/
|
||||||
public native void dispose ();
|
public native void dispose ();
|
||||||
|
|
||||||
static EventQueue q ()
|
static EventQueue q ()
|
||||||
|
|
@ -68,12 +73,6 @@ public class GtkGenericPeer
|
||||||
this.awtWidget = awtWidget;
|
this.awtWidget = awtWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void enableQueue (EventQueue sq)
|
|
||||||
{
|
|
||||||
if (q == null)
|
|
||||||
q = sq;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void postActionEvent (String command, int mods)
|
protected void postActionEvent (String command, int mods)
|
||||||
{
|
{
|
||||||
q().postEvent (new ActionEvent (awtWidget, ActionEvent.ACTION_PERFORMED,
|
q().postEvent (new ActionEvent (awtWidget, ActionEvent.ACTION_PERFORMED,
|
||||||
|
|
@ -88,8 +87,20 @@ public class GtkGenericPeer
|
||||||
// Let's assume this will never wrap.
|
// Let's assume this will never wrap.
|
||||||
return next_native_state++;
|
return next_native_state++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method to set Font for Gtk Widget.
|
||||||
|
*/
|
||||||
|
protected void gtkWidgetModifyFont(Font f)
|
||||||
|
{
|
||||||
|
gtkWidgetModifyFont(f.getName(), f.getStyle(), f.getSize());
|
||||||
|
}
|
||||||
|
|
||||||
native void gtkWidgetModifyFont (String name, int style, int size);
|
/**
|
||||||
|
* Sets font for this Gtk Widget. Should be overridden by peers which
|
||||||
|
* are composed of different widgets or are contained in bins.
|
||||||
|
*/
|
||||||
|
protected native void gtkWidgetModifyFont(String name, int style, int size);
|
||||||
|
|
||||||
static void printCurrentThread ()
|
static void printCurrentThread ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* GtkImage.java
|
/* GtkImage.java
|
||||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -329,6 +329,24 @@ public class GtkImage extends Image
|
||||||
props = new Hashtable();
|
props = new Hashtable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The singleton GtkImage that is returned on errors by GtkToolkit.
|
||||||
|
private static GtkImage errorImage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an empty GtkImage with the errorLoading flag set.
|
||||||
|
* Called from GtkToolKit when some error occured, but an image needs
|
||||||
|
* to be returned anyway.
|
||||||
|
*/
|
||||||
|
static synchronized GtkImage getErrorImage()
|
||||||
|
{
|
||||||
|
if (errorImage == null)
|
||||||
|
{
|
||||||
|
errorImage = new GtkImage();
|
||||||
|
errorImage.errorLoading = true;
|
||||||
|
}
|
||||||
|
return errorImage;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Native helper function for constructor that takes a pixbuf Pointer.
|
* Native helper function for constructor that takes a pixbuf Pointer.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* GtkLabelPeer.java -- Implements LabelPeer with GTK
|
/* GtkLabelPeer.java -- Implements LabelPeer with GTK
|
||||||
Copyright (C) 1998, 1999, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -48,7 +48,12 @@ public class GtkLabelPeer extends GtkComponentPeer
|
||||||
implements LabelPeer
|
implements LabelPeer
|
||||||
{
|
{
|
||||||
native void create (String text, float alignment);
|
native void create (String text, float alignment);
|
||||||
native void gtkWidgetModifyFont (String name, int style, int size);
|
|
||||||
|
/**
|
||||||
|
* Overridden to set the Font of the label inside the gtk_event_box.
|
||||||
|
*/
|
||||||
|
protected native void gtkWidgetModifyFont(String name, int style, int size);
|
||||||
|
|
||||||
native void nativeSetAlignment (float alignment);
|
native void nativeSetAlignment (float alignment);
|
||||||
|
|
||||||
public native void setText(String text);
|
public native void setText(String text);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* GtkListPeer.java -- Implements ListPeer with GTK
|
/* GtkListPeer.java -- Implements ListPeer with GTK
|
||||||
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -59,7 +59,12 @@ public class GtkListPeer extends GtkComponentPeer
|
||||||
|
|
||||||
native void create (int rows);
|
native void create (int rows);
|
||||||
native void connectSignals ();
|
native void connectSignals ();
|
||||||
native void gtkWidgetModifyFont (String name, int style, int size);
|
|
||||||
|
/**
|
||||||
|
* Overridden to set the Font of the text insode the gtk_scrolled_window.
|
||||||
|
*/
|
||||||
|
protected native void gtkWidgetModifyFont (String name, int style, int size);
|
||||||
|
|
||||||
native void gtkWidgetRequestFocus ();
|
native void gtkWidgetRequestFocus ();
|
||||||
|
|
||||||
native void getSize (int rows, int visibleRows, int dims[]);
|
native void getSize (int rows, int visibleRows, int dims[]);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* GtkMenuBarPeer.java -- Implements MenuBarPeer with GTK+
|
/* GtkMenuBarPeer.java -- Implements MenuBarPeer with GTK+
|
||||||
Copyright (C) 1999, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1999, 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -48,38 +48,69 @@ import java.awt.peer.MenuPeer;
|
||||||
public class GtkMenuBarPeer extends GtkMenuComponentPeer
|
public class GtkMenuBarPeer extends GtkMenuComponentPeer
|
||||||
implements MenuBarPeer
|
implements MenuBarPeer
|
||||||
{
|
{
|
||||||
|
/** Whether we already have an help menu set on this peer. */
|
||||||
|
private boolean hasHelpMenu;
|
||||||
|
|
||||||
native void create ();
|
/**
|
||||||
native void addMenu (MenuPeer menu);
|
* Creates the gtk+ widget for this peer and puts it in the nsa
|
||||||
|
* table. Called from the (super class) constructor.
|
||||||
|
*/
|
||||||
|
protected native void create();
|
||||||
|
|
||||||
public GtkMenuBarPeer (MenuBar target)
|
/**
|
||||||
|
* Adds a new GtkMenuPeer to the end of the GtkMenuBarPeer.
|
||||||
|
*/
|
||||||
|
private native void addMenu(GtkMenuPeer menu);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new GtkMenuBarPeer associated with the given MenuBar.
|
||||||
|
*/
|
||||||
|
public GtkMenuBarPeer(MenuBar menubar)
|
||||||
{
|
{
|
||||||
super (target);
|
super(menubar);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setFont ()
|
/**
|
||||||
{
|
* Adds a help menu to this MenuBar. Gnome styleguides say the help
|
||||||
MenuComponent mc = (MenuComponent) awtWidget;
|
* menu is just the last item in the menubar (they are NOT right
|
||||||
Font f = mc.getFont ();
|
* justified).
|
||||||
|
*/
|
||||||
if (f == null)
|
|
||||||
mc.setFont (new Font ("Dialog", Font.PLAIN, 12));
|
|
||||||
}
|
|
||||||
|
|
||||||
// FIXME: remove this method or replace it with one that does
|
|
||||||
// something useful.
|
|
||||||
/* In Gnome, help menus are no longer right flushed. */
|
|
||||||
native void nativeSetHelpMenu(MenuPeer menuPeer);
|
|
||||||
|
|
||||||
public void addHelpMenu (Menu menu)
|
public void addHelpMenu (Menu menu)
|
||||||
{
|
{
|
||||||
// nativeSetHelpMenu((MenuPeer) menu.getPeer());
|
if (hasHelpMenu)
|
||||||
|
{
|
||||||
|
// Remove the (help) menu, which is after all the other items.
|
||||||
|
delMenu(((MenuBar) awtWidget).getMenuCount());
|
||||||
|
hasHelpMenu = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (menu != null)
|
||||||
|
{
|
||||||
|
addMenu(menu);
|
||||||
|
hasHelpMenu = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes the menu at (zero-based) index from this GtkMenuBar.
|
||||||
|
*/
|
||||||
public native void delMenu(int index);
|
public native void delMenu(int index);
|
||||||
|
|
||||||
public void addMenu (Menu m)
|
/**
|
||||||
|
* Adds the GtkMenuPeer associated with the Menu to this
|
||||||
|
* GtkMenuBarPeer. Makes sure that any help menus keep the last menu
|
||||||
|
* on the bar.
|
||||||
|
*/
|
||||||
|
public void addMenu(Menu m)
|
||||||
{
|
{
|
||||||
// FIXME: implement
|
// Make sure the help menu is the last one.
|
||||||
|
if (hasHelpMenu)
|
||||||
|
{
|
||||||
|
addHelpMenu(null);
|
||||||
|
addMenu((GtkMenuPeer) m.getPeer());
|
||||||
|
addHelpMenu(((MenuBar) awtWidget).getHelpMenu());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
addMenu((GtkMenuPeer) m.getPeer());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* GtkMenuComponentPeer.java -- Implements MenuComponentPeer with GTK+
|
/* GtkMenuComponentPeer.java -- Implements MenuComponentPeer with GTK+
|
||||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
Copyright (C) 1999, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -39,31 +39,66 @@ exception statement from your version. */
|
||||||
package gnu.java.awt.peer.gtk;
|
package gnu.java.awt.peer.gtk;
|
||||||
|
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
|
import java.awt.MenuComponent;
|
||||||
|
import java.awt.MenuContainer;
|
||||||
import java.awt.peer.MenuComponentPeer;
|
import java.awt.peer.MenuComponentPeer;
|
||||||
|
|
||||||
public class GtkMenuComponentPeer extends GtkGenericPeer
|
public abstract class GtkMenuComponentPeer extends GtkGenericPeer
|
||||||
implements MenuComponentPeer
|
implements MenuComponentPeer
|
||||||
{
|
{
|
||||||
void create ()
|
/**
|
||||||
|
* Creates the associated gtk+ widget and stores it in the nsa table
|
||||||
|
* for this peer. Called by the constructor.
|
||||||
|
*/
|
||||||
|
protected abstract void create ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets font based on MenuComponent font, or containing menu(bar)
|
||||||
|
* parent font.
|
||||||
|
*/
|
||||||
|
private void setFont()
|
||||||
{
|
{
|
||||||
throw new RuntimeException ();
|
MenuComponent mc = ((MenuComponent) awtWidget);
|
||||||
|
Font f = mc.getFont();
|
||||||
|
|
||||||
|
if (f == null)
|
||||||
|
{
|
||||||
|
MenuContainer parent = mc.getParent ();
|
||||||
|
// Submenus inherit the font of their containing Menu(Bar).
|
||||||
|
if (parent instanceof MenuComponent)
|
||||||
|
f = parent.getFont ();
|
||||||
|
}
|
||||||
|
|
||||||
|
setFont(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setFont ()
|
/**
|
||||||
|
* Will call the abstract <code>create()</code> that needs to be
|
||||||
|
* overridden by subclasses, to create the MenuComponent. It will
|
||||||
|
* then correctly setup the font for the component based on the
|
||||||
|
* component and/or its containing parent component.
|
||||||
|
*/
|
||||||
|
public GtkMenuComponentPeer(MenuComponent component)
|
||||||
{
|
{
|
||||||
|
super(component);
|
||||||
|
create();
|
||||||
|
setFont();
|
||||||
}
|
}
|
||||||
|
|
||||||
public GtkMenuComponentPeer (Object awtWidget)
|
/**
|
||||||
{
|
* Removes the awtWidget components from the native state tables.
|
||||||
super (awtWidget);
|
* Subclasses should call <code>super.dispose()</code> if they don't
|
||||||
create ();
|
* remove these themselves.
|
||||||
setFont ();
|
*/
|
||||||
}
|
|
||||||
|
|
||||||
public native void dispose();
|
public native void dispose();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the font for this particular MenuComponent only (not any
|
||||||
|
* containing items, if any).
|
||||||
|
*/
|
||||||
public void setFont(Font font)
|
public void setFont(Font font)
|
||||||
{
|
{
|
||||||
// FIXME: implement
|
if (font != null)
|
||||||
|
gtkWidgetModifyFont(font);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* GtkMenuItemPeer.java -- Implements MenuItemPeer with GTK+
|
/* GtkMenuItemPeer.java -- Implements MenuItemPeer with GTK+
|
||||||
Copyright (C) 1999, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1999, 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -49,70 +49,71 @@ import java.awt.peer.MenuPeer;
|
||||||
public class GtkMenuItemPeer extends GtkMenuComponentPeer
|
public class GtkMenuItemPeer extends GtkMenuComponentPeer
|
||||||
implements MenuItemPeer
|
implements MenuItemPeer
|
||||||
{
|
{
|
||||||
native void create (String label);
|
/**
|
||||||
native void connectSignals ();
|
* Creates the associated gtk+ widget and stores it in the nsa table
|
||||||
native void gtkWidgetModifyFont (String name, int style, int size);
|
* for this peer. Called by the create() method with the label name
|
||||||
|
* of the associated MenuItem. Needs to be overridden my subclasses
|
||||||
|
* that want to create a different gtk+ widget.
|
||||||
|
*/
|
||||||
|
protected native void create (String label);
|
||||||
|
|
||||||
void create ()
|
/**
|
||||||
|
* Called from constructor to enable signals from an item. If a
|
||||||
|
* subclass needs different (or no) signals connected this method
|
||||||
|
* should be overridden.
|
||||||
|
*/
|
||||||
|
protected native void connectSignals ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overridden to set font on menu item label.
|
||||||
|
*/
|
||||||
|
protected native void gtkWidgetModifyFont(String name, int style, int size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the associated gtk+ widget and stores it in the nsa table
|
||||||
|
* for this peer. Called by the (super class) constructor.
|
||||||
|
* Overridden to get the label if the assiociated MenuItem and to
|
||||||
|
* call create(String).
|
||||||
|
*/
|
||||||
|
protected void create()
|
||||||
{
|
{
|
||||||
create (((MenuItem) awtWidget).getLabel());
|
create (((MenuItem) awtWidget).getLabel());
|
||||||
}
|
}
|
||||||
|
|
||||||
public GtkMenuItemPeer (MenuItem item)
|
/**
|
||||||
|
* Creates a new GtkMenuItemPeer associated with the given MenuItem.
|
||||||
|
* It will call create(), setFont(), setEnabled() and
|
||||||
|
* connectSignals() in that order.
|
||||||
|
*/
|
||||||
|
public GtkMenuItemPeer(MenuItem item)
|
||||||
{
|
{
|
||||||
super (item);
|
super(item);
|
||||||
setEnabled (item.isEnabled ());
|
setEnabled (item.isEnabled());
|
||||||
setParent (item);
|
connectSignals();
|
||||||
|
|
||||||
if (item.getParent() instanceof Menu && ! (item instanceof Menu))
|
|
||||||
connectSignals();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setFont ()
|
/**
|
||||||
|
* Calls setEnabled(false).
|
||||||
|
*/
|
||||||
|
public void disable()
|
||||||
{
|
{
|
||||||
MenuComponent mc = ((MenuComponent) awtWidget);
|
setEnabled(false);
|
||||||
Font f = mc.getFont ();
|
|
||||||
|
|
||||||
if (f == null)
|
|
||||||
{
|
|
||||||
MenuComponent parent = (MenuComponent) mc.getParent ();
|
|
||||||
Font pf = parent.getFont ();
|
|
||||||
gtkWidgetModifyFont (pf.getName (), pf.getStyle (), pf.getSize ());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
gtkWidgetModifyFont(f.getName(), f.getStyle(), f.getSize());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setParent (MenuItem item)
|
/**
|
||||||
|
* Calls setEnabled(true).
|
||||||
|
*/
|
||||||
|
public void enable()
|
||||||
{
|
{
|
||||||
// add ourself differently, based on what type of parent we have
|
setEnabled(true);
|
||||||
// yes, the typecasting here is nasty.
|
|
||||||
Object parent = item.getParent ();
|
|
||||||
if (parent instanceof MenuBar)
|
|
||||||
{
|
|
||||||
((GtkMenuBarPeer)((MenuBar)parent).getPeer ()).addMenu ((MenuPeer) this);
|
|
||||||
}
|
|
||||||
else // parent instanceof Menu
|
|
||||||
{
|
|
||||||
((GtkMenuPeer)((Menu)parent).getPeer ()).addItem (this,
|
|
||||||
item.getShortcut ());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void disable ()
|
|
||||||
{
|
|
||||||
setEnabled (false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void enable ()
|
|
||||||
{
|
|
||||||
setEnabled (true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public native void setEnabled(boolean b);
|
public native void setEnabled(boolean b);
|
||||||
|
|
||||||
public native void setLabel(String label);
|
public native void setLabel(String label);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback setup through connectSignals().
|
||||||
|
*/
|
||||||
protected void postMenuActionEvent ()
|
protected void postMenuActionEvent ()
|
||||||
{
|
{
|
||||||
postActionEvent (((MenuItem)awtWidget).getActionCommand (), 0);
|
postActionEvent (((MenuItem)awtWidget).getActionCommand (), 0);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* GtkMenuPeer.java -- Implements MenuPeer with GTK+
|
/* GtkMenuPeer.java -- Implements MenuPeer with GTK+
|
||||||
Copyright (C) 1999, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1999, 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -49,10 +49,28 @@ import java.awt.peer.MenuPeer;
|
||||||
public class GtkMenuPeer extends GtkMenuItemPeer
|
public class GtkMenuPeer extends GtkMenuItemPeer
|
||||||
implements MenuPeer
|
implements MenuPeer
|
||||||
{
|
{
|
||||||
native void create (String label);
|
/**
|
||||||
native void addItem (MenuItemPeer item, int key, boolean shiftModifier);
|
* Creates the associated gtk+ widget and stores it in the nsa table
|
||||||
|
* for this peer. Called by the create() method with the label name
|
||||||
|
* of the associated MenuItem. Overridden to greate a Menu widget.
|
||||||
|
*/
|
||||||
|
protected native void create (String label);
|
||||||
|
|
||||||
|
private native void addItem(MenuItemPeer item, int key,
|
||||||
|
boolean shiftModifier);
|
||||||
|
|
||||||
|
/** XXX - Document this and the override in GtkPopupMenuPeer. */
|
||||||
native void setupAccelGroup (GtkGenericPeer container);
|
native void setupAccelGroup (GtkGenericPeer container);
|
||||||
native void addTearOff ();
|
|
||||||
|
private native void addTearOff ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overridden to not connect any signals.
|
||||||
|
*/
|
||||||
|
protected void connectSignals()
|
||||||
|
{
|
||||||
|
// No signals to connect.
|
||||||
|
}
|
||||||
|
|
||||||
public GtkMenuPeer (Menu menu)
|
public GtkMenuPeer (Menu menu)
|
||||||
{
|
{
|
||||||
|
|
@ -63,11 +81,11 @@ public class GtkMenuPeer extends GtkMenuItemPeer
|
||||||
|
|
||||||
MenuContainer parent = menu.getParent ();
|
MenuContainer parent = menu.getParent ();
|
||||||
if (parent instanceof Menu)
|
if (parent instanceof Menu)
|
||||||
setupAccelGroup ((GtkGenericPeer)((Menu)parent).getPeer ());
|
setupAccelGroup ((GtkMenuPeer)((Menu)parent).getPeer ());
|
||||||
else if (parent instanceof Component)
|
else if (parent instanceof Component)
|
||||||
setupAccelGroup ((GtkGenericPeer)((Component)parent).getPeer ());
|
setupAccelGroup ((GtkComponentPeer)((Component)parent).getPeer ());
|
||||||
else
|
else
|
||||||
setupAccelGroup (null);
|
setupAccelGroup (null); // XXX, should we warn about unknown parent?
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addItem (MenuItem item)
|
public void addItem (MenuItem item)
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,11 @@ exception statement from your version. */
|
||||||
package gnu.java.awt.peer.gtk;
|
package gnu.java.awt.peer.gtk;
|
||||||
|
|
||||||
import java.awt.AWTEvent;
|
import java.awt.AWTEvent;
|
||||||
|
import java.awt.Graphics;
|
||||||
import java.awt.Panel;
|
import java.awt.Panel;
|
||||||
|
import java.awt.event.ComponentEvent;
|
||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
|
import java.awt.event.PaintEvent;
|
||||||
import java.awt.peer.PanelPeer;
|
import java.awt.peer.PanelPeer;
|
||||||
|
|
||||||
public class GtkPanelPeer extends GtkContainerPeer
|
public class GtkPanelPeer extends GtkContainerPeer
|
||||||
|
|
@ -53,17 +56,39 @@ public class GtkPanelPeer extends GtkContainerPeer
|
||||||
super (p);
|
super (p);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleEvent (AWTEvent event)
|
public void handleEvent(AWTEvent event)
|
||||||
{
|
{
|
||||||
int id = event.getID();
|
int id = event.getID();
|
||||||
|
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case MouseEvent.MOUSE_PRESSED:
|
case MouseEvent.MOUSE_PRESSED:
|
||||||
awtComponent.requestFocusInWindow ();
|
awtComponent.requestFocusInWindow();
|
||||||
break;
|
break;
|
||||||
|
case PaintEvent.UPDATE:
|
||||||
|
case PaintEvent.PAINT:
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Graphics g = getGraphics();
|
||||||
|
if (! awtComponent.isShowing() || awtComponent.getWidth() < 1
|
||||||
|
|| awtComponent.getHeight() < 1 || g == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
g.setClip(((PaintEvent) event).getUpdateRect());
|
||||||
|
|
||||||
|
// Do not want to clear anything before painting.);
|
||||||
|
awtComponent.paint(g);
|
||||||
|
|
||||||
|
g.dispose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
catch (InternalError e)
|
||||||
|
{
|
||||||
|
System.err.println(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
super.handleEvent (event);
|
}
|
||||||
|
super.handleEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
native void connectSignals ();
|
native void connectSignals ();
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* GtkPopupMenuPeer.java -- Implements PopupMenuPeer with GTK+
|
/* GtkPopupMenuPeer.java -- Implements PopupMenuPeer with GTK+
|
||||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
Copyright (C) 1999, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -55,11 +55,6 @@ public class GtkPopupMenuPeer extends GtkMenuPeer
|
||||||
|
|
||||||
native void setupAccelGroup (GtkGenericPeer container);
|
native void setupAccelGroup (GtkGenericPeer container);
|
||||||
|
|
||||||
void setParent (MenuItem item)
|
|
||||||
{
|
|
||||||
// we don't need to "add" ourselves to our parent
|
|
||||||
}
|
|
||||||
|
|
||||||
native void show (int x, int y, long time);
|
native void show (int x, int y, long time);
|
||||||
public void show (Component origin, int x, int y)
|
public void show (Component origin, int x, int y)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* GtkScrollbarPeer.java -- Implements ScrollbarPeer with GTK+
|
/* GtkScrollbarPeer.java -- Implements ScrollbarPeer with GTK+
|
||||||
Copyright (C) 1998, 1999, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -39,6 +39,7 @@ exception statement from your version. */
|
||||||
package gnu.java.awt.peer.gtk;
|
package gnu.java.awt.peer.gtk;
|
||||||
|
|
||||||
import java.awt.Adjustable;
|
import java.awt.Adjustable;
|
||||||
|
import java.awt.EventQueue;
|
||||||
import java.awt.Scrollbar;
|
import java.awt.Scrollbar;
|
||||||
import java.awt.event.AdjustmentEvent;
|
import java.awt.event.AdjustmentEvent;
|
||||||
import java.awt.peer.ScrollbarPeer;
|
import java.awt.peer.ScrollbarPeer;
|
||||||
|
|
@ -69,12 +70,25 @@ public class GtkScrollbarPeer extends GtkComponentPeer
|
||||||
|
|
||||||
public native void setLineIncrement(int amount);
|
public native void setLineIncrement(int amount);
|
||||||
public native void setPageIncrement(int amount);
|
public native void setPageIncrement(int amount);
|
||||||
public native void setValues(int value, int visible, int min, int max);
|
|
||||||
|
|
||||||
|
public void setValues(int value, int visible, int min, int max)
|
||||||
|
{
|
||||||
|
Scrollbar sb = (Scrollbar) awtComponent;
|
||||||
|
if (!sb.getValueIsAdjusting())
|
||||||
|
setBarValues(value, visible, min, max);
|
||||||
|
}
|
||||||
|
|
||||||
|
private native void setBarValues(int value, int visible, int min, int max);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called from the native site when the scrollbar changed.
|
||||||
|
* Posts a "user generated" AdjustmentEvent to the queue.
|
||||||
|
*/
|
||||||
protected void postAdjustmentEvent (int type, int value)
|
protected void postAdjustmentEvent (int type, int value)
|
||||||
{
|
{
|
||||||
q().postEvent (new AdjustmentEvent ((Adjustable)awtComponent,
|
Scrollbar bar = (Scrollbar) awtComponent;
|
||||||
|
q().postEvent(new AdjustmentEvent(bar,
|
||||||
AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
|
AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
|
||||||
type, value));
|
type, value, true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,11 @@ public class GtkTextAreaPeer extends GtkComponentPeer
|
||||||
|
|
||||||
native void create (int width, int height, int scrollbarVisibility);
|
native void create (int width, int height, int scrollbarVisibility);
|
||||||
|
|
||||||
native void gtkWidgetModifyFont (String name, int style, int size);
|
/**
|
||||||
|
* Overridden to set Font for text widget inside scrolled window.
|
||||||
|
*/
|
||||||
|
protected native void gtkWidgetModifyFont(String name, int style, int size);
|
||||||
|
|
||||||
native void gtkWidgetRequestFocus ();
|
native void gtkWidgetRequestFocus ();
|
||||||
|
|
||||||
public native void connectSignals ();
|
public native void connectSignals ();
|
||||||
|
|
|
||||||
|
|
@ -112,8 +112,6 @@ public class GtkTextFieldPeer extends GtkComponentPeer
|
||||||
|
|
||||||
native int gtkEntryGetBorderWidth ();
|
native int gtkEntryGetBorderWidth ();
|
||||||
|
|
||||||
native void gtkWidgetModifyFont (String name, int style, int size);
|
|
||||||
|
|
||||||
public GtkTextFieldPeer (TextField tf)
|
public GtkTextFieldPeer (TextField tf)
|
||||||
{
|
{
|
||||||
super (tf);
|
super (tf);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
/* GtkToolkit.java -- Implements an AWT Toolkit using GTK for peers
|
/* GtkToolkit.java -- Implements an AWT Toolkit using GTK for peers
|
||||||
Copyright (C) 1998, 1999, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2002, 2003, 2004, 2005, 2006
|
||||||
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
|
@ -159,137 +160,93 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A helper class to return to clients in cases where a BufferedImage is
|
* Helper to return either a Image -- the argument -- or a
|
||||||
* desired but its construction fails.
|
* GtkImage with the errorLoading flag set if the argument is null.
|
||||||
*/
|
*/
|
||||||
private class GtkErrorImage extends Image
|
private Image imageOrError(Image b)
|
||||||
{
|
|
||||||
public GtkErrorImage()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getWidth(ImageObserver observer)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getHeight(ImageObserver observer)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ImageProducer getSource()
|
|
||||||
{
|
|
||||||
|
|
||||||
return new ImageProducer()
|
|
||||||
{
|
|
||||||
HashSet consumers = new HashSet();
|
|
||||||
public void addConsumer(ImageConsumer ic)
|
|
||||||
{
|
|
||||||
consumers.add(ic);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isConsumer(ImageConsumer ic)
|
|
||||||
{
|
|
||||||
return consumers.contains(ic);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void removeConsumer(ImageConsumer ic)
|
|
||||||
{
|
|
||||||
consumers.remove(ic);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void startProduction(ImageConsumer ic)
|
|
||||||
{
|
|
||||||
consumers.add(ic);
|
|
||||||
Iterator i = consumers.iterator();
|
|
||||||
while(i.hasNext())
|
|
||||||
{
|
|
||||||
ImageConsumer c = (ImageConsumer) i.next();
|
|
||||||
c.imageComplete(ImageConsumer.IMAGEERROR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public void requestTopDownLeftRightResend(ImageConsumer ic)
|
|
||||||
{
|
|
||||||
startProduction(ic);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public Graphics getGraphics()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Object getProperty(String name, ImageObserver observer)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
public Image getScaledInstance(int width, int height, int flags)
|
|
||||||
{
|
|
||||||
return new GtkErrorImage();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void flush()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper to return either a BufferedImage -- the argument -- or a
|
|
||||||
* GtkErrorImage if the argument is null.
|
|
||||||
*/
|
|
||||||
|
|
||||||
private Image bufferedImageOrError(BufferedImage b)
|
|
||||||
{
|
{
|
||||||
if (b == null)
|
if (b == null)
|
||||||
return new GtkErrorImage();
|
return GtkImage.getErrorImage();
|
||||||
else
|
else
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Image createImage (String filename)
|
public Image createImage (String filename)
|
||||||
{
|
{
|
||||||
if (filename.length() == 0)
|
if (filename.length() == 0)
|
||||||
return new GtkImage ();
|
return new GtkImage ();
|
||||||
|
|
||||||
if (useGraphics2D())
|
Image image;
|
||||||
return bufferedImageOrError(GdkPixbufDecoder.createBufferedImage (filename));
|
try
|
||||||
else
|
{
|
||||||
return new GtkImage (filename);
|
if (useGraphics2D())
|
||||||
|
image = GdkPixbufDecoder.createBufferedImage(filename);
|
||||||
|
else
|
||||||
|
image = new GtkImage(filename);
|
||||||
|
}
|
||||||
|
catch (IllegalArgumentException iae)
|
||||||
|
{
|
||||||
|
image = null;
|
||||||
|
}
|
||||||
|
return imageOrError(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Image createImage (URL url)
|
public Image createImage (URL url)
|
||||||
{
|
{
|
||||||
if (useGraphics2D())
|
Image image;
|
||||||
return bufferedImageOrError(GdkPixbufDecoder.createBufferedImage (url));
|
try
|
||||||
else
|
{
|
||||||
return new GtkImage (url);
|
if (useGraphics2D())
|
||||||
|
image = GdkPixbufDecoder.createBufferedImage(url);
|
||||||
|
else
|
||||||
|
image = new GtkImage(url);
|
||||||
|
}
|
||||||
|
catch (IllegalArgumentException iae)
|
||||||
|
{
|
||||||
|
image = null;
|
||||||
|
}
|
||||||
|
return imageOrError(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Image createImage (ImageProducer producer)
|
public Image createImage (ImageProducer producer)
|
||||||
{
|
{
|
||||||
if (useGraphics2D())
|
Image image;
|
||||||
return bufferedImageOrError(GdkPixbufDecoder.createBufferedImage (producer));
|
try
|
||||||
else
|
{
|
||||||
return new GtkImage (producer);
|
if (useGraphics2D())
|
||||||
|
image = GdkPixbufDecoder.createBufferedImage(producer);
|
||||||
|
else
|
||||||
|
image = new GtkImage(producer);
|
||||||
|
}
|
||||||
|
catch (IllegalArgumentException iae)
|
||||||
|
{
|
||||||
|
image = null;
|
||||||
|
}
|
||||||
|
return imageOrError(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Image createImage (byte[] imagedata, int imageoffset,
|
public Image createImage (byte[] imagedata, int imageoffset,
|
||||||
int imagelength)
|
int imagelength)
|
||||||
{
|
{
|
||||||
if (useGraphics2D())
|
Image image;
|
||||||
return bufferedImageOrError(GdkPixbufDecoder.createBufferedImage (imagedata,
|
try
|
||||||
imageoffset,
|
|
||||||
imagelength));
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
byte[] datacopy = new byte[imagelength];
|
if (useGraphics2D())
|
||||||
System.arraycopy (imagedata, imageoffset, datacopy, 0, imagelength);
|
image = GdkPixbufDecoder.createBufferedImage(imagedata,
|
||||||
return new GtkImage (datacopy);
|
imageoffset,
|
||||||
|
imagelength);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
byte[] datacopy = new byte[imagelength];
|
||||||
|
System.arraycopy(imagedata, imageoffset, datacopy, 0, imagelength);
|
||||||
|
return new GtkImage(datacopy);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
catch (IllegalArgumentException iae)
|
||||||
|
{
|
||||||
|
image = null;
|
||||||
|
}
|
||||||
|
return imageOrError(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -608,7 +565,6 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
|
||||||
if (q == null)
|
if (q == null)
|
||||||
{
|
{
|
||||||
q = new EventQueue();
|
q = new EventQueue();
|
||||||
GtkGenericPeer.enableQueue (q);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return q;
|
return q;
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,12 @@ exception statement from your version. */
|
||||||
|
|
||||||
package gnu.java.awt.peer.gtk;
|
package gnu.java.awt.peer.gtk;
|
||||||
|
|
||||||
|
import java.awt.AWTEvent;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Frame;
|
import java.awt.Frame;
|
||||||
|
import java.awt.Graphics;
|
||||||
import java.awt.Window;
|
import java.awt.Window;
|
||||||
|
import java.awt.event.PaintEvent;
|
||||||
import java.awt.event.WindowEvent;
|
import java.awt.event.WindowEvent;
|
||||||
import java.awt.peer.WindowPeer;
|
import java.awt.peer.WindowPeer;
|
||||||
|
|
||||||
|
|
@ -123,7 +126,23 @@ public class GtkWindowPeer extends GtkContainerPeer
|
||||||
|
|
||||||
native void nativeSetBounds (int x, int y, int width, int height);
|
native void nativeSetBounds (int x, int y, int width, int height);
|
||||||
native void nativeSetBoundsUnlocked (int x, int y, int width, int height);
|
native void nativeSetBoundsUnlocked (int x, int y, int width, int height);
|
||||||
|
native void nativeSetLocation (int x, int y);
|
||||||
|
native void nativeSetLocationUnlocked (int x, int y);
|
||||||
|
|
||||||
|
public void setLocation (int x, int y)
|
||||||
|
{
|
||||||
|
// prevent window_configure_cb -> awtComponent.setSize ->
|
||||||
|
// peer.setBounds -> nativeSetBounds self-deadlock on GDK lock.
|
||||||
|
if (Thread.currentThread() == GtkToolkit.mainThread)
|
||||||
|
return;
|
||||||
|
nativeSetLocation (x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocationUnlocked (int x, int y)
|
||||||
|
{
|
||||||
|
nativeSetLocationUnlocked (x, y);
|
||||||
|
}
|
||||||
|
|
||||||
public void setBounds (int x, int y, int width, int height)
|
public void setBounds (int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
// prevent window_configure_cb -> awtComponent.setSize ->
|
// prevent window_configure_cb -> awtComponent.setSize ->
|
||||||
|
|
@ -192,12 +211,7 @@ public class GtkWindowPeer extends GtkContainerPeer
|
||||||
|
|
||||||
public void show ()
|
public void show ()
|
||||||
{
|
{
|
||||||
// Prevent the window manager from automatically placing this
|
setLocation(awtComponent.getX(), awtComponent.getY());
|
||||||
// window when it is shown.
|
|
||||||
setBounds (awtComponent.getX(),
|
|
||||||
awtComponent.getY(),
|
|
||||||
awtComponent.getWidth(),
|
|
||||||
awtComponent.getHeight());
|
|
||||||
setVisible (true);
|
setVisible (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -235,4 +249,32 @@ public class GtkWindowPeer extends GtkContainerPeer
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void handleEvent(AWTEvent event)
|
||||||
|
{
|
||||||
|
int id = event.getID();
|
||||||
|
if (id == PaintEvent.UPDATE || id == PaintEvent.PAINT)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Graphics g = getGraphics();
|
||||||
|
if (! awtComponent.isShowing() || awtComponent.getWidth() < 1
|
||||||
|
|| awtComponent.getHeight() < 1 || g == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
g.setClip(((PaintEvent) event).getUpdateRect());
|
||||||
|
|
||||||
|
// Do not want to clear anything before painting.
|
||||||
|
awtComponent.paint(g);
|
||||||
|
|
||||||
|
g.dispose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
catch (InternalError e)
|
||||||
|
{
|
||||||
|
System.err.println(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.handleEvent(event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,224 @@
|
||||||
|
/* SwingButtonPeer.java -- A Swing based peer for AWT buttons
|
||||||
|
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
GNU Classpath is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GNU Classpath 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
02110-1301 USA.
|
||||||
|
|
||||||
|
Linking this library statically or dynamically with other modules is
|
||||||
|
making a combined work based on this library. Thus, the terms and
|
||||||
|
conditions of the GNU General Public License cover the whole
|
||||||
|
combination.
|
||||||
|
|
||||||
|
As a special exception, the copyright holders of this library give you
|
||||||
|
permission to link this library with independent modules to produce an
|
||||||
|
executable, regardless of the license terms of these independent
|
||||||
|
modules, and to copy and distribute the resulting executable under
|
||||||
|
terms of your choice, provided that you also meet, for each linked
|
||||||
|
independent module, the terms and conditions of the license of that
|
||||||
|
module. An independent module is a module which is not derived from
|
||||||
|
or based on this library. If you modify this library, you may extend
|
||||||
|
this exception to your version of the library, but you are not
|
||||||
|
obligated to do so. If you do not wish to do so, delete this
|
||||||
|
exception statement from your version. */
|
||||||
|
|
||||||
|
package gnu.java.awt.peer.swing;
|
||||||
|
|
||||||
|
import java.awt.Button;
|
||||||
|
import java.awt.Graphics;
|
||||||
|
import java.awt.Image;
|
||||||
|
import java.awt.Point;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.awt.event.KeyEvent;
|
||||||
|
import java.awt.event.MouseEvent;
|
||||||
|
import java.awt.peer.ButtonPeer;
|
||||||
|
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JComponent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A Swing based peer for the AWT button.
|
||||||
|
*
|
||||||
|
* @author Roman Kennke (kennke@aicas.com)
|
||||||
|
*/
|
||||||
|
public class SwingButtonPeer
|
||||||
|
extends SwingComponentPeer
|
||||||
|
implements ButtonPeer
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A specialized Swing button to be used as AWT button.
|
||||||
|
*
|
||||||
|
* @author Roman Kennke (kennke@aicas.com)
|
||||||
|
*/
|
||||||
|
class SwingButton
|
||||||
|
extends JButton
|
||||||
|
implements SwingComponent
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Overridden so that this method returns the correct value even without a
|
||||||
|
* peer.
|
||||||
|
*
|
||||||
|
* @return the screen location of the button
|
||||||
|
*/
|
||||||
|
public Point getLocationOnScreen()
|
||||||
|
{
|
||||||
|
return SwingButtonPeer.this.getLocationOnScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overridden so that the isShowing method returns the correct value for the
|
||||||
|
* swing button, even if it has no peer on its own.
|
||||||
|
*
|
||||||
|
* @return <code>true</code> if the button is currently showing,
|
||||||
|
* <code>false</code> otherwise
|
||||||
|
*/
|
||||||
|
public boolean isShowing()
|
||||||
|
{
|
||||||
|
boolean retVal = false;
|
||||||
|
if (SwingButtonPeer.this.awtComponent != null)
|
||||||
|
retVal = SwingButtonPeer.this.awtComponent.isShowing();
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overridden, so that the Swing button can create an Image without its
|
||||||
|
* own peer.
|
||||||
|
*
|
||||||
|
* @param w the width of the image
|
||||||
|
* @param h the height of the image
|
||||||
|
*
|
||||||
|
* @return an image
|
||||||
|
*/
|
||||||
|
public Image createImage(int w, int h)
|
||||||
|
{
|
||||||
|
return SwingButtonPeer.this.createImage(w, h);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overridden, so that the Swing button can create a Graphics without its
|
||||||
|
* own peer.
|
||||||
|
*
|
||||||
|
* @return a graphics instance for the button
|
||||||
|
*/
|
||||||
|
public Graphics getGraphics()
|
||||||
|
{
|
||||||
|
return SwingButtonPeer.this.getGraphics();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns this button.
|
||||||
|
*
|
||||||
|
* @return this button
|
||||||
|
*/
|
||||||
|
public JComponent getJComponent()
|
||||||
|
{
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles mouse events by forwarding it to
|
||||||
|
* <code>processMouseEvent()</code> after having retargetted it to this
|
||||||
|
* button.
|
||||||
|
*
|
||||||
|
* @param ev the mouse event
|
||||||
|
*/
|
||||||
|
public void handleMouseEvent(MouseEvent ev)
|
||||||
|
{
|
||||||
|
ev.setSource(this);
|
||||||
|
processMouseEvent(ev);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles mouse motion events by forwarding it to
|
||||||
|
* <code>processMouseMotionEvent()</code> after having retargetted it to
|
||||||
|
* this button.
|
||||||
|
*
|
||||||
|
* @param ev the mouse motion event
|
||||||
|
*/
|
||||||
|
public void handleMouseMotionEvent(MouseEvent ev)
|
||||||
|
{
|
||||||
|
ev.setSource(this);
|
||||||
|
processMouseMotionEvent(ev);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles key events by forwarding it to
|
||||||
|
* <code>processKeyEvent()</code> after having retargetted it to this
|
||||||
|
* button.
|
||||||
|
*
|
||||||
|
* @param ev the mouse event
|
||||||
|
*/
|
||||||
|
public void handleKeyEvent(KeyEvent ev)
|
||||||
|
{
|
||||||
|
ev.setSource(this);
|
||||||
|
processKeyEvent(ev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Listens for ActionEvents on the Swing button and triggers corresponding
|
||||||
|
* ActionEvents on the AWT button.
|
||||||
|
*
|
||||||
|
* @author Roman Kennke (kennke@aicas.com)
|
||||||
|
*/
|
||||||
|
class SwingButtonListener implements ActionListener
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Receives notification when an action was performend on the button.
|
||||||
|
*
|
||||||
|
* @param event the action event
|
||||||
|
*/
|
||||||
|
public void actionPerformed(ActionEvent event)
|
||||||
|
{
|
||||||
|
Button b = (Button) SwingButtonPeer.this.awtComponent;
|
||||||
|
ActionListener[] l = b.getActionListeners();
|
||||||
|
if (l.length == 0)
|
||||||
|
return;
|
||||||
|
ActionEvent ev = new ActionEvent(b, ActionEvent.ACTION_PERFORMED,
|
||||||
|
b.getActionCommand());
|
||||||
|
for (int i = 0; i < l.length; ++i)
|
||||||
|
l[i].actionPerformed(ev);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a new SwingButtonPeer.
|
||||||
|
*
|
||||||
|
* @param theButton the AWT button for this peer
|
||||||
|
*/
|
||||||
|
public SwingButtonPeer(Button theButton)
|
||||||
|
{
|
||||||
|
SwingButton button = new SwingButton();
|
||||||
|
button.setText(theButton.getLabel());
|
||||||
|
button.addActionListener(new SwingButtonListener());
|
||||||
|
init(theButton, button);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the label of the button. This call is forwarded to the setText method
|
||||||
|
* of the managed Swing button.
|
||||||
|
*
|
||||||
|
* @param label the label to set
|
||||||
|
*/
|
||||||
|
public void setLabel(String label)
|
||||||
|
{
|
||||||
|
((SwingButton) swingComponent).setText(label);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
/* SwingCanvasPeer.java -- A canvas peer based on Swing
|
||||||
|
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
GNU Classpath is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GNU Classpath 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
02110-1301 USA.
|
||||||
|
|
||||||
|
Linking this library statically or dynamically with other modules is
|
||||||
|
making a combined work based on this library. Thus, the terms and
|
||||||
|
conditions of the GNU General Public License cover the whole
|
||||||
|
combination.
|
||||||
|
|
||||||
|
As a special exception, the copyright holders of this library give you
|
||||||
|
permission to link this library with independent modules to produce an
|
||||||
|
executable, regardless of the license terms of these independent
|
||||||
|
modules, and to copy and distribute the resulting executable under
|
||||||
|
terms of your choice, provided that you also meet, for each linked
|
||||||
|
independent module, the terms and conditions of the license of that
|
||||||
|
module. An independent module is a module which is not derived from
|
||||||
|
or based on this library. If you modify this library, you may extend
|
||||||
|
this exception to your version of the library, but you are not
|
||||||
|
obligated to do so. If you do not wish to do so, delete this
|
||||||
|
exception statement from your version. */
|
||||||
|
|
||||||
|
|
||||||
|
package gnu.java.awt.peer.swing;
|
||||||
|
|
||||||
|
import java.awt.Canvas;
|
||||||
|
import java.awt.peer.CanvasPeer;
|
||||||
|
import java.awt.peer.LightweightPeer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A CanvasPeer to be used together with the Swing peers.
|
||||||
|
*
|
||||||
|
* @author Roman Kennke (kennke@aicas.com)
|
||||||
|
*/
|
||||||
|
public class SwingCanvasPeer
|
||||||
|
extends SwingComponentPeer
|
||||||
|
implements LightweightPeer, CanvasPeer
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new <code>SwingCanvasPeer</code> for the specified Canvas.
|
||||||
|
*
|
||||||
|
* @param canvas the canvas.
|
||||||
|
*/
|
||||||
|
public SwingCanvasPeer(Canvas canvas)
|
||||||
|
{
|
||||||
|
init(canvas, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,89 @@
|
||||||
|
/* SwingComponent.java -- An interface that defines a Swing component for peers
|
||||||
|
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
GNU Classpath is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GNU Classpath 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
02110-1301 USA.
|
||||||
|
|
||||||
|
Linking this library statically or dynamically with other modules is
|
||||||
|
making a combined work based on this library. Thus, the terms and
|
||||||
|
conditions of the GNU General Public License cover the whole
|
||||||
|
combination.
|
||||||
|
|
||||||
|
As a special exception, the copyright holders of this library give you
|
||||||
|
permission to link this library with independent modules to produce an
|
||||||
|
executable, regardless of the license terms of these independent
|
||||||
|
modules, and to copy and distribute the resulting executable under
|
||||||
|
terms of your choice, provided that you also meet, for each linked
|
||||||
|
independent module, the terms and conditions of the license of that
|
||||||
|
module. An independent module is a module which is not derived from
|
||||||
|
or based on this library. If you modify this library, you may extend
|
||||||
|
this exception to your version of the library, but you are not
|
||||||
|
obligated to do so. If you do not wish to do so, delete this
|
||||||
|
exception statement from your version. */
|
||||||
|
|
||||||
|
package gnu.java.awt.peer.swing;
|
||||||
|
|
||||||
|
import java.awt.event.KeyEvent;
|
||||||
|
import java.awt.event.MouseEvent;
|
||||||
|
|
||||||
|
import javax.swing.JComponent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines some additional methods that the Swing components must implement
|
||||||
|
* in order to work with the Swing peers. This is usually achieved by
|
||||||
|
* subclassing a Swing component and forwarding the method calls to some
|
||||||
|
* protected JComponent method.
|
||||||
|
*
|
||||||
|
* @author Roman Kennke (kennke@aicas.com)
|
||||||
|
*/
|
||||||
|
public interface SwingComponent
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the actual swing compenent.
|
||||||
|
*
|
||||||
|
* @return the actual swing compenent
|
||||||
|
*/
|
||||||
|
JComponent getJComponent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles a mouse event. This is usually forwarded to
|
||||||
|
* {@link Component#processMouseMotionEvent(MouseEvent)} of the swing
|
||||||
|
* component.
|
||||||
|
*
|
||||||
|
* @param ev the mouse event
|
||||||
|
*/
|
||||||
|
void handleMouseEvent(MouseEvent ev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles a mouse motion event. This is usually forwarded to
|
||||||
|
* {@link Component#processMouseEvent(MouseEvent)} of the swing
|
||||||
|
* component.
|
||||||
|
*
|
||||||
|
* @param ev the mouse motion event
|
||||||
|
*/
|
||||||
|
void handleMouseMotionEvent(MouseEvent ev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles a key event. This is usually forwarded to
|
||||||
|
* {@link Component#processKeyEvent(KeyEvent)} of the swing
|
||||||
|
* component.
|
||||||
|
*
|
||||||
|
* @param ev the key event
|
||||||
|
*/
|
||||||
|
void handleKeyEvent(KeyEvent ev);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,994 @@
|
||||||
|
/* SwingComponentPeer.java -- An abstract base class for Swing based peers
|
||||||
|
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
GNU Classpath is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GNU Classpath 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
02110-1301 USA.
|
||||||
|
|
||||||
|
Linking this library statically or dynamically with other modules is
|
||||||
|
making a combined work based on this library. Thus, the terms and
|
||||||
|
conditions of the GNU General Public License cover the whole
|
||||||
|
combination.
|
||||||
|
|
||||||
|
As a special exception, the copyright holders of this library give you
|
||||||
|
permission to link this library with independent modules to produce an
|
||||||
|
executable, regardless of the license terms of these independent
|
||||||
|
modules, and to copy and distribute the resulting executable under
|
||||||
|
terms of your choice, provided that you also meet, for each linked
|
||||||
|
independent module, the terms and conditions of the license of that
|
||||||
|
module. An independent module is a module which is not derived from
|
||||||
|
or based on this library. If you modify this library, you may extend
|
||||||
|
this exception to your version of the library, but you are not
|
||||||
|
obligated to do so. If you do not wish to do so, delete this
|
||||||
|
exception statement from your version. */
|
||||||
|
|
||||||
|
package gnu.java.awt.peer.swing;
|
||||||
|
|
||||||
|
import java.awt.AWTEvent;
|
||||||
|
import java.awt.AWTException;
|
||||||
|
import java.awt.BufferCapabilities;
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.Component;
|
||||||
|
import java.awt.Cursor;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Font;
|
||||||
|
import java.awt.FontMetrics;
|
||||||
|
import java.awt.Graphics;
|
||||||
|
import java.awt.GraphicsConfiguration;
|
||||||
|
import java.awt.Image;
|
||||||
|
import java.awt.Point;
|
||||||
|
import java.awt.Rectangle;
|
||||||
|
import java.awt.Toolkit;
|
||||||
|
import java.awt.BufferCapabilities.FlipContents;
|
||||||
|
import java.awt.event.KeyEvent;
|
||||||
|
import java.awt.event.MouseEvent;
|
||||||
|
import java.awt.event.PaintEvent;
|
||||||
|
import java.awt.image.ColorModel;
|
||||||
|
import java.awt.image.ImageObserver;
|
||||||
|
import java.awt.image.ImageProducer;
|
||||||
|
import java.awt.image.VolatileImage;
|
||||||
|
import java.awt.peer.ComponentPeer;
|
||||||
|
import java.awt.peer.ContainerPeer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base class for Swing based component peers. This provides the basic
|
||||||
|
* functionality needed for Swing based component peers. Many methods are
|
||||||
|
* implemented to forward to the Swing component. Others however forward
|
||||||
|
* to the component's parent and expect the toplevel component peer to provide
|
||||||
|
* a real implementation of it. These are for example the key methods
|
||||||
|
* {@link #getGraphics()} and {@link #createImage(int, int)}, as well as
|
||||||
|
* {@link #getLocationOnScreen()}.
|
||||||
|
*
|
||||||
|
* This class also provides the necesary hooks into the Swing painting and
|
||||||
|
* event handling system. In order to achieve this, it traps paint, mouse and
|
||||||
|
* key events in {@link #handleEvent(AWTEvent)} and calls some special methods
|
||||||
|
* ({@link #peerPaint(Graphics)}, {@link #handleKeyEvent(KeyEvent)},
|
||||||
|
* {@link #handleMouseEvent(MouseEvent)} and
|
||||||
|
* {@link #handleMouseMotionEvent(MouseEvent)}) that call the corresponding
|
||||||
|
* Swing methods.
|
||||||
|
*
|
||||||
|
* @author Roman Kennke (kennke@aicas.com)
|
||||||
|
*/
|
||||||
|
public class SwingComponentPeer
|
||||||
|
implements ComponentPeer
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The AWT component for this peer.
|
||||||
|
*/
|
||||||
|
protected Component awtComponent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Swing component for this peer.
|
||||||
|
*/
|
||||||
|
protected SwingComponent swingComponent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a SwingComponentPeer instance. Subclasses are expected to call
|
||||||
|
* this constructor and thereafter call {@link #init(Component, JComponent)}
|
||||||
|
* in order to setup the AWT and Swing components properly.
|
||||||
|
*/
|
||||||
|
protected SwingComponentPeer()
|
||||||
|
{
|
||||||
|
// Nothing to do here.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes the AWT and Swing component for this peer. It is expected that
|
||||||
|
* subclasses call this from within their constructor.
|
||||||
|
*
|
||||||
|
* @param awtComp the AWT component for this peer
|
||||||
|
* @param swingComp the Swing component for this peer
|
||||||
|
*/
|
||||||
|
protected void init(Component awtComp, SwingComponent swingComp)
|
||||||
|
{
|
||||||
|
awtComponent = awtComp;
|
||||||
|
swingComponent = swingComp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the construction status of the specified image. This is called
|
||||||
|
* by {@link Component#checkImage(Image, int, int, ImageObserver)}.
|
||||||
|
*
|
||||||
|
* @param img the image
|
||||||
|
* @param width the width of the image
|
||||||
|
* @param height the height of the image
|
||||||
|
* @param ob the image observer to be notified of updates of the status
|
||||||
|
*
|
||||||
|
* @return a bitwise ORed set of ImageObserver flags
|
||||||
|
*/
|
||||||
|
public int checkImage(Image img, int width, int height, ImageObserver ob)
|
||||||
|
{
|
||||||
|
return Toolkit.getDefaultToolkit().checkImage(img, width, height, ob);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an image by starting the specified image producer. This is called
|
||||||
|
* by {@link Component#createImage(ImageProducer)}.
|
||||||
|
*
|
||||||
|
* @param prod the image producer to be used to create the image
|
||||||
|
*
|
||||||
|
* @return the created image
|
||||||
|
*/
|
||||||
|
public Image createImage(ImageProducer prod)
|
||||||
|
{
|
||||||
|
Image image = Toolkit.getDefaultToolkit().createImage(prod);
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an empty image with the specified <code>width</code> and
|
||||||
|
* <code>height</code>.
|
||||||
|
*
|
||||||
|
* This is implemented to let the parent component create the image. This
|
||||||
|
* eventually goes up to the top-level component peer, which is then expected
|
||||||
|
* to deliver the image.
|
||||||
|
*
|
||||||
|
* @param width the width of the image to be created
|
||||||
|
* @param height the height of the image to be created
|
||||||
|
*
|
||||||
|
* @return the created image
|
||||||
|
*/
|
||||||
|
public Image createImage(int width, int height)
|
||||||
|
{
|
||||||
|
Component parent = awtComponent.getParent();
|
||||||
|
ComponentPeer parentPeer = parent.getPeer();
|
||||||
|
return parentPeer.createImage(width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disables the component. This is called by {@link Component#disable()}.
|
||||||
|
*/
|
||||||
|
public void disable()
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disposes the component peer. This should release all resources held by the
|
||||||
|
* peer. This is called when the component is no longer in use.
|
||||||
|
*/
|
||||||
|
public void dispose()
|
||||||
|
{
|
||||||
|
awtComponent = null;
|
||||||
|
swingComponent = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enables the component. This is called by {@link Component#enable()}.
|
||||||
|
*/
|
||||||
|
public void enable()
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the color model of the component. This is currently not used.
|
||||||
|
*
|
||||||
|
* @return the color model of the component
|
||||||
|
*/
|
||||||
|
public ColorModel getColorModel()
|
||||||
|
{
|
||||||
|
// FIXME: When this peer method will be used, we need to provide an
|
||||||
|
// implementation of this, probably forwarding to the toplevel peer, like
|
||||||
|
// in the other methods.
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the font metrics for the specified font. This is called by
|
||||||
|
* {@link Component#getFontMetrics(Font)}.
|
||||||
|
*
|
||||||
|
* This is implemented to query the font metrics from the parent component.
|
||||||
|
* This will eventually call the top-level component peer, which is then
|
||||||
|
* expected to deliver a font metrics object.
|
||||||
|
*
|
||||||
|
* @param f the font for which to query the font metrics
|
||||||
|
*
|
||||||
|
* @return the font metrics for the specified font
|
||||||
|
*/
|
||||||
|
public FontMetrics getFontMetrics(Font f)
|
||||||
|
{
|
||||||
|
Component parent = awtComponent.getParent();
|
||||||
|
ComponentPeer parentPeer = parent.getPeer();
|
||||||
|
return parentPeer.getFontMetrics(f);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a {@link Graphics} object suitable for drawing on this component.
|
||||||
|
* This is called by {@link Component#getGraphics()}.
|
||||||
|
*
|
||||||
|
* This is implemented to query the graphics from the parent component and
|
||||||
|
* adjust the clip and translation to match this component.
|
||||||
|
* This will eventually call the top-level component peer, which is then
|
||||||
|
* expected to deliver a graphics object.
|
||||||
|
*
|
||||||
|
* @return a graphics object suitable for drawing on this component
|
||||||
|
*/
|
||||||
|
public Graphics getGraphics()
|
||||||
|
{
|
||||||
|
Component parent = awtComponent.getParent();
|
||||||
|
ComponentPeer parentPeer = parent.getPeer();
|
||||||
|
Graphics g = parentPeer.getGraphics();
|
||||||
|
g.translate(awtComponent.getX(), awtComponent.getY());
|
||||||
|
g.setClip(0, 0, awtComponent.getWidth(), awtComponent.getHeight());
|
||||||
|
return g;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the location of this component in screen coordinates. This is
|
||||||
|
* called by {@link Component#getLocationOnScreen()}.
|
||||||
|
*
|
||||||
|
* This is implemented to query the parent component peer for its screen
|
||||||
|
* location and adds the offset of this component to it. This will eventually
|
||||||
|
* call the top-level component's peer, which is then expected to provide
|
||||||
|
* it's screen location.
|
||||||
|
*
|
||||||
|
* @return the location of this component in screen coordinates
|
||||||
|
*/
|
||||||
|
public Point getLocationOnScreen()
|
||||||
|
{
|
||||||
|
Component parent = awtComponent.getParent();
|
||||||
|
ComponentPeer parentPeer = parent.getPeer();
|
||||||
|
Point location = parentPeer.getLocationOnScreen();
|
||||||
|
location.x += awtComponent.getX();
|
||||||
|
location.y += awtComponent.getY();
|
||||||
|
return location;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the minimum size for the component. This is called by
|
||||||
|
* {@link Component#getMinimumSize()}.
|
||||||
|
*
|
||||||
|
* This is implemented to return the Swing component's minimum size.
|
||||||
|
*
|
||||||
|
* @return the minimum size for the component
|
||||||
|
*/
|
||||||
|
public Dimension getMinimumSize()
|
||||||
|
{
|
||||||
|
Dimension retVal;
|
||||||
|
if (swingComponent != null)
|
||||||
|
retVal = swingComponent.getJComponent().getMinimumSize();
|
||||||
|
else
|
||||||
|
retVal = new Dimension(0, 0);
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the preferred size for the component. This is called by
|
||||||
|
* {@link Component#getPreferredSize()}.
|
||||||
|
*
|
||||||
|
* This is implemented to return the Swing component's preferred size.
|
||||||
|
*
|
||||||
|
* @return the preferred size for the component
|
||||||
|
*/
|
||||||
|
public Dimension getPreferredSize()
|
||||||
|
{
|
||||||
|
Dimension retVal;
|
||||||
|
if (swingComponent != null)
|
||||||
|
retVal = swingComponent.getJComponent().getPreferredSize();
|
||||||
|
else
|
||||||
|
retVal = new Dimension(0, 0);
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the toolkit that created this peer.
|
||||||
|
*
|
||||||
|
* @return the toolkit that created this peer
|
||||||
|
*/
|
||||||
|
public Toolkit getToolkit()
|
||||||
|
{
|
||||||
|
return Toolkit.getDefaultToolkit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles the given event. This is called from
|
||||||
|
* {@link Component#dispatchEvent(AWTEvent)} to give the peer a chance to
|
||||||
|
* react to events for the component.
|
||||||
|
*
|
||||||
|
* @param e the event
|
||||||
|
*/
|
||||||
|
public void handleEvent(AWTEvent e)
|
||||||
|
{
|
||||||
|
switch (e.getID())
|
||||||
|
{
|
||||||
|
case PaintEvent.UPDATE:
|
||||||
|
case PaintEvent.PAINT:
|
||||||
|
Graphics g = getGraphics();
|
||||||
|
Rectangle clip = ((PaintEvent)e).getUpdateRect();
|
||||||
|
g.clipRect(clip.x, clip.y, clip.width, clip.height);
|
||||||
|
//if (this instanceof LightweightPeer)
|
||||||
|
// {
|
||||||
|
if (e.getID() == PaintEvent.UPDATE)
|
||||||
|
awtComponent.update(g);
|
||||||
|
else
|
||||||
|
awtComponent.paint(g);
|
||||||
|
// }
|
||||||
|
// We paint the 'heavyweights' at last, so that they appear on top of
|
||||||
|
// everything else.
|
||||||
|
peerPaint(g);
|
||||||
|
|
||||||
|
g.dispose();
|
||||||
|
break;
|
||||||
|
case MouseEvent.MOUSE_PRESSED:
|
||||||
|
case MouseEvent.MOUSE_RELEASED:
|
||||||
|
case MouseEvent.MOUSE_CLICKED:
|
||||||
|
case MouseEvent.MOUSE_ENTERED:
|
||||||
|
case MouseEvent.MOUSE_EXITED:
|
||||||
|
handleMouseEvent((MouseEvent) e);
|
||||||
|
break;
|
||||||
|
case MouseEvent.MOUSE_MOVED:
|
||||||
|
case MouseEvent.MOUSE_DRAGGED:
|
||||||
|
handleMouseMotionEvent((MouseEvent) e);
|
||||||
|
break;
|
||||||
|
case KeyEvent.KEY_PRESSED:
|
||||||
|
case KeyEvent.KEY_RELEASED:
|
||||||
|
case KeyEvent.KEY_TYPED:
|
||||||
|
handleKeyEvent((KeyEvent) e);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// Other event types are not handled here.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Makes the component invisible. This is called from
|
||||||
|
* {@link Component#hide()}.
|
||||||
|
*
|
||||||
|
* This is implemented to call setVisible(false) on the Swing component.
|
||||||
|
*/
|
||||||
|
public void hide()
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns <code>true</code> if the component can receive keyboard input
|
||||||
|
* focus. This is called from {@link Component#isFocusTraversable()}.
|
||||||
|
*
|
||||||
|
* This is implemented to return isFocusable() from the Swing component.
|
||||||
|
*
|
||||||
|
* @specnote Part of the earlier 1.1 API, replaced by isFocusable().
|
||||||
|
*/
|
||||||
|
public boolean isFocusTraversable()
|
||||||
|
{
|
||||||
|
return swingComponent != null ?
|
||||||
|
swingComponent.getJComponent().isFocusable() : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns <code>true</code> if the component can receive keyboard input
|
||||||
|
* focus. This is called from {@link Component#isFocusable()}.
|
||||||
|
*
|
||||||
|
* This is implemented to return isFocusable() from the Swing component.
|
||||||
|
*/
|
||||||
|
public boolean isFocusable()
|
||||||
|
{
|
||||||
|
return swingComponent != null ?
|
||||||
|
swingComponent.getJComponent().isFocusable() : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the minimum size for the component. This is called by
|
||||||
|
* {@link Component#minimumSize()}.
|
||||||
|
*
|
||||||
|
* This is implemented to return the Swing component's minimum size.
|
||||||
|
*
|
||||||
|
* @return the minimum size for the component
|
||||||
|
*/
|
||||||
|
public Dimension minimumSize()
|
||||||
|
{
|
||||||
|
Dimension retVal;
|
||||||
|
if (swingComponent != null)
|
||||||
|
retVal = swingComponent.getJComponent().getMinimumSize();
|
||||||
|
else
|
||||||
|
retVal = new Dimension(0, 0);
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the preferred size for the component. This is called by
|
||||||
|
* {@link Component#getPreferredSize()}.
|
||||||
|
*
|
||||||
|
* This is implemented to return the Swing component's preferred size.
|
||||||
|
*
|
||||||
|
* @return the preferred size for the component
|
||||||
|
*/
|
||||||
|
public Dimension preferredSize()
|
||||||
|
{
|
||||||
|
Dimension retVal;
|
||||||
|
if (swingComponent != null)
|
||||||
|
retVal = swingComponent.getJComponent().getPreferredSize();
|
||||||
|
else
|
||||||
|
retVal = new Dimension(0, 0);
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepares an image for rendering on this component. This is called by
|
||||||
|
* {@link Component#prepareImage(Image, int, int, ImageObserver)}.
|
||||||
|
*
|
||||||
|
* @param img the image to prepare
|
||||||
|
* @param width the desired width of the rendered image
|
||||||
|
* @param height the desired height of the rendered image
|
||||||
|
* @param ob the image observer to be notified of updates in the preparation
|
||||||
|
* process
|
||||||
|
*
|
||||||
|
* @return <code>true</code> if the image has been fully prepared,
|
||||||
|
* <code>false</code> otherwise (in which case the image observer
|
||||||
|
* receives updates)
|
||||||
|
*/
|
||||||
|
public void paint(Graphics graphics)
|
||||||
|
{
|
||||||
|
// FIXME: I don't know what this method is supposed to do.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepares an image for rendering on this component. This is called by
|
||||||
|
* {@link Component#prepareImage(Image, int, int, ImageObserver)}.
|
||||||
|
*
|
||||||
|
* @param img the image to prepare
|
||||||
|
* @param width the desired width of the rendered image
|
||||||
|
* @param height the desired height of the rendered image
|
||||||
|
* @param ob the image observer to be notified of updates in the preparation
|
||||||
|
* process
|
||||||
|
*
|
||||||
|
* @return <code>true</code> if the image has been fully prepared,
|
||||||
|
* <code>false</code> otherwise (in which case the image observer
|
||||||
|
* receives updates)
|
||||||
|
*/
|
||||||
|
public boolean prepareImage(Image img, int width, int height, ImageObserver ob)
|
||||||
|
{
|
||||||
|
Component parent = awtComponent.getParent();
|
||||||
|
ComponentPeer parentPeer = parent.getPeer();
|
||||||
|
return parentPeer.prepareImage(img, width, height, ob);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void print(Graphics graphics)
|
||||||
|
{
|
||||||
|
// FIXME: I don't know what this method is supposed to do.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Repaints the specified rectangle of this component. This is called from
|
||||||
|
* {@link Component#repaint(long, int, int, int, int)}.
|
||||||
|
*
|
||||||
|
* This is implemented to call repaint() on the Swing component.
|
||||||
|
*
|
||||||
|
* @param tm number of milliseconds to wait with repainting
|
||||||
|
* @param x the X coordinate of the upper left corner of the damaged rectangle
|
||||||
|
* @param y the Y coordinate of the upper left corner of the damaged rectangle
|
||||||
|
* @param width the width of the damaged rectangle
|
||||||
|
* @param height the height of the damaged rectangle
|
||||||
|
*/
|
||||||
|
public void repaint(long tm, int x, int y, int width, int height)
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().repaint(tm, x, y, width, height);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PaintEvent ev = new PaintEvent(awtComponent, PaintEvent.UPDATE,
|
||||||
|
new Rectangle(x, y, width, height));
|
||||||
|
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(ev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Requests that this component receives the focus. This is called from
|
||||||
|
* {@link Component#requestFocus()}.
|
||||||
|
*
|
||||||
|
* This calls requestFocus() on the Swing component.
|
||||||
|
*
|
||||||
|
* @specnote Part of the earlier 1.1 API, apparently replaced by argument
|
||||||
|
* form of the same method.
|
||||||
|
*/
|
||||||
|
public void requestFocus()
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().requestFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Requests that this component receives the focus. This is called from
|
||||||
|
* {@link Component#requestFocus()}.
|
||||||
|
*
|
||||||
|
* This calls requestFocus() on the Swing component.
|
||||||
|
*
|
||||||
|
* @param source TODO
|
||||||
|
* @param bool1 TODO
|
||||||
|
* @param bool2 TODO
|
||||||
|
* @param x TODO
|
||||||
|
*
|
||||||
|
* @return TODO
|
||||||
|
*/
|
||||||
|
public boolean requestFocus(Component source, boolean bool1, boolean bool2, long x)
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().requestFocus();
|
||||||
|
return swingComponent != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notifies the peer that the bounds of this component have changed. This
|
||||||
|
* is called by {@link Component#reshape(int, int, int, int)}.
|
||||||
|
*
|
||||||
|
* This is implemented to call setBounds() on the Swing component.
|
||||||
|
*
|
||||||
|
* @param x the X coordinate of the upper left corner of the component
|
||||||
|
* @param y the Y coordinate of the upper left corner of the component
|
||||||
|
* @param width the width of the component
|
||||||
|
* @param height the height of the component
|
||||||
|
*/
|
||||||
|
public void reshape(int x, int y, int width, int height)
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().setBounds(x, y, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the background color of the component. This is called by
|
||||||
|
* {@link Component#setBackground(Color)}.
|
||||||
|
*
|
||||||
|
* This is implemented to call setBackground() on the Swing component.
|
||||||
|
*
|
||||||
|
* @param color the background color to set
|
||||||
|
*/
|
||||||
|
public void setBackground(Color color)
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().setBackground(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notifies the peer that the bounds of this component have changed. This
|
||||||
|
* is called by {@link Component#setBounds(int, int, int, int)}.
|
||||||
|
*
|
||||||
|
* This is implemented to call setBounds() on the Swing component.
|
||||||
|
*
|
||||||
|
* @param x the X coordinate of the upper left corner of the component
|
||||||
|
* @param y the Y coordinate of the upper left corner of the component
|
||||||
|
* @param width the width of the component
|
||||||
|
* @param height the height of the component
|
||||||
|
*/
|
||||||
|
public void setBounds(int x, int y, int width, int height)
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().setBounds(x, y, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the cursor of the component. This is called by
|
||||||
|
* {@link Component#setCursor(Cursor)}.
|
||||||
|
*
|
||||||
|
* This is implemented to call setCursor() on the Swing component.
|
||||||
|
*
|
||||||
|
* @specnote Part of the earlier 1.1 API, apparently no longer needed.
|
||||||
|
*/
|
||||||
|
public void setCursor(Cursor cursor)
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().setCursor(cursor);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the enabled/disabled state of this component. This is called by
|
||||||
|
* {@link Component#setEnabled(boolean)}.
|
||||||
|
*
|
||||||
|
* This is implemented to call setEnabled() on the Swing component.
|
||||||
|
*
|
||||||
|
* @param enabled <code>true</code> to enable the component,
|
||||||
|
* <code>false</code> to disable it
|
||||||
|
*/
|
||||||
|
public void setEnabled(boolean enabled)
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().setEnabled(enabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the font of the component. This is called by
|
||||||
|
* {@link Component#setFont(Font)}.
|
||||||
|
*
|
||||||
|
* This is implemented to call setFont() on the Swing component.
|
||||||
|
*
|
||||||
|
* @param font the font to set
|
||||||
|
*/
|
||||||
|
public void setFont(Font font)
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().setFont(font);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the foreground color of the component. This is called by
|
||||||
|
* {@link Component#setForeground(Color)}.
|
||||||
|
*
|
||||||
|
* This is implemented to call setForeground() on the Swing component.
|
||||||
|
*
|
||||||
|
* @param color the foreground color to set
|
||||||
|
*/
|
||||||
|
public void setForeground(Color color)
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().setForeground(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the visibility state of the component. This is called by
|
||||||
|
* {@link Component#setVisible(boolean)}.
|
||||||
|
*
|
||||||
|
* This is implemented to call setVisible() on the Swing component.
|
||||||
|
*
|
||||||
|
* @param visible <code>true</code> to make the component visible,
|
||||||
|
* <code>false</code> to make it invisible
|
||||||
|
*/
|
||||||
|
public void setVisible(boolean visible)
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().setVisible(visible);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Makes the component visible. This is called by {@link Component#show()}.
|
||||||
|
*
|
||||||
|
* This is implemented to call setVisible(true) on the Swing component.
|
||||||
|
*/
|
||||||
|
public void show()
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the graphics configuration of the component. The color model
|
||||||
|
* of the component can be derived from the configuration.
|
||||||
|
*
|
||||||
|
* This is implemented to return the GraphicsConfiguration of the parent
|
||||||
|
* component. This will eventually call the toplevel component peer, which
|
||||||
|
* is expected to provide a real implementation.
|
||||||
|
*
|
||||||
|
* @return the graphics configuration of the component
|
||||||
|
*/
|
||||||
|
public GraphicsConfiguration getGraphicsConfiguration()
|
||||||
|
{
|
||||||
|
Component parent = awtComponent.getParent();
|
||||||
|
ComponentPeer parentPeer = parent.getPeer();
|
||||||
|
return parentPeer.getGraphicsConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Part of an older API, no longer needed.
|
||||||
|
*/
|
||||||
|
public void setEventMask(long mask)
|
||||||
|
{
|
||||||
|
// Nothing to do here.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns <code>true</code> if this component has been obscured,
|
||||||
|
* <code>false</code> otherwise. This will only work if
|
||||||
|
* {@link #canDetermineObscurity()} also returns <code>true</code>.
|
||||||
|
*
|
||||||
|
* This is not yet implemented.
|
||||||
|
*
|
||||||
|
* @return <code>true</code> if this component has been obscured,
|
||||||
|
* <code>false</code> otherwise.
|
||||||
|
*/
|
||||||
|
public boolean isObscured()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns <code>true</code> if this component peer can determine if the
|
||||||
|
* component has been obscured, <code>false</code> otherwise.
|
||||||
|
*
|
||||||
|
* This is not yet implemented.
|
||||||
|
*
|
||||||
|
* @return <code>true</code> if this component peer can determine if the
|
||||||
|
* component has been obscured, <code>false</code> otherwise
|
||||||
|
*/
|
||||||
|
public boolean canDetermineObscurity()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Coalesces the specified paint event.
|
||||||
|
*
|
||||||
|
* @param e the paint event
|
||||||
|
*/
|
||||||
|
public void coalescePaintEvent(PaintEvent e)
|
||||||
|
{
|
||||||
|
// Nothing to do here yet.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the cursor. This is not yet implemented.
|
||||||
|
*/
|
||||||
|
public void updateCursorImmediately()
|
||||||
|
{
|
||||||
|
// Nothing to do here yet.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true, if this component can handle wheel scrolling,
|
||||||
|
* <code>false</code> otherwise.
|
||||||
|
*
|
||||||
|
* This is not yet implemented and returns <code>false</code>.
|
||||||
|
*
|
||||||
|
* @return true, if this component can handle wheel scrolling,
|
||||||
|
* <code>false</code> otherwise
|
||||||
|
*/
|
||||||
|
public boolean handlesWheelScrolling()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A convenience method that creates a volatile image. The volatile
|
||||||
|
* image is created on the screen device on which this component is
|
||||||
|
* displayed, in the device's current graphics configuration.
|
||||||
|
*
|
||||||
|
* This is implemented to let the parent component peer create an image.
|
||||||
|
* This eventually ends up in the toplevel component peer, which is then
|
||||||
|
* responsible for creating the real image.
|
||||||
|
*
|
||||||
|
* @param width width of the image
|
||||||
|
* @param height height of the image
|
||||||
|
*
|
||||||
|
* @see VolatileImage
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
|
*/
|
||||||
|
public VolatileImage createVolatileImage(int width, int height)
|
||||||
|
{
|
||||||
|
Component parent = awtComponent.getParent();
|
||||||
|
ComponentPeer parentPeer = parent.getPeer();
|
||||||
|
return parentPeer.createVolatileImage(width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a number of image buffers that implement a buffering
|
||||||
|
* strategy according to the given capabilities.
|
||||||
|
*
|
||||||
|
* This is implemented to forward to the parent component peer. Eventually
|
||||||
|
* this ends up in the top level component peer, which is then responsible
|
||||||
|
* for doing the real work.
|
||||||
|
*
|
||||||
|
* @param numBuffers the number of buffers
|
||||||
|
* @param caps the buffering capabilities
|
||||||
|
*
|
||||||
|
* @throws AWTException if the specified buffering strategy is not
|
||||||
|
* implemented
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
|
*/
|
||||||
|
public void createBuffers(int numBuffers, BufferCapabilities caps) throws AWTException
|
||||||
|
{
|
||||||
|
Component parent = awtComponent.getParent();
|
||||||
|
ComponentPeer parentPeer = parent.getPeer();
|
||||||
|
parentPeer.createBuffers(numBuffers, caps);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the back buffer of this component.
|
||||||
|
*
|
||||||
|
* This is implemented to forward to the parent. Eventually this ends
|
||||||
|
* up in the toplevel component, which is then responsible for providing
|
||||||
|
* a back buffer.
|
||||||
|
*
|
||||||
|
* @return the back buffer of this component.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
|
*/
|
||||||
|
public Image getBackBuffer()
|
||||||
|
{
|
||||||
|
Component parent = awtComponent.getParent();
|
||||||
|
ComponentPeer parentPeer = parent.getPeer();
|
||||||
|
return parentPeer.getBackBuffer();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a page flip, leaving the contents of the back buffer in
|
||||||
|
* the specified state.
|
||||||
|
*
|
||||||
|
* This is implemented to forward to the parent. Eventually this ends
|
||||||
|
* up in the toplevel component, which is then responsible for doing the real
|
||||||
|
* work.
|
||||||
|
*
|
||||||
|
* @param contents the state in which to leave the back buffer
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
|
*/
|
||||||
|
public void flip(FlipContents contents)
|
||||||
|
{
|
||||||
|
Component parent = awtComponent.getParent();
|
||||||
|
ComponentPeer parentPeer = parent.getPeer();
|
||||||
|
parentPeer.flip(contents);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroy the resources created by createBuffers.
|
||||||
|
*
|
||||||
|
* This is implemented to forward to the parent component peer. Eventually
|
||||||
|
* this ends up in the top level component peer, which is then responsible
|
||||||
|
* for doing the real work.
|
||||||
|
*
|
||||||
|
* @since 1.2
|
||||||
|
*/
|
||||||
|
public void destroyBuffers()
|
||||||
|
{
|
||||||
|
Component parent = awtComponent.getParent();
|
||||||
|
ComponentPeer parentPeer = parent.getPeer();
|
||||||
|
parentPeer.destroyBuffers();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the bounds of this component peer.
|
||||||
|
*
|
||||||
|
* This is implemented to forward to the Swing component.
|
||||||
|
*
|
||||||
|
* @return component peer bounds
|
||||||
|
* @since 1.5
|
||||||
|
*/
|
||||||
|
public Rectangle getBounds()
|
||||||
|
{
|
||||||
|
Rectangle retVal;
|
||||||
|
if (swingComponent != null)
|
||||||
|
retVal = swingComponent.getJComponent().getBounds();
|
||||||
|
else
|
||||||
|
retVal = new Rectangle();
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reparent this component under another container.
|
||||||
|
*
|
||||||
|
* @param parent
|
||||||
|
* @since 1.5
|
||||||
|
*/
|
||||||
|
public void reparent(ContainerPeer parent)
|
||||||
|
{
|
||||||
|
// Nothing to do here.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the bounds of this component peer.
|
||||||
|
*
|
||||||
|
* This is implemented to forward to the swing component.
|
||||||
|
*
|
||||||
|
* @param x the new x co-ordinate
|
||||||
|
* @param y the new y co-ordinate
|
||||||
|
* @param width the new width
|
||||||
|
* @param height the new height
|
||||||
|
* @param z the new stacking level
|
||||||
|
* @since 1.5
|
||||||
|
*/
|
||||||
|
public void setBounds(int x, int y, int width, int height, int z)
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().setBounds(x, y, width, height);
|
||||||
|
// FIXME: Somehow handle the Z order.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if this component supports being reparented.
|
||||||
|
*
|
||||||
|
* @return true if this component can be reparented,
|
||||||
|
* false otherwise.
|
||||||
|
* @since 1.5
|
||||||
|
*/
|
||||||
|
public boolean isReparentSupported()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Layout this component peer.
|
||||||
|
*
|
||||||
|
* @since 1.5
|
||||||
|
*/
|
||||||
|
public void layout()
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().doLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Triggers 'heavyweight' painting of the components. This usually calls
|
||||||
|
* paint() on the Swing component.
|
||||||
|
*
|
||||||
|
* @param g the graphics context to use for painting
|
||||||
|
*/
|
||||||
|
protected void peerPaint(Graphics g)
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.getJComponent().paint(g);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles mouse events on the component. This is usually forwarded to the
|
||||||
|
* SwingComponent's processMouseEvent() method.
|
||||||
|
*
|
||||||
|
* @param e the mouse event
|
||||||
|
*/
|
||||||
|
protected void handleMouseEvent(MouseEvent e)
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.handleMouseEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles mouse motion events on the component. This is usually forwarded
|
||||||
|
* to the SwingComponent's processMouseMotionEvent() method.
|
||||||
|
*
|
||||||
|
* @param e the mouse motion event
|
||||||
|
*/
|
||||||
|
protected void handleMouseMotionEvent(MouseEvent e)
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.handleMouseMotionEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles key events on the component. This is usually forwarded to the
|
||||||
|
* SwingComponent's processKeyEvent() method.
|
||||||
|
*
|
||||||
|
* @param e the key event
|
||||||
|
*/
|
||||||
|
protected void handleKeyEvent(KeyEvent e)
|
||||||
|
{
|
||||||
|
if (swingComponent != null)
|
||||||
|
swingComponent.handleKeyEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the AWT component for this peer.
|
||||||
|
*
|
||||||
|
* @return the AWT component for this peer
|
||||||
|
*/
|
||||||
|
public Component getComponent()
|
||||||
|
{
|
||||||
|
return awtComponent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,241 @@
|
||||||
|
/* SwingContainerPeer.java -- A Swing based peer for AWT containers
|
||||||
|
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
GNU Classpath is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GNU Classpath 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 for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
02110-1301 USA.
|
||||||
|
|
||||||
|
Linking this library statically or dynamically with other modules is
|
||||||
|
making a combined work based on this library. Thus, the terms and
|
||||||
|
conditions of the GNU General Public License cover the whole
|
||||||
|
combination.
|
||||||
|
|
||||||
|
As a special exception, the copyright holders of this library give you
|
||||||
|
permission to link this library with independent modules to produce an
|
||||||
|
executable, regardless of the license terms of these independent
|
||||||
|
modules, and to copy and distribute the resulting executable under
|
||||||
|
terms of your choice, provided that you also meet, for each linked
|
||||||
|
independent module, the terms and conditions of the license of that
|
||||||
|
module. An independent module is a module which is not derived from
|
||||||
|
or based on this library. If you modify this library, you may extend
|
||||||
|
this exception to your version of the library, but you are not
|
||||||
|
obligated to do so. If you do not wish to do so, delete this
|
||||||
|
exception statement from your version. */
|
||||||
|
|
||||||
|
package gnu.java.awt.peer.swing;
|
||||||
|
|
||||||
|
import java.awt.Component;
|
||||||
|
import java.awt.Container;
|
||||||
|
import java.awt.Graphics;
|
||||||
|
import java.awt.Insets;
|
||||||
|
import java.awt.Shape;
|
||||||
|
import java.awt.event.MouseEvent;
|
||||||
|
import java.awt.peer.ComponentPeer;
|
||||||
|
import java.awt.peer.ContainerPeer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A peer for Container to be used with the Swing based AWT peers.
|
||||||
|
*
|
||||||
|
* @author Roman Kennke (kennke@aicas.com)
|
||||||
|
*/
|
||||||
|
public class SwingContainerPeer
|
||||||
|
extends SwingComponentPeer
|
||||||
|
implements ContainerPeer
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new SwingContainerPeer.
|
||||||
|
*
|
||||||
|
* @param awtCont
|
||||||
|
*/
|
||||||
|
public SwingContainerPeer(Container awtCont)
|
||||||
|
{
|
||||||
|
init(awtCont, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the insets of the container.
|
||||||
|
*
|
||||||
|
* This is implemented to return the insets of the Swing container.
|
||||||
|
*
|
||||||
|
* @return the insets of the container
|
||||||
|
*/
|
||||||
|
public Insets insets()
|
||||||
|
{
|
||||||
|
Insets retVal;
|
||||||
|
if (swingComponent != null)
|
||||||
|
retVal = swingComponent.getJComponent().getInsets();
|
||||||
|
else
|
||||||
|
retVal = new Insets(0, 0, 0, 0);
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the insets of the container.
|
||||||
|
*
|
||||||
|
* This is implemented to return the insets of the Swing container.
|
||||||
|
*
|
||||||
|
* @return the insets of the container
|
||||||
|
*/
|
||||||
|
public Insets getInsets()
|
||||||
|
{
|
||||||
|
Insets retVal;
|
||||||
|
if (swingComponent != null)
|
||||||
|
retVal = swingComponent.getJComponent().getInsets();
|
||||||
|
else
|
||||||
|
retVal = new Insets(0, 0, 0, 0);
|
||||||
|
return retVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called before the validation of this containers begins.
|
||||||
|
*/
|
||||||
|
public void beginValidate()
|
||||||
|
{
|
||||||
|
// Nothing to do here.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called after the validation of this containers ended.
|
||||||
|
*/
|
||||||
|
public void endValidate()
|
||||||
|
{
|
||||||
|
// Nothing to do here.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called before the layout of this containers begins.
|
||||||
|
*/
|
||||||
|
public void beginLayout()
|
||||||
|
{
|
||||||
|
// Nothing to do here.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called after the layout of this containers ended.
|
||||||
|
*/
|
||||||
|
public void endLayout()
|
||||||
|
{
|
||||||
|
// Nothing to do here.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns <code>false</code> unconditionally. This method is not used at
|
||||||
|
* the moment.
|
||||||
|
*
|
||||||
|
* @return <code>false</code>
|
||||||
|
*/
|
||||||
|
public boolean isPaintPending()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns <code>false</code> unconditionally. This method is not used at
|
||||||
|
* the moment.
|
||||||
|
*
|
||||||
|
* @return <code>false</code>
|
||||||
|
*/
|
||||||
|
public boolean isRestackSupported()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is not used at the moment.
|
||||||
|
*/
|
||||||
|
public void cancelPendingPaint(int x, int y, int width, int height)
|
||||||
|
{
|
||||||
|
// Nothing to do here.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is not used at the moment.
|
||||||
|
*/
|
||||||
|
public void restack()
|
||||||
|
{
|
||||||
|
// Nothing to do here.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Triggers painting of a component. This calls peerPaint on all the child
|
||||||
|
* components of this container.
|
||||||
|
*
|
||||||
|
* @param g the graphics context to paint to
|
||||||
|
*/
|
||||||
|
protected void peerPaint(Graphics g)
|
||||||
|
{
|
||||||
|
Container c = (Container) awtComponent;
|
||||||
|
Component[] children = c.getComponents();
|
||||||
|
for (int i = children.length - 1; i >= 0; --i)
|
||||||
|
{
|
||||||
|
Component child = children[i];
|
||||||
|
ComponentPeer peer = child.getPeer();
|
||||||
|
boolean translated = false;
|
||||||
|
boolean clipped = false;
|
||||||
|
Shape oldClip = g.getClip();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
g.translate(child.getX(), child.getY());
|
||||||
|
translated = true;
|
||||||
|
g.setClip(0, 0, child.getWidth(), child.getHeight());
|
||||||
|
clipped = true;
|
||||||
|
if (peer instanceof SwingComponentPeer)
|
||||||
|
((SwingComponentPeer) peer).peerPaint(g);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if (translated)
|
||||||
|
g.translate(- child.getX(), - child.getY());
|
||||||
|
if (clipped)
|
||||||
|
g.setClip(oldClip);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles mouse events by dispatching it to the correct component.
|
||||||
|
*
|
||||||
|
* @param ev the mouse event
|
||||||
|
*/
|
||||||
|
protected void handleMouseEvent(MouseEvent ev)
|
||||||
|
{
|
||||||
|
Component comp = awtComponent.getComponentAt(ev.getPoint());
|
||||||
|
ComponentPeer peer = comp.getPeer();
|
||||||
|
if (awtComponent != comp && !comp.isLightweight() && peer instanceof SwingComponentPeer)
|
||||||
|
{
|
||||||
|
ev.translatePoint(comp.getX(), comp.getY());
|
||||||
|
ev.setSource(comp);
|
||||||
|
((SwingComponentPeer) peer).handleMouseEvent(ev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles mouse events by dispatching it to the correct component.
|
||||||
|
*
|
||||||
|
* @param ev the mouse event
|
||||||
|
*/
|
||||||
|
protected void handleMouseMotionEvent(MouseEvent ev)
|
||||||
|
{
|
||||||
|
Component comp = awtComponent.getComponentAt(ev.getPoint());
|
||||||
|
ComponentPeer peer = comp.getPeer();
|
||||||
|
if (awtComponent != comp && !comp.isLightweight() && peer instanceof SwingComponentPeer)
|
||||||
|
{
|
||||||
|
ev.translatePoint(comp.getX(), comp.getY());
|
||||||
|
((SwingComponentPeer) peer).handleMouseMotionEvent(ev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue