Class UnJoinNodeWayAction

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, Destroyable

    public class UnJoinNodeWayAction
    extends JosmAction
    Disconnect nodes from a way they currently belong to.
    Since:
    6253
    See Also:
    Serialized Form
    • Constructor Detail

    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
        Called when the action is executed.
      • notify

        public void notify​(java.lang.String msg,
                           int messageType)
        Send a notification message.
        Parameters:
        msg - Message to be sent.
        messageType - Nature of the message.
      • cleanSelectedNodes

        private java.util.List<NodecleanSelectedNodes​(java.util.List<Way> selectedWays,
                                                        java.util.List<Node> selectedNodes)
        Removes irrelevant nodes from user selection. The action can be performed reliably even if we remove : * Nodes not referenced by any ways * When only one way is selected, nodes not part of this way (#10396).
        Parameters:
        selectedWays - List of user selected way.
        selectedNodes - List of user selected nodes.
        Returns:
        New list of nodes cleaned of irrelevant nodes.
      • getApplicableWays

        static java.util.List<WaygetApplicableWays​(java.util.List<Way> selectedWays,
                                                     java.util.List<Node> selectedNodes)
        Find ways to which the disconnect can be applied. This is the list of ways with more than two nodes which pass through all the given nodes, intersected with the selected ways (if any)
        Parameters:
        selectedWays - List of user selected ways.
        selectedNodes - List of user selected nodes.
        Returns:
        List of relevant ways