Interface Projects

All Superinterfaces:
java.lang.Iterable<Project>

public interface Projects
extends java.lang.Iterable<Project>
The projects interface acts as a parent object for all projects within the workspace. Individual projects are accessed using their project name. When the name is not a valid Java identifier e.g. it begins with a numeric or contains a space, the project can only be accessed using the getProject(String) method.

All included projects can be iterated using the following code, pages are presented in the same order as they appear in the designer:

 for ( var project in Iterator(projects.iterator()) )
 {
    log(project.elementName);
 }   
 
Examples:
 var p1 = projects.myProject;
 var myProj = projects.getProject("myProject");
 
Since:
V5.13
  • Method Summary

    Modifier and Type Method Description
    Project getProject​(java.lang.String projectName)
    Returns the Project with name projectName.
    void setAppLayoutPath​(java.lang.String path)
    Changes the Layout for all the Projects in the Workspace.
    void setTheme​(java.lang.String path)  
    void setThemePath​(java.lang.String path)
    Changes the Theme for all the Projects in the Workspace.

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Method Details

    • getProject

      Project getProject​(java.lang.String projectName)
      Returns the Project with name projectName.
      Since:
      V5.13
    • setThemePath

      void setThemePath​(java.lang.String path)
      Changes the Theme for all the Projects in the Workspace. This will change all the forms set to use the Project's Theme to the one at the specified path.

      The path should be relative to the root of the Project or one of its dependent projects. It must start with a forward slash as a path separator.

      The new Theme must have the same Framework and collection of Property Sets as the current Theme otherwise the Form may not look as expected.

      For further information see:

      JavaScript example:

       projects.setThemePath("/themes/myTheme");
       
      Parameters:
      path - path of the new theme to be applied
      Since:
      V5.14
    • setTheme

      void setTheme​(java.lang.String path)
    • setAppLayoutPath

      void setAppLayoutPath​(java.lang.String path)
      Changes the Layout for all the Projects in the Workspace. This will change all the forms set to use the Project's Layout to the one at the specified path.

      The path should be relative to the root of the Project or one of its dependent projects. It must start with a forward slash as a path separator.

      The new Layout must have the same Framework and collection of Property Sets as the current Layout otherwise the Form may not look as expected.

      For further information see:

      JavaScript example:

       projects.setAppLayoutPath("/themes/myTheme");
       
      Parameters:
      path - path of the new layout to be applied
      Since:
      V5.14