private void onUpdate(Object source) {
    if (isInternal()) return;
    JViewport first = myFirstEditor.getScrollPane().getViewport();
    JViewport second = mySecondEditor.getScrollPane().getViewport();
    int value = getValue();
    if (source == first) {
      Point position = first.getViewPosition();
      if (position.x != myFirstValue) {
        myFirstValue = value = position.x;
      }
    }
    else {
      Point position = second.getViewPosition();
      if (position.x != mySecondValue) {
        mySecondValue = value = position.x;
      }
    }
    int ext = Math.min(first.getExtentSize().width, second.getExtentSize().width);
    int max = Math.max(first.getViewSize().width, second.getViewSize().width);
    setRangeProperties(value, ext, 0, max, false);
    myBar.setEnabled(ext < max);
  }
private void onUpdate(Object source)