/** * Set the value for one element of an indexed property */ public void setValue(int index, Object value) { if (Common.isVetoable(this.type) && useVetoEvents()) { // Check before doing any change if this is ok this.raiseVetoableEvent(value, index, OP_SETTER_SETELT); // If we reach this point, no exception has been raised, // and the change can happen. } this.setElement(index, value, false); }
/** * Add a value at the end of the indexed property */ public int addValue(Object value) { if (Common.isVetoable(this.type) && useVetoEvents()) { // Check before doing any change if this is ok this.raiseVetoableEvent(value, 0, OP_SETTER_ADD); // If we reach this point, no exception has been raised, // and the change can happen. } return this.setElement(0, value, true); }
private boolean checkVetoable(boolean raise) { if (Common.isVetoable(this.type) || Common.isBean(this.type)) return true; if (raise) { if (!Common.isBean(this.type)) { throw new Schema2BeansRuntimeException(Common. getMessage("PropertyDoesntSupportVeto_msg", this.beanName)); } } return false; }
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); }
if (Common.isVetoable(this.type) && useVetoEvents()) {
if (Common.isVetoable(this.type) && useVetoEvents()) { this.raiseVetoableEvent(value, 0, OP_SETTER_SETARRAY);