Interface NamedTableManager

All Superinterfaces:
Manager<NamedTable>, PropertyChangeProvider, SilenceablePropertyChangeProvider, VetoableChangeProvider
All Known Implementing Classes:
DefaultNamedTableManager

public interface NamedTableManager extends Manager<NamedTable>
A manager for a NamedTable
  • Method Details

    • newAnonymousTable

      AnonymousTable newAnonymousTable(int numRows, int numColumns)
      Create a new anonymous table. This table is not stored in the manager.
      Parameters:
      numRows - number of rows in the table
      numColumns - number of columns in the table
      Returns:
      the new table
    • newCSVTable

      NamedTable newCSVTable(String systemName, String userName, String fileName)
      Create a new CSV table. This table is stored in the manager but it's contents does only exists in the CSV file. If the CSV file is changed, the contents will be read on the next start of the program.
      Parameters:
      systemName - the system name of the table
      userName - the user name of the table, or null if no user name
      fileName - the file name of the CSV file
      Returns:
      the new table
    • newCSVTable

      NamedTable newCSVTable(String systemName, String userName, String fileName, Table.CsvType csvType)
    • newInternalTable

      NamedTable newInternalTable(String systemName, String userName, int numRows, int numColumns)
      Create a new internal named table. This table is stored in the manager together with its contents. Note that a big table will take a lot of space in the panel file since the storage of table data has a lot of overhead. For larger tables, a CSV table is recommended.
      Parameters:
      systemName - the system name of the table
      userName - the user name of the table, or null if no user name
      numRows - number of rows in the table
      numColumns - number of columns in the table
      Returns:
      the new table
    • loadTableFromCSVData

      Load a table from a CSV text.
      Parameters:
      sys - the system name of the new table
      user - the user name of the new table or null if no user name
      text - the CSV text
      Returns:
      the loaded table
      Throws:
      IOException - in case of an exception
    • loadTableFromCSV

      Load a table from a CSV finle.
      Parameters:
      sys - the system name of the new table
      user - the user name of the new table or null if no user name
      fileName - the file name of the CSV table
      Returns:
      the loaded table
      Throws:
      IOException - in case of an exception
    • loadTableFromCSV

      Load a table from a CSV finle.
      Parameters:
      file - the CSV file
      sys - the system name of the new table
      user - the user name of the new table or null if no user name
      Returns:
      the loaded table
      Throws:
      IOException - in case of an exception
    • getNamedTable

      Locate via user name, then system name if needed. Does not create a new one if nothing found
      Parameters:
      name - User name or system name to match
      Returns:
      null if no match found
    • getByUserName

      Locate an existing instance based on a user name.
      Specified by:
      getByUserName in interface Manager<NamedTable>
      Parameters:
      name - System Name of the required NamedBean
      Returns:
      requested NamedBean object or null if none exists
    • getBySystemName

      Locate an existing instance based on a system name.
      Specified by:
      getBySystemName in interface Manager<NamedTable>
      Parameters:
      name - System Name of the required NamedBean
      Returns:
      requested NamedBean object or null if none exists
    • getAutoSystemName

      Create a new system name for a LogixNG.
      Returns:
      a new system name
    • getSubSystemNamePrefix

      Get the sub system prefix of this manager. The sub system prefix is the system name prefix and possibly some extra characters of the NamedBeans handled by this manager.

      For most managers, this is the same as Manager.getSystemNamePrefix(), but for some like the managers in LogixNG, it differs. The sub system prefix for the NamedTableManager is Manager.getSystemNamePrefix() and "T";

      Specified by:
      getSubSystemNamePrefix in interface Manager<NamedTable>
      Returns:
      the sub system prefix
    • deleteNamedTable

      Delete NamedTable by removing it from the manager.
      Parameters:
      x - the NamedTable to delete
    • printTree

      void printTree(PrintWriter writer, String indent)
      Print the tree to a stream.
      Parameters:
      writer - the stream to print the tree to
      indent - the indentation of each level
    • printTree

      void printTree(Locale locale, PrintWriter writer, String indent)
      Print the tree to a stream.
      Parameters:
      locale - The locale to be used
      writer - the stream to print the tree to
      indent - the indentation of each level