ClassDiagrammer Software Engineering Documentation

 

1. Introduction

 

Requirements

 

2. Requirements Overview

 

3. Usage Scenario

 

4. Functional Requirements

 

5. Non-functional requirements

 

Design

 

6. Fundamental Concepts

 

7. System Structure - The 30,000 ft view

 

8. Primary Data and Objects

 

 

 

 

The primary data managed by the class diagramming application is:

 

+ names of classes

 

+ names of class members

 

+ names of interfaces

 

+ names of interface methods

 

+ text of notes 

 

+ label positions

 

+ links between labels

 

+ flags to indicate whether a label is hidden/shown, and/or proposed (additions are marked with ‘+’ watermark, and deletions are marked with ‘x’ watermark).

 

+ a flag to indicate whether or not to draw hidden objects.

 

 

Primary Objects

 

The data suggests the following object types:

 

Label [N.DB.008]

 

Data

 

Each label object holds the following data:

 

an id; the Diagram object provides constants for each of the valid label types. [N.DB.012]

 

a type

 

the text of the label,

 

a location; in pixels; referencing the center of the baseline of the label text

 

a list of vertex id’s of vertices associated with the label; these vertices represent the ends of links attached to the label; see implementation ISL for details about how links are attached to labels

 

a “hidden” flag

 

a “propose to add” flag

 

a “propose to delete” flag

 

a “deleted” flag

 

 

Interface

 

The key elements of the Label interface consists of the constructors

 

Label ( String type, String text, int x, int y );

 

Label ( int id, String type, String string, int x, int y ); (used to restore label from file)

 

accessors for id, type, text, position, text baseline left position (needed for drawing), text upper left position, text lower right position, list of vertex id’s, flags, a method for selecting the label with a point:

 

boolean Select(int x, int y);

 

and a method for moving a label by a displacement dx, dy:

 

void Move ( int dx, int dy );

 

Since this interface is considered private to the database manager, except as indicated, it is not strictly controlled by the design.

 

 

 

Link [N.DB.009]

 

Data

 

Each link object holds the following data:

 

an id; the Diagram object provides constants for each of the valid link types. [N.DB.013]

 

a type

 

a list of vertex id’s to vertices defining the link; the first and last vertices are associated with labels, thereby attaching the link to a label at each end; internal vertices are bends in the link; link forks may begin at any internal vertices; the last vertex of a fork is attached to a label

 

 

a “hidden” flag

 

a “propose to add” flag

 

a “propose to delete” flag

 

a “deleted” flag

 

an “is branch” flag

 

 

Interface

 

The key elements of the Link interface consists of the constructors

 

Link ( String type, int vertex0IdValue, int vertex1IdValue );

 

Link ( int id, String type); (used to restore link from file)

 

accessors for id, type and list of vertex id’s of  vertices defining the link, flags, and a method for selecting the link with a point:

 

boolean Select(int x, int y);

 

Since this interface is considered private to the database manager, except as indicated, it is not strictly controlled by the design.

 

 

 

 

Vertex [N.DB.010]

 

The Vertex class represents a point in a diagram.  Vertices are used to construct links, and to attach links to labels.

 

Data

 

an id

 

x and y location

 

Interface

 

The key elements of the Vertex interface consists of the constructors

 

Vertex ( int x, int y );

 

Vertex ( int id, int x, int y ); (used to restore vertex from file)

 

accessors for id, x, y, a method for selecting a vertex with a point:

 

boolean Select(int x, int y);

 

and a method for moving a point by a displacement dx, dy:

 

void Move ( int dx, int dy );

 

Since this interface is considered private to the database manager, except as indicated, it is not strictly controlled by the design.

 

 

Diagram [N.DB.007]

 

The Diagram class represents the entire diagram.

 

Data

 

A Diagram holds the following data:

 

a filename

 

list of labels

 

list of links

 

list of vertices

 

a flag indicating whether or not the diagram has unsaved changes

 

 

Interface

 

The key elements of the Vertex interface consists of the constructor

 

Diagram()

 

and accessors for getting the diagram filename, flag indicating unsaved data, and lists of labels and links.

 

Additionally the interface includes methods to add labels and links, select labels, links and vertices, move labels and vertices.

 

Since this interface is considered private to the database manager (see below), except as indicated, it is not strictly controlled by the design.

 

 

 

Download a Java executable of the ClassDiagrammer (ClassDiagrammerApp.jar)

 

Download a sample diagram created by the ClassDiagrammer (BankAccountClasses.cd)

 

 

Copyright © 2009 John Keklak.  All rights reserved.  Based on version 090515a.