LEADTOOLS JavaScript (Leadtools.Annotations.Automation)
LEAD Technologies, Inc

RealizeAllRedactions Method

Example 
Realizes all the AnnRedactionObject objects in this AnnAutomation.
Syntax
 function Leadtools.Annotations.Automation.AnnAutomation.realizeAllRedactions()
Remarks

Use the CanRealizeAllRedactions property to determine whether you can currently call this method.

This method will call the method for all AnnRedactionObject objects.

Example

This example will add a couple of redaction objects then realizes and restores them.

example: function SiteLibrary_DefaultPage$example() {
   var automation = this._automation;
   // see if we can realize or restore all the redaction objects (this should show a message informing you there are no redaction objects in this automation)
   this.realizeRestoreAllRedactions(automation);

   // first add a couple of new redaction object to the automation
   var redaction = new Leadtools.Annotations.Core.AnnRedactionObject();
   redaction.set_rect(Leadtools.LeadRectD.create(100, 100, 800, 800));
   automation.get_container().get_children().add(redaction);

   redaction = new Leadtools.Annotations.Core.AnnRedactionObject();
   redaction.set_rect(Leadtools.LeadRectD.create(1000, 1000, 800, 800));
   automation.get_container().get_children().add(redaction);

   automation.invalidate(Leadtools.LeadRectD.get_empty());

   // see if we can realize/restore the objects (should realize the redactions)
   this.realizeRestoreAllRedactions(automation);

   // see if we can realize/restore the objects (should restore the redactions)
   this.realizeRestoreAllRedactions(automation);
},

realizeRestoreAllRedactions: function SiteLibrary_DefaultPage$realizeRestoreAllRedactions(automation) {
   if(automation.get_canRealizeAllRedactions())
   {
      // realize
      automation.realizeAllRedactions();
      alert("Redaction objects have been realized");
   }
   else if(automation.get_canRestoreAllRedactions())
   {
      // restore
      automation.restoreAllRedactions();
      alert("Redaction objects have been restored");
   }
   else
      alert("Cannot realize or restore because no redaction object is currently in this automation");

   automation.invalidate(Leadtools.LeadRectD.get_empty());
},
See Also

Reference

AnnAutomation Object
AnnAutomation Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.