CARMA C++
|
Displays Cells in a tabular format. More...
#include <carma/ui/rtd/common/RtDisplay.h>
Public Member Functions | |
void | addBimaAntCols () |
Add columns with bima antenna labels. More... | |
CellPtr | addCell (CellPtr cell) |
Add a cell to the table. More... | |
RtColPtr | addCol (RtColPtr colObj) |
Add a column title. More... | |
void | addCols (int numOfCols, const char *names[]) |
add general column headings More... | |
void | addOvroAntCols () |
Add columns with ovro antenna labels. More... | |
RtRowPtr | addRow (RtRowPtr rowObj) |
Add a row title. More... | |
Cell & | getCell (int index) |
Get cell. More... | |
int | getNumCells () const |
Get number of cells. More... | |
::size_t | getNumCols () const |
Get the number of columns. More... | |
::size_t | getNumRows () const |
Get the number of rows. More... | |
void | noColLabels () |
Don't display column labels. More... | |
void | noRowLabels () |
Don't display row labels. More... | |
void | replaceCell (int index, CellPtr cell) |
Replace cell. More... | |
RtTable (const ::std::string &title) | |
Constructor. More... | |
virtual void | serialize (bool initialize, int fontSize,::rtdproto::RtObject *rtobj) |
Creates static description of container to stdout. More... | |
void | setLabelPrefix (const ::std::string &labelPrefix) |
Set a prefix for the label used for cell functions (like a plot label). More... | |
void | setMinRows (::size_t minRows) |
Set the minimum number of rows to display. More... | |
void | setPrefRows (::size_t prefRows) |
Set the default number of rows to display. More... | |
void | setReverseOrder () |
Reverse the row/column order of the cells. More... | |
void | setRowLabel (int rowNo, const std::string &label) |
Change the default label of the given row. More... | |
virtual | ~RtTable () |
Destructor. More... | |
![]() | |
RtObjectPtr | add (RtObjectPtr rtObject) |
Insert an object into the container. More... | |
Border | getBorder () const |
::size_t | getNumObjects () const |
Get the number of objects in the container. More... | |
RtObjectPtr | getObj (::size_t index) const |
Get object from the container by index. More... | |
RtObjectPtr | replace (unsigned int i, RtObjectPtr rtObject) |
Replace an object in the container. More... | |
RtObjectPtr | replace (RtObjectPtr oldObj, RtObjectPtr newObj) |
void | setBorder (Border border) |
Set the border code. More... | |
virtual void | update () |
Update all objects contained by container. More... | |
virtual | ~RtContainer () |
Destructor. More... | |
![]() | |
std::string | getTitle () |
Get title. More... | |
void | setTitle (const std::string &title) |
Set title for object. More... | |
![]() | |
void | appendToolTipText (const std::string &text) |
Append more text to the existing tool tip text. More... | |
Layout | getLayout () const |
Get the layout for this object. More... | |
std::string | getToolTipText () |
void | setFontSize (int fontSize) |
Set the absolute font size for this object. More... | |
void | setLayout (Layout layout) |
Set the layout for this object. More... | |
void | setToolTipText (const std::string &text) |
Set the tool tip text for this RtObject. More... | |
virtual | ~RtObject () |
Destructor. More... | |
Static Public Member Functions | |
static std::vector< std::string > | getAntNames () |
Get a vector of all antenna labels. More... | |
static std::vector< std::string > | getBimaAntNames () |
Get a vector of bima antenna labels. More... | |
static std::vector< std::string > | getOvroAntNames () |
Get a vector of ovro antenna labels. More... | |
static std::vector< std::string > | getSzaAntNames () |
Get a vector of sza antenna labels. More... | |
Additional Inherited Members | |
![]() | |
typedef ::std::vector < RtObjectPtr > | ObjectContainerType |
![]() | |
RtContainer () | |
Constructor. More... | |
RtContainer (const ::std::string &title) | |
Constructor. More... | |
RtContainer (Border border) | |
Constructor. More... | |
RtContainer (const ::std::string &title, Border border) | |
Constructor. More... | |
![]() | |
RtTitledObj (const std::string &title) | |
Constructor. More... | |
![]() | |
int | getFontSize (int parentFontSize) const |
Get the absolute font size for this object. More... | |
int | getFontSize () const |
Get the absolute font size for this object. More... | |
RtObject () | |
Constructor. More... | |
![]() | |
size_t | numObjects_ |
ObjectContainerType | objects_ |
![]() | |
std::string | title_ |
Object title. More... | |
Displays Cells in a tabular format.
The number of rows and columns are established by adding RtRows and RtColumns to the table. The number of rows and columns determine number of cells that must be added to fill the grid. There is no check to see that these match, so the result is a Java exception, usually Array Index Out of Bounds!! Be careful! A zero length string can be used as a label to define a row or column if needed. The order of row/column/cells does not matter. When cells are added, they are assumed to be added from a column, going down rows, e.g. R1C1, R2C1, R3C1,... R1C2, R2C2, R3C2... The cells can be added with the indices reversed and then invoking the setReverseOrder() method on the table. The table may contain more rows than are displayed in the default layout. Expanding the table will allow the table to grow, up to its full size. It can also be shortened, deleting rows from the bottom, up to a minimum size. The default has the minimum, default and maximum all the same. When individual cell functions are chosen (like a plot) the label for the function is gotten from its row and column names. There is a method to add another prefix to this which is useful when there are folders which have similar contents and would create ambiguous names.
Definition at line 1756 of file RtDisplay.h.
|
explicit |
Constructor.
title | Title for the table |
|
virtual |
Destructor.
void carma::ui::rtd::RtTable::addBimaAntCols | ( | ) |
Add columns with bima antenna labels.
CellPtr carma::ui::rtd::RtTable::addCell | ( | CellPtr | cell | ) |
Add a cell to the table.
RtColPtr carma::ui::rtd::RtTable::addCol | ( | RtColPtr | colObj | ) |
Add a column title.
void carma::ui::rtd::RtTable::addCols | ( | int | numOfCols, |
const char * | names[] | ||
) |
add general column headings
void carma::ui::rtd::RtTable::addOvroAntCols | ( | ) |
Add columns with ovro antenna labels.
RtRowPtr carma::ui::rtd::RtTable::addRow | ( | RtRowPtr | rowObj | ) |
Add a row title.
|
static |
Get a vector of all antenna labels.
|
static |
Get a vector of bima antenna labels.
Cell& carma::ui::rtd::RtTable::getCell | ( | int | index | ) |
Get cell.
int carma::ui::rtd::RtTable::getNumCells | ( | ) | const |
Get number of cells.
::size_t carma::ui::rtd::RtTable::getNumCols | ( | ) | const |
Get the number of columns.
::size_t carma::ui::rtd::RtTable::getNumRows | ( | ) | const |
Get the number of rows.
|
static |
Get a vector of ovro antenna labels.
|
static |
Get a vector of sza antenna labels.
void carma::ui::rtd::RtTable::noColLabels | ( | ) |
Don't display column labels.
void carma::ui::rtd::RtTable::noRowLabels | ( | ) |
Don't display row labels.
void carma::ui::rtd::RtTable::replaceCell | ( | int | index, |
CellPtr | cell | ||
) |
Replace cell.
|
virtual |
Creates static description of container to stdout.
Implements carma::ui::rtd::RtContainer.
void carma::ui::rtd::RtTable::setLabelPrefix | ( | const ::std::string & | labelPrefix | ) |
Set a prefix for the label used for cell functions (like a plot label).
void carma::ui::rtd::RtTable::setMinRows | ( | ::size_t | minRows | ) |
Set the minimum number of rows to display.
void carma::ui::rtd::RtTable::setPrefRows | ( | ::size_t | prefRows | ) |
Set the default number of rows to display.
void carma::ui::rtd::RtTable::setReverseOrder | ( | ) |
Reverse the row/column order of the cells.
void carma::ui::rtd::RtTable::setRowLabel | ( | int | rowNo, |
const std::string & | label | ||
) |
Change the default label of the given row.
rowNo | The index of the row |
label | The new row label. |