org.nakedobjects.plugins.dnd.viewer.drawing
Class Size

java.lang.Object
  extended by org.nakedobjects.plugins.dnd.viewer.drawing.Size

public class Size
extends java.lang.Object


Field Summary
static Size ALL
           
 
Constructor Summary
Size()
           
Size(int width, int height)
           
Size(Size size)
           
 
Method Summary
 void contract(int width, int height)
           
 void contract(Padding padding)
           
 void contract(Size size)
           
 void contractHeight(int height)
           
 void contractWidth(int width)
           
 void ensureHeight(int height)
           
 void ensureWidth(int width)
           
 boolean equals(java.lang.Object obj)
           
 void extend(int width, int height)
           
 void extend(Padding padding)
           
 void extend(Size size)
           
 void extendHeight(int height)
           
 void extendWidth(int width)
           
 int getHeight()
           
 int getWidth()
           
 void limitHeight(int maximum)
          Limits the height of this Size so that if its height is greater than the specified maximum then the height is reduced to the maximum.
 void limitSize(Size maximum)
          Limits the width and height of this Size so it is no larger than the specified maximum size.
 void limitWidth(int maximum)
          Limits the width of this Size so that if its width is greater than the specified maximum then the width is reduced to the maximum.
 void setHeight(int height)
           
 void setWidth(int width)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALL

public static final Size ALL
Constructor Detail

Size

public Size()

Size

public Size(int width,
            int height)

Size

public Size(Size size)
Method Detail

contract

public void contract(int width,
                     int height)

contract

public void contract(Size size)

contractHeight

public void contractHeight(int height)

contract

public void contract(Padding padding)

contractWidth

public void contractWidth(int width)

ensureHeight

public void ensureHeight(int height)

ensureWidth

public void ensureWidth(int width)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

extend

public void extend(int width,
                   int height)

extend

public void extend(Padding padding)

extend

public void extend(Size size)

extendHeight

public void extendHeight(int height)

extendWidth

public void extendWidth(int width)

getHeight

public int getHeight()

getWidth

public int getWidth()

limitHeight

public void limitHeight(int maximum)
Limits the height of this Size so that if its height is greater than the specified maximum then the height is reduced to the maximum. If the height is less than maximum (or equal to it) then nothing is done.


limitWidth

public void limitWidth(int maximum)
Limits the width of this Size so that if its width is greater than the specified maximum then the width is reduced to the maximum. If the width is less than maximum (or equal to it) then nothing is done.


limitSize

public void limitSize(Size maximum)
Limits the width and height of this Size so it is no larger than the specified maximum size.

See Also:
limitWidth(int), limitHeight(int)

setHeight

public void setHeight(int height)

setWidth

public void setWidth(int width)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.