Download Use Case Explorer
Transcript
Controls The construction and manipulation of the graph is achieved through a number of classes named controls. When the user selects different options like “add step” and “scenario mode” different controls are registered and unregistered to listen to events from the Display class. The Display class generates events whenever an item in the display is clicked. The event object that is generated contains the item clicked and is propagated to the controls that are registered as listeners. These controls then manipulate the underlying graph by changes to attributes, nodes and edges. Attributes of the Graph Nodes The nodes in the graph contain a number of different attributes, or columns as they are called in Prefuse, to hold necessary information. The following is a list of a few of these attributes together with a short explanation of their purpose. • • • • • • • • Text – Contains the text that is rendered for visible nodes. Node type – As explained above this attribute is used to introduce different node types that in turn are used to structure the graph. Is expanded – Used for expansion nodes to indicate to the layout algorithm whether its corresponding alternative flow should be laid out or be contracted. Block id – Used for action steps to indicate which action block they belong to. Is root – Used to indicate the root node. That is which node is the first step of the main flow. This is necessary for the layout algorithm to know which node to start with. Step type – As mentioned above this attribute is used mainly for specifying the type of an action step, e.g. input or assume. Is block disabled – Determines if the action block of the node should be rendered or not. This is used in scenario mode where the manipulation of the IAD can cause the nodes of the action blocks to be split between two flows. In this case the rendering of that action block is disabled. Step number – Used to temporarily hold the step identification string, e.g. 1a|3, when generating the traditional use case representation. 46