public void setCurrentSubScreen ( BasePanel subScreen ) { m_screenParent = null ; // Screen's parent m_iScreenSeq = - 1 ; if ( subScreen != null ) m_screenParent = subScreen . getParentScreen ( ) ; // Screen's parent if ( m_screenParent == null ) if ( this . getOwner ( ) != null ) if ( this . getOwner ( ) . getRecord ( ) != null ) m_screenParent = ( BaseScreen ) this . getOwner ( ) . getRecord ( ) . getRecordOwner ( ) ; if ( m_screenParent == null ) if ( this . getOwner ( ) != null ) if ( this . getOwner ( ) . getComponent ( 0 ) instanceof ScreenField ) m_screenParent = ( ( ScreenField ) this . getOwner ( ) . getComponent ( 0 ) ) . getParentScreen ( ) ; if ( m_screenParent == null ) return ; int iBestGuess = - 1 ; for ( m_iScreenSeq = 0 ; m_iScreenSeq < m_screenParent . getSFieldCount ( ) ; m_iScreenSeq ++ ) { ScreenField sField = m_screenParent . getSField ( m_iScreenSeq ) ; if ( sField == subScreen ) return ; // Found (m_iScreenSeq is correct) if ( sField instanceof BaseScreen ) iBestGuess = m_iScreenSeq ; } m_iScreenSeq = iBestGuess ; }
Set up m_iScreenSeq so I can find this sub - screen .