AMAPstudio

User Tools


A simple viewer to show tables or texts at a given date

An easy way to check a simulation by displaying a text or tabular view that can be synchronized on all its steps. This generic viewer is compatible with the models which MethodProvider object implements TablesInterface (capsis.util.methodprovider package).

This interface declares a single method named getTables (…). You may return a Map with one or more entries.

The key is the name of the table. The value is a String with a textual description of the scene under the given simlation Step. If the perHectare parameter is true, the description should be calculated per hectare.

It is possible to return a text with several lines by adding newline characters : '\n' in the value String. It is thus possible to build tables like in the upper example, one line per simulation step from the root step of the simulation.

If several entries are returned in the map, the viewer will show them in several tabs with matching names.

public interface TablesInterface {
 
    /**
     * Returns a Map of Strings (supposed to be tables: several lines with \n)
     * to be printed in the SVTables. Key in the map is the table name, value is
     * the table itself.
     */
    public Map<String, String> getTables(Step step, boolean perHectare);
 
}
documentation/asimpleviewertoshowtablesonastep.txt · Last modified: 2018/05/22 08:08 by coligny