public static ScreenParent makeScreenFromParams ( Task task , ScreenLoc itsLocation , ComponentParent screenParent , int iDocType , Map < String , Object > properties ) { iDocType = iDocType & ~ ( ScreenConstants . DISPLAY_MASK | ScreenConstants . SCREEN_TYPE_MASK ) ; // Don't need the screen types ScreenParent screen = null ; // First, see if they want to see a screen String strScreen = task . getProperty ( DBParams . SCREEN ) ; if ( ( strScreen != null ) && ( strScreen . length ( ) > 0 ) ) screen = Record . makeNewScreen ( strScreen , itsLocation , screenParent , iDocType | ScreenConstants . DEFAULT_DISPLAY , properties , null , true ) ; // Now, see if they want to open a file and create the default screen if ( screen == null ) { String strRecord = task . getProperty ( DBParams . RECORD ) ; if ( strRecord != null ) { String strScreenType = task . getProperty ( DBParams . COMMAND ) ; iDocType = iDocType | ScreenConstants . DISPLAY_MODE | ScreenConstants . DEFAULT_DISPLAY ; if ( ( strScreenType != null ) && ( strScreenType . length ( ) > 0 ) ) screen = BaseScreen . makeScreenFromRecord ( itsLocation , screenParent , strRecord , strScreenType , properties ) ; else screen = BaseScreen . makeScreenFromRecord ( itsLocation , screenParent , strRecord , iDocType , properties ) ; } } if ( screen == null ) { String strRecord = task . getProperty ( ThinMenuConstants . FORM . toLowerCase ( ) ) ; if ( strRecord != null ) screen = BaseScreen . makeScreenFromRecord ( itsLocation , screenParent , strRecord , iDocType | ScreenConstants . MAINT_MODE | ScreenConstants . DEFAULT_DISPLAY , properties ) ; } if ( screen == null ) { String strMenu = task . getProperty ( DBParams . MENU ) ; if ( strMenu != null ) { screen = new MenuScreen ( null , null , ( BasePanel ) screenParent , null , iDocType | ScreenConstants . MAINT_MODE , properties ) ; } } if ( screen == null ) { // If no params were passed in, display the default screen (menu). screen = new MenuScreen ( null , null , ( BasePanel ) screenParent , null , iDocType | ScreenConstants . MAINT_MODE , properties ) ; } return screen ; }
Make a screen window from the current params .