Web Dynpro API Documentation

com.sap.tc.webdynpro.clientserver.uielib.graphics.api
Class WDGeoBorder

java.lang.Object
  |
  +--com.sap.tc.webdynpro.clientserver.uielib.graphics.api.WDGeoBorder

public final class WDGeoBorder
extends java.lang.Object

This class represents a geographical border i.e. a rectangle defined by its upper left and lower right corner in WGS84 format.


Constructor Summary
WDGeoBorder()
          Creates a new border with the co-ordinates 0,0; 0,0
WDGeoBorder(double left, double top, double right, double bottom)
          Creates a new border with the given co-ordinates
WDGeoBorder(WDGeoBorder srcBorder)
          Creates a copy of a border
WDGeoBorder(WDGeoPosition topLeft, WDGeoPosition bottomRight)
          Creates a new border with the given geo-positions
 
Method Summary
 WDGeoPosition bottomRight()
          Returns the bottom-right position.
 WDGeoPosition centerPosition()
          Returns the center position of the border.
 boolean equals(WDGeoBorder border)
          Returns true if the current border has the same co-ordinates as the second one.
 double getBottom()
          Returns the bottom co-ordinate of the border
 double getLeft()
          Returns the left co-ordinate of the border
 double getRight()
          Returns the right co-ordinate of the border
 double getTop()
          Returns the top co-ordinate of the border
 double height()
          Returns the difference between top and bottom co-ordinate
 void intersectBorder(WDGeoBorder border)
          Intersects the current border with a second one.
 boolean intersectBorder(WDGeoBorder border1, WDGeoBorder border2)
          Merges the first border with the second one and saves the result in the current border.
 boolean isBorderEmpty()
          Returns true if all co-ordinates are zero
 void moveBorder(double x, double y)
          Moves the border co-ordinates by x and y
 void normalizeBorder()
          Ensures that the left co-ordinate is smaller or equal to the top, and ateh bottom smaller or equal to the top
 boolean positionInBorder(WDGeoPosition pos)
          Tests whether a position is inside the border.
 void setBorder(double left, double top, double right, double bottom)
          Sets the co-ordinates of the border
 void setBorder(WDGeoPosition topLeft, WDGeoPosition bottomRight)
          Sets the co-ordinates to new values
 void setBorderEmpty()
          Resets the border co-ordinates to zero
 WDGeoPosition topLeft()
          Returns the top-left position.
 java.lang.String toString()
           
 void unionBorder(WDGeoBorder border)
          Merges the current border with a second one.
 double width()
          Returns the difference between right and left co-ordinate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WDGeoBorder

public WDGeoBorder()
Creates a new border with the co-ordinates 0,0; 0,0

WDGeoBorder

public WDGeoBorder(double left,
                   double top,
                   double right,
                   double bottom)
Creates a new border with the given co-ordinates

WDGeoBorder

public WDGeoBorder(WDGeoPosition topLeft,
                   WDGeoPosition bottomRight)
Creates a new border with the given geo-positions

WDGeoBorder

public WDGeoBorder(WDGeoBorder srcBorder)
Creates a copy of a border
Method Detail

getTop

public double getTop()
Returns the top co-ordinate of the border

getLeft

public double getLeft()
Returns the left co-ordinate of the border

getBottom

public double getBottom()
Returns the bottom co-ordinate of the border

getRight

public double getRight()
Returns the right co-ordinate of the border

setBorder

public void setBorder(double left,
                      double top,
                      double right,
                      double bottom)
Sets the co-ordinates of the border

moveBorder

public void moveBorder(double x,
                       double y)
Moves the border co-ordinates by x and y

setBorder

public void setBorder(WDGeoPosition topLeft,
                      WDGeoPosition bottomRight)
Sets the co-ordinates to new values

setBorderEmpty

public void setBorderEmpty()
Resets the border co-ordinates to zero

width

public double width()
Returns the difference between right and left co-ordinate.

height

public double height()
Returns the difference between top and bottom co-ordinate

topLeft

public WDGeoPosition topLeft()
Returns the top-left position.

bottomRight

public WDGeoPosition bottomRight()
Returns the bottom-right position.

normalizeBorder

public void normalizeBorder()
Ensures that the left co-ordinate is smaller or equal to the top, and ateh bottom smaller or equal to the top

isBorderEmpty

public boolean isBorderEmpty()
Returns true if all co-ordinates are zero

equals

public boolean equals(WDGeoBorder border)
Returns true if the current border has the same co-ordinates as the second one.

positionInBorder

public boolean positionInBorder(WDGeoPosition pos)
Tests whether a position is inside the border.

unionBorder

public void unionBorder(WDGeoBorder border)
Merges the current border with a second one.

intersectBorder

public void intersectBorder(WDGeoBorder border)
Intersects the current border with a second one.

intersectBorder

public boolean intersectBorder(WDGeoBorder border1,
                               WDGeoBorder border2)
Merges the first border with the second one and saves the result in the current border.
Returns:
false if the resulting border is empty

centerPosition

public WDGeoPosition centerPosition()
Returns the center position of the border.

toString

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

Web Dynpro API Documentation

Copyright © 2004 SAP AG. Automatically generated Thu Mar 3 2005, 22:15