Package com.ponysdk.core.instruction

Examples of com.ponysdk.core.instruction.Update


    }

    public void setDateFormat(final SimpleDateFormat dateFormat) {
        this.dateFormat = dateFormat;

        final Update update = new Update(getID());
        update.put(PROPERTY.DATE_FORMAT_PATTERN, dateFormat.toPattern());
        Txn.get().getTxnContext().save(update);
    }
View Full Code Here


    }

    @Override
    public void setValue(final Date date) {
        this.date = date;
        final Update update = new Update(getID());
        update.put(PROPERTY.VALUE, date != null ? dateFormat.format(date) : "");
        Txn.get().getTxnContext().save(update);
    }
View Full Code Here

        update.put(PROPERTY.VALUE, date != null ? dateFormat.format(date) : "");
        Txn.get().getTxnContext().save(update);
    }

    public void setDefaultMonth(final Date date) {
        final Update update = new Update(getID());
        update.put(PROPERTY.MONTH, Long.toString(date.getTime()));
        Txn.get().getTxnContext().save(update);
    }
View Full Code Here

    }

    public void removeStyleProperty(final String name) {
        final String previous = safeStyleProperties().remove(name);
        if (previous != null) {
            final Update update = new Update(ID);
            update.put(PROPERTY.REMOVE_STYLE_KEY, name);
            Txn.get().getTxnContext().save(update);
        }
    }
View Full Code Here

    }

    public void setProperty(final String name, final String value) {
        final String previous = safeElementProperties().put(name, value);
        if (!Objects.equals(previous, value)) {
            final Update update = new Update(ID);
            update.put(PROPERTY.PUT_PROPERTY_KEY, name);
            update.put(PROPERTY.PROPERTY_VALUE, value);
            Txn.get().getTxnContext().save(update);
        }
    }
View Full Code Here

    }

    public void setAttribute(final String name, final String value) {
        final String previous = safeElementAttributes().put(name, value);
        if (!Objects.equals(previous, value)) {
            final Update update = new Update(ID);
            update.put(PROPERTY.PUT_ATTRIBUTE_KEY, name);
            update.put(PROPERTY.ATTRIBUTE_VALUE, value);
            Txn.get().getTxnContext().save(update);
        }
    }
View Full Code Here

    }

    public void removeAttribute(final String name) {
        final String previous = safeElementAttributes().remove(name);
        if (previous != null) {
            final Update update = new Update(ID);
            update.put(PROPERTY.REMOVE_ATTRIBUTE_KEY, name);
            Txn.get().getTxnContext().save(update);
        }
    }
View Full Code Here

        return elementAttributes.get(key);
    }

    public void preventEvent(final PEvent e) {
        if (safePreventEvents().add(e)) {
            final Update update = new Update(ID);
            update.put(PROPERTY.PREVENT_EVENT, e.getCode());
            Txn.get().getTxnContext().save(update);
        }
    }
View Full Code Here

        }
    }

    public void stopEvent(final PEvent e) {
        if (safeStopEvents().add(e)) {
            final Update update = new Update(ID);
            update.put(PROPERTY.STOP_EVENT, e.getCode());
            Txn.get().getTxnContext().save(update);
        }
    }
View Full Code Here

        }
    }

    public void addStyleName(final String styleName) {
        if (safeStyleName().add(styleName)) {
            final Update update = new Update(ID);
            update.put(PROPERTY.ADD_STYLE_NAME, styleName);
            Txn.get().getTxnContext().save(update);
        }
    }
View Full Code Here

TOP

Related Classes of com.ponysdk.core.instruction.Update

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.