org.openmali.types.twodee
Class ExtDim2f

java.lang.Object
  extended by org.openmali.types.twodee.Dim2f
      extended by org.openmali.types.twodee.ExtDim2f
All Implemented Interfaces:
ExtSized2f, Sized2f, Sized2fRO

public class ExtDim2f
extends Dim2f
implements ExtSized2f

A basic 2-dimensional unpositioned rectangle.


Field Summary
 
Fields inherited from class org.openmali.types.twodee.Dim2f
isDirty
 
Constructor Summary
ExtDim2f()
          Creates a new 2-dimensional unpositioned rectangle with zero position and size.
ExtDim2f(float width, float height)
          Creates a new 2-dimensional unpositioned rectangle.
ExtDim2f(Sized2fRO template)
          Creates a new 2-dimensional unpositioned rectangle and copies the template's coordinates.
 
Method Summary
 void addResizeListener(ResizeListener2f listener)
          Adds a new ResizeListener2i.
protected  void fireResizeEvent(float oldWidth, float oldHeight, float newWidth, float newHeight)
           
 void removeResizeListener(ResizeListener2f listener)
          Removes the given ResizeListener2i from the List, if it was present.
 ExtDim2f setSize(float width, float height)
          Sets the size.
 
Methods inherited from class org.openmali.types.twodee.Dim2f
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.Sized2f
setHeight, setSize, setSize, setWidth
 
Methods inherited from interface org.openmali.types.twodee.Sized2fRO
getAspect, getHeight, getWidth
 

Constructor Detail

ExtDim2f

public ExtDim2f(float width,
                float height)
Creates a new 2-dimensional unpositioned rectangle.

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

ExtDim2f

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

Parameters:
template -

ExtDim2f

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

Method Detail

addResizeListener

public void addResizeListener(ResizeListener2f 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 ExtSized2f

removeResizeListener

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

Specified by:
removeResizeListener in interface ExtSized2f

fireResizeEvent

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

setSize

public ExtDim2f setSize(float width,
                        float height)
Sets the size.

Specified by:
setSize in interface Sized2f
Overrides:
setSize in class Dim2f
Returns:
this instance back again.