/**
  * Sets the object of reference.
  *
  * @param refObject The value to set.
  * @param ctx The security context.
  */
 void setRootObject(Object refObject, SecurityContext ctx) {
   this.refObject = refObject;
   this.ctx = ctx;
   if (ctx == null && refObject instanceof DataObject) {
     DataObject data = (DataObject) refObject;
     if (data.getId() >= 0) this.ctx = new SecurityContext(data.getGroupId());
   }
   browser.setRootObject(refObject);
   editor.setRootObject(refObject);
   data = null;
   if (!(refObject instanceof WellSampleData) && parentData != null) {
     parentData = null;
   }
   parentRefObject = null;
   viewedBy = null;
 }
 /**
  * Returns <code>true</code> if the object can be hard linked, i.e. image added to dataset, <code>
  * false</code> otherwise.
  *
  * @return See above.
  */
 boolean canLink() {
   if (editor == null) return false;
   return editor.canLink();
 }
 /**
  * Returns <code>true</code> if the object can be annotated, <code>false</code> otherwise.
  *
  * @return See above.
  */
 boolean canAnnotate() {
   if (editor == null) return false;
   return editor.canAnnotate();
 }
 /**
  * Sets the parent of the object of reference.
  *
  * @param parentRefObject The value to set.
  * @param grandParent The value to set.
  */
 void setParentRootObject(Object parentRefObject, Object grandParent) {
   this.parentRefObject = parentRefObject;
   this.grandParent = grandParent;
   editor.setParentRootObject(parentRefObject, grandParent);
 }
 /** Loads the rendering engine. */
 void loadRnd() {
   editor.loadRnd();
 }