Package com.iizix.term.prop
Class ScreenMatcher
java.lang.Object
com.iizix.term.prop.ScreenMatcher
Class for screen matching.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorDescriptionScreenMatcher
(ScreenProp[] screens, TerminalModelSettings settings) Constructs the instance.Method Summary
Modifier and TypeMethodDescriptionvoid
Creates screen groups.getMatchingScreen
(HostScreen screen, ArrayList<ScreenProp> match) Checks which screens match.boolean
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
Prepare information for Server use, i.e.
Constructor Details
ScreenMatcher
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 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
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
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.