|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ohf.stem.ui.ge.kml.BBoxInfo
public class BBoxInfo
Obtain the BoundingBox info for GoogleEarth from the Servlet. GoogleEarth sends the current Screen viewing area to the servlet as a BBOX parameter. The SlideShowServlet saves this BBOX string each time it is sent. This class runs as a thread and every N seconds makes a request to the BBoxServlet to access the latest BBOX string and return it. We then convert it to a bounding box rectangle and make it available for access. KMLDisplay will access it and use it to filter out display of Admin areas that are not within the screen Bounding box.
Constructor Summary | |
---|---|
BBoxInfo(java.lang.String url,
java.lang.String id)
constructor |
Method Summary | |
---|---|
static java.awt.Rectangle |
getBBox()
|
java.awt.Rectangle |
readBBox()
readBBox read the GoogleEarth BBox info from the servlet. |
void |
run()
This thread will sit in a loop and every N seconds it will send a request to the SlideShowServlet to give it the latest BBox info that was sent from GoogleEarth |
static void |
setBBox(java.awt.Rectangle box)
|
static boolean |
testContainment(java.awt.Rectangle r1,
java.awt.Rectangle r2)
Test containment of bounding box 1 in Bounding box 2 If any corner of BBox 1 is contained in BBox 2 or any corner of BBox 2 is contained in BBox 1 then they are adjacent. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BBoxInfo(java.lang.String url, java.lang.String id)
url
- URL for the servlet serverid
- Id to identify the servlet session.Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
public java.awt.Rectangle readBBox()
public static java.awt.Rectangle getBBox()
public static void setBBox(java.awt.Rectangle box)
box
- the bBox to setpublic static boolean testContainment(java.awt.Rectangle r1, java.awt.Rectangle r2)
r1
- bounding box 1r2
- bounding box 2
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |