public final class CreateCircleAction extends JosmAction
| Modifier and Type | Class and Description |
|---|---|
private static class |
CreateCircleAction.PolarNode
Class designed to create a couple between a node and its angle relative to the center of the circle.
|
private static class |
CreateCircleAction.PolarNodeComparator
Comparator used to order PolarNode relative to their angle.
|
sc| Constructor and Description |
|---|
CreateCircleAction()
Constructs a new
CreateCircleAction. |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
private int[] |
distributeNodes(CreateCircleAction.PolarNode[] angles,
int nodesCount)
Distributes nodes according to the algorithm of election with largest remainder.
|
private static void |
notifyNodesNotOnCircle() |
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, setTooltippublic CreateCircleAction()
CreateCircleAction.private int[] distributeNodes(CreateCircleAction.PolarNode[] angles, int nodesCount)
angles - Array of PolarNode ordered by increasing anglesnodesCount - Number of nodes to be distributedpublic void actionPerformed(java.awt.event.ActionEvent e)
private static void notifyNodesNotOnCircle()
protected void updateEnabledState()
JosmActionJosmAction.updateEnabledState(Collection) to respond to changes in the collection
of selected primitives.
Default behavior is empty.updateEnabledState in class JosmActionJosmAction.updateEnabledState(Collection),
JosmAction.initEnabledState()protected void updateEnabledState(java.util.Collection<? extends OsmPrimitive> selection)
JosmActionupdateEnabledState in class JosmActionselection - the collection of selected primitives; may be empty, but not nullJosmAction.updateEnabledState(),
JosmAction.initEnabledState()