|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.adf.web.data.WebOverview
public class WebOverview
This object represents the business logic behind the Overview map control.
Field Summary | |
---|---|
protected WebContext |
context
The associated WebContext used for the overview map.. |
static int |
DEFAULT_DPI
Default DPI of the overview map. |
static int |
DEFAULT_HEIGHT
Default height of the overview map in pixels. |
static int |
DEFAULT_WIDTH
Default width of the overview map in pixels. |
protected int |
dpi
DPI of the overview map. |
protected WebExtent |
drawExtent
The extent of the overview map. |
protected int |
height
Height of the overview map. |
protected byte[] |
imageBytes
The overview map stored in bytes representation. |
protected String |
imageFormat
The image format of the overview map. |
protected WebExtent |
imageRect
The the area of interest box in screen co-ordinates. |
protected boolean |
init
Indicates whether the overview map is initialized, false by default. |
protected WebMap |
map
The associated WebMap object used for the overview map. |
protected ArrayList<OverviewFunctionality> |
oFuncs
Maintains the list of available overview functionalities in the WebContext object. |
protected boolean |
showFullExtent
Indicates whether the overview map should show the full extent or the initial extent, true by default. |
protected boolean |
useMIMEData
Indicates whether the overview map should request for MIME data or URL from the GIS Server, true by default. |
protected boolean |
visible
Indicates whether the overview map is visible or not. |
protected int |
width
Width of the overview map. |
Constructor Summary | |
---|---|
WebOverview()
|
Method Summary | |
---|---|
void |
destroy()
The cleaup chores (such as releasing held resources) of attributes of a WebContext should be performed in
this method. |
void |
exportImage()
Creates an image of the overview map. |
int |
getDpi()
Returns the dots per inches (DPI) of the overview map image. |
WebExtent |
getDrawExtent()
Returns a WebExtent object encompassing the extent of the overview map. |
int |
getHeight()
Returns the height of the overview map. |
String |
getImageFormat()
Returns the image format for the overview map. |
WebExtent |
getImageRectangle()
Returns the extent (in screen coordinates) of the area of interest box representing the current extent of the main map. |
String |
getImageUrl()
Returns the image URL of the overview map. |
List<OverviewFunctionality> |
getOverviewFunctionalities()
Returns a list of available overview functionalites in the WebContext object. |
String |
getStaticImageUrl()
Returns the URL of the image to be used in overview map. |
WebContext |
getWebContext()
Returns the WebContext associated with this object. |
int |
getWidth()
Returns the width of the overview map. |
void |
handleEvent(OverviewEvent args)
This method handle events such as recenter or resize on the area of interest box and adjusts the extent of the main map. |
void |
init(WebContext webContext)
Initializes the WebOverview by associating itself with this context. |
boolean |
isInit()
Returns an indicator of whether WebOverview is initialized. |
boolean |
isLastEnabledOverviewFunctionality(OverviewFunctionality overviewFunc)
Return true if the specified overview functionality is enabled and last in the available overview functionalites. |
boolean |
isShowFullExtent()
Returns an indicator whether the overview map should show the full extent or the initial extent. |
boolean |
isUseMIMEData()
Returns an indicator whether the overview map should request for MIME data or URL. |
boolean |
isVisible()
Returns an indicator whether this overview map is visible. |
void |
reloadImageRectangle()
Reloads the extent of area of interest box based on the current extent of map control. |
void |
setDpi(int dpi)
Sets the DPI of the overview map. |
void |
setDrawExtent(WebExtent drawExtent)
Sets the extent to be used for the overview map. |
void |
setHeight(int height)
Sets the height of the overview map. |
void |
setImageFormat(String imageFormat)
Sets the image format for the overview map. |
void |
setInit(boolean init)
Sets an indicator whether to initialize WebOverview. |
void |
setShowFullExtent(boolean showFullExtent)
Sets whether the overview map should show the full extent or the initial extent. |
void |
setStaticImageUrl(String staticImageUrl)
Sets the URL of the image to be used in overview map. |
void |
setUseMIMEData(boolean useMIMEData)
Sets whether the overview map should request for MIME data or URL from the GIS Server. |
void |
setVisible(boolean visible)
Sets the visibility of the overview map. |
void |
setWidth(int width)
Sets the width of the overview map. |
void |
update(WebContext webContext,
Object arg)
This method is called by the WebContext on its registered WebContextObserver s when users call the
refresh() methods on the context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
public static final int DEFAULT_DPI
protected int height
DEFAULT_HEIGHT
.
protected int width
DEFAULT_WIDTH
.
protected int dpi
DEFAULT_DPI
.
protected boolean visible
protected boolean init
protected String imageFormat
protected WebMap map
WebMap
object used for the overview map.
protected boolean useMIMEData
protected boolean showFullExtent
protected WebContext context
WebContext
used for the overview map..
protected ArrayList<OverviewFunctionality> oFuncs
protected WebExtent drawExtent
protected WebExtent imageRect
protected byte[] imageBytes
Constructor Detail |
---|
public WebOverview()
Method Detail |
---|
public void init(WebContext webContext)
init
in interface WebContextInitialize
webContext
- the WebContext
object.WebContext.init(WebContext)
,
WebContext.addResource(String, GISResource, int)
,
WebContext.removeResource(GISResource)
public void destroy()
WebContextInitialize
The cleaup chores (such as releasing held resources) of attributes of a WebContext
should be performed in
this method.
Typically this method is called by the WebContext
when the context itself is destroyed.
The WebContext
attribute is unusable after this method has been called.
destroy
in interface WebContextInitialize
WebContext.destroy()
public String getImageUrl()
public WebExtent getImageRectangle()
WebExtent
public void handleEvent(OverviewEvent args)
public void update(WebContext webContext, Object arg)
WebContextObserver
This method is called by the WebContext
on its registered WebContextObserver
s when users call the
refresh()
methods on the context.
To setup an object to be updated by the context, one needs to use the
WebContext.addObserver(WebContextObserver)
to register itself with the context. All
context attributes are wired up to the WebContext
. When users change state on any of
the attributes and need to intimate other attributes of the context to react to the change they call either the
WebContext.refresh()
or WebContext.refresh(Object)
methods. The context in turns calls the WebContextObserver.update(WebContext, Object)
methods on all its registered
observers.
update
in interface WebContextObserver
webContext
- the WebContext
that has been refreshedarg
- the argument passed to the WebContext
's refresh(arg)
methodWebContext.refresh(Object)
,
WebContext.addObserver(WebContextObserver)
,
WebContext.removeObserver(WebContextObserver)
public List<OverviewFunctionality> getOverviewFunctionalities()
public void reloadImageRectangle()
public void exportImage()
public WebExtent getDrawExtent()
WebExtent
object encompassing the extent of the overview map.
WebExtent
public void setDrawExtent(WebExtent drawExtent)
drawExtent
- the extent of the overview map.WebExtent
public boolean isLastEnabledOverviewFunctionality(OverviewFunctionality overviewFunc)
overviewFunc
- the overview functionality.
public void setHeight(int height)
height
- the overview map height in pixels.public int getHeight()
public void setWidth(int width)
width
- the width of the overview map in pixels.public int getWidth()
public void setDpi(int dpi)
dpi
- the DPI.public int getDpi()
public void setImageFormat(String imageFormat)
imageFormat
- the format string.public String getImageFormat()
public void setVisible(boolean visible)
visible
- if true, visible.public boolean isVisible()
public void setInit(boolean init)
init
- if true, initialize.public boolean isInit()
public WebContext getWebContext()
WebContext
associated with this object.
public void setUseMIMEData(boolean useMIMEData)
useMIMEData
- if true
, MIME data is requested from the GIS Server.public boolean isUseMIMEData()
public void setShowFullExtent(boolean showFullExtent)
showFullExtent
- if true, display the full extent of map in the overview control.public boolean isShowFullExtent()
public void setStaticImageUrl(String staticImageUrl)
WebMap
are used to generate the
image.
For Example, overview.setStaticImageUrl("http://localhost/mycontext/images/overview.png"); [OR} overview.setStaticImageUrl("images/overview.png");
staticImageUrl
- the URL of the static image.public String getStaticImageUrl()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |