/** * This is a special method that runs some code when this screen is opened as a task. */ public void run() { int iSFieldCount = this.getSFieldCount(); // Keep out of loop because of chance of free() during run() for (int iFieldSeq = 0; iFieldSeq < iSFieldCount; iFieldSeq++) { // See if any of my children want to handle this command ScreenField sField = this.getSField(iFieldSeq); if (sField instanceof BasePanel) // Run every basepanel { ((BasePanel)sField).run(); } } } /**
/** * Set up the information so I can find this sub-screen. * @return The current sub-screen (or null if none). */ public ScreenField getSubScreen() { this.setCurrentSubScreen(null); if (m_iScreenSeq != -1) return m_screenParent.getSField(m_iScreenSeq); else return null; } /**
/** * Free all the child sFields. * @param bIncludeToolScreens If true, also free the toolScreens. */ public void freeAllSFields(boolean bIncludeToolScreens) { int iToolScreens = 0; while (this.getSFieldCount() > iToolScreens) { // First, get rid of all child screens. ScreenField sField = this.getSField(iToolScreens); if ((!bIncludeToolScreens) && (sField instanceof ToolScreen)) iToolScreens++; else sField.free(); } } /**
/** * Set up the information so I can find this sub-screen. * @return The current sub-screen (or null if none). */ public ScreenField getSubScreen() { this.setCurrentSubScreen(null); if (m_iScreenSeq != -1) return m_screenParent.getSField(m_iScreenSeq); else return null; } /**
/** * Free all the child sFields. * @param bIncludeToolScreens If true, also free the toolScreens. */ public void freeAllSFields(boolean bIncludeToolScreens) { int iToolScreens = 0; while (this.getSFieldCount() > iToolScreens) { // First, get rid of all child screens. ScreenField sField = this.getSField(iToolScreens); if ((!bIncludeToolScreens) && (sField instanceof ToolScreen)) iToolScreens++; else sField.free(); } } /**
/** * Set up the information so I can find this sub-screen. * @return The current sub-screen (or null if none). */ public ScreenField getSubScreen() { this.setCurrentSubScreen(null); if (m_iScreenSeq != -1) return m_screenParent.getSField(m_iScreenSeq); else return null; } /**
/** * This is a special method that runs some code when this screen is opened as a task. */ public void run() { int iSFieldCount = this.getSFieldCount(); // Keep out of loop because of chance of free() during run() for (int iFieldSeq = 0; iFieldSeq < iSFieldCount; iFieldSeq++) { // See if any of my children want to handle this command ScreenField sField = this.getSField(iFieldSeq); if (sField instanceof BasePanel) // Run every basepanel { ((BasePanel)sField).run(); } } } /**
/** * Move the HTML input to the screen record fields. * @param strSuffix Only move fields with the suffix. * @return true if one was moved. * @exception DBException File exception. */ public int setSFieldToProperty(String strSuffix, boolean bDisplayOption, int iMoveMode) { int iErrorCode = DBConstants.NORMAL_RETURN; for (int iIndex = 0; iIndex < this.getSFieldCount(); iIndex++) { ScreenField sField = this.getSField(iIndex); int iErrorCode2 = sField.setSFieldToProperty(strSuffix, bDisplayOption, iMoveMode); if (iErrorCode2 != DBConstants.NORMAL_RETURN) iErrorCode = iErrorCode2; } return iErrorCode; } /**
/** * Move the HTML input to the screen record fields. * @param strSuffix Only move fields with the suffix. * @return true if one was moved. * @exception DBException File exception. */ public int setSFieldToProperty(String strSuffix, boolean bDisplayOption, int iMoveMode) { int iErrorCode = Constant.NORMAL_RETURN; for (int iIndex = 0; iIndex < this.getSFieldCount(); iIndex++) { ScreenField sField = this.getSField(iIndex); int iErrorCode2 = sField.setSFieldToProperty(strSuffix, bDisplayOption, iMoveMode); if (iErrorCode2 != Constant.NORMAL_RETURN) iErrorCode = iErrorCode2; } return iErrorCode; } /**
/** * Enable or disable all fields. * @param bEditing If true, enable this field. */ public void setEnabled(boolean bEditing) { super.setEnabled(bEditing); for (int iFieldSeq = 0; iFieldSeq < this.getSFieldCount(); iFieldSeq++) { ScreenField sField = this.getSField(iFieldSeq); if (!(sField instanceof ToolScreen)) sField.setEnabled(bEditing); } } /**
/** * Enable or disable all fields. * @param bEditing If true, enable this field. */ public void setEnabled(boolean bEditing) { super.setEnabled(bEditing); for (int iFieldSeq = 0; iFieldSeq < this.getSFieldCount(); iFieldSeq++) { ScreenField sField = this.getSField(iFieldSeq); if (!(sField instanceof ToolScreen)) sField.setEnabled(bEditing); } } /**
/** * Display this screen's toolbars in html input format. * @param out The html out stream. * @return true if default params were found for this form. * @exception DBException File exception. */ public boolean printZmlToolbarData(PrintWriter out, int iHtmlOptions) { boolean bFieldsFound = false; int iNumCols = ((BasePanel)this.getScreenField()).getSFieldCount(); for (int iIndex = 0; iIndex < iNumCols; iIndex++) { ScreenField sField = ((BasePanel)this.getScreenField()).getSField(iIndex); if (sField.isToolbar()) { if (sField.printData(out, HtmlConstants.HTML_INPUT | HtmlConstants.HTML_ADD_DESC_COLUMN)) bFieldsFound = true; } } return bFieldsFound; } /**
/** * Display this screen's toolbars in html input format. * @param out The html out stream. * @return true if default params were found for this form. * @exception DBException File exception. */ public boolean printZmlToolbarData(PrintWriter out, int iHtmlOptions) { boolean bFieldsFound = false; int iNumCols = ((BasePanel)this.getScreenField()).getSFieldCount(); for (int iIndex = 0; iIndex < iNumCols; iIndex++) { ScreenField sField = ((BasePanel)this.getScreenField()).getSField(iIndex); if (sField.isToolbar()) { if (sField.printData(out, HtmlConstants.HTML_INPUT | HtmlConstants.HTML_ADD_DESC_COLUMN)) bFieldsFound = true; } } return bFieldsFound; } /**
/** * Display this screen's toolbars in html input format. * @param out The html out stream. * @return true if default params were found for this form. * @exception DBException File exception. */ public boolean printZmlToolbarControls(PrintWriter out, int iHtmlOptions) { boolean bFieldsFound = false; int iNumCols = ((BasePanel)this.getScreenField()).getSFieldCount(); for (int iIndex = 0; iIndex < iNumCols; iIndex++) { ScreenField sField = ((BasePanel)this.getScreenField()).getSField(iIndex); if (sField.isToolbar()) { if (sField.printControl(out, iHtmlOptions | HtmlConstants.HTML_INPUT | HtmlConstants.HTML_ADD_DESC_COLUMN)) bFieldsFound = true; } } return bFieldsFound; } /**
/** * Display this screen's toolbars in html input format. * @param out The html out stream. * @return true if default params were found for this form. * @exception DBException File exception. */ public boolean printZmlToolbarControls(PrintWriter out, int iHtmlOptions) { boolean bFieldsFound = false; int iNumCols = ((BasePanel)this.getScreenField()).getSFieldCount(); for (int iIndex = 0; iIndex < iNumCols; iIndex++) { ScreenField sField = ((BasePanel)this.getScreenField()).getSField(iIndex); if (sField.isToolbar()) { if (sField.printControl(out, iHtmlOptions | HtmlConstants.HTML_INPUT | HtmlConstants.HTML_ADD_DESC_COLUMN)) bFieldsFound = true; } } return bFieldsFound; } /**
for (int i = 0; i < iNumCols; i++) ScreenField sField = modelScreen.getSField(i); if (!sField.isToolbar()) if (sField.getConverter() != null)
for (int iIndex = 0; iIndex < iNumCols; iIndex++) ScreenField sField = this.getSField(iIndex); boolean bPrintControl = this.isPrintableControl(sField, iPrintOptions); if (this.isToolbar())
/** * Set up m_iScreenSeq so I can find this sub-screen. * @param subScreen The current sub-screen. */ 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().getSFieldAt(0) != null) m_screenParent = this.getOwner().getSFieldAt(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; } public void setCurrentScreenNo(int iCurrentScreenNo)
/** * Set up m_iScreenSeq so I can find this sub-screen. * @param subScreen The current sub-screen. */ 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().getSFieldAt(0) != null) m_screenParent = this.getOwner().getSFieldAt(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; } public void setCurrentScreenNo(int iCurrentScreenNo)
/** * Set up m_iScreenSeq so I can find this sub-screen. * @param subScreen The current sub-screen. */ 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; } public void setCurrentScreenNo(int iCurrentScreenNo)