Write the following code.
public class dashboardUpdater extends JApplet implements Runnable
{
private IlvDashboardDiagram _dashboard;
public void init()
{
// create the dashboard.
IlvDashboardContext context = new IlvDashboardContext();
_dashboard = new IlvDashboardDiagram(context);
try {
// Load the dashboard diagram.
url = new URL("file:./" + <path to dashboard>);
_dashboard.readDashboard(url);
} catch (IlvDiagrammerException er) {
er.getCause().printStackTrace();
System.exit(-1);
} catch (Exception e) {
...
}
getContentPane().add(_dashboard);
}
...
public void updateDashBoard() {
_dashboard.setAdjusting(true);
Object dial1 = _dashboard.getObject("Dial_1");
_dashboard.setObjectProperty(dial1, "value", 8);
_dashboard.setAdjusting(false);
}
public void run()
{
...
updateDashBoard();
...
}
public static void main(String[] args) {
dashboardUpdater dashboard = new dashboardUpdater();
dashboard.init();
dashboard.run();
}
}
The value passed as third argument to the
setObjectProperty method must have the right type for the symbol parameter
given as second argument.
Symbols in the charts palette as shown in
Adding charts, have array
parameter types.