IRISLIB database
svgComponent Class Reference

Base class for SVG components. More...

Inheritance diagram for svgComponent:
Collaboration diagram for svgComponent:

Public Member Functions

 beginWaitState ()
 Begin a wait state for this component. More...
 
 calculateViewBox ()
 Calculate the value of the viewBox attribute of this. More...
 
 clickHandler (evt)
 Default mouse click handler.
 
 endWaitState ()
 End the current wait state for this component.
 
 findSVGElement (subid)
 Client-side utility method that finds an SVG element with a. More...
 
 getFrame ()
 Return the svgFrame object this component belongs to.
 
 getSizeAbsolute ()
 Return an object containing (as x,y,width, and height properties) More...
 
 refreshContents ()
 This is not supported for SVG components.
 
 renderContents ()
 Render the inner SVG contents of this component. More...
 
 renderSVG (document, parent)
 Render the outer SVG enclosing group for this component. More...
 
 setOverlayMode (mode)
 Display an overlay for this component to trap mouse events. More...
 
 setPosition (x, y)
 Set the x,y position of this component. More...
 
 setPositionHandler ()
 Notification that this component has been moved. More...
 
 setProperty (property, value, value2)
 Set the value of a named property.
 
 setSize (w, h)
 Set the size (width and height) of this component. More...
 
 setSizeHandler ()
 Notification that this component has been resized. More...
 
 setTextNode (id, str)
 Utility method: More...
 
 sizingMouseDownHandler (evt, which)
 Internal: sizing handle mouse down handler.
 
 unrender ()
 Remove the inner SVG for this component.
 
 wrapMethod (methodName)
 Utility method: More...
 
- Public Member Functions inherited from object
_.Library.Status OnNew (_.Library.RawString initvalue)
 Constructor for Zen objects. More...
 
 findElement (subid)
 Client-side utility method that finds an HTML element with a. More...
 
 fireOnUpdateEvent ()
 This is called when an object is updated from the server. More...
 
_.Library.String getProperty (property, key)
 Return the value of a named property (i.e. More...
 
 getSettings (settings)
 Client-side method that returns a list of this component's. More...
 
 getType ()
 Returns the component type of this object. More...
 
 invokeSuper (method, args)
 Invoke the superclass method method of the current. More...
 
 isOfType (type)
 Returns true if this object is of the given component type. More...
 
 makeId (subid)
 client-side utility method that constructs a component-specific id More...
 
 onCreate ()
 This client method, if present, is called when this component is. More...
 
 onDelete ()
 This client method, if present, is called when this component is. More...
 
 onSerialize ()
 This client event, if present, is fired before a component. More...
 
 onloadHandler ()
 This client event, if present, is fired when the page is loaded.
 
 onunloadHandler ()
 This client event, if present, is fired when the page is unloaded. More...
 
 onupdateHandler ()
 This client method, if present, is fired when the object is updated from the server.
 
 render ()
 This causes a component that draws its contents dynamically. More...
 
- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 
- Public Member Functions inherited from Adaptor
_.Library.Status XMLExport (_.Library.String top, _.Library.String format, _.XML.Namespaces namespaces, attrs, _.Library.String createId, _.Library.String typeAttr, oreflist, idlist, _.Library.String initialIndent, _.Library.Boolean local, _.Net.MIMEPart mimeAttachments)
 Serialize an XML enabled class as an XML document and write. More...
 
_.Library.Status XMLExportToStream (_.Stream.Object export, _.Library.String top, _.Library.String format, _.XML.Namespaces namespaces, attrs, _.Library.String createId, _.Library.String typeAttr, oreflist, idlist, _.Library.String initialIndent)
 Serialize an XML enabled class as an XML document and appends it to a stream. More...
 
_.Library.Status XMLExportToString (_.Library.String export, _.Library.String top, _.Library.String format, _.XML.Namespaces namespaces, attrs, _.Library.String createId, _.Library.String typeAttr, oreflist, idlist, _.Library.String initialIndent)
 Serialize an XML enabled class as an XML document and write it to a string. More...
 

Public Attributes

 boundless
 If true, this component is boundless. More...
 
 document
 Client-side property that points to SVG document this component is rendered on. More...
 
 height
 Width of this component. More...
 
 hidden
 If true, this component is hidden. More...
 
 onclick
 onclick event handler: More...
 
 position
 If position is "fixed", then this shape will not scroll with its canvas. More...
 
 preserveAspectRatio
 Value to apply for this component's enclosing svg element's. More...
 
 svgComponent
 Client-side property used to determine if a component is an SVG component. More...
 
 svgGroup
 Client-side property that points to the enclosing SVG group element for this component. More...
 
 viewBoxHeight
 If defined, this is used to calculate the height of the. More...
 
 viewBoxWidth
 If defined, this is used to calculate the width of the. More...
 
 width
 Width of this component. More...
 
 x
 x position of this component's enclosing group. More...
 
 y
 y position of this component's enclosing group. More...
 
- Public Attributes inherited from object
 aux
 @qualifier final This is an auxiliary property that is provided More...
 
 composite
 @qualifier final For components that are created as part of a composite component, More...
 
 id
 @qualifier final This is a unique identifier that is used to distinguish this object More...
 
 index
 @qualifier final System-assigned index number used internally to identify this component. More...
 
 name
 @qualifier final Name of this object. More...
 
 onupdate
 onupdate event handler: More...
 
 parent
 @qualifier final Link to the component that contains this object More...
 
 tuple
 @qualifier final Special property indicating which tuple of a More...
 
 visible
 This property indicates whether a component is visible and thus layed out. More...
 
 window
 @qualifier final This is a client-only property that refers to the JavaScript More...
 

Static Public Attributes

 DEFAULTASPECT = None
 Subclasses can set this to change the default value for the <property>preserveAspectRatio/<property> property for a component.
 
 DEFAULTBOUNDLESS = None
 Subclasses can set this to change the default value for the <property>boundless</property> property for a component.
 
 DEFAULTHEIGHT = None
 Default height of this component.
 
 DEFAULTHIDDEN = None
 Subclasses can set this to change the default value for the <property>hidden</property> property for a component.
 
 DEFAULTVIEWBOXHEIGHT = None
 Default viewBoxHeight of this component.
 
 DEFAULTVIEWBOXWIDTH = None
 Default viewBoxWidth of this component.
 
 DEFAULTVISIBLE = None
 Subclasses can set this to change default visibilty for a component.
 
 DEFAULTWIDTH = None
 Default width of this component.
 
 POSTCOMPILEACTIONS = None
 Internal parameter.
 
- Static Public Attributes inherited from object
 DEFAULTVISIBLE = None
 Subclasses can set this to change default visibilty for a component.
 
 INCLUDEFILES = None
 CSV list of additional include files (either .js or .css) that. More...
 
 MODULE = None
 If set, this indicates that this system component should be. More...
 
 NAMESPACE = None
 This is the XML namespace used for library components.
 
 POSTCOMPILEACTIONS = None
 This is a comma-delimited list of which post-compile actions this component. More...
 
 USECOMMONDIRECTORY = None
 If true, then the include files generated for this component, are placed in the. More...
 
 XMLFORMAT = None
 If XMLFORMAT="Literal", then only support for literal format import and export is generated. More...
 
 XMLIGNOREINVALIDATTRIBUTE = None
 By setting this to 0, we disallow use of invalid attribute names in Zen XML documents.
 
- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 
- Static Public Attributes inherited from Adaptor
 ATTRIBUTEQUALIFIED = None
 ATTRIBUTEQUALIFIED controls the format of exported XML by controlling whether attributes. More...
 
 ELEMENTQUALIFIED = None
 ELEMENTQUALIFIED controls the format of exported XML. More...
 
 NAMESPACE = None
 NAMESPACE specifies the XML namespace to be used when projecting the. More...
 
 SUPPRESSTYPEPREFIX = None
 SUPPRESSTYPEPREFIX allows the type name that refers to this class. More...
 
 XMLDEFAULTREFERENCE = None
 XMLDEFAULTREFERENCE specifies the default value of the XMLREFERENCE property parameter. More...
 
 XMLENABLED = None
 If this parameter is true then XML-enabling methods. More...
 
 XMLFORMAT = None
 The XMLFORMAT parameter controls the generation of the XMLExport and XMLImport. More...
 
 XMLIGNOREINVALIDATTRIBUTE = None
 The XMLIGNOREINVALIDATTRIBUTE parameter allows the programmer to control handling of unexpected. More...
 
 XMLIGNOREINVALIDTAG = None
 The XMLIGNOREINVALIDTAG parameter allows the programmer to control handling of unexpected. More...
 
 XMLIGNORENULL = None
 XMLIGNORENULL allows the programmer to override the default XML handling. More...
 
 XMLINCLUDEINGROUP = None
 XMLINCLUDEINGROUP allows the programmer to control whether a class is included. More...
 
 XMLINHERITANCE = None
 If the XMLINHERITANCE parameter is set to "LEFT", then in the case of multiple. More...
 
 XMLNAME = None
 This parameter provides the default XMLNAME for the class. More...
 
 XMLNIL = None
 The XMLNIL class parameter controls the use of xsi:nil by XMLExport. More...
 
 XMLNILNOOBJECT = None
 The XMLNILNOOBJECT parameter allows creation of an object to be skipped for elements. More...
 
 XMLPREFIX = None
 The XMLPREFIX parameter controls the prefix to be used for the XML namespace that. More...
 
 XMLSEQUENCE = None
 If the XMLSEQUENCE = 1, then the order of the XML elements must match the. More...
 
 XMLSUMMARY = None
 The summary fields to be used when an object is referenced are specified. More...
 
 XMLTYPE = None
 This parameter provides the default XMLTYPE for the class. More...
 
 XMLUNSWIZZLE = None
 If the XMLUNSWIZZLE parameter is set to 1, then single object. More...
 
 XMLUSEEMPTYELEMENT = None
 If the XMLUSEEMPTYELEMENT parameter is set to 1, then the empty element shorthand (<tag>) More...
 

Private Member Functions

 DrawHTML ()
 Do not allow HTML methods for SVG components.
 

Additional Inherited Members

- Static Public Member Functions inherited from Adaptor
_.Library.Status XMLDTD (_.Library.String top, _.Library.String format, _.Library.Boolean input, dtdlist)
 Write the DTD to the current device for this XML enabled class serialized as. More...
 
_.Library.RegisteredObject XMLNew (_.XML.Document document, _.Library.Integer node, _.Library.RegisteredObject containerOref)
 Get an instance of an XML enabled class. More...
 
_.Library.Status XMLSchema (_.Library.String top, _.Library.String format, _.Library.String namespacePrefix, _.Library.Boolean input, _.Library.Boolean refOnly, schema)
 Write an XML Schema fragment to the current device which describes an XML enabled class and dependent classes. More...
 
_.Library.String XMLSchemaNamespace ()
 Get the namespace to which this class belongs for use in schema generation. More...
 
_.Library.Status XMLSchemaType (_.XML.Schema schemaInstance, _.XML.Node node, _.Library.String top, _.Library.Boolean encoded, _.Library.Boolean summary, _.Library.Boolean input, _.Library.Boolean refOnly)
 Add a complexType to the schema that is respresented by an <class>XML.Schema</class> instance. More...
 

Detailed Description

Base class for SVG components.


Unlike HTML components, SVG components are completely dynamic; all rendering is done using client-side JavaScript.
Every component is rendered within its own enclosing group (g) element.

Member Function Documentation

◆ beginWaitState()

beginWaitState ( )

Begin a wait state for this component.

This will display a waiting graphic in the center of this component. The wait state is ended with a call to <method>endWaitState</method>.

◆ calculateViewBox()

calculateViewBox ( )

Calculate the value of the viewBox attribute of this.

component's enclosing svg element.
Subclasses can override this, should they need to provide a different behavior. The default behavior is to use the width and height of this component to come up with a 1 to 1 coordinate mapping; If the component provides values for the <property>viewboxWidth</property> and <property>viewboxHeight</property> properties, then these are used to calculate the viewBox (and thus define a fixed coordinate system for the component).

◆ findSVGElement()

findSVGElement (   subid)

Client-side utility method that finds an SVG element with a.

component-specific id.

◆ getSizeAbsolute()

getSizeAbsolute ( )

Return an object containing (as x,y,width, and height properties)

the absolute size and position (relative to the svg canvas) of this component.

◆ renderContents()

renderContents ( )

Render the inner SVG contents of this component.

This is implemented by subclasses.

Reimplemented from object.

Reimplemented in timeRangeControl, timeLine, tabBar, sprite, rect, radialNavigator, pieChart, ownerDraw, meter, compassButtons, chart, and scoreCard.

◆ renderSVG()

renderSVG (   document,
  parent 
)

Render the outer SVG enclosing group for this component.

as well as its inner contents.
This is called by the svgFrame when the component is first loaded or created.
parent is the parent SVG object this component should be added to.

Reimplemented from object.

◆ setOverlayMode()

setOverlayMode (   mode)

Display an overlay for this component to trap mouse events.

and/or support dragging/resizing with the mouse.
mode is the overlay mode:
0: turn off overlay.
1: turn on overlay.
2: turn on overlay, show indication that this component is selected. 3: turn on overlay, show indication that this component can be dragged.

◆ setPosition()

setPosition (   x,
  y 
)

Set the x,y position of this component.


Applications should not call this method.

◆ setPositionHandler()

setPositionHandler ( )

Notification that this component has been moved.

This can be implemented by subclasses.

Reimplemented in sprite.

◆ setSize()

setSize (   w,
  h 
)

Set the size (width and height) of this component.


Applications should not call this method.

◆ setSizeHandler()

setSizeHandler ( )

Notification that this component has been resized.

This can be implemented by subclasses.

Reimplemented in sprite, and chart.

◆ setTextNode()

setTextNode (   id,
  str 
)

Utility method:

Find the svg text element with id id and replace its text with str.

◆ wrapMethod()

wrapMethod (   methodName)

Utility method:

Construct a wrapper around an instance method of this object that can be used as an event listener.

Member Data Documentation

◆ boundless

boundless

If true, this component is boundless.

That is, it's enclosing

svg element is a simple group (g) instead of the usual svg element.  

◆ document

document

Client-side property that points to SVG document this component is rendered on.

 

◆ height

height

Width of this component.


This value is used for layout purposes. The actual effect of setting this is up the specific component implementation.  

◆ hidden

hidden

If true, this component is hidden.

That is, it's enclosing

group's display style is set to "none".  

◆ onclick

onclick

onclick event handler:

This event is fired when the mouse is clicked on the shape. This is the default onclick event for svg components; subclasses may implement more specialized events (such as click on a specific part of the component).  

◆ position

position

If position is "fixed", then this shape will not scroll with its canvas.

nor can it be dragged with the mouse.
This is used for placing fixed controller over the rest of an SVG canvas.  

◆ preserveAspectRatio

preserveAspectRatio

Value to apply for this component's enclosing svg element's.

preserveAspectRatio attribute.
Set this to "none" if you do not want the SVG Engine to preserve the aspect ratio (height relative to width) for this component.  

◆ svgComponent

Client-side property used to determine if a component is an SVG component.

 

◆ svgGroup

Client-side property that points to the enclosing SVG group element for this component.

 

◆ viewBoxHeight

viewBoxHeight

If defined, this is used to calculate the height of the.

viewBox attribute of the enclosing svg element.
 

◆ viewBoxWidth

viewBoxWidth

If defined, this is used to calculate the width of the.

viewBox attribute of the enclosing svg element.
 

◆ width

width

Width of this component.


This value is used for layout purposes. The actual effect of setting this is up the specific component implementation.  

◆ x

x

x position of this component's enclosing group.


The actual position of the component depends on the layout applied by its containing svgGroup.  

◆ y

y

y position of this component's enclosing group.


The actual position of the component depends on the layout applied by its containing svgGroup.