Package com.iizix.term.prop
Class ScreenMatcher
- java.lang.Object
-
- com.iizix.term.prop.ScreenMatcher
-
public class ScreenMatcher extends java.lang.Object
Class for screen matching.- Author:
- Christopher Mindus
-
-
Constructor Summary
Constructors Constructor Description ScreenMatcher(ScreenProp[] screens, TerminalModelSettings settings)
Constructs the instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createScreenGroups()
Creates screen groups.ScreenProp
getMatchingScreen(HostScreen screen, java.util.ArrayList<ScreenProp> match)
Checks which screens match.boolean
getScreenIdentificationInfo(java.lang.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.void
prepareForServer()
Prepare information for Server use, i.e.
-
-
-
Constructor Detail
-
ScreenMatcher
public ScreenMatcher(ScreenProp[] screens, TerminalModelSettings settings)
Constructs the instance. Once created, a call toprepareForServer()
should be done for the Server.- Parameters:
screens
- The screens for the matcher.settings
- The terminal model settings.
-
-
Method Detail
-
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, java.util.ArrayList<ScreenProp> match)
Checks which screens match.- Parameters:
screen
- The host screen.match
- A pre-allocated array that is filled with matching screens, ornull
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(java.lang.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.
-
-