|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rit.slides.items.Size
public class Size
Class Size provides a size (width,height) for a SlideItem
.
Constructor Summary | |
---|---|
Size()
Construct a new size with width = height = 0. |
|
Size(double width,
double height)
Construct a new size with the given width and height. |
|
Size(Size theSize)
Construct a new size with the same width and height as the given size. |
Method Summary | |
---|---|
Size |
div(double scale)
Returns a new size equal to this size divided by the given scale factor. |
Size |
div(double wscale,
double hscale)
Returns a new size equal to this size divided by the given scale factors. |
boolean |
equals(Object obj)
Determine if this size is equal to the given object. |
int |
hashCode()
Returns a hash code for this size. |
double |
height()
Returns this size's height. |
Size |
mul(double scale)
Returns a new size equal to this size multiplied by the given scale factor. |
Size |
mul(double wscale,
double hscale)
Returns a new size equal to this size multiplied by the given scale factors. |
void |
readExternal(ObjectInput in)
Read this size from the given object input stream. |
String |
toString()
Returns a string version of this size. |
double |
width()
Returns this size's width. |
void |
writeExternal(ObjectOutput out)
Write this size to the given object output stream. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Size()
public Size(double width, double height)
width
- Width.height
- Height.public Size(Size theSize)
theSize
- Size to copy.Method Detail |
---|
public double width()
public double height()
public Size mul(double scale)
scale
- Scale factor.public Size mul(double wscale, double hscale)
wscale
- Width scale factor.hscale
- Height scale factor.public Size div(double scale)
scale
- Scale factor.public Size div(double wscale, double hscale)
wscale
- Width scale factor.hscale
- Height scale factor.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
- Object output stream.
IOException
- Thrown if an I/O error occurred.public void readExternal(ObjectInput in) throws IOException
readExternal
in interface Externalizable
in
- Object input stream.
IOException
- Thrown if an I/O error occurred.public boolean equals(Object obj)
equals
in class Object
obj
- Object to test.
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |