Package com.ponysdk.core.instruction

Examples of com.ponysdk.core.instruction.Update


    public void bindTerminalFunction(final String functionName) {

        if (nativeBindingFunction != null) throw new IllegalAccessError("Object already bind to native function: " + nativeBindingFunction);

        final Update update = new Update(getID());
        update.put(Dictionnary.PROPERTY.BIND, functionName);
        Txn.get().getTxnContext().save(update);

        nativeBindingFunction = functionName;
    }
View Full Code Here


    public void sendToNative(final JSONObject data) {

        if (nativeBindingFunction == null) throw new IllegalAccessError("Object not bind to a native function");

        final Update update = new Update(getID());
        update.put(Dictionnary.PROPERTY.NATIVE, data);
        Txn.get().getTxnContext().save(update);
    }
View Full Code Here

            } catch (final Exception e) {}
        }

        final String extension = classpathURL.getUrl().getFile().substring(classpathURL.getUrl().getFile().lastIndexOf('.') + 1);

        final Update update = new Update(getID());
        update.put(PROPERTY.IMAGE_URL, "data:image/" + extension + ";base64," + imageToBase64);
        Txn.get().getTxnContext().save(update);
    }
View Full Code Here

        return url;
    }

    public void setUrl(final String url) {
        this.url = url;
        final Update update = new Update(getID());
        update.put(PROPERTY.IMAGE_URL, url);
        Txn.get().getTxnContext().save(update);
    }
View Full Code Here

     *            true to display the mask when input is empty
     * @param freeSymbol
     *            replacement char when there is no input yet
     */
    public void applyMask(final String pattern, final boolean showMask, final String freeSymbol) {
        final Update update = new Update(getID());
        update.put(PROPERTY.MASK, pattern);
        update.put(PROPERTY.VISIBILITY, showMask);
        update.put(PROPERTY.REPLACEMENT_STRING, freeSymbol);
        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 ? Long.toString(date.getTime()) : "");
        Txn.get().getTxnContext().save(update);
    }
View Full Code Here

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

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

     * Sets a visible date to be enabled or disabled. This is only set until the next time the DatePicker is
     * refreshed.
     */
    public final void setTransientEnabledOnDates(final boolean enabled, final Collection<Date> dates) {
        final List<String> asString = dateToString(dates);
        final Update update = new Update(getID());
        update.put(PROPERTY.DATE_ENABLED, asString);
        update.put(PROPERTY.ENABLED, enabled);
        Txn.get().getTxnContext().save(update);
    }
View Full Code Here

    /**
     * Add a style name to the given dates.
     */
    public void addStyleToDates(final String styleName, final Collection<Date> dates) {
        final List<String> asString = dateToString(dates);
        final Update update = new Update(getID());
        update.put(PROPERTY.ADD_DATE_STYLE, asString);
        update.put(PROPERTY.STYLE_NAME, styleName);
        Txn.get().getTxnContext().save(update);
    }
View Full Code Here

    /**
     * Removes the styleName from the given dates (even if it is transient).
     */
    public void removeStyleFromDates(final String styleName, final Collection<Date> dates) {
        final List<String> asString = dateToString(dates);
        final Update update = new Update(getID());
        update.put(PROPERTY.REMOVE_DATE_STYLE, asString);
        update.put(PROPERTY.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.