Search in sources :

Example 6 with Attribute

use of com.ait.lienzo.client.core.Attribute in project lienzo-core by ahome-it.

the class AttributesChangedEvent method one.

public final boolean one(final Attribute... attributes) {
    int count = 0;
    final NFastStringSet seen = new NFastStringSet();
    for (final Attribute attribute : attributes) {
        final String name = attribute.getProperty();
        if (false == seen.contains(name)) {
            if (m_changed.contains(name)) {
                if (++count > 1) {
                    return false;
                }
                seen.add(name);
            }
        }
    }
    return (0 != count);
}
Also used : NFastStringSet(com.ait.tooling.nativetools.client.collection.NFastStringSet) Attribute(com.ait.lienzo.client.core.Attribute)

Example 7 with Attribute

use of com.ait.lienzo.client.core.Attribute in project lienzo-core by ahome-it.

the class AttributesChangedEvent method count.

public final int count(final List<Attribute> attributes) {
    int count = 0;
    final NFastStringSet seen = new NFastStringSet();
    for (final Attribute attribute : attributes) {
        final String name = attribute.getProperty();
        if (false == seen.contains(name)) {
            if (m_changed.contains(name)) {
                count++;
                seen.add(name);
            }
        }
    }
    return count;
}
Also used : NFastStringSet(com.ait.tooling.nativetools.client.collection.NFastStringSet) Attribute(com.ait.lienzo.client.core.Attribute)

Example 8 with Attribute

use of com.ait.lienzo.client.core.Attribute in project lienzo-core by ahome-it.

the class AttributesChangedEvent method count.

public final int count(final Attribute... attributes) {
    int count = 0;
    final NFastStringSet seen = new NFastStringSet();
    for (final Attribute attribute : attributes) {
        final String name = attribute.getProperty();
        if (false == seen.contains(name)) {
            if (m_changed.contains(name)) {
                count++;
                seen.add(name);
            }
        }
    }
    return count;
}
Also used : NFastStringSet(com.ait.tooling.nativetools.client.collection.NFastStringSet) Attribute(com.ait.lienzo.client.core.Attribute)

Aggregations

Attribute (com.ait.lienzo.client.core.Attribute)8 NFastStringSet (com.ait.tooling.nativetools.client.collection.NFastStringSet)4 AttributeType (com.ait.lienzo.client.core.AttributeType)1 HandlerRegistration (com.google.gwt.event.shared.HandlerRegistration)1 JSONObject (com.google.gwt.json.client.JSONObject)1 JSONString (com.google.gwt.json.client.JSONString)1 JSONValue (com.google.gwt.json.client.JSONValue)1