Examples of EditCommand


Examples of org.locationtech.udig.project.command.EditCommand

    public void setPropertyValue( Object id, Object value ) {
        try {
            if (id instanceof Integer) {
                int i = ((Integer) id).intValue();
                Object attr = feature.getAttribute(i);
                EditCommand command = (EditCommand) EditCommandFactory.getInstance().createSetAttributeCommand(
                        attrs.get(i).getName().getLocalPart(), value);
                map.sendCommandASync(command);
                if (attr instanceof String) {
                    feature.setAttribute(i, value);
                } else if (attr instanceof Integer) {
                    feature.setAttribute(i, Integer.valueOf((String) value));
                } else if (attr instanceof Double) {
                    feature.setAttribute(i, Double.valueOf((String) value));
                } else if (attr instanceof Float) {
                    feature.setAttribute(i, Float.valueOf((String) value));
                } else if (attr instanceof Boolean) {
                    feature.setAttribute(i, Boolean.valueOf(((Integer) value).intValue() == 0
                            ? true
                            : false));
                }
            }
            if (value instanceof Geometry) {
                if (id.equals(DEFAULT_GEOM)){
                    feature.setDefaultGeometry((Geometry) value);

                    EditCommand command = (EditCommand) EditCommandFactory.getInstance().createSetGeometryCommand((Geometry) value);
                    map.sendCommandASync(command);
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

Examples of syam.BookEditor.Command.EditCommand

    // Intro Commands
    commands.add(new HelpCommand());

    // General Commands
    commands.add(new CopyCommand());
    commands.add(new EditCommand());
    commands.add(new TitleCommand());

    // Admin Commands
    commands.add(new AuthorCommand());
    commands.add(new ReloadCommand());
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.