20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package javax.swing.text;
27
28 import java.io.Serializable;
29
30 /**
31 * A TabSet is comprised of many TabStops. It offers methods for locating the
32 * closest TabStop to a given position and finding all the potential TabStops.
33 * It is also immutable.
34 * <p>
35 * <strong>Warning:</strong>
36 * Serialized objects of this class will not be compatible with
37 * future Swing releases. The current serialization support is
38 * appropriate for short term storage or RMI between applications running
39 * the same version of Swing. As of 1.4, support for long term storage
40 * of all JavaBeans™
41 * has been added to the <code>java.beans</code> package.
42 * Please see {@link java.beans.XMLEncoder}.
43 *
44 * @author Scott Violet
45 */
46 @SuppressWarnings("serial") // Same-version serialization only
47 public class TabSet implements Serializable
48 {
49 /** TabStops this TabSet contains. */
50 private TabStop[] tabs;
51 /**
52 * Since this class is immutable the hash code could be
53 * calculated once. MAX_VALUE means that it was not initialized
54 * yet. Hash code shouldn't has MAX_VALUE value.
55 */
56 private int hashCode = Integer.MAX_VALUE;
57
58 /**
59 * Creates and returns an instance of TabSet. The array of Tabs
60 * passed in must be sorted in ascending order.
|
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package javax.swing.text;
27
28 import java.io.Serializable;
29
30 /**
31 * A TabSet is comprised of many TabStops. It offers methods for locating the
32 * closest TabStop to a given position and finding all the potential TabStops.
33 * It is also immutable.
34 * <p>
35 * <strong>Warning:</strong>
36 * Serialized objects of this class will not be compatible with
37 * future Swing releases. The current serialization support is
38 * appropriate for short term storage or RMI between applications running
39 * the same version of Swing. As of 1.4, support for long term storage
40 * of all JavaBeans
41 * has been added to the <code>java.beans</code> package.
42 * Please see {@link java.beans.XMLEncoder}.
43 *
44 * @author Scott Violet
45 */
46 @SuppressWarnings("serial") // Same-version serialization only
47 public class TabSet implements Serializable
48 {
49 /** TabStops this TabSet contains. */
50 private TabStop[] tabs;
51 /**
52 * Since this class is immutable the hash code could be
53 * calculated once. MAX_VALUE means that it was not initialized
54 * yet. Hash code shouldn't has MAX_VALUE value.
55 */
56 private int hashCode = Integer.MAX_VALUE;
57
58 /**
59 * Creates and returns an instance of TabSet. The array of Tabs
60 * passed in must be sorted in ascending order.
|