Add another screen dependent on this record.
If this record is closed, so is the dependent screen.
@param screen Dependent screen to add.
512586
public void addDependentScreen(ScreenParent screen)
    {
        if (m_depScreens == null)
            m_depScreens = new Vector<ScreenParent>();
        m_depScreens.addElement(screen);
        screen.setDependentQuery(this);
    }
54710
public void setupSFields()
    {   // Set up the screen fields
        Record record = this.getMainRecord();
        if (record == null)
            return;
        int lastColumn = record.getFieldCount() + DBConstants.MAIN_FIELD - 1;
        for (int queryColumn = DBConstants.MAIN_FIELD; queryColumn <= lastColumn; queryColumn++)
        {
            BaseField field = record.getField(queryColumn);
            if (field.isHidden())
                continue;   // Don't display the counter field
            if (field.isSelected())
                field.setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), this, ScreenConstants.DEFAULT_DISPLAY);
        }
    }
1068396
public JComponent setupMenuAndToolbar(JBasePanel baseScreen, JComponent screen)
    {
        if (screen == null)
            screen = baseScreen;
        JBasePanel toolbarParent = this.getToolbarParent();
        JComponent toolbar = baseScreen.createToolbar();
        JMenuBar menubar = baseScreen.createMenubar();
        if (toolbarParent == this)
        {
            if (toolbar != null)    // Add toolbars?
                screen = this.addToolbar(screen, toolbar);        
            if (menubar != null)    // Add menubars?
                screen = this.addToolbar(screen, menubar);
        }
        else
        {
            if (toolbar != null)    // Add toolbars?
                this.switchToolbar(toolbarParent, toolbar);
            if (menubar != null)    // Add menubars?
                this.switchToolbar(toolbarParent, menubar);
        }
        return screen;
    }
90376
public void add(Object dependency, ValueSet valueSet) {
		if (dependency == null) {
			throw new IllegalArgumentException("dependency cannot be null");
		}
		if (valueSet != null) {
			dependencyToEntryTable.put(dependency, valueSet);
		}
	}
520669
public void init(Object parent, Object record)
    {
        m_parent = parent;
        this.setOpaque(false);
        
        if (this.getBaseApplet() != null)
        {
            String strScreenDesc = this.getScreenDesc();
            this.getBaseApplet().setStatusText(strScreenDesc);   // Display screen desc or clear screen desc.
            if (strScreenDesc != null)
                if (this.getTargetScreen(JBaseFrame.class) != null)
                    ((JBaseFrame)this.getTargetScreen(JBaseFrame.class)).setTitle(strScreenDesc);
        }
    }
482151
public void addNavButtons()
    {
        if ((m_iDisplayFieldDesc & ScreenConstants.SELECT_MODE) != ScreenConstants.SELECT_MODE)
            new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.DELETE, MenuConstants.DELETE, null);
        if (!(this.getParentScreen() instanceof Screen))
            super.addNavButtons();  // Only allow form screen if not sub-window
    }
396556
public static boolean isScreenAvailableToShow(final int screen)
	{
		final GraphicsDevice[] graphicsDevices = getAvailableScreens();
		boolean screenAvailableToShow = false;
		if ((screen > -1 && screen < graphicsDevices.length) || (graphicsDevices.length > 0))
		{
			screenAvailableToShow = true;
		}
		return screenAvailableToShow;
	}
316448
public void addToolbarButtons(ToolScreen toolScreen)
    {
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, JnlpFileScreen.WRITE_FILE, MenuConstants.PRINT, JnlpFileScreen.WRITE_FILE, null);
    }
136924
public void init(ScreenLoc itsLocation, ComponentParent parentScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties)
    {
        this.init(null, null, null, null, null, null, false, null, null);
    }
880347
public void init(RecordOwner recordOwner)
    {
        m_dbEditMode = Constants.EDIT_NONE;
        m_listener = null;
        m_bDisplayOption = true;

        m_depScreens = null;        // List of all Dependent screens (doesn't include m_recordOwner)
        m_recordOwner = recordOwner;
        this.getTable();    // This will set up a table using the recordowner if it exists.

        if (recordOwner != null)
            recordOwner.addRecord(this, false);

        super.init(recordOwner);    // Set up the fields.
        this.selectFields();
        if ((this.getDatabaseType() & DBConstants.BASE_TABLE_CLASS) != 0)
        {
            if ((this.getDatabaseType() & DBConstants.SHARED_TABLE) != 0)  // But not shared (don't need multitable).
            {
                if ((this.getMasterSlave() & RecordOwner.MASTER) != 0)   // Slaves don't need this helper class.
                {
                    if ((this.getRecordOwner() == null)
                        || ((this.getRecordOwner().getMasterSlave() & RecordOwner.MASTER) != 0))
                            new org.jbundle.base.db.shared.SharedBaseRecordTable(null, this);    // Special - base class of a shared table
                }
            }
            else
                new org.jbundle.base.db.shared.MultiTable(null, this);     // Special - base class - Add the overriding classes.
        }
        if (this.getTable() != null)
            if (this.getTable().getDatabase() != null)
                if (this.getTable().getDatabase().getDatabaseOwner() != null)
                if (this.getTable().getDatabase().getDatabaseOwner().getEnvironment() != null)
                if ((DBConstants.YES.equalsIgnoreCase(((Environment)this.getTable().getDatabase().getDatabaseOwner().getEnvironment()).getProperty(DBParams.LOG_TRXS))) || (DBConstants.TRUE.equalsIgnoreCase(((Environment)this.getTable().getDatabase().getDatabaseOwner().getEnvironment()).getProperty(DBParams.LOG_TRXS))))
            if ((this.getMasterSlave() & RecordOwner.SLAVE) != 0)   // Slaves do the logging.
                if ((this.getDatabaseType() & DBConstants.DONT_LOG_TRX) == 0)
        {
            if ((this.getRecordOwner() == null)
                || ((this.getRecordOwner().getMasterSlave() & RecordOwner.SLAVE) != 0))
                    new org.jbundle.base.db.util.log.MessageLogTable(null, this);    // Special - base class of a shared table
        }
        m_iDefaultOrder = Constants.MAIN_KEY_AREA;      // Key Area to use on next operation
        this.addListeners();
    }
286573
public ScreenParent makeScreen(ScreenLoc itsLocation, ComponentParent parentScreen, int iDocMode, Map<String,Object> properties)
    {
        ScreenParent screen = null;
        if ((iDocMode & ClassProject.CLASS_DETAIL_MODE) == ClassProject.CLASS_DETAIL_MODE)
            screen = Record.makeNewScreen(ClassInfo.CLASS_INFO_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ClassProject.RESOURCE_DETAIL_MODE) == ClassProject.RESOURCE_DETAIL_MODE)
            screen = Record.makeNewScreen(Resource.RESOURCE_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.DETAIL_MODE) == ScreenConstants.DETAIL_MODE)
            screen = Record.makeNewScreen(CLASS_PROJECT_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.MAINT_MODE) == ScreenConstants.MAINT_MODE)
            screen = Record.makeNewScreen(CLASS_PROJECT_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.DISPLAY_MODE) != 0)
            screen = Record.makeNewScreen(CLASS_PROJECT_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.MENU_MODE) != 0)
            screen = Record.makeNewScreen(CLASS_PROJECT_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else
            screen = super.makeScreen(itsLocation, parentScreen, iDocMode, properties);
        return screen;
    }
56930
public void addListeners()
    {
        super.addListeners();
        
            // Link the screen field to the passed in record
        ((ReferenceField)this.getScreenRecord().getField(ClassInfoScreenRecord.CLASS_PROJECT_ID)).syncReference(this.getHeaderRecord());
        this.getScreenRecord().getField(ClassInfoScreenRecord.CLASS_PROJECT_ID).addListener(new FieldReSelectHandler(this));
        
        this.getMainRecord().addListener(new ExtractRangeFilter(Resource.DESCRIPTION, this.getScreenRecord().getField(ClassInfoScreenRecord.NAME)));
        this.getScreenRecord().getField(ClassInfoScreenRecord.NAME).addListener(new FieldReSelectHandler(this));
        
        this.getMainRecord().addListener(new ExtractRangeFilter(Resource.LOCATION, this.getScreenRecord().getField(ClassInfoScreenRecord.PACKAGE)));
        this.getScreenRecord().getField(ClassInfoScreenRecord.PACKAGE).addListener(new FieldReSelectHandler(this));
    }
1097637
@SuppressWarnings("ReferenceEquality")
    public synchronized void addRelatedDependency(Dependency dependency) {
        if (this == dependency) {
            LOGGER.warn("Attempted to add a circular reference - please post the log file to issue #172 here "
                    + "https://github.com/jeremylong/DependencyCheck/issues/172");
            LOGGER.debug("this: {}", this);
            LOGGER.debug("dependency: {}", dependency);
        } else if (!relatedDependencies.add(dependency)) {
            LOGGER.debug("Failed to add dependency, likely due to referencing the same file as another dependency in the set.");
            LOGGER.debug("this: {}", this);
            LOGGER.debug("dependency: {}", dependency);
        }
    }
203521
public void init(Record record, ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String,Object> properties)
    {
        oldProperties = null;
        String databaseName = parentScreen.getProperty("main" + BaseDatabase.DBSHARED_PARAM_SUFFIX);
        if ((databaseName == null) || (!databaseName.equalsIgnoreCase(Utility.addToPath("main", Utility.getSystemSuffix(parentScreen.getProperty(DBConstants.SYSTEM_NAME), parentScreen.getProperty(DBConstants.DEFAULT_SYSTEM_NAME)), BaseDatabase.DB_NAME_SEPARATOR))))
        {
            Task task = parentScreen.getTask();
            oldProperties = Utility.copyAppProperties(null, task.getProperties());
            Map<String,Object> prop = Utility.copyAppProperties(null, task.getApplication().getProperties());
            prop = Utility.copyAppProperties(prop, task.getProperties());
            BaseDatabase.addDBProperties(prop, parentScreen, null);
            prop.put("main" + BaseDatabase.DBSHARED_PARAM_SUFFIX, Utility.addToPath("main", Utility.getSystemSuffix(parentScreen.getProperty(DBConstants.SYSTEM_NAME), parentScreen.getProperty(DBConstants.DEFAULT_SYSTEM_NAME)), BaseDatabase.DB_NAME_SEPARATOR));
            prop.put(DBConstants.MODE, BaseDatabase.RUN_MODE);
            prop.put(SQLParams.AUTO_COMMIT_PARAM, DBConstants.FALSE);
            if (record != null)
                if (record.getTable().getDatabase().getDatabaseOwner() != null)
            {
                record.free();
                record = null;
            }
            parentScreen.setProperties(prop);
        }
        super.init(record, itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc, properties);
        this.getTask().setProperties(oldProperties);
    }
382045
public void init(ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String, Object> properties)
    {
        m_converterField = null;
        m_screenParent = null;
        
        if (itsLocation == null) if (parentScreen != null)
            itsLocation = parentScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR); 
        m_itsLocation = itsLocation;

        m_bIsFocusTarget = true;
        m_bEnabled = true;
        m_screenParent = parentScreen;
        m_converterField = fieldConverter;
        m_iDisplayFieldDesc = iDisplayFieldDesc;    // The value passed in is...

        if (m_screenParent != null)
        {
            if (itsLocation.getLocationConstant() != ScreenConstants.FIRST_SCREEN_LOCATION)
                m_screenParent.addSField(this);
            else
                m_screenParent.addSField(this, 0);
        }
        boolean bEditableControl = true;
        if (this.getScreenFieldView() == null)
            this.setScreenFieldView(this.setupScreenFieldView(bEditableControl));
        this.getScreenFieldView().addPhysicalControl();
        if (m_converterField != null)
            m_converterField.addComponent(this);        // Have the field add me to its list for display
        if (this.getDisplayFieldDesc(this)) if (this.getSeparateFieldDesc()) if (m_converterField != null)
            this.setupControlDesc();
    }
556663
public void addDependencyGraph(DAGraph<DataT, NodeT> dependencyGraph) {
        this.rootNode.addDependency(dependencyGraph.rootNode.key());
        Map<String, NodeT> sourceNodeTable = dependencyGraph.nodeTable;
        Map<String, NodeT> targetNodeTable = this.nodeTable;
        this.merge(sourceNodeTable, targetNodeTable);
        dependencyGraph.parentDAGs.add(this);
        if (this.hasParents()) {
            this.bubbleUpNodeTable(this, new LinkedList<String>());
        }
    }
584142
public void addComponent(Object sField)
    {
        if (m_vScreenField == null)
            m_vScreenField = new Vector<Object>();
        m_vScreenField.addElement(sField);        // Notify this screen field if I change
    }