net.simplace.ui.formengine.geotools.GeoObjectChooser
Version: 1.0
This class provides a modal javax.swing.JDialog which shows several map layers in
a GeoObjectChooserPanel and waits for the user to choose a geo
object from one specific layer.
By default the dialog closes automatically after the selection. This
option can be disabled by setCloseOnChoose(boolean) method.
The selection result is provided by getSelectionResult(). See
GeoObjectChooserPanel for detailed informations.
See also: GeoObjectChooserPanel
public class GeoObjectChooser extends javax.swing.JDialog {
// Public Constructors
public GeoObjectChooser(Element aFormElement, FWObservable aObservable);
public GeoObjectChooser(Frame aOwner, String aTitle, Element aFormElement,
FWObservable aObservable);
public GeoObjectChooser(Frame aOwner, String aTitle, boolean aCloseOnChoose,
boolean aMultiSelection, Element aFormElement, FWObservable aObservable);
// Protected Instance Variables
protected boolean iCloseOnChoose;
protected GeoObjectChooserPanel choosePanel;
// Public Instance Methods public SelectableXMapPane getMapPane();
returns the {@link SelectableXMapPane} the layer are displayed in.
public MapContext getMapContext();
returns the {@link MapContext} the layer can be put in.
public MapLayer getSelectionLayer();
Returns the layer the selection is made on.
returns {@code null} if no selection layer is specified yet
public void
setSelectionLayer(MapLayer aLayer);
Sets the layer the selection is made on.
- aLayer a layer of the map's context
public void
setSelectionLayer(int aLayerIdx);
Sets the layer the selection is made on.
- aLayerIdx the index (top to bottem) of a layer
public void
setCloseOnChoose(boolean aCloseOnChoose);
Sets whether the dialog will be closed immediately after the user's choice.
public boolean isClosedOnChoose();
returns whether the dialog will be closed immediately after the user's choice.
public boolean isMultiSelectionEnabled();
returns whether the dialog can be used to choose more than one object.
public Object
getSelectionRange();
Returns the bounds of the last user selection. Returns
- a java.awt.geom.Point2D with map coordinates, if multi selection is disabled.
- a com.vividsolutions.jts.geom.Envelope with map bounds, if multi selection is enabled.
returns {@code null} is no selection layer is specified or no selection if performed yet
}
Hierarchy: java.lang.Object - java.awt.Component (java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable) - java.awt.Container - java.awt.Window (javax.accessibility.Accessible) - java.awt.Dialog - javax.swing.JDialog (javax.swing.WindowConstants, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.TransferHandler.HasGetTransferHandler) - GeoObjectChooser