Viewer
The
purification of the behavior of a model is aided with the tool of simulation of
SNTool.
That tool bases on the use of component
plugáveis of the visualization called
Viewers.
Viewers can be created easily by the
user and plugados dinamicamente to the system, allowing the
visualization (and even alteration) of the states of all the elements of the
network such as:
- Objects
- Places, arcs, pages, etc.
- O own engine of the simulation
General Process

Steps for the creation:
- define the type of foundation one wants to
observe
- identify the class (Foo) that corresponds to
that foundation in the network
- define the type of presentation wanted, that is, as
it should be the interface to visualize this foundation
- create the classes of Viewer:
- FooViewerInfo.java: contain the information
about Viewer. This class should be derived of the class ViewerInfo.java
- FooViewer.java: possesses the code of Viewer. It should
be derived of the class GenericViewer.java
- register Viewer in the system: to make the inclusion of Viewer in
the system should register the class of Viewer in the file
ontool.properties. In
that file that are registered available Viewers for the System
- request the exhibition of Viewer in the
debugger: Every
time that is clicked on an element of the network a verification of the
compatibility is made with all the registered Viewer and those compatible ones
are shown so that the user makes its choice.

Implementation of a graphic Viewer
in SNtool:

Configurations of Viewer:
- allows that Viewers be configured
- facilitates the adaptation process of an
existent Viewer to Viewer wanted by the user, releasing the creation of new
Viewers in some cases
- can be recovered by means of presets
(XML)
- Viewer can be configured by means of a
PropertySheet, as it is done in the design of the
network
Viewer packed in files JAR:
- automatic registration (lib/viewers)
- not demand that the user restarts the system so that a
new Viewer is inserted
- releases the manual insert in the registration of the
system
- enough to the user to insert a file in the format JAR
contends of the Viewer that the system will be capable of you
register and allows immediate use for the user, the only
restriction is to restart the debugger
Simulation sessions:
-
allows to save the state of the debugger
- facilitates the purification, because it allows to
the user to recompile the network without losing the configuration of
Viewers
Refresh the Viewers:
- OffLine: all
the Viewer is at once only up-to-date to each actualization cycle
- OnLine: a specific Viewer can
request actualization by means of the occurrence of an event, without wait by
the next refresh cycle