Sources for building of the demo plugin are available in the ijc-api-examples.zip\ijc-api-examples\sources\Canvas
- the plugin can be built from those sources or it is also available here: ijc-api-examples\plugins\com-chemaxon-ijc-canvas-examples-demo.nbm
.
In the following examples, the use of the Canvas widget is described in a grid view or a table widget – using custom drawing in a Boolean field, displaying mass spectrum in a text field and displaying clocks in a datetime field.
First, the api-examples
need to be downloaded from IJC Download pages. This zip package contains the built-in demo modules and the code source for building plugins. The demo plugin can be installed from Main menu > Tools > Plugins. Once the plugin is installed, it can be used by Canvas widget or by Canvas Cell Renderer both in a grid view or a table widget.
The Demo-plugin contains various Table Cell renderers:
com.chemaxon.ijc.canvas.examples.demo.BooleanCell
- for a Boolean field;
com.chemaxon.ijc.canvas.examples.demo.ClockCell
- for a datetime field;
com.chemaxon.ijc.canvas.examples.demo.MassSpectrumCell
- for displaying mass spectrum in a text field. This can be used for a text field with an appropriate format: [[x1, y1], [x2, y2], ...[xn, yn]] where x and y are coordinates – outputs obtained from a measuring instrument (x for peak position and y for peak size).
For using the plugin, the exact Handler class name needs to be entered in the Visual properties section of the widget customizer.
com.chemaxon.ijc.canvas.examples.demo.BooleanCell
into Handler class and click close; com.chemaxon.ijc.canvas.examples.demo.MassSpectrumCell
into Handler class and click close;com.chemaxon.ijc.canvas.examples.demo.ClockCell
into Handler class and click close;