Skip to content

Commit

Permalink
Removed notifyChanged() calls
Browse files Browse the repository at this point in the history
Signed-off-by: maclean <gilleain.torrance@gmail.com>
  • Loading branch information
egonw committed Sep 16, 2011
1 parent 78fb9c8 commit 822189e
Show file tree
Hide file tree
Showing 21 changed files with 7 additions and 111 deletions.
3 changes: 0 additions & 3 deletions src/main/org/openscience/cdk/silent/AdductFormula.java
Expand Up @@ -102,9 +102,6 @@ public void add(IMolecularFormulaSet formulaSet) {
for (IMolecularFormula mf : formulaSet.molecularFormulas()){
addMolecularFormula(mf);
}
/*
* notifyChanged() is called by addAtomContainer()
*/
}

/**
Expand Down
6 changes: 0 additions & 6 deletions src/main/org/openscience/cdk/silent/Atom.java
Expand Up @@ -194,7 +194,6 @@ public Atom(IElement element) {
*/
public void setCharge(Double charge) {
this.charge = charge;
notifyChanged();
}

/**
Expand All @@ -219,7 +218,6 @@ public Double getCharge() {
*/
public void setImplicitHydrogenCount(Integer hydrogenCount) {
this.hydrogenCount = hydrogenCount;
notifyChanged();
}

/**
Expand All @@ -244,7 +242,6 @@ public Integer getImplicitHydrogenCount() {
*/
public void setPoint2d(javax.vecmath.Point2d point2d) {
this.point2d = point2d;
notifyChanged();
}
/**
*
Expand All @@ -257,7 +254,6 @@ public void setPoint2d(javax.vecmath.Point2d point2d) {
*/
public void setPoint3d(javax.vecmath.Point3d point3d) {
this.point3d = point3d;
notifyChanged();
}
/**
* Sets a point specifying the location of this
Expand All @@ -270,7 +266,6 @@ public void setPoint3d(javax.vecmath.Point3d point3d) {
*/
public void setFractionalPoint3d(javax.vecmath.Point3d point3d) {
this.fractionalPoint3d = point3d;
notifyChanged();
}
/**
* Sets the stereo parity for this atom.
Expand All @@ -282,7 +277,6 @@ public void setFractionalPoint3d(javax.vecmath.Point3d point3d) {
*/
public void setStereoParity(Integer stereoParity) {
this.stereoParity = stereoParity;
notifyChanged();
}

/**
Expand Down
20 changes: 1 addition & 19 deletions src/main/org/openscience/cdk/silent/AtomContainer.java
Expand Up @@ -217,7 +217,6 @@ public void setAtoms(IAtom[] atoms) {
atom.addListener(this);
}
this.atomCount = atoms.length;
notifyChanged();
}

/**
Expand Down Expand Up @@ -266,7 +265,6 @@ public void setAtom(int number, IAtom atom)
{
atom.addListener(this);
atoms[number] = atom;
notifyChanged();
}


Expand Down Expand Up @@ -996,7 +994,6 @@ public void add(IAtomContainer atomContainer)
addSingleElectron(atomContainer.getSingleElectron(f));
}
}
notifyChanged();
}

/**
Expand Down Expand Up @@ -1031,7 +1028,6 @@ public void addAtom(IAtom atom)
atom.addListener(this);
atoms[atomCount] = atom;
atomCount++;
notifyChanged();
}


Expand All @@ -1045,7 +1041,6 @@ public void addBond(IBond bond)
if (bondCount >= bonds.length) growBondArray();
bonds[bondCount] = bond;
++bondCount;
notifyChanged();
}

/**
Expand All @@ -1058,7 +1053,6 @@ public void addLonePair(ILonePair lonePair)
if (lonePairCount >= lonePairs.length) growLonePairArray();
lonePairs[lonePairCount] = lonePair;
++lonePairCount;
notifyChanged();
}

/**
Expand All @@ -1071,7 +1065,6 @@ public void addSingleElectron(ISingleElectron singleElectron)
if (singleElectronCount >= singleElectrons.length) growSingleElectronArray();
singleElectrons[singleElectronCount] = singleElectron;
++singleElectronCount;
notifyChanged();
}

/**
Expand Down Expand Up @@ -1129,7 +1122,6 @@ public void removeAtom(int position)
}
atoms[atomCount - 1] = null;
atomCount--;
notifyChanged();
}

/**
Expand Down Expand Up @@ -1163,7 +1155,6 @@ public IBond removeBond(int position)
}
bonds[bondCount - 1] = null;
bondCount--;
notifyChanged();
return bond;
}

Expand Down Expand Up @@ -1211,7 +1202,6 @@ public ILonePair removeLonePair(int position)
}
lonePairs[lonePairCount - 1] = null;
lonePairCount--;
notifyChanged();
return lp;
}

Expand Down Expand Up @@ -1241,7 +1231,6 @@ public ISingleElectron removeSingleElectron(int position)
}
singleElectrons[singleElectronCount - 1] = null;
singleElectronCount--;
notifyChanged();
return se;
}

Expand Down Expand Up @@ -1319,7 +1308,6 @@ public void removeAtomAndConnectedElectronContainers(IAtom atom)
}
removeAtom(position);
}
notifyChanged();
}

/**
Expand All @@ -1332,7 +1320,6 @@ public void removeAllElements() {
}
atoms = new IAtom[growArraySize];
atomCount = 0;
notifyChanged();
}


Expand All @@ -1352,7 +1339,6 @@ public void removeAllElectronContainers()
singleElectrons = new ISingleElectron[growArraySize];
lonePairCount = 0;
singleElectronCount = 0;
notifyChanged();
}

/**
Expand All @@ -1364,7 +1350,6 @@ public void removeAllBonds() {
}
bonds = new IBond[growArraySize];
bondCount = 0;
notifyChanged();
}

/**
Expand Down Expand Up @@ -1713,10 +1698,7 @@ private void growSingleElectronArray()
*
*@param event A change event pointing to the source of the change
*/
public void stateChanged(IChemObjectChangeEvent event)
{
notifyChanged(event);
}
public void stateChanged(IChemObjectChangeEvent event) {}

}

Expand Down
11 changes: 1 addition & 10 deletions src/main/org/openscience/cdk/silent/AtomContainerSet.java
Expand Up @@ -108,7 +108,6 @@ public void removeAllAtomContainers() {
atomContainers[pos] = null;
}
atomContainerCount = 0;
notifyChanged();
}


Expand All @@ -125,7 +124,6 @@ public void removeAtomContainer(int pos) {
}
atomContainers[atomContainerCount - 1] = null;
atomContainerCount--;
notifyChanged();
}

/**
Expand All @@ -139,7 +137,6 @@ public void replaceAtomContainer(int position, IAtomContainer container) {
old.removeListener(this);
atomContainers[position] = container;
container.addListener(this);
notifyChanged();
}

/**
Expand All @@ -154,7 +151,6 @@ public boolean setMultiplier(IAtomContainer container, Double multiplier) {
for (int i = 0; i < atomContainers.length; i++) {
if (atomContainers[i] == container) {
multipliers[i] = multiplier;
notifyChanged();
return true;
}
}
Expand All @@ -172,7 +168,6 @@ public boolean setMultiplier(IAtomContainer container, Double multiplier) {
*/
public void setMultiplier(int position, Double multiplier) {
multipliers[position] = multiplier;
notifyChanged();
}

/**
Expand Down Expand Up @@ -201,7 +196,6 @@ public boolean setMultipliers(Double[] newMultipliers) {
multipliers = new Double[atomContainerCount];
}
System.arraycopy(newMultipliers, 0, multipliers, 0, atomContainerCount);
notifyChanged();
return true;
}

Expand All @@ -223,7 +217,6 @@ public void addAtomContainer(IAtomContainer atomContainer, double multiplier) {
atomContainers[atomContainerCount] = atomContainer;
multipliers[atomContainerCount] = multiplier;
atomContainerCount++;
notifyChanged();
}

/**
Expand Down Expand Up @@ -380,9 +373,7 @@ public Object clone() throws CloneNotSupportedException {
*
* @param event A change event pointing to the source of the change
*/
public void stateChanged(IChemObjectChangeEvent event) {
notifyChanged(event);
}
public void stateChanged(IChemObjectChangeEvent event) {}


/**
Expand Down
8 changes: 0 additions & 8 deletions src/main/org/openscience/cdk/silent/AtomType.java
Expand Up @@ -162,7 +162,6 @@ public AtomType(IElement element) {
public void setAtomTypeName(String identifier)
{
this.identifier = identifier;
notifyChanged();
}


Expand All @@ -176,7 +175,6 @@ public void setAtomTypeName(String identifier)
public void setMaxBondOrder(IBond.Order maxBondOrder)
{
this.maxBondOrder = maxBondOrder;
notifyChanged();
}


Expand All @@ -190,7 +188,6 @@ public void setMaxBondOrder(IBond.Order maxBondOrder)
public void setBondOrderSum(Double bondOrderSum)
{
this.bondOrderSum = bondOrderSum;
notifyChanged();
}


Expand Down Expand Up @@ -241,7 +238,6 @@ public Double getBondOrderSum()
*/
public void setFormalCharge(Integer charge) {
this.formalCharge = charge;
notifyChanged();
}

/**
Expand All @@ -264,7 +260,6 @@ public Integer getFormalCharge() {
*/
public void setFormalNeighbourCount(Integer count) {
this.formalNeighbourCount = count;
notifyChanged();
}

/**
Expand All @@ -287,7 +282,6 @@ public Integer getFormalNeighbourCount() {
*/
public void setHybridization(IAtomType.Hybridization hybridization) {
this.hybridization = hybridization;
notifyChanged();
}

/**
Expand Down Expand Up @@ -328,7 +322,6 @@ public boolean compare(Object object) {
*/
public void setCovalentRadius(Double radius) {
this.covalentRadius = radius;
notifyChanged();
}

/**
Expand All @@ -351,7 +344,6 @@ public Double getCovalentRadius() {
public void setValency(Integer valency)
{
this.electronValency = valency;
notifyChanged();
}

/**
Expand Down
4 changes: 0 additions & 4 deletions src/main/org/openscience/cdk/silent/Bond.java
Expand Up @@ -203,7 +203,6 @@ public void remove() {
public void setAtoms(IAtom[] atoms) {
this.atoms = atoms;
atomCount = atoms.length;
notifyChanged();
}


Expand Down Expand Up @@ -310,7 +309,6 @@ public void setAtom(IAtom atom, int position) {
if (atoms[position] == null && atom != null) atomCount++;
if (atoms[position] != null && atom == null) atomCount--;
atoms[position] = atom;
notifyChanged();
}


Expand All @@ -337,7 +335,6 @@ public Order getOrder() {
*/
public void setOrder(Order order) {
this.order = order;
notifyChanged();
}


Expand All @@ -362,7 +359,6 @@ public IBond.Stereo getStereo() {
*/
public void setStereo(IBond.Stereo stereo) {
this.stereo = stereo;
notifyChanged();
}


Expand Down
7 changes: 1 addition & 6 deletions src/main/org/openscience/cdk/silent/ChemFile.java
Expand Up @@ -91,7 +91,6 @@ public void addChemSequence(IChemSequence chemSequence)
}
chemSequences[chemSequenceCount] = chemSequence;
chemSequenceCount++;
notifyChanged();
}

/**
Expand All @@ -109,7 +108,6 @@ public void removeChemSequence(int pos)
}
chemSequences[chemSequenceCount - 1] = null;
chemSequenceCount--;
notifyChanged();
}

/**
Expand Down Expand Up @@ -234,9 +232,6 @@ public Object clone() throws CloneNotSupportedException
*
*@param event A change event pointing to the source of the change
*/
public void stateChanged(IChemObjectChangeEvent event)
{
notifyChanged(event);
}
public void stateChanged(IChemObjectChangeEvent event) {}
}

0 comments on commit 822189e

Please sign in to comment.