The Filters View

By default all new class diagrams are set to provide unfiltered class diagram viewing. Unfiltered class diagrams typically suffer from information overload - too much class member detail and too many association lines. The filters view lets you filter down class diagram content to obtain a clearer, more meaningful view of the object oriented structure.

Opening the Filters View

With a class diagram open the filters view can be opened from the toolbar or by right clicking on empty space on a class diagram and selecting Open Filters View.

open filters view

 

The filters view provides fast access to a collection of controls which enable coarse and fine control over the content and presentation of class diagram elements. The choose button underneath the name of the diagram style opens a dialog from which you can pick a different diagram style.

Filters View

 

Methods of specifying filtering

AgileJ StructureViews supports three ways of controlling filters - three to avoid the trade-off between the need for quick and accessible filtering on a one-off basis, and deeper, project-specific filtering for reuse across all class diagrams.

Type of filtering Advantages Limitations
switches
  • quick and simple to change as you view class diagrams
  • only change what the diagram style allows you to change
  • values you set apply only to the class diagram you are looking at
override bindings
  • convenient control over how element are displayed
  • get 'first say' before the diagram style
  • only apply to the diagram you are looking at
  • limited to the element selectors available in the configuration
configuration
  • total control over filtering and display
  • reusable across all class diagrams
  • configuration xml file requires hand editing, which is an interruption to class diagram browsing
  • a new diagram style has to be declared for each combination of display/filter rules

Configuration is not dealt with in this section, which leaves the diagram style, switches and override bindings which appear on the filters view.

Diagram Style Selection

The right panel of the filters view is for the selection of the diagram style and the setting of diagram style switches. Diagram styles are explained in full in the configuration section. In order to make use of diagram styles all you need to know at this stage is that a diagram style is a pre-packaged collection of filter and display rules through which you can view a class diagram. Selecting a different diagram style applies filtering and presentation rules to your class diagram as you view it.

Switches

In theory, there could be a pre-existing diagram style for each of every possible combination of display rules. However, this would require a great many diagram styles to cover all of the combinations. Also on the right panel, just below the diagram style choose button, the switches allow you to say, on a diagram by diagram basis, how the diagram style should handle options such as visibility or name pattern. The number of switches depends upon the diagram style chosen.

Override Bindings

Override bindings are so called because they bind Java element selectors to display settings, and override because they override the bindings in the diagram style. The left panel of the filters view contains a tab panel with tabs for classes, methods, fields, inheritance lines, field lines and dependency lines. Within each of these categories you can add multiple override bindings.

Field Selector

Fields override binding

The class diagram you are viewing will then immediately hide all static fields.