38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
<snippet>
|
|
<subclass>afryca.ase.Snippet</subclass>
|
|
<file></file>
|
|
<category>Library</category>
|
|
<name>BIRTChartManager</name>
|
|
<description>BIRTChart manager</description>
|
|
<code>
|
|
var BIRTChartManager = (typeof exports === "undefined")?(function BIRTChartManager() {}):(exports);
|
|
if(typeof global !== "undefined") { global.BIRTChartManager = BIRTChartManager; }
|
|
|
|
BIRTChartManager.sync = function(func, description, composite) {
|
|
var Runnable = Java.type('java.lang.Runnable');
|
|
var runner = new Runnable() {
|
|
run: function() {
|
|
func(composite);
|
|
}
|
|
}
|
|
ui.asyncExec(runner);
|
|
return description;
|
|
}
|
|
|
|
BIRTChartManager.call = function(bindings, validBindings, create, update, method, composite) {
|
|
if ('create' == method) {
|
|
return BIRTChartManager.sync(create, method, composite);
|
|
} else if ('update' == method) {
|
|
return BIRTChartManager.sync(update, method, composite);
|
|
} else if ('getBindings' == method) {
|
|
return Java.to(bindings, 'java.lang.String[]');
|
|
} else if ('validBindings' == method) {
|
|
return validBindings();
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
BIRTChartManager
|
|
</code>
|
|
</snippet> |