Interface Tabulator
public interface Tabulator
Provides a tabulator that keeps track of the tab stops of a terminal.
-
Method Summary
Modifier and TypeMethodDescriptionvoidClears all tab stops.voidclearTabStop(int position) Clears the tab stop at the given position.intgetNextTabWidth(int position) Returns the width of the tab stop that is at or after the given position.intgetPreviousTabWidth(int position) Returns the width of the tab stop that is before the given position.intnextTab(int position) Returns the next tab stop that is at or after the given position.intpreviousTab(int position) Returns the previous tab stop that is before the given position.voidresize(int width) voidsetTabStop(int position) Sets the tab stop to the given position.
-
Method Details
-
clearTabStop
void clearTabStop(int position) Clears the tab stop at the given position.- Parameters:
position- the column position used to determine the next tab stop, > 0.
-
clearAllTabStops
void clearAllTabStops()Clears all tab stops. -
getNextTabWidth
int getNextTabWidth(int position) Returns the width of the tab stop that is at or after the given position.- Parameters:
position- the column position used to determine the next tab stop, >= 0.- Returns:
- the next tab stop width, >= 0.
-
getPreviousTabWidth
int getPreviousTabWidth(int position) Returns the width of the tab stop that is before the given position.- Parameters:
position- the column position used to determine the previous tab stop, >= 0.- Returns:
- the previous tab stop width, >= 0.
-
nextTab
int nextTab(int position) Returns the next tab stop that is at or after the given position.- Parameters:
position- the column position used to determine the next tab stop, >= 0.- Returns:
- the next tab stop, >= 0.
-
previousTab
int previousTab(int position) Returns the previous tab stop that is before the given position.- Parameters:
position- the column position used to determine the previous tab stop, >= 0.- Returns:
- the previous tab stop, >= 0.
-
setTabStop
void setTabStop(int position) Sets the tab stop to the given position.- Parameters:
position- the position of the (new) tab stop, > 0.
-
resize
void resize(int width)
-