When parsing the design file, some XML elements represent report elements, other "seconary" XML elements simply provide additional information about a report element. For example, the Container tag introduces a report element, but the Font tag simply groups font properties together for convenience.
The design file parser provides a state class for each XML element. However, to prevent a clutter of a large number of Java files, the parser uses a combination of regular and inner classes to organize the state classes. In general, any state class that represents a report element appears as a normal Java class. Any state classes for secondary elements appear as inner classes within the report element state class.
Two patterns appear frequently enough that they justify special handling. The first
is an element that contains text such as an expression. The TextState
class handles this case. The second is localizable text. Such text has a message
ID along with the static text. The ExternalTextState
handles
this case.