Exemplo n.º 1
0
  /**
   * Sets the model's {@code valueIsAdjusting} property. Slider look and feel implementations should
   * set this property to {@code true} when a knob drag begins, and to {@code false} when the drag
   * ends.
   *
   * @param b the new value for the {@code valueIsAdjusting} property
   * @see #getValueIsAdjusting
   * @see BoundedRangeModel#setValueIsAdjusting
   * @beaninfo expert: true description: True if the slider knob 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));
    }
  }