View Javadoc
1   package org.djunits.formatter;
2   
3   /**
4    * TableFormatContext contains a number of basic settings for formatting a quantity table. Note that this class and its fields
5    * are package private. It is not the intention to use or extends the class, since the {@link TableFormat} class can only deal
6    * with the fields as expressed in this class, and not with other added fields.
7    * <p>
8    * Copyright (c) 2026-2026 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See
9    * for project information <a href="https://djunits.org" target="_blank">https://djunits.org</a>. The DJUNITS project is
10   * distributed under a <a href="https://djunits.org/docs/license.html" target="_blank">three-clause BSD-style license</a>.
11   * @author Alexander Verbraeck
12   */
13  @SuppressWarnings("checkstyle:visibilitymodifier")
14  class TableFormatContext extends FormatContext implements Cloneable
15  {
16      // Table formatting, contains default values
17  
18      /** End symbol for first row. */
19      String firstRowStartSymbol = "| ";
20  
21      /** End symbol for first row. */
22      String firstRowEndSymbol = " |\n";
23  
24      /** Start symbol for middle row. */
25      String middleRowStartSymbol = "| ";
26  
27      /** End symbol for middle row. */
28      String middleRowEndSymbol = " |\n";
29  
30      /** End symbol for last row. */
31      String lastRowStartSymbol = "| ";
32  
33      /** End symbol for last row. */
34      String lastRowEndSymbol = " |";
35  
36      /** Separator symbol for cell within a row. */
37      String colSeparatorSymbol = "  ";
38  
39      /** Prefix string to use for a quantity table. */
40      String tablePrefix = "";
41  
42      /** Postfix string to use for a quantity table. */
43      String tablePostfix = "";
44  
45      @Override
46      protected TableFormatContext clone()
47      {
48          return (TableFormatContext) super.clone();
49      }
50  
51  }