Download Remote Microscope for Polymer Crystallization
Transcript
void void void void void void void void setjlightVoltage(String strValue); setiightMode(String strValue); setreflector(String strValue); settransFilter(String strValue); set-y(String strValue); set-x(String strValue); set-exposureTime(String strValue); set_fieldStop(String strValue); } It is important to note that even if the client does not need a certain control (for example if the GUI does not have a component for the transmission filter control) the following methods still need to be declared in the class that implements this interface, even if they are left empty. The whole point of having declared this interface is because when the command SCOPE is sent from the server to the client it will send the state values of ALL the controls the server can handle. Since the client application calls the set methods automatically by their names, "set_<controlname>", if any of these methods fail to appear in the implementation class then an error will occur. The main purpose of the interface is to keep a record and maintain a protocol of which controls the server implements, so that the client knows which methods it has to have. Another important component to note about IScopeControls is the Hashtable called state. A Hashtable is basically a table that matches key names to values. This state object will be inherited in the class that implements this interface, and will aid in maintaining the state of all the control values. This Hashtable maps the control name to its corresponding value, and should be updated by the class that implements this interface. 5.3.3 ScopeGUI The main function of ScopeGUI is to create and maintain the components of the Graphical User Interface (GUI). ScopeGUI creates and initializes all the Swing components and panels, and it creates event listeners for each graphical component. These event listeners are discussed in more detail in the next section. 35