Examples of PseudoCommand


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
Copyright © 2018 www.massapi.com. 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.