private void sync(){
  int s=state;
  if ((s & RELOAD_IMAGE_FLAG) != 0) {
    refreshImage();
  }
  s=state;
  if ((s & RELOAD_FLAG) != 0) {
synchronized (this) {
      state=(state | RELOAD_FLAG) ^ RELOAD_FLAG;
    }
    setPropertiesFromAttributes();
  }
}

private void sync ( ) { int s = state ; if ( ( s & RELOAD_IMAGE_FLAG ) != 0 ) { refreshImage ( ) ; } s = state ; if ( ( s & RELOAD_FLAG ) != 0 ) { synchronized ( this ) { state = ( state | RELOAD_FLAG ) ^ RELOAD_FLAG ; } setPropertiesFromAttributes ( ) ; } }
makes sure the necessary properties and image is loaded .
