if ("bondOrder" == propertyName) {
if (bsOrderSet == null)
bsOrderSet = new BitSet();
int order = ((Integer) value).shortValue();
BondIterator iter = (selectedBonds != null ? modelSet.getBondIterator(selectedBonds)
: modelSet.getBondIterator(JmolEdge.BOND_ORDER_ANY, bs));
while (iter.hasNext()) {
bsOrderSet.set(iter.nextIndex());
iter.next().setOrder(order);
}
return;
}
if ("color" == propertyName) {
if (bsColixSet == null)
bsColixSet = new BitSet();
short colix = Graphics3D.getColix(value);
byte pid = JmolConstants.pidOf(value);
if (pid == JmolConstants.PALETTE_TYPE || pid == JmolConstants.PALETTE_ENERGY) {
//only for hydrogen bonds
boolean isEnergy = (pid == JmolConstants.PALETTE_ENERGY);
BondIterator iter = (selectedBonds != null ? modelSet.getBondIterator(selectedBonds)
: modelSet.getBondIterator(myMask, bs));
while (iter.hasNext()) {
bsColixSet.set(iter.nextIndex());
Bond bond = iter.next();
if (isEnergy) {
bond.setColix(setColix(colix, pid, bond));
bond.setPaletteID(pid);
} else {
bond.setColix(Graphics3D.getColix(JmolConstants.getArgbHbondType(bond.getOrder())));
}
}
return;
}
if (colix == Graphics3D.USE_PALETTE && pid != JmolConstants.PALETTE_CPK)
return; //palettes not implemented for bonds
BondIterator iter = (selectedBonds != null ? modelSet.getBondIterator(selectedBonds)
: modelSet.getBondIterator(myMask, bs));
while (iter.hasNext()) {
int iBond = iter.nextIndex();
Bond bond = iter.next();
bond.setColix(colix);
bsColixSet.set(iBond, (colix != Graphics3D.INHERIT_ALL
&& colix != Graphics3D.USE_PALETTE));
}
return;
}
if ("translucency" == propertyName) {
if (bsColixSet == null)
bsColixSet = new BitSet();
boolean isTranslucent = (((String) value).equals("translucent"));
BondIterator iter = (selectedBonds != null ? modelSet.getBondIterator(selectedBonds)
: modelSet.getBondIterator(myMask, bs));
while (iter.hasNext()) {
bsColixSet.set(iter.nextIndex());
iter.next().setTranslucent(isTranslucent, translucentLevel);
}
return;
}
if ("deleteModelAtoms" == propertyName) {