|
Increasingly end users ask for custom symbols and graphics in graphical user interfaces (GUIs) to represent their
business objects or the underlying real world. These graphic representations need to
be connected with the application data, so that when the data changes, the representations
on the screen change too.
The GUI for a highway traffic management application, for example, may have to show
symbols representing cars and trucks moving on top of a map. The vehicles could change
shape, color and location depending on the value of the real-world data they represent.
With ILOG Views, you can create your own business or real-world graphic objects
(BGOs) either with C++ class derivation or visual creation.
When you code a new custom graphic, you subclass an existing ILOG Views graphic
object and define its behavior (the way it reacts to user input and changes in the
underlying data) by writing C++ code.
The visual way of creating a custom graphic is to use Studio, an editor that comes with ILOG Views.
With this editor, you can draw a graphic and define what it does
when the user interacts with it, or when the underlying data changes - all with simple
point-and-click editing!
For example, when an emergency status variable changes its
value to severe, the color of the car symbol could change to red.
BGOs are stored in libraries that automatically appear on an ILOG Studio palette.
Changes to an original BGO are immediately reflected in every instance of the BGO.
It would be a boring demonstration to show you how to build one of these, so instead, we
provide a customized editor for visually building and simulating an electronic system.
This demonstration was developed in seven days using predefined ILOG Views classes.
Downloading the demonstration
Please download the ZIP file (679 KB).
No additional files will be downloaded to your hard disk.
Running the demonstration
This demo runs on PC with Windows 95, Windows 98, or Windows NT4.
Once you download the ZIP file, extract all the files from the archive (they will be put
in a single directory named ILOG-Views-DemoBGO).
Open the Win32 directory and double click on the PROTOLOGIC.EXE file to launch the
demonstration.
The window that you will have on your screen is illustrated below.
To build your system, just drag and drop devices from the palette into the editing window.
To create a link, press the Link button in the toolbar and then drag a line
from the output of one device to the input of another. To run the simulation, select the
Run button in the toolbar and double click on the devices to activate them.
You can now see your system running.
For more details, please read the "About this demo" text in the Help menu.
Understanding what you see
Every device you can manipulate in this demo and every symbol (LED or scope)
displaying data was built with ILOG Views Business Graphic Object (BGO). Because
this demo only shows you finished BGOs, you will not be able to judge how easy they
are to create. Suffice to say that for most of these BGOs, no C++ coding was required.
They were simply drawn with BGO Designer and then told how to react to data. This
demonstration shows you the high level of sophistication possible with BGOs.
What is actually happening in this demo? When you manipulate one of the users controls,
such as the current source, it directly modifies a value for a variable. How does it know
which variable to change? This is defined by the BGO Designer or could also be set with
code.
This same variable is also connected to the scope BGO. When the variable is updated, the
scope is notified and the value is read. What the trace shows is based on the value of the
variable.
|