A HyperLens Lens class serves to display, and optionally to edit or otherwise manipulate, data in a HyperLens lens. A lens class extends class webthing.hyperlens.lens.gLens, or some subclass of it.
A lens is always under the control of the user, who can open, close, move and resize it. These functions, together with the initial loading and management of the lenses, are managed by HyperLens. The Lens class
These methods must be implemented by every Lens class
init() is called when the lens is first loaded, and is used to initialise.
Analagous to the validate() method of AWT components. Called when the lens is initialised, and each time it is moved or resized. Displays the lens contents within the lens.
Analagous to AWT invalidate(). Called asynchronously while the lens is being moved or dragged, and enables it to update the contents displayed in real time.
Save the lens's contents. This does not include the lens definition (which is managed by the Editor), but is required to save any external resources, such as Images or Object Files, used by the Lens.
Called during a HyperLens printout, to print any textual information about the lens (for example, a key to colours/classifications in a lens showing a classification). Not normally required.
Return true if the lens has associated tools (typically a window that pops up when the lens is opened). Default: false.
A method to create any associated tools. Should get called if and only if hasTools() returns true.
Open an Editor for the Lens. The Editor must be implemented by the Lens class. If this method is not defined, users will get a default "No editor for this class" if they select Edit.