org.gwtopenmaps.openlayers.client.popup
Class Popup

java.lang.Object
  extended by org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
      extended by org.gwtopenmaps.openlayers.client.OpenLayersObjectWrapper
          extended by org.gwtopenmaps.openlayers.client.popup.Popup
Direct Known Subclasses:
Anchored, AnchoredBubble, Framed, FramedCloud

public class Popup
extends OpenLayersObjectWrapper

Author:
Erdem Gunay, Curtis Jensen, Marten Karlberg, Digpro AB

Nested Class Summary
static interface Popup.CloseListener
           
 
Constructor Summary
protected Popup(JSObject element)
           
  Popup(String id, LonLat lonlat, Size size, String html, boolean closeBox)
          Use addCloseListener to respond to popup close event.
  Popup(String id, LonLat lonlat, Size size, String html, boolean closeBox, Popup.CloseListener closeBoxCallback)
           
 
Method Summary
 void addCloseListener(Popup.CloseListener callback)
          Deprecated. add a close listener via the constructor instead this method uses a private method in OL and will not work as expected
 boolean getAutoSize()
          Get the popup autoSize state
 String getBackgroundColor()
          Get the popup backgroundColor
 String getBorder()
          Get the border style as set by setBorder
 double getOpacity()
          Get the popup opacity
 boolean getPanMapIfOutOfView()
          Get the popup panMapIfOutOfView state
 void hide()
          Method: hide Makes the popup invisible.
static Popup narrowToOpenLayersPopup(JSObject element)
           
 void setAutoSize(boolean autoSize)
          autosize the popup
 void setBackgroundColor(String color)
          Set the popup backgroundColor.
 void setBorder(String border)
          Set the border style
 void setContentHTML(String contentHTML)
           
 void setLonLat(LonLat lt)
           
 void setOpacity(double opacity)
          Set the popup opacity
 void setPanMapIfOutOfView(boolean panMapIfOutOfView)
          When drawn, pan map such that the entire popup is visible in the current viewport (if necessary).
 void show()
          Method: show Makes the popup visible.
 void updatePosition()
          Method: updatePosition if the popup has a lonlat and its map members set, then have it move itself to its proper position
 
Methods inherited from class org.gwtopenmaps.openlayers.client.OpenLayersObjectWrapper
getClassName, getEvents, narrowToOpenLayersObjectWrapper
 
Methods inherited from class org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
getJSObject, setJSObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Popup

protected Popup(JSObject element)

Popup

public Popup(String id,
             LonLat lonlat,
             Size size,
             String html,
             boolean closeBox,
             Popup.CloseListener closeBoxCallback)

Popup

public Popup(String id,
             LonLat lonlat,
             Size size,
             String html,
             boolean closeBox)
Use addCloseListener to respond to popup close event. (Beware! This does not work as expected. Instead pass the CloseListener in the constructor for proper binding. /Digpro)

Parameters:
id - - String identifier for Popup. Used by ..?..
lonlat - - LonLat where Popup should appear
size - - Size that provides height and width for Popup
html - - String with html content to appear in Popup
closeBox - - Set to true to get close button in upper right corner of Popup
Method Detail

narrowToOpenLayersPopup

public static Popup narrowToOpenLayersPopup(JSObject element)

addCloseListener

public void addCloseListener(Popup.CloseListener callback)
Deprecated. add a close listener via the constructor instead this method uses a private method in OL and will not work as expected


setAutoSize

public void setAutoSize(boolean autoSize)
autosize the popup

Parameters:
autoSize - - boolean

getAutoSize

public boolean getAutoSize()
Get the popup autoSize state

Returns:
autoSize - boolean

setPanMapIfOutOfView

public void setPanMapIfOutOfView(boolean panMapIfOutOfView)
When drawn, pan map such that the entire popup is visible in the current viewport (if necessary).

Parameters:
panMapIfOutOfView - - boolean

getPanMapIfOutOfView

public boolean getPanMapIfOutOfView()
Get the popup panMapIfOutOfView state

Returns:
panMapIfOutOfView - boolean

setBackgroundColor

public void setBackgroundColor(String color)
Set the popup backgroundColor. Sets the style

Parameters:
color - - String

getBackgroundColor

public String getBackgroundColor()
Get the popup backgroundColor

Returns:
backgroundColor - String

setOpacity

public void setOpacity(double opacity)
Set the popup opacity

Parameters:
opacity - - double

getOpacity

public double getOpacity()
Get the popup opacity

Returns:
opacity - double

setBorder

public void setBorder(String border)
Set the border style

Parameters:
border - - String

getBorder

public String getBorder()
Get the border style as set by setBorder

Returns:
border CSS

setContentHTML

public void setContentHTML(String contentHTML)

setLonLat

public void setLonLat(LonLat lt)

show

public void show()
Method: show Makes the popup visible.


hide

public void hide()
Method: hide Makes the popup invisible.


updatePosition

public void updatePosition()
Method: updatePosition if the popup has a lonlat and its map members set, then have it move itself to its proper position



Copyright © 2011 sourceforge. All Rights Reserved.