The GUI properties panel has a well-defined life-cycle. When a Cell is selected, the open() method for all of its property sheets are invoked. After users have made changes to properties, its apply() or restore() method will be invoked. Finally, when another Cell is selected, its close() method is invoked.
The specific actions the PropertiesFactorySPI class takes when these four methods are invoked is implementation specific.
The open() method is invoked when the Cell is first selected and its properties are to be displayed. It is also invoked after apply() is called and the properties editor has refreshed its copy of the current Cell's server state. It is the responsibility of the class that implements this interface to properly update the state of the Cell when apply() is invoked. It can either interact with the Cell interface directly, or update the state of the cell via methods on CellPropertiesEditor.
A PropertiesFactorySPI class make also choose to immediately update the values of the Cell when the GUI is changed, and not only when apply() is invoked.
When the restore() method is called, the PropertiesFactorySPI class should revert all values in the state back to the values at the last apply(). When the close() method is invoked, the PropertiesFactorySPI class should revert all values and perform any necessary cleanup.
@author Jordan Slott
|
|
|
|
|
|
|
|