Class Size
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Size

public class netscape.application.Size
    extends java.lang.Object
    implements netscape.util.Codable
{
    /* Fields
     */
    public int height;
    public int width;

    /* Constructors
     */
    public Size();
    public Size(int, int);
    public Size(Size);

    /* Methods
     */
    public void decode(Decoder);
    public void describeClassInfo(ClassInfo);
    public void encode(Encoder);
    public boolean equals(Object);
    public void finishDecoding();
    public int hashCode();
    public boolean isEmpty();
    public void sizeBy(int, int);
    public void sizeTo(int, int);
    public String toString();
    public void union(Size);
}
An Object subclass representing a positive or negative width and height.

Fields

width

  public int width
The Size's width.

height

  public int height
The Size's height.

Constructors

Size

  public Size()
Constructs a Size with zero width and height.

Size

  public Size(int width,
              int height)
Constructs a Size with dimensions (width, height).

Size

  public Size(Size templateSize)
Constructs a Size with the same dimensions as templateSize.

Methods

isEmpty

  public boolean isEmpty()
Returns true if the Size has zero width or height.

toString

  public String toString()
Returns the Size's String representation.
Overrides:
toString in class Object

sizeTo

  public void sizeTo(int width,
                     int height)
Sets the Size's dimensions to (width, height).

sizeBy

  public void sizeBy(int deltaWidth,
                     int deltaHeight)
Changes the Size's dimensions by deltaWidth and deltaHeight.

union

  public void union(Size aSize)
Unions the Size with aSize.

equals

  public boolean equals(Object anObject)
Returns true if the Size equals anObject.
Overrides:
equals in class Object

hashCode

  public int hashCode()
Returns the Size's hash code.
Overrides:
hashCode in class Object

describeClassInfo

  public void describeClassInfo(ClassInfo info)
Describes the Size class' coding information.
See Also:
describeClassInfo

encode

  public void encode(Encoder encoder) throws CodingException
Encodes the Size.
See Also:
encode

decode

  public void decode(Decoder decoder) throws CodingException
Decodes the Size.
See Also:
decode

finishDecoding

  public void finishDecoding() throws CodingException
Finishes the Size decoding.
See Also:
finishDecoding

All Packages  Class Hierarchy  This Package  Previous  Next  Index

Copyright © 1997 Netscape Communications Corporation. All rights reserved
Please send any comments or corrections to ifcfeedback@netscape.com
HTML generated on 21 Apr 1997