public class AT_Context extends Object implements IsTableContext
Context for an AsciiTable.
| Modifier and Type | Field and Description |
|---|---|
protected int |
frameBottomMargin
Margin outside bottom frame.
|
protected Character |
frameBottomMarginChar
The character outside bottom frame.
|
protected Character |
frameLeftChar
The character for left frame margin.
|
protected int |
frameLeftMargin
Margin outside the left frame border.
|
protected Character |
frameRightChar
The character for right frame margin.
|
protected int |
frameRightMargin
Margin outside the right frame border.
|
protected int |
frameTopMargin
Margin outside top frame.
|
protected Character |
frameTopMarginChar
The character outside top frame.
|
protected TA_Grid |
grid
The grid (actual frame) for the table.
|
protected int |
gridTheme
The theme for the grid (which parts to use for drawing a frame).
|
protected int |
gridThemeOptions
Options for the grid, for instance show empty lines.
|
protected String |
lineSeparator
A line separator for generating text output.
|
protected int |
width
The width of the table, actual width depends on padding settings, default is
80. |
| Constructor and Description |
|---|
AT_Context() |
| Modifier and Type | Method and Description |
|---|---|
Character |
getFrameBottomChar()
Returns the bottom frame margin character.
|
int |
getFrameBottomMargin()
Returns the bottom frame margin.
|
Character |
getFrameLeftChar()
Returns the left frame margin character.
|
int |
getFrameLeftMargin()
Returns the left frame margin.
|
Character |
getFrameRightChar()
Returns the right frame margin character.
|
int |
getFrameRightMargin()
Returns the right frame margin.
|
Character |
getFrameTopChar()
Returns the top frame margin character.
|
int |
getFrameTopMargin()
Returns the top frame margin.
|
TA_Grid |
getGrid()
Returns the grid.
|
int |
getGridTheme()
Returns the grid theme.
|
int |
getGridThemeOptions()
Returns the grid theme options.
|
String |
getLineSeparator()
Returns the current set line separator.
|
int |
getTextWidth(int width) |
int |
getWidth() |
AT_Context |
setFrameBottomChar(Character frameBottom)
Sets the bottom frame margin character.
|
AT_Context |
setFrameBottomMargin(int frameBottom)
Sets the bottom frame margin
|
AT_Context |
setFrameLeftChar(Character frameLeft)
Sets the left frame margin character.
|
AT_Context |
setFrameLeftMargin(int frameLeft)
Sets the left frame margin
|
AT_Context |
setFrameLeftRightChar(Character frameChar)
Sets the left and right frame margin character.
|
AT_Context |
setFrameLeftRightChar(Character frameLeft,
Character frameRight)
Sets the left and right frame margin character.
|
AT_Context |
setFrameLeftRightMargin(int frameMargin)
Sets the left and right frame margin.
|
AT_Context |
setFrameLeftRightMargin(int frameLeft,
int frameRight)
Sets the left and right frame margin.
|
AT_Context |
setFrameRightChar(Character frameRight)
Sets the right frame margin character.
|
AT_Context |
setFrameRightMargin(int frameRight)
Sets the right frame margin
|
AT_Context |
setFrameTopBottomMargin(int frameMargin)
Sets the top and bottom frame margin.
|
AT_Context |
setFrameTopBottomMargin(int frameTop,
int frameBottom)
Sets the top and bottom frame margin.
|
AT_Context |
setFrameTopChar(Character frameTop)
Sets the top frame margin character.
|
AT_Context |
setFrameTopMargin(int frameTop)
Sets the top frame margin
|
AT_Context |
setGrid(TA_Grid grid)
Sets the grid used to render the table.
|
AT_Context |
setGridTheme(int theme)
Sets the grid theme.
|
AT_Context |
setGridTheme(TA_GridThemes theme)
Sets the grid theme.
|
AT_Context |
setGridThemeOptions(int options)
Sets options for the grid theme.
|
AT_Context |
setGridThemeOptions(TA_GridThemeOptions options)
Sets options for the grid theme.
|
AT_Context |
setLineSeparator(String separator)
Sets a new line separator for the renderer.
|
AT_Context |
setWidth(int width)
Sets the table width.
|
protected String lineSeparator
A line separator for generating text output.
protected Character frameBottomMarginChar
The character outside bottom frame.
protected int frameBottomMargin
Margin outside bottom frame.
protected Character frameLeftChar
The character for left frame margin.
protected int frameLeftMargin
Margin outside the left frame border.
protected Character frameRightChar
The character for right frame margin.
protected int frameRightMargin
Margin outside the right frame border.
protected Character frameTopMarginChar
The character outside top frame.
protected int frameTopMargin
Margin outside top frame.
protected int width
The width of the table, actual width depends on padding settings, default is 80.
protected TA_Grid grid
The grid (actual frame) for the table.
protected int gridTheme
The theme for the grid (which parts to use for drawing a frame).
protected int gridThemeOptions
Options for the grid, for instance show empty lines.
public Character getFrameBottomChar()
Returns the bottom frame margin character.
public int getFrameBottomMargin()
Returns the bottom frame margin.
public Character getFrameLeftChar()
Returns the left frame margin character.
public int getFrameLeftMargin()
Returns the left frame margin.
public Character getFrameRightChar()
Returns the right frame margin character.
public int getFrameRightMargin()
Returns the right frame margin.
public Character getFrameTopChar()
Returns the top frame margin character.
public int getFrameTopMargin()
Returns the top frame margin.
public int getTextWidth(int width)
getTextWidth in interface IsTableContextpublic int getWidth()
getWidth in interface IsTableContextpublic AT_Context setFrameBottomChar(Character frameBottom)
Sets the bottom frame margin character.
frameBottom - characterpublic AT_Context setFrameBottomMargin(int frameBottom)
Sets the bottom frame margin
frameBottom - marginpublic AT_Context setFrameLeftChar(Character frameLeft)
Sets the left frame margin character.
frameLeft - characterpublic AT_Context setFrameLeftMargin(int frameLeft)
Sets the left frame margin
frameLeft - marginpublic AT_Context setFrameLeftRightChar(Character frameChar)
Sets the left and right frame margin character.
frameChar - characterpublic AT_Context setFrameLeftRightChar(Character frameLeft, Character frameRight)
Sets the left and right frame margin character.
frameLeft - characterframeRight - characterpublic AT_Context setFrameLeftRightMargin(int frameMargin)
Sets the left and right frame margin.
frameMargin - marginpublic AT_Context setFrameLeftRightMargin(int frameLeft, int frameRight)
Sets the left and right frame margin.
frameLeft - marginframeRight - marginpublic AT_Context setFrameRightChar(Character frameRight)
Sets the right frame margin character.
frameRight - characterpublic AT_Context setFrameRightMargin(int frameRight)
Sets the right frame margin
frameRight - marginpublic AT_Context setFrameTopBottomMargin(int frameMargin)
Sets the top and bottom frame margin.
frameMargin - marginpublic AT_Context setFrameTopBottomMargin(int frameTop, int frameBottom)
Sets the top and bottom frame margin.
frameTop - marginframeBottom - marginpublic AT_Context setFrameTopChar(Character frameTop)
Sets the top frame margin character.
frameTop - characterpublic AT_Context setFrameTopMargin(int frameTop)
Sets the top frame margin
frameTop - marginpublic AT_Context setWidth(int width)
Sets the table width.
width - new widthpublic AT_Context setGrid(TA_Grid grid)
Sets the grid used to render the table.
grid - new grid, ignored if nullpublic TA_Grid getGrid()
Returns the grid.
public AT_Context setGridTheme(TA_GridThemes theme)
Sets the grid theme.
theme - new grid theme, ignored if nullpublic AT_Context setGridTheme(int theme)
Sets the grid theme.
theme - new grid theme, must be positive integerpublic AT_Context setGridThemeOptions(TA_GridThemeOptions options)
Sets options for the grid theme.
options - new grid theme options, ignored if nullpublic AT_Context setGridThemeOptions(int options)
Sets options for the grid theme.
options - new grid theme options, must be positive integerpublic int getGridTheme()
Returns the grid theme.
public int getGridThemeOptions()
Returns the grid theme options.
public AT_Context setLineSeparator(String separator)
Sets a new line separator for the renderer.
separator - the new separator, ignored if blankpublic String getLineSeparator()
Returns the current set line separator.
Copyright © 2014–2017. All rights reserved.