< prev index next >

src/java.desktop/share/classes/java/awt/Insets.java

Print this page

        

*** 24,34 **** */ package java.awt; /** ! * An <code>Insets</code> object is a representation of the borders * of a container. It specifies the space that a container must leave * at each of its edges. The space can be a border, a blank space, or * a title. * * @author Arthur van Hoff --- 24,34 ---- */ package java.awt; /** ! * An {@code Insets} object is a representation of the borders * of a container. It specifies the space that a container must leave * at each of its edges. The space can be a border, a blank space, or * a title. * * @author Arthur van Hoff
*** 91,101 **** initIDs(); } } /** ! * Creates and initializes a new <code>Insets</code> object with the * specified top, left, bottom, and right insets. * @param top the inset from the top. * @param left the inset from the left. * @param bottom the inset from the bottom. * @param right the inset from the right. --- 91,101 ---- initIDs(); } } /** ! * Creates and initializes a new {@code Insets} object with the * specified top, left, bottom, and right insets. * @param top the inset from the top. * @param left the inset from the left. * @param bottom the inset from the bottom. * @param right the inset from the right.
*** 123,137 **** this.right = right; } /** * Checks whether two insets objects are equal. Two instances ! * of <code>Insets</code> are equal if the four integer values ! * of the fields <code>top</code>, <code>left</code>, ! * <code>bottom</code>, and <code>right</code> are all equal. ! * @return <code>true</code> if the two insets are equal; ! * otherwise <code>false</code>. * @since 1.1 */ public boolean equals(Object obj) { if (obj instanceof Insets) { Insets insets = (Insets)obj; --- 123,137 ---- this.right = right; } /** * Checks whether two insets objects are equal. Two instances ! * of {@code Insets} are equal if the four integer values ! * of the fields {@code top}, {@code left}, ! * {@code bottom}, and {@code right} are all equal. ! * @return {@code true} if the two insets are equal; ! * otherwise {@code false}. * @since 1.1 */ public boolean equals(Object obj) { if (obj instanceof Insets) { Insets insets = (Insets)obj;
*** 154,178 **** int sum3 = val1 + val2; return sum3 * (sum3 + 1)/2 + val2; } /** ! * Returns a string representation of this <code>Insets</code> object. * 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>. * ! * @return a string representation of this <code>Insets</code> object. */ public String toString() { return getClass().getName() + "[top=" + top + ",left=" + left + ",bottom=" + bottom + ",right=" + right + "]"; } /** * Create a copy of this object. ! * @return a copy of this <code>Insets</code> object. */ public Object clone() { try { return super.clone(); } catch (CloneNotSupportedException e) { --- 154,178 ---- int sum3 = val1 + val2; return sum3 * (sum3 + 1)/2 + val2; } /** ! * Returns a string representation of this {@code Insets} object. * 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}. * ! * @return a string representation of this {@code Insets} object. */ public String toString() { return getClass().getName() + "[top=" + top + ",left=" + left + ",bottom=" + bottom + ",right=" + right + "]"; } /** * Create a copy of this object. ! * @return a copy of this {@code Insets} object. */ public Object clone() { try { return super.clone(); } catch (CloneNotSupportedException e) {
< prev index next >