if (slider.getValue() != intValue) slider.setValue(intValue);  } else if (rule instanceof StringRuleParameter) { srule      = (StringRuleParameter)rule; hashKey    = srule.getName().trim(); svalue     = (String)srule.getValue(); textField  = (JTextField)textFields_.get(hashKey);  if (!(textField.getText().equals(svalue))) textField.setText(svalue);  } else { GLMDebug.ERROR("GLMPolicyPlugin","Unexpected Rule Parameter "+rule); } } } else { GLMDebug.ERROR("GLMPolicyPlugin","Unexpected Property Name " + propertyName); } }catch (Exception e) { GLMDebug.ERROR("GLMPolicyPlugin"," Problem resetting Policy GUI with new values"); e.printStackTrace();
if (slider.getValue() != intValue) slider.setValue(intValue);  } else if (rule instanceof StringRuleParameter) { srule = (StringRuleParameter) rule; hashKey = srule.getName().trim(); svalue = (String) srule.getValue(); textField = (JTextField) textFields_.get(hashKey);  if (!(textField.getText().equals(svalue))) textField.setText(svalue);  } else { if (logger.isErrorEnabled()) { logger.error("Unexpected Rule Parameter " + rule); } } } } else { if (logger.isErrorEnabled()) { logger.error("Unexpected Property Name " + propertyName); } } } catch (Exception e) { if (logger.isErrorEnabled()) { logger.error(" Problem resetting Policy GUI with new values"); } e.printStackTrace();
    public void propertyChange(PropertyChangeEvent evt) {      String propertyName = evt.getPropertyName();      Object property = evt.getNewValue();      try {	if (propertyName == "RuleParameters") {	  Hashtable params = (Hashtable)property;	  Enumeration keys = params.keys();	  String hashKey, svalue;	  IntegerRuleParameter irule;	  RuleParameter rule;	  StringRuleParameter srule;	  Integer ivalue;	  JSlider slider;	  JTextField textField;	  int intValue;	  while (keys.hasMoreElements()) {	    rule = (RuleParameter) params.get(keys.nextElement());	    if (rule instanceof IntegerRuleParameter) {	      irule    = (IntegerRuleParameter)rule;	      ivalue    = (Integer)irule.getValue();	      hashKey  = irule.getName();	      slider   = (JSlider)sliders_.get(hashKey);	      intValue = ivalue.intValue();	      // don't cause unnecessary redraws	      if (slider.getValue() != intValue)		slider.setValue(intValue);	      	    } else if (rule instanceof StringRuleParameter) {	      srule      = (StringRuleParameter)rule;	      hashKey    = srule.getName().trim();	      svalue     = (String)srule.getValue();	      textField  = (JTextField)textFields_.get(hashKey);	      	      if (!(textField.getText().equals(svalue)))		textField.setText(svalue);	      	    } else {	      GLMDebug.ERROR("GLMPolicyPlugin","Unexpected Rule Parameter "+rule);	    }	  }	} else {	  GLMDebug.ERROR("GLMPolicyPlugin","Unexpected Property Name " + propertyName);	}      }catch (Exception e) {	GLMDebug.ERROR("GLMPolicyPlugin"," Problem resetting Policy GUI with new values");	e.printStackTrace();      }    }