/** * Initialize class fields. */ public void init(Record record, ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String,Object> properties) { super.init(record, itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc, properties); } /**
/** * Set up all the screen fields. */ public void setupSFields() { this.getRecord(Folder.kFolderFile).getField(Folder.kName).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); }
/** * Add the sub file filter (linking the header to the main file) * Override this if the header does not have a direct link to the detail. */ public void addSubFileFilter() { this.getMainRecord().setKeyArea(BaseFolder.kParentFolderIDKey); super.addSubFileFilter(); } /**
/** * MakeScreen Method. */ public BaseScreen makeScreen(ScreenLocation itsLocation, BasePanel parentScreen, int iDocMode, Map<String,Object> properties) { BaseScreen screen = null; if ((iDocMode & ScreenConstants.DOC_MODE_MASK) == ScreenConstants.DETAIL_MODE) screen = new FolderGridScreen(this, null, itsLocation, parentScreen, null, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties); else if ((iDocMode & ScreenConstants.MAINT_MODE) == ScreenConstants.MAINT_MODE) screen = new FolderScreen(this, itsLocation, parentScreen, null, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties); else if ((iDocMode & ScreenConstants.DISPLAY_MODE) != 0) screen = new FolderGridScreen(this, itsLocation, parentScreen, null, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties); else screen = super.makeScreen(itsLocation, parentScreen, iDocMode, properties); return screen; } /**
/** * Open the header record. * @return The new header record. */ public Record openHeaderRecord() { if (m_recHeader == null) { Record record = this.getMainRecord(); try { m_recHeader = (Record)record.clone(); // Do not add to screen's list - will mix with other file } catch (CloneNotSupportedException ex) { ex.printStackTrace(); } // Do not clone the listeners, while (m_recHeader.getListener() != null) { m_recHeader.removeListener(m_recHeader.getListener(), true); } m_recHeader.addListeners(); // Just use the standard listeners } return m_recHeader; } /**
/** * FolderScreen Method. */ public FolderScreen(Record recHeader, Record record, ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String,Object> properties) { this(); this.init(recHeader, record, itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc, properties); } /**
/** * Constructor. * @param record The main record for this screen. * @param itsLocation The location of this component within the parent. * @param parentScreen The parent screen. * @param fieldConverter The field this screen field is linked to. * @param iDisplayFieldDesc Do I display the field desc? * @param properties Addition properties to pass to the screen. */ public FolderScreen(Record record, ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String,Object> properties) { this(); this.init(record, itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc, properties); } /**