docs: public final ScreenParent makeScreen(ScreenLoc itsLocation, ComponentParent parent, int iDocMode, boolean bCloneThisQuery, boolean bReadCurrentRecord, boolean bUseBaseTable, boolean bLinkGridToQuery, Map<String,Object> properties)
      {
          Record recordNew = this;
          if (bCloneThisQuery)
          {
              boolean bUseConcreteClass = true;
              if ((recordNew.getDatabaseType() & DBConstants.BASE_TABLE_CLASS) == DBConstants.BASE_TABLE_CLASS)
                  if ((iDocMode & ScreenConstants.DISPLAY_MODE) == ScreenConstants.DISPLAY_MODE)
                      bUseConcreteClass = false;  // Typically for displays, you want to use the abstract class
              if (bUseBaseTable)
              {
                  recordNew = recordNew.getBaseRecord();
                  if (recordNew.getTable() != null)
                      if (bUseConcreteClass)
                          if (recordNew.getTable().getCurrentTable() != null)
                              recordNew = recordNew.getTable().getCurrentTable().getRecord().getBaseRecord();
              }
              try   {
                  recordNew = (Record)recordNew.clone();
              } catch (CloneNotSupportedException ex)   {
                  return null;
              }
              Record recordCurrent = this;
              if (bUseBaseTable)
              {
                  if (recordCurrent.getTable() != null)
                      if (bUseConcreteClass)
                          if (recordCurrent.getTable().getCurrentTable() != null)
                              recordCurrent = recordCurrent.getTable().getCurrentTable().getRecord();
              }
              if ((bReadCurrentRecord)
                  && ((recordCurrent.getEditMode() == Constants.EDIT_CURRENT) || (recordCurrent.getEditMode() == Constants.EDIT_IN_PROGRESS)))
              {
                  if (bUseBaseTable)
                      recordCurrent = recordCurrent.getBaseRecord();
                  boolean bRefreshIfChanged = true;
                  if (parent != null)
                      if (this.getRecordOwner() != null)   // BasePanel
                          if (this.getRecordOwner().getParentRecordOwner() == parent)
                              bRefreshIfChanged = false;  // Since the screen (and record) will be closed, only need to write record
                  recordNew.readSameRecord(recordCurrent, true, bRefreshIfChanged);  // Write if it is changed
              }
              else if ((bReadCurrentRecord)
                  && (recordCurrent.getEditMode() == Constants.EDIT_ADD))
              {
                  if (bUseBaseTable)
                      recordCurrent = recordCurrent.getBaseRecord();
                  try   {
                      recordNew.addNew();
                      recordNew.moveFields(recordCurrent, null, true, DBConstants.INIT_MOVE, false, false, false, false);
                  } catch (DBException ex)    {
                      ex.printStackTrace();
                  }
              }
              else
              {
                  try   {
                      recordNew.addNew();
                  } catch (DBException ex)    {
                      ex.printStackTrace();
                  }
              }
          }
          if (parent != null)
          {
              if (this.getRecordOwner() != null)
                  if (this.getRecordOwner().getParentRecordOwner() == parent)
              {
                  if (recordNew != this)
                      if (this.getRecordOwner() == recordNew.getTable().getDatabase().getDatabaseOwner())
                  {   // Special case - recordowner was db owner
                      recordNew.getTable().getDatabase().getDatabaseOwner().removeDatabase(recordNew.getTable().getDatabase());   // Special case - recordowner is db owner
                      recordNew.getTable().getDatabase().setDatabaseOwner(null);  // I'll set it to the new screen
                  }
                  this.getRecordOwner().free();    // Warning, this also closes "this" record.
                  bLinkGridToQuery = false;   // Can't link to a closed query.
              }
          }
          if (properties != null)
          {
              Task task = parent.getTask();
              task.setProperties(properties);
          }
          BaseAppletReference applet = null;
          if (parent.getTask() instanceof BaseAppletReference)
          	applet = (BaseAppletReference)parent.getTask();
          Object oldCursor = null;
          if (applet != null)
          	oldCursor = applet.setStatus(Constants.WAIT, applet, null);
          ScreenParent screenNew = recordNew.makeScreen(itsLocation, parent, iDocMode, properties);
          if (recordNew != this)
              if (recordNew.getTable().getDatabase().getDatabaseOwner() == null)
                  if (screenNew instanceof DatabaseOwner) // Always
              {   // Special case - recordowner was db owner
                  ((DatabaseOwner)screenNew).addDatabase(recordNew.getTable().getDatabase());
                  recordNew.getTable().getDatabase().setDatabaseOwner((DatabaseOwner)screenNew);
              }
          if (applet != null)
              applet.setStatus(0, applet, oldCursor);
          if (screenNew == null)
          {
              if (bCloneThisQuery) if (recordNew != null)
              {
                  recordNew.free();
                  recordNew = null;
              }
              return null;
          }
          ScreenParent screenCurrent = null;
          if (this.getRecordOwner() instanceof ScreenParent)
              screenCurrent = (ScreenParent)this.getRecordOwner();
          if (screenCurrent == null)
              bLinkGridToQuery = false;
          if (bLinkGridToQuery)
          {
              if ((iDocMode & ScreenConstants.MAINT_MODE) != 0)
              {   // Building a form
                  if (/*(screenCurrent instanceof GridScreen) &&*/ (((ScreenParent)screenCurrent).getMainRecord() == this))
                      screenCurrent.setSelectQuery(recordNew, true);   // When user selects, reads from this file!
                  else
                      screenNew.setSelectQuery(this, false);         // When user reads or updates, reads from this file!
              }
              else
              {   // Building a display/select screen
                  boolean bSuccess = screenNew.setSelectQuery(this, true);          // When user selects, reads from this file!
                  if (!bSuccess)
                      if ((iDocMode & ScreenConstants.DETAIL_MODE) != 0)
                  {   // Linking to a detail screen
                      recordNew = (Record)screenNew.getHeaderRecord();
                      screenCurrent.setSelectQuery(recordNew, true);   // When user selects, reads from this file!
                  }
                  this.addDependentScreen(screenNew);        // When this closes, closes dependent screen
              }
          }
          return screenNew;
      }