org.openmali.types.twodee
Class ExtDim2i

java.lang.Object
  extended by org.openmali.types.twodee.Dim2i
      extended by org.openmali.types.twodee.ExtDim2i
All Implemented Interfaces:
ExtSized2i, Sized2i, Sized2iRO

public class ExtDim2i
extends Dim2i
implements ExtSized2i

A basic 2-dimensional unpositioned rectangle.


Field Summary
 
Fields inherited from class org.openmali.types.twodee.Dim2i
isDirty
 
Constructor Summary
ExtDim2i()
          Creates a new 2-dimensional unpositioned rectangle with zero position and size.
ExtDim2i(int width, int height)
          Creates a new 2-dimensional unpositioned rectangle.
ExtDim2i(Sized2iRO template)
          Creates a new 2-dimensional unpositioned rectangle and copies the template's coordinates.
 
Method Summary
 void addResizeListener(ResizeListener2i listener)
          Adds a new ResizeListener2i.
protected  void fireResizeEvent(int oldWidth, int oldHeight, int newWidth, int newHeight)
           
 void removeResizeListener(ResizeListener2i listener)
          Removes the given ResizeListener2i from the List, if it was present.
 ExtDim2i setSize(int width, int height)
          Sets the size.
 
Methods inherited from class org.openmali.types.twodee.Dim2i
add, addH, addW, equals, equals, fromPool, fromPool, getAspect, getHeight, getWidth, isDirty, scale, scaleH, scaleW, set, set, setClean, setHeight, setSize, setSize, setWidth, toPool, toString, toTuple, toTuple
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openmali.types.twodee.Sized2i
setHeight, setSize, setSize, setWidth
 
Methods inherited from interface org.openmali.types.twodee.Sized2iRO
getAspect, getHeight, getWidth
 

Constructor Detail

ExtDim2i

public ExtDim2i(int width,
                int height)
Creates a new 2-dimensional unpositioned rectangle.

Parameters:
width - the rectangle's width
height - the rectangle's height

ExtDim2i

public ExtDim2i(Sized2iRO template)
Creates a new 2-dimensional unpositioned rectangle and copies the template's coordinates.

Parameters:
template -

ExtDim2i

public ExtDim2i()
Creates a new 2-dimensional unpositioned rectangle with zero position and size.

Method Detail

addResizeListener

public void addResizeListener(ResizeListener2i listener)
Adds a new ResizeListener2i. The event is fired from the rendering thread, if necessary. Notification takes place in the thread that called this.setSize(...).

Specified by:
addResizeListener in interface ExtSized2i

removeResizeListener

public void removeResizeListener(ResizeListener2i listener)
Removes the given ResizeListener2i from the List, if it was present.

Specified by:
removeResizeListener in interface ExtSized2i

fireResizeEvent

protected void fireResizeEvent(int oldWidth,
                               int oldHeight,
                               int newWidth,
                               int newHeight)

setSize

public ExtDim2i setSize(int width,
                        int height)
Sets the size.

Specified by:
setSize in interface Sized2i
Overrides:
setSize in class Dim2i
Returns:
this instance back again.