protected void updateLayout(DocumentEvent.ElementChange ec,DocumentEvent e,Shape a){
  if (ec != null) {
    int index=Math.max(ec.getIndex() - 1,0);
    ChildState cs=getChildState(index);
    locator.childChanged(cs);
  }
}

protected void updateLayout ( DocumentEvent . ElementChange ec , DocumentEvent e , Shape a ) { if ( ec != null ) { int index = Math . max ( ec . getIndex ( ) - 1 , 0 ) ; ChildState cs = getChildState ( index ) ; locator . childChanged ( cs ) ; } }
update the layout in response to receiving notification of change from the model . this is implemented to note the change on the childlocator so that offsets of the children will be correctly computed .
