/** * {@inheritDoc} */ @Override public void stateChanged(IChemObjectChangeEvent event) { notifyChanged(event); }
/** * {@inheritDoc} */ @Override public void stateChanged(IChemObjectChangeEvent event) { notifyChanged(event); }
/** * {@inheritDoc} */ @Override public void removeAtomOnly(int position) { atoms[position].removeListener(this); for (int i = position; i < atomCount - 1; i++) { atoms[i] = atoms[i + 1]; } atoms[atomCount - 1] = null; atomCount--; notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addBond(IBond bond) { ensureBondCapacity(bondCount + 1); bonds[bondCount++] = bond; notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addLonePair(ILonePair lonePair) { ensureLonePairCapacity(lonePairCount + 1); lonePairs[lonePairCount++] = lonePair; notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addSingleElectron(ISingleElectron singleElectron) { ensureElectronCapacity(singleElectronCount + 1); singleElectrons[singleElectronCount++] = singleElectron; notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addBond(IBond bond) { ensureBondCapacity(bondCount + 1); bonds[bondCount++] = bond; notifyChanged(); }
/** * {@inheritDoc} */ @Override public void notifyChanged() { logger.debug("Notifying changed"); super.notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addLonePair(ILonePair lonePair) { ensureLonePairCapacity(lonePairCount + 1); lonePairs[lonePairCount++] = lonePair; notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addSingleElectron(ISingleElectron singleElectron) { ensureElectronCapacity(singleElectronCount + 1); singleElectrons[singleElectronCount++] = singleElectron; notifyChanged(); }
/** * {@inheritDoc} */ @Override public void notifyChanged(IChemObjectChangeEvent evt) { logger.debug("Notifying changed event: ", evt); super.notifyChanged(evt); }
/** * {@inheritDoc} */ @Override public void removeAtomOnly(int position) { atoms[position].removeListener(this); for (int i = position; i < atomCount - 1; i++) { atoms[i] = atoms[i + 1]; } atoms[atomCount - 1] = null; atomCount--; notifyChanged(); }
/** * {@inheritDoc} */ @Override public ISingleElectron removeSingleElectron(int position) { ISingleElectron se = singleElectrons[position]; se.removeListener(this); for (int i = position; i < singleElectronCount - 1; i++) { singleElectrons[i] = singleElectrons[i + 1]; } singleElectrons[singleElectronCount - 1] = null; singleElectronCount--; notifyChanged(); return se; }
/** * {@inheritDoc} */ @Override public IBond removeBond(int position) { IBond bond = bonds[position]; bond.removeListener(this); for (int i = position; i < bondCount - 1; i++) { bonds[i] = bonds[i + 1]; } bonds[bondCount - 1] = null; bondCount--; notifyChanged(); return bond; }
/** * {@inheritDoc} */ @Override public ISingleElectron removeSingleElectron(int position) { ISingleElectron se = singleElectrons[position]; se.removeListener(this); for (int i = position; i < singleElectronCount - 1; i++) { singleElectrons[i] = singleElectrons[i + 1]; } singleElectrons[singleElectronCount - 1] = null; singleElectronCount--; notifyChanged(); return se; }
/** * {@inheritDoc} */ @Override public void removeAllBonds() { for (int f = 0; f < getBondCount(); f++) { getBond(f).removeListener(this); } bonds = new IBond[growArraySize]; bondCount = 0; notifyChanged(); }
/** * {@inheritDoc} */ @Override public void removeAllBonds() { for (int f = 0; f < getBondCount(); f++) { getBond(f).removeListener(this); } bonds = new IBond[growArraySize]; bondCount = 0; notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addAtom(IAtom atom) { if (contains(atom)) { return; } ensureAtomCapacity(atomCount + 1); atom.addListener(this); atoms[atomCount++] = atom; notifyChanged(); }
/** * {@inheritDoc} */ @Override public void addAtom(IAtom atom) { if (contains(atom)) { return; } ensureAtomCapacity(atomCount + 1); atom.addListener(this); atoms[atomCount++] = atom; notifyChanged(); }
/** * {@inheritDoc} */ @Override public void removeAllElements() { removeAllElectronContainers(); for (int f = 0; f < getAtomCount(); f++) { getAtom(f).removeListener(this); } atoms = new IAtom[growArraySize]; atomCount = 0; stereoElements.clear(); notifyChanged(); }