Пример #1
0
  /**
   * Sets the model's valueIsAdjusting property. Scrollbar look and feel implementations should set
   * this property to true when a knob drag begins, and to false when the drag ends. The scrollbar
   * model will not generate ChangeEvents while valueIsAdjusting is true.
   *
   * @see #getValueIsAdjusting
   * @see BoundedRangeModel#setValueIsAdjusting
   * @beaninfo expert: true description: True if the scrollbar thumb is being dragged.
   */
  public void setValueIsAdjusting(boolean b) {
    BoundedRangeModel m = getModel();
    boolean oldValue = m.getValueIsAdjusting();
    m.setValueIsAdjusting(b);

    if ((oldValue != b) && (accessibleContext != null)) {
      accessibleContext.firePropertyChange(
          AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
          ((oldValue) ? AccessibleState.BUSY : null),
          ((b) ? AccessibleState.BUSY : null));
    }
  }