public class SelectByInternalPointAction extends JosmAction
JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter
sc
changeSupport, enabled
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor and Description |
---|
SelectByInternalPointAction() |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
static OsmPrimitive |
getSmallestSurroundingObject(EastNorth internalPoint)
Returns the smallest surrounding polygon/multipolygon which contains the internal point.
|
static Collection<OsmPrimitive> |
getSurroundingObjects(EastNorth internalPoint)
Returns the surrounding polygons/multipolygons
ordered by their area size (from small to large)
which contain the internal point.
|
static void |
performSelection(EastNorth internalPoint,
boolean doAdd,
boolean doRemove)
Select a polygon or multipolygon by an internal point.
|
destroy, getCurrentDataSet, getEditLayer, getShortcut, initEnabledState, installAdapters, setTooltip, updateEnabledState, updateEnabledState
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public SelectByInternalPointAction()
public static Collection<OsmPrimitive> getSurroundingObjects(EastNorth internalPoint)
internalPoint
- the internal point.public static OsmPrimitive getSmallestSurroundingObject(EastNorth internalPoint)
internalPoint
- the internal point.public static void performSelection(EastNorth internalPoint, boolean doAdd, boolean doRemove)
internalPoint
- the internal point.doAdd
- whether to add selected polygon to the current selection.doRemove
- whether to remove the selected polygon from the current selection.public void actionPerformed(ActionEvent e)