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

Resources Property (AnnContainer)

Example 

Gets or sets the annotations resources used by this container.
Syntax
  get_resources();
 set_resources(value);
!MISSING Scrap '_RTJavaScript_PROPERTY_SYNTAX'!

Property Value

TypeDescription
AnnResourcesThe annotations resources used by this container. The default value is null.
Remarks

The annotations resources are images and rubber stamps used through the toolkit. Typically, you create one global AnnResources object and assign it to each container in your application.

Example
example: function SiteLibrary_DefaultPage$example() {
   // Assume Resources/Point.png is the picture you want to use with Point objects

   // Create a new instance of AnnResources if the container does not already have one
   var resources = this._automation.get_container().get_resources();
   if (resources == null) {
      resources = new Leadtools.Annotations.Core.AnnResources();
      this._automation.get_container().set_resources(resources);
   }
   // Get the images collection
   var imagesResources = resources.get_images();
   // Add our picture to it
   imagesResources.add(new Leadtools.Annotations.Core.AnnPicture("Resources/Point.png"));
   var pictureIndex = imagesResources.length - 1;

   // Get the container and set the resources into it
   var container = this._automation.get_container();
   container.set_resources(resources);

   var inch = 720.0;

   // Add a point object at 1in,1in
   var pointObj = new Leadtools.Annotations.Core.AnnPointObject();
   pointObj.get_points().set_item(0, Leadtools.LeadPointD.create(1 * inch, 1 * inch));
   // Set the picture
   pointObj.set_defaultPicture(pictureIndex);

   // Add it to the container
   container.get_children().add(pointObj);

   // Select it
   this._automation.selectObject(pointObj);
},
See Also

Reference

AnnContainer Object
AnnContainer Members

 

 


Products | Support | Contact Us | Copyright Notices

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