Language for binding scalable vector graphics elements to java classes
First Claim
1. A machine-implemented method for binding program-defined objects to Document Object Model (DOM) nodes, the method comprising:
- receiving a request to create a scalable vector graphics (SVG) element instance from an SVG element template, wherein the request comprises a binding name, and wherein the SVG element instance comprises an extensible markup language (XML) code for describing two-dimensional graphics;
selecting, from a binding document, the SVG element template using the binding name, wherein the binding document comprises an association between the SVG element template, a node in a SVG DOM tree, and a software object class, wherein the association is written in XML;
obtaining, from the binding document, a software object class identifier, wherein the software object class identifier indicates the software object class associated with the SVG element template;
obtaining, from the binding document, a node reference indicating the node in the SVG DOM tree associated with the SVG element template;
selecting, in the SVG DOM tree, the node that corresponds to the SVG element template using the node reference;
creating, in the SVG DOM tree, a clone of the selected node for the SVG element instance;
instantiating, in response to the creating, a software object instance of the software object class; and
storing data that indicates a binding between the software object instance and the clone.
2 Assignments
0 Petitions
Accused Products
Abstract
According to a technique described herein, a binding document comprises one or more “<bind>” element instances. Each “<bind>” element instance indicates an association between (a) an SVG element instance and (b) a class. When a binding'"'"'s name is passed to a “createFromTemplate( )” method, the method processes all of the “<bind>” element instances that are associated within that name. For each such “<bind>” element instance, the method (a) creates, in an SVG DOM tree, a clone of a node that corresponds to an SVG element instance indicated in that “<bind>” element instance, (b) instantiates an object that is an instance of a class that is indicated in that “<bind>” element instance, and (c) stores data that establishes a binding between the clone node and the object. Methods of the object can be invoked to affect and/or alter attributes of the clone node to which the object is bound.
27 Citations
24 Claims
-
1. A machine-implemented method for binding program-defined objects to Document Object Model (DOM) nodes, the method comprising:
-
receiving a request to create a scalable vector graphics (SVG) element instance from an SVG element template, wherein the request comprises a binding name, and wherein the SVG element instance comprises an extensible markup language (XML) code for describing two-dimensional graphics; selecting, from a binding document, the SVG element template using the binding name, wherein the binding document comprises an association between the SVG element template, a node in a SVG DOM tree, and a software object class, wherein the association is written in XML; obtaining, from the binding document, a software object class identifier, wherein the software object class identifier indicates the software object class associated with the SVG element template; obtaining, from the binding document, a node reference indicating the node in the SVG DOM tree associated with the SVG element template; selecting, in the SVG DOM tree, the node that corresponds to the SVG element template using the node reference; creating, in the SVG DOM tree, a clone of the selected node for the SVG element instance; instantiating, in response to the creating, a software object instance of the software object class; and storing data that indicates a binding between the software object instance and the clone. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A non-transitory machine-readable medium carrying one or more sequences of instructions, which instructions, when executed by one or more processors, cause the one or more processors to carry out steps comprising:
-
receiving a request to create a scalable vector graphics (SVG) element instance from an SVG element template, wherein the request comprises a binding name, and wherein the SVG element instance comprises an extensible markup language (XML) code for describing two-dimensional graphics; selecting, from a binding document, the SVG element template using the binding name, wherein the binding document comprises an association between the SVG element template, a node in a SVG DOM tree, and a software object class, wherein the association is written in XML; obtaining, from the binding document, a software object class identifier associated with the SVG element template, wherein the software object class identifier indicates a software object class; obtaining, from the binding document, a node reference indicating the node in the SVG DOM tree associated with the SVG element template; selecting, in the SVG DOM tree, the node that corresponds to the SVG element template using the node reference; creating, in the SVG DOM tree, a clone of the selected node for the SVG element; instantiating, in response to the creating, a software object instance of the software object class; and storing data that indicates a binding between the software object instance and the clone. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
-
Specification