Class TextViewportSettings
java.lang.Object
uno.anahata.asi.agi.resource.view.TextViewportSettings
Encapsulates adjustable viewport configuration for V2 text resources.
Controls pagination, tailing, grep filtering, and visual markers for large resource files.
- Author:
- anahata
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intThe maximum line width before horizontal truncation.private booleanWhether full view is enabled (loading entire resource up to EOF).private StringA regular expression pattern for filtering lines (grep).private booleanWhether to include line numbers in the processed output.private intThe maximum number of characters to load in a single page.private intThe starting character offset for pagination.private booleanWhether to enable tailing mode.private intThe number of lines to capture from the end of the source.private TextViewportBack-reference to the parent viewport engine. -
Constructor Summary
ConstructorsConstructorDescriptionTextViewportSettings(TextViewport viewport) Constructs settings bound to a parent viewport engine.Copy constructor creating an independent clone of the given settings. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates an independent deep copy of these viewport settings.voidSynchronously notifies the parent viewport and view that settings have changed.voidsetColumnWidth(int columnWidth) Sets the column width and triggers dirty chain.voidsetFullView(boolean fullView) Sets whether full view mode is enabled and triggers dirty chain.voidsetGrepPattern(String grepPattern) Sets the grep pattern and triggers dirty chain.voidsetIncludeLineNumbers(boolean includeLineNumbers) Toggles line numbers and triggers dirty chain.voidsetPageSizeInChars(int pageSizeInChars) Sets the page size and triggers dirty chain.voidsetStartChar(int startChar) Sets the start character and triggers dirty chain.voidsetTail(boolean tail) Toggles tailing mode and triggers dirty chain.voidsetTailLines(int tailLines) Sets the number of tail lines and triggers dirty chain.toString()Returns a summary of the settings for use in resource headers.
-
Field Details
-
viewport
Back-reference to the parent viewport engine. -
fullView
private boolean fullViewWhether full view is enabled (loading entire resource up to EOF). -
startChar
private int startCharThe starting character offset for pagination. -
pageSizeInChars
private int pageSizeInCharsThe maximum number of characters to load in a single page. -
columnWidth
private int columnWidthThe maximum line width before horizontal truncation. -
grepPattern
A regular expression pattern for filtering lines (grep). -
includeLineNumbers
private boolean includeLineNumbersWhether to include line numbers in the processed output. -
tail
private boolean tailWhether to enable tailing mode. -
tailLines
private int tailLinesThe number of lines to capture from the end of the source.
-
-
Constructor Details
-
TextViewportSettings
Constructs settings bound to a parent viewport engine.- Parameters:
viewport- The parent viewport.
-
TextViewportSettings
Copy constructor creating an independent clone of the given settings.- Parameters:
other- The existing settings to copy.
-
-
Method Details
-
copy
Creates an independent deep copy of these viewport settings.- Returns:
- A new TextViewportSettings instance with identical properties.
-
markDirty
public void markDirty()Synchronously notifies the parent viewport and view that settings have changed. -
setFullView
public void setFullView(boolean fullView) Sets whether full view mode is enabled and triggers dirty chain.- Parameters:
fullView- True to load full resource.
-
setStartChar
public void setStartChar(int startChar) Sets the start character and triggers dirty chain.- Parameters:
startChar- The new character offset.
-
setPageSizeInChars
public void setPageSizeInChars(int pageSizeInChars) Sets the page size and triggers dirty chain.- Parameters:
pageSizeInChars- The maximum characters per page.
-
setColumnWidth
public void setColumnWidth(int columnWidth) Sets the column width and triggers dirty chain.- Parameters:
columnWidth- The maximum characters per line.
-
setGrepPattern
Sets the grep pattern and triggers dirty chain.- Parameters:
grepPattern- The regex pattern.
-
setIncludeLineNumbers
public void setIncludeLineNumbers(boolean includeLineNumbers) Toggles line numbers and triggers dirty chain.- Parameters:
includeLineNumbers- True to show gutters.
-
setTail
public void setTail(boolean tail) Toggles tailing mode and triggers dirty chain.- Parameters:
tail- True to enable tailing.
-
setTailLines
public void setTailLines(int tailLines) Sets the number of tail lines and triggers dirty chain.- Parameters:
tailLines- The number of lines to capture.
-
toString
-

