[SCM] libjgoodies-common-java packaging branch, upstream, updated. 6c0240071b135062112942bcb385e9e6ee08e57b
gregor herrmann
gregoa at debian.org
Thu May 31 15:29:05 UTC 2012
The following commit has been merged in the upstream branch:
commit 6c0240071b135062112942bcb385e9e6ee08e57b
Author: gregor herrmann <gregoa at debian.org>
Date: Fri May 25 20:30:28 2012 +0200
Imported Upstream version 1.3.1
diff --git a/README.html b/README.html
index f21da72..d72edac 100644
--- a/README.html
+++ b/README.html
@@ -48,66 +48,16 @@
<table width="530" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
- <h1>:: Readme :: Common 1.3.0 ::</h1>
+ <h1>:: Readme :: Common 1.3.1 ::</h1>
The JGoodies Common library provides convenience code
for other JGoodies libraries and applications.
- Since version 1.3 the Common lib requires Java 6 or later.
+ It requires Java 6 or later.
+ Library versions for older Java versions are available in the
+ <a href="http://www.jgoodies.com/downloads/archive.html">JGoodies Archive</a>.
+
- <h2>Distribution Contents</h2>
-
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><tt>jgoodies-common-1.3.0.jar</tt></td>
- <td> </td>
- <td>the library jar </td>
- </tr>
- <tr><td colspan="3"> </td></tr>
- <tr>
- <td><tt>LICENSE.txt</tt></td>
- <td> </td>
- <td>the license agreement</td>
- </tr>
- <tr>
- <td><tt>README.html</tt></td>
- <td> </td>
- <td>this readme file</td>
- </tr>
- <tr>
- <td><tt>RELEASE-NOTES.txt</tt></td>
- <td> </td>
- <td>Release Notes</td>
- </tr>
- <tr>
- <td><tt>build.xml</tt></td>
- <td> </td>
- <td>ANT build file</td>
- </tr>
- <tr>
- <td><tt>default.properties</tt></td>
- <td> </td>
- <td>ANT default build properties</td>
- </tr>
- <tr><td colspan="3"> </td></tr>
- <tr>
- <td><tt>docs/api</tt></td>
- <td width="10"> </td>
- <td>JavaDocs directory</td>
- </tr>
- <tr><td colspan="3"> </td></tr>
- <tr>
- <td><tt>src/core</tt></td>
- <td> </td>
- <td>Java sources for the library core</td>
- </tr>
- <tr>
- <td><tt>src/test</tt></td>
- <td> </td>
- <td>Java sources for unit tests</td>
- </tr>
- </table>
-
<h2>Acknowledgements</h2>
@@ -116,6 +66,14 @@
It is only with their money that I can provide, maintain, and improve
this library at no charge.
+
+ <h2>You can Help</h2>
+
+ If you save time and money using this library, please help me
+ finance my Java desktop activities by licensing the commercial
+ <a href="http://www.jgoodies.com/products/index.html">JGoodies Swing Suite</a>.
+
+
</td>
</tr>
</table>
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 81bb241..dddab47 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -3,6 +3,13 @@
Release Notes
+CHANGES in 1.3.1 -------------------------------------------------------------
+
+ This version is backwards compatible with the 1.3.0 release.
+
+ o The javadocs, main and test sources are delivered as JARs.
+
+
CHANGES in 1.3.0 -------------------------------------------------------------
o Requires Java 6.
diff --git a/build.xml b/build.xml
deleted file mode 100644
index b4585b3..0000000
--- a/build.xml
+++ /dev/null
@@ -1,291 +0,0 @@
-<?xml version="1.0"?>
-<!--
- $Id: build.xml,v 1.5 2011/08/04 08:42:15 lentzsch Exp $
-
- This is a build file for use with the Jakarta Ant build tool, see
- http://jakarta.apache.org/ant/index.html
-
- To build, go to the directory where this file is located and run
- ant <target>
- with one of the following targets:
-
- clean removes temporary files and directories
- compile compiles the core classes and tests
- javadoc creates the API documentation
- test compiles and runs the unit tests
- jar creates a library jar
- create-dist-dir creates a distribution tree: docs, sources, jar
- create-dist-zip creates a zipped distribution
- create-maven-bundle creates a Maven bundle
- create-all creates the distribution zip and Maven bundle
-
- To compile, you MUST set the property "build.boot.classpath",
- for example in your user build.properties file a line like:
- build.boot.classpath=C:/Java/Jdk1.5.0_11/jre/lib/rt.jar
-
- To run the unit tests you MUST set the junit.jar property,
- for example in your user build.properties file.
-
--->
-
-<project default="create-all" basedir="." name="JGoodies Common" >
-
- <!-- ***************************************************************** -->
- <!-- Give users a chance to override build properties. -->
- <!-- ***************************************************************** -->
- <property file="${user.home}/common.build.properties" />
- <property file="${user.home}/build.properties" />
- <property file="${basedir}/build.properties" />
- <property file="${basedir}/default.properties" />
-
-
- <!-- ***************************************************************** -->
- <!-- P A T H S -->
- <!-- ***************************************************************** -->
- <path id="classpath.core">
- <pathelement location="${build.core.dir}" />
- </path>
-
- <path id="classpath.tests">
- <pathelement location="${build.core.dir}" />
- <pathelement location="${build.test.dir}" />
- <pathelement location="${junit4.jar}" />
- <pathelement location="${hamcrest.jar}" />
- </path>
-
-
- <!-- ***************************************************************** -->
- <!-- C L E A N -->
- <!-- ***************************************************************** -->
- <target name="clean"
- description="Removes all temporary files and directories." >
-
- <delete dir="${build.dir}" />
- <delete dir="${dist.dir}" />
- </target>
-
-
- <!-- ***************************************************************** -->
- <!-- P R E P A R A T I O N -->
- <!-- ***************************************************************** -->
- <target name="prepare"
- description="Prepares the build and distribution targets." >
-
- <tstamp>
- <format property="DATE" pattern="yyyy-MM-dd hh:mm:ss" />
- </tstamp>
-
- <mkdir dir="${build.core.dir}" />
-
- <available
- property="junit.task.present"
- classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
- />
- <available
- property="junit.jar.present"
- file="${junit4.jar}"
- />
- </target>
-
-
- <!-- ***************************************************************** -->
- <!-- C O M P I L A T I O N -->
- <!-- ***************************************************************** -->
- <target name="compile"
- depends="compile-core, compile-tests"
- description="Compiles the framework and tests." />
-
- <!-- ***************************************************************** -->
- <target name="compile-core" depends="prepare"
- description="Compiles the core sources." >
- <javac
- srcdir ="${src.core.dir}"
- destdir ="${build.core.dir}"
- encoding ="${build.encoding}"
- executable ="${build.compile.executable}"
- fork ="${build.compile.fork}"
- debug ="${build.compile.debug}"
- depend ="${build.compile.depend}"
- deprecation ="${build.compile.deprecation}"
- nowarn ="${build.compile.nowarn}"
- optimize ="${build.compile.optimize}"
- source ="${build.compile.source}"
- target ="${build.compile.target}"
- verbose ="${build.compile.verbose}"
- bootclasspath="${build.boot.classpath}"
- includeAntRuntime="false" />
- </target>
-
-
- <!-- ***************************************************************** -->
- <target name="compile-tests" depends="compile-core" if="junit.jar.present"
- description="Compiles the unit tests." >
- <mkdir dir="${build.test.dir}"/>
- <javac
- srcdir ="${src.test.dir}"
- destdir ="${build.test.dir}"
- encoding ="${build.encoding}"
- executable ="${build.compile.executable}"
- fork ="${build.compile.fork}"
- debug ="${build.compile.debug}"
- depend ="${build.compile.depend}"
- deprecation ="${build.compile.deprecation}"
- nowarn ="${build.compile.nowarn}"
- optimize ="${build.compile.optimize}"
- source ="${build.compile.source}"
- target ="${build.compile.target}"
- verbose ="${build.compile.verbose}"
- bootclasspath="${build.boot.classpath}"
- classpathref ="classpath.tests"
- includeAntRuntime="false" />
- </target>
-
-
- <!-- ***************************************************************** -->
- <!-- J A V A D O C -->
- <!-- ***************************************************************** -->
- <target name="javadoc" depends="prepare"
- description="Creates the API documentation using JavaDoc." >
- <mkdir dir="${build.javadocs.dir}" />
- <javadoc
- sourcepath="${src.core.dir}"
- packagenames="${javadoc.packages}"
- destdir="${build.javadocs.dir}"
- encoding="${build.encoding}"
- access="protected"
- author="true"
- version="true"
- use="true"
- link="${javadoc.link}"
- overview="${javadoc.overview}"
- windowtitle="${Name} ${spec.version} API"
- doctitle="${Name} ${spec.version} API"
- bottom="${copyright.message}" >
- </javadoc>
- </target>
-
-
- <!-- ***************************************************************** -->
- <!-- U N I T T E S T S -->
- <!-- ***************************************************************** -->
- <target name="test" depends="compile-tests" if="junit.task.present"
- description="Compiles and runs the unit tests." >
- <mkdir dir="${build.reports.dir}"/>
- <junit printsummary="yes" haltonfailure="no" >
- <classpath refid="classpath.tests"/>
- <formatter type="plain" />
- <batchtest fork="yes" todir="${build.reports.dir}">
- <fileset dir="${src.test.dir}" includes="**/*Test.java" />
- </batchtest>
- </junit>
- </target>
-
-
- <!-- ***************************************************************** -->
- <!-- J A R -->
- <!-- ***************************************************************** -->
- <target name="jar" depends="compile-core"
- description="Creates the library jar." >
- <jar
- destfile="${build.core.jar}" >
- <fileset dir="${build.core.dir}" />
- <manifest>
- <attribute name ="Built-By"
- value="${user.name}"/>
- <attribute name ="Specification-Title"
- value="${spec.title}" />
- <attribute name ="Specification-Vendor"
- value="${spec.vendor}" />
- <attribute name ="Specification-Version"
- value="${spec.version}" />
- <attribute name ="Implementation-Title"
- value="${impl.title}" />
- <attribute name ="Implementation-Vendor"
- value="${impl.vendor}" />
- <attribute name ="Implementation-Version"
- value="${impl.version} ${DATE}" />
- </manifest>
- </jar>
- </target>
-
-
- <!-- ***************************************************************** -->
- <!-- C R E A T E -->
- <!-- ***************************************************************** -->
- <target name="create-all" depends="create-dist-zip, create-maven-bundle"
- description="Creates the distribution zip and Maven bundle." >
- </target>
-
-
- <target name="create-dist-dir" depends="clean, compile, javadoc, test, jar"
- description="Creates the distribution directory tree." >
-
- <mkdir dir="${dist.dir}" />
-
- <!-- Compile the documentation. -->
- <copy todir="${dist.docs.dir}" >
- <fileset dir="${docs.dir}"
- excludes="**/*.psd, **/*.sxw" />
- </copy>
- <move todir="${dist.docs.dir}" file="${build.javadocs.dir}" />
-
- <!-- Copy the source directories. -->
- <copy todir="${dist.src.dir}" >
- <fileset dir="${src.dir}"
- excludes="unused,
- unused/**/*" />
- </copy>
-
- <!-- Copy the distribution files. -->
- <copy todir="${dist.dir}" >
- <fileset dir="${top.dir}"
- includes="*.txt, *.html, *.xml, *.properties"
- excludes="todo.txt" />
- <filterset>
- <filter token="impl.version" value="${impl.version}" />
- <filter token="version.name" value="${version.name}" />
- <filter token="copyright.message" value="${copyright.message}" />
- <filter token="copyright.short" value="${copyright.short}" />
- </filterset>
- </copy>
-
- <!-- Copy the library jar file. -->
- <copy tofile="${dist.core.jar}" file="${build.core.jar}" />
-
- </target>
-
- <!-- ***************************************************************** -->
- <target name="create-dist-zip" depends="create-dist-dir"
- description="Packages the distribution as a zip file." >
-
- <zip
- destfile="${dist.zip}"
- basedir="${dist.root.dir}"
- includes="${dist.subdir}/**/*" />
- </target>
-
- <!-- ***************************************************************** -->
- <target name="create-maven-bundle" depends="create-dist-dir"
- description="Creates a Maven bundle for the Ibiblio upload." >
-
- <!-- Copy the Maven pom template. -->
- <copy
- tofile="${dist.maven.pom}"
- file="${build.maven.pom.template}" >
- <filterset>
- <filter token="impl.version" value="${impl.version}" />
- <filter token="shortname" value="${shortname}" />
- </filterset>
- </copy>
-
- <copy tofile="${dist.maven.bin.jar}" file="${build.core.jar}" />
- <jar
- destfile="${dist.maven.src.jar}"
- basedir="${dist.src.dir}" />
- <jar
- destfile="${dist.maven.bundle}"
- basedir="${build.maven.dir}" />
- </target>
-
-
-</project>
\ No newline at end of file
diff --git a/default.properties b/default.properties
deleted file mode 100644
index 372e786..0000000
--- a/default.properties
+++ /dev/null
@@ -1,80 +0,0 @@
-# -------------------------------------------------------------
-# JGOODIES COMMON DEFAULT BUILD PROPERTIES
-# -------------------------------------------------------------
-#
-# DO NOT EDIT THIS FILE IN ORDER TO CUSTOMIZE BUILD PROPERTIES.
-# CREATE AND EDIT build.properties FILE INSTEAD.
-#
-
-# Project Properties ------------------------------------------
-Name=JGoodies Common
-shortname=common
-name=jgoodies-${shortname}
-spec.version=1.3
-impl.version=1.3.0
-version.name=${impl.version}
-dist.version=1_3_0-20120207
-spec.title=${Name} API Specification
-impl.title=${Name}
-spec.vendor=JGoodies Karsten Lentzsch
-impl.vendor=JGoodies Karsten Lentzsch
-copyright.date=2009-2012
-copyright.owner=JGoodies Karsten Lentzsch
-copyright.message=Copyright © ${copyright.date} ${copyright.owner}. All Rights Reserved.
-
-top.dir=${basedir}
-
-
-# Source Properties -------------------------------------------
-src.dir = ${top.dir}/src
-src.core.dir = ${src.dir}/core
-src.test.dir = ${src.dir}/test
-docs.dir = ${top.dir}/docs
-
-
-# JavaDoc Properties ------------------------------------------
-javadoc.link=http://download.oracle.com/javase/1.6.0/docs/api/
-javadoc.packages=com.jgoodies.common.*
-javadoc.overview=${src.core.dir}/overview.html
-
-
-# Build Properties --------------------------------------------
-build.compiler.pedantic=false
-build.compile.debug=on
-build.compile.deprecation=off
-build.compile.fork=no
-build.compile.nowarn=on
-build.compile.source=1.6
-build.compile.target=1.6
-build.encoding=ISO-8859-1
-
-build.dir = ${top.dir}/build
-build.classes.dir = ${build.dir}/classes
-build.core.dir = ${build.classes.dir}/core
-build.test.dir = ${build.classes.dir}/test
-build.docs.dir = ${build.dir}/docs
-build.javadocs.dir = ${build.docs.dir}/api
-build.reports.dir = ${build.dir}/test-reports
-
-build.core.jar = ${build.dir}/${name}.jar
-
-build.maven.dir = ${build.dir}/maven
-build.maven.pom.template = ${top.dir}/conf/maven-pom-template.xml
-
-
-# Dist Properties -----------------------------------------------
-dist.root.dir = ${top.dir}/dist
-dist.name = ${name}-${impl.version}
-deploy.name = ${name}-${dist.version}
-dist.subdir = ${dist.name}
-dist.dir = ${dist.root.dir}/${dist.subdir}
-dist.zip = ${dist.root.dir}/${deploy.name}.zip
-dist.src.dir = ${dist.dir}/src
-dist.docs.dir = ${dist.dir}/docs
-dist.core.jar = ${dist.dir}/${dist.name}.jar
-
-dist.maven.pom = ${build.maven.dir}/pom.xml
-dist.maven.bin.jar = ${build.maven.dir}/${dist.name}.jar
-dist.maven.src.jar = ${build.maven.dir}/${dist.name}-sources.jar
-dist.maven.bundle = ${dist.root.dir}/${dist.name}-bundle.jar
-
diff --git a/docs/api/allclasses-frame.html b/docs/api/allclasses-frame.html
index b1efe51..ab8b936 100644
--- a/docs/api/allclasses-frame.html
+++ b/docs/api/allclasses-frame.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
All Classes (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
diff --git a/docs/api/allclasses-noframe.html b/docs/api/allclasses-noframe.html
index 8b1d5d5..33c374c 100644
--- a/docs/api/allclasses-noframe.html
+++ b/docs/api/allclasses-noframe.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
All Classes (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/base/Objects.html b/docs/api/com/jgoodies/common/base/Objects.html
index ba8d606..fb50f9f 100644
--- a/docs/api/com/jgoodies/common/base/Objects.html
+++ b/docs/api/com/jgoodies/common/base/Objects.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
Objects (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -107,7 +107,7 @@ Provides static methods that operate on objects.
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.11 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
</DL>
diff --git a/docs/api/com/jgoodies/common/base/Preconditions.html b/docs/api/com/jgoodies/common/base/Preconditions.html
index 6a3f689..784d240 100644
--- a/docs/api/com/jgoodies/common/base/Preconditions.html
+++ b/docs/api/com/jgoodies/common/base/Preconditions.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
Preconditions (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -108,7 +108,7 @@ Reduces the code necessary to check preconditions on method state and
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.12 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
</DL>
diff --git a/docs/api/com/jgoodies/common/base/Strings.html b/docs/api/com/jgoodies/common/base/Strings.html
index 4ca9117..2650124 100644
--- a/docs/api/com/jgoodies/common/base/Strings.html
+++ b/docs/api/com/jgoodies/common/base/Strings.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
Strings (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -107,7 +107,7 @@ Provides frequently used static null-safe String testing methods .
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.7 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
</DL>
diff --git a/docs/api/com/jgoodies/common/base/SystemUtils.html b/docs/api/com/jgoodies/common/base/SystemUtils.html
index 7d2032b..da16189 100644
--- a/docs/api/com/jgoodies/common/base/SystemUtils.html
+++ b/docs/api/com/jgoodies/common/base/SystemUtils.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
SystemUtils (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -108,7 +108,7 @@ Provides convenience behavior to determine the operating system
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.11 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
</DL>
diff --git a/docs/api/com/jgoodies/common/base/class-use/Objects.html b/docs/api/com/jgoodies/common/base/class-use/Objects.html
index 31e9f25..88fa706 100644
--- a/docs/api/com/jgoodies/common/base/class-use/Objects.html
+++ b/docs/api/com/jgoodies/common/base/class-use/Objects.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Class com.jgoodies.common.base.Objects (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/base/class-use/Preconditions.html b/docs/api/com/jgoodies/common/base/class-use/Preconditions.html
index 97fe842..2853e82 100644
--- a/docs/api/com/jgoodies/common/base/class-use/Preconditions.html
+++ b/docs/api/com/jgoodies/common/base/class-use/Preconditions.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Class com.jgoodies.common.base.Preconditions (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/base/class-use/Strings.html b/docs/api/com/jgoodies/common/base/class-use/Strings.html
index 12b046b..164dc6f 100644
--- a/docs/api/com/jgoodies/common/base/class-use/Strings.html
+++ b/docs/api/com/jgoodies/common/base/class-use/Strings.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Class com.jgoodies.common.base.Strings (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/base/class-use/SystemUtils.html b/docs/api/com/jgoodies/common/base/class-use/SystemUtils.html
index 2ff62c2..33b4a05 100644
--- a/docs/api/com/jgoodies/common/base/class-use/SystemUtils.html
+++ b/docs/api/com/jgoodies/common/base/class-use/SystemUtils.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Class com.jgoodies.common.base.SystemUtils (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/base/package-frame.html b/docs/api/com/jgoodies/common/base/package-frame.html
index b83eea3..3d8608c 100644
--- a/docs/api/com/jgoodies/common/base/package-frame.html
+++ b/docs/api/com/jgoodies/common/base/package-frame.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.base (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/base/package-summary.html b/docs/api/com/jgoodies/common/base/package-summary.html
index ad7ae97..e76ce0b 100644
--- a/docs/api/com/jgoodies/common/base/package-summary.html
+++ b/docs/api/com/jgoodies/common/base/package-summary.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.base (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/base/package-tree.html b/docs/api/com/jgoodies/common/base/package-tree.html
index 4bede0f..8cad63a 100644
--- a/docs/api/com/jgoodies/common/base/package-tree.html
+++ b/docs/api/com/jgoodies/common/base/package-tree.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.base Class Hierarchy (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/base/package-use.html b/docs/api/com/jgoodies/common/base/package-use.html
index 2473607..565c632 100644
--- a/docs/api/com/jgoodies/common/base/package-use.html
+++ b/docs/api/com/jgoodies/common/base/package-use.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Package com.jgoodies.common.base (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/bean/AbstractBean.html b/docs/api/com/jgoodies/common/bean/AbstractBean.html
index 3315784..c9c70c3 100644
--- a/docs/api/com/jgoodies/common/bean/AbstractBean.html
+++ b/docs/api/com/jgoodies/common/bean/AbstractBean.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
AbstractBean (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -120,7 +120,7 @@ An abstract superclass that minimizes the effort required to provide
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.10 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
<DT><B>See Also:</B><DD><A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/beans/PropertyChangeEvent.html?is-external=true" title="class or interface in java.beans"><CODE>PropertyChangeEvent</CODE></A>,
diff --git a/docs/api/com/jgoodies/common/bean/ObservableBean.html b/docs/api/com/jgoodies/common/bean/ObservableBean.html
index cea0c7b..d16865a 100644
--- a/docs/api/com/jgoodies/common/bean/ObservableBean.html
+++ b/docs/api/com/jgoodies/common/bean/ObservableBean.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
ObservableBean (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -113,7 +113,7 @@ Describes objects that provide bound properties as specified in the
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.3 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
<DT><B>See Also:</B><DD><A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/beans/PropertyChangeListener.html?is-external=true" title="class or interface in java.beans"><CODE>PropertyChangeListener</CODE></A>,
diff --git a/docs/api/com/jgoodies/common/bean/ObservableBean2.html b/docs/api/com/jgoodies/common/bean/ObservableBean2.html
index bf6b8a7..971bb14 100644
--- a/docs/api/com/jgoodies/common/bean/ObservableBean2.html
+++ b/docs/api/com/jgoodies/common/bean/ObservableBean2.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
ObservableBean2 (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -113,7 +113,7 @@ In addition to its super interface ObservableBean, this interface
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.4 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
<DT><B>See Also:</B><DD><A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/beans/PropertyChangeListener.html?is-external=true" title="class or interface in java.beans"><CODE>PropertyChangeListener</CODE></A>,
diff --git a/docs/api/com/jgoodies/common/bean/class-use/AbstractBean.html b/docs/api/com/jgoodies/common/bean/class-use/AbstractBean.html
index e6705be..b0ee876 100644
--- a/docs/api/com/jgoodies/common/bean/class-use/AbstractBean.html
+++ b/docs/api/com/jgoodies/common/bean/class-use/AbstractBean.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Class com.jgoodies.common.bean.AbstractBean (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/bean/class-use/ObservableBean.html b/docs/api/com/jgoodies/common/bean/class-use/ObservableBean.html
index 828af6e..84d72bd 100644
--- a/docs/api/com/jgoodies/common/bean/class-use/ObservableBean.html
+++ b/docs/api/com/jgoodies/common/bean/class-use/ObservableBean.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Interface com.jgoodies.common.bean.ObservableBean (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/bean/class-use/ObservableBean2.html b/docs/api/com/jgoodies/common/bean/class-use/ObservableBean2.html
index 4a82006..f545963 100644
--- a/docs/api/com/jgoodies/common/bean/class-use/ObservableBean2.html
+++ b/docs/api/com/jgoodies/common/bean/class-use/ObservableBean2.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Interface com.jgoodies.common.bean.ObservableBean2 (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/bean/package-frame.html b/docs/api/com/jgoodies/common/bean/package-frame.html
index 0125127..5ed0178 100644
--- a/docs/api/com/jgoodies/common/bean/package-frame.html
+++ b/docs/api/com/jgoodies/common/bean/package-frame.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.bean (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/bean/package-summary.html b/docs/api/com/jgoodies/common/bean/package-summary.html
index 8b2b399..1315a0d 100644
--- a/docs/api/com/jgoodies/common/bean/package-summary.html
+++ b/docs/api/com/jgoodies/common/bean/package-summary.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.bean (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/bean/package-tree.html b/docs/api/com/jgoodies/common/bean/package-tree.html
index 93d14cf..372aba8 100644
--- a/docs/api/com/jgoodies/common/bean/package-tree.html
+++ b/docs/api/com/jgoodies/common/bean/package-tree.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.bean Class Hierarchy (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/bean/package-use.html b/docs/api/com/jgoodies/common/bean/package-use.html
index 5a04f0b..cd27abd 100644
--- a/docs/api/com/jgoodies/common/bean/package-use.html
+++ b/docs/api/com/jgoodies/common/bean/package-use.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Package com.jgoodies.common.bean (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/collect/ArrayListModel.html b/docs/api/com/jgoodies/common/collect/ArrayListModel.html
index 3416548..7c2fdc3 100644
--- a/docs/api/com/jgoodies/common/collect/ArrayListModel.html
+++ b/docs/api/com/jgoodies/common/collect/ArrayListModel.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
ArrayListModel (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -120,7 +120,7 @@ Adds <A HREF="http://download.oracle.com/javase/1.6.0/docs/api/javax/swing/ListM
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.6 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../com/jgoodies/common/collect/ObservableList.html" title="interface in com.jgoodies.common.collect"><CODE>ObservableList</CODE></A>,
diff --git a/docs/api/com/jgoodies/common/collect/LinkedListModel.html b/docs/api/com/jgoodies/common/collect/LinkedListModel.html
index ba8180c..f49ea0a 100644
--- a/docs/api/com/jgoodies/common/collect/LinkedListModel.html
+++ b/docs/api/com/jgoodies/common/collect/LinkedListModel.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
LinkedListModel (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -121,7 +121,7 @@ Adds <A HREF="http://download.oracle.com/javase/1.6.0/docs/api/javax/swing/ListM
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.7 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../com/jgoodies/common/collect/ObservableList.html" title="interface in com.jgoodies.common.collect"><CODE>ObservableList</CODE></A>,
diff --git a/docs/api/com/jgoodies/common/collect/ObservableList.html b/docs/api/com/jgoodies/common/collect/ObservableList.html
index 0c201f7..7945154 100644
--- a/docs/api/com/jgoodies/common/collect/ObservableList.html
+++ b/docs/api/com/jgoodies/common/collect/ObservableList.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
ObservableList (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -117,7 +117,7 @@ Combines the <A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/util
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.4 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
</DL>
diff --git a/docs/api/com/jgoodies/common/collect/class-use/ArrayListModel.html b/docs/api/com/jgoodies/common/collect/class-use/ArrayListModel.html
index 6eef57c..b46c152 100644
--- a/docs/api/com/jgoodies/common/collect/class-use/ArrayListModel.html
+++ b/docs/api/com/jgoodies/common/collect/class-use/ArrayListModel.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Class com.jgoodies.common.collect.ArrayListModel (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/collect/class-use/LinkedListModel.html b/docs/api/com/jgoodies/common/collect/class-use/LinkedListModel.html
index b2aa085..fcd2a86 100644
--- a/docs/api/com/jgoodies/common/collect/class-use/LinkedListModel.html
+++ b/docs/api/com/jgoodies/common/collect/class-use/LinkedListModel.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Class com.jgoodies.common.collect.LinkedListModel (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/collect/class-use/ObservableList.html b/docs/api/com/jgoodies/common/collect/class-use/ObservableList.html
index b809178..5b5a58e 100644
--- a/docs/api/com/jgoodies/common/collect/class-use/ObservableList.html
+++ b/docs/api/com/jgoodies/common/collect/class-use/ObservableList.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Interface com.jgoodies.common.collect.ObservableList (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/collect/package-frame.html b/docs/api/com/jgoodies/common/collect/package-frame.html
index b7d025e..9570dd8 100644
--- a/docs/api/com/jgoodies/common/collect/package-frame.html
+++ b/docs/api/com/jgoodies/common/collect/package-frame.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.collect (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/collect/package-summary.html b/docs/api/com/jgoodies/common/collect/package-summary.html
index 2d177be..dae324e 100644
--- a/docs/api/com/jgoodies/common/collect/package-summary.html
+++ b/docs/api/com/jgoodies/common/collect/package-summary.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.collect (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/collect/package-tree.html b/docs/api/com/jgoodies/common/collect/package-tree.html
index 404277b..8aa4c10 100644
--- a/docs/api/com/jgoodies/common/collect/package-tree.html
+++ b/docs/api/com/jgoodies/common/collect/package-tree.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.collect Class Hierarchy (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/collect/package-use.html b/docs/api/com/jgoodies/common/collect/package-use.html
index 8c8542b..4216048 100644
--- a/docs/api/com/jgoodies/common/collect/package-use.html
+++ b/docs/api/com/jgoodies/common/collect/package-use.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Package com.jgoodies.common.collect (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/format/AbstractWrappedDateFormat.html b/docs/api/com/jgoodies/common/format/AbstractWrappedDateFormat.html
index e3cf9c9..76a66d4 100644
--- a/docs/api/com/jgoodies/common/format/AbstractWrappedDateFormat.html
+++ b/docs/api/com/jgoodies/common/format/AbstractWrappedDateFormat.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
AbstractWrappedDateFormat (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -125,7 +125,7 @@ Reduces the effort required to write custom DateFormat implementations
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.7 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#com.jgoodies.common.format.AbstractWrappedDateFormat">Serialized Form</A></DL>
diff --git a/docs/api/com/jgoodies/common/format/EmptyDateFormat.html b/docs/api/com/jgoodies/common/format/EmptyDateFormat.html
index d20d8a6..6093942 100644
--- a/docs/api/com/jgoodies/common/format/EmptyDateFormat.html
+++ b/docs/api/com/jgoodies/common/format/EmptyDateFormat.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
EmptyDateFormat (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -129,7 +129,7 @@ Wraps a given <A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/tex
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.9 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#com.jgoodies.common.format.EmptyDateFormat">Serialized Form</A></DL>
diff --git a/docs/api/com/jgoodies/common/format/EmptyFormat.html b/docs/api/com/jgoodies/common/format/EmptyFormat.html
index c162f47..6256799 100644
--- a/docs/api/com/jgoodies/common/format/EmptyFormat.html
+++ b/docs/api/com/jgoodies/common/format/EmptyFormat.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
EmptyFormat (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -124,7 +124,7 @@ Wraps a given <code>Format</code> and adds behavior to convert to/from
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.8 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#com.jgoodies.common.format.EmptyFormat">Serialized Form</A></DL>
diff --git a/docs/api/com/jgoodies/common/format/EmptyNumberFormat.html b/docs/api/com/jgoodies/common/format/EmptyNumberFormat.html
index 54fc687..54468bf 100644
--- a/docs/api/com/jgoodies/common/format/EmptyNumberFormat.html
+++ b/docs/api/com/jgoodies/common/format/EmptyNumberFormat.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
EmptyNumberFormat (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -122,7 +122,7 @@ Wraps a given <code>NumberFormat</code> and adds behavior to convert to/from
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.6 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#com.jgoodies.common.format.EmptyNumberFormat">Serialized Form</A></DL>
diff --git a/docs/api/com/jgoodies/common/format/class-use/AbstractWrappedDateFormat.html b/docs/api/com/jgoodies/common/format/class-use/AbstractWrappedDateFormat.html
index 1c181de..3a34573 100644
--- a/docs/api/com/jgoodies/common/format/class-use/AbstractWrappedDateFormat.html
+++ b/docs/api/com/jgoodies/common/format/class-use/AbstractWrappedDateFormat.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Class com.jgoodies.common.format.AbstractWrappedDateFormat (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/format/class-use/EmptyDateFormat.html b/docs/api/com/jgoodies/common/format/class-use/EmptyDateFormat.html
index 844cc77..a457401 100644
--- a/docs/api/com/jgoodies/common/format/class-use/EmptyDateFormat.html
+++ b/docs/api/com/jgoodies/common/format/class-use/EmptyDateFormat.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Class com.jgoodies.common.format.EmptyDateFormat (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/format/class-use/EmptyFormat.html b/docs/api/com/jgoodies/common/format/class-use/EmptyFormat.html
index 3add683..c94753f 100644
--- a/docs/api/com/jgoodies/common/format/class-use/EmptyFormat.html
+++ b/docs/api/com/jgoodies/common/format/class-use/EmptyFormat.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Class com.jgoodies.common.format.EmptyFormat (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/format/class-use/EmptyNumberFormat.html b/docs/api/com/jgoodies/common/format/class-use/EmptyNumberFormat.html
index d37fa2b..a8c92ea 100644
--- a/docs/api/com/jgoodies/common/format/class-use/EmptyNumberFormat.html
+++ b/docs/api/com/jgoodies/common/format/class-use/EmptyNumberFormat.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Class com.jgoodies.common.format.EmptyNumberFormat (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/format/package-frame.html b/docs/api/com/jgoodies/common/format/package-frame.html
index b90980e..ec2dd76 100644
--- a/docs/api/com/jgoodies/common/format/package-frame.html
+++ b/docs/api/com/jgoodies/common/format/package-frame.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.format (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/format/package-summary.html b/docs/api/com/jgoodies/common/format/package-summary.html
index 53a578d..b6ac8e6 100644
--- a/docs/api/com/jgoodies/common/format/package-summary.html
+++ b/docs/api/com/jgoodies/common/format/package-summary.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.format (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/format/package-tree.html b/docs/api/com/jgoodies/common/format/package-tree.html
index e7c6a4c..b1b442d 100644
--- a/docs/api/com/jgoodies/common/format/package-tree.html
+++ b/docs/api/com/jgoodies/common/format/package-tree.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.format Class Hierarchy (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/format/package-use.html b/docs/api/com/jgoodies/common/format/package-use.html
index 75c0e86..aee19c1 100644
--- a/docs/api/com/jgoodies/common/format/package-use.html
+++ b/docs/api/com/jgoodies/common/format/package-use.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Package com.jgoodies.common.format (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/internal/RenderingUtils.html b/docs/api/com/jgoodies/common/internal/RenderingUtils.html
index 80a1a0e..16af214 100644
--- a/docs/api/com/jgoodies/common/internal/RenderingUtils.html
+++ b/docs/api/com/jgoodies/common/internal/RenderingUtils.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
RenderingUtils (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -112,7 +112,7 @@ Provides convenience behavior for drawing strings, underline chars,
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.7 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
</DL>
diff --git a/docs/api/com/jgoodies/common/internal/class-use/RenderingUtils.html b/docs/api/com/jgoodies/common/internal/class-use/RenderingUtils.html
index 85347fb..a7a2601 100644
--- a/docs/api/com/jgoodies/common/internal/class-use/RenderingUtils.html
+++ b/docs/api/com/jgoodies/common/internal/class-use/RenderingUtils.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Class com.jgoodies.common.internal.RenderingUtils (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/internal/package-frame.html b/docs/api/com/jgoodies/common/internal/package-frame.html
index 23b6346..fe02886 100644
--- a/docs/api/com/jgoodies/common/internal/package-frame.html
+++ b/docs/api/com/jgoodies/common/internal/package-frame.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.internal (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/internal/package-summary.html b/docs/api/com/jgoodies/common/internal/package-summary.html
index 570c20e..a9c003b 100644
--- a/docs/api/com/jgoodies/common/internal/package-summary.html
+++ b/docs/api/com/jgoodies/common/internal/package-summary.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.internal (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/internal/package-tree.html b/docs/api/com/jgoodies/common/internal/package-tree.html
index 530ec9d..c6c316c 100644
--- a/docs/api/com/jgoodies/common/internal/package-tree.html
+++ b/docs/api/com/jgoodies/common/internal/package-tree.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.internal Class Hierarchy (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/internal/package-use.html b/docs/api/com/jgoodies/common/internal/package-use.html
index ea00791..c45d025 100644
--- a/docs/api/com/jgoodies/common/internal/package-use.html
+++ b/docs/api/com/jgoodies/common/internal/package-use.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Package com.jgoodies.common.internal (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/swing/MnemonicUtils.html b/docs/api/com/jgoodies/common/swing/MnemonicUtils.html
index 71f30f6..077a6ce 100644
--- a/docs/api/com/jgoodies/common/swing/MnemonicUtils.html
+++ b/docs/api/com/jgoodies/common/swing/MnemonicUtils.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
MnemonicUtils (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
@@ -201,7 +201,7 @@ Configures the text, mnemonic and mnemonic index in Actions, JLabels,
<P>
<DL>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.12 $</DD>
+ <DD>$Revision: 1.1 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
</DL>
diff --git a/docs/api/com/jgoodies/common/swing/class-use/MnemonicUtils.html b/docs/api/com/jgoodies/common/swing/class-use/MnemonicUtils.html
index 1cd8263..88dbb83 100644
--- a/docs/api/com/jgoodies/common/swing/class-use/MnemonicUtils.html
+++ b/docs/api/com/jgoodies/common/swing/class-use/MnemonicUtils.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Class com.jgoodies.common.swing.MnemonicUtils (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/swing/package-frame.html b/docs/api/com/jgoodies/common/swing/package-frame.html
index 8d8ea0c..5717302 100644
--- a/docs/api/com/jgoodies/common/swing/package-frame.html
+++ b/docs/api/com/jgoodies/common/swing/package-frame.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.swing (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/swing/package-summary.html b/docs/api/com/jgoodies/common/swing/package-summary.html
index f5df80d..ff2e6f8 100644
--- a/docs/api/com/jgoodies/common/swing/package-summary.html
+++ b/docs/api/com/jgoodies/common/swing/package-summary.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.swing (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/swing/package-tree.html b/docs/api/com/jgoodies/common/swing/package-tree.html
index 750f9a2..0debaa9 100644
--- a/docs/api/com/jgoodies/common/swing/package-tree.html
+++ b/docs/api/com/jgoodies/common/swing/package-tree.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
com.jgoodies.common.swing Class Hierarchy (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/com/jgoodies/common/swing/package-use.html b/docs/api/com/jgoodies/common/swing/package-use.html
index cd23e0b..a99dad8 100644
--- a/docs/api/com/jgoodies/common/swing/package-use.html
+++ b/docs/api/com/jgoodies/common/swing/package-use.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Uses of Package com.jgoodies.common.swing (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
diff --git a/docs/api/constant-values.html b/docs/api/constant-values.html
index 1d6c72a..1db0c9c 100644
--- a/docs/api/constant-values.html
+++ b/docs/api/constant-values.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
Constant Field Values (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
diff --git a/docs/api/deprecated-list.html b/docs/api/deprecated-list.html
index 7a06964..4486529 100644
--- a/docs/api/deprecated-list.html
+++ b/docs/api/deprecated-list.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Deprecated List (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
diff --git a/docs/api/help-doc.html b/docs/api/help-doc.html
index 97f47f8..f36c257 100644
--- a/docs/api/help-doc.html
+++ b/docs/api/help-doc.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
API Help (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
diff --git a/docs/api/index-all.html b/docs/api/index-all.html
index 22d4b61..c57bd5d 100644
--- a/docs/api/index-all.html
+++ b/docs/api/index-all.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Index (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="./stylesheet.css" TITLE="Style">
diff --git a/docs/api/index.html b/docs/api/index.html
index 1408b0b..49b922f 100644
--- a/docs/api/index.html
+++ b/docs/api/index.html
@@ -2,7 +2,7 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc on Tue Feb 07 13:46:13 CET 2012-->
+<!-- Generated by javadoc on Thu May 03 18:12:18 CEST 2012-->
<TITLE>
JGoodies Common 1.3 API
</TITLE>
diff --git a/docs/api/overview-frame.html b/docs/api/overview-frame.html
index 4dd7770..5190bcd 100644
--- a/docs/api/overview-frame.html
+++ b/docs/api/overview-frame.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:12 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:17 CEST 2012 -->
<TITLE>
Overview List (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
diff --git a/docs/api/overview-summary.html b/docs/api/overview-summary.html
index 9d532c7..562cdec 100644
--- a/docs/api/overview-summary.html
+++ b/docs/api/overview-summary.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Overview (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
@@ -129,7 +129,7 @@ This document describes the API of the JGoodies Common, a library
<P>
This document describes the API of the JGoodies Common, a library
that provides convenience code for other JGoodies libraries
- and applications. It requires Java 5 or later.
+ and applications. It requires Java 6 or later.
<P>
<P>
diff --git a/docs/api/overview-tree.html b/docs/api/overview-tree.html
index f290a99..25a5ab0 100644
--- a/docs/api/overview-tree.html
+++ b/docs/api/overview-tree.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Class Hierarchy (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
diff --git a/docs/api/serialized-form.html b/docs/api/serialized-form.html
index 54ff1ba..ce48417 100644
--- a/docs/api/serialized-form.html
+++ b/docs/api/serialized-form.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_30) on Tue Feb 07 13:46:13 CET 2012 -->
+<!-- Generated by javadoc (build 1.6.0_31) on Thu May 03 18:12:18 CEST 2012 -->
<TITLE>
Serialized Form (JGoodies Common 1.3 API)
</TITLE>
-<META NAME="date" CONTENT="2012-02-07">
+<META NAME="date" CONTENT="2012-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
diff --git a/jgoodies-common-1.3.1-javadoc.jar b/jgoodies-common-1.3.1-javadoc.jar
new file mode 100644
index 0000000..dc45735
Binary files /dev/null and b/jgoodies-common-1.3.1-javadoc.jar differ
diff --git a/jgoodies-common-1.3.1-sources.jar b/jgoodies-common-1.3.1-sources.jar
new file mode 100644
index 0000000..a39852a
Binary files /dev/null and b/jgoodies-common-1.3.1-sources.jar differ
diff --git a/jgoodies-common-1.3.1-tests.jar b/jgoodies-common-1.3.1-tests.jar
new file mode 100644
index 0000000..f89f071
Binary files /dev/null and b/jgoodies-common-1.3.1-tests.jar differ
diff --git a/jgoodies-common-1.3.0.jar b/jgoodies-common-1.3.1.jar
similarity index 86%
rename from jgoodies-common-1.3.0.jar
rename to jgoodies-common-1.3.1.jar
index b83697c..cf9bc37 100644
Binary files a/jgoodies-common-1.3.0.jar and b/jgoodies-common-1.3.1.jar differ
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..b3f34e4
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,42 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.jgoodies</groupId>
+ <artifactId>jgoodies-common</artifactId>
+ <version>1.3.1</version>
+ <packaging>jar</packaging>
+ <name>JGoodies Common</name>
+ <url>http://www.jgoodies.com/downloads/libraries.html</url>
+ <description>The JGoodies Common library provides convenience code
+ for other JGoodies libraries and applications.</description>
+ <licenses>
+ <license>
+ <name>The BSD License</name>
+ <url>http://www.opensource.org/licenses/bsd-license.html</url>
+ </license>
+ </licenses>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.0</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <organization>
+ <name>JGoodies</name>
+ <url>http://www.jgoodies.com/</url>
+ </organization>
+ <developers>
+ <developer>
+ <id>karsten</id>
+ <name>Karsten Lentzsch</name>
+ <organization>JGoodies</organization>
+ <organizationUrl>http://www.jgoodies.com/</organizationUrl>
+ <timezone>+0100</timezone>
+ <roles>
+ <role>Project owner</role>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ </developers>
+</project>
\ No newline at end of file
diff --git a/src/core/com/jgoodies/common/base/Objects.java b/src/core/com/jgoodies/common/base/Objects.java
deleted file mode 100644
index 3aab47c..0000000
--- a/src/core/com/jgoodies/common/base/Objects.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.base;
-
-import java.io.*;
-
-
-/**
- * Provides static methods that operate on objects.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.11 $
- */
-public final class Objects {
-
-
- private Objects() {
- // Override default constructor; prevents instantiation.
- }
-
-
- // API ********************************************************************
-
- /**
- * Provides a means to copy objects that do not implement Cloneable.
- * Performs a deep copy where the copied object has no references
- * to the original object for any object that implements Serializable.
- * If the original is {@code null}, this method just returns {@code null}.
- *
- * @param <T> the type of the object to be cloned
- * @param original the object to copied, may be {@code null}
- * @return the copied object
- *
- * @since 1.1.1
- */
- public static <T extends Serializable> T deepCopy(T original) {
- if (original == null) {
- return null;
- }
- try {
- final ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
- final ObjectOutputStream oas = new ObjectOutputStream(baos);
- oas.writeObject(original);
- oas.flush();
- // close is unnecessary
- final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
- final ObjectInputStream ois = new ObjectInputStream(bais);
- return (T) ois.readObject();
- } catch (Throwable e) {
- throw new RuntimeException("Deep copy failed", e);
- }
- }
-
-
- /**
- * Checks and answers if the two objects are both {@code null} or equal.
- *
- * <pre>
- * Objects.equals(null, null) == true
- * Objects.equals("Hi", "Hi") == true
- * Objects.equals("Hi", null) == false
- * Objects.equals(null, "Hi") == false
- * Objects.equals("Hi", "Ho") == false
- * </pre>
- *
- * @param o1 the first object to compare
- * @param o2 the second object to compare
- * @return boolean {@code true} if and only if
- * both objects are {@code null} or equal according to
- * {@link Object#equals(Object) equals} invoked on the
- * first object
- */
- public static boolean equals(Object o1, Object o2) {
- return o1 == o2
- || o1 != null && o1.equals(o2);
- }
-
-
-}
diff --git a/src/core/com/jgoodies/common/base/Preconditions.java b/src/core/com/jgoodies/common/base/Preconditions.java
deleted file mode 100644
index df6dcae..0000000
--- a/src/core/com/jgoodies/common/base/Preconditions.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.base;
-
-import java.util.Formatter;
-
-
-
-/**
- * Reduces the code necessary to check preconditions on method state and
- * parameters.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.12 $
- */
-public final class Preconditions {
-
-
- private Preconditions() {
- // Override default constructor; prevents instantiation.
- }
-
-
- // Tests that throw IllegalArgumentExceptions *****************************
-
- /**
- * Checks the truth of the given expression and throws a customized
- * {@link IllegalArgumentException} if it is false. Intended for doing
- * parameter validation in methods and constructors, e.g.:
- * <blockquote><pre>
- * public void foo(int count) {
- * Preconditions.checkArgument(count > 0, "count must be positive.");
- * }
- * </pre></blockquote>
- *
- * @param expression the precondition to check involving one ore more
- * parameters to the calling method or constructor
- * @param message the detail message to be used in the event that
- * an exception is thrown
- * @throws IllegalArgumentException if {@code expression} is false
- */
- public static void checkArgument(boolean expression, String message) {
- if (!expression) {
- throw new IllegalArgumentException(message);
- }
- }
-
-
- /**
- * Checks the truth of the given expression and throws a customized
- * {@link IllegalArgumentException} if it is false. Intended for doing
- * parameter validation in methods and constructors, e.g.:
- * <blockquote><pre>
- * public void foo(int count) {
- * Preconditions.checkArgument(count > 0, "count must be positive: %s.", count);
- * }
- * </pre></blockquote>
- *
- * @param expression the precondition to check involving one ore more
- * parameters to the calling method or constructor
- * @param messageFormat a {@link Formatter format} string for the detail message to be used
- * in the event that an exception is thrown.
- * @param messageArgs the arguments referenced by the format specifiers
- * in the {@code messageFormat}
- * @throws IllegalArgumentException if {@code expression} is false
- */
- public static void checkArgument(
- boolean expression, String messageFormat, Object... messageArgs) {
- if (!expression) {
- throw new IllegalArgumentException(format(messageFormat, messageArgs));
- }
- }
-
-
- // Tests Throwing NullPointerExceptions ***********************************
-
- /**
- * Checks that the given object reference is not {@code null}
- * and throws a customized {@link NullPointerException} if it is.
- * Intended for doing parameter validation in methods and constructors,
- * e.g.:
- * <blockquote><pre>
- * public void foo(Bar bar, Baz baz) {
- * this.bar = Preconditions.checkNotNull(bar, "bar must not be null.");
- * Preconditions.checkNotBull(baz, "baz must not be null.");
- * }
- * </pre></blockquote>
- *
- * @param reference the object reference to check for being {@code null}
- * @param message the detail message to be used in the event that
- * an exception is thrown
- * @param <T> the type of the reference
- * @return {@code reference} if not {@code null}
- * @throws NullPointerException if {@code reference} is {@code null}
- */
- public static <T> T checkNotNull(T reference, String message) {
- if (reference == null) {
- throw new NullPointerException(message);
- }
- return reference;
- }
-
-
- /**
- * Checks that the given object reference is not {@code null}
- * and throws a customized {@link NullPointerException} if it is.
- * Intended for doing parameter validation in methods and constructors,
- * e.g.:
- * <blockquote><pre>
- * public void foo(Bar bar, Baz baz) {
- * this.bar = Preconditions.checkNotNull(bar, "bar must not be null.");
- * Preconditions.checkNotBull(baz, "The %s must not be null.", "baz");
- * }
- * </pre></blockquote>
- *
- * @param reference the object reference to check for being {@code null}
- * @param messageFormat a {@link Formatter format} string for the detail message to be used
- * in the event that an exception is thrown.
- * @param messageArgs the arguments referenced by the format specifiers
- * in the {@code messageFormat}
- * @param <T> the type of the reference
- * @return {@code reference} if not {@code null}
- * @throws NullPointerException if {@code reference} is {@code null}
- */
- public static <T> T checkNotNull(
- T reference, String messageFormat, Object... messageArgs) {
- if (reference == null) {
- throw new NullPointerException(format(messageFormat, messageArgs));
- }
- return reference;
- }
-
-
- // Tests Throwing IllegalStateExceptions **********************************
-
- /**
- * Checks the truth of the given expression and throws a customized
- * {@link IllegalStateException} if it is false. Intended for doing
- * validation in methods involving the state of the calling instance,
- * but not involving parameters of the calling method, e.g.:
- * <blockquote><pre>
- * public void unlock() {
- * Preconditions.checkState(locked, "Must be locked to be unlocked.");
- * }
- * </pre></blockquote>
- *
- * @param expression the precondition to check involving the state
- * of the calling instance
- * @param message the detail message to be used in the event that
- * an exception is thrown
- * @throws IllegalStateException if {@code expression} is false
- */
- public static void checkState(boolean expression, String message) {
- if (!expression) {
- throw new IllegalStateException(message);
- }
- }
-
-
- /**
- * Checks the truth of the given expression and throws a customized
- * {@link IllegalStateException} if it is false. Intended for doing
- * validation in methods involving the state of the calling instance,
- * but not involving parameters of the calling method, e.g.:
- * <blockquote><pre>
- * public void unlock() {
- * Preconditions.checkState(locked,
- * "Must be locked to be unlocked. Most recent lock: %s",
- * mostRecentLock);
- * }
- * </pre></blockquote>
- *
- * @param expression the precondition to check involving the state
- * of the calling instance
- * @param messageFormat a {@link Formatter format} string for the detail message to be used
- * in the event that an exception is thrown.
- * @param messageArgs the arguments referenced by the format specifiers
- * in the {@code messageFormat}
- * @throws IllegalStateException if {@code expression} is false
- */
- public static void checkState(
- boolean expression, String messageFormat, Object... messageArgs) {
- if (!expression) {
- throw new IllegalStateException(format(messageFormat, messageArgs));
- }
- }
-
-
- // Combined Tests Throwing Multiple Exceptions ****************************
-
- /**
- * Checks that the given string is not blank and throws a customized
- * {@link NullPointerException} if it is {@code null}, and a customized
- * {@link IllegalArgumentException} if it is empty or whitespace.
- * Intended for doing parameter validation in methods and constructors,
- * e.g.:
- * <blockquote><pre>
- * public void foo(String text) {
- * checkNotBlank(text, "The text must not be null, empty or whitespace.");
- * }
- * </pre></blockquote>
- *
- * @param str the string to check for being blank
- * @param message the detail message to be used in the event that
- * an exception is thrown
- * @return {@code str} if not {@code null}
- * @throws NullPointerException if {@code str} is {@code null}
- * @throws IllegalArgumentException if {@code str} is empty or whitespace
- */
- public static String checkNotBlank(String str, String message) {
- checkNotNull(str, message);
- checkArgument(Strings.isNotBlank(str), message);
- return str;
- }
-
-
- /**
- * Checks that the given string is not blank and throws a customized
- * {@link NullPointerException} if it is {@code null}, and a customized
- * {@link IllegalArgumentException} if it is empty or whitespace.
- * Intended for doing parameter validation in methods and constructors,
- * e.g.:
- * <blockquote><pre>
- * public void foo(String text, String id) {
- * checkNotBlank(
- * text,
- * "The text for %s must not be null, empty or whitespace.",
- * id);
- * }
- * </pre></blockquote>
- *
- * @param str the string to check for being blank
- * @param messageFormat a {@link Formatter format} string for the detail message to be used
- * in the event that an exception is thrown.
- * @param messageArgs the arguments referenced by the format specifiers
- * in the {@code messageFormat}
- * @return {@code str} if not {@code null}
- * @throws NullPointerException if {@code str} is {@code null}
- * @throws IllegalArgumentException if {@code str} is empty or whitespace
- */
- public static String checkNotBlank(
- String str, String messageFormat, Object... messageArgs) {
- checkNotNull(str, messageFormat, messageArgs);
- checkArgument(Strings.isNotBlank(str), messageFormat, messageArgs);
- return str;
- }
-
-
- // Helper Code ************************************************************
-
- static String format(String messageFormat, Object... messageArgs) {
- return String.format(messageFormat, messageArgs);
- }
-
-
-}
diff --git a/src/core/com/jgoodies/common/base/Strings.java b/src/core/com/jgoodies/common/base/Strings.java
deleted file mode 100644
index 3f70f0e..0000000
--- a/src/core/com/jgoodies/common/base/Strings.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.base;
-
-
-/**
- * Provides frequently used static null-safe String testing methods .
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.7 $
- */
-public class Strings {
-
-
- protected Strings() {
- // Override default constructor; prevents direct instantiation.
- }
-
-
- // String Validations ***************************************************
-
- /**
- * Checks if the given string is whitespace, empty ("") or {@code null}.
- *
- * <pre>
- * Strings.isBlank(null) == true
- * Strings.isBlank("") == true
- * Strings.isBlank(" ") == true
- * Strings.isBlank(" abc") == false
- * Strings.isBlank("abc ") == false
- * Strings.isBlank(" abc ") == false
- * </pre>
- *
- * @param str the string to check, may be {@code null}
- * @return {@code true} if the string is whitespace, empty
- * or {@code null}
- *
- * @see #isEmpty(String)
- */
- public static boolean isBlank(String str) {
- int length;
- if (str == null || (length = str.length()) == 0) {
- return true;
- }
- for (int i = length - 1; i >= 0; i--) {
- if (!Character.isWhitespace(str.charAt(i))) {
- return false;
- }
- }
- return true;
- }
-
-
- /**
- * Checks if the given string is not empty (""),
- * not {@code null} and not whitespace only.
- *
- * <pre>
- * Strings.isNotBlank(null) == false
- * Strings.isNotBlank("") == false
- * Strings.isNotBlank(" ") == false
- * Strings.isNotBlank(" abc") == true
- * Strings.isNotBlank("abc ") == true
- * Strings.isNotBlank(" abc ") == true
- * </pre>
- *
- * @param str the string to check, may be {@code null}
- * @return {@code true} if the string is not empty
- * and not {@code null} and not whitespace only
- *
- * @see #isEmpty(String)
- */
- public static boolean isNotBlank(String str) {
- int length;
- if (str == null || (length = str.length()) == 0) {
- return false;
- }
- for (int i = length - 1; i >= 0; i--) {
- if (!Character.isWhitespace(str.charAt(i))) {
- return true;
- }
- }
- return false;
- }
-
-
- /**
- * Checks if the given string is empty ("") or {@code null}.
- *
- * <pre>
- * Strings.isEmpty(null) == true
- * Strings.isEmpty("") == true
- * Strings.isEmpty(" ") == false
- * Strings.isEmpty("Hi ") == false
- * </pre>
- *
- * @param str the string to check, may be {@code null}
- * @return {@code true} if the string is empty or {@code null}
- *
- * @see #isBlank(String)
- */
- public static boolean isEmpty(String str) {
- return str == null || str.length() == 0;
- }
-
-
- /**
- * Checks if the given string is not empty ("")
- * and not {@code null}.
- *
- * <pre>
- * Strings.isNotEmpty(null) == false
- * Strings.isNotEmpty("") == false
- * Strings.isNotEmpty(" ") == true
- * Strings.isNotEmpty("Hi") == true
- * Strings.isNotEmpty("Hi ") == true
- * </pre>
- *
- * @param str the string to check, may be {@code null}
- * @return {@code true} if the string is not empty and not {@code null}
- *
- * @see #isBlank(String)
- */
- public static boolean isNotEmpty(String str) {
- return str != null && str.length() > 0;
- }
-
-
- /**
- * Checks if the given string is {@code null}, empty (""),
- * or the first and last characters are not whitespace.
- *
- * <pre>
- * Strings.isTrimmed(null) == true
- * Strings.isTrimmed("") == true
- * Strings.isTrimmed(" ") == false
- * Strings.isTrimmed("Hi") == true
- * Strings.isTrimmed("Hi ") == false
- * Strings.isTrimmed(" Hi") == false
- * </pre>
- *
- * @param str the string to check, may be {@code null}
- * @return {@code true} if the string is {@code null}, empty,
- * or the first and last characters are not whitespace.
- *
- * @since 1.3
- */
- public static boolean isTrimmed(String str) {
- int length;
- if (str == null || (length = str.length()) == 0) {
- return true;
- }
- return !Character.isWhitespace(str.charAt(0))
- && !Character.isWhitespace(str.charAt(length-1));
- }
-
-
- /**
- * Checks if {@code str} starts with the given prefix ignoring cases.
- * {@code null} is handled safely; if both arguments are null, true
- * is returned, false otherwise.
- *
- * <pre>
- * Strings.startsWithIgnoreCase(null, null) == true
- * Strings.startsWithIgnoreCase("a", null) == false
- * Strings.startsWithIgnoreCase(null, "a") == false
- * Strings.startsWithIgnoreCase("", "") == true
- * Strings.startsWithIgnoreCase(" ", "") == true
- * Strings.startsWithIgnoreCase("John", "J") == true
- * Strings.startsWithIgnoreCase("John", "Jo") == true
- * Strings.startsWithIgnoreCase("John", "Joh") == true
- * Strings.startsWithIgnoreCase("John", "joh") == true
- * Strings.startsWithIgnoreCase("john", "Joh") == true
- * Strings.startsWithIgnoreCase("john", "joh") == true
- * Strings.startsWithIgnoreCase("John", "John") == true
- * Strings.startsWithIgnoreCase("John", "john") == true
- * Strings.startsWithIgnoreCase("John", "Jonny") == false
- * </pre>
- *
- * @param str the test string to check, may be null
- * @param prefix the prefix to check for, may be null
- * @return {@code true}, if the string starts with the prefix, ignoring cases,
- * {@code false} otherwise
- *
- * @see String#startsWith(java.lang.String)
- */
- public static boolean startsWithIgnoreCase(String str, String prefix) {
- if (str == null) {
- return prefix == null;
- }
- if (prefix == null) { // str is not null
- return false;
- }
- return str.regionMatches(true, 0, prefix, 0, prefix.length());
- }
-
-
- /**
- * Abbreviates the given string if it exceeds the given maximum length
- * by replacing its center part with an ellipsis ('…').
- * If the string is {@code null} or shorter than the limit,
- * it is returned as is.<p>
- *
- * <pre>
- * Strings.abbreviateCenter(null, 3) == null
- * Strings.abbreviateCenter("", 3) == ""
- * Strings.abbreviateCenter(" ", 3) == " "
- * Strings.abbreviateCenter("a", 3) == "a"
- * Strings.abbreviateCenter("ab", 3) == "ab"
- * Strings.abbreviateCenter("abc", 3) == "abc"
- * Strings.abbreviateCenter("abcd", 3) == "a…d"
- * Strings.abbreviateCenter("abcde", 3) == "a…e"
- * Strings.abbreviateCenter("abcde", 4) == "ab…e"
- * Strings.abbreviateCenter("abcdef", 4) == "ab…f"
- * Strings.abbreviateCenter("abcdefg", 5) == "ab…fg"
- * </pre>
- *
- * @param str the source string
- * @param maxLength the maximum length of the result string
- * @return {@code str} if its length is less than or equal to {@code maxLength},
- * an abbreviated string with length {@code maxLength} where
- * the center is replaced by an ellipsis
- */
- public static String abbreviateCenter(String str, int maxLength) {
- if (str == null) {
- return null;
- }
- final int length = str.length();
- if (length <= maxLength) {
- return str;
- }
- int headLength = maxLength / 2;
- int tailLength = maxLength - headLength - 1;
- String head = str.substring(0, headLength);
- String tail = str.substring(length - tailLength, length);
- return head + "\u2026" + tail;
- }
-
-
-}
diff --git a/src/core/com/jgoodies/common/base/SystemUtils.java b/src/core/com/jgoodies/common/base/SystemUtils.java
deleted file mode 100644
index aef7c2a..0000000
--- a/src/core/com/jgoodies/common/base/SystemUtils.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.base;
-
-import java.awt.HeadlessException;
-import java.awt.Toolkit;
-import java.util.logging.Logger;
-
-/**
- * Provides convenience behavior to determine the operating system
- * and Java version.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.11 $
- */
-public class SystemUtils {
-
- // Internal Constants *****************************************************
-
- /**
- * The {@code os.name} System Property. Operating system name.<p>
- *
- * Defaults to {@code null}, if the runtime does not have security
- * access to read this property or the property does not exist.
- */
- protected static final String OS_NAME = getSystemProperty("os.name");
-
-
- /**
- * The {@code os.version} System Property. Operating system version.<p>
- *
- * Defaults to {@code null}, if the runtime does not have security
- * access to read this property or the property does not exist.
- */
- protected static final String OS_VERSION = getSystemProperty("os.version");
-
-
- /**
- * The {@code os.name} System Property. Operating system name.<p>
- *
- * Defaults to {@code null}, if the runtime does not have security
- * access to read this property or the property does not exist.
- */
- protected static final String JAVA_VERSION = getSystemProperty("java.version");
-
-
- // Requesting the OS and OS Version ***************************************
-
- /**
- * Is true if this is Linux.
- */
- public static final boolean IS_OS_LINUX =
- startsWith(OS_NAME, "Linux") || startsWith(OS_NAME, "LINUX");
-
-
- /**
- * True if this is the Mac OS.
- */
- public static final boolean IS_OS_MAC =
- startsWith(OS_NAME, "Mac OS");
-
-
- /**
- * True if this is Solaris.
- */
- public static final boolean IS_OS_SOLARIS =
- startsWith(OS_NAME, "Solaris");
-
-
- /**
- * True if this is Windows.
- */
- public static final boolean IS_OS_WINDOWS =
- startsWith(OS_NAME, "Windows");
-
-
- /**
- * True if this is Windows 98.
- */
- public static final boolean IS_OS_WINDOWS_98 =
- startsWith(OS_NAME, "Windows 9") && startsWith(OS_VERSION, "4.1");
-
-
- /**
- * True if this is Windows ME.
- */
- public static final boolean IS_OS_WINDOWS_ME =
- startsWith(OS_NAME, "Windows") && startsWith(OS_VERSION, "4.9");
-
-
- /**
- * True if this is Windows 2000.
- */
- public static final boolean IS_OS_WINDOWS_2000 =
- startsWith(OS_NAME, "Windows") && startsWith(OS_VERSION, "5.0");
-
-
- /**
- * True if this is Windows XP.
- */
- public static final boolean IS_OS_WINDOWS_XP =
- startsWith(OS_NAME, "Windows") && startsWith(OS_VERSION, "5.1");
-
-
- /**
- * True if this is Windows Vista or Server 2008.
- */
- public static final boolean IS_OS_WINDOWS_VISTA =
- startsWith(OS_NAME, "Windows") && startsWith(OS_VERSION, "6.0");
-
-
- /**
- * True if this is Windows Vista/Server 2008/7/2008 R2.
- */
- public static final boolean IS_OS_WINDOWS_6_OR_LATER =
- startsWith(OS_NAME, "Windows") && startsWith(OS_VERSION, "6.");
-
-
- // Requesting the Java Version ********************************************
-
- /**
- * True if this is Java 6. We check for a prefix of 1.6.
- */
- public static final boolean IS_JAVA_6 =
- startsWith(JAVA_VERSION, "1.6");
-
-
- /**
- * True if this is Java 7. We check for a prefix of 1.7.
- */
- public static final boolean IS_JAVA_7 =
- startsWith(JAVA_VERSION, "1.7");
-
-
- /**
- * True if this is Java 7.x or later. We check that it's not 1.6.
- */
- public static final boolean IS_JAVA_7_OR_LATER =
- !IS_JAVA_6;
-
-
- // Visual Properties ******************************************************
-
- /**
- * True since Java 6 update 10.
- *
- * @since 1.2
- */
- public static final boolean HAS_MODERN_RASTERIZER = hasModernRasterizer();
-
-
- /**
- * True if the Windows XP Look&Feel is enabled.
- *
- * @since 1.2
- */
- public static final boolean IS_LAF_WINDOWS_XP_ENABLED = isWindowsXPLafEnabled();
-
-
- /**
- * Is true if this environment's default toolkit reports a screen resolution
- * below 120 dpi.<p>
- *
- * @since 1.2
- */
- public static final boolean IS_LOW_RESOLUTION = isLowResolution();
-
-
- // Internal ***************************************************************
-
- private static final String AWT_UTILITIES_CLASS_NAME =
- "com.sun.awt.AWTUtilities";
-
-
- protected SystemUtils() {
- // Override default constructor; prevents instantiation.
- }
-
-
- /**
- * Tries to look up the System property for the given key.
- * In untrusted environments this may throw a SecurityException.
- * In this case we catch the exception and answer an empty string.
- *
- * @param key the name of the system property
- * @return the system property's String value, or {@code null} if there's
- * no such value, or an empty String when
- * a SecurityException has been caught
- */
- protected static String getSystemProperty(String key) {
- try {
- return System.getProperty(key);
- } catch (SecurityException e) {
- Logger.getLogger(SystemUtils.class.getName()).warning(
- "Can't access the System property " + key + ".");
- return "";
- }
- }
-
-
- protected static boolean startsWith(String str, String prefix) {
- return str != null && str.startsWith(prefix);
- }
-
-
- /**
- * Checks and answers whether this Java runtime has a modern rasterizer
- * or not. More precisely this method aims to understand whether a good
- * or poor rasterizer is used. Sun's Java runtime has improved its
- * rasterizer in the 1.6 N series after build 12.
- *
- * @return {@code true} if the AWTUtilities class is available,
- * {@code false} if this class is not in the class path.
- */
- private static boolean hasModernRasterizer() {
- try {
- Class.forName(AWT_UTILITIES_CLASS_NAME);
- return true;
- } catch (ClassNotFoundException e) {
- return false;
- }
- }
-
-
- /**
- * Checks and answers whether the Windows XP style is enabled.
- * This method is intended to be called only if a Windows look&feel
- * is about to be installed or already active in the UIManager.
- * The XP style of the Windows look&feel is enabled by default on
- * Windows XP platforms since the J2SE 1.4.2; it can be disabled either
- * in the Windows desktop as well as in the Java runtime by setting
- * a System property.<p>
- *
- * First checks the platform, platform version and Java version. Then
- * checks whether the desktop property <tt>win.xpstyle.themeActive</tt>
- * is set or not.
- *
- * @return true if the Windows XP style is enabled
- */
- private static boolean isWindowsXPLafEnabled() {
- return IS_OS_WINDOWS
- && Boolean.TRUE.equals(Toolkit.getDefaultToolkit().
- getDesktopProperty("win.xpstyle.themeActive"))
- && getSystemProperty("swing.noxp") == null;
- }
-
-
- private static boolean isLowResolution() {
- try {
- return Toolkit.getDefaultToolkit().getScreenResolution() < 120;
- } catch (HeadlessException e) {
- return true;
- }
- }
-
-
-}
diff --git a/src/core/com/jgoodies/common/base/package.html b/src/core/com/jgoodies/common/base/package.html
deleted file mode 100644
index 939e393..0000000
--- a/src/core/com/jgoodies/common/base/package.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
- Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- o Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- o 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.
-
- o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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.
-
- JavaDoc uses all text between the "body" tags.
- The first sentence is used as short description.
--->
-</head>
-<body bgcolor="white">
-
-Consists of frequently used utility classes for general Java code.
-
-<!--
-<h2>Package Specification</h2>
-
-##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT #####
-<ul>
- <li><a href="">##### REFER TO ANY FRAMEMAKER SPECIFICATION HERE #####</a>
-</ul>
--->
-
-
-</body>
-</html>
diff --git a/src/core/com/jgoodies/common/bean/AbstractBean.java b/src/core/com/jgoodies/common/bean/AbstractBean.java
deleted file mode 100644
index 754474c..0000000
--- a/src/core/com/jgoodies/common/bean/AbstractBean.java
+++ /dev/null
@@ -1,794 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.bean;
-
-import java.beans.*;
-import java.io.Serializable;
-
-/**
- * An abstract superclass that minimizes the effort required to provide
- * change support for bound and constrained Bean properties.
- * This class follows the conventions and recommendations as described
- * in the <a href="http://java.sun.com/products/javabeans/docs/spec.html"
- * >Java Bean Specification</a>.<p>
- *
- * This class uses the standard {@link PropertyChangeSupport} to notify
- * registered listeners about changes. Subclasses can use different change
- * support implementations by overriding {@code createPropertyChangeSupport},
- * for example to ensure that notifications are sent in the Event dispatch
- * thread, or to compare old and new values with {@code ==} not {@code equals}.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.10 $
- *
- * @see PropertyChangeEvent
- * @see PropertyChangeListener
- * @see PropertyChangeSupport
- * @see VetoableChangeListener
- * @see VetoableChangeSupport
- */
-public abstract class AbstractBean implements Serializable, ObservableBean2 {
-
-
- /**
- * If any{@code PropertyChangeListeners} have been registered,
- * the {@code changeSupport} field describes them.
- *
- * @see #addPropertyChangeListener(PropertyChangeListener)
- * @see #addPropertyChangeListener(String, PropertyChangeListener)
- * @see #removePropertyChangeListener(PropertyChangeListener)
- * @see #removePropertyChangeListener(String, PropertyChangeListener)
- * @see PropertyChangeSupport
- */
- protected PropertyChangeSupport changeSupport;
-
-
- /**
- * If any {@code VetoableChangeListeners} have been registered,
- * the {@code vetoSupport} field describes them.
- *
- * @see #addVetoableChangeListener(VetoableChangeListener)
- * @see #addVetoableChangeListener(String, VetoableChangeListener)
- * @see #removeVetoableChangeListener(VetoableChangeListener)
- * @see #removeVetoableChangeListener(String, VetoableChangeListener)
- * @see #fireVetoableChange(String, Object, Object)
- */
- private VetoableChangeSupport vetoSupport;
-
-
- // Managing Property Change Listeners **********************************
-
- /**
- * Adds a PropertyChangeListener to the listener list. The listener is
- * registered for all bound properties of this class.<p>
- *
- * If listener is {@code null}, no exception is thrown
- * and no action is performed.
- *
- * @param listener the PropertyChangeListener to be added
- *
- * @see #removePropertyChangeListener(PropertyChangeListener)
- * @see #removePropertyChangeListener(String, PropertyChangeListener)
- * @see #addPropertyChangeListener(String, PropertyChangeListener)
- * @see #getPropertyChangeListeners()
- */
- @Override
- public final synchronized void addPropertyChangeListener(
- PropertyChangeListener listener) {
- if (listener == null) {
- return;
- }
- if (changeSupport == null) {
- changeSupport = createPropertyChangeSupport(this);
- }
- changeSupport.addPropertyChangeListener(listener);
- }
-
-
- /**
- * Removes a PropertyChangeListener from the listener list. This method
- * should be used to remove PropertyChangeListeners that were registered
- * for all bound properties of this class.<p>
- *
- * If listener is {@code null}, no exception is thrown and no action is performed.
- *
- * @param listener the PropertyChangeListener to be removed
- * @see #addPropertyChangeListener(PropertyChangeListener)
- * @see #addPropertyChangeListener(String, PropertyChangeListener)
- * @see #removePropertyChangeListener(String, PropertyChangeListener)
- * @see #getPropertyChangeListeners()
- */
- @Override
- public final synchronized void removePropertyChangeListener(
- PropertyChangeListener listener) {
- if (listener == null || changeSupport == null) {
- return;
- }
- changeSupport.removePropertyChangeListener(listener);
- }
-
-
- /**
- * Adds a PropertyChangeListener to the listener list for a specific
- * property. The specified property may be user-defined.<p>
- *
- * Note that if this Model is inheriting a bound property, then no event
- * will be fired in response to a change in the inherited property.<p>
- *
- * If listener is {@code null}, no exception is thrown and no action is performed.
- *
- * @param propertyName one of the property names listed above
- * @param listener the PropertyChangeListener to be added
- *
- * @see #removePropertyChangeListener(String, PropertyChangeListener)
- * @see #addPropertyChangeListener(String, PropertyChangeListener)
- * @see #getPropertyChangeListeners(String)
- */
- @Override
- public final synchronized void addPropertyChangeListener(
- String propertyName,
- PropertyChangeListener listener) {
- if (listener == null) {
- return;
- }
- if (changeSupport == null) {
- changeSupport = createPropertyChangeSupport(this);
- }
- changeSupport.addPropertyChangeListener(propertyName, listener);
- }
-
-
- /**
- * Removes a PropertyChangeListener from the listener list for a specific
- * property. This method should be used to remove PropertyChangeListeners
- * that were registered for a specific bound property.<p>
- *
- * If listener is {@code null}, no exception is thrown and no action is performed.
- *
- * @param propertyName a valid property name
- * @param listener the PropertyChangeListener to be removed
- *
- * @see #addPropertyChangeListener(String, PropertyChangeListener)
- * @see #removePropertyChangeListener(PropertyChangeListener)
- * @see #getPropertyChangeListeners(String)
- */
- @Override
- public final synchronized void removePropertyChangeListener(
- String propertyName,
- PropertyChangeListener listener) {
- if (listener == null || changeSupport == null) {
- return;
- }
- changeSupport.removePropertyChangeListener(propertyName, listener);
- }
-
-
- // Managing Vetoable Change Listeners ***********************************
-
- /**
- * Adds a VetoableChangeListener to the listener list. The listener is
- * registered for all bound properties of this class.<p>
- *
- * If listener is {@code null}, no exception is thrown and no action is
- * performed.
- *
- * @param listener the VetoableChangeListener to be added
- *
- * @see #removeVetoableChangeListener(String, VetoableChangeListener)
- * @see #addVetoableChangeListener(String, VetoableChangeListener)
- * @see #getVetoableChangeListeners()
- */
- public final synchronized void addVetoableChangeListener(
- VetoableChangeListener listener) {
- if (listener == null) {
- return;
- }
- if (vetoSupport == null) {
- vetoSupport = new VetoableChangeSupport(this);
- }
- vetoSupport.addVetoableChangeListener(listener);
- }
-
-
- /**
- * Removes a VetoableChangeListener from the listener list. This method
- * should be used to remove VetoableChangeListeners that were registered
- * for all bound properties of this class.<p>
- *
- * If listener is {@code null}, no exception is thrown and no action is performed.
- *
- * @param listener the VetoableChangeListener to be removed
- *
- * @see #addVetoableChangeListener(String, VetoableChangeListener)
- * @see #removeVetoableChangeListener(String, VetoableChangeListener)
- * @see #getVetoableChangeListeners()
- */
- public final synchronized void removeVetoableChangeListener(
- VetoableChangeListener listener) {
- if (listener == null || vetoSupport == null) {
- return;
- }
- vetoSupport.removeVetoableChangeListener(listener);
- }
-
-
- /**
- * Adds a VetoableChangeListener to the listener list for a specific
- * property. The specified property may be user-defined.<p>
- *
- * Note that if this Model is inheriting a bound property, then no event
- * will be fired in response to a change in the inherited property.<p>
- *
- * If listener is {@code null}, no exception is thrown and no action is performed.
- *
- * @param propertyName one of the property names listed above
- * @param listener the VetoableChangeListener to be added
- *
- * @see #removeVetoableChangeListener(String, VetoableChangeListener)
- * @see #addVetoableChangeListener(String, VetoableChangeListener)
- * @see #getVetoableChangeListeners(String)
- */
- public final synchronized void addVetoableChangeListener(
- String propertyName,
- VetoableChangeListener listener) {
- if (listener == null) {
- return;
- }
- if (vetoSupport == null) {
- vetoSupport = new VetoableChangeSupport(this);
- }
- vetoSupport.addVetoableChangeListener(propertyName, listener);
- }
-
-
- /**
- * Removes a VetoableChangeListener from the listener list for a specific
- * property. This method should be used to remove VetoableChangeListeners
- * that were registered for a specific bound property.<p>
- *
- * If listener is {@code null}, no exception is thrown and no action is performed.
- *
- * @param propertyName a valid property name
- * @param listener the VetoableChangeListener to be removed
- *
- * @see #addVetoableChangeListener(String, VetoableChangeListener)
- * @see #removeVetoableChangeListener(VetoableChangeListener)
- * @see #getVetoableChangeListeners(String)
- */
- public final synchronized void removeVetoableChangeListener(
- String propertyName,
- VetoableChangeListener listener) {
- if (listener == null || vetoSupport == null) {
- return;
- }
- vetoSupport.removeVetoableChangeListener(propertyName, listener);
- }
-
-
- // Requesting Listener Sets ***********************************************
-
- /**
- * Returns an array of all the property change listeners
- * registered on this component.
- *
- * @return all of this component's {@code PropertyChangeListener}s
- * or an empty array if no property change
- * listeners are currently registered
- *
- * @see #addPropertyChangeListener(PropertyChangeListener)
- * @see #removePropertyChangeListener(PropertyChangeListener)
- * @see #getPropertyChangeListeners(String)
- * @see PropertyChangeSupport#getPropertyChangeListeners()
- */
- @Override
- public final synchronized PropertyChangeListener[] getPropertyChangeListeners() {
- if (changeSupport == null) {
- return new PropertyChangeListener[0];
- }
- return changeSupport.getPropertyChangeListeners();
- }
-
-
- /**
- * Returns an array of all the listeners which have been associated
- * with the named property.
- *
- * @param propertyName the name of the property to lookup listeners
- * @return all of the {@code PropertyChangeListeners} associated with
- * the named property or an empty array if no listeners have
- * been added
- *
- * @see #addPropertyChangeListener(String, PropertyChangeListener)
- * @see #removePropertyChangeListener(String, PropertyChangeListener)
- * @see #getPropertyChangeListeners()
- */
- @Override
- public final synchronized PropertyChangeListener[] getPropertyChangeListeners(String propertyName) {
- if (changeSupport == null) {
- return new PropertyChangeListener[0];
- }
- return changeSupport.getPropertyChangeListeners(propertyName);
- }
-
-
- /**
- * Returns an array of all the property change listeners
- * registered on this component.
- *
- * @return all of this component's {@code VetoableChangeListener}s
- * or an empty array if no property change
- * listeners are currently registered
- *
- * @see #addVetoableChangeListener(VetoableChangeListener)
- * @see #removeVetoableChangeListener(VetoableChangeListener)
- * @see #getVetoableChangeListeners(String)
- * @see VetoableChangeSupport#getVetoableChangeListeners()
- */
- public final synchronized VetoableChangeListener[] getVetoableChangeListeners() {
- if (vetoSupport == null) {
- return new VetoableChangeListener[0];
- }
- return vetoSupport.getVetoableChangeListeners();
- }
-
-
- /**
- * Returns an array of all the listeners which have been associated
- * with the named property.
- *
- * @param propertyName the name of the property to lookup listeners
- * @return all of the {@code VetoableChangeListeners} associated with
- * the named property or an empty array if no listeners have
- * been added
- *
- * @see #addVetoableChangeListener(String, VetoableChangeListener)
- * @see #removeVetoableChangeListener(String, VetoableChangeListener)
- * @see #getVetoableChangeListeners()
- */
- public final synchronized VetoableChangeListener[] getVetoableChangeListeners(String propertyName) {
- if (vetoSupport == null) {
- return new VetoableChangeListener[0];
- }
- return vetoSupport.getVetoableChangeListeners(propertyName);
- }
-
-
- /**
- * Creates and returns a PropertyChangeSupport for the given bean.
- * Invoked by the first call to {@link #addPropertyChangeListener}
- * when lazily creating the sole change support instance used throughout
- * this bean.<p>
- *
- * This default implementation creates a {@code PropertyChangeSupport}.
- * Subclasses may override to return other change support implementations.
- * For example to ensure that listeners are notified in the Event dispatch
- * thread (EDT change support).
- * The JGoodies Binding uses an extended change support that allows
- * to configure whether the old and new value are compared with
- * {@code ==} or {@code equals}.
- *
- * @param bean the bean to create a change support for
- * @return the new change support
- */
- protected PropertyChangeSupport createPropertyChangeSupport(final Object bean) {
- return new PropertyChangeSupport(bean);
- }
-
-
- // Firing Changes for Bound Properties **********************************
-
- /**
- * General support for reporting bound property changes. Sends the given
- * PropertyChangeEvent to any registered PropertyChangeListener.<p>
- *
- * Most bean setters will invoke the fireXXX methods that get
- * a property name and the old and new value. However some frameworks
- * and setters may prefer to use this general method.
- * Also, this method allows to fire IndexedPropertyChangeEvents
- * that have been introduced in Java 5.
- *
- * @param event describes the property change
- *
- * @since 1.3
- */
- protected final void firePropertyChange(PropertyChangeEvent event) {
- PropertyChangeSupport aChangeSupport = this.changeSupport;
- if (aChangeSupport == null) {
- return;
- }
- aChangeSupport.firePropertyChange(event);
- }
-
-
- /**
- * Support for reporting bound property changes for Object properties.
- * This method can be called when a bound property has changed and it will
- * send the appropriate PropertyChangeEvent to any registered
- * PropertyChangeListeners.
- *
- * @param propertyName the property whose value has changed
- * @param oldValue the property's previous value
- * @param newValue the property's new value
- */
- protected final void firePropertyChange(String propertyName,
- Object oldValue,
- Object newValue) {
- PropertyChangeSupport aChangeSupport = this.changeSupport;
- if (aChangeSupport == null) {
- return;
- }
- aChangeSupport.firePropertyChange(propertyName, oldValue, newValue);
- }
-
-
- /**
- * Support for reporting bound property changes for boolean properties.
- * This method can be called when a bound property has changed and it will
- * send the appropriate PropertyChangeEvent to any registered
- * PropertyChangeListeners.
- *
- * @param propertyName the property whose value has changed
- * @param oldValue the property's previous value
- * @param newValue the property's new value
- */
- protected final void firePropertyChange(String propertyName,
- boolean oldValue,
- boolean newValue) {
- PropertyChangeSupport aChangeSupport = this.changeSupport;
- if (aChangeSupport == null) {
- return;
- }
- aChangeSupport.firePropertyChange(propertyName, oldValue, newValue);
- }
-
-
- /**
- * Support for reporting bound property changes for integer properties.
- * This method can be called when a bound property has changed and it will
- * send the appropriate PropertyChangeEvent to any registered
- * PropertyChangeListeners.
- *
- * @param propertyName the property whose value has changed
- * @param oldValue the property's previous value
- * @param newValue the property's new value
- */
- protected final void firePropertyChange(String propertyName,
- double oldValue,
- double newValue) {
- firePropertyChange(propertyName, Double.valueOf(oldValue), Double.valueOf(newValue));
- }
-
-
- /**
- * Support for reporting bound property changes for integer properties.
- * This method can be called when a bound property has changed and it will
- * send the appropriate PropertyChangeEvent to any registered
- * PropertyChangeListeners.
- *
- * @param propertyName the property whose value has changed
- * @param oldValue the property's previous value
- * @param newValue the property's new value
- */
- protected final void firePropertyChange(String propertyName,
- float oldValue,
- float newValue) {
- firePropertyChange(propertyName, Float.valueOf(oldValue), Float.valueOf(newValue));
- }
-
-
- /**
- * Support for reporting bound property changes for integer properties.
- * This method can be called when a bound property has changed and it will
- * send the appropriate PropertyChangeEvent to any registered
- * PropertyChangeListeners.
- *
- * @param propertyName the property whose value has changed
- * @param oldValue the property's previous value
- * @param newValue the property's new value
- */
- protected final void firePropertyChange(String propertyName,
- int oldValue,
- int newValue) {
- PropertyChangeSupport aChangeSupport = this.changeSupport;
- if (aChangeSupport == null) {
- return;
- }
- aChangeSupport.firePropertyChange(propertyName,
- Integer.valueOf(oldValue), Integer.valueOf(newValue));
- }
-
-
- /**
- * Support for reporting bound property changes for integer properties.
- * This method can be called when a bound property has changed and it will
- * send the appropriate PropertyChangeEvent to any registered
- * PropertyChangeListeners.
- *
- * @param propertyName the property whose value has changed
- * @param oldValue the property's previous value
- * @param newValue the property's new value
- */
- protected final void firePropertyChange(String propertyName,
- long oldValue,
- long newValue) {
- firePropertyChange(propertyName, Long.valueOf(oldValue), Long.valueOf(newValue));
- }
-
- /**
- * Indicates that an arbitrary set of bound properties have changed.
- * Sends a PropertyChangeEvent with property name, old and new value
- * set to {@code null} to any registered PropertyChangeListeners.
- *
- * @see java.beans.PropertyChangeEvent
- *
- * @since 1.0.3
- */
- protected final void fireMultiplePropertiesChanged() {
- firePropertyChange(null, null, null);
- }
-
-
- // Firing Indexed Changes *************************************************
-
- /**
- * Report a bound indexed property update to any registered listeners.<p>
- *
- * No event is fired if old and new values are equal and non-null.
- *
- * @param propertyName The programmatic name of the property that
- * was changed.
- * @param index index of the property element that was changed.
- * @param oldValue The old value of the property.
- * @param newValue The new value of the property.
- *
- * @since 2.0
- */
- protected final void fireIndexedPropertyChange(String propertyName, int index,
- Object oldValue, Object newValue) {
- PropertyChangeSupport aChangeSupport = this.changeSupport;
- if (aChangeSupport == null) {
- return;
- }
- aChangeSupport.fireIndexedPropertyChange(propertyName, index,
- oldValue, newValue);
- }
-
-
- /**
- * Report an {@code int} bound indexed property update
- * to any registered listeners.<p>
- *
- * No event is fired if old and new values are equal and non-null.<p>
- *
- * This is merely a convenience wrapper around the more general
- * fireIndexedPropertyChange method which takes Object values.
- *
- * @param propertyName The programmatic name of the property that
- * was changed.
- * @param index index of the property element that was changed.
- * @param oldValue The old value of the property.
- * @param newValue The new value of the property.
- *
- * @since 2.0
- */
- protected final void fireIndexedPropertyChange(String propertyName, int index,
- int oldValue, int newValue) {
- if (oldValue == newValue) {
- return;
- }
- fireIndexedPropertyChange(propertyName, index,
- Integer.valueOf(oldValue),
- Integer.valueOf(newValue));
- }
-
-
- /**
- * Report a {@code boolean} bound indexed property update
- * to any registered listeners.<p>
- *
- * No event is fired if old and new values are equal and non-null.<p>
- *
- * This is merely a convenience wrapper around the more general
- * fireIndexedPropertyChange method which takes Object values.
- *
- * @param propertyName The programmatic name of the property that
- * was changed.
- * @param index index of the property element that was changed.
- * @param oldValue The old value of the property.
- * @param newValue The new value of the property.
- *
- * @since 2.0
- */
- protected final void fireIndexedPropertyChange(String propertyName, int index,
- boolean oldValue, boolean newValue) {
- if (oldValue == newValue) {
- return;
- }
- fireIndexedPropertyChange(propertyName, index,
- Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
- }
-
-
- // Firing Changes for Constrained Properties ****************************
-
- /**
- * General support for reporting constrained property changes. Sends the
- * given PropertyChangeEvent to any registered PropertyChangeListener.<p>
- *
- * Most bean setters will invoke the fireXXX methods that get
- * a property name and the old and new value. However some frameworks
- * and setters may prefer to use this general method.
- * Also, this method allows to fire IndexedPropertyChangeEvents
- * that have been introduced in Java 5.
- *
- * @param event describes the property change
- * @throws PropertyVetoException if a constrained property change is rejected
- *
- * @since 1.3
- */
- protected final void fireVetoableChange(PropertyChangeEvent event)
- throws PropertyVetoException {
- VetoableChangeSupport aVetoSupport = this.vetoSupport;
- if (aVetoSupport == null) {
- return;
- }
- aVetoSupport.fireVetoableChange(event);
- }
-
-
- /**
- * Support for reporting changes for constrained Object properties. This
- * method can be called before a constrained property will be changed and
- * it will send the appropriate PropertyChangeEvent to any registered
- * VetoableChangeListeners.
- *
- * @param propertyName the property whose value has changed
- * @param oldValue the property's previous value
- * @param newValue the property's new value
- * @throws PropertyVetoException if a constrained property change is rejected
- */
- protected final void fireVetoableChange(String propertyName,
- Object oldValue,
- Object newValue)
- throws PropertyVetoException {
- VetoableChangeSupport aVetoSupport = this.vetoSupport;
- if (aVetoSupport == null) {
- return;
- }
- aVetoSupport.fireVetoableChange(propertyName, oldValue, newValue);
- }
-
-
- /**
- * Support for reporting changes for constrained boolean properties. This
- * method can be called before a constrained property will be changed and
- * it will send the appropriate PropertyChangeEvent to any registered
- * VetoableChangeListeners.
- *
- * @param propertyName the property whose value has changed
- * @param oldValue the property's previous value
- * @param newValue the property's new value
- * @throws PropertyVetoException if a constrained property change is rejected
- */
- protected final void fireVetoableChange(String propertyName,
- boolean oldValue,
- boolean newValue)
- throws PropertyVetoException {
- VetoableChangeSupport aVetoSupport = this.vetoSupport;
- if (aVetoSupport == null) {
- return;
- }
- aVetoSupport.fireVetoableChange(propertyName, oldValue, newValue);
- }
-
-
- /**
- * Support for reporting changes for constrained integer properties. This
- * method can be called before a constrained property will be changed and
- * it will send the appropriate PropertyChangeEvent to any registered
- * VetoableChangeListeners.
- *
- * @param propertyName the property whose value has changed
- * @param oldValue the property's previous value
- * @param newValue the property's new value
- * @throws PropertyVetoException if a constrained property change is rejected
- */
- protected final void fireVetoableChange(String propertyName,
- double oldValue,
- double newValue)
- throws PropertyVetoException {
- fireVetoableChange(propertyName, Double.valueOf(oldValue), Double.valueOf(newValue));
- }
-
-
- /**
- * Support for reporting changes for constrained integer properties. This
- * method can be called before a constrained property will be changed and
- * it will send the appropriate PropertyChangeEvent to any registered
- * VetoableChangeListeners.
- *
- * @param propertyName the property whose value has changed
- * @param oldValue the property's previous value
- * @param newValue the property's new value
- * @throws PropertyVetoException if a constrained property change is rejected
- */
- protected final void fireVetoableChange(String propertyName,
- int oldValue,
- int newValue)
- throws PropertyVetoException {
- VetoableChangeSupport aVetoSupport = this.vetoSupport;
- if (aVetoSupport == null) {
- return;
- }
- aVetoSupport.fireVetoableChange(propertyName,
- Integer.valueOf(oldValue), Integer.valueOf(newValue));
- }
-
-
- /**
- * Support for reporting changes for constrained integer properties. This
- * method can be called before a constrained property will be changed and
- * it will send the appropriate PropertyChangeEvent to any registered
- * VetoableChangeListeners.
- *
- * @param propertyName the property whose value has changed
- * @param oldValue the property's previous value
- * @param newValue the property's new value
- * @throws PropertyVetoException if a constrained property change is rejected
- */
- protected final void fireVetoableChange(String propertyName,
- float oldValue,
- float newValue)
- throws PropertyVetoException {
- fireVetoableChange(propertyName, Float.valueOf(oldValue), Float.valueOf(newValue));
- }
-
-
- /**
- * Support for reporting changes for constrained integer properties. This
- * method can be called before a constrained property will be changed and
- * it will send the appropriate PropertyChangeEvent to any registered
- * VetoableChangeListeners.
- *
- * @param propertyName the property whose value has changed
- * @param oldValue the property's previous value
- * @param newValue the property's new value
- * @throws PropertyVetoException if a constrained property change is rejected
- */
- protected final void fireVetoableChange(String propertyName,
- long oldValue,
- long newValue)
- throws PropertyVetoException {
- fireVetoableChange(propertyName, Long.valueOf(oldValue), Long.valueOf(newValue));
- }
-
-
-}
diff --git a/src/core/com/jgoodies/common/bean/ObservableBean.java b/src/core/com/jgoodies/common/bean/ObservableBean.java
deleted file mode 100644
index f6e350c..0000000
--- a/src/core/com/jgoodies/common/bean/ObservableBean.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2002-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.bean;
-
-import java.beans.PropertyChangeListener;
-
-/**
- * Describes objects that provide bound properties as specified in the
- * <a href="http://java.sun.com/products/javabeans/docs/spec.html">Java
- * Bean Specification</a>.
- * This interface is primarily intended to ensure compile-time safety
- * for beans that shall be observed.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.3 $
- *
- * @see PropertyChangeListener
- * @see java.beans.PropertyChangeEvent
- * @see java.beans.PropertyChangeSupport
- */
-public interface ObservableBean {
-
-
- /**
- * Adds the given PropertyChangeListener to the listener list.
- * The listener is registered for all bound properties of this class.
- *
- * @param listener the PropertyChangeListener to be added
- *
- * @see #removePropertyChangeListener(PropertyChangeListener)
- */
- void addPropertyChangeListener(PropertyChangeListener listener);
-
-
- /**
- * Removes the given PropertyChangeListener from the listener list.
- * This method should be used to remove PropertyChangeListeners that were
- * registered for all bound properties of this class.
- *
- * @param listener the PropertyChangeListener to be removed
- *
- * @see #addPropertyChangeListener(PropertyChangeListener)
- */
- void removePropertyChangeListener(PropertyChangeListener listener);
-
-
-}
diff --git a/src/core/com/jgoodies/common/bean/ObservableBean2.java b/src/core/com/jgoodies/common/bean/ObservableBean2.java
deleted file mode 100644
index 95abfda..0000000
--- a/src/core/com/jgoodies/common/bean/ObservableBean2.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 2002-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.bean;
-
-import java.beans.PropertyChangeListener;
-
-/**
- * In addition to its super interface ObservableBean, this interface
- * describes the optional support for registering PropertyChangeListeners
- * for an individual property name.
- * This interface is primarily intended to ensure compile-time safety
- * for beans that shall be observed.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.4 $
- *
- * @see PropertyChangeListener
- * @see java.beans.PropertyChangeEvent
- * @see java.beans.PropertyChangeSupport
- */
-public interface ObservableBean2 extends ObservableBean {
-
-
- /**
- * Adds a PropertyChangeListener to the listener list for a specific
- * property. The specified property may be user-defined.<p>
- *
- * Note that if this bean is inheriting a bound property, then no event
- * will be fired in response to a change in the inherited property.<p>
- *
- * If listener is null, no exception is thrown and no action is performed.
- *
- * @param propertyName one of the property names listed above
- * @param listener the PropertyChangeListener to be added
- *
- * @see #removePropertyChangeListener(PropertyChangeListener)
- * @see #removePropertyChangeListener(String, PropertyChangeListener)
- * @see #addPropertyChangeListener(PropertyChangeListener)
- * @see #getPropertyChangeListeners(String)
- */
- void addPropertyChangeListener(String propertyName, PropertyChangeListener listener);
-
-
- /**
- * Removes a PropertyChangeListener from the listener list for a specific
- * property. This method should be used to remove PropertyChangeListeners
- * that were registered for a specific bound property.<p>
- *
- * If listener is null, no exception is thrown and no action is performed.
- *
- * @param propertyName a valid property name
- * @param listener the PropertyChangeListener to be removed
- *
- * @see #addPropertyChangeListener(PropertyChangeListener)
- * @see #addPropertyChangeListener(String, PropertyChangeListener)
- * @see #removePropertyChangeListener(PropertyChangeListener)
- * @see #getPropertyChangeListeners(String)
- */
- void removePropertyChangeListener(String propertyName, PropertyChangeListener listener);
-
-
- /**
- * Returns an array of all the property change listeners
- * registered on this component.
- *
- * @return all of this component's {@code PropertyChangeListener}s
- * or an empty array if no property change
- * listeners are currently registered
- *
- * @see #addPropertyChangeListener(PropertyChangeListener)
- * @see #removePropertyChangeListener(PropertyChangeListener)
- * @see #getPropertyChangeListeners(String)
- * @see java.beans.PropertyChangeSupport#getPropertyChangeListeners()
- */
- PropertyChangeListener[] getPropertyChangeListeners();
-
-
- /**
- * Returns an array of all the listeners which have been associated
- * with the named property.
- *
- * @param propertyName the name of the property to lookup listeners
- * @return all of the {@code PropertyChangeListeners} associated with
- * the named property or an empty array if no listeners have
- * been added
- *
- * @see #addPropertyChangeListener(String, PropertyChangeListener)
- * @see #removePropertyChangeListener(String, PropertyChangeListener)
- * @see #getPropertyChangeListeners()
- */
- PropertyChangeListener[] getPropertyChangeListeners(String propertyName);
-
-
-}
diff --git a/src/core/com/jgoodies/common/bean/package.html b/src/core/com/jgoodies/common/bean/package.html
deleted file mode 100644
index 62f7871..0000000
--- a/src/core/com/jgoodies/common/bean/package.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
- Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- o Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- o 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.
-
- o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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.
-
- JavaDoc uses all text between the "body" tags.
- The first sentence is used as short description.
--->
-</head>
-<body bgcolor="white">
-
-Consists of classes for working with Java Beans.
-
-<!--
-<h2>Package Specification</h2>
-
-##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT #####
-<ul>
- <li><a href="">##### REFER TO ANY FRAMEMAKER SPECIFICATION HERE #####</a>
-</ul>
--->
-
-
-</body>
-</html>
diff --git a/src/core/com/jgoodies/common/collect/ArrayListModel.java b/src/core/com/jgoodies/common/collect/ArrayListModel.java
deleted file mode 100644
index dea6eeb..0000000
--- a/src/core/com/jgoodies/common/collect/ArrayListModel.java
+++ /dev/null
@@ -1,430 +0,0 @@
-/*
- * Copyright (c) 2002-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.collect;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-import javax.swing.event.EventListenerList;
-import javax.swing.event.ListDataEvent;
-import javax.swing.event.ListDataListener;
-
-/**
- * Adds {@link javax.swing.ListModel} capabilities to its superclass.
- * It allows to observe changes in the content and structure. Useful for
- * Lists that are bound to list views such as JList, JComboBox and JTable.<p>
- *
- * This class should be be final and it will be marked final in a future
- * version, if its subclass in the JGoodies Binding has been removed.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.6 $
- *
- * @see ObservableList
- * @see LinkedListModel
- *
- * @param <E> the type of the list elements
- */
-public class ArrayListModel<E> extends ArrayList<E> implements ObservableList<E> {
-
- private static final long serialVersionUID = -6165677201152015546L;
-
- // Instance Creation ******************************************************
-
- /**
- * Constructs an empty list with an initial capacity of ten.
- */
- public ArrayListModel() {
- this(10);
- }
-
- /**
- * Constructs an empty list with the specified initial capacity.
- *
- * @param initialCapacity the initial capacity of the list.
- * @throws IllegalArgumentException if the specified initial capacity
- * is negative
- */
- public ArrayListModel(int initialCapacity) {
- super(initialCapacity);
- }
-
-
- /**
- * Constructs a list containing the elements of the specified collection,
- * in the order they are returned by the collection's iterator.
- * The {@code ArrayListModel} instance has an initial capacity of
- * 110% the size of the specified collection.
- *
- * @param c the collection whose elements are to be placed into this list.
- * @throws NullPointerException if the specified collection is
- * {@code null}
- */
- public ArrayListModel(Collection<? extends E> c) {
- super(c);
- }
-
-
- // Overriding Superclass Behavior *****************************************
-
- @Override
- public final void add(int index, E element) {
- super.add(index, element);
- fireIntervalAdded(index, index);
- }
-
-
- @Override
- public final boolean add(E e) {
- int newIndex = size();
- super.add(e);
- fireIntervalAdded(newIndex, newIndex);
- return true;
- }
-
-
- @Override
- public final boolean addAll(int index, Collection<? extends E> c) {
- boolean changed = super.addAll(index, c);
- if (changed) {
- int lastIndex = index + c.size() - 1;
- fireIntervalAdded(index, lastIndex);
- }
- return changed;
- }
-
-
- @Override
- public final boolean addAll(Collection<? extends E> c) {
- int firstIndex = size();
- boolean changed = super.addAll(c);
- if (changed) {
- int lastIndex = firstIndex + c.size() - 1;
- fireIntervalAdded(firstIndex, lastIndex);
- }
- return changed;
- }
-
-
- /**
- * Removes from this collection all of its elements that are contained in
- * the specified collection (optional operation). <p>
- *
- * This implementation iterates over this collection, checking each
- * element returned by the iterator in turn to see if it's contained
- * in the specified collection. If it's so contained, it's removed from
- * this collection with the iterator's <tt>remove</tt> method.<p>
- *
- * Note that this implementation will throw an
- * <tt>UnsupportedOperationException</tt> if the iterator returned by the
- * <tt>iterator</tt> method does not implement the <tt>remove</tt> method
- * and this collection contains one or more elements in common with the
- * specified collection.
- *
- * @param c elements to be removed from this collection.
- * @return <tt>true</tt> if this collection changed as a result of the
- * call.
- * @throws UnsupportedOperationException if the <tt>removeAll</tt> method
- * is not supported by this collection.
- * @throws NullPointerException if the specified collection is null.
- *
- * @see #remove(Object)
- * @see #contains(Object)
- */
- @Override
- public boolean removeAll(Collection<?> c) {
- boolean modified = false;
- Iterator<?> e = iterator();
- while (e.hasNext()) {
- if (c.contains(e.next())) {
- e.remove();
- modified = true;
- }
- }
- return modified;
- }
-
-
- /**
- * Retains only the elements in this collection that are contained in the
- * specified collection (optional operation). In other words, removes
- * from this collection all of its elements that are not contained in the
- * specified collection. <p>
- *
- * This implementation iterates over this collection, checking each
- * element returned by the iterator in turn to see if it's contained
- * in the specified collection. If it's not so contained, it's removed
- * from this collection with the iterator's <tt>remove</tt> method.<p>
- *
- * Note that this implementation will throw an
- * <tt>UnsupportedOperationException</tt> if the iterator returned by the
- * <tt>iterator</tt> method does not implement the <tt>remove</tt> method
- * and this collection contains one or more elements not present in the
- * specified collection.
- *
- * @param c elements to be retained in this collection.
- * @return <tt>true</tt> if this collection changed as a result of the
- * call.
- * @throws UnsupportedOperationException if the <tt>retainAll</tt> method
- * is not supported by this Collection.
- * @throws NullPointerException if the specified collection is null.
- *
- * @see #remove(Object)
- * @see #contains(Object)
- */
- @Override
- public boolean retainAll(Collection<?> c) {
- boolean modified = false;
- Iterator<E> e = iterator();
- while (e.hasNext()) {
- if (!c.contains(e.next())) {
- e.remove();
- modified = true;
- }
- }
- return modified;
- }
-
-
- @Override
- public final void clear() {
- if (isEmpty()) {
- return;
- }
- int oldLastIndex = size() - 1;
- super.clear();
- fireIntervalRemoved(0, oldLastIndex);
- }
-
-
- @Override
- public final E remove(int index) {
- E removedElement = super.remove(index);
- fireIntervalRemoved(index, index);
- return removedElement;
- }
-
-
- @Override
- public final boolean remove(Object o) {
- int index = indexOf(o);
- boolean contained = index != -1;
- if (contained) {
- remove(index);
- }
- return contained;
- }
-
-
- @Override
- protected final void removeRange(int fromIndex, int toIndex) {
- super.removeRange(fromIndex, toIndex);
- fireIntervalRemoved(fromIndex, toIndex - 1);
- }
-
-
- @Override
- public final E set(int index, E element) {
- E previousElement = super.set(index, element);
- fireContentsChanged(index, index);
- return previousElement;
- }
-
-
- // ListModel Field ********************************************************
-
- /**
- * Holds the registered ListDataListeners. The list that holds these
- * listeners is initialized lazily in {@code #getEventListenerList}.
- *
- * @see #addListDataListener(ListDataListener)
- * @see #removeListDataListener(ListDataListener)
- */
- private EventListenerList listenerList;
-
-
- // ListModel Implementation ***********************************************
-
- @Override
- public final void addListDataListener(ListDataListener l) {
- getEventListenerList().add(ListDataListener.class, l);
- }
-
-
- @Override
- public final void removeListDataListener(ListDataListener l) {
- getEventListenerList().remove(ListDataListener.class, l);
- }
-
-
- @Override
- public final Object getElementAt(int index) {
- return get(index);
- }
-
-
- @Override
- public final int getSize() {
- return size();
- }
-
-
- // Explicit Change Notification *******************************************
-
- /**
- * Notifies all registered {@code ListDataListeners} that the element
- * at the specified index has changed. Useful if there's a content change
- * without any structural change.<p>
- *
- * This method must be called <em>after</em> the element of the list changes.
- *
- * @param index the index of the element that has changed
- *
- * @see EventListenerList
- */
- public final void fireContentsChanged(int index) {
- fireContentsChanged(index, index);
- }
-
-
- // ListModel Helper Code **************************************************
-
- /**
- * Returns an array of all the list data listeners
- * registered on this {@code ArrayListModel}.
- *
- * @return all of this model's {@code ListDataListener}s,
- * or an empty array if no list data listeners
- * are currently registered
- *
- * @see #addListDataListener(ListDataListener)
- * @see #removeListDataListener(ListDataListener)
- */
- public final ListDataListener[] getListDataListeners() {
- return getEventListenerList().getListeners(ListDataListener.class);
- }
-
-
- /**
- * This method must be called <em>after</em> one or more elements
- * of the list change. The changed elements
- * are specified by the closed interval index0, index1 -- the end points
- * are included. Note that index0 need not be less than or equal to index1.
- *
- * @param index0 one end of the new interval
- * @param index1 the other end of the new interval
- * @see EventListenerList
- */
- private void fireContentsChanged(int index0, int index1) {
- Object[] listeners = getEventListenerList().getListenerList();
- ListDataEvent e = null;
-
- for (int i = listeners.length - 2; i >= 0; i -= 2) {
- if (listeners[i] == ListDataListener.class) {
- if (e == null) {
- e = new ListDataEvent(this,
- ListDataEvent.CONTENTS_CHANGED, index0, index1);
- }
- ((ListDataListener) listeners[i + 1]).contentsChanged(e);
- }
- }
- }
-
-
- /**
- * This method must be called <em>after</em> one or more elements
- * are added to the model. The new elements
- * are specified by a closed interval index0, index1 -- the end points
- * are included. Note that index0 need not be less than or equal to index1.
- *
- * @param index0 one end of the new interval
- * @param index1 the other end of the new interval
- * @see EventListenerList
- */
- private void fireIntervalAdded(int index0, int index1) {
- Object[] listeners = getEventListenerList().getListenerList();
- ListDataEvent e = null;
-
- for (int i = listeners.length - 2; i >= 0; i -= 2) {
- if (listeners[i] == ListDataListener.class) {
- if (e == null) {
- e = new ListDataEvent(this, ListDataEvent.INTERVAL_ADDED, index0, index1);
- }
- ((ListDataListener) listeners[i + 1]).intervalAdded(e);
- }
- }
- }
-
-
- /**
- * This method must be called <em>after</em> one or more elements
- * are removed from the model.
- * {@code index0} and {@code index1} are the end points
- * of the interval that's been removed. Note that {@code index0}
- * need not be less than or equal to {@code index1}.
- *
- * @param index0 one end of the removed interval,
- * including {@code index0}
- * @param index1 the other end of the removed interval,
- * including {@code index1}
- * @see EventListenerList
- */
- private void fireIntervalRemoved(int index0, int index1) {
- Object[] listeners = getEventListenerList().getListenerList();
- ListDataEvent e = null;
-
- for (int i = listeners.length - 2; i >= 0; i -= 2) {
- if (listeners[i] == ListDataListener.class) {
- if (e == null) {
- e = new ListDataEvent(this, ListDataEvent.INTERVAL_REMOVED, index0, index1);
- }
- ((ListDataListener) listeners[i + 1]).intervalRemoved(e);
- }
- }
- }
-
-
- /**
- * Lazily initializes and returns the event listener list used
- * to notify registered listeners.
- *
- * @return the event listener list used to notify listeners
- */
- private EventListenerList getEventListenerList() {
- if (listenerList == null) {
- listenerList = new EventListenerList();
- }
- return listenerList;
- }
-
-
-}
diff --git a/src/core/com/jgoodies/common/collect/LinkedListModel.java b/src/core/com/jgoodies/common/collect/LinkedListModel.java
deleted file mode 100644
index 6f11914..0000000
--- a/src/core/com/jgoodies/common/collect/LinkedListModel.java
+++ /dev/null
@@ -1,529 +0,0 @@
-/*
- * Copyright (c) 2002-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.collect;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.ListIterator;
-
-import javax.swing.event.EventListenerList;
-import javax.swing.event.ListDataEvent;
-import javax.swing.event.ListDataListener;
-
-/**
- * Adds {@link javax.swing.ListModel} capabilities to its superclass.
- * It allows to observe changes in the content and structure. Useful for
- * Lists that are bound to list views such as JList, JComboBox and JTable.<p>
- *
- * This class should be be final and it will be marked final in a future
- * version, if its subclass in the JGoodies Binding has been removed.<p>
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.7 $
- *
- * @see ObservableList
- * @see ArrayListModel
- *
- * @param <E> the type of the list elements
- */
-public class LinkedListModel<E> extends LinkedList<E> implements ObservableList<E> {
-
- private static final long serialVersionUID = 5753378113505707237L;
-
-
- // Instance Creation ******************************************************
-
- /**
- * Constructs an empty LinkedListModel.
- */
- public LinkedListModel() {
- // Just invoke the super constructor implicitly.
- }
-
-
- /**
- * Constructs a LinkedListModel containing the elements of the specified
- * collection, in the order they are returned by the collection's
- * iterator.
- *
- * @param c the collection whose elements are to be placed into this list.
- * @throws NullPointerException if {@code c} is {@code null}
- */
- public LinkedListModel(Collection<? extends E> c) {
- super(c);
- }
-
-
- // Overriding Superclass Behavior *****************************************
-
- @Override
- public final void add(int index, E element) {
- super.add(index, element);
- fireIntervalAdded(index, index);
- }
-
-
- @Override
- public final boolean add(E e) {
- int newIndex = size();
- super.add(e);
- fireIntervalAdded(newIndex, newIndex);
- return true;
- }
-
-
- @Override
- public final boolean addAll(int index, Collection<? extends E> c) {
- boolean changed = super.addAll(index, c);
- if (changed) {
- int lastIndex = index + c.size() - 1;
- fireIntervalAdded(index, lastIndex);
- }
- return changed;
- }
-
-
- /**
- * Removes from this collection all of its elements that are contained in
- * the specified collection (optional operation). <p>
- *
- * This implementation iterates over this collection, checking each
- * element returned by the iterator in turn to see if it's contained
- * in the specified collection. If it's so contained, it's removed from
- * this collection with the iterator's <tt>remove</tt> method.<p>
- *
- * Note that this implementation will throw an
- * <tt>UnsupportedOperationException</tt> if the iterator returned by the
- * <tt>iterator</tt> method does not implement the <tt>remove</tt> method
- * and this collection contains one or more elements in common with the
- * specified collection.
- *
- * @param c elements to be removed from this collection.
- * @return <tt>true</tt> if this collection changed as a result of the
- * call.
- * @throws UnsupportedOperationException if the <tt>removeAll</tt> method
- * is not supported by this collection.
- * @throws NullPointerException if the specified collection is null.
- *
- * @see #remove(Object)
- * @see #contains(Object)
- */
- @Override
- public boolean removeAll(Collection<?> c) {
- boolean modified = false;
- Iterator<?> e = iterator();
- while (e.hasNext()) {
- if (c.contains(e.next())) {
- e.remove();
- modified = true;
- }
- }
- return modified;
- }
-
-
- /**
- * Retains only the elements in this collection that are contained in the
- * specified collection (optional operation). In other words, removes
- * from this collection all of its elements that are not contained in the
- * specified collection. <p>
- *
- * This implementation iterates over this collection, checking each
- * element returned by the iterator in turn to see if it's contained
- * in the specified collection. If it's not so contained, it's removed
- * from this collection with the iterator's <tt>remove</tt> method.<p>
- *
- * Note that this implementation will throw an
- * <tt>UnsupportedOperationException</tt> if the iterator returned by the
- * <tt>iterator</tt> method does not implement the <tt>remove</tt> method
- * and this collection contains one or more elements not present in the
- * specified collection.
- *
- * @param c elements to be retained in this collection.
- * @return <tt>true</tt> if this collection changed as a result of the
- * call.
- * @throws UnsupportedOperationException if the <tt>retainAll</tt> method
- * is not supported by this Collection.
- * @throws NullPointerException if the specified collection is null.
- *
- * @see #remove(Object)
- * @see #contains(Object)
- */
- @Override
- public boolean retainAll(Collection<?> c) {
- boolean modified = false;
- Iterator<E> e = iterator();
- while (e.hasNext()) {
- if (!c.contains(e.next())) {
- e.remove();
- modified = true;
- }
- }
- return modified;
- }
-
-
- @Override
- public final void addFirst(E e) {
- super.addFirst(e);
- fireIntervalAdded(0, 0);
- }
-
-
- @Override
- public final void addLast(E e) {
- int newIndex = size();
- super.addLast(e);
- fireIntervalAdded(newIndex, newIndex);
- }
-
-
- @Override
- public final void clear() {
- if (isEmpty()) {
- return;
- }
-
- int oldLastIndex = size() - 1;
- super.clear();
- fireIntervalRemoved(0, oldLastIndex);
- }
-
-
- @Override
- public final E remove(int index) {
- E removedElement = super.remove(index);
- fireIntervalRemoved(index, index);
- return removedElement;
- }
-
-
- @Override
- public final boolean remove(Object o) {
- int index = indexOf(o);
- if (index == -1) {
- return false;
- }
- remove(index);
- return true;
- }
-
-
- @Override
- public final E removeFirst() {
- E first = super.removeFirst();
- fireIntervalRemoved(0, 0);
- return first;
- }
-
-
- @Override
- public final E removeLast() {
- int lastIndex = size() - 1;
- E last = super.removeLast();
- fireIntervalRemoved(lastIndex, lastIndex);
- return last;
- }
-
-
- @Override
- protected final void removeRange(int fromIndex, int toIndex) {
- super.removeRange(fromIndex, toIndex);
- fireIntervalRemoved(fromIndex, toIndex - 1);
- }
-
-
- @Override
- public final E set(int index, E element) {
- E previousElement = super.set(index, element);
- fireContentsChanged(index, index);
- return previousElement;
- }
-
-
- @Override
- public final ListIterator<E> listIterator(int index) {
- return new ReportingListIterator(super.listIterator(index));
- }
-
-
- // ListModel Field ********************************************************
-
- /**
- * Holds the registered ListDataListeners. The list that holds these
- * listeners is initialized lazily in {@code #getEventListenerList}.
- *
- * @see #addListDataListener(ListDataListener)
- * @see #removeListDataListener(ListDataListener)
- */
- private EventListenerList listenerList;
-
-
- // ListModel Implementation ***********************************************
-
- @Override
- public final void addListDataListener(ListDataListener l) {
- getEventListenerList().add(ListDataListener.class, l);
- }
-
-
- @Override
- public final void removeListDataListener(ListDataListener l) {
- getEventListenerList().remove(ListDataListener.class, l);
- }
-
-
- @Override
- public final E getElementAt(int index) {
- return get(index);
- }
-
-
- @Override
- public final int getSize() {
- return size();
- }
-
-
- // Explicit Change Notification *******************************************
-
- /**
- * Notifies all registered {@code ListDataListeners} that the element
- * at the specified index has changed. Useful if there's a content change
- * without any structural change.<p>
- *
- * This method must be called <em>after</em> the element of the list changes.
- *
- * @param index the index of the element that has changed
- *
- * @see EventListenerList
- */
- public final void fireContentsChanged(int index) {
- fireContentsChanged(index, index);
- }
-
-
- // ListModel Helper Code **************************************************
-
- /**
- * Returns an array of all the list data listeners
- * registered on this {@code LinkedListModel}.
- *
- * @return all of this model's {@code ListDataListener}s,
- * or an empty array if no list data listeners
- * are currently registered
- *
- * @see #addListDataListener(ListDataListener)
- * @see #removeListDataListener(ListDataListener)
- */
- public final ListDataListener[] getListDataListeners() {
- return getEventListenerList().getListeners(ListDataListener.class);
- }
-
-
- /**
- * This method must be called <em>after</em> one or more elements
- * of the list change. The changed elements
- * are specified by the closed interval index0, index1 -- the end points
- * are included. Note that index0 need not be less than or equal to index1.
- *
- * @param index0 one end of the new interval
- * @param index1 the other end of the new interval
- * @see EventListenerList
- */
- private void fireContentsChanged(int index0, int index1) {
- Object[] listeners = getEventListenerList().getListenerList();
- ListDataEvent e = null;
-
- for (int i = listeners.length - 2; i >= 0; i -= 2) {
- if (listeners[i] == ListDataListener.class) {
- if (e == null) {
- e = new ListDataEvent(this,
- ListDataEvent.CONTENTS_CHANGED, index0, index1);
- }
- ((ListDataListener) listeners[i + 1]).contentsChanged(e);
- }
- }
- }
-
-
- /**
- * This method must be called <em>after</em> one or more elements
- * are added to the model. The new elements
- * are specified by a closed interval index0, index1 -- the end points
- * are included. Note that index0 need not be less than or equal to index1.
- *
- * @param index0 one end of the new interval
- * @param index1 the other end of the new interval
- * @see EventListenerList
- */
- private void fireIntervalAdded(int index0, int index1) {
- Object[] listeners = getEventListenerList().getListenerList();
- ListDataEvent e = null;
-
- for (int i = listeners.length - 2; i >= 0; i -= 2) {
- if (listeners[i] == ListDataListener.class) {
- if (e == null) {
- e = new ListDataEvent(this, ListDataEvent.INTERVAL_ADDED, index0, index1);
- }
- ((ListDataListener) listeners[i + 1]).intervalAdded(e);
- }
- }
- }
-
-
- /**
- * This method must be called <em>after</em> one or more elements
- * are removed from the model.
- * {@code index0} and {@code index1} are the end points
- * of the interval that's been removed. Note that {@code index0}
- * need not be less than or equal to {@code index1}.
- *
- * @param index0 one end of the removed interval,
- * including {@code index0}
- * @param index1 the other end of the removed interval,
- * including {@code index1}
- * @see EventListenerList
- */
- private void fireIntervalRemoved(int index0, int index1) {
- Object[] listeners = getEventListenerList().getListenerList();
- ListDataEvent e = null;
-
- for (int i = listeners.length - 2; i >= 0; i -= 2) {
- if (listeners[i] == ListDataListener.class) {
- if (e == null) {
- e = new ListDataEvent(this, ListDataEvent.INTERVAL_REMOVED, index0, index1);
- }
- ((ListDataListener) listeners[i + 1]).intervalRemoved(e);
- }
- }
- }
-
-
- /**
- * Lazily initializes and returns the event listener list used
- * to notify registered listeners.
- *
- * @return the event listener list used to notify listeners
- */
- private EventListenerList getEventListenerList() {
- if (listenerList == null) {
- listenerList = new EventListenerList();
- }
- return listenerList;
- }
-
-
- // Helper Class ***********************************************************
-
- /**
- * A ListIterator that fires ListDataEvents if elements are added or removed.
- */
- private final class ReportingListIterator implements ListIterator<E> {
-
- /**
- * Refers to the wrapped ListIterator that is used
- * to forward all ListIterator methods to.
- */
- private final ListIterator<E> delegate;
-
- /**
- * Holds the object that was returned last by the underlying
- * ListIteratur. Used to determine the index of the element removed.
- */
- private int lastReturnedIndex;
-
- ReportingListIterator(ListIterator<E> delegate) {
- this.delegate = delegate;
- lastReturnedIndex = -1;
- }
-
- @Override
- public boolean hasNext() {
- return delegate.hasNext();
- }
-
- @Override
- public E next() {
- lastReturnedIndex = nextIndex();
- return delegate.next();
- }
-
- @Override
- public boolean hasPrevious() {
- return delegate.hasPrevious();
- }
-
- @Override
- public E previous() {
- lastReturnedIndex = previousIndex();
- return delegate.previous();
- }
-
- @Override
- public int nextIndex() {
- return delegate.nextIndex();
- }
-
- @Override
- public int previousIndex() {
- return delegate.previousIndex();
- }
-
- @Override
- public void remove() {
- int oldSize = size();
- delegate.remove();
- int newSize = size();
- if (newSize < oldSize) {
- LinkedListModel.this.fireIntervalRemoved(lastReturnedIndex, lastReturnedIndex);
- }
- }
-
- @Override
- public void set(E e) {
- delegate.set(e);
- LinkedListModel.this.fireContentsChanged(lastReturnedIndex);
- }
-
- @Override
- public void add(E e) {
- delegate.add(e);
- int newIndex = previousIndex();
- LinkedListModel.this.fireIntervalAdded(newIndex, newIndex);
- lastReturnedIndex = -1;
- }
-
- }
-
-
-}
diff --git a/src/core/com/jgoodies/common/collect/ObservableList.java b/src/core/com/jgoodies/common/collect/ObservableList.java
deleted file mode 100644
index 1fd53a0..0000000
--- a/src/core/com/jgoodies/common/collect/ObservableList.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2002-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.collect;
-
-import java.util.List;
-
-import javax.swing.ListModel;
-
-/**
- * Combines the {@link List} and {@link ListModel} interfaces.
- * Useful to specify a type that operates like a List and is published
- * as a ListModel so it can be bound to user interface components
- * such as {@code JList}, {@code JTable} and {@code JComboBox}.<p>
- *
- * The JGoodies Common ships two predefined implementations:
- * {@link ArrayListModel} and {@link LinkedListModel}.<p>
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.4 $
- *
- * @param <E> the type of the list elements
- */
-public interface ObservableList<E> extends List<E>, ListModel {
-
- // This interface just combines List and ListModel and
- // doesn't add anything new.
-
-}
diff --git a/src/core/com/jgoodies/common/collect/package.html b/src/core/com/jgoodies/common/collect/package.html
deleted file mode 100644
index a84e196..0000000
--- a/src/core/com/jgoodies/common/collect/package.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
- Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- o Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- o 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.
-
- o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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.
-
- JavaDoc uses all text between the "body" tags.
- The first sentence is used as short description.
--->
-</head>
-<body bgcolor="white">
-
-Consists of classes that add ListModel features to List implementations.
-
-<!--
-<h2>Package Specification</h2>
-
-##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT #####
-<ul>
- <li><a href="">##### REFER TO ANY FRAMEMAKER SPECIFICATION HERE #####</a>
-</ul>
--->
-
-
-</body>
-</html>
diff --git a/src/core/com/jgoodies/common/format/AbstractWrappedDateFormat.java b/src/core/com/jgoodies/common/format/AbstractWrappedDateFormat.java
deleted file mode 100644
index 9482863..0000000
--- a/src/core/com/jgoodies/common/format/AbstractWrappedDateFormat.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.format;
-
-import static com.jgoodies.common.base.Preconditions.checkNotNull;
-
-import java.text.AttributedCharacterIterator;
-import java.text.DateFormat;
-import java.text.FieldPosition;
-import java.text.NumberFormat;
-import java.text.ParsePosition;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.TimeZone;
-
-/**
- * Reduces the effort required to write custom DateFormat implementations
- * that retain the ability to iterate through Dates with the arrow keys
- * in formatted text fields (using an appropriate DateFormatter).
- *
- * This class wraps a given {@code DateFormat} and delegates most
- * of its behavior to the delegate, except for the abstract methods
- * {@link #format(Date, StringBuffer, FieldPosition)} and
- * {@link #parse(String, ParsePosition)} that can be overridden by
- * a subclass. For example the subclass EmptyDateFormat wraps a DateFormat
- * but it parses the empty String and returns {@code null} where the
- * predefined Java DateFormats throw an exception.<p>
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.7 $
- */
-public abstract class AbstractWrappedDateFormat extends DateFormat {
-
- /**
- * Refers to the wrapped Format that is used to forward
- * {@code #format} and {@code #parseObject}.
- */
- protected final DateFormat delegate;
-
-
- // Instance Creation ******************************************************
-
- /**
- * Constructs an AbstractWrappedDateFormat that wraps the given mandatory
- * format.
- *
- * @param delegate the format that handles the standard cases
- *
- * @throws NullPointerException if {@code delegate} is {@code null}
- */
- public AbstractWrappedDateFormat(DateFormat delegate) {
- this.delegate = checkNotNull(delegate, "The delegate format must not be null.");
- }
-
-
- // Abstract Behavior ******************************************************
-
- @Override
- public abstract StringBuffer format(Date date, StringBuffer toAppendTo,
- FieldPosition pos);
-
-
- @Override
- public abstract Date parse(String source, ParsePosition pos);
-
-
- // Pure Delegation ********************************************************
-
- @Override
- public Calendar getCalendar() {
- return delegate.getCalendar();
- }
-
-
- @Override
- public void setCalendar(Calendar newCalendar) {
- delegate.setCalendar(newCalendar);
- }
-
-
- @Override
- public NumberFormat getNumberFormat() {
- return delegate.getNumberFormat();
- }
-
-
- @Override
- public void setNumberFormat(NumberFormat newNumberFormat) {
- delegate.setNumberFormat(newNumberFormat);
- }
-
-
- @Override
- public TimeZone getTimeZone() {
- return delegate.getTimeZone();
- }
-
-
- @Override
- public void setTimeZone(TimeZone zone) {
- delegate.setTimeZone(zone);
- }
-
-
- @Override
- public boolean isLenient() {
- return delegate.isLenient();
- }
-
-
- @Override
- public void setLenient(boolean lenient) {
- delegate.setLenient(lenient);
- }
-
-
- @Override
- public AttributedCharacterIterator formatToCharacterIterator(Object obj) {
- return delegate.formatToCharacterIterator(obj);
- }
-
-
-}
diff --git a/src/core/com/jgoodies/common/format/EmptyDateFormat.java b/src/core/com/jgoodies/common/format/EmptyDateFormat.java
deleted file mode 100644
index 5eaf8eb..0000000
--- a/src/core/com/jgoodies/common/format/EmptyDateFormat.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.format;
-
-import java.text.DateFormat;
-import java.text.FieldPosition;
-import java.text.ParsePosition;
-import java.util.Date;
-
-import com.jgoodies.common.base.Objects;
-import com.jgoodies.common.base.Strings;
-
-/**
- * Wraps a given {@link DateFormat} and adds behavior to convert to/from
- * the empty string. Therefore it holds an <em>empty value</em> that is
- * mapped to/from the empty string. The {@code #format} result
- * of the empty value is the empty string, and the {@code #parse}
- * result of the empty string is the empty value. In all other cases
- * the formatting and parsing is forwarded to the wrapped DateFormat.<p>
- *
- * Often the empty value is {@code null} but you can construct an
- * EmptyDateFormat with a given {@code Date}.<p>
- *
- * <strong>Examples:</strong><pre>
- * new EmptyDateFormat(DateFormat.getDateInstance());
- * new EmptyDateFormat(DateFormat.getDateInstance(), new Date());
- *
- * new EmptyDateFormat(DateFormat.getDateInstance(DateFormat.SHORT));
- * new EmptyDateFormat(DateFormat.getDateInstance(DateFormat.SHORT), new Date());
- * </pre>
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.9 $
- */
-public final class EmptyDateFormat extends AbstractWrappedDateFormat {
-
- /**
- * Holds the object that represents the <em>empty</em> value.
- * The result of formatting this value is the empty string;
- * the result of parsing an empty string is this object.
- */
- private final Date emptyValue;
-
-
- // Instance Creation ****************************************************
-
- /**
- * Constructs an {@code EmptyFormat} that wraps the given mandatory format
- * to convert {@code null} to the empty string and vice versa.
- *
- * @param delegate the format that handles the standard cases
- *
- * @throws NullPointerException if {@code delegate} is {@code null}
- */
- public EmptyDateFormat(DateFormat delegate) {
- this(delegate, null);
- }
-
-
- /**
- * Constructs an {@code EmptyFormat} that wraps the given mandatory format
- * to convert the given {@code emptyValue} to the empty string
- * and vice versa.
- *
- * @param delegate the format that handles non-{@code null} values
- * @param emptyValue the representation of the empty string
- *
- * @throws NullPointerException if {@code delegate} is {@code null}
- */
- public EmptyDateFormat(DateFormat delegate, Date emptyValue) {
- super(delegate);
- this.emptyValue = emptyValue;
- }
-
-
- // Overriding Superclass Behavior *****************************************
-
- @Override
- public StringBuffer format(Date date, StringBuffer toAppendTo,
- FieldPosition pos) {
- return Objects.equals(date, emptyValue)
- ? toAppendTo
- : delegate.format(date, toAppendTo, pos);
- }
-
-
- @Override
- public Date parse(String source, ParsePosition pos) {
- if (Strings.isBlank(source)) {
- // DateFormat#parse(String) throws a ParseException,
- // if the parse position is 0. We change it to 1.
- pos.setIndex(1);
- return emptyValue;
- }
- return delegate.parse(source, pos);
- }
-
-
-}
diff --git a/src/core/com/jgoodies/common/format/EmptyFormat.java b/src/core/com/jgoodies/common/format/EmptyFormat.java
deleted file mode 100644
index 19cbada..0000000
--- a/src/core/com/jgoodies/common/format/EmptyFormat.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.format;
-
-import static com.jgoodies.common.base.Preconditions.checkNotNull;
-
-import java.text.AttributedCharacterIterator;
-import java.text.FieldPosition;
-import java.text.Format;
-import java.text.ParseException;
-import java.text.ParsePosition;
-
-import com.jgoodies.common.base.Objects;
-import com.jgoodies.common.base.Strings;
-
-/**
- * Wraps a given {@code Format} and adds behavior to convert to/from
- * the empty string. Therefore it holds an <em>empty value</em>
- * (often {@code null}) that is
- * mapped to/from the empty string. The {@code #format} result
- * of the empty value is the empty string, and the {@code #parse}
- * result of the empty string is the empty value. In all other cases
- * the formatting and parsing is forwarded to the wrapped Format.<p>
- *
- * If you want to wrap a DateFormat or NumberFormat, you may use
- * {@link EmptyDateFormat} or {@link EmptyNumberFormat} resp.
- *
- * <strong>Examples:</strong><pre>
- * new EmptyFormat(new WeightFormat());
- * </pre>
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.8 $
- */
-public class EmptyFormat extends Format {
-
- /**
- * Refers to the wrapped Format that is used to forward
- * {@code #format} and {@code #parseObject}.
- */
- private final Format delegate;
-
- /**
- * Holds the object that represents the <em>empty</em> value.
- * The result of formatting this value is the empty string;
- * the result of parsing an empty string is this object.
- */
- private final Object emptyValue;
-
-
- // Instance Creation ****************************************************
-
- /**
- * Constructs an EmptyFormat that wraps the given mandatory format
- * to convert {@code null} to the empty string and vice versa.
- *
- * @param delegate the format that handles the standard cases
- *
- * @throws NullPointerException if {@code delegate} is {@code null}
- */
- public EmptyFormat(Format delegate) {
- this(delegate, null);
- }
-
-
- /**
- * Constructs an EmptyFormat that wraps the given mandatory format
- * to convert the given {@code emptyValue} to the empty string
- * and vice versa.
- *
- * @param delegate the format that handles non-{@code null} values
- * @param emptyValue the representation of the empty string
- *
- * @throws NullPointerException if {@code delegate} is {@code null}
- */
- public EmptyFormat(Format delegate, Object emptyValue) {
- this.delegate = checkNotNull(delegate, "The delegate format must not be null.");
- this.emptyValue = emptyValue;
- }
-
-
- // Overriding Superclass Behavior *****************************************
-
- /**
- * {@inheritDoc}<p>
- *
- * If {@code obj} is equal to the <em>emptyValue</em>,
- * {@code toAppendTo} is returned. Otherwise the format
- * is forwarded to the delegate.
- */
- @Override
- public StringBuffer format(Object obj, StringBuffer toAppendTo,
- FieldPosition pos) {
- return Objects.equals(obj, emptyValue)
- ? toAppendTo
- : delegate.format(obj, toAppendTo, pos);
- }
-
-
- /**
- * {@inheritDoc}<p>
- *
- * If {@code source} is empty or whitespace, the <em>emptyValue</em>
- * is returned. Otherwise parsing is forwarded to the delegate.
- */
- @Override
- public Object parseObject(String source) throws ParseException {
- return Strings.isBlank(source)
- ? emptyValue
- : super.parseObject(source);
- }
-
-
- @Override
- public final Object parseObject(String source, ParsePosition pos) {
- return delegate.parseObject(source, pos);
- }
-
-
- @Override
- public final AttributedCharacterIterator formatToCharacterIterator(Object obj) {
- return delegate.formatToCharacterIterator(obj);
- }
-
-
-}
diff --git a/src/core/com/jgoodies/common/format/EmptyNumberFormat.java b/src/core/com/jgoodies/common/format/EmptyNumberFormat.java
deleted file mode 100644
index ca22075..0000000
--- a/src/core/com/jgoodies/common/format/EmptyNumberFormat.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.format;
-
-import static com.jgoodies.common.base.Preconditions.checkNotNull;
-
-import java.text.FieldPosition;
-import java.text.NumberFormat;
-import java.text.ParseException;
-import java.text.ParsePosition;
-
-import com.jgoodies.common.base.Objects;
-import com.jgoodies.common.base.Strings;
-
-/**
- * Wraps a given {@code NumberFormat} and adds behavior to convert to/from
- * the empty string. Therefore it holds an <em>empty value</em> that is
- * mapped to/from the empty string. The {@code #format} result
- * of the empty value is the empty string, and the {@code #parse}
- * result of the empty string is the empty value. In all other cases
- * the formatting and parsing is forwarded to the wrapped NumberFormat.<p>
- *
- * <strong>Examples:</strong><pre>
- * new EmptyNumberFormat(NumberFormat().getInstance());
- * new EmptyNumberFormat(NumberFormat().getIntegerInstance(), -1);
- * </pre>
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.6 $
- */
-public final class EmptyNumberFormat extends NumberFormat {
-
-
- private final NumberFormat delegate;
- private final Number emptyValue;
-
-
- // Instance Creation ****************************************************
-
- /**
- * Constructs an EmptyNumberFormat that wraps the given mandatory format
- * to convert {@code null} to the empty string and vice versa.
- *
- * @param delegate the format that handles the standard cases
- *
- * @throws NullPointerException if {@code delegate} is {@code null}
- */
- public EmptyNumberFormat(NumberFormat delegate) {
- this(delegate, null);
- }
-
-
- /**
- * Constructs an EmptyNumberFormat that wraps the given mandatory format
- * to convert the given {@code emptyValue} to the empty string
- * and vice versa.
- *
- * @param delegate the format that handles non-{@code null} values
- * @param emptyValue the representation of the empty string
- *
- * @throws NullPointerException if {@code delegate} is {@code null}
- */
- public EmptyNumberFormat(NumberFormat delegate, int emptyValue) {
- this(delegate, Integer.valueOf(emptyValue));
- }
-
-
- /**
- * Constructs an EmptyNumberFormat that wraps the given mandatory format
- * to convert the given {@code emptyValue} to the empty string
- * and vice versa.
- *
- * @param delegate the format that handles non-{@code null} values
- * @param emptyValue the representation of the empty string
- *
- * @throws NullPointerException if {@code delegate} is {@code null}
- */
- public EmptyNumberFormat(NumberFormat delegate, Number emptyValue) {
- this.delegate = checkNotNull(delegate, "The delegate format must not be null.");
- this.emptyValue = emptyValue;
- }
-
-
- // Overriding Superclass Behavior *****************************************
-
- /**
- * {@inheritDoc}<p>
- *
- * If {@code obj} is equal to the <em>emptyValue</em>,
- * {@code toAppendTo} is returned. Otherwise the format
- * is forwarded to the delegate.
- */
- @Override
- public StringBuffer format(Object obj, StringBuffer toAppendTo,
- FieldPosition pos) {
- return Objects.equals(obj, emptyValue)
- ? toAppendTo
- : delegate.format(obj, toAppendTo, pos);
- }
-
-
- @Override
- public StringBuffer format(double number,
- StringBuffer toAppendTo,
- FieldPosition pos) {
- return delegate.format(number, toAppendTo, pos);
- }
-
-
- @Override
- public StringBuffer format(long number,
- StringBuffer toAppendTo,
- FieldPosition pos) {
- return delegate.format(number, toAppendTo, pos);
- }
-
-
- /**
- * {@inheritDoc}<p>
- *
- * If {@code source} is empty or whitespace, the <em>emptyValue</em>
- * is returned. Otherwise parsing is forwarded to the delegate
- * - indirectly via {@link #parse(String, ParsePosition)}.
- */
- @Override
- public Object parseObject(String source) throws ParseException {
- return Strings.isBlank(source)
- ? emptyValue
- : super.parseObject(source);
- }
-
-
- /**
- * {@inheritDoc}<p>
- *
- * If {@code source} is empty or whitespace, the <em>emptyValue</em>
- * is returned. Otherwise parsing is forwarded to the delegate
- * - indirectly via {@link #parse(String, ParsePosition)}.
- */
- @Override
- public Number parse(String source) throws ParseException {
- return Strings.isBlank(source)
- ? emptyValue
- : super.parse(source);
- }
-
-
- @Override
- public Number parse(String source, ParsePosition pos) {
- return delegate.parse(source, pos);
- }
-
-
-}
diff --git a/src/core/com/jgoodies/common/format/package.html b/src/core/com/jgoodies/common/format/package.html
deleted file mode 100644
index 0f5d449..0000000
--- a/src/core/com/jgoodies/common/format/package.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
- Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- o Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- o 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.
-
- o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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.
-
- JavaDoc uses all text between the "body" tags.
- The first sentence is used as short description.
--->
-</head>
-<body bgcolor="white">
-
-Consists of Format implementations and wrappers.
-
-<!--
-<h2>Package Specification</h2>
-
-##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT #####
-<ul>
- <li><a href="">##### REFER TO ANY FRAMEMAKER SPECIFICATION HERE #####</a>
-</ul>
--->
-
-
-</body>
-</html>
diff --git a/src/core/com/jgoodies/common/internal/RenderingUtils.java b/src/core/com/jgoodies/common/internal/RenderingUtils.java
deleted file mode 100644
index b03538f..0000000
--- a/src/core/com/jgoodies/common/internal/RenderingUtils.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.internal;
-
-import java.awt.FontMetrics;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.GraphicsDevice;
-import java.awt.PrintGraphics;
-import java.awt.RenderingHints;
-import java.awt.Toolkit;
-import java.awt.print.PrinterGraphics;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.swing.JComponent;
-import javax.swing.plaf.basic.BasicGraphicsUtils;
-
-/**
- * Provides convenience behavior for drawing strings, underline chars,
- * and accessing font metrics.<p>
- *
- * <strong>Note:</strong> This class is not part of the public Common API.
- * It should be treated as library internal and should not be used by
- * API users. It may be removed or changed without further notice.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.7 $
- */
-public final class RenderingUtils {
-
- private static final String PROP_DESKTOPHINTS = "awt.font.desktophints";
-
- private static final String SWING_UTILITIES2_NAME = "sun.swing.SwingUtilities2";
-
- /**
- * Holds the public static method {@code SwingUtilities2#drawString}.
- */
- private static Method drawStringMethod = null;
-
- /**
- * Holds the public static method
- * {@code SwingUtilities2#drawStringUnderlinedAt}.
- */
- private static Method drawStringUnderlineCharAtMethod = null;
-
- /**
- * Holds the public static method {@code SwingUtilities2#getFontMetrics}.
- */
- private static Method getFontMetricsMethod = null;
-
- static {
- drawStringMethod = getMethodDrawString();
- drawStringUnderlineCharAtMethod = getMethodDrawStringUnderlineCharAt();
- getFontMetricsMethod = getMethodGetFontMetrics();
- }
-
-
- private RenderingUtils() {
- // Overrides default constructor; prevents instantiation.
- }
-
- /**
- * Draws the string at the specified location underlining the specified
- * character.
- *
- * @param c JComponent that will display the string, may be null
- * @param g Graphics to draw the text to
- * @param text String to display
- * @param x X coordinate to draw the text at
- * @param y Y coordinate to draw the text at
- */
- public static void drawString(JComponent c, Graphics g, String text, int x, int y) {
- if (drawStringMethod != null) {
- try {
- drawStringMethod.invoke(null,
- c, g, text, Integer.valueOf(x), Integer.valueOf(y));
- return;
- } catch (IllegalArgumentException e) {
- // Use the BasicGraphicsUtils as fallback
- } catch (IllegalAccessException e) {
- // Use the BasicGraphicsUtils as fallback
- } catch (InvocationTargetException e) {
- // Use the BasicGraphicsUtils as fallback
- }
- }
- Graphics2D g2 = (Graphics2D) g;
- Map<?, ?> oldRenderingHints = installDesktopHints(g2);
- BasicGraphicsUtils.drawStringUnderlineCharAt(g, text, -1, x, y);
- if (oldRenderingHints != null) {
- g2.addRenderingHints(oldRenderingHints);
- }
- }
-
-
- /**
- * Draws the string at the specified location underlining the specified
- * character.
- *
- * @param c JComponent that will display the string, may be null
- * @param g Graphics to draw the text to
- * @param text String to display
- * @param underlinedIndex Index of a character in the string to underline
- * @param x X coordinate to draw the text at
- * @param y Y coordinate to draw the text at
- */
- public static void drawStringUnderlineCharAt(JComponent c, Graphics g,
- String text, int underlinedIndex, int x, int y) {
- if (drawStringUnderlineCharAtMethod != null) {
- try {
- drawStringUnderlineCharAtMethod.invoke(null,
- new Object[] {c, g, text, new Integer(underlinedIndex),
- new Integer(x), new Integer(y)});
- return;
- } catch (IllegalArgumentException e) {
- // Use the BasicGraphicsUtils as fallback
- } catch (IllegalAccessException e) {
- // Use the BasicGraphicsUtils as fallback
- } catch (InvocationTargetException e) {
- // Use the BasicGraphicsUtils as fallback
- }
- }
- Graphics2D g2 = (Graphics2D) g;
- Map oldRenderingHints = installDesktopHints(g2);
- BasicGraphicsUtils.drawStringUnderlineCharAt(g, text, underlinedIndex, x, y);
- if (oldRenderingHints != null) {
- g2.addRenderingHints(oldRenderingHints);
- }
- }
-
-
- /**
- * Returns the FontMetrics for the current Font of the passed
- * in Graphics. This method is used when a Graphics
- * is available, typically when painting. If a Graphics is not
- * available the JComponent method of the same name should be used.
- * <p>
- * Callers should pass in a non-null JComponent, the exception
- * to this is if a JComponent is not readily available at the time of
- * painting.
- * <p>
- * This does not necessarily return the FontMetrics from the
- * Graphics.
- *
- * @param c JComponent requesting FontMetrics, may be null
- * @param g Graphics Graphics
- * @return the FontMetrics
- */
- public static FontMetrics getFontMetrics(JComponent c, Graphics g) {
- if (getFontMetricsMethod != null) {
- try {
- return (FontMetrics) getFontMetricsMethod.invoke(null, new Object[] {c, g});
- } catch (IllegalArgumentException e) {
- // Use the fallback
- } catch (IllegalAccessException e) {
- // Use the fallback
- } catch (InvocationTargetException e) {
- // Use the fallback
- }
- }
- return c.getFontMetrics(g.getFont());
- }
-
-
- // Private Helper Code ****************************************************
-
- private static Method getMethodDrawString() {
- try {
- Class<?> clazz = Class.forName(SWING_UTILITIES2_NAME);
- return clazz.getMethod(
- "drawString",
- new Class[] {JComponent.class, Graphics.class, String.class, Integer.TYPE, Integer.TYPE}
- );
- } catch (ClassNotFoundException e) {
- // returns null
- } catch (SecurityException e) {
- // returns null
- } catch (NoSuchMethodException e) {
- // returns null
- }
- return null;
- }
-
-
- private static Method getMethodDrawStringUnderlineCharAt() {
- try {
- Class clazz = Class.forName(SWING_UTILITIES2_NAME);
- return clazz.getMethod(
- "drawStringUnderlineCharAt",
- new Class[] {JComponent.class, Graphics.class, String.class, Integer.TYPE, Integer.TYPE, Integer.TYPE}
- );
- } catch (ClassNotFoundException e) {
- // returns null
- } catch (SecurityException e) {
- // returns null
- } catch (NoSuchMethodException e) {
- // returns null
- }
- return null;
- }
-
-
- private static Method getMethodGetFontMetrics() {
- try {
- Class clazz = Class.forName(SWING_UTILITIES2_NAME);
- return clazz.getMethod(
- "getFontMetrics",
- new Class[] {JComponent.class, Graphics.class}
- );
- } catch (ClassNotFoundException e) {
- // returns null
- } catch (SecurityException e) {
- // returns null
- } catch (NoSuchMethodException e) {
- // returns null
- }
- return null;
- }
-
-
- private static Map installDesktopHints(Graphics2D g2) {
- Map oldRenderingHints = null;
- Map desktopHints = desktopHints(g2);
- if (desktopHints != null && !desktopHints.isEmpty()) {
- oldRenderingHints = new HashMap(desktopHints.size());
- RenderingHints.Key key;
- for (Iterator i = desktopHints.keySet().iterator(); i.hasNext();) {
- key = (RenderingHints.Key) i.next();
- oldRenderingHints.put(key, g2.getRenderingHint(key));
- }
- g2.addRenderingHints(desktopHints);
- }
- return oldRenderingHints;
- }
-
-
- private static Map desktopHints(Graphics2D g2) {
- if (isPrinting(g2)) {
- return null;
- }
- Toolkit toolkit = Toolkit.getDefaultToolkit();
- GraphicsDevice device = g2.getDeviceConfiguration().getDevice();
- Map desktopHints = (Map) toolkit.getDesktopProperty(
- PROP_DESKTOPHINTS + '.' + device.getIDstring());
- if (desktopHints == null) {
- desktopHints = (Map) toolkit.getDesktopProperty(PROP_DESKTOPHINTS);
- }
- // It is possible to get a non-empty map but with disabled AA.
- if (desktopHints != null) {
- Object aaHint = desktopHints.get(RenderingHints.KEY_TEXT_ANTIALIASING);
- if (aaHint == RenderingHints.VALUE_TEXT_ANTIALIAS_OFF ||
- aaHint == RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT) {
- desktopHints = null;
- }
- }
- return desktopHints;
- }
-
-
- private static boolean isPrinting(Graphics g) {
- return g instanceof PrintGraphics || g instanceof PrinterGraphics;
- }
-
-
-}
diff --git a/src/core/com/jgoodies/common/internal/package.html b/src/core/com/jgoodies/common/internal/package.html
deleted file mode 100644
index ad5b8d5..0000000
--- a/src/core/com/jgoodies/common/internal/package.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
- Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- o Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- o 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.
-
- o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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.
-
- JavaDoc uses all text between the "body" tags.
- The first sentence is used as short description.
--->
-</head>
-<body bgcolor="white">
-
-Consists of internal classes that are not part of the public API.
-These classes should not be used by API users.
-They may be removed or changed without further notice.
-
-<!--
-<h2>Package Specification</h2>
-
-##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT #####
-<ul>
- <li><a href="">##### REFER TO ANY FRAMEMAKER SPECIFICATION HERE #####</a>
-</ul>
--->
-
-
-</body>
-</html>
diff --git a/src/core/com/jgoodies/common/swing/MnemonicUtils.java b/src/core/com/jgoodies/common/swing/MnemonicUtils.java
deleted file mode 100644
index ede6844..0000000
--- a/src/core/com/jgoodies/common/swing/MnemonicUtils.java
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.swing;
-
-import static com.jgoodies.common.base.Preconditions.checkNotNull;
-
-import java.awt.event.KeyEvent;
-import java.text.CharacterIterator;
-import java.text.StringCharacterIterator;
-
-import javax.swing.AbstractButton;
-import javax.swing.Action;
-import javax.swing.JLabel;
-
-import com.jgoodies.common.base.Strings;
-
-
-/**
- * Configures the text, mnemonic and mnemonic index in Actions, JLabels,
- * and AbstractButtons. The term <em>marked text</em> is used for Strings
- * that contain a marker character that marks both the mnemonic and
- * its index in the resulting <em>plain text</em>.<p>
- *
- * To set a mnemonic, add an ampersand ('&') before the character
- * that should be the mnemonic, for example "&Save".
- * If your text has multiple ampersands, only the first one is used to mark
- * the mnemonic; the other ampersands appear as normal text.
- * For example "&Look&Feel" has the first 'L' has mnemonic.
- * If you want to use the ampersand itself in the text, use two consecutive
- * ampersands for any ampersand that precede the one that is used to mark
- * the mnemonic. For example the marked text "R&&D D&epartment"
- * has "R&D Department" as text and the mnemonic is 'E'.<p>
- *
- * Examples:
- * <table border="1">
- * <tr>
- * <td><b>Marked Text</b></td>
- * <td><b>Plain Text</b></td>
- * <td><b>Mnemonic</b></td>
- * <td><b>Mnemonic Index</b></td>
- * <td><b>Comment</b></td>
- * </tr>
- * <tr>
- * <td>Save</td>
- * <td>Save</td>
- * <td>0</td>
- * <td>-1</td>
- * <td>No mnemonic</td>
- * </tr>
- * <tr>
- * <td>&Save</td>
- * <td>Save</td>
- * <td>'S'</td>
- * <td>0</td>
- * <td> </td>
- * </tr>
- * <tr>
- * <td>Save &as</td>
- * <td>Save as</td>
- * <td>'A'</td>
- * <td>5</td>
- * <td>Second 'a' marked</td>
- * </tr>
- * <tr>
- * <td>Look&Feel</td>
- * <td>LookFeel</td>
- * <td>'F'</td>
- * <td>4</td>
- * <td>& should be quoted</td>
- * </tr>
- * <tr>
- * <td>Look&&Feel</td>
- * <td>Look&Feel</td>
- * <td>0</td>
- * <td>-1</td>
- * <td>& is quoted</td>
- * </tr>
- * <tr>
- * <td>&Look&Feel</td>
- * <td>Look&Feel</td>
- * <td>L</td>
- * <td>0</td>
- * <td>Second & needs no quote</td>
- * </tr>
- * <tr>
- * <td>Look & Feel</td>
- * <td>Look & Feel</td>
- * <td>0</td>
- * <td>-1</td>
- * <td>Whitespace cannot be marked</td>
- * </tr>
- * <tr>
- * <td>R&&D D&epartment</td>
- * <td>R&D Department</td>
- * <td>'E'</td>
- * <td>5</td>
- * <td>First & is quoted</td>
- * </tr>
- * <tr>
- * <td><html>a&b</html></td>
- * <td><html>a<u>b</u></html></td>
- * <td>'B'</td>
- * <td>-1</td>
- * <td>'b' is underlined</td>
- * </tr>
- * <tr>
- * <td><html>R&D D&ep.</html></td>
- * <td><html>R&D D<u>e</u>p.</html></td>
- * <td>'B'</td>
- * <td>-1</td>
- * <td>HTML & doesn't mark</td>
- * </tr>
- * </table>
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.12 $
- */
-public final class MnemonicUtils {
-
- /**
- * The single mnemonic marker. Future versions of this class shall
- * support other markers, for example the underline char ('_').
- */
- static final char MNEMONIC_MARKER = '&';
-
-
- // Instance Creation ******************************************************
-
- private MnemonicUtils() {
- // Suppresses default constructor, prevents instantiation.
- }
-
-
- // Setting Text, Mnemonic and Index ***************************************
-
- /**
- * Configures the text, mnemonic and mnemonic index for {@code target}
- * using the given text that can be marked with the mnemonic marker '&'.
- * For example if {@code markedText} is "Save &as", the text
- * will be set to "Save as", the mnemonic is 'a', and the
- * mnemonic index is 5.
- *
- * @param target the button to be configured
- * @param markedText the text with optional mnemonic marker
- * @throws NullPointerException if {@code target} is {@code null}
- */
- public static void configure(AbstractButton target, String markedText) {
- checkNotNull(target, "target must not be null.");
- configure0(target, new MnemonicText(markedText, MNEMONIC_MARKER));
- }
-
-
- /**
- * Configures the text, mnemonic and mnemonic index for {@code target}
- * using the given text that can be marked with the mnemonic marker '&'.
- * For example if {@code markedText} is "Save &as", the text
- * will be set to "Save as", the mnemonic is 'a', and the
- * mnemonic index is 5.
- *
- * @param target the Action to be configured
- * @param markedText the text with optional mnemonic marker
- * @throws NullPointerException if {@code target} is {@code null}
- */
- public static void configure(Action target, String markedText) {
- checkNotNull(target, "target must not be null.");
- configure0(target, new MnemonicText(markedText, MNEMONIC_MARKER));
- }
-
-
- /**
- * Configures the text, mnemonic and mnemonic index for {@code target}
- * using the given text that can be marked with the mnemonic marker '&'.
- * For example if {@code markedText} is "Save &as", the text
- * will be set to "Save as", the mnemonic is 'a', and the
- * mnemonic index is 5.
- *
- * @param target the label to be configured
- * @param markedText the text with optional mnemonic marker
- * @throws NullPointerException if {@code target} is {@code null}
- */
- public static void configure(JLabel target, String markedText) {
- checkNotNull(target, "target must not be null.");
- configure0(target, new MnemonicText(markedText, MNEMONIC_MARKER));
- }
-
-
- // Misc *******************************************************************
-
- /**
- * Returns the plain text for the given marked text by removing
- * the mnemonic marker and marker quotes - if any. If the marked text
- * is HTML, the plain text has the mnemonic character underlined.
- *
- * See the {@link MnemonicUtils} class comment for information
- * about how to mark a mnemonic and how to quote a marker.
- *
- * <pre>
- * MnemonicUtils.plainText("Save") == "Save"
- * MnemonicUtils.plainText("&Save") == "Save"
- * MnemonicUtils.plainText("&Look&Feel") == "Look&Feel"
- * MnemonicUtils.plainText("Look & Feel") == "Look & Feel"
- * MnemonicUtils.plainText("R&&D D&epartment") == "R&D Department"
- * MnemonicUtils.plainText("<html>a&b</html>") == "<html>a<u>b</u></html>"
- * </pre>
- *
- * @param markedText the text that may contain a mnemonic marker
- * @return the text without mnemonic marker and marker quotes
- */
- public static String plainText(String markedText) {
- return new MnemonicText(markedText, MNEMONIC_MARKER).text;
- }
-
-
- // Testing API ************************************************************
-
- /**
- * Extracts and returns the mnemonic from the given marked text.
- *
- * @param markedText the text with optional mnemonic marker
- * @return the mnemonic or {@code 0} if no mnemonic is marked
- */
- static int mnemonic(String markedText) {
- return new MnemonicText(markedText, MNEMONIC_MARKER).key;
- }
-
-
- /**
- * Finds and returns the index of the mnemonic in the marked text.
- *
- * @param markedText the text with optional mnemonic marker
- * @return the mnemonic index or {@code -1} if there's no mnemonic
- * or the text is HTML
- */
- static int mnemonicIndex(String markedText) {
- return new MnemonicText(markedText, MNEMONIC_MARKER).index;
- }
-
-
- // Implementation *********************************************************
-
- private static void configure0(AbstractButton button, MnemonicText mnemonicText) {
- button.setText(mnemonicText.text);
- button.setMnemonic(mnemonicText.key);
- button.setDisplayedMnemonicIndex(mnemonicText.index);
- }
-
-
- /*
- * We set the mnemonic only if non-null. This works around a bug in
- * AbstractButton that can configure itself from an Action with mnemonic
- * set to null but throws an NPE if the Action's mnemonic becomes
- * null afterwards.
- *
- * @see AbstractButton.ButtonActionPropertyChangeListener
- */
- private static void configure0(Action action, MnemonicText mnemonicText) {
- Integer keyValue = Integer.valueOf(mnemonicText.key);
- Integer indexValue = mnemonicText.index == -1
- ? null
- : Integer.valueOf(mnemonicText.index);
- action.putValue(Action.NAME, mnemonicText.text);
- action.putValue(Action.MNEMONIC_KEY, keyValue);
- action.putValue(Action.DISPLAYED_MNEMONIC_INDEX_KEY, indexValue);
- }
-
- private static void configure0(JLabel label, MnemonicText mnemonicText) {
- label.setText(mnemonicText.text);
- label.setDisplayedMnemonic(mnemonicText.key);
- label.setDisplayedMnemonicIndex(mnemonicText.index);
- }
-
-
- // Helper Code ************************************************************
-
- private static final class MnemonicText {
-
- String text;
- int key;
- int index;
-
- private MnemonicText(String markedText, char marker) {
- int i;
- if ( markedText == null
- || markedText.length() <= 1
- || (i = markedText.indexOf(marker)) == -1) {
- text = markedText;
- key = KeyEvent.VK_UNDEFINED;
- index = -1;
- return;
- }
- boolean html = Strings.startsWithIgnoreCase(markedText, "<html>");
- StringBuilder builder = new StringBuilder();
- int begin = 0;
- int quotedMarkers = 0;
- int markerIndex = -1;
- boolean marked = false;
- char markedChar = 0;
- CharacterIterator sci = new StringCharacterIterator(markedText);
- do {
- builder.append(markedText.substring(begin, i));
- char current = sci.setIndex(i);
- char next = sci.next();
- if (html) {
- int entityEnd = indexOfEntityEnd(markedText, i);
- if (entityEnd == -1) {
- marked = true;
- builder.append("<u>").append(next).append("</u>");
- begin = i+2;
- markedChar = next;
- } else {
- builder.append(markedText.substring(i, entityEnd));
- begin = entityEnd;
- }
- } else {
- if (next == marker) { // "Look&&Feel"
- builder.append(next);
- begin = i+2;
- quotedMarkers++;
- } else if (Character.isWhitespace(next)) { // "Look & Feel"
- builder.append(current).append(next);
- begin = i+2;
- } else if (next == CharacterIterator.DONE) {
- builder.append(current);
- begin = i+2;
- } else {
- builder.append(next);
- begin = i+2;
- markerIndex = i - quotedMarkers;
- marked = true;
- markedChar = next;
- }
- }
- i = markedText.indexOf(marker, begin);
- } while (i != -1 && !marked);
- if (begin < markedText.length()) {
- builder.append(markedText.substring(begin));
- }
- text = builder.toString();
- index = markerIndex;
- if (marked) {
- key = mnemonicKey(markedChar);
- } else {
- key = KeyEvent.VK_UNDEFINED;
- }
- }
-
- private static int indexOfEntityEnd(String htmlText, int start) {
- CharacterIterator sci = new StringCharacterIterator(htmlText, start);
- char c;
- do {
- c = sci.next();
- if (c == ';') {
- return sci.getIndex();
- }
- if (!Character.isLetterOrDigit(c)) {
- return -1;
- }
- } while (c != CharacterIterator.DONE);
- return -1;
- }
-
- /* A general purpose way to map from a char to a KeyCode is needed. An
- * AWT RFE has been filed:
- * http://bt2ws.central.sun.com/CrPrint?id=6559449
- * CR 6559449 java/classes_awt Support for converting from char to KeyEvent VK_ keycode
- */
- private static int mnemonicKey(char c) {
- int vk = c;
- if (vk >= 'a' && vk <= 'z') {
- vk -= 'a' - 'A';
- }
- return vk;
- }
- }
-
-
-}
diff --git a/src/core/com/jgoodies/common/swing/package.html b/src/core/com/jgoodies/common/swing/package.html
deleted file mode 100644
index 191efee..0000000
--- a/src/core/com/jgoodies/common/swing/package.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
- Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- o Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- o 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.
-
- o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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.
-
- JavaDoc uses all text between the "body" tags.
- The first sentence is used as short description.
--->
-</head>
-<body bgcolor="white">
-
-Consists of Swing related classes.
-
-<!--
-<h2>Package Specification</h2>
-
-##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT #####
-<ul>
- <li><a href="">##### REFER TO ANY FRAMEMAKER SPECIFICATION HERE #####</a>
-</ul>
--->
-
-
-</body>
-</html>
diff --git a/src/core/overview.html b/src/core/overview.html
deleted file mode 100644
index dd1eba1..0000000
--- a/src/core/overview.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
- Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- o Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- o 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.
-
- o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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.
-
- JavaDoc uses all text between the "body" tags.
- The first sentence is used as short description.
--->
-</head>
-<body bgcolor="white">
-
- This document describes the API of the JGoodies Common, a library
- that provides convenience code for other JGoodies libraries
- and applications. It requires Java 5 or later.
-
-</body>
-</html>
diff --git a/src/test/com/jgoodies/common/AllCommonTests.java b/src/test/com/jgoodies/common/AllCommonTests.java
deleted file mode 100644
index a5d579e..0000000
--- a/src/test/com/jgoodies/common/AllCommonTests.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-import com.jgoodies.common.base.ObjectsTest;
-import com.jgoodies.common.base.PreconditionsTest;
-import com.jgoodies.common.base.StringsTest;
-import com.jgoodies.common.base.SystemUtilsTest;
-import com.jgoodies.common.collect.ObservableListTest;
-import com.jgoodies.common.format.FormatTest;
-import com.jgoodies.common.swing.MnemonicUtilsTest;
-
-/**
- * A test suite for all tests related to the JGoodies Common classes.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.6 $
- */
- at RunWith(Suite.class)
- at Suite.SuiteClasses({
- FormatTest.class,
- MnemonicUtilsTest.class,
- ObjectsTest.class,
- ObservableListTest.class,
- PreconditionsTest.class,
- StringsTest.class,
- SystemUtilsTest.class
-})
-public final class AllCommonTests {
-
- // Just a suite definition class.
-
-}
diff --git a/src/test/com/jgoodies/common/base/ObjectsTest.java b/src/test/com/jgoodies/common/base/ObjectsTest.java
deleted file mode 100644
index 2db4df9..0000000
--- a/src/test/com/jgoodies/common/base/ObjectsTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.base;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-/**
- * Tests the {@link Objects} operations.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.6 $
- */
-public final class ObjectsTest {
-
- @SuppressWarnings("static-method")
- @Test
- public void objectEquality() {
- assertTrue(Objects.equals(null, null));
- assertTrue(Objects.equals("Hi", "Hi"));
- assertFalse(Objects.equals("Hi", null));
- assertFalse(Objects.equals(null, "Hi"));
- assertFalse(Objects.equals("Hi", "Ho"));
- }
-
-
-}
diff --git a/src/test/com/jgoodies/common/base/PreconditionsTest.java b/src/test/com/jgoodies/common/base/PreconditionsTest.java
deleted file mode 100644
index f4ce45c..0000000
--- a/src/test/com/jgoodies/common/base/PreconditionsTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.base;
-
-import org.junit.Test;
-
-/**
- * Tests the {@link Preconditions} class.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.6 $
- */
- at SuppressWarnings("static-method")
-public final class PreconditionsTest {
-
- @Test
- public void checkValidArgument() {
- int count = 1;
- Preconditions.checkArgument(count > 0, "a message");
- }
-
-
- @Test(expected=IllegalArgumentException.class)
- public void checkInvalidArgument() {
- int count = 0;
- Preconditions.checkArgument(count > 0, "a message");
- }
-
-
- @Test
- public void checkNonNull() {
- Preconditions.checkNotNull("Hello", "a message");
- }
-
-
- @Test(expected=NullPointerException.class)
- public void checkNull() {
- Preconditions.checkNotNull(null, "a message");
- }
-
-
- @Test
- public void checkValidState() {
- boolean locked = true;
- Preconditions.checkArgument(locked, "a message");
- }
-
-
- @Test(expected=IllegalStateException.class)
- public void checkInvalidState() {
- boolean locked = false;
- Preconditions.checkState(locked, "a message");
- }
-
-
-}
diff --git a/src/test/com/jgoodies/common/base/StringsTest.java b/src/test/com/jgoodies/common/base/StringsTest.java
deleted file mode 100644
index 8ebc432..0000000
--- a/src/test/com/jgoodies/common/base/StringsTest.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2003-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.base;
-
-import junit.framework.TestCase;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * A test case for class {@link Strings}.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.7 $
- */
-public final class StringsTest extends TestCase {
-
- private static final String EMPTY = "";
- private static final String BLANK = " ";
-
- private static final String TEXT = "abc";
- private static final String SPACE_TEXT = " abc";
- private static final String TEXT_SPACE = "abc ";
- private static final String SPACE_TEXT_SPACE = " abc ";
-
-
- // String Tests ***********************************************************
-
- @Test
- public static void testIsBlank() {
- assertTrue ("Null is blank", Strings.isBlank(null));
- assertTrue ("EMPTY is blank", Strings.isBlank(EMPTY));
- assertTrue ("BLANK is blank", Strings.isBlank(BLANK));
- assertFalse("SPACE_TEXT is not blank", Strings.isBlank(SPACE_TEXT));
- assertFalse("TEXT_SPACE is not blank", Strings.isBlank(TEXT_SPACE));
- assertFalse("SPACE_TEXT_SPACE is not blank", Strings.isBlank(SPACE_TEXT_SPACE));
- }
-
-
- @Test
- public static void testIsNotBlank() {
- assertFalse("Null is not not-blank", Strings.isNotBlank(null));
- assertFalse("EMPTY is not not-blank", Strings.isNotBlank(EMPTY));
- assertFalse("BLANK is not not-blank", Strings.isNotBlank(BLANK));
- assertTrue ("SPACE_TEXT is not-blank", Strings.isNotBlank(SPACE_TEXT));
- assertTrue ("TEXT_SPACE is not-blank", Strings.isNotBlank(TEXT_SPACE));
- assertTrue ("SPACE_TEXT_SPACE is not-blank", Strings.isNotBlank(SPACE_TEXT_SPACE));
- }
-
-
- @Test
- public static void testIsEmpty() {
- assertTrue ("Null is empty", Strings.isEmpty(null));
- assertTrue ("EMPTY is empty", Strings.isEmpty(EMPTY));
- assertFalse("BLANK is not empty", Strings.isEmpty(BLANK));
- assertFalse("SPACE_TEXT is not blank", Strings.isEmpty(SPACE_TEXT));
- assertFalse("TEXT_SPACE is not blank", Strings.isEmpty(TEXT_SPACE));
- assertFalse("SPACE_TEXT_SPACE is not blank", Strings.isEmpty(SPACE_TEXT_SPACE));
- }
-
-
- @Test
- public static void testIsNotEmpty() {
- assertFalse("Null is not not-empty", Strings.isNotEmpty(null));
- assertFalse("EMPTY is not not-empty", Strings.isNotEmpty(EMPTY));
- assertTrue ("BLANK is not-empty", Strings.isNotEmpty(BLANK));
- assertTrue ("SPACE_TEXT is not-empty", Strings.isNotEmpty(SPACE_TEXT));
- assertTrue ("TEXT_SPACE is not-empty", Strings.isNotEmpty(TEXT_SPACE));
- assertTrue ("SPACE_TEXT_SPACE is not-empty", Strings.isNotEmpty(SPACE_TEXT_SPACE));
- }
-
-
- @Test
- public static void testIsTrimmed() {
- assertTrue ("Null is trimmed", Strings.isTrimmed(null));
- assertTrue ("EMPTY is trimmed", Strings.isTrimmed(EMPTY));
- assertFalse("BLANK is not trimmed", Strings.isTrimmed(BLANK));
- assertTrue ("TEXT is trimmed", Strings.isTrimmed(TEXT));
- assertFalse("SPACE_TEXT is not trimmed", Strings.isTrimmed(SPACE_TEXT));
- assertFalse("TEXT_SPACE is not trimmed", Strings.isTrimmed(TEXT_SPACE));
- assertFalse("SPACE_TEXT_SPACE is not trimmed", Strings.isTrimmed(SPACE_TEXT_SPACE));
- }
-
-
- // Operations *********************************************************
-
- @Test
- public static void testAbbreviateCenter() {
- final String empty = "";
- final String blank = " ";
- final String abc = "abc";
- Assert.assertSame(null, Strings.abbreviateCenter(null, 3));
- Assert.assertSame(empty, Strings.abbreviateCenter(empty, 3));
- Assert.assertSame(blank, Strings.abbreviateCenter(blank, 3));
- Assert.assertSame(abc, Strings.abbreviateCenter(abc, 3));
-
- Assert.assertEquals("a\u2026d", Strings.abbreviateCenter("abcd", 3));
- Assert.assertEquals("a\u2026e", Strings.abbreviateCenter("abcde", 3));
- Assert.assertEquals("ab\u2026e", Strings.abbreviateCenter("abcde", 4));
- Assert.assertEquals("ab\u2026f", Strings.abbreviateCenter("abcdef", 4));
- Assert.assertEquals("ab\u2026fg", Strings.abbreviateCenter("abcdefg", 5));
- }
-
-}
diff --git a/src/test/com/jgoodies/common/base/SystemUtilsTest.java b/src/test/com/jgoodies/common/base/SystemUtilsTest.java
deleted file mode 100644
index ef1fbc7..0000000
--- a/src/test/com/jgoodies/common/base/SystemUtilsTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.base;
-
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeTrue;
-
-import org.junit.Test;
-
-/**
- * Tests the {@link SystemUtils} class.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.9 $
- */
- at SuppressWarnings("static-method")
-public final class SystemUtilsTest {
-
- @Test
- public void testJava6() {
- assumeTrue(SystemUtils.IS_JAVA_6);
- assertFalse(SystemUtils.IS_JAVA_7);
- }
-
-
- @Test
- public void testJava7() {
- assumeTrue(SystemUtils.IS_JAVA_7);
- assertTrue(SystemUtils.IS_JAVA_7_OR_LATER);
- assertFalse(SystemUtils.IS_JAVA_6);
- }
-
-
-}
diff --git a/src/test/com/jgoodies/common/collect/ObservableListTest.java b/src/test/com/jgoodies/common/collect/ObservableListTest.java
deleted file mode 100644
index 080aeac..0000000
--- a/src/test/com/jgoodies/common/collect/ObservableListTest.java
+++ /dev/null
@@ -1,900 +0,0 @@
-/*
- * Copyright (c) 2002-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.collect;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.ListIterator;
-
-import javax.swing.event.ListDataEvent;
-import javax.swing.event.ListDataListener;
-
-import junit.framework.TestCase;
-
-import org.junit.Test;
-
-import com.jgoodies.common.test.event.ListDataReport;
-
-/**
- * A test case for classes {@link ArrayListModel} and {@link LinkedListModel}.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.7 $
- */
- at SuppressWarnings("static-method")
-public final class ObservableListTest extends TestCase {
-
- /**
- * Tests the constructor that accepts a collection as initial content.
- */
- @SuppressWarnings("unused")
- @Test
- public void testListConstructor() {
- new ArrayListModel<String>(createEmptyArrayListModel());
- new LinkedListModel<String>(createEmptyArrayListModel());
-
- new ArrayListModel<String>(createSingleElementArrayListModel());
- new LinkedListModel<String>(createSingleElementLinkedListModel());
-
- new ArrayListModel<String>(createFilledArrayListModel());
- new LinkedListModel<String>(createFilledLinkedListModel());
- }
-
- /**
- * Tests a single add operation on different observable lists.
- */
- @Test
- public void testAdd() {
- testAdd(createEmptyArrayListModel());
- testAdd(createEmptyLinkedListModel());
-
- testAdd(createSingleElementArrayListModel());
- testAdd(createSingleElementLinkedListModel());
-
- testAdd(createFilledArrayListModel());
- testAdd(createFilledLinkedListModel());
- }
-
-
- /**
- * Tests a single indexed add operation on different observable lists.
- */
- @Test
- public void testAddIndexed() {
- testAddIndexed(createEmptyArrayListModel(), 0);
- testAddIndexed(createEmptyLinkedListModel(), 0);
-
- testAddIndexed(createSingleElementArrayListModel(), 0);
- testAddIndexed(createSingleElementLinkedListModel(), 0);
- testAddIndexed(createSingleElementArrayListModel(), 1);
- testAddIndexed(createSingleElementLinkedListModel(), 1);
-
- int size1 = createFilledArrayListModel().size();
- for (int i = 0; i <= size1; i++) {
- testAddIndexed(createFilledArrayListModel(), i);
- }
- int size2 = createFilledLinkedListModel().size();
- for (int i = 0; i <= size2; i++) {
- testAddIndexed(createFilledLinkedListModel(), i);
- }
- }
-
-
- /**
- * Tests a multiple add operation on different combinations of observable lists.
- */
- @Test
- public void testAddAll() {
- testAddAll(createEmptyArrayListModel(), createEmptyArrayListModel());
- testAddAll(createEmptyLinkedListModel(), createEmptyArrayListModel());
- testAddAll(createEmptyArrayListModel(), createSingleElementArrayListModel());
- testAddAll(createEmptyLinkedListModel(), createSingleElementArrayListModel());
- testAddAll(createEmptyArrayListModel(), createFilledArrayListModel());
- testAddAll(createEmptyLinkedListModel(), createFilledArrayListModel());
-
- testAddAll(createSingleElementArrayListModel(), createEmptyArrayListModel());
- testAddAll(createSingleElementLinkedListModel(), createEmptyArrayListModel());
- testAddAll(createSingleElementArrayListModel(), createSingleElementArrayListModel());
- testAddAll(createSingleElementLinkedListModel(), createSingleElementArrayListModel());
- testAddAll(createSingleElementArrayListModel(), createFilledArrayListModel());
- testAddAll(createSingleElementLinkedListModel(), createFilledArrayListModel());
-
- testAddAll(createFilledArrayListModel(), createEmptyArrayListModel());
- testAddAll(createFilledLinkedListModel(), createEmptyArrayListModel());
- testAddAll(createFilledArrayListModel(), createSingleElementArrayListModel());
- testAddAll(createFilledLinkedListModel(), createSingleElementArrayListModel());
- testAddAll(createFilledArrayListModel(), createFilledArrayListModel());
- testAddAll(createFilledLinkedListModel(), createFilledLinkedListModel());
- }
-
-
- /**
- * Tests indexed multiple add operations on different combinations of
- * observable lists.
- */
- @Test
- public void testAddAllIndexed() {
- testAddAllIndexed(createEmptyArrayListModel(), createFilledArrayListModel(), 0);
- testAddAllIndexed(createEmptyLinkedListModel(), createFilledArrayListModel(), 0);
-
- testAddAllIndexed(createSingleElementArrayListModel(), createFilledArrayListModel(), 0);
- testAddAllIndexed(createSingleElementLinkedListModel(), createFilledArrayListModel(), 0);
- testAddAllIndexed(createSingleElementArrayListModel(), createFilledArrayListModel(), 1);
- testAddAllIndexed(createSingleElementLinkedListModel(), createFilledArrayListModel(), 1);
-
- int size1 = createFilledArrayListModel().size();
- for (int i = 0; i <= size1; i++) {
- testAddAllIndexed(createFilledArrayListModel(), createFilledArrayListModel(), i);
- }
- int size2 = createFilledLinkedListModel().size();
- for (int i = 0; i <= size2; i++) {
- testAddAllIndexed(createFilledLinkedListModel(), createFilledArrayListModel(), i);
- }
- }
-
-
- /**
- * Tests the #clear operation on different observable lists.
- */
- @Test
- public void testClear() {
- testClear(createEmptyArrayListModel());
- testClear(createEmptyLinkedListModel());
-
- testClear(createSingleElementArrayListModel());
- testClear(createSingleElementLinkedListModel());
-
- testClear(createFilledArrayListModel());
- testClear(createFilledLinkedListModel());
- }
-
-
- /**
- * Tests the #remove(int) operation on different observable lists.
- */
- @Test
- public void testRemoveIndex() {
- testRemoveIndex(createEmptyArrayListModel(), -1);
- testRemoveIndex(createEmptyLinkedListModel(), -1);
- testRemoveIndex(createEmptyArrayListModel(), 0);
- testRemoveIndex(createEmptyLinkedListModel(), 0);
- testRemoveIndex(createEmptyArrayListModel(), 1);
- testRemoveIndex(createEmptyLinkedListModel(), 1);
-
- testRemoveIndex(createSingleElementArrayListModel(), -1);
- testRemoveIndex(createSingleElementLinkedListModel(), -1);
- testRemoveIndex(createSingleElementArrayListModel(), 0);
- testRemoveIndex(createSingleElementLinkedListModel(), 0);
- testRemoveIndex(createSingleElementArrayListModel(), 1);
- testRemoveIndex(createSingleElementLinkedListModel(), 1);
-
- int size1 = createFilledArrayListModel().size();
- for (int i = -1; i <= size1; i++) {
- testRemoveIndex(createFilledArrayListModel(), i);
- }
- int size2 = createFilledLinkedListModel().size();
- for (int i = -1; i <= size2; i++) {
- testRemoveIndex(createFilledLinkedListModel(), i);
- }
- }
-
-
- /**
- * Tests the #remove(Object) operation on different observable lists.
- */
- @Test
- public void testRemoveObject() {
- testRemoveObject(createEmptyArrayListModel(), -1);
- testRemoveObject(createEmptyLinkedListModel(), -1);
- testRemoveObject(createEmptyArrayListModel(), 0);
- testRemoveObject(createEmptyLinkedListModel(), 0);
- testRemoveObject(createEmptyArrayListModel(), 1);
- testRemoveObject(createEmptyLinkedListModel(), 1);
-
- testRemoveObject(createSingleElementArrayListModel(), -1);
- testRemoveObject(createSingleElementLinkedListModel(), -1);
- testRemoveObject(createSingleElementArrayListModel(), 0);
- testRemoveObject(createSingleElementLinkedListModel(), 0);
- testRemoveObject(createSingleElementArrayListModel(), 1);
- testRemoveObject(createSingleElementLinkedListModel(), 1);
-
- int size1 = createFilledArrayListModel().size();
- for (int i = -1; i <= size1; i++) {
- testRemoveObject(createFilledArrayListModel(), i);
- }
- int size2 = createFilledLinkedListModel().size();
- for (int i = -1; i <= size2; i++) {
- testRemoveObject(createFilledLinkedListModel(), i);
- }
- }
-
-
- /**
- * Tests #removeAll on different combinations of observable lists.
- */
- @Test
- public void testRemoveAll() {
- testRemoveAll(createEmptyArrayListModel(), createEmptyArrayListModel());
- testRemoveAll(createEmptyLinkedListModel(), createEmptyArrayListModel());
- testRemoveAll(createEmptyArrayListModel(), createSingleElementArrayListModel());
- testRemoveAll(createEmptyLinkedListModel(), createSingleElementArrayListModel());
- testRemoveAll(createEmptyArrayListModel(), createFilledArrayListModel());
- testRemoveAll(createEmptyLinkedListModel(), createFilledArrayListModel());
-
- testRemoveAll(createSingleElementArrayListModel(), createEmptyArrayListModel());
- testRemoveAll(createSingleElementLinkedListModel(), createEmptyArrayListModel());
- testRemoveAll(createSingleElementArrayListModel(), createSingleElementArrayListModel());
- testRemoveAll(createSingleElementLinkedListModel(), createSingleElementArrayListModel());
- testRemoveAll(createSingleElementArrayListModel(), createFilledArrayListModel());
- testRemoveAll(createSingleElementLinkedListModel(), createFilledArrayListModel());
-
- testRemoveAll(createFilledArrayListModel(), createEmptyArrayListModel());
- testRemoveAll(createFilledLinkedListModel(), createEmptyArrayListModel());
- testRemoveAll(createFilledArrayListModel(), createSingleElementArrayListModel());
- testRemoveAll(createFilledLinkedListModel(), createSingleElementArrayListModel());
- testRemoveAll(createFilledArrayListModel(), createFilledArrayListModel());
- testRemoveAll(createFilledLinkedListModel(), createFilledLinkedListModel());
- }
-
-
- /**
- * Tests #retainAll on different combinations of observable lists.
- */
- @Test
- public void testRetainAll() {
- testRetainAll(createEmptyArrayListModel(), createEmptyArrayListModel());
- testRetainAll(createEmptyLinkedListModel(), createEmptyArrayListModel());
- testRetainAll(createEmptyArrayListModel(), createSingleElementArrayListModel());
- testRetainAll(createEmptyLinkedListModel(), createSingleElementArrayListModel());
- testRetainAll(createEmptyArrayListModel(), createFilledArrayListModel());
- testRetainAll(createEmptyLinkedListModel(), createFilledArrayListModel());
-
- testRetainAll(createSingleElementArrayListModel(), createEmptyArrayListModel());
- testRetainAll(createSingleElementLinkedListModel(), createEmptyArrayListModel());
- testRetainAll(createSingleElementArrayListModel(), createSingleElementArrayListModel());
- testRetainAll(createSingleElementLinkedListModel(), createSingleElementArrayListModel());
- testRetainAll(createSingleElementArrayListModel(), createFilledArrayListModel());
- testRetainAll(createSingleElementLinkedListModel(), createFilledArrayListModel());
-
- testRetainAll(createFilledArrayListModel(), createEmptyArrayListModel());
- testRetainAll(createFilledLinkedListModel(), createEmptyArrayListModel());
- testRetainAll(createFilledArrayListModel(), createSingleElementArrayListModel());
- testRetainAll(createFilledLinkedListModel(), createSingleElementArrayListModel());
- testRetainAll(createFilledArrayListModel(), createFilledArrayListModel());
- testRetainAll(createFilledLinkedListModel(), createFilledLinkedListModel());
- }
-
-
- /**
- * Tests the #set operation on different observable lists.
- */
- @Test
- public void testSet() {
- testSet(createEmptyArrayListModel(), 0);
- testSet(createEmptyLinkedListModel(), 0);
-
- testSet(createSingleElementArrayListModel(), 0);
- testSet(createSingleElementLinkedListModel(), 0);
- testSet(createSingleElementArrayListModel(), 1);
- testSet(createSingleElementLinkedListModel(), 1);
-
- int size1 = createFilledArrayListModel().size();
- for (int i = 0; i < size1; i++) {
- testSet(createFilledArrayListModel(), i);
- }
- int size2 = createFilledLinkedListModel().size();
- for (int i = 0; i < size2; i++) {
- testSet(createFilledLinkedListModel(), i);
- }
- }
-
-
- /**
- * Tests the list iterator's add operation on different observable lists.
- */
- @Test
- public void testListIteratorAdd() {
- testListIteratorAdd(createEmptyArrayListModel(), 0, 0);
- testListIteratorAdd(createEmptyLinkedListModel(), 0, 0);
-
- testListIteratorAdd(createSingleElementArrayListModel(), 0, 0);
- testListIteratorAdd(createSingleElementArrayListModel(), 0, 1);
- testListIteratorAdd(createSingleElementArrayListModel(), 1, 1);
- testListIteratorAdd(createSingleElementLinkedListModel(), 0, 0);
- testListIteratorAdd(createSingleElementLinkedListModel(), 0, 1);
- testListIteratorAdd(createSingleElementLinkedListModel(), 1, 1);
-
- int size1 = createFilledArrayListModel().size();
- for (int i = 0; i <= size1; i++) {
- for (int j = i; j <= size1; j++) {
- testListIteratorAdd(createFilledArrayListModel(), i, j);
- }
- }
- int size2 = createFilledLinkedListModel().size();
- for (int i = 0; i <= size2; i++) {
- for (int j = i; j <= size2; j++) {
- testListIteratorAdd(createFilledLinkedListModel(), i, j);
- }
- }
- }
-
-
- /**
- * Tests the list iterator's remove operation on different observable lists.
- */
- @Test
- public void testListIteratorRemove() {
- testListIteratorRemove(createEmptyArrayListModel(), 0, 0);
- testListIteratorRemove(createEmptyLinkedListModel(), 0, 0);
-
- testListIteratorRemove(createSingleElementArrayListModel(), 0, 0);
- testListIteratorRemove(createSingleElementArrayListModel(), 0, 1);
- testListIteratorRemove(createSingleElementArrayListModel(), 1, 1);
- testListIteratorRemove(createSingleElementLinkedListModel(), 0, 0);
- testListIteratorRemove(createSingleElementLinkedListModel(), 0, 1);
- testListIteratorRemove(createSingleElementLinkedListModel(), 1, 1);
-
- int size1 = createFilledArrayListModel().size();
- for (int i = 0; i < size1; i++) {
- for (int j = i; j < size1; j++) {
- testListIteratorRemove(createFilledArrayListModel(), i, j);
- }
- }
- int size2 = createFilledLinkedListModel().size();
- for (int i = 0; i < size2; i++) {
- for (int j = i; j < size2; j++) {
- testListIteratorRemove(createFilledLinkedListModel(), i, j);
- }
- }
- }
-
-
- /**
- * Tests the list iterator's remove operation on different observable lists.
- */
- @Test
- public void testListIteratorSet() {
- testListIteratorSet(createEmptyArrayListModel(), 0, 0);
- testListIteratorSet(createEmptyLinkedListModel(), 0, 0);
-
- testListIteratorSet(createSingleElementArrayListModel(), 0, 0);
- testListIteratorSet(createSingleElementArrayListModel(), 0, 1);
- testListIteratorSet(createSingleElementArrayListModel(), 1, 1);
- testListIteratorSet(createSingleElementLinkedListModel(), 0, 0);
- testListIteratorSet(createSingleElementLinkedListModel(), 0, 1);
- testListIteratorSet(createSingleElementLinkedListModel(), 1, 1);
-
- int size1 = createFilledArrayListModel().size();
- for (int i = 0; i < size1; i++) {
- for (int j = i; j < size1; j++) {
- testListIteratorSet(createFilledArrayListModel(), i, j);
- }
- }
- int size2 = createFilledLinkedListModel().size();
- for (int i = 0; i < size2; i++) {
- for (int j = i; j < size2; j++) {
- testListIteratorSet(createFilledLinkedListModel(), i, j);
- }
- }
- }
-
-
- /**
- * Tests the iterator's remove operation on different observable lists.
- */
- @Test
- public void testIteratorRemove() {
- testIteratorRemove(createEmptyArrayListModel(), 0);
- testIteratorRemove(createEmptyLinkedListModel(), 0);
-
- testIteratorRemove(createSingleElementArrayListModel(), 0);
- testIteratorRemove(createSingleElementArrayListModel(), 1);
- testIteratorRemove(createSingleElementLinkedListModel(), 0);
- testIteratorRemove(createSingleElementLinkedListModel(), 1);
-
- int size1 = createFilledArrayListModel().size();
- for (int i = 0; i < size1; i++) {
- testIteratorRemove(createFilledArrayListModel(), i);
- }
- int size2 = createFilledLinkedListModel().size();
- for (int i = 0; i < size2; i++) {
- testIteratorRemove(createFilledLinkedListModel(), i);
- }
- }
-
-
- // Test the Event Listener List ******************************************
-
- @Test
- public void testGetListDataListenersWithoutListeners() {
- ListDataListener[] listeners =
- createEmptyArrayListModel().getListDataListeners();
- assertEquals("The list of ArrayListModel's ListDataListeners is empty.",
- 0, listeners.length);
- listeners = createEmptyLinkedListModel().getListDataListeners();
- assertEquals("The list of LinkedListModel's ListDataListeners is empty.",
- 0, listeners.length);
- }
-
-
-
- // Test Implementations **************************************************
-
- private static void testAdd(ObservableList<String> list) {
- ListDataReport listDataReport = new ListDataReport();
- list.addListDataListener(listDataReport);
-
- list.add("OneAdded");
- assertEquals("An element has been added.",
- 1, listDataReport.eventCountAdd());
- assertEquals("One event has been fired.",
- 1, listDataReport.eventCount());
-
- list.add("TwoAdded");
- assertEquals("Another element has been added.",
- 2, listDataReport.eventCountAdd());
- assertEquals("Another event has been fired.",
- 2, listDataReport.eventCountAdd());
- }
-
- private static void testAddIndexed(ObservableList<String> list, int index) {
- ListDataReport listDataReport = new ListDataReport();
- list.addListDataListener(listDataReport);
-
- list.add(index, "OneAdded");
- assertEquals("An element has been added.",
- 1, listDataReport.eventCountAdd());
- assertEquals("One event has been fired.",
- 1, listDataReport.eventCount());
- assertEquals("Proper index0 (first add).",
- index, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1 (first add).",
- index, listDataReport.lastEvent().getIndex1());
-
- list.add(index, "TwoAdded");
- assertEquals("Another element has been added.",
- 2, listDataReport.eventCountAdd());
- assertEquals("Another event has been fired.",
- 2, listDataReport.eventCount());
- assertEquals("Proper index0 (second add).",
- index, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1 (second add).",
- index, listDataReport.lastEvent().getIndex1());
- }
-
-
- private static <E> void testAddAll(ObservableList<E> list, List<E> additions) {
- ListDataReport listDataReport = new ListDataReport();
- list.addListDataListener(listDataReport);
-
- int addCount = additions.size();
- int eventCount = additions.isEmpty() ? 0 : 1;
- int addIndex0 = list.size();
- int addIndex1 = addIndex0 + addCount - 1;
- list.addAll(additions);
- assertEquals("Elements have been added.",
- eventCount, listDataReport.eventCountAdd());
- assertEquals("One event has been fired.",
- eventCount, listDataReport.eventCount());
- if (!additions.isEmpty()) {
- assertEquals("Proper index0 (first addAll).",
- addIndex0, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1 (first addAll).",
- addIndex1, listDataReport.lastEvent().getIndex1());
- }
-
- addIndex0 = list.size();
- addIndex1 = addIndex0 + addCount - 1;
- list.addAll(additions);
- assertEquals("More elements have been added.",
- 2 * eventCount, listDataReport.eventCountAdd());
- assertEquals("Another event has been fired.",
- 2 * eventCount, listDataReport.eventCountAdd());
- if (!additions.isEmpty()) {
- assertEquals("Proper index0 (second addAll).",
- addIndex0, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1 (second addAll).",
- addIndex1, listDataReport.lastEvent().getIndex1());
- }
- }
-
- private static <E> void testAddAllIndexed(ObservableList<E> list, List<E> additions, int index) {
- ListDataReport listDataReport = new ListDataReport();
- list.addListDataListener(listDataReport);
-
- int addCount = additions.size();
- int eventCount = additions.isEmpty() ? 0 : 1;
- int addIndex0 = index;
- int addIndex1 = addIndex0 + addCount - 1;
- list.addAll(index, additions);
- assertEquals("Elements have been added.",
- eventCount, listDataReport.eventCountAdd());
- assertEquals("One event has been fired.",
- eventCount, listDataReport.eventCount());
- if (!additions.isEmpty()) {
- assertEquals("Proper index0 (first addAll).",
- addIndex0, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1 (first addAll).",
- addIndex1, listDataReport.lastEvent().getIndex1());
- }
-
- addIndex0 = index;
- addIndex1 = addIndex0 + addCount - 1;
- list.addAll(index, additions);
- assertEquals("More elements have been added.",
- 2 * eventCount, listDataReport.eventCountAdd());
- assertEquals("Another event has been fired.",
- 2 * eventCount, listDataReport.eventCountAdd());
- if (!additions.isEmpty()) {
- assertEquals("Proper index0 (second addAll).",
- addIndex0, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1 (second addAll).",
- addIndex1, listDataReport.lastEvent().getIndex1());
- }
- }
-
-
- private static <E> void testClear(ObservableList<E> list) {
- ListDataReport listDataReport = new ListDataReport();
- list.addListDataListener(listDataReport);
-
- int eventCount = list.isEmpty() ? 0 : 1;
- int index0 = 0;
- int index1 = list.size() - 1;
- list.clear();
- assertEquals("All elements have been removed.",
- eventCount, listDataReport.eventCountRemove());
- assertEquals("One event has been fired.",
- eventCount, listDataReport.eventCount());
- if (!list.isEmpty()) {
- assertEquals("Proper index0 (first clear).",
- index0, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1 (first clear).",
- index1, listDataReport.lastEvent().getIndex1());
- }
-
- list.clear();
- assertEquals("No further elements have been removed.",
- eventCount, listDataReport.eventCount());
- }
-
-
- private static <E> void testRemoveIndex(ObservableList<E> list, int index) {
- ListDataReport listDataReport = new ListDataReport();
- list.addListDataListener(listDataReport);
-
- if (index < 0 || index >= list.size()) {
- try {
- list.remove(index);
- fail("IndexOutOfBoundsException expected when removing index " + index);
- } catch (IndexOutOfBoundsException e) {
- // Do nothing; this is the expected behavior.
- }
- } else {
- list.remove(index);
- assertEquals("An element has been removed.",
- 1, listDataReport.eventCountRemove());
- assertEquals("One event has been fired.",
- 1, listDataReport.eventCount());
- assertEquals("Proper index0 (first remove).",
- index, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1 (first remove).",
- index, listDataReport.lastEvent().getIndex1());
- }
-
- if (index < 0 || index >= list.size()) {
- try {
- list.remove(index);
- fail("IndexOutOfBoundsException expected when removing index " + index);
- } catch (IndexOutOfBoundsException e) {
- // Do nothing; this is the expected behavior.
- }
- } else {
- list.remove(index);
- assertEquals("Another element has been removed.",
- 2, listDataReport.eventCountRemove());
- assertEquals("Another event has been fired.",
- 2, listDataReport.eventCount());
- assertEquals("Proper index0 (second remove).",
- index, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1 (second remove).",
- index, listDataReport.lastEvent().getIndex1());
- }
- }
-
-
- private static <E> void testRemoveObject(ObservableList<E> list, int index) {
- ListDataReport listDataReport = new ListDataReport();
- list.addListDataListener(listDataReport);
-
- boolean contained = index >= 0 && index < list.size();
- Object object = contained
- ? list.get(index)
- : "AnObjectNotContainedInTheCollection";
-
- boolean removed = list.remove(object);
- assertEquals("Index != -1 iff the list changed.",
- contained, removed);
- if (removed) {
- assertEquals("An element has been removed.",
- 1, listDataReport.eventCountRemove());
- assertEquals("One event has been fired.",
- 1, listDataReport.eventCount());
- assertEquals("Proper index0 (first remove).",
- index, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1 (first remove).",
- index, listDataReport.lastEvent().getIndex1());
- }
- }
-
-
- private static <E> void testRemoveAll(ObservableList<E> list, List<E> removals) {
- ListDataReport listDataReport = new ListDataReport();
- list.addListDataListener(listDataReport);
-
- List<Integer> indicesToRemove = new LinkedList<Integer>();
- List<E> testRemoveList = new LinkedList<E>(list);
- for (E e : removals) {
- int index = testRemoveList.indexOf(e);
- if (index != -1) {
- indicesToRemove.add(Integer.valueOf(index));
- testRemoveList.remove(index);
- }
- }
-
- int oldSize = list.size();
- list.removeAll(removals);
- int newSize = list.size();
- int removedCount = oldSize - newSize;
-
- assertEquals("Removed element count and number of removal indices.",
- removedCount, indicesToRemove.size());
- assertEquals("Elements have been removed.",
- removedCount, listDataReport.eventCountRemove());
- assertEquals("One event has been fired.",
- removedCount, listDataReport.eventCount());
-
- // Check the indices fired by the ObservableList
- Iterator<Integer> indexIterator = indicesToRemove.iterator();
- for (ListDataEvent event : listDataReport.eventList()) {
- int index = indexIterator.next().intValue();
- assertEquals("Proper index0 (removeAll).",
- index, event.getIndex0());
- assertEquals("Proper index1 (removeAll).",
- index, event.getIndex1());
- }
- }
-
-
- private static <E> void testRetainAll(ObservableList<E> list, List<E> retains) {
- ListDataReport listDataReport = new ListDataReport();
- list.addListDataListener(listDataReport);
-
- int oldSize = list.size();
- list.retainAll(retains);
- int newSize = list.size();
- int eventCount = oldSize - newSize;
-
- assertEquals("Elements have been removed.",
- eventCount, listDataReport.eventCountRemove());
- assertEquals("One event has been fired.",
- eventCount, listDataReport.eventCount());
- }
-
-
- private static void testSet(ObservableList<String> list, int index) {
- ListDataReport listDataReport = new ListDataReport();
- list.addListDataListener(listDataReport);
-
- if (index >= list.size()) {
- try {
- list.set(index, "newValue1");
- fail("IndexOutOfBoundsException expected when removing index " + index);
- } catch (IndexOutOfBoundsException e) {
- // Do nothing; this is the expected behavior.
- }
- } else {
- list.set(index, "newValue1");
- assertEquals("An element has been changed.",
- 1, listDataReport.eventCountChange());
- assertEquals("One event has been fired.",
- 1, listDataReport.eventCount());
- assertEquals("Proper index0 (first change).",
- index, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1 (first change).",
- index, listDataReport.lastEvent().getIndex1());
- }
-
- if (index >= list.size()) {
- try {
- list.set(index, "newValue2");
- fail("IndexOutOfBoundsException expected when removing index " + index);
- } catch (IndexOutOfBoundsException e) {
- // Do nothing; this is the expected behavior.
- }
- } else {
- list.set(index, "newValue2");
- assertEquals("Another element has been changed.",
- 2, listDataReport.eventCountChange());
- assertEquals("Another event has been fired.",
- 2, listDataReport.eventCount());
- assertEquals("Proper index0 (second change).",
- index, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1 (second change).",
- index, listDataReport.lastEvent().getIndex1());
- }
- }
-
-
- private static void testListIteratorAdd(ObservableList<String> list, int iteratorIndex, int elementIndex) {
- ListDataReport listDataReport = new ListDataReport();
- list.addListDataListener(listDataReport);
-
- ListIterator<String> listIterator = list.listIterator(iteratorIndex);
- int relativeElementIndex = elementIndex - iteratorIndex;
- for (int i = 0; i < relativeElementIndex; i++) {
- listIterator.next();
- }
- listIterator.add("Added by ListIterator");
-
- assertEquals("An element has been added.",
- 1, listDataReport.eventCountAdd());
- assertEquals("One event has been fired.",
- 1, listDataReport.eventCount());
- assertEquals("Proper index0.",
- elementIndex, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1.",
- elementIndex, listDataReport.lastEvent().getIndex1());
- }
-
-
- private static <E> void testListIteratorRemove(
- ObservableList<E> list,
- int iteratorIndex,
- int elementIndex) {
- ListDataReport listDataReport = new ListDataReport();
- list.addListDataListener(listDataReport);
-
- ListIterator<E> listIterator = list.listIterator(iteratorIndex);
- int relativeElementIndex = elementIndex - iteratorIndex;
- for (int i = 0; i <= relativeElementIndex && listIterator.hasNext(); i++) {
- listIterator.next();
- }
- if (elementIndex < list.size()) {
- listIterator.remove();
- assertEquals("An element has been removed.",
- 1, listDataReport.eventCountRemove());
- assertEquals("One event has been fired.",
- 1, listDataReport.eventCount());
- assertEquals("Proper index0.",
- elementIndex, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1.",
- elementIndex, listDataReport.lastEvent().getIndex1());
- }
- }
-
-
- private static <E> void testListIteratorSet(
- ObservableList<String> list,
- int iteratorIndex,
- int elementIndex) {
- ListDataReport listDataReport = new ListDataReport();
- list.addListDataListener(listDataReport);
-
- ListIterator<String> listIterator = list.listIterator(iteratorIndex);
- int relativeElementIndex = elementIndex - iteratorIndex;
- for (int i = 0; i <= relativeElementIndex && listIterator.hasNext(); i++) {
- listIterator.next();
- }
- if (elementIndex < list.size()) {
- listIterator.set("newValue1");
- assertEquals("One event has been fired.",
- 1, listDataReport.eventCount());
- assertEquals("An element has been removed.",
- 1, listDataReport.eventCountChange());
- assertEquals("Proper index0.",
- elementIndex, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1.",
- elementIndex, listDataReport.lastEvent().getIndex1());
- }
- }
-
-
- private static <E> void testIteratorRemove(
- ObservableList<E> list,
- int elementIndex) {
- ListDataReport listDataReport = new ListDataReport();
- list.addListDataListener(listDataReport);
-
- Iterator<E> iterator = list.iterator();
- for (int i = 0; i <= elementIndex && iterator.hasNext(); i++) {
- iterator.next();
- }
- if (elementIndex < list.size()) {
- iterator.remove();
- assertEquals("An element has been removed.",
- 1, listDataReport.eventCountRemove());
- assertEquals("One event has been fired.",
- 1, listDataReport.eventCount());
- assertEquals("Proper index0.",
- elementIndex, listDataReport.lastEvent().getIndex0());
- assertEquals("Proper index1.",
- elementIndex, listDataReport.lastEvent().getIndex1());
- }
- }
-
- // Creating Observable Lists *********************************************
-
- private static ArrayListModel<String> createEmptyArrayListModel() {
- return new ArrayListModel<String>();
- }
-
- private static LinkedListModel<String> createEmptyLinkedListModel() {
- return new LinkedListModel<String>();
- }
-
- private static ArrayListModel<String> createSingleElementArrayListModel() {
- ArrayListModel<String> list = new ArrayListModel<String>();
- list.add("One");
- return list;
- }
-
- private static LinkedListModel<String> createSingleElementLinkedListModel() {
- LinkedListModel<String> list = new LinkedListModel<String>();
- list.add("One");
- return list;
- }
-
- private static ArrayListModel<String> createFilledArrayListModel() {
- ArrayListModel<String> list = new ArrayListModel<String>();
- list.add("One");
- list.add("Two");
- list.add("Three");
- list.add("Four");
- list.add("Five");
- list.add("Six");
- return list;
- }
-
- private static LinkedListModel<String> createFilledLinkedListModel() {
- LinkedListModel<String> list = new LinkedListModel<String>();
- list.add("One");
- list.add("Two");
- list.add("Three");
- list.add("Four");
- list.add("Five");
- list.add("Six");
- return list;
- }
-
-
-}
diff --git a/src/test/com/jgoodies/common/format/FormatTest.java b/src/test/com/jgoodies/common/format/FormatTest.java
deleted file mode 100644
index 91fb041..0000000
--- a/src/test/com/jgoodies/common/format/FormatTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.format;
-
-import static org.junit.Assert.assertEquals;
-
-import java.text.DateFormat;
-import java.text.NumberFormat;
-import java.text.ParseException;
-import java.util.Date;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Tests classes {@link EmptyDateFormat} and {@link EmptyNumberFormat}.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.5 $
- */
-public final class FormatTest {
-
- @SuppressWarnings({"deprecation", "static-method"})
- @Test
- public void emptyDateFormat() {
- Date day1 = new Date(1967, 11, 5);
- Date day2 = new Date(2010, 4, 17);
- DateFormat defaultFormat = DateFormat.getDateInstance();
- DateFormat emptyFormat1 = new EmptyDateFormat(defaultFormat);
- DateFormat emptyFormat2 = new EmptyDateFormat(defaultFormat, day2);
- String formatted = defaultFormat.format(day1);
- testParseDate("Empty", emptyFormat1, "", null);
- testParseDate("Whitespace", emptyFormat1, " ", null);
- testParseDate("Empty", emptyFormat2, "", day2);
- testParseDate("Whitespace", emptyFormat2, " ", day2);
- testParseDate("Day1 (raw)", defaultFormat, formatted, day1);
- testParseDate("Day1 (wrapped)", emptyFormat1, formatted, day1);
- testParseDate("Day1 (wrapped)", emptyFormat2, formatted, day1);
- }
-
-
- @SuppressWarnings("static-method")
- @Test
- public void emptyNumberFormat() {
- Number number1 = Long.valueOf(42);
- Number number2 = Double.valueOf(1.03d);
- NumberFormat defaultFormat = NumberFormat.getInstance();
- NumberFormat emptyFormat1 = new EmptyNumberFormat(defaultFormat);
- NumberFormat emptyFormat2 = new EmptyNumberFormat(defaultFormat, number2);
- String formatted = defaultFormat.format(number1);
- testParseNumber("Empty", emptyFormat1, "", null);
- testParseNumber("Whitespace", emptyFormat1, " ", null);
- testParseNumber("Empty", emptyFormat2, "", number2);
- testParseNumber("Whitespace", emptyFormat2, " ", number2);
- testParseNumber("Number1 (raw)", defaultFormat, formatted, number1);
- testParseNumber("Number1 (wrapped)", emptyFormat1, formatted, number1);
- testParseNumber("Number1 (wrapped)", emptyFormat2, formatted, number1);
- }
-
-
- // Helper Code ************************************************************
-
- private static void testParseDate(String message, DateFormat format, String source, Date expected) {
- try {
- Object actual = format.parse(source);
- assertEquals(message, expected, actual);
- } catch (ParseException e) {
- Assert.fail(e.getLocalizedMessage());
- }
- }
-
-
- private static void testParseNumber(String message, NumberFormat format, String source, Number expected) {
- try {
- Object actual = format.parse(source);
- assertEquals(message, expected, actual);
- } catch (ParseException e) {
- Assert.fail(e.getLocalizedMessage());
- }
- }
-
-
-}
diff --git a/src/test/com/jgoodies/common/swing/MnemonicUtilsTest.java b/src/test/com/jgoodies/common/swing/MnemonicUtilsTest.java
deleted file mode 100644
index ca9889b..0000000
--- a/src/test/com/jgoodies/common/swing/MnemonicUtilsTest.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright (c) 2009-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.swing;
-
-import static org.junit.Assert.assertEquals;
-
-import javax.swing.JLabel;
-
-import org.junit.Test;
-
-/**
- * Tests the {@link MnemonicUtils} class.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.11 $
- */
- at SuppressWarnings("static-method")
-public final class MnemonicUtilsTest {
-
- @Test
- public void htmlText() {
- testMnemonic("<html>abc&def</html>", "<html>abc<u>d</u>ef</html>", 'D', -1);
- testMnemonic("<html>a&bcdef</html>", "<html>a&bcdef</html>", 0, -1);
- testMnemonic("<html>a&bc&def</html>", "<html>a&bc<u>d</u>ef</html>", 'D', -1);
- }
-
-
- @Test
- public void mix() {
- testMnemonic("Save", "Save", 0, -1);
- testMnemonic("S&ave", "Save", 'A', 1);
- testMnemonic("Save &as", "Save as", 'A', 5);
- testMnemonic("Look&Feel", "LookFeel", 'F', 4);
- testMnemonic("Look&&Feel", "Look&Feel", 0, -1);
- testMnemonic("Look&&&Feel", "Look&Feel", 'F', 5);
- testMnemonic("Look & Feel", "Look & Feel", 0, -1);
- testMnemonic("Look & &Feel", "Look & Feel", 'F', 7);
- testMnemonic("Look & Feel&", "Look & Feel&", 0, -1);
- testMnemonic("Look & Feel& ", "Look & Feel& ", 0, -1);
- testMnemonic("&&abc&&def&&g", "&abc&def&g", 0, -1);
- testMnemonic("&&abc&&def&g", "&abc&defg", 'G', 8);
- }
-
-
- @Test
- public void testLabelWithoutMnemonic() {
- testMnemonic("", "", 0, -1);
- testMnemonic(" ", " ", 0, -1);
- testMnemonic(" ", " ", 0, -1);
- testMnemonic(" ", " ", 0, -1);
- testMnemonic("a", "a", 0, -1);
- testMnemonic("a ", "a ", 0, -1);
- testMnemonic(" a", " a", 0, -1);
- testMnemonic(" a ", " a ", 0, -1);
- testMnemonic("abcd", "abcd", 0, -1);
- testMnemonic("abcd ", "abcd ", 0, -1);
- }
-
-
- @Test
- public void testLabelWithSingleMnemonicMarker() {
- testMnemonic("&x", "x", 'X', 0);
- testMnemonic("a&x", "ax", 'X', 1);
- testMnemonic("ab&x", "abx", 'X', 2);
- testMnemonic("abc&x", "abcx", 'X', 3);
- testMnemonic("abc&x ", "abcx ", 'X', 3);
- testMnemonic("x&x", "xx", 'X', 1);
- testMnemonic("xa&x", "xax", 'X', 2);
- testMnemonic("xab&x", "xabx", 'X', 3);
- testMnemonic("xabc&x", "xabcx", 'X', 4);
- testMnemonic("xabc&x ", "xabcx ", 'X', 4);
- testMnemonic("X&x", "Xx", 'X', 1);
- testMnemonic("Xa&x", "Xax", 'X', 2);
- testMnemonic("Xab&x", "Xabx", 'X', 3);
- testMnemonic("Xabc&x", "Xabcx", 'X', 4);
- testMnemonic("Xabc&x ", "Xabcx ", 'X', 4);
- }
-
-
- @Test
- public void testLabelWithSingleQuotedMnemonicMarker() {
- testMnemonic("&&", "&", 0, -1);
- testMnemonic("a&&", "a&", 0, -1);
- testMnemonic("ab&&", "ab&", 0, -1);
- testMnemonic("abc&&", "abc&", 0, -1);
- testMnemonic("abc&& ", "abc& ", 0, -1);
- testMnemonic("abc&&a", "abc&a", 0, -1);
- testMnemonic("abc&&ab", "abc&ab", 0, -1);
- testMnemonic("abc&&ab ", "abc&ab ", 0, -1);
- }
-
-
- @Test
- public void testLabelWithMultipleMnemonicMarkers() {
- testMnemonic("&x&x", "x&x", 'X', 0);
- testMnemonic("a&x&x", "ax&x", 'X', 1);
- testMnemonic("ab&x&x", "abx&x", 'X', 2);
- testMnemonic("abc&x&x", "abcx&x", 'X', 3);
- testMnemonic("abc&x &x", "abcx &x", 'X', 3);
- testMnemonic("x&x&x", "xx&x", 'X', 1);
- testMnemonic("xa&x&x", "xax&x", 'X', 2);
- testMnemonic("xab&x&x", "xabx&x", 'X', 3);
- testMnemonic("xabc&x&x", "xabcx&x", 'X', 4);
- testMnemonic("xabc&x &x", "xabcx &x",'X', 4);
- testMnemonic("X&x&x", "Xx&x", 'X', 1);
- testMnemonic("Xa&x&x", "Xax&x", 'X', 2);
- testMnemonic("Xab&x&x", "Xabx&x", 'X', 3);
- testMnemonic("Xabc&x&x", "Xabcx&x", 'X', 4);
- testMnemonic("Xabc&x &x", "Xabcx &x",'X', 4);
- }
-
-
- @Test
- public void testLabelWithQuotedMarkerBeforeMnemonic() {
- testMnemonic("L&&F &choice", "L&F choice", 'C', 4);
- testMnemonic("&&&x", "&x", 'X', 1);
- testMnemonic("&&a&x", "&ax", 'X', 2);
- testMnemonic("&&ab&x", "&abx", 'X', 3);
- testMnemonic("&&abc&x", "&abcx", 'X', 4);
- testMnemonic("&&abc&x ", "&abcx ", 'X', 4);
- testMnemonic("&&x&x", "&xx", 'X', 2);
- testMnemonic("&&xa&x", "&xax", 'X', 3);
- testMnemonic("&&xab&x", "&xabx", 'X', 4);
- testMnemonic("&&xabc&x", "&xabcx", 'X', 5);
- testMnemonic("&&xabc&x ", "&xabcx ", 'X', 5);
- testMnemonic("&&X&x", "&Xx", 'X', 2);
- testMnemonic("X&&a&x", "X&ax", 'X', 3);
- testMnemonic("X&&ab&x", "X&abx", 'X', 4);
- testMnemonic("X&&abc&x", "X&abcx", 'X', 5);
- testMnemonic("X&&abc&x ", "X&abcx ", 'X', 5);
- }
-
-
- @Test
- public void testLabelWithQuotedMarkerAfterMnemonic() {
- testMnemonic("&Look&&Feel choice", "Look&&Feel choice", 'L', 0);
- testMnemonic("&x&&", "x&&", 'X', 0);
- testMnemonic("a&x&&", "ax&&", 'X', 1);
- testMnemonic("ab&x&&", "abx&&", 'X', 2);
- testMnemonic("abc&x&&", "abcx&&", 'X', 3);
- testMnemonic("abc&x &&", "abcx &&", 'X', 3);
- testMnemonic("a&x&&b", "ax&&b", 'X', 1);
- testMnemonic("a&xb&&c", "axb&&c", 'X', 1);
- testMnemonic("a&xbc&&", "axbc&&", 'X', 1);
- testMnemonic("a&xb&&c", "axb&&c", 'X', 1);
- }
-
-
- @Test
- public void testLabelWithQuotedMarkersBeforeAndAfterMnemonic() {
- testMnemonic("a&&b&&c&&d&x&&e&&f&&", "a&b&c&dx&&e&&f&&", 'X', 7);
- testMnemonic("a&&b&&c&&d&x&&e&&f&&g", "a&b&c&dx&&e&&f&&g",'X', 7);
- }
-
-
- // Helper Code ************************************************************
-
- private static void testMnemonic(String markedText,
- String expectedPlainText,
- int expectedMnemonic,
- int expectedMnemonicIndex) {
- JLabel label = new JLabel("");
- MnemonicUtils.configure(label, markedText);
- assertEquals("Text",
- expectedPlainText,
- label.getText());
- assertEquals("Mnemonic",
- expectedMnemonic,
- label.getDisplayedMnemonic());
- assertEquals("Mnemonic index",
- expectedMnemonicIndex,
- label.getDisplayedMnemonicIndex());
- }
-
-
-}
diff --git a/src/test/com/jgoodies/common/test/event/ListDataReport.java b/src/test/com/jgoodies/common/test/event/ListDataReport.java
deleted file mode 100644
index d4dafd5..0000000
--- a/src/test/com/jgoodies/common/test/event/ListDataReport.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (c) 2002-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * o Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * o 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.
- *
- * o Neither the name of JGoodies Karsten Lentzsch 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 COPYRIGHT OWNER 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 com.jgoodies.common.test.event;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.ListIterator;
-
-import javax.swing.event.ListDataEvent;
-import javax.swing.event.ListDataListener;
-
-/**
- * A ListDataListener that stores the received ListDataEvents.
- *
- * @author Karsten Lentzsch
- * @version $Revision: 1.6 $
- */
-public final class ListDataReport implements ListDataListener {
-
- /**
- * Holds a list of all received ListDataEvents.
- */
- private final List<ListDataEvent> allEvents = new LinkedList<ListDataEvent>();
-
- /**
- * Holds a list of all received add ListDataEvents.
- */
- private final List<ListDataEvent> addEvents = new LinkedList<ListDataEvent>();
-
- /**
- * Holds a list of all received remove ListDataEvents.
- */
- private final List<ListDataEvent> removeEvents = new LinkedList<ListDataEvent>();
-
- /**
- * Holds a list of all received change ListDataEvents.
- */
- private final List<ListDataEvent> changeEvents = new LinkedList<ListDataEvent>();
-
-
- // Implementing the ListDataListener Interface ***************************
-
- /**
- * Sent after the indices in the index0,index1
- * interval have been inserted in the data model.
- * The new interval includes both index0 and index1.
- *
- * @param evt a {@code ListDataEvent} encapsulating the
- * event information
- */
- @Override
- public void intervalAdded(ListDataEvent evt) {
- allEvents.add(0, evt);
- addEvents.add(0, evt);
- }
-
-
- /**
- * Sent after the indices in the index0,index1 interval
- * have been removed from the data model. The interval
- * includes both index0 and index1.
- *
- * @param evt a {@code ListDataEvent} encapsulating the
- * event information
- */
- @Override
- public void intervalRemoved(ListDataEvent evt) {
- allEvents.add(0, evt);
- removeEvents.add(0, evt);
- }
-
-
- /**
- * Sent when the contents of the list has changed in a way
- * that's too complex to characterize with the previous
- * methods. For example, this is sent when an item has been
- * replaced. Index0 and index1 bracket the change.
- *
- * @param evt a {@code ListDataEvent} encapsulating the
- * event information
- */
- @Override
- public void contentsChanged(ListDataEvent evt) {
- allEvents.add(0, evt);
- changeEvents.add(0, evt);
- }
-
-
- // Public Report API *****************************************************
-
- private ListDataEvent getEvent(int index) {
- return allEvents.get(index);
- }
-
- public ListDataEvent lastEvent() {
- return eventCount() > 0
- ? getEvent(0)
- : null;
- }
-
- public ListDataEvent previousEvent() {
- return eventCount() > 1
- ? getEvent(1)
- : null;
- }
-
- public List<ListDataEvent> eventList() {
- return allEvents;
- }
-
- public int eventCount() {
- return allEvents.size();
- }
-
- public int eventCountAdd() {
- return addEvents.size();
- }
-
- public int eventCountRemove() {
- return removeEvents.size();
- }
-
- public int eventCountChange() {
- return changeEvents.size();
- }
-
- public boolean hasEvents() {
- return !allEvents.isEmpty();
- }
-
- public void clearEventList() {
- allEvents.clear();
- }
-
-
- // ************************************************************************
-
- /**
- * Compares this report's event list with the event list
- * of the given object and ignores the source of the contained
- * ListDataEvents that may differ.
- *
- * @param o the object to compare with
- * @return true if equal, false if not
- *
- * @see java.util.AbstractList#equals(Object)
- */
- @Override
- public boolean equals(Object o) {
- if (o == this) {
- return true;
- }
- if (!(o instanceof ListDataReport)) {
- return false;
- }
-
- ListIterator<ListDataEvent> e1 = eventList().listIterator();
- ListIterator<ListDataEvent> e2 = ((ListDataReport) o).eventList().listIterator();
- while (e1.hasNext() && e2.hasNext()) {
- ListDataEvent evt1 = e1.next();
- ListDataEvent evt2 = e2.next();
- if (!equalListDataEvents(evt1, evt2)) {
- return false;
- }
- }
- return !(e1.hasNext() || e2.hasNext());
- }
-
- /**
- * Poor but valid implementation. Won't be used.
- *
- * @return this reports hash code
- */
- @Override
- public int hashCode() {
- return eventList().size();
- }
-
-
- /**
- * Checks and answers whether the two given ListDataEvents
- * have the same type and indices. The source may differ.
- */
- private static boolean equalListDataEvents(ListDataEvent evt1, ListDataEvent evt2) {
- return evt1.getType() == evt2.getType()
- && evt1.getIndex0() == evt2.getIndex0()
- && evt1.getIndex1() == evt2.getIndex1();
- }
-
-
-}
--
libjgoodies-common-java packaging
More information about the pkg-java-commits
mailing list