Package org.openstreetmap.josm.command

Examples of org.openstreetmap.josm.command.PseudoCommand


     * Return primitives that are affected by some command
     * @param path GUI elements
     * @return collection of affected primitives, onluy usable ones
     */
    protected static FilteredCollection<OsmPrimitive> getAffectedPrimitives(TreePath path) {
        PseudoCommand c = ((CommandListMutableTreeNode) path.getLastPathComponent()).getCommand();
        final OsmDataLayer currentLayer = Main.main.getEditLayer();
        return new FilteredCollection<>(
                c.getParticipatingPrimitives(),
                new Predicate<OsmPrimitive>(){
                    @Override
                    public boolean evaluate(OsmPrimitive o) {
                        OsmPrimitive p = currentLayer.data.getPrimitiveById(o);
                        return p != null && p.isUsable();
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.command.PseudoCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.