Research 
   

Research

My master project is to build the user interface of DChart with statecharts. As a start point, I'm working with one general drawing tool whose behaviour is modelled by the statecharts.

Start Point

Step 1: The old version of Icon Editor can not automatically generate .py file for the objects drawn on the canvas. The modified version includes this functionality, so we can use this tool to draw whatever we want, save it as .py file and reuse it later.

Step 2: Build the simplified drawing tool.

  • Use iconEditor to draw each view of icons on the interface of drawing tool, save it as .py file.
  • Wrap each views of the icon into icon class.
  • Build the interface of the drawing tool using the generated icon classes, model the behaviours of icon objects of the interface and the behaviours of the interactivity between the user and the application with the statecharts

The following is the detail of implementation of prototype 1.

Prototype of DChart User Interface( UI )

In this prototye, there are two types of components whose states and behaviours are needed to be modeled. One type is the UI components such as scroll bar, menu bar, button bar and drawing area, the other type is the components of DChart diagram including state and link, which are to be created and manipulated by user in the UI drawing area. These two types of components are made of the very low-level graphics provided by the Canvas class of Tkinter. Statechart models are used to describe the state changes and corresponding behaviours of all these components in response to the user actions. The user interface applies multiple canvas windows to accommodate its UI components. So the statechart models are also responsible for the communication between those UI components that are in the different canvas windows.

The following link provides the detail implementation of the prototype.