Class Index | File Index

Classes


Class Biojs.ChEMBLCompound


Version 1.0.0.

Extends Biojs.

Defined in: Biojs.ChEMBLCompound.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
constructor(options)
 
setId(chEMBLId)
Methods borrowed from class Biojs:
addListener, extend, getId, listen, raiseEvent, removeListener, setEventHandlers, setOptions
Event Summary
Event Attributes Event Name and Description
 
onLoadedImage(actionPerformed)
 
onRequestError(actionPerformed)
Class Detail
Biojs.ChEMBLCompound(options)

Author: John Gomez.
var instance = new Biojs.ChEMBLCompound({
		target: 'YourOwnDivId',
		id: 'CHEMBL67'
});
Parameters:
{Object} options
An object with the options for the component.
Options detailed:
{string} [imageUrl="http://www.ebi.ac.uk/chebi/displayImage.do"]
Url of the web service in order to require the compound image. To get a compound image, 'imageUrl + id' will be used as URI.
{string} id
ChEBI identifier of the compound to be displayed (i.e. '4991').
{int} [height=400]
The height in pixels of how big this image should be displayed.
{int} [width=400]
The width in pixels of how big this image should be displayed.
Requires:
Server side proxy
Method Detail
constructor(options)
Parameters:
options

setId(chEMBLId)
instance.setId('4991');
Parameters:
chEMBLId
Event Detail
onLoadedImage(actionPerformed)
instance.onLoadedImage(
   function( e ) {
      alert( e.id + " loaded." );
   }
);
Parameters:
{function} actionPerformed
An function which receives an Biojs.Event object as argument.
Event object data:
{Object} source
The component which did triggered the event.
{string} id
The identifier of the loaded file.

onRequestError(actionPerformed)
instance.onRequestError(
   function( e ) {
      alert( e.message );
   }
);
Parameters:
{function} actionPerformed
An function which receives an Biojs.Event object as argument.
Event object data:
{Object} source
The component which did triggered the event.
{string} file
The name of the loaded file.
{string} result
A string with either value 'success' or 'failure'.
{string} message
Error message in case of result be 'failure'.

Documentation generated by JsDoc Toolkit 2.3.2 on Thu Apr 17 2014 17:42:41 GMT+0100 (BST)