void
CBCommandTable::Draw
	(
	JXWindowPainter&	p,
	const JRect&		rect
	)
{
	JXEditTable::Draw(p, rect);

	if (itsDNDRowIndex > 0)
		{
		p.ResetClipRect();

		const JSize origLineWidth = p.GetLineWidth();
		p.SetLineWidth(3);

		const JRect b = GetBounds();
		if (RowIndexValid(itsDNDRowIndex))
			{
			const JRect r = GetCellRect(JPoint(1, itsDNDRowIndex));
			p.Line(b.left, r.top, b.right, r.top);
			}
		else
			{
			const JRect r = GetCellRect(JPoint(1, GetRowCount()));
			p.Line(b.left, r.bottom, b.right, r.bottom);
			}

		p.SetLineWidth(origLineWidth);
		}
}
void
JXTreeListWidget::OpenSelectedNodes
	(
	const JBoolean openSiblings,
	const JBoolean openDescendants
	)
{
	JTableSelectionIterator iter(&(GetTableSelection()));
	iter.MoveTo(kJIteratorStartAtEnd, 0,0);
	JPoint cell, lastCell;
	while (iter.Prev(&cell))
		{
		if (openSiblings)
			{
			itsTreeList->OpenSiblings(cell.y);
			}
		if (openDescendants)
			{
			itsTreeList->OpenDescendants(cell.y, itsMaxOpenDepth);
			}
		if (!openSiblings && !openDescendants)
			{
			itsTreeList->Open(cell.y);
			}

		lastCell = cell;
		}

	if (RowIndexValid(lastCell.y) && !openSiblings)
		{
		ScrollToShowChildren(lastCell.y);
		}
}
Example #3
0
inline bool TblRowIndexValid(JNIEnv* env, T* pTable, jlong rowIndex, bool offset=false)
{
    if (realm::util::SameType<realm::Table, T>::value) {
        if (!TableIsValid(env, TBL(pTable)))
            return false;
    }
    return RowIndexValid(env, pTable, rowIndex, offset);
}
Example #4
0
inline bool IndexValid(JNIEnv* env, T* pTable, jlong columnIndex, jlong rowIndex)
{
    return ColIndexValid(env, pTable, columnIndex)
        && RowIndexValid(env, pTable, rowIndex);
}