< prev index next >
src/java.desktop/share/classes/javax/swing/DefaultListSelectionModel.java
Print this page
@@ -40,11 +40,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 Philip Milne
* @author Hans Muller
* @see ListSelectionModel
@@ -126,13 +126,13 @@
listenerList.remove(ListSelectionListener.class, l);
}
/**
* Returns an array of all the list selection listeners
- * registered on this <code>DefaultListSelectionModel</code>.
+ * registered on this {@code DefaultListSelectionModel}.
*
- * @return all of this model's <code>ListSelectionListener</code>s
+ * @return all of this model's {@code ListSelectionListener}s
* or an empty
* array if no list selection listeners are currently registered
*
* @see #addListSelectionListener
* @see #removeListSelectionListener
@@ -163,13 +163,13 @@
fireValueChanged(oldFirstChangedIndex, oldLastChangedIndex, isAdjusting);
}
/**
- * Notifies <code>ListSelectionListeners</code> that the value
- * of the selection, in the closed interval <code>firstIndex</code>,
- * <code>lastIndex</code>, has changed.
+ * Notifies {@code ListSelectionListeners} that the value
+ * of the selection, in the closed interval {@code firstIndex},
+ * {@code lastIndex}, has changed.
*
* @param firstIndex the first index in the interval
* @param lastIndex the last index in the interval
*/
protected void fireValueChanged(int firstIndex, int lastIndex) {
@@ -228,14 +228,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>DefaultListSelectionModel</code>
- * instance <code>m</code>
+ * For example, you can query a {@code DefaultListSelectionModel}
+ * instance {@code m}
* for its list selection listeners
* with the following code:
*
* <pre>ListSelectionListener[] lsls = (ListSelectionListener[])(m.getListeners(ListSelectionListener.class));</pre>
*
@@ -243,19 +243,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 #getListSelectionListeners
*
* @since 1.3
*/
@@ -351,12 +351,12 @@
public void setLeadAnchorNotificationEnabled(boolean flag) {
leadAnchorNotificationEnabled = flag;
}
/**
- * Returns the value of the <code>leadAnchorNotificationEnabled</code> flag.
- * When <code>leadAnchorNotificationEnabled</code> is true the model
+ * Returns the value of the {@code leadAnchorNotificationEnabled} flag.
+ * When {@code leadAnchorNotificationEnabled} is true the model
* generates notification events with bounds that cover all the changes to
* the selection plus the changes to the lead and anchor indices.
* Setting the flag to false causes a narrowing of the event's bounds to
* include only the elements that have been selected or deselected since
* the last change. Either way, the model continues to maintain the lead
@@ -365,11 +365,11 @@
* Note: It is possible for the lead or anchor to be changed without a
* change to the selection. Notification of these changes is often
* important, such as when the new lead or anchor needs to be updated in
* the view. Therefore, caution is urged when changing the default value.
*
- * @return the value of the <code>leadAnchorNotificationEnabled</code> flag
+ * @return the value of the {@code leadAnchorNotificationEnabled} flag
* @see #setLeadAnchorNotificationEnabled(boolean)
*/
public boolean isLeadAnchorNotificationEnabled() {
return leadAnchorNotificationEnabled;
}
@@ -704,24 +704,24 @@
/**
* Returns a string that displays and identifies this
* object's properties.
*
- * @return a <code>String</code> representation of this object
+ * @return a {@code String} representation of this object
*/
public String toString() {
String s = ((getValueIsAdjusting()) ? "~" : "=") + value.toString();
return getClass().getName() + " " + Integer.toString(hashCode()) + " " + s;
}
/**
* Returns a clone of this selection model with the same selection.
- * <code>listenerLists</code> are not duplicated.
+ * {@code listenerLists} are not duplicated.
*
* @exception CloneNotSupportedException if the selection model does not
* both (a) implement the Cloneable interface and (b) define a
- * <code>clone</code> method.
+ * {@code clone} method.
*/
public Object clone() throws CloneNotSupportedException {
DefaultListSelectionModel clone = (DefaultListSelectionModel)super.clone();
clone.value = (BitSet)value.clone();
clone.listenerList = new EventListenerList();
@@ -812,11 +812,11 @@
* done in two steps the effect on the selection state would be the same
* but two events would be generated and the bounds around the changed
* values would be wider, including cells that had been first cleared only
* to later be set.
* <p>
- * This method can be used in the <code>mouseDragged</code> method
+ * This method can be used in the {@code mouseDragged} method
* of a UI class to extend a selection.
*
* @see #getLeadSelectionIndex
* @see #setAnchorSelectionIndex
*/
< prev index next >