Package csheets.ext

Provides an extension mechanism for the application.

See: Description

Package csheets.ext Description

Provides an extension mechanism for the application. The basic capabilities of the CleanSheets application is extended by means of inheritance by delegation. Two abstract base-classes (CellExtension and SpreadsheetExtension) are provided that implement the Cell and Spreadsheet interface respectively. There, calls to methods in each interface are delegated to an instance of CellImpl or SpreadsheetImpl. Both of these interfaces extend the Extensible interface, whereby extensions can be accessed by the getExtension(String) method.

In order to improve on the existing functionality, extensions may provide sub-classes of these two base-classes. Sub-classes are required to be serializable.

An Extension has three parts. Apart from the two listed above (of which at least one should be provided), all extensions should provide a UIExtension that acts as a facade for retrieving extension-specific user interface components, to be integrated into the application's user interface.

Extensions are loaded dynamically on start-up using the class names listed in the extension properties files. Known extensions are loaded if already in the class path. If any of those conditions is not met, extensions should be listed in a file named extensions.xml in the directory from which the application is executed. The file is a standard XML properties files, where entries for extensions should have the class name of the extension as key, and an optional class path specification as value. The class path can be given as a URL or local filename referring to a JAR-file or a directory where the extension class can be found. (See example below.)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="csheets.ext.assertion.AssertionExtension"/>
<entry key="csheets.ext.test.TestExtension">test.jar</entry>
</properties>
See Also:
csheets.ui.ext