Class ScreenMatcher

java.lang.Object
com.iizix.term.prop.ScreenMatcher

public class ScreenMatcher extends Object
Class for screen matching.
Author:
Christopher Mindus
  • Constructor Details

    • ScreenMatcher

      public ScreenMatcher(ScreenProp[] screens, TerminalModelSettings settings)
      Constructs the instance. Once created, a call to prepareForServer() should be done for the Server.
      Parameters:
      screens - The screens for the matcher.
      settings - The terminal model settings.
  • Method Details

    • prepareForServer

      public void prepareForServer()
      Prepare information for Server use, i.e. create screen groups and rearrange the screens as required. This operation requires quite some processing.
    • getMatchingScreen

      public ScreenProp getMatchingScreen(HostScreen screen, ArrayList<ScreenProp> match)
      Checks which screens match.
      Parameters:
      screen - The host screen.
      match - A pre-allocated array that is filled with matching screens, or null not to retain the list.
      Returns:
      null If none or more than one screen matches.
    • createScreenGroups

      public void createScreenGroups()
      Creates screen groups. After sorting the screens by not-popup window, screen size, identification count then identification data, create the screen identification groups: get the 16 largest groups with screen group count over 16. Every screen identification rectangle must be "Exact Rectangle Contents". Calling this method reorders the screens before e.g. a save. Nothing is done if Binary Search Method is not enabled.
    • getScreenIdentificationInfo

      public boolean getScreenIdentificationInfo(StringBuilder sb)
      Gets a displayable formatted string (that can contain several lines separated by LF characters) that is used when compiling a distribution or when saving a file.
      Parameters:
      sb - Buffer to insert information into.
      Returns:
      true if there are warnings, i.e. two or more screens are equal.