public void writeFileMakeViews ( ) { if ( this . readThisMethod ( "makeScreen" ) ) { this . writeThisMethod ( CodeType . THICK ) ; return ; // if no views specified, use default methods } if ( true ) { ClassInfo recClassInfo = ( ClassInfo ) this . getMainRecord ( ) ; ClassFields recClassFields = new ClassFields ( this ) ; recClassFields . addListener ( new SubFileFilter ( ClassFields . CLASS_INFO_CLASS_NAME_KEY , recClassInfo . getField ( ClassInfo . CLASS_NAME ) ) ) ; // Only read through the class fields recClassFields . close ( ) ; try { boolean firstTime = true ; while ( recClassFields . hasNext ( ) ) { recClassFields . next ( ) ; String strClassFieldType = recClassFields . getField ( ClassFields . CLASS_FIELDS_TYPE ) . toString ( ) ; if ( strClassFieldType . equalsIgnoreCase ( ClassFieldsTypeField . SCREEN_CLASS_NAME ) ) { if ( firstTime ) { this . writeMethodInterface ( null , "makeScreen" , "ScreenParent" , "ScreenLoc itsLocation, ComponentParent parentScreen, int iDocMode, Map<String,Object> properties" , "" , "Make a default screen." , null ) ; m_StreamOut . writeit ( "\tScreenParent screen = null;\n" ) ; } String screenMode = recClassFields . getField ( ClassFields . CLASS_FIELD_INITIAL_VALUE ) . toString ( ) ; if ( ( screenMode == null ) || ( screenMode . length ( ) == 0 ) ) screenMode = "MAINT_MODE" ; if ( ! screenMode . contains ( "." ) ) screenMode = "ScreenConstants." + screenMode ; String fieldName = recClassFields . getField ( ClassFields . CLASS_FIELD_NAME ) . toString ( ) ; if ( firstTime ) m_StreamOut . writeit ( "\t" ) ; else m_StreamOut . writeit ( "\telse " ) ; m_StreamOut . write ( "if ((iDocMode & " + screenMode + ") == " + screenMode + ")\n" ) ; m_StreamOut . writeit ( "\t\tscreen = Record.makeNewScreen(" + fieldName + ", itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);\n" ) ; firstTime = false ; } } if ( ! firstTime ) { m_StreamOut . writeit ( "\telse\n" ) ; m_StreamOut . writeit ( "\t\tscreen = super.makeScreen(itsLocation, parentScreen, iDocMode, properties);\n" ) ; m_StreamOut . writeit ( "\treturn screen;\n}\n" ) ; } } catch ( DBException e ) { e . printStackTrace ( ) ; } } }
Write the TableDoc code to DoMakeViews .