/** * Return the element which as the unique DOMBinding identifier id * (Every DOMBinding has a unique identifier which identifies uniquely * the DOM element referenced by the DOMBinding object. This id is, * for example, used to build the absolute name of an elt of the graph) */ public Object getValueById(int id) { int size = this.bindingsSize(); for (int i=0; i<size; i++) { DOMBinding b = (DOMBinding)this.bindings.get(i); if (b.id == id) return b.getValue(this); } return null; }
public Object getValue(int index) { if (!Common.isArray(this.type)) { // Value not set for single type property - return null if ((index > 0) || (this.bindingsSize() == 0)) return null; } if (bindingsSize() == 0) { // Ok no value set so far. return null. return null; } // end of if (this.bindingsSize() == 0) DOMBinding b = (DOMBinding)this.bindings.get(index); if (b != null) return b.getValue(this); else return null; }
public void removeValue(int index) { if (index >= this.bindingsSize() && Common.isVetoable(this.type) && useVetoEvents()) { DOMBinding b = (DOMBinding)this.bindings.get(index); if (b != null) { Object value = b.getValue(this); // Check before doing any change if this is ok this.raiseVetoableEvent(value, 0, OP_SETTER_REMOVE); } // If we reach this point, no exception has been raised, // and the change can happen. } this.removeElement(index, true); }
Object oldValue = b.getValue(this); b.setLastKnownIndex(this, index);
oldValue = this.getValue(prop);