Quality First SoftwareQuality First Software
qflib
Introduction
IntroductionPackagesExamplesAPI DocumentationProjects
On this page
Description
License
Requirements
Installation
Feedback
History
Todo
Deutsche Version
Beschreibung
Lizenz
Voraussetzungen
Installation
Feedback
Versionen
Todo
Description

qflib is a Java library created by Quality First Software during the development of our Java GUI test tool qftest to encapsulate the reusable parts. It is compatible with JDK 1.1 through JDK 1.3 and is composed of a mixture of packages, covering various aspects of Java program design.

de.qfs.lib.command
Mechanism for the dispatch and execution of commands at a higher level of abstraction than the AWT event loop.
de.qfs.lib.config
Manages end user customizations like window size and position, colum size and order in a table and other general options. Saving is done in an ASCII file to enable the end user to read and edit the configuration.
de.qfs.lib.gui
Various GUI related classes. The highlight is an extension of the Swing JTable that has filtering and sorting capabilities, packing everything together into a very easy to use helper class.
de.qfs.lib.log
Easy creation and powerful management of log messages. Small and independent of the rest of qflib and of the collection classes.
de.qfs.lib.logrmi
Interfaces the de.qfs.lib.log package to the log server qflog. Gives the user full control over log message creation at runtime, thus minimizing performance penalties.
de.qfs.lib.option
Combines de.qfs.lib.gui and de.qfs.lib.config with the concept of options, user definable parameters. Dialogs to edit these options can be created through a simple set of properties.
de.qfs.lib.transaction
Client side support for transactions with commit and rollback.
de.qfs.lib.tree
Utilities for tree creation, traversal and manipulation.
de.qfs.lib.util
Collection of small but useful utilities.

The API documentation of the released parts of qflib is available here, to get a copy of qflib, please visit the Quality First Software download page.

Since the qflib library has proven to be very useful during the development of qftest, we decided to release it to the public free of charge under an Open Source license. In this way we want to give back a little something to the free software community, which has produced so much great software over the years.

It should be taken into account that qflib is developed primarily for use in Quality First Software projects. This means that some of its features are only implemented as far as we need them to be. Also we may have to change some interfaces, which may cause inconveniences if you want to upgrade. We will however try to keep these changes to a minimum and provide the means for a smooth upgrade when they cannot be avoided. We will also do our best to incorporate contributions from other qflib users and fill in the blanks ourselves where possible. In any case, the free availability of the source ensures that using qflib in your projects will not lead into a dead end.

License

qflib is distributed for free under the terms of the Mozilla Public License Version 1.1, MPL for short. It comes without warranty of any kind. The license grants you free use of qflib, access to the source and the right to modify and redistribute it.

The only restrictions are that you cannot remove Quality First Software's copyright and that modifications of qflib are automatically covered by the MPL as well. Code that just uses the library through its published interface (referred to as "greater work" in the license) is free to use any license whatever.

As long as these conditions are met there is nothing to inhibit commercial use or commercial distribution of qflib, e.g. together with other software on a CD-rom.

We decided in favor of the MPL because it appears to be a good compromise between protecting openness and free use on the one hand and enabling interoperation with third party software under any license on the other. The text of the license is short and precise compared to others and is comprehensible for the layman.

Requirements

qflib comes in two flavours, one for JDK 1.1 with Swing 1.1 and one for JDK 1.2 and above. Both versions are essentially the same, the only difference being the location of the collection classes.

The collection framework is a part of the Java Foundation Classes (JFC). With the release of JDK 1.2 the JFC were integrated into the standard Java class library.

Since the collection classes are far superior to their predecessors Vector and Hashtable, use of them is widespread throughout qflib. SUN has released a JDK 1.1 compatible version of the collection classes under http://java.sun.com/beans/infobus/#DOWNLOAD_COLLECTIONS. To use qflib with JDK 1.1, the collections.jar archive from the above release must be present on your CLASSPATH.

Installation

Simply ensure that the correct qflib jar archive for your environment is present on your CLASSPATH, i.e. qflib_11.jar for JDK 1.1 or qflib_12.jar for JDK 1.2 and above. In the case of JDK 1.2 it is also possible to simply copy qflib_12.jar into the jre/lib/ext directory of your JDK installation.

To test the installation execute
java de.qfs.lib.Version
This should print a short message stating the installed qflib version.

Feedback

Every kind of feedback is welcome. Please send comments, bug reports, patches, feature requests etc. to qflib@qfs.de.

History
4/25/2001

Version 0.98.1 introduces a new experimental package for generic tree traversal and manipulation and a new OptionGroup that arranges options in a tree structure.

The highlight of this release is the new TableOptionEdit class. It provides everything you need to edit values from a two-dimensional array in a JTable. It features edit, insert, delete and move row operations and has workarounds for many of the little annoyances of a vanilla JTable. String, boolean and integer columns are currently supported. For the next release we plan to make it more extensible and customizable.

New Features:

Bugs fixed:

  • The warning type was not available for Message dialogs.
  • The Meta hack in EventQueue is now enabled by default for the HP JDK. Also fixed the delete hack.
2/20/2001

Te release of version 0.98.0 took far too long, so it includes quite a lot of changes. Also included is a new demo (Options.java) for the option package in the demo directory.

New features:

  • The logging system has been redesigned to separate the issues of filtering, writing and formatting into specialized classes and interfaces. This time the changes are fully backwards compatible. Special thanks to Oliver Brandt of ATecoM GmbH who provided most of this code. Based on this there is now support for writing messages to a log file that is limited in size, starting a new one when it fills.
  • The LogSetup class in the util package can be used to set up the various aspects of the logging system through a wide range of command line arguments.
  • The option package has undergone a major overhaul:
    • Things look and behave nicer and there is better support for enabled/disabled edits and groups.
    • TextOptionEdits can have their own JScrollPane.
    • The new EditorOptionEdit can be used, among other things, to display and edit HTML.
    • RadioOptionGroups now can have a frame and title of their own.
    • The TextOption class now has static methods split and join to convert between a string array and a multi line string.
    • The OptionGroup/OptionEdit tree hierarchy has been made public and can be traversed.
    • OptionDialogs are now based on the new ModalDialog class so the buttons of an OptionDialog are now configurable.
    • Mnemonics for keyboard accelerators can be set for buttons and OptionEdits.
  • A new common base class for message and option dialogs is introduced with gui/ModalDialog. It simplifies configuration of the buttons of a dialog.
  • The new class MultiMap is an implementation of the Map interface that stores more than one value per key. Initially written mainly as a base for the MRUCache (see below) it already proved its usefulness many times.
  • Based on the MultiMap, the new class MRUCache stores only a limited number of resources, keeping the most recently used ones when it starts to overflow. This is similar in a way to a WeakHashMap, but also works with JDK 1.1.
  • ExtensionFileFilteris a generic implementation of an extension based file filter that can be used with AWT, Swing and File.list().
  • The EventQueue now uses a trick to get inside the AWT event queue thread even for JDK 1.1 This means that the ExceptionHandler will now work for JDK 1.1 along with the other EventQueue hacks. There also is a new hack that fixes Alt-... keybindings for some Motif based JDKs (eg. IBM's JDKs for Linux), so menu shortcuts will work again and another hack for the Blackdown JDK 1.3 to fix the Delete key.
  • Commands may now signal the CommandDistributor that they don't require a handler. This avoids UnhandledCommandExceptions for message type commands.
  • The ArgsParser has new methods to set default values for command line options and to ease evaluation of the parse result. Also the new parameter indicator '=' has been added.
  • For better comformance with similar methods in option/OptionSet and util/ArgsParser, MapResourceBundle.getInteger has been deprecated and replaced with getInt.
  • util/MessageCollector now has an instance mechanism to associate collectors with the current thread.
  • A little utility called gui/EventQueueMark can be used to distinguish artificial events from user-generated ones.
  • The new config/RelativeDialogConfigWrapper class stores a dialog's location relative to some other window instead of its absolute position on the screen.

Bugs fixed:

  • SwingUtil.withEvents used together with qflib's EventQueue had problems under JDK 1.2. This lead to a deadlock in qflog when loading log files.
  • The EventQueue tab hack is now applied only for events with the SHIFT mask set. Otherwise using Alt-tab to switch to a Java window could cause generation of an artificial tab key input event.
  • SortedTableHelper now cancels table editing automatically when the sort order or the filter settings change.
  • The LevelTreeSelectionModel had a bug that caused a NullPointerException when the root of a tree was visible.
  • A timing problem in gui/MultiPane could cause the initial divider setting to override the saved and restored setting.
  • log/TreeFilter could not be compiled without the JUnit framework.
  • The constant FATAL_ERROR in util/MessageCollector is now 3 (it was accidentally defined as 0).
  • showPopup in gui/SwingUtil didn't work if the parent component was itself a window. It also had a bug in constraining the popup to the window.
  • The Configurator had a bug in remove, that caused unregistration of the Configurable to fail.
  • When restoring the state of a JToolBar, the JToolBarConfigWrapper now takes care of the toolbar's orientation.
8/22/2000

Version 0.97.1 is mainly a maintenance release.

The examples page now has a section for the de.qfs.lib.gui package, starting with an explanation of how to create and maintain a sorted table.

In order to provide working examples in addition to the code snippets on the examples page, we added the demo directroy which so far contains SortedTable.java, a little demonstration for a sorted table that includes filtering.

New features:

  • A TextOptionEdit now has an optional scroll pane.
  • The updateUI method was added to SortedTableHelper. It must be called when the sorted table's UI changes in order to get a proper header renderer for the new UI.

Bugs fixed:

7/10/2000

With version 0.97.0 the de.qfs.lib.transaction package is introduced and the RMI-dependent classes have been separated out of the de.qfs.lib.log package into the new de.qfs.lib.logrmi package. This change was necessary to enable logging for applets that have to run inside versions of Internet Explorer that don't support RMI.

Included for the first time is a small emacs lisp package that greatly simplifies logging and writing javadoc comments.

Incompatible changes:

  • User visible changes caused by the split of the de.qfs.lib.log package should be constrained to the class RemoteLogFilter.
  • The log server qflog is hit a lot harder by this change. A new, compatible version is also available.
  • The class ValueEdit and derived classes in the de.qfs.lib.gui package have been removed since they were never meant to be there and only slipped in through a configuration bug. They can still be found in the old qflib versions but should be replaced with Options from the de.qfs.lib.option package.

New features:

  • The de.qfs.lib.transaction package adds support for client side handling of transactions. Simple actions can be collected in a Transaction to form a complex action that can be commited when all parts fit together or rolled back when something goes wrong.
  • The class FocusFixer in the de.qfs.lib.gui package implements a workaround for a very annoying bug in JDK 1.1 that happens only with the motif toolkit and lets windows forget which of their components has the focus when they are deactivated.
  • Nested OptionSets are enhanced by allowing Options from a nested set to be queried directly.
  • The ArgsParser for command line arguments throws more detailed exceptions that have information about the incorrect option. To that end the new exceptionsMissingParameterException, UnexpectedParameterException and UnknownOptionException were added.
  • A simple mechanism for collecting warnings and error messages is implemented in the MessageCollector class.
  • An emacs lisp package named qflib.el is provided in the misc directory. It greatly simplifies the use of the de.qfs.lib.log package and has a few useful functions beyond that.

Bugs fixed:

  • Using a relative initial setting for a MultiPane used to cause problems with JDK 1.3.
  • The arrow icons in the qflib resources have been fixed. They caused problems with the headers of a sorted table with JDK 1.3.
6/7/2000

Version 0.96.0 fixes a few bugs and adds some new features.

New features:

Bugs fixed:

5/4/2000 Version 0.95.0 is the first public release.
Todo
We know of the following bugs in the current version:
  • No known bugs
Future plans:
  • Extend and improve the new de.qfs.lib.tree package.
  • Make the new TableOptionEdit class easier to extend and configure.
  • The class Message will be based on ModalDialog, just as OptionDialog is now, to get more control over the message dialog's buttons.
  • Provide more examples, introductory documentation and demos. Especially the new version of the Message class should get a demo right from the start.
  • Implement alternative protocols for the communication between the de.qfs.lib.log package and the log server qflog, which are better suited for Applets and will pave the way for communication with non Java programs.

Last update: MM/dd/yyyy, Copyright © 2000 Quality First Software, Gregor Schmid