org.n52.oxf.context
Class ContextWindow

java.lang.Object
  extended by org.n52.oxf.context.ContextWindow
All Implemented Interfaces:
IContextSerializableXML, IEventEmitter

public class ContextWindow
extends Object
implements IEventEmitter, IContextSerializableXML

This class works like a bean to store the actual values for 'height' and 'width' of the viewing area (ContextWindow).

Author:
Arne Broering

Field Summary
protected  OXFEventSupport eventSupport
           
protected  int height
           
protected  int width
           
 
Constructor Summary
ContextWindow()
           
ContextWindow(int height, int width)
           
 
Method Summary
 void addEventListener(IEventListener listener)
          Add an IEventListener to the OXFEventSupport.
 int getHeight()
           
 int getWidth()
           
 void removeEventListener(IEventListener listener)
          Remove an IEventListener from the OXFEventSupport.
 void serializeToContext(StringBuffer sb)
          serializes the implementing class (downwardly) compatible to the "Web Map Context Documents" Specification (OGC 05-005) of the OGC in version 1.1.0.
 void setDimension(int newWidth, int newHeight)
          sets the height and the width of this ContextWindow.
 void setHeight(int h)
          sets the height of this ContextWindow.
 void setWidth(int w)
          sets the width of this ContextWindow.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

height

protected int height

width

protected int width

eventSupport

protected OXFEventSupport eventSupport
Constructor Detail

ContextWindow

public ContextWindow()

ContextWindow

public ContextWindow(int height,
                     int width)
Method Detail

setDimension

public void setDimension(int newWidth,
                         int newHeight)
                  throws OXFEventException
sets the height and the width of this ContextWindow.
If newHeight or newWidth differs from the previous values of height or width, a WINDOW_SIZE_CHANGED event will be fired.

Parameters:
newHeight -
newWidth -
Throws:
OXFException
OXFEventException

getHeight

public int getHeight()

setHeight

public void setHeight(int h)
               throws OXFEventException
sets the height of this ContextWindow.
If h differs from the previous value of height, a WINDOW_SIZE_CHANGED event will be fired.

Parameters:
height -
Throws:
OXFException
OXFEventException

getWidth

public int getWidth()

setWidth

public void setWidth(int w)
              throws OXFEventException
sets the width of this ContextWindow.
If w differs from the previous value of width, a WINDOW_SIZE_CHANGED event will be fired.

Parameters:
width -
Throws:
OXFException
OXFEventException

addEventListener

public void addEventListener(IEventListener listener)
Add an IEventListener to the OXFEventSupport.

Specified by:
addEventListener in interface IEventEmitter

removeEventListener

public void removeEventListener(IEventListener listener)
Remove an IEventListener from the OXFEventSupport.

Specified by:
removeEventListener in interface IEventEmitter

toString

public String toString()
Overrides:
toString in class Object

serializeToContext

public void serializeToContext(StringBuffer sb)
Description copied from interface: IContextSerializableXML
serializes the implementing class (downwardly) compatible to the "Web Map Context Documents" Specification (OGC 05-005) of the OGC in version 1.1.0.

Specified by:
serializeToContext in interface IContextSerializableXML


Copyright © 2005 - 2010 52°North Initiative for Geospatial Open Source Software GmbH. All rights reserved.