equal
deleted
inserted
replaced
436 public AttributeSet getEmptySet() { |
436 public AttributeSet getEmptySet() { |
437 return SimpleAttributeSet.EMPTY; |
437 return SimpleAttributeSet.EMPTY; |
438 } |
438 } |
439 |
439 |
440 /** |
440 /** |
441 * Returns a set no longer needed by the MutableAttributeSet implmentation. |
441 * Returns a set no longer needed by the MutableAttributeSet implementation. |
442 * This is useful for operation under 1.1 where there are no weak |
442 * This is useful for operation under 1.1 where there are no weak |
443 * references. This would typically be called by the finalize method |
443 * references. This would typically be called by the finalize method |
444 * of the MutableAttributeSet implementation. |
444 * of the MutableAttributeSet implementation. |
445 * <p> |
445 * <p> |
446 * This method is thread safe, although most Swing methods |
446 * This method is thread safe, although most Swing methods |
574 * Writes a set of attributes to the given object stream |
574 * Writes a set of attributes to the given object stream |
575 * for the purpose of serialization. This will take |
575 * for the purpose of serialization. This will take |
576 * special care to deal with static attribute keys that |
576 * special care to deal with static attribute keys that |
577 * have been registered wit the |
577 * have been registered wit the |
578 * <code>registerStaticAttributeKey</code> method. |
578 * <code>registerStaticAttributeKey</code> method. |
579 * Any attribute key not regsitered as a static key |
579 * Any attribute key not registered as a static key |
580 * will be serialized directly. All values are expected |
580 * will be serialized directly. All values are expected |
581 * to be serializable. |
581 * to be serializable. |
582 * |
582 * |
583 * @param out the output stream |
583 * @param out the output stream |
584 * @param a the attribute set |
584 * @param a the attribute set |
837 } |
837 } |
838 return code; |
838 return code; |
839 } |
839 } |
840 |
840 |
841 /** |
841 /** |
842 * Compares this object to the specifed object. |
842 * Compares this object to the specified object. |
843 * The result is <code>true</code> if the object is an equivalent |
843 * The result is <code>true</code> if the object is an equivalent |
844 * set of attributes. |
844 * set of attributes. |
845 * @param obj the object to compare with. |
845 * @param obj the object to compare with. |
846 * @return <code>true</code> if the objects are equal; |
846 * @return <code>true</code> if the objects are equal; |
847 * <code>false</code> otherwise. |
847 * <code>false</code> otherwise. |
1038 int i; |
1038 int i; |
1039 } |
1039 } |
1040 |
1040 |
1041 /** |
1041 /** |
1042 * Sorts the key strings so that they can be very quickly compared |
1042 * Sorts the key strings so that they can be very quickly compared |
1043 * in the attribute set searchs. |
1043 * in the attribute set searches. |
1044 */ |
1044 */ |
1045 class KeyBuilder { |
1045 class KeyBuilder { |
1046 |
1046 |
1047 public void initialize(AttributeSet a) { |
1047 public void initialize(AttributeSet a) { |
1048 if (a instanceof SmallAttributeSet) { |
1048 if (a instanceof SmallAttributeSet) { |
1207 int fhash = (family != null) ? family.hashCode() : 0; |
1207 int fhash = (family != null) ? family.hashCode() : 0; |
1208 return fhash ^ style ^ size; |
1208 return fhash ^ style ^ size; |
1209 } |
1209 } |
1210 |
1210 |
1211 /** |
1211 /** |
1212 * Compares this object to the specifed object. |
1212 * Compares this object to the specified object. |
1213 * The result is <code>true</code> if and only if the argument is not |
1213 * The result is <code>true</code> if and only if the argument is not |
1214 * <code>null</code> and is a <code>Font</code> object with the same |
1214 * <code>null</code> and is a <code>Font</code> object with the same |
1215 * name, style, and point size as this font. |
1215 * name, style, and point size as this font. |
1216 * @param obj the object to compare this font with. |
1216 * @param obj the object to compare this font with. |
1217 * @return <code>true</code> if the objects are equal; |
1217 * @return <code>true</code> if the objects are equal; |