public final class AlignInCircleAction extends JosmAction
Modifier and Type | Class and Description |
---|---|
static class |
AlignInCircleAction.PolarCoor |
JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter
sc
Constructor and Description |
---|
AlignInCircleAction()
Constructs a new
AlignInCircleAction . |
Modifier and Type | Method and Description |
---|---|
private static boolean |
actionAllowed(java.util.Collection<Node> nodes)
Check if one or more nodes are outside of download area
|
void |
actionPerformed(java.awt.event.ActionEvent e)
Perform AlignInCircle action.
|
protected static boolean |
checkWaysArePolygon(java.util.Collection<Way> ways)
Determines if ways can be joined into a polygon.
|
private static java.util.List<Node> |
collectNodesAnticlockwise(java.util.List<Way> ways)
Assuming all ways can be joined into polygon, create an ordered list of node.
|
private static java.util.List<Node> |
collectNodesWithExternReferers(java.util.List<Way> ways)
Collect all nodes with more than one referrer.
|
private static double |
distance(EastNorth n,
EastNorth m) |
protected void |
updateEnabledState()
Override in subclasses to update the enabled state of the action when
something in the JOSM state changes, i.e.
|
protected void |
updateEnabledState(java.util.Collection<? extends OsmPrimitive> selection)
Override in subclasses to update the enabled state of the action if the
collection of selected primitives changes.
|
destroy, getCurrentDataSet, getEditLayer, getShortcut, initEnabledState, installAdapters, setTooltip, waitFuture
public AlignInCircleAction()
AlignInCircleAction
.public void actionPerformed(java.awt.event.ActionEvent e)
private static java.util.List<Node> collectNodesWithExternReferers(java.util.List<Way> ways)
ways
- Ways from witch nodes are selectedprivate static java.util.List<Node> collectNodesAnticlockwise(java.util.List<Way> ways)
ways
- List of ways to be joinedprivate static boolean actionAllowed(java.util.Collection<Node> nodes)
nodes
- Nodes to checkprotected void updateEnabledState()
JosmAction
JosmAction.updateEnabledState(Collection)
to respond to changes in the collection
of selected primitives.
Default behavior is empty.updateEnabledState
in class JosmAction
JosmAction.updateEnabledState(Collection)
,
JosmAction.initEnabledState()
protected void updateEnabledState(java.util.Collection<? extends OsmPrimitive> selection)
JosmAction
updateEnabledState
in class JosmAction
selection
- the collection of selected primitives; may be empty, but not nullJosmAction.updateEnabledState()
,
JosmAction.initEnabledState()
protected static boolean checkWaysArePolygon(java.util.Collection<Way> ways)
ways
- The ways collection to check