Permalink
Browse files

Added method for seting properties of the current moleucle on the JCh…

…emPaintEditor
  • Loading branch information...
Arvid Berg
Arvid Berg committed May 24, 2010
1 parent 52203ee commit 8915156882f1a8d8d7e6286fe05b0ffd56295c8e
@@ -555,7 +555,7 @@ public ICDKMolecule getCDKMolecule() {
}
public void setMoleculeProperty(Object key,Object value) {
-
+ widget.setProperty(key, value);
}
@SuppressWarnings("unchecked")
public Object getAdapter( Class adapter ) {
@@ -747,6 +747,14 @@ public boolean getDirty() {
return isdirty;
}
+ public void setProperty(Object key,Object value) {
+ IAtomContainer ac = model.getMoleculeSet().getAtomContainer(0);
+ if(value == null)
+ ac.removeProperty(key);
+ else
+ ac.setProperty(key, value);
+ }
+
@Override
protected void disposeView() {
Activator.getDefault().getPreferenceStore()

0 comments on commit 8915156

Please sign in to comment.