public interface TA_GridOptions
Options and utilities for a TA_Grid.
The interface provides three different items:
- grid options determining parts of a grid (static definitions starting with OPT_),
- grid themes combining options to complete themes (static definitions starting with THEME_), and
- methods to calculate what parts of a grid are required (standard static methods) or needed (static methods finishing with Needed).
For the static methods, the difference between required and needed is: - required means that the grid option needs to be rendered, i.e. a border character needs to be printed - needed means that the grid option is not required but some character (blank) is needed in order to maintain vertical and/or horizontal alignment
The grid options define what part of the grid needs to be rendered (when adding a grid to some text). The options are using bit masks to combine them to themes. The predefined themes can be used to request different types of grids. Other themes can be defined easily combining the required options.
| Modifier and Type | Field and Description |
|---|---|
static int |
HAS_BOTTOM_CONNECTOR
Option for using the bottom row, connector.
|
static int |
HAS_BOTTOM_CORNER_LEFT
Option for using the bottom row, left corner.
|
static int |
HAS_BOTTOM_CORNER_RIGHT
Option for using the bottom row, right corner.
|
static int |
HAS_BOTTOM_LINE
Option for using the bottom row, line.
|
static int |
HAS_CONTENT_LEFT
Option for using the content row, left border.
|
static int |
HAS_CONTENT_MID
Option for using the content row, middle border.
|
static int |
HAS_CONTENT_RIGHT
Option for using the content row, right border.
|
static int |
HAS_MID_BORDER_LEFT
Option for using the mid row, left corner.
|
static int |
HAS_MID_BORDER_RIGHT
Option for using the mid row, right corner.
|
static int |
HAS_MID_CONNECTOR
Option for using the mid row, connector.
|
static int |
HAS_MID_LINE
Option for using the mid row, line.
|
static int |
HAS_TOP_CONNECTOR
Option for using the top row, connector.
|
static int |
HAS_TOP_CORNER_LEFT
Option for using the top row, left corner.
|
static int |
HAS_TOP_CORNER_RIGHT
Option for using the top row, right corner.
|
static int |
HAS_TOP_LINE
Option for using the top row, line.
|
static int |
OPT_CONVERT_BORDERS
Option for converting all borders to line equivalent.
|
static int |
OPT_CONVERT_CONNECTORS_HOR
Option for converting all connectors to horizontal line equivalent.
|
static int |
OPT_CONVERT_CONNECTORS_VER
Option for converting all connectors to vertical line equivalent.
|
static int |
OPT_SHOW_EMPTY_BORDER_LEFT
Option for showing an empty left border.
|
static int |
OPT_SHOW_EMPTY_BORDER_MID
Option for showing an empty mid border.
|
static int |
OPT_SHOW_EMPTY_BORDER_RIGHT
Option for showing an empty right border.
|
static int |
OPT_SHOW_EMPTY_ROW_BOTTOM
Option for showing an empty horizontal bottom row.
|
static int |
OPT_SHOW_EMPTY_ROW_MID
Option for showing an empty horizontal middle row.
|
static int |
OPT_SHOW_EMPTY_ROW_TOP
Option for showing an empty horizontal top row.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
optionNeeded(int option,
int mode)
Tests if an option is needed, that is if a particular position in the frame requires a character without being requested (set by the mode).
|
static boolean |
testOption(int option,
int mode)
Simple helper testing the existing of an option in a given mode.
|
static boolean |
testOptionsOr(int mode,
int... options)
Simple helper to test a set of options in a given mode.
|
static final int HAS_TOP_CORNER_LEFT
Option for using the top row, left corner.
static final int HAS_TOP_LINE
Option for using the top row, line.
static final int HAS_TOP_CONNECTOR
Option for using the top row, connector.
static final int HAS_TOP_CORNER_RIGHT
Option for using the top row, right corner.
static final int HAS_BOTTOM_CORNER_LEFT
Option for using the bottom row, left corner.
static final int HAS_BOTTOM_LINE
Option for using the bottom row, line.
static final int HAS_BOTTOM_CONNECTOR
Option for using the bottom row, connector.
static final int HAS_BOTTOM_CORNER_RIGHT
Option for using the bottom row, right corner.
static final int HAS_MID_BORDER_LEFT
Option for using the mid row, left corner.
static final int HAS_MID_LINE
Option for using the mid row, line.
static final int HAS_MID_CONNECTOR
Option for using the mid row, connector.
static final int HAS_MID_BORDER_RIGHT
Option for using the mid row, right corner.
static final int HAS_CONTENT_LEFT
Option for using the content row, left border.
static final int HAS_CONTENT_MID
Option for using the content row, middle border.
static final int HAS_CONTENT_RIGHT
Option for using the content row, right border.
static final int OPT_CONVERT_BORDERS
Option for converting all borders to line equivalent.
static final int OPT_CONVERT_CONNECTORS_HOR
Option for converting all connectors to horizontal line equivalent.
static final int OPT_CONVERT_CONNECTORS_VER
Option for converting all connectors to vertical line equivalent.
static final int OPT_SHOW_EMPTY_ROW_TOP
Option for showing an empty horizontal top row.
static final int OPT_SHOW_EMPTY_ROW_MID
Option for showing an empty horizontal middle row.
static final int OPT_SHOW_EMPTY_ROW_BOTTOM
Option for showing an empty horizontal bottom row.
static final int OPT_SHOW_EMPTY_BORDER_LEFT
Option for showing an empty left border.
static final int OPT_SHOW_EMPTY_BORDER_MID
Option for showing an empty mid border.
static final int OPT_SHOW_EMPTY_BORDER_RIGHT
Option for showing an empty right border.
static boolean testOption(int option,
int mode)
Simple helper testing the existing of an option in a given mode.
option - the option to testmode - the mode to test againststatic boolean testOptionsOr(int mode,
int... options)
Simple helper to test a set of options in a given mode. The method tests if any of the given options is set in the mode
mode - the mode to test againstoptions - set of options to test forstatic boolean optionNeeded(int option,
int mode)
Tests if an option is needed, that is if a particular position in the frame requires a character without being requested (set by the mode).
option - the option to test formode - the mode to test againstCopyright © 2016–2017. All rights reserved.