The following figure shows examples of Editors for various datatypes as displayed on the Isight Design Gateway and Runtime Gateway Parameters tab. These Editors look similar to the Renderers for the datatypes shown in the previous section; however, these Editors are editable widgets that allow the user to modify the value. The Editor is accessed by clicking into any of the cells to swap the Renderer out with the Editor.
The Editor for a datatype is provided by composing a Java class to provide a graphical way to edit the value. The Editor will be embedded anywhere that the values of a parameter is allowed to be edited in Isight (Parameters tab, Mapping tab, New Parameter dialog box, etc.). In a table display the Renderer displays the value in the cell of the table; when focus is placed into the cell, the Editor replaces the Renderer to allow for user interaction with the value. In datatypes that require much more space or a more complex way to specify the value, a typical practice is to have the Renderer display a button that launches a separate dialog box for editing the value. The main requirement that must be adhered to is that your Editor must implement an Isight-provided interface com.engineous.desktop.sdk.ValueEditor. This interface has the following methods that must be implemented:
Because the ValueRenderer interface requires a single method to be implemented, often a single class will be used to provide the Renderer and the Editor for a Value by implementing both required interfaces. |