/** * {@inheritDoc} */ @Override public void stateChanged(IChemObjectChangeEvent event) { notifyChanged(event); }
/** * {@inheritDoc} */ @Override public void stateChanged(IChemObjectChangeEvent event) { notifyChanged(event); }
/** * {@inheritDoc} */ @Override public void addStereoElement(IStereoElement element) { stereo.add(element); notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addStereoElement(IStereoElement element) { stereo.add(element); notifyChanged(); }
/** * {@inheritDoc} */ @Override public void setStereoElements(List<IStereoElement> elements) { this.stereo.clear(); this.stereo.addAll(elements); notifyChanged(); }
/** * {@inheritDoc} */ @Override public void setStereoElements(List<IStereoElement> elements) { this.stereo.clear(); this.stereo.addAll(elements); notifyChanged(); }
/** * {@inheritDoc} */ @Override public void removeAllBonds() { bonds = new BaseBondRef[0]; numBonds = 0; clearAdjacency(); notifyChanged(); }
/** * {@inheritDoc} */ @Override public void removeAllBonds() { bonds = new BaseBondRef[0]; numBonds = 0; clearAdjacency(); notifyChanged(); }
/** * {@inheritDoc} */ @Override public ISingleElectron removeSingleElectron(int idx) { ISingleElectron electron = null; if (idx >= 0 && idx < numSingleElectrons) { electron = electrons[idx]; numSingleElectrons--; System.arraycopy(electrons, idx + 1, electrons, idx, numSingleElectrons - idx); electrons[numSingleElectrons] = null; electron.removeListener(this); notifyChanged(); } return electron; }
/** * {@inheritDoc} */ @Override public void addLonePair(ILonePair lp) { ensureLonePairCapacity(numLonePairs + 1); lonepairs[numLonePairs++] = lp; lp.addListener(this); notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addSingleElectron(ISingleElectron e) { ensureElectronCapacity(numSingleElectrons + 1); electrons[numSingleElectrons++] = e; e.addListener(this); notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addLonePair(ILonePair lp) { ensureLonePairCapacity(numLonePairs + 1); lonepairs[numLonePairs++] = lp; lp.addListener(this); notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addSingleElectron(ISingleElectron e) { ensureElectronCapacity(numSingleElectrons + 1); electrons[numSingleElectrons++] = e; e.addListener(this); notifyChanged(); }
/** * {@inheritDoc} */ @Override public void removeAtomOnly(int idx) { if (idx >= 0 && idx < numAtoms) { numAtoms--; atoms[idx].removeListener(this); for (int i = idx; i < numAtoms; i++) { atoms[i] = atoms[i + 1]; atoms[i].setIndex(i); } atoms[numAtoms] = null; notifyChanged(); } }
/** * {@inheritDoc} */ @Override public void addElectronContainer(IElectronContainer ec) { if (ec instanceof IBond) this.addBond((IBond) ec); if (ec instanceof ILonePair) this.addLonePair((ILonePair) ec); if (ec instanceof ISingleElectron) this.addSingleElectron((ISingleElectron) ec); notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addElectronContainer(IElectronContainer ec) { if (ec instanceof IBond) this.addBond((IBond) ec); if (ec instanceof ILonePair) this.addLonePair((ILonePair) ec); if (ec instanceof ISingleElectron) this.addSingleElectron((ISingleElectron) ec); notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addBond(IBond bond) { ensureBondCapacity(numBonds + 1); final BaseBondRef bref = newBondRef(bond); bref.setIndex(numBonds); addToEndpoints(bref); bonds[numBonds++] = bref; bref.addListener(this); notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addBond(IBond bond) { ensureBondCapacity(numBonds + 1); final BaseBondRef bref = newBondRef(bond); bref.setIndex(numBonds); addToEndpoints(bref); bonds[numBonds++] = bref; bref.addListener(this); notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addAtom(IAtom atom) { if (contains(atom)) return; ensureAtomCapacity(numAtoms + 1); final BaseAtomRef aref = newAtomRef(atom); aref.setIndex(numAtoms); atoms[numAtoms++] = aref; aref.addListener(this); notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addAtom(IAtom atom) { if (contains(atom)) return; ensureAtomCapacity(numAtoms + 1); final BaseAtomRef aref = newAtomRef(atom); aref.setIndex(numAtoms); atoms[numAtoms++] = aref; aref.addListener(this); notifyChanged(); }