Defines a base class for GUI controls that implement both the cross-platform box profile painting introduced in
3.2 and the cross-platform (VML/SVG) vector painting, also introduced in 3.2.
This class should be extended by custom GUI classes that will display vector elements.
Instantiates and returns a new instance of jsx3.vector.Canvas. The implementation of
createVector() in this class calls this method to create the base vector tag. This method may be
overridden to provide a base tag of another type that Canvas.
Returns:
Creates the vector tag tree that will render this GUI control. Subclasses of this class should override this
method to specify the manner in which they render.
The basic template for a method overriding this method is:
CustomVector.prototype.createVector = function() {
var objCanvas = this.jsxsuper();
// modify objCanvas, add children, etc.
return objCanvas;
};
This method should do the work of creating and updating the vector tree to the state when it is ready to be
rendered on screen, but without calling
updateVector() directly.
Returns:
See Also:
Returns the vector canvas on which this control paints itself. If no canvas has already been created, then
createVector() is called to create it.
Returns:
Renders a cross-platform vector event handler. When an event of type strEvtType bubbles up to the
HTML element rendered by objElm, the instance method of this object whose name is
strMethod will be called with two parameters: the browser event wrapped in an instance of
jsx3.gui.Event, and the native HTMLElement that defined the event handler.
Parameters:
strEvtType – the event type, one of jsx3.gui.Event.CLICK, etc.
strMethod – the instance method to call on this object when the event is received.
objElm – the HTML element to which to add the event handler.
See Also:
Updates the pre-existing vector tree of this control on, for example, a resize or repaint event. Methods
overriding this method should return
true if the update is successful or
false to
force the vector tree to be completely recreated with
createVector().
The basic template for a method overriding this method is:
CustomVector.prototype.updateVector = function(objVector) {
this.jsxsuper(objVector);
// modify objCanvas, modify children, etc.
return true;
};
Parameters:
objVector – the root of the vector render tree.
Returns:
true if the tree could be updated inline or false if it must be
recreated by calling createVector().
See Also:
Copyright © 2001-2007, TIBCO Software Inc.