< prev index next >
src/java.desktop/share/classes/javax/swing/JSlider.java
Print this page
@@ -44,11 +44,11 @@
* at the points that match integer values within the specified interval.
* <p>
* The slider can show both
* major tick marks, and minor tick marks between the major ones. The number of
* values between the tick marks is controlled with
- * <code>setMajorTickSpacing</code> and <code>setMinorTickSpacing</code>.
+ * {@code setMajorTickSpacing} and {@code setMinorTickSpacing}.
* Painting of tick marks is controlled by {@code setPaintTicks}.
* <p>
* Sliders can also print text labels at regular intervals (or at
* arbitrary locations) along the slider track. Painting of labels is
* controlled by {@code setLabelTable} and {@code setPaintLabels}.
@@ -67,11 +67,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}.
*
* @beaninfo
* attribute: isContainer false
* description: A component that supports selecting a integer value from a range.
@@ -156,11 +156,11 @@
*/
protected ChangeListener changeListener = createChangeListener();
/**
- * Only one <code>ChangeEvent</code> is needed per slider instance since the
+ * Only one {@code ChangeEvent} is needed per slider instance since the
* event's only (read-only) state is the source property. The source
* of events generated here is always "this". The event is lazily
* created the first time that an event notification is fired.
*
* @see #fireStateChanged
@@ -190,12 +190,12 @@
/**
* Creates a slider using the specified orientation with the
* range {@code 0} to {@code 100} and an initial value of {@code 50}.
* The orientation can be
- * either <code>SwingConstants.VERTICAL</code> or
- * <code>SwingConstants.HORIZONTAL</code>.
+ * either {@code SwingConstants.VERTICAL} or
+ * {@code SwingConstants.HORIZONTAL}.
*
* @param orientation the orientation of the slider
* @throws IllegalArgumentException if orientation is not one of {@code VERTICAL}, {@code HORIZONTAL}
* @see #setOrientation
*/
@@ -206,11 +206,11 @@
/**
* Creates a horizontal slider using the specified min and max
* with an initial value equal to the average of the min plus max.
* <p>
- * The <code>BoundedRangeModel</code> that holds the slider's data
+ * The {@code BoundedRangeModel} that holds the slider's data
* handles any issues that may arise from improperly setting the
* minimum and maximum values on the slider. See the
* {@code BoundedRangeModel} documentation for details.
*
* @param min the minimum value of the slider
@@ -226,11 +226,11 @@
/**
* Creates a horizontal slider using the specified min, max and value.
* <p>
- * The <code>BoundedRangeModel</code> that holds the slider's data
+ * The {@code BoundedRangeModel} that holds the slider's data
* handles any issues that may arise from improperly setting the
* minimum, initial, and maximum values on the slider. See the
* {@code BoundedRangeModel} documentation for details.
*
* @param min the minimum value of the slider
@@ -249,14 +249,14 @@
/**
* Creates a slider with the specified orientation and the
* specified minimum, maximum, and initial values.
* The orientation can be
- * either <code>SwingConstants.VERTICAL</code> or
- * <code>SwingConstants.HORIZONTAL</code>.
+ * either {@code SwingConstants.VERTICAL} or
+ * {@code SwingConstants.HORIZONTAL}.
* <p>
- * The <code>BoundedRangeModel</code> that holds the slider's data
+ * The {@code BoundedRangeModel} that holds the slider's data
* handles any issues that may arise from improperly setting the
* minimum, initial, and maximum values on the slider. See the
* {@code BoundedRangeModel} documentation for details.
*
* @param orientation the orientation of the slider
@@ -361,11 +361,11 @@
/**
* Subclasses that want to handle {@code ChangeEvent}s
* from the model differently
* can override this to return
- * an instance of a custom <code>ChangeListener</code> implementation.
+ * an instance of a custom {@code ChangeListener} implementation.
* The default {@code ChangeListener} simply calls the
* {@code fireStateChanged} method to forward {@code ChangeEvent}s
* to the {@code ChangeListener}s that have been added directly to the
* slider.
*
@@ -404,14 +404,14 @@
listenerList.remove(ChangeListener.class, l);
}
/**
- * Returns an array of all the <code>ChangeListener</code>s added
+ * Returns an array of all the {@code ChangeListener}s added
* to this JSlider with addChangeListener().
*
- * @return all of the <code>ChangeListener</code>s added or an empty
+ * @return all of the {@code ChangeListener}s added or an empty
* array if no listeners have been added
* @since 1.4
*/
public ChangeListener[] getChangeListeners() {
return listenerList.getListeners(ChangeListener.class);
@@ -462,11 +462,11 @@
* fundamental properties: minimum, maximum, value.
*<p>
* Attempts to pass a {@code null} model to this method result in
* undefined behavior, and, most likely, exceptions.
*
- * @param newModel the new, {@code non-null} <code>BoundedRangeModel</code> to use
+ * @param newModel the new, {@code non-null BoundedRangeModel} to use
*
* @see #getModel
* @see BoundedRangeModel
* @beaninfo
* bound: true
@@ -548,11 +548,11 @@
}
/**
* Returns the minimum value supported by the slider
- * from the <code>BoundedRangeModel</code>.
+ * from the {@code BoundedRangeModel}.
*
* @return the value of the model's minimum property
* @see #setMinimum
* @see BoundedRangeModel#getMinimum
*/
@@ -589,11 +589,11 @@
}
/**
* Returns the maximum value supported by the slider
- * from the <code>BoundedRangeModel</code>.
+ * from the {@code BoundedRangeModel}.
*
* @return the value of the model's maximum property
* @see #setMaximum
* @see BoundedRangeModel#getMaximum
*/
@@ -668,11 +668,11 @@
}
}
/**
- * Returns the "extent" from the <code>BoundedRangeModel</code>.
+ * Returns the "extent" from the {@code BoundedRangeModel}.
* This represents the range of values "covered" by the knob.
*
* @return an int representing the extent
* @see #setExtent
* @see BoundedRangeModel#getExtent
@@ -795,11 +795,11 @@
}
/**
* Returns the dictionary of what labels to draw at which values.
*
- * @return the <code>Dictionary</code> containing labels and
+ * @return the {@code Dictionary} containing labels and
* where to draw them
*/
@SuppressWarnings("rawtypes")
public Dictionary getLabelTable() {
/*
@@ -812,11 +812,11 @@
/**
* Used to specify what label will be drawn at any given value.
* The key-value pairs are of this format:
- * <code>{ Integer value, java.swing.JComponent label }</code>.
+ * {@code { Integer value, java.swing.JComponent label }}.
* <p>
* An easy way to generate a standard table of value labels is by using the
* {@code createStandardLabels} method.
* <p>
* Once the labels have been set, this method calls {@link #updateLabelUIs}.
@@ -885,11 +885,11 @@
/**
* Creates a {@code Hashtable} of numerical text labels, starting at the
* slider minimum, and using the increment specified.
- * For example, if you call <code>createStandardLabels( 10 )</code>
+ * For example, if you call {@code createStandardLabels( 10 )}
* and the slider minimum is zero,
* then labels will be created for the values 0, 10, 20, 30, and so on.
* <p>
* For the labels to be drawn on the slider, the returned {@code Hashtable}
* must be passed into {@code setLabelTable}, and {@code setPaintLabels}
@@ -912,11 +912,11 @@
/**
* Creates a {@code Hashtable} of numerical text labels, starting at the
* starting point specified, and using the increment specified.
* For example, if you call
- * <code>createStandardLabels( 10, 2 )</code>,
+ * {@code createStandardLabels( 10, 2 )},
* then labels will be created for the values 2, 12, 22, 32, and so on.
* <p>
* For the labels to be drawn on the slider, the returned {@code Hashtable}
* must be passed into {@code setLabelTable}, and {@code setPaintLabels}
* must be set to {@code true}.
@@ -1049,15 +1049,15 @@
/**
* Specify true to reverse the value-range shown for the slider and false to
* put the value range in the normal order. The order depends on the
- * slider's <code>ComponentOrientation</code> property. Normal (non-inverted)
- * horizontal sliders with a <code>ComponentOrientation</code> value of
- * <code>LEFT_TO_RIGHT</code> have their maximum on the right.
- * Normal horizontal sliders with a <code>ComponentOrientation</code> value of
- * <code>RIGHT_TO_LEFT</code> have their maximum on the left. Normal vertical
+ * slider's {@code ComponentOrientation} property. Normal (non-inverted)
+ * horizontal sliders with a {@code ComponentOrientation} value of
+ * {@code LEFT_TO_RIGHT} have their maximum on the right.
+ * Normal horizontal sliders with a {@code ComponentOrientation} value of
+ * {@code RIGHT_TO_LEFT} have their maximum on the left. Normal vertical
* sliders have their maximum on the top. These labels are reversed when the
* slider is inverted.
* <p>
* By default, the value of this property is {@code false}.
*
@@ -1374,11 +1374,11 @@
/**
* Returns a string representation of this JSlider. This method
* is intended to be used only for debugging purposes, and the
* content and format of the returned string may vary between
* implementations. The returned string may be empty but may not
- * be <code>null</code>.
+ * be {@code null}.
*
* @return a string representation of this JSlider.
*/
protected String paramString() {
String paintTicksString = (paintTicks ?
@@ -1429,20 +1429,20 @@
return accessibleContext;
}
/**
* This class implements accessibility support for the
- * <code>JSlider</code> class. It provides an implementation of the
+ * {@code JSlider} class. It provides an implementation of the
* Java Accessibility API appropriate to slider user-interface elements.
* <p>
* <strong>Warning:</strong>
* 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}.
*/
@SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJSlider extends AccessibleJComponent
implements AccessibleValue {
< prev index next >