Class NamedValuesRowFormatter
- java.lang.Object
-
- org.epics.pvdata.util.namedValues.NamedValuesFormatter
-
- org.epics.pvdata.util.namedValues.NamedValuesRowFormatter
-
public class NamedValuesRowFormatter extends NamedValuesFormatter
-
-
Field Summary
-
Fields inherited from class org.epics.pvdata.util.namedValues.NamedValuesFormatter
cells, labels, numCols, numRows, STYLE_COLUMNS, STYLE_ROWS
-
-
Constructor Summary
Constructors Constructor Description NamedValuesRowFormatter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCell(int row, int col)Thinking of the namedValues system as a matrix of strings, return a given cell's string dataStringgetFormattedCell(int row, int col, String space)Thinking of the namedValues system as a matrix of strings, return a given cell's string data formatted in a string according to whether the system as a whole would be printed in column or row formatting.booleanisLabelCell(int row, int col)Thinking of the namedValues system as a matrix of strings, return whether the given cell is a label cell or not.voidupdateDimensions()Thinking of the namedValues system as a matrix of strings, reset the internal row and column count based on things like whether labels would be printed (if not, that's one less row).-
Methods inherited from class org.epics.pvdata.util.namedValues.NamedValuesFormatter
assignNamedValues, centerText, create, display, getColumnWidth, getWhetherDisplayLabels, leftJustifyText, rightJustifyText, setWhetherDisplayLabels
-
-
-
-
Method Detail
-
getCell
public String getCell(int row, int col)
Description copied from class:NamedValuesFormatterThinking of the namedValues system as a matrix of strings, return a given cell's string data- Specified by:
getCellin classNamedValuesFormatter- Parameters:
row- Specifies the index of the vector of values that were added to the NamedValues system, starting from 0 being the first name and value vector added.col- Specifies the index of a column, where 0 indicates the name, and >0 indicates one of the values associated with that name.- Returns:
- The cell's string data.
-
getFormattedCell
public String getFormattedCell(int row, int col, String space)
Description copied from class:NamedValuesFormatterThinking of the namedValues system as a matrix of strings, return a given cell's string data formatted in a string according to whether the system as a whole would be printed in column or row formatting.- Specified by:
getFormattedCellin classNamedValuesFormatter- Parameters:
row- Specifies the index of the vector of values that were added to the NamedValues system, starting from 0 being the first name and value vector added.col- Specifies the index of a column, where 0 indicates the name, and >0 indicates one of the values associated with that name.space- A string into which to put the text. Usually space would be a String of spaces.- Returns:
- The cell's string data, formatted appropriately as being printed for the system as a whole.
-
isLabelCell
public boolean isLabelCell(int row, int col)Description copied from class:NamedValuesFormatterThinking of the namedValues system as a matrix of strings, return whether the given cell is a label cell or not. Basically, if the system is column oriented, is it the first row.- Specified by:
isLabelCellin classNamedValuesFormatter- Parameters:
row- the row of the cellcol- the column of the cell- Returns:
- true if the cell value should be treated as a label.
-
updateDimensions
public void updateDimensions()
Description copied from class:NamedValuesFormatterThinking of the namedValues system as a matrix of strings, reset the internal row and column count based on things like whether labels would be printed (if not, that's one less row).- Specified by:
updateDimensionsin classNamedValuesFormatter
-
-