< prev index next >
src/java.desktop/share/classes/javax/swing/DefaultBoundedRangeModel.java
Print this page
@@ -36,11 +36,11 @@
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
- * has been added to the <code>java.beans</code> package.
+ * has been added to the {@code java.beans} package.
* Please see {@link java.beans.XMLEncoder}.
*
* @author David Kloba
* @author Hans Muller
* @see BoundedRangeModel
@@ -48,11 +48,11 @@
*/
@SuppressWarnings("serial") // Same-version serialization only
public class DefaultBoundedRangeModel implements BoundedRangeModel, Serializable
{
/**
- * Only one <code>ChangeEvent</code> is needed per model instance since the
+ * Only one {@code ChangeEvent} is needed per model instance since the
* event's only (read-only) state is the source property. The source
* of events generated here is always "this".
*/
protected transient ChangeEvent changeEvent = null;
@@ -68,24 +68,24 @@
/**
* Initializes all of the properties with default values.
* Those values are:
* <ul>
- * <li><code>value</code> = 0
- * <li><code>extent</code> = 0
- * <li><code>minimum</code> = 0
- * <li><code>maximum</code> = 100
- * <li><code>adjusting</code> = false
+ * <li>{@code value} = 0
+ * <li>{@code extent} = 0
+ * <li>{@code minimum} = 0
+ * <li>{@code maximum} = 100
+ * <li>{@code adjusting} = false
* </ul>
*/
public DefaultBoundedRangeModel() {
}
/**
* Initializes value, extent, minimum and maximum. Adjusting is false.
- * Throws an <code>IllegalArgumentException</code> if the following
+ * Throws an {@code IllegalArgumentException} if the following
* constraints aren't satisfied:
* <pre>
* min <= value <= value+extent <= max
* </pre>
*
@@ -226,11 +226,11 @@
setRangeProperties(newValue, newExtent, newMin, n, isAdjusting);
}
/**
- * Sets the <code>valueIsAdjusting</code> property.
+ * Sets the {@code valueIsAdjusting} property.
*
* @see #getValueIsAdjusting
* @see #setValue
* @see BoundedRangeModel#setValueIsAdjusting
*/
@@ -241,27 +241,27 @@
/**
* Returns true if the value is in the process of changing
* as a result of actions being taken by the user.
*
- * @return the value of the <code>valueIsAdjusting</code> property
+ * @return the value of the {@code valueIsAdjusting} property
* @see #setValue
* @see BoundedRangeModel#getValueIsAdjusting
*/
public boolean getValueIsAdjusting() {
return isAdjusting;
}
/**
- * Sets all of the <code>BoundedRangeModel</code> properties after forcing
+ * Sets all of the {@code BoundedRangeModel} properties after forcing
* the arguments to obey the usual constraints:
* <pre>
* minimum <= value <= value+extent <= maximum
* </pre>
* <p>
- * At most, one <code>ChangeEvent</code> is generated.
+ * At most, one {@code ChangeEvent} is generated.
*
* @see BoundedRangeModel#setRangeProperties
* @see #setValue
* @see #setExtent
* @see #setMinimum
@@ -310,11 +310,11 @@
}
}
/**
- * Adds a <code>ChangeListener</code>. The change listeners are run each
+ * Adds a {@code ChangeListener}. The change listeners are run each
* time any one of the Bounded Range model properties changes.
*
* @param l the ChangeListener to add
* @see #removeChangeListener
* @see BoundedRangeModel#addChangeListener
@@ -323,26 +323,26 @@
listenerList.add(ChangeListener.class, l);
}
/**
- * Removes a <code>ChangeListener</code>.
+ * Removes a {@code ChangeListener}.
*
- * @param l the <code>ChangeListener</code> to remove
+ * @param l the {@code ChangeListener} to remove
* @see #addChangeListener
* @see BoundedRangeModel#removeChangeListener
*/
public void removeChangeListener(ChangeListener l) {
listenerList.remove(ChangeListener.class, l);
}
/**
* Returns an array of all the change listeners
- * registered on this <code>DefaultBoundedRangeModel</code>.
+ * registered on this {@code DefaultBoundedRangeModel}.
*
- * @return all of this model's <code>ChangeListener</code>s
+ * @return all of this model's {@code ChangeListener}s
* or an empty
* array if no change listeners are currently registered
*
* @see #addChangeListener
* @see #removeChangeListener
@@ -353,11 +353,11 @@
return listenerList.getListeners(ChangeListener.class);
}
/**
- * Runs each <code>ChangeListener</code>'s <code>stateChanged</code> method.
+ * Runs each {@code ChangeListener}'s {@code stateChanged} method.
*
* @see #setRangeProperties
* @see EventListenerList
*/
protected void fireStateChanged()
@@ -374,11 +374,11 @@
}
/**
* Returns a string that displays all of the
- * <code>BoundedRangeModel</code> properties.
+ * {@code BoundedRangeModel} properties.
*/
public String toString() {
String modelString =
"value=" + getValue() + ", " +
"extent=" + getExtent() + ", " +
@@ -394,14 +394,14 @@
* <code><em>Foo</em>Listener</code>s
* upon this model.
* <code><em>Foo</em>Listener</code>s
* are registered using the <code>add<em>Foo</em>Listener</code> method.
* <p>
- * You can specify the <code>listenerType</code> argument
+ * You can specify the {@code listenerType} argument
* with a class literal, such as <code><em>Foo</em>Listener.class</code>.
- * For example, you can query a <code>DefaultBoundedRangeModel</code>
- * instance <code>m</code>
+ * For example, you can query a {@code DefaultBoundedRangeModel}
+ * instance {@code m}
* for its change listeners
* with the following code:
*
* <pre>ChangeListener[] cls = (ChangeListener[])(m.getListeners(ChangeListener.class));</pre>
*
@@ -409,19 +409,19 @@
* this method returns an empty array.
*
* @param <T> the type of {@code EventListener} class being requested
* @param listenerType the type of listeners requested;
* this parameter should specify an interface
- * that descends from <code>java.util.EventListener</code>
+ * that descends from {@code java.util.EventListener}
* @return an array of all objects registered as
* <code><em>Foo</em>Listener</code>s
* on this model,
* or an empty array if no such
* listeners have been added
- * @exception ClassCastException if <code>listenerType</code> doesn't
+ * @exception ClassCastException if {@code listenerType} doesn't
* specify a class or interface that implements
- * <code>java.util.EventListener</code>
+ * {@code java.util.EventListener}
*
* @see #getChangeListeners
*
* @since 1.3
*/
< prev index next >