public class ParallelWays extends java.lang.Object
ParallelWayAction.| Modifier and Type | Field and Description |
|---|---|
private int |
nodeCount |
private EastNorth[] |
normals |
private EastNorth[] |
pts |
private java.util.List<Node> |
sortedNodes |
private java.util.List<Way> |
ways |
| Constructor and Description |
|---|
ParallelWays(java.util.Collection<Way> sourceWays,
boolean copyTags,
int refWayIndex)
Constructs a new
ParallelWays. |
| Modifier and Type | Method and Description |
|---|---|
void |
changeOffset(double d)
Offsets the way(s) d units.
|
void |
commit()
Performs the action by adding a new sequence command to the undo/redo queue.
|
private static Node |
copyNode(Node source,
boolean copyTags) |
private static void |
copyNodeInMap(java.util.Map<Node,Node> splitNodeMap,
Node node,
boolean copyTags) |
java.util.List<Way> |
getWays()
Returns the resulting parallel ways.
|
boolean |
isClosedPath()
Determines if the nodes graph form a closed path
|
private java.util.List<Command> |
makeAddWayAndNodesCommandList() |
private final java.util.List<Node> sortedNodes
private final int nodeCount
public ParallelWays(java.util.Collection<Way> sourceWays, boolean copyTags, int refWayIndex)
ParallelWays.sourceWays - source wayscopyTags - whether tags should be copiedrefWayIndex - Need a reference way to determine the direction of the offset when we manage multiple waysprivate static void copyNodeInMap(java.util.Map<Node,Node> splitNodeMap, Node node, boolean copyTags)
public boolean isClosedPath()
true if the nodes graph form a closed pathpublic void changeOffset(double d)
d - offsetpublic void commit()
private java.util.List<Command> makeAddWayAndNodesCommandList()