public void checkInternalConsistency () { // Determine number of columns to use int nCols = 0; if (m_aColGroup != null) nCols = m_aColGroup.getColumnCount (); if (nCols == 0 && m_aHead.hasChildren ()) nCols = m_aHead.getFirstChild ().getEffectiveCellCount (); if (nCols == 0 && m_aBody.hasChildren ()) nCols = m_aBody.getFirstChild ().getEffectiveCellCount (); if (nCols == 0 && m_aFoot.hasChildren ()) nCols = m_aFoot.getFirstChild ().getEffectiveCellCount (); String sPrefix = "Table"; if (StringHelper.hasText (getID ())) sPrefix += " with ID " + getID (); _checkConsistency (sPrefix + " header", m_aHead, nCols); _checkConsistency (sPrefix + " body", m_aBody, nCols); _checkConsistency (sPrefix + " footer", m_aFoot, nCols); }