TFORMer SDK - JAVA  8
FormLayout

Overview

A FormLayout is a document which was created with TFORMer Designer. This class is used to retrieve or set information belonging to a FormLayout.

A typical FormLayout contains static content (like a logo), dynamic content (like a DataField) and a number of properties which are used to describe the FormLayout and its behavior during print-time. Each FormLayout is member of exactly one Project (in the case of a Repository) or the GlobalProject (in the case of a stand-alone FormLayout).

Note:
It is not possible to change the appearance of the FormLayout (like adding new elements or bands) with this class. Design tasks are supported by TFORMer Designer only.

Repository-based FormLayouts

General

Printing

When printing a specific FormLayout within a Repository 3 parameters must be specified to identify the FormLayout:

Stand-Alone FormLayout

General

Printing

When printing a Job using a stand-alone FormLayout 1 parameter must be specified:

Note:
Do not use Job.setProjectName and Job.setFormName when using a stand-alone FormLayout!

Determining Used DataFields

In order to access the data-fields in a FormLayout you may either use the method Project.getDataField or you may iterate through all available data-fields using Project.getFirstDataField and DataField.getNext. If you want to know, whether the returned DataField is actually used you can use the method FormLayout.getDataFieldUsage.

Sample

To retrieve the FormLayout object within a stand-alone FormLayout do the following:

  // Retrieve the global Project 
  // A stand-alone FormLayout contains only the global Project, the global Project contains the FormLayout
  Project project = repository.getGlobalProject ();

  if (project != null)
  {
    System.out.println (project.toString());

    // Retrieve the first (and only) FormLayout
    FormLayout formlayout = project.getFirstFormLayout ();
    if (formlayout != null)
    {
      System.out.println (formlayout.toString());
    }
  }

To retrieve all FormLayout objects within a Repository do the following:

  // Retrieve the first Project 
  Project project = repository.getFirstProject ();

  while (project != null)
  {
    System.out.println (project.toString());

    // Retrieve the first FormLayout in this Project
    FormLayout formlayout = project.getFirstFormLayout ();

    while (formlayout != null)
    {
      System.out.println (formlayout.toString());

      // Get the next FormLayout in this Project
      formlayout = formlayout.getNext ();
    }

    // Get the next Project
    project = project.getNext ();
  } 

© 2006-2024 - all rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Thu Oct 3 2024 05:08:23 for TFORMer SDK - JAVA with doxygen 1.7.6.1