JX Application Framework
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | List of all members
JTable Class Referenceabstract

#include <JTable.h>

Inheritance diagram for JTable:
[legend]

Classes

class  AllColWidthsChanged
 
class  AllRowHeightsChanged
 
class  BorderWidthChanged
 
class  ColBorderWidthChanged
 
class  ColMoved
 
class  ColsInserted
 
class  ColsRemoved
 
class  ColWidthChanged
 
class  PrepareForTableDataChange
 
class  PrepareForTableDataMessage
 
class  RowBorderWidthChanged
 
class  RowColMessage
 
class  RowColMoved
 
class  RowHeightChanged
 
class  RowMoved
 
class  RowsInserted
 
class  RowsRemoved
 
class  TableDataChanged
 

Public Member Functions

 JTable (const JCoordinate defRowHeight, const JCoordinate defColWidth, const JColorID borderColor, const JColorID selectionColor)
 
 ~JTable () override
 
void SetTableData (const JTableData *data)
 
JSize GetRowCount () const
 
JCoordinate GetRowHeight (const JIndex index) const
 
void SetRowHeight (const JIndex index, const JCoordinate rowHeight)
 
void SetAllRowHeights (const JCoordinate rowHeight)
 
JCoordinate GetDefaultRowHeight () const
 
void SetDefaultRowHeight (const JCoordinate defRowHeight)
 
JSize GetColCount () const
 
JCoordinate GetColWidth (const JIndex index) const
 
void SetColWidth (const JIndex index, const JCoordinate colWidth)
 
void SetAllColWidths (const JCoordinate colWidth)
 
JCoordinate GetDefaultColWidth () const
 
void SetDefaultColWidth (const JCoordinate defColWidth)
 
bool GetCell (const JPoint &pt, JPoint *cell) const
 
JRect GetCellRect (const JPoint &cell) const
 
JCoordinate GetRowTop (const JIndex index) const
 
JCoordinate GetColLeft (const JIndex index) const
 
JTableSelectionGetTableSelection ()
 
const JTableSelectionGetTableSelection () const
 
virtual bool IsSelectable (const JPoint &cell, const bool forExtend) const
 
void SelectSingleCell (const JPoint &cell, const bool scroll=true)
 
bool GetNextSelectableCell (JPoint *cell, const JPoint &delta, const bool forExtend) const
 
virtual bool IsEditable (const JPoint &cell) const
 
bool BeginEditing (const JPoint &cell, const bool scrollToCell=true)
 
bool ShiftEditing (const JCoordinate dx, const JCoordinate dy, const bool scrollToCell=true)
 
bool EndEditing ()
 
void CancelEditing ()
 
bool IsEditing () const
 
bool GetEditedCell (JPoint *editCell) const
 
void Print (JPagePrinter &p, const bool printRowHeader=true, const bool printColHeader=true)
 
void Print (JEPSPrinter &p, const bool printRowHeader=true, const bool printColHeader=true)
 
void DrawForPrint (JPainter &p, const JPoint &topLeft, const bool userPrintRowHeader, const bool userPrintColHeader)
 
void GetRowBorderInfo (JCoordinate *lineWidth, JColorID *color) const
 
void SetRowBorderInfo (const JCoordinate lineWidth, const JColorID color)
 
void GetColBorderInfo (JCoordinate *lineWidth, JColorID *color) const
 
void SetColBorderInfo (const JCoordinate lineWidth, const JColorID color)
 
JColorID GetSelectionColor () const
 
void SetSelectionColor (const JColorID color)
 
bool GetRowHeader (const JTable **table) const
 
void SetRowHeader (JTable *table)
 
bool GetColHeader (const JTable **table) const
 
void SetColHeader (JTable *table)
 
bool RowIndexValid (const JIndex index) const
 
bool ColIndexValid (const JIndex index) const
 
bool CellValid (const JPoint &cell) const
 
bool TableScrollToCell (const JPoint &cell, const bool centerInDisplay=false)
 
void RegisterAuxData (JTableData *auxData)
 
void RemoveAuxData (JTableData *auxData)
 
- Public Member Functions inherited from JBroadcaster
 JBroadcaster ()
 
virtual ~JBroadcaster ()
 
JBroadcasteroperator= (const JBroadcaster &source)
 
bool HasSenders () const
 
JSize GetSenderCount () const
 
bool HasRecipients () const
 
JSize GetRecipientCount () const
 
virtual JString ToString () const
 
template<class T >
void ListenTo (const JBroadcaster *sender, const std::function< void(const T &)> &f)
 

Static Public Attributes

static const JUtf8BytekRowHeightChanged = "RowHeightChanged::JTable"
 
static const JUtf8BytekAllRowHeightsChanged = "AllRowHeightsChanged::JTable"
 
static const JUtf8BytekRowsInserted = "RowsInserted::JTable"
 
static const JUtf8BytekRowsRemoved = "RowsRemoved::JTable"
 
static const JUtf8BytekRowMoved = "RowMoved::JTable"
 
static const JUtf8BytekRowBorderWidthChanged = "RowBorderWidthChanged::JTable"
 
static const JUtf8BytekColWidthChanged = "ColWidthChanged::JTable"
 
static const JUtf8BytekAllColWidthsChanged = "AllColWidthsChanged::JTable"
 
static const JUtf8BytekColsInserted = "ColsInserted::JTable"
 
static const JUtf8BytekColsRemoved = "ColsRemoved::JTable"
 
static const JUtf8BytekColMoved = "ColMoved::JTable"
 
static const JUtf8BytekColBorderWidthChanged = "ColBorderWidthChanged::JTable"
 
static const JUtf8BytekPrepareForTableDataMessage = "PrepareForTableDataMessage::JTable"
 
static const JUtf8BytekPrepareForTableDataChange = "PrepareForTableDataChange::JTable"
 
static const JUtf8BytekTableDataChanged = "TableDataChanged::JTable"
 

Protected Types

enum  DrawOrder {
  kDrawByRow ,
  kDrawByCol
}
 

Protected Member Functions

virtual void TableRefresh ()=0
 
virtual void TableRefreshRect (const JRect &rect)=0
 
void TableRefreshCell (const JPoint &cell)
 
void TableRefreshCell (const JIndex row, const JIndex col)
 
void TableRefreshCellRect (const JRect &cellRect)
 
void TableRefreshRow (const JIndex index)
 
void TableRefreshCol (const JIndex index)
 
bool WillActLike1DList () const
 
void ShouldActLike1DList (const bool act1D=true)
 
void SetDrawOrder (const DrawOrder order)
 
void TableDraw (JPainter &p, const JRect &r, const bool drawLowerRightBorder=false)
 
virtual void TableDrawCell (JPainter &p, const JPoint &cell, const JRect &rect)=0
 
virtual void TablePrepareToDrawRow (const JIndex rowIndex, const JIndex firstCol, const JIndex lastCol)
 
virtual void TablePrepareToDrawCol (const JIndex colIndex, const JIndex firstRow, const JIndex lastRow)
 
bool Paginate (const JCoordinate pageWidth, const JCoordinate pageHeight, const bool userPrintRowHeader, JArray< JCoordinate > *rowBreakpts, bool *printRowHeader, const bool userPrintColHeader, JArray< JCoordinate > *colBreakpts, bool *printColHeader) const
 
void HilightIfSelected (JPainter &p, const JPoint &cell, const JRect &rect) const
 
void InsertRows (const JIndex index, const JSize count, const JCoordinate rowHeight=0)
 
void PrependRows (const JSize count, const JCoordinate rowHeight=0)
 
void AppendRows (const JSize count, const JCoordinate rowHeight=0)
 
void RemoveRow (const JIndex index)
 
void RemoveNextRows (const JIndex firstIndex, const JSize count)
 
void RemovePrevRows (const JIndex lastIndex, const JSize count)
 
void RemoveAllRows ()
 
void MoveRow (const JIndex origIndex, const JIndex newIndex)
 
void InsertCols (const JIndex index, const JSize count, const JCoordinate colWidth=0)
 
void PrependCols (const JSize count, const JCoordinate colWidth=0)
 
void AppendCols (const JSize count, const JCoordinate colWidth=0)
 
void RemoveCol (const JIndex index)
 
void RemoveNextCols (const JIndex firstIndex, const JSize count)
 
void RemovePrevCols (const JIndex lastIndex, const JSize count)
 
void RemoveAllCols ()
 
void MoveCol (const JIndex origIndex, const JIndex newIndex)
 
virtual void TableSetGUIBounds (const JCoordinate w, const JCoordinate h)=0
 
virtual void TableSetScrollSteps (const JCoordinate hStep, const JCoordinate vStep)=0
 
virtual void TableHeightChanged (const JCoordinate y, const JCoordinate delta)=0
 
virtual void TableHeightScaled (const JFloat scaleFactor)=0
 
virtual void TableRowMoved (const JCoordinate origY, const JSize height, const JCoordinate newY)=0
 
virtual void TableWidthChanged (const JCoordinate x, const JCoordinate delta)=0
 
virtual void TableWidthScaled (const JFloat scaleFactor)=0
 
virtual void TableColMoved (const JCoordinate origX, const JSize width, const JCoordinate newX)=0
 
virtual bool TableScrollToCellRect (const JRect &cellRect, const bool centerInDisplay=false)=0
 
virtual JCoordinate TableGetApertureWidth () const =0
 
virtual JCoordinate GetMin1DVisibleWidth (const JPoint &cell) const
 
virtual bool CreateInputField (const JPoint &cell, const JRect &cellRect)
 
virtual bool ExtractInputData (const JPoint &cell)
 
virtual void DeleteInputField ()
 
virtual void PlaceInputField (const JCoordinate x, const JCoordinate y)
 
virtual void MoveInputField (const JCoordinate dx, const JCoordinate dy)
 
virtual void SetInputFieldSize (const JCoordinate w, const JCoordinate h)
 
virtual void ResizeInputField (const JCoordinate dw, const JCoordinate dh)
 
virtual JCoordinate GetPrintHeaderHeight (JPagePrinter &p) const
 
virtual JCoordinate GetPrintFooterHeight (JPagePrinter &p) const
 
virtual void DrawPrintHeader (JPagePrinter &p, const JCoordinate headerHeight)
 
virtual void DrawPrintFooter (JPagePrinter &p, const JCoordinate footerHeight)
 
bool IsDraggingSelection () const
 
void SetSelectionBehavior (const bool allowMultiple, const bool allowDiscont)
 
void BeginSelectionDrag (const JPoint &cell, const bool extendSelection, const bool selectDiscont)
 
void ContinueSelectionDrag (const JPoint &cell)
 
void FinishSelectionDrag ()
 
bool HandleSelectionKeyPress (const JUtf8Character &key, const bool extendSelection)
 
void AdjustToTableData ()
 
void Receive (JBroadcaster *sender, const Message &message) override
 
- Protected Member Functions inherited from JBroadcaster
 JBroadcaster (const JBroadcaster &source)
 
void ListenTo (const JBroadcaster *sender)
 
void StopListening (const JBroadcaster *sender)
 
void ClearWhenGoingAway (const JBroadcaster *sender, void *pointerToMember)
 
void StopListening (const JBroadcaster *sender, const std::type_info &messageType)
 
template<class T >
void Send (JBroadcaster *recipient, const T &message)
 
template<class T >
void Broadcast (const T &message)
 
void SendWithFeedback (JBroadcaster *recipient, Message *message)
 
void BroadcastWithFeedback (Message *message)
 
virtual void ReceiveWithFeedback (JBroadcaster *sender, Message *message)
 
virtual void ReceiveGoingAway (JBroadcaster *sender)
 

Detailed Description

Abstract class to define a display organized into rows and columns.
JPoint(col,row) indicates a particular cell.

The borders between rows are not counted in the width of the rows,
and likewise for columns.

Derived classes must implement the following functions:

    TableDrawCell
        Draw the contents of the given cell.  All drawing is automatically
        clipped to the boundaries of the cell.  This can usually only be
        overridden by leaf classes since it requires understanding of the
        actual data.  The origin of the painter is irrelevant because
        the cellRect provides all the necessary information.

    TableSetGUIBounds
        The total size of the table has changed to the given width and height.

    TableSetScrollSteps
        Set the step sizes and page contexts used when scrolling the table.

    TableHeightChanged
    TableHeightScaled
    TableRowMoved
    TableWidthChanged
    TableWidthScaled
    TableColMoved
        Adjust the scrolltabs.

    TableScrollToCell
        Scroll the table to display the specified cell rectangle.
        Return false if no scrolling was necessary.

    TableGetApertureWidth
        Return the width of the visible portion of the table.

    TableRefresh
        Refresh the entire table.

    TableRefreshRect
        Refresh the specified rectangle (in pixels).

Derived classes can override the following routines:

    TablePrepareToDrawRow
        DrawCell is about to be called for each cell in a row.  If some
        common initialization needs to be done, do it here.

    TablePrepareToDrawCol
        DrawCell is about to be called for each cell in a column.  If some
        common initialization needs to be done, do it here.

To use our cell selection functions, a derived class should consider
overriding:

    IsSelectable
        Returns true if the specified cell is selectable.

To use our editing mechanism, a derived class must override the
following routines:

    IsEditable
        Return true if the specified cell can be edited.

    CreateInputField
        Create or activate an input field to edit the specified cell.
        Returns true if successful.

    ExtractInputData
        Check the data in the active input field, and save it if
        it is valid.  Return true if it is valid.

    DeleteInputField
        Delete or deactivate the active input field.  Called when
        editing is cancelled or when ExtractInputData returns true.

    PlaceInputField
    MoveInputField
    SetInputFieldSize
    ResizeInputField
        Adjust the position or size of the input field.

We could have written this so that the input field moved itself based
on JTable messages, but this would require every input field object
to implement the same Receive() code, which is a waste.  It seems much
better to do it once in JTable code.

To draw page headers and footers while printing, override the
following routines:

    GetPrintHeaderHeight
        Return the height required for the page header.

    DrawPrintHeader
        Draw the page header.  JTable will lock the header afterwards.

    GetPrintFooterHeight
        Return the height required for the page footer.

    DrawPrintFooter
        Draw the page footer.  JTable will lock the footer afterwards.

Member Enumeration Documentation

◆ DrawOrder

enum JTable::DrawOrder
protected
Enumerator
kDrawByRow 
kDrawByCol 

Constructor & Destructor Documentation

◆ JTable()

JTable::JTable ( const JCoordinate  defRowHeight,
const JCoordinate  defColWidth,
const JColorID  borderColor,
const JColorID  selectionColor 
)

Derived classes must call TableSetScrollSteps because it is pure virtual for us.

◆ ~JTable()

JTable::~JTable ( )
override

Member Function Documentation

◆ AdjustToTableData()

void JTable::AdjustToTableData ( )
protected

◆ AppendCols()

void JTable::AppendCols ( const JSize  count,
const JCoordinate  colWidth = 0 
)
inlineprotected

◆ AppendRows()

void JTable::AppendRows ( const JSize  count,
const JCoordinate  rowHeight = 0 
)
inlineprotected

◆ BeginEditing()

bool JTable::BeginEditing ( const JPoint cell,
const bool  scrollToCell = true 
)

Derived class should call this to begin editing a particular cell. Note that we do not restrict the editing to be done "in place". CreateInputField can activate any sort of input field, even a dialog window.

It is safe to call this function even while something else is being edited because it automatically calls EndEditing().

Not all derived classes will support editing. The ones that do must decide how editing should be triggered and then call these functions whenever it is appropriate.

◆ BeginSelectionDrag()

void JTable::BeginSelectionDrag ( const JPoint cell,
const bool  extendSelection,
const bool  selectDiscont 
)
protected

We take a cell instead of a point because derived classes may have to check the cell before calling us, and calling GetCell() twice is a waste.

◆ CancelEditing()

void JTable::CancelEditing ( )

Derived class should call this to cancel editing and ignore the input.

◆ CellValid()

bool JTable::CellValid ( const JPoint cell) const
inline

◆ ColIndexValid()

bool JTable::ColIndexValid ( const JIndex  index) const
inline

◆ ContinueSelectionDrag()

void JTable::ContinueSelectionDrag ( const JPoint cell)
protected

We take a cell instead of a point because derived classes may have to check the cell before calling us, and calling GetCell() twice is a waste.

◆ CreateInputField()

bool JTable::CreateInputField ( const JPoint cell,
const JRect cellRect 
)
protectedvirtual

Derived class must override to create an input field for the given cell. The cell's rect is provided for convenience. The derived class must store the object so it can retrieve the information when ExtractInputData is called.

These functions are not pure virtual because not all derived classes will support editing, so they should not all be forced to implement these functions.

Reimplemented in JXEditTable.

◆ DeleteInputField()

void JTable::DeleteInputField ( )
protectedvirtual

Derived class must override to remove the active input field. The data was already saved when ExtractInputData was called.

Reimplemented in JXEditTable.

◆ DrawForPrint()

void JTable::DrawForPrint ( JPainter p,
const JPoint topLeft,
const bool  userPrintRowHeader,
const bool  userPrintColHeader 
)

Anywhere on the page

Not called Print() because it would conflict with other prototypes.

◆ DrawPrintFooter()

void JTable::DrawPrintFooter ( JPagePrinter p,
const JCoordinate  footerHeight 
)
protectedvirtual

◆ DrawPrintHeader()

void JTable::DrawPrintHeader ( JPagePrinter p,
const JCoordinate  headerHeight 
)
protectedvirtual

◆ EndEditing()

bool JTable::EndEditing ( )

Derived class should call this to safely end editing by validating the input and then saving the result.

This must be called before accessing the underlying JTableData object.

◆ ExtractInputData()

bool JTable::ExtractInputData ( const JPoint cell)
protectedvirtual

Derived class must override to extract the information from its active input field, check it, and delete the input field if successful.

Should return true if the data is valid and the process succeeded.

Reimplemented in JXFloatTable, JXNamedTreeListWidget, and JXStringTable.

◆ FinishSelectionDrag()

void JTable::FinishSelectionDrag ( )
protected

◆ GetCell()

bool JTable::GetCell ( const JPoint pt,
JPoint cell 
) const

Returns true if the specified pt is inside the table's boundaries.

◆ GetCellRect()

JRect JTable::GetCellRect ( const JPoint cell) const

◆ GetColBorderInfo()

void JTable::GetColBorderInfo ( JCoordinate lineWidth,
JColorID color 
) const
inline

◆ GetColCount()

JSize JTable::GetColCount ( ) const
inline

◆ GetColHeader()

bool JTable::GetColHeader ( const JTable **  table) const
inline

◆ GetColLeft()

JCoordinate JTable::GetColLeft ( const JIndex  index) const
inline

◆ GetColWidth()

JCoordinate JTable::GetColWidth ( const JIndex  index) const
inline

◆ GetDefaultColWidth()

JCoordinate JTable::GetDefaultColWidth ( ) const
inline

◆ GetDefaultRowHeight()

JCoordinate JTable::GetDefaultRowHeight ( ) const
inline

◆ GetEditedCell()

bool JTable::GetEditedCell ( JPoint editCell) const

◆ GetMin1DVisibleWidth()

JCoordinate JTable::GetMin1DVisibleWidth ( const JPoint cell) const
protectedvirtual

Derived classes should override to return the minimum width that ought to be visible when we are acting like a 1D list.

Reimplemented in JXEditTable, and JXStyleTable.

◆ GetNextSelectableCell()

bool JTable::GetNextSelectableCell ( JPoint cell,
const JPoint delta,
const bool  forExtend 
) const

Returns false if it can't find a selectable cell in the direction delta.

◆ GetPrintFooterHeight()

JCoordinate JTable::GetPrintFooterHeight ( JPagePrinter p) const
protectedvirtual

◆ GetPrintHeaderHeight()

JCoordinate JTable::GetPrintHeaderHeight ( JPagePrinter p) const
protectedvirtual

Derived classes can override these functions if they want to print a header or a footer.

◆ GetRowBorderInfo()

void JTable::GetRowBorderInfo ( JCoordinate lineWidth,
JColorID color 
) const
inline

◆ GetRowCount()

JSize JTable::GetRowCount ( ) const
inline

◆ GetRowHeader()

bool JTable::GetRowHeader ( const JTable **  table) const
inline

◆ GetRowHeight()

JCoordinate JTable::GetRowHeight ( const JIndex  index) const
inline

◆ GetRowTop()

JCoordinate JTable::GetRowTop ( const JIndex  index) const
inline

◆ GetSelectionColor()

JColorID JTable::GetSelectionColor ( ) const
inline

◆ GetTableSelection() [1/2]

JTableSelection & JTable::GetTableSelection ( )
inline

◆ GetTableSelection() [2/2]

const JTableSelection & JTable::GetTableSelection ( ) const
inline

◆ HandleSelectionKeyPress()

bool JTable::HandleSelectionKeyPress ( const JUtf8Character key,
const bool  extendSelection 
)
protected

Returns true if we handled the key.

◆ HilightIfSelected()

void JTable::HilightIfSelected ( JPainter p,
const JPoint cell,
const JRect rect 
) const
protected

Make this the first call in TableDrawCell() to automatically hilight all selected cells in a table.

◆ InsertCols()

void JTable::InsertCols ( const JIndex  index,
const JSize  count,
const JCoordinate  colWidth = 0 
)
protected

◆ InsertRows()

void JTable::InsertRows ( const JIndex  index,
const JSize  count,
const JCoordinate  rowHeight = 0 
)
protected

◆ IsDraggingSelection()

bool JTable::IsDraggingSelection ( ) const
inlineprotected

◆ IsEditable()

bool JTable::IsEditable ( const JPoint cell) const
virtual

Derived classes should override this to specify which cells in the table can be edited.

Reimplemented in JXEditTable, and JXTreeListWidget.

◆ IsEditing()

bool JTable::IsEditing ( ) const
inline

◆ IsSelectable()

bool JTable::IsSelectable ( const JPoint cell,
const bool  forExtend 
) const
virtual

The default is for all cells to be selectable. forExtend is true if the cell will be selected as part of an "extend selection" operation.

Reimplemented in JXDirTable, and JXTreeListWidget.

◆ MoveCol()

void JTable::MoveCol ( const JIndex  origIndex,
const JIndex  newIndex 
)
protected

◆ MoveInputField()

void JTable::MoveInputField ( const JCoordinate  dx,
const JCoordinate  dy 
)
protectedvirtual

Reimplemented in JXEditTable.

◆ MoveRow()

void JTable::MoveRow ( const JIndex  origIndex,
const JIndex  newIndex 
)
protected

◆ Paginate()

bool JTable::Paginate ( const JCoordinate  origPageWidth,
const JCoordinate  origPageHeight,
const bool  userPrintRowHeader,
JArray< JCoordinate > *  rowBreakpts,
bool printRowHeader,
const bool  userPrintColHeader,
JArray< JCoordinate > *  colBreakpts,
bool printColHeader 
) const
protected

Returns breakpoints for cutting table into pages. The first breakpoint is always zero, and the last breakpoint is the width or height of the table. Thus, it is easy to calculate the width of what is printed on each page from (breakpt->GetItem(i+1) - breakpt->GetItem(i) + 1).

◆ PlaceInputField()

void JTable::PlaceInputField ( const JCoordinate  x,
const JCoordinate  y 
)
protectedvirtual

Derived class must override to adjust the position or size of the input field.

Reimplemented in JXEditTable, and JXNamedTreeListWidget.

◆ PrependCols()

void JTable::PrependCols ( const JSize  count,
const JCoordinate  colWidth = 0 
)
inlineprotected

◆ PrependRows()

void JTable::PrependRows ( const JSize  count,
const JCoordinate  rowHeight = 0 
)
inlineprotected

◆ Print() [1/2]

void JTable::Print ( JEPSPrinter p,
const bool  userPrintRowHeader = true,
const bool  userPrintColHeader = true 
)

EPS

◆ Print() [2/2]

void JTable::Print ( JPagePrinter p,
const bool  userPrintRowHeader = true,
const bool  userPrintColHeader = true 
)

PostScript

◆ Receive()

void JTable::Receive ( JBroadcaster sender,
const Message message 
)
overrideprotectedvirtual

◆ RegisterAuxData()

void JTable::RegisterAuxData ( JTableData auxData)

We have to take JTableData instead of JAuxTableData because we don't want to have to use templates.

◆ RemoveAllCols()

void JTable::RemoveAllCols ( )
protected

◆ RemoveAllRows()

void JTable::RemoveAllRows ( )
protected

◆ RemoveAuxData()

void JTable::RemoveAuxData ( JTableData auxData)

We have to take JTableData instead of JAuxTableData because we don't want to have to use templates.

◆ RemoveCol()

void JTable::RemoveCol ( const JIndex  index)
inlineprotected

◆ RemoveNextCols()

void JTable::RemoveNextCols ( const JIndex  firstIndex,
const JSize  count 
)
protected

◆ RemoveNextRows()

void JTable::RemoveNextRows ( const JIndex  firstIndex,
const JSize  count 
)
protected

◆ RemovePrevCols()

void JTable::RemovePrevCols ( const JIndex  lastIndex,
const JSize  count 
)
inlineprotected

◆ RemovePrevRows()

void JTable::RemovePrevRows ( const JIndex  lastIndex,
const JSize  count 
)
inlineprotected

◆ RemoveRow()

void JTable::RemoveRow ( const JIndex  index)
inlineprotected

◆ ResizeInputField()

void JTable::ResizeInputField ( const JCoordinate  dw,
const JCoordinate  dh 
)
protectedvirtual

Reimplemented in JXEditTable.

◆ RowIndexValid()

bool JTable::RowIndexValid ( const JIndex  index) const
inline

◆ SelectSingleCell()

void JTable::SelectSingleCell ( const JPoint cell,
const bool  scroll = true 
)

Selects the specified cell, deselects all other cells, and optionally scrolls to make the selected cell visible.

◆ SetAllColWidths()

void JTable::SetAllColWidths ( const JCoordinate  colWidth)

◆ SetAllRowHeights()

void JTable::SetAllRowHeights ( const JCoordinate  rowHeight)

◆ SetColBorderInfo()

void JTable::SetColBorderInfo ( const JCoordinate  lineWidth,
const JColorID  color 
)

◆ SetColHeader()

void JTable::SetColHeader ( JTable table)
inline

◆ SetColWidth()

void JTable::SetColWidth ( const JIndex  index,
const JCoordinate  colWidth 
)

◆ SetDefaultColWidth()

void JTable::SetDefaultColWidth ( const JCoordinate  defColWidth)
inline

◆ SetDefaultRowHeight()

void JTable::SetDefaultRowHeight ( const JCoordinate  defRowHeight)
inline

◆ SetDrawOrder()

void JTable::SetDrawOrder ( const DrawOrder  order)
inlineprotected

◆ SetInputFieldSize()

void JTable::SetInputFieldSize ( const JCoordinate  w,
const JCoordinate  h 
)
protectedvirtual

Reimplemented in JXEditTable, and JXNamedTreeListWidget.

◆ SetRowBorderInfo()

void JTable::SetRowBorderInfo ( const JCoordinate  lineWidth,
const JColorID  color 
)

◆ SetRowHeader()

void JTable::SetRowHeader ( JTable table)
inline

◆ SetRowHeight()

void JTable::SetRowHeight ( const JIndex  index,
const JCoordinate  rowHeight 
)

◆ SetSelectionBehavior()

void JTable::SetSelectionBehavior ( const bool  allowMultiple,
const bool  allowDiscont 
)
inlineprotected

◆ SetSelectionColor()

void JTable::SetSelectionColor ( const JColorID  color)
inline

◆ SetTableData()

void JTable::SetTableData ( const JTableData data)

◆ ShiftEditing()

bool JTable::ShiftEditing ( const JCoordinate  dx,
const JCoordinate  dy,
const bool  scrollToCell = true 
)

Derived class should call this to shift editing to a different cell. This will only work if a cell is currently being edited.

◆ ShouldActLike1DList()

void JTable::ShouldActLike1DList ( const bool  act1D = true)
inlineprotected

◆ TableColMoved()

virtual void JTable::TableColMoved ( const JCoordinate  origX,
const JSize  width,
const JCoordinate  newX 
)
protectedpure virtual

Implemented in JXTable.

◆ TableDraw()

void JTable::TableDraw ( JPainter p,
const JRect r,
const bool  drawLowerRightBorder = false 
)
protected

When calling TableDrawCell(), the painter's origin is at the top left of the table bounds. This forces everybody to write clean code because they have to use cellRect in all their formulas.

If drawLowerRightBorder, we draw the border to close the cells along the lower and right edges of the table.

◆ TableDrawCell()

virtual void JTable::TableDrawCell ( JPainter p,
const JPoint cell,
const JRect rect 
)
protectedpure virtual

◆ TableGetApertureWidth()

virtual JCoordinate JTable::TableGetApertureWidth ( ) const
protectedpure virtual

Implemented in JXTable.

◆ TableHeightChanged()

virtual void JTable::TableHeightChanged ( const JCoordinate  y,
const JCoordinate  delta 
)
protectedpure virtual

Implemented in JXTable.

◆ TableHeightScaled()

virtual void JTable::TableHeightScaled ( const JFloat  scaleFactor)
protectedpure virtual

Implemented in JXTable.

◆ TablePrepareToDrawCol()

void JTable::TablePrepareToDrawCol ( const JIndex  colIndex,
const JIndex  firstRow,
const JIndex  lastRow 
)
protectedvirtual

Reimplemented in JXRowHeaderWidget.

◆ TablePrepareToDrawRow()

void JTable::TablePrepareToDrawRow ( const JIndex  rowIndex,
const JIndex  firstCol,
const JIndex  lastCol 
)
protectedvirtual

◆ TableRefresh()

virtual void JTable::TableRefresh ( )
protectedpure virtual

Implemented in JXTable.

◆ TableRefreshCell() [1/2]

void JTable::TableRefreshCell ( const JIndex  row,
const JIndex  col 
)
inlineprotected

◆ TableRefreshCell() [2/2]

void JTable::TableRefreshCell ( const JPoint cell)
inlineprotected

◆ TableRefreshCellRect()

void JTable::TableRefreshCellRect ( const JRect cellRect)
protected

◆ TableRefreshCol()

void JTable::TableRefreshCol ( const JIndex  index)
inlineprotected

◆ TableRefreshRect()

virtual void JTable::TableRefreshRect ( const JRect rect)
protectedpure virtual

Implemented in JXTable.

◆ TableRefreshRow()

void JTable::TableRefreshRow ( const JIndex  index)
inlineprotected

◆ TableRowMoved()

virtual void JTable::TableRowMoved ( const JCoordinate  origY,
const JSize  height,
const JCoordinate  newY 
)
protectedpure virtual

Implemented in JXTable.

◆ TableScrollToCell()

bool JTable::TableScrollToCell ( const JPoint cell,
const bool  centerInDisplay = false 
)

If we are a 1D list, then we shouldn't scroll horizontally unless the cell would not be visible at all.

◆ TableScrollToCellRect()

virtual bool JTable::TableScrollToCellRect ( const JRect cellRect,
const bool  centerInDisplay = false 
)
protectedpure virtual

Implemented in JXTable.

◆ TableSetGUIBounds()

virtual void JTable::TableSetGUIBounds ( const JCoordinate  w,
const JCoordinate  h 
)
protectedpure virtual

Implemented in JXTable.

◆ TableSetScrollSteps()

virtual void JTable::TableSetScrollSteps ( const JCoordinate  hStep,
const JCoordinate  vStep 
)
protectedpure virtual

Implemented in JXTable.

◆ TableWidthChanged()

virtual void JTable::TableWidthChanged ( const JCoordinate  x,
const JCoordinate  delta 
)
protectedpure virtual

Implemented in JXTable.

◆ TableWidthScaled()

virtual void JTable::TableWidthScaled ( const JFloat  scaleFactor)
protectedpure virtual

Implemented in JXTable.

◆ WillActLike1DList()

bool JTable::WillActLike1DList ( ) const
inlineprotected

Member Data Documentation

◆ kAllColWidthsChanged

const JUtf8Byte * JTable::kAllColWidthsChanged = "AllColWidthsChanged::JTable"
static

◆ kAllRowHeightsChanged

const JUtf8Byte * JTable::kAllRowHeightsChanged = "AllRowHeightsChanged::JTable"
static

◆ kColBorderWidthChanged

const JUtf8Byte * JTable::kColBorderWidthChanged = "ColBorderWidthChanged::JTable"
static

◆ kColMoved

const JUtf8Byte * JTable::kColMoved = "ColMoved::JTable"
static

◆ kColsInserted

const JUtf8Byte * JTable::kColsInserted = "ColsInserted::JTable"
static

◆ kColsRemoved

const JUtf8Byte * JTable::kColsRemoved = "ColsRemoved::JTable"
static

◆ kColWidthChanged

const JUtf8Byte * JTable::kColWidthChanged = "ColWidthChanged::JTable"
static

◆ kPrepareForTableDataChange

const JUtf8Byte * JTable::kPrepareForTableDataChange = "PrepareForTableDataChange::JTable"
static

◆ kPrepareForTableDataMessage

const JUtf8Byte * JTable::kPrepareForTableDataMessage = "PrepareForTableDataMessage::JTable"
static

◆ kRowBorderWidthChanged

const JUtf8Byte * JTable::kRowBorderWidthChanged = "RowBorderWidthChanged::JTable"
static

◆ kRowHeightChanged

const JUtf8Byte * JTable::kRowHeightChanged = "RowHeightChanged::JTable"
static

◆ kRowMoved

const JUtf8Byte * JTable::kRowMoved = "RowMoved::JTable"
static

◆ kRowsInserted

const JUtf8Byte * JTable::kRowsInserted = "RowsInserted::JTable"
static

◆ kRowsRemoved

const JUtf8Byte * JTable::kRowsRemoved = "RowsRemoved::JTable"
static

◆ kTableDataChanged

const JUtf8Byte * JTable::kTableDataChanged = "TableDataChanged::JTable"
static

The documentation for this class was generated from the following files: