org.gwtopenmaps.openlayers.client.control
Class SelectFeature

java.lang.Object
  extended by org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
      extended by org.gwtopenmaps.openlayers.client.OpenLayersObjectWrapper
          extended by org.gwtopenmaps.openlayers.client.OpenLayersEObjectWrapper
              extended by org.gwtopenmaps.openlayers.client.control.Control
                  extended by org.gwtopenmaps.openlayers.client.control.SelectFeature

public class SelectFeature
extends Control

When activated, selects features on click by default. Use SelectFeatureOptions argument to select on hover.

Author:
Erdem Gunay, Edwin Commandeur - Atlis EJS, Curtis Jensen

Nested Class Summary
static interface SelectFeature.ClickFeatureListener
           
static interface SelectFeature.SelectFeatureListener
           
static interface SelectFeature.UnselectFeatureListener
           
 
Field Summary
 
Fields inherited from class org.gwtopenmaps.openlayers.client.OpenLayersEObjectWrapper
eventListeners
 
Constructor Summary
protected SelectFeature(JSObject element)
           
  SelectFeature(Vector layer)
           
  SelectFeature(Vector layer, SelectFeatureOptions options)
           
 
Method Summary
 void addBeforeFeatureHighlightedListener(BeforeFeatureHighlightedListener beforeFeatureHighlightedListener)
          Adds a listener to be called when the event "beforeFeatureHighlighted" occurs on a Vector Feature.
 void addFeatureHighlightedListener(FeatureHighlightedListener featureHighlightedListener)
          Adds a listener to be called when the event "beforeFeatureHighlighted" occurs on a Vector Feature
 void addFeatureUnhighlightedListener(FeatureUnhighlightedListener featureUnhighlightedListener)
          Adds a listener to be called when the event "beforeFeatureHighlighted" occurs on a Vector Feature
 void setClickOut(boolean clickout)
          Unselect a feature by clicking outside it.
 void setHover(boolean hover)
          Select a feature when hovering over it with the mouse (mouse in) and deselect it on mouse out.
 void setMultiple(boolean multiple)
          Hold down shift or ctrl and click to select multiple features.
 void setMultipleKey(String keyName)
           
 void setToggle(boolean toggle)
          Select and deselect a feature by clicking on it with the mouse.
 void setToggleKey(String keyName)
           
 
Methods inherited from class org.gwtopenmaps.openlayers.client.control.Control
activate, addControlActivateListener, addControlDeactivateListener, deactivate, disable, enable, getControlId, getLayer, getMap, getZIndex, isActive, narrowToControl, setAutoActivate
 
Methods inherited from class org.gwtopenmaps.openlayers.client.OpenLayersEObjectWrapper
getListeners, narrowToOpenLayersEObjectWrapper, removeListener
 
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

SelectFeature

protected SelectFeature(JSObject element)

SelectFeature

public SelectFeature(Vector layer)
Parameters:
layer -

SelectFeature

public SelectFeature(Vector layer,
                     SelectFeatureOptions options)
Parameters:
layer -
Method Detail

setHover

public void setHover(boolean hover)
Select a feature when hovering over it with the mouse (mouse in) and deselect it on mouse out.

Parameters:
hover - - true to select on hover

setToggle

public void setToggle(boolean toggle)
Select and deselect a feature by clicking on it with the mouse.

Parameters:
toggle - - true to enabling toggling feature selection

setMultiple

public void setMultiple(boolean multiple)
Hold down shift or ctrl and click to select multiple features.

Parameters:
multiple - - true to enable selecting multiple features

setMultipleKey

public void setMultipleKey(String keyName)

setToggleKey

public void setToggleKey(String keyName)

setClickOut

public void setClickOut(boolean clickout)
Unselect a feature by clicking outside it. This is the default way of selecting/unselecting features.

Parameters:
clickout - - true to enable unselect on click outside feature.

addBeforeFeatureHighlightedListener

public void addBeforeFeatureHighlightedListener(BeforeFeatureHighlightedListener beforeFeatureHighlightedListener)
Adds a listener to be called when the event "beforeFeatureHighlighted" occurs on a Vector Feature.

Note: This event is only generated if the hover property of the SelectFeatureOptions of this SelectFeature is set to true

Parameters:
listener - The listener to add

addFeatureUnhighlightedListener

public void addFeatureUnhighlightedListener(FeatureUnhighlightedListener featureUnhighlightedListener)
Adds a listener to be called when the event "beforeFeatureHighlighted" occurs on a Vector Feature

Parameters:
listener - The listener to add

addFeatureHighlightedListener

public void addFeatureHighlightedListener(FeatureHighlightedListener featureHighlightedListener)
Adds a listener to be called when the event "beforeFeatureHighlighted" occurs on a Vector Feature

Parameters:
listener - The listener to add


Copyright © 2011 sourceforge. All Rights Reserved.