/** * Initialize. * @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? */ public void init(ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, String strValue, String strDesc, String strImage, String strCommand, String strToolTip) { m_strImageButton = strImage; // Image for this button m_strToolTip = strToolTip; Converter converter = null; if (strValue != null) converter = new CheckConverter(fieldConverter, strValue, strDesc, true); else if (strDesc != null) converter = new FieldDescConverter(fieldConverter, strDesc); if (converter != null) { if (fieldConverter == null) m_DependentConverter = converter; // Remember to remove this fieldConverter = converter; } super.init(itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc); } /**
/** * Initialize. * @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? */ public void init(ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, String strValue, String strDesc, String strImage, String strCommand, String strToolTip) { m_strImageButton = strImage; // Image for this button m_strToolTip = strToolTip; Converter converter = null; if (strValue != null) converter = new CheckConverter(fieldConverter, strValue, strDesc, true); else if (strDesc != null) converter = new FieldDescConverter(fieldConverter, strDesc); if (converter != null) { if (fieldConverter == null) m_DependentConverter = converter; // Remember to remove this fieldConverter = converter; } super.init(itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc, null); } /**
/** * Set up the default screen control for this field. * @param itsLocation Location of this component on screen (ie., GridBagConstraint). * @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout). * @param converter The converter to set the screenfield to. * @param iDisplayFieldDesc Display the label? (optional). * @param properties Extra properties * @return Return the component or ScreenField that is created for this field. */ public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties) { ScreenComponent screenField = null; for (int iBitPosition = ALL; iBitPosition <= PREPAYMENTS; iBitPosition++) // Calendar.SUNDAY -> Calendar.SATURDAY { FieldConverter convBit = new RadioConverter((Converter)converter, Integer.toString(iBitPosition), true); convBit = new FieldDescConverter(convBit, this.getBitDesc(iBitPosition)); screenField = createScreenComponent(ScreenModel.RADIO_BUTTON, itsLocation, targetScreen, convBit, iDisplayFieldDesc, properties); itsLocation = targetScreen.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.DONT_SET_ANCHOR); } return screenField; } /**
/** * Set up the default screen control for this field. * @param itsLocation Location of this component on screen (ie., GridBagConstraint). * @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout). * @param converter The converter to set the screenfield to. * @param iDisplayFieldDesc Display the label? (optional). * @param properties Extra properties * @return Return the component or ScreenField that is created for this field. */ public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties) { ScreenComponent screenField = null; for (int iBitPosition = ALL; iBitPosition <= PREPAYMENTS; iBitPosition++) // Calendar.SUNDAY -> Calendar.SATURDAY { FieldConverter convBit = new RadioConverter((Converter)converter, Integer.toString(iBitPosition), true); convBit = new FieldDescConverter(convBit, this.getBitDesc(iBitPosition)); screenField = createScreenComponent(ScreenModel.RADIO_BUTTON, itsLocation, targetScreen, convBit, iDisplayFieldDesc, properties); itsLocation = targetScreen.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.DONT_SET_ANCHOR); } return screenField; } /**
Converter dayConverter = new FieldDescConverter((Converter)converter, "+" + Short.toString(sBitPosition)); dayConverter = new BitConverter(dayConverter, sBitPosition, false, true); ScreenLoc location = targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST_CHECKBOX, ScreenConstants.DONT_SET_ANCHOR);
/** * Initialize. * @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 strValue The value to set the field on button press. * @param strDesc The description of this button. * @param strImage The image filename for this button. * @param strCommand The command to send on button press. * @param strToolTip The tooltip for this button. * @param record The (optional) record. * @param field The (optional) field. */ public void init(ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, String strValue, String strDesc, String strImage, String strCommand, String strToolTip, Record record, BaseField field) { m_record = record; m_field = field; m_strValue = strValue; m_iDisplayFieldDesc = iDisplayFieldDesc; if (record != null) if (fieldConverter == null) if (this.getDisplayFieldDesc(this)) { // Use the record name as the desc fieldConverter = new FieldDescConverter(null, record.getRecordName()); record.addListener(new RemoveConverterOnCloseHandler(fieldConverter)); // Remove on close } super.init(itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc, strValue, strDesc, strImage, strCommand, strToolTip); } /**
/** * Initialize. * @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 strValue The value to set the field on button press. * @param strDesc The description of this button. * @param strImage The image filename for this button. * @param strCommand The command to send on button press. * @param strToolTip The tooltip for this button. * @param record The (optional) record. * @param field The (optional) field. */ public void init(ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, String strValue, String strDesc, String strImage, String strCommand, String strToolTip, Record record, BaseField field) { m_record = record; m_field = field; m_strValue = strValue; m_iDisplayFieldDesc = iDisplayFieldDesc; if (record != null) if (fieldConverter == null) if (this.getDisplayFieldDesc(this)) { // Use the record name as the desc fieldConverter = new FieldDescConverter(null, record.getRecordName()); record.addListener(new RemoveConverterOnCloseHandler(fieldConverter)); // Remove on close } super.init(itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc, strValue, strDesc, strImage, strCommand, strToolTip); } /**
/** * SetupSFields Method. */ public void setupSFields() { // This will display the "Start Balance" description followed by a blank (then followed by the Debit and Credit amounts) Converter converter = new FieldDescConverter(this.getScreenRecord().getField(GenledScreenRecord.START_SOURCE), this.getScreenRecord().getField(GenledScreenRecord.START_BALANCE)); new SStaticText(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, converter, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(GenledScreenRecord.GENLED_SCREEN_RECORD_FILE).getField(GenledScreenRecord.START_BALANCE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); }
/** * SetupSFields Method. */ public void setupSFields() { Converter converter = new FieldDescConverter(this.getScreenRecord().getField(GenledScreenRecord.START_SOURCE), this.getScreenRecord().getField(GenledScreenRecord.SUB_TOTAL)); new SStaticText(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, converter, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(GenledScreenRecord.GENLED_SCREEN_RECORD_FILE).getField(GenledScreenRecord.SUB_TOTAL).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); }
/** * SetupSFields Method. */ public void setupSFields() { Converter converter = new FieldDescConverter(this.getScreenRecord().getField(GenledScreenRecord.START_SOURCE), this.getScreenRecord().getField(GenledScreenRecord.SUB_TOTAL)); new SStaticText(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, converter, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(GenledScreenRecord.GENLED_SCREEN_RECORD_FILE).getField(GenledScreenRecord.SUB_TOTAL).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); } /**
/** * SetupSFields Method. */ public void setupSFields() { Converter converter = new FieldDescConverter(this.getScreenRecord().getField(GenledScreenRecord.START_SOURCE), this.getScreenRecord().getField(GenledScreenRecord.END_BALANCE)); new SStaticText(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, converter, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(GenledScreenRecord.GENLED_SCREEN_RECORD_FILE).getField(GenledScreenRecord.END_BALANCE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); }
/** * Set up the default screen control for this field. * @param itsLocation Location of this component on screen (ie., GridBagConstraint). * @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout). * @param converter The converter to set the screenfield to. * @param iDisplayFieldDesc Display the label? (optional). * @param properties Extra properties * @return Return the component or ScreenField that is created for this field. */ public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties) { if (targetScreen != null) { Record recCurrencys = (Record)Utility.getRecordOwner(targetScreen).getRecord(Currencys.CURRENCYS_FILE); if (recCurrencys != null) { BaseField fldCurrencyCode = recCurrencys.getField(Currencys.CURRENCY_CODE); Converter conv = new FieldDescConverter(fldCurrencyCode, (Converter)converter); // Use the description for this field ScreenComponent sfCurrency = createScreenComponent(ScreenModel.EDIT_TEXT, itsLocation, targetScreen, conv, iDisplayFieldDesc, properties); sfCurrency.setEnabled(false); itsLocation = targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR); iDisplayFieldDesc = ScreenConstants.DONT_DISPLAY_DESC; // Display it only once } } return super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc, properties); }
/** * Set up the default screen control for this field. * @param itsLocation Location of this component on screen (ie., GridBagConstraint). * @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout). * @param converter The converter to set the screenfield to. * @param iDisplayFieldDesc Display the label? (optional). * @param properties Extra properties * @return Return the component or ScreenField that is created for this field. */ public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties) { Record recTour = this.getReferenceRecord(); BaseField fldDepartureDate = recTour.getField(Tour.DEPARTURE_DATE); //+BaseField fldTourCode = recTour.getField(Tour.TOUR_CODE); BaseField fldTourDesc = recTour.getField(Tour.DESCRIPTION); //?fldAcctNo.addListener(new MainReadOnlyHandler(Account.ACCOUNT_NO_KEY)); Converter conv = new FieldDescConverter(fldDepartureDate, this); // Use the description for this field conv.setupDefaultView(itsLocation, targetScreen, conv, iDisplayFieldDesc, properties); //fldTourCode.setupDefaultView(targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, null, ScreenConstants.DONT_DISPLAY_FIELD_DESC); conv = new FieldLengthConverter(fldTourDesc, 30); //return this.setupTableLookup(targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, ScreenConstants.DONT_DISPLAY_FIELD_DESC, recTour, -1, Tour.DESCRIPTION, false, false); this.addListener(new ReadSecondaryHandler(recTour, null, DBConstants.CLOSE_ON_FREE, false, false)); ScreenComponent sfDesc = createScreenComponent(ScreenModel.EDIT_TEXT, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, conv, ScreenConstants.DONT_DISPLAY_DESC, properties); sfDesc.setEnabled(false); return sfDesc; }
/** * Set up the default screen control for this field. * @param itsLocation Location of this component on screen (ie., GridBagConstraint). * @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout). * @param converter The converter to set the screenfield to. * @param iDisplayFieldDesc Display the label? (optional). * @param properties Extra properties * @return Return the component or ScreenField that is created for this field. */ public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties) { Record recTour = this.getReferenceRecord(); BaseField fldDepartureDate = recTour.getField(Tour.DEPARTURE_DATE); //+BaseField fldTourCode = recTour.getField(Tour.TOUR_CODE); BaseField fldTourDesc = recTour.getField(Tour.DESCRIPTION); //?fldAcctNo.addListener(new MainReadOnlyHandler(Account.ACCOUNT_NO_KEY)); Converter conv = new FieldDescConverter(fldDepartureDate, this); // Use the description for this field conv.setupDefaultView(itsLocation, targetScreen, conv, iDisplayFieldDesc, properties); //fldTourCode.setupDefaultView(targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, null, ScreenConstants.DONT_DISPLAY_FIELD_DESC); conv = new FieldLengthConverter(fldTourDesc, 30); //return this.setupTableLookup(targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, ScreenConstants.DONT_DISPLAY_FIELD_DESC, recTour, -1, Tour.DESCRIPTION, false, false); this.addListener(new ReadSecondaryHandler(recTour, null, DBConstants.CLOSE_ON_FREE, false, false)); ScreenComponent sfDesc = createScreenComponent(ScreenModel.EDIT_TEXT, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, conv, ScreenConstants.DONT_DISPLAY_DESC, properties); sfDesc.setEnabled(false); return sfDesc; }
/** * SetupSFields Method. */ public void setupSFields() { super.setupSFields(); this.getRecord(GenPaymentScreenRecord.GEN_PAYMENT_SCREEN_RECORD_FILE).getField(GenPaymentScreenRecord.BANK_ACCT_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(GenPaymentScreenRecord.GEN_PAYMENT_SCREEN_RECORD_FILE).getField(GenPaymentScreenRecord.PAYMENT_CODE_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); Converter converter = this.getScreenRecord().getField(GenPaymentScreenRecord.USE_CURRENT_SELECTION); Converter convTrue = new RadioConverter(converter, Boolean.TRUE, true); new SRadioButton(this.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.ANCHOR_DEFAULT), this, convTrue, ScreenConstants.DEFAULT_DISPLAY); Converter convFalse = new RadioConverter(converter, Boolean.FALSE, true); convFalse = new FieldDescConverter(convFalse, "Select Balance?"); new SRadioButton(this.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.DONT_SET_ANCHOR), this, convFalse, ScreenConstants.DEFAULT_DISPLAY); new SCannedBox(this.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, MenuConstants.SELECT, MenuConstants.SELECT, MenuConstants.SELECT, null); }
/** * SetupSFields Method. */ public void setupSFields() { super.setupSFields(); this.getRecord(GenPaymentScreenRecord.GEN_PAYMENT_SCREEN_RECORD_FILE).getField(GenPaymentScreenRecord.BANK_ACCT_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(GenPaymentScreenRecord.GEN_PAYMENT_SCREEN_RECORD_FILE).getField(GenPaymentScreenRecord.PAYMENT_CODE_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); Converter converter = this.getScreenRecord().getField(GenPaymentScreenRecord.USE_CURRENT_SELECTION); Converter convTrue = new RadioConverter(converter, Boolean.TRUE, true); new SRadioButton(this.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.ANCHOR_DEFAULT), this, convTrue, ScreenConstants.DEFAULT_DISPLAY); Converter convFalse = new RadioConverter(converter, Boolean.FALSE, true); convFalse = new FieldDescConverter(convFalse, "Select Balance?"); new SRadioButton(this.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.DONT_SET_ANCHOR), this, convFalse, ScreenConstants.DEFAULT_DISPLAY); new SCannedBox(this.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, MenuConstants.SELECT, MenuConstants.SELECT, MenuConstants.SELECT, null); }
/** * SetupSFields Method. */ public void setupSFields() { Converter converter = this.getMainRecord().getField(Tour.TOUR_FILE, Tour.DESCRIPTION); converter = new FieldLengthConverter(converter, 30); this.addColumn(converter); this.getRecord(Tour.TOUR_FILE).getField(Tour.DEPARTURE_DATE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); converter = this.getRecord(TourHeader.TOUR_HEADER_FILE).getField(TourHeader.TOUR_HEADER_FILE, TourHeader.DESCRIPTION); converter = new FieldLengthConverter(converter, 30); converter = new FieldDescConverter(converter, "Header Tour Desc"); this.addColumn(converter); this.getRecord(Inventory.INVENTORY_FILE).getField(Inventory.BLOCKED).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(Inventory.INVENTORY_FILE).getField(Inventory.AVAILABLE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(Tour.TOUR_FILE).getField(Tour.TOUR_STATUS_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); } /**
/** * SetupSFields Method. */ public void setupSFields() { Record query = this.getMainRecord(); Converter converter = query.getField(Tour.TOUR_FILE, Tour.DESCRIPTION); converter = new FieldLengthConverter(converter, 30); this.addColumn(converter); this.addColumn(query.getField(Tour.TOUR_FILE, Tour.DEPARTURE_DATE)); converter = query.getField(Tour.TOUR_FILE, Tour.TOUR_STATUS_ID); this.addColumn(converter); BookingPax recBookingPax = (BookingPax)this.getRecord(BookingPax.BOOKING_PAX_FILE); converter = new FirstMLastConverter(recBookingPax, BookingPax.NAME_PREFIX, BookingPax.FIRST_NAME, BookingPax.MIDDLE_NAME, BookingPax.SUR_NAME); converter = new FieldDescConverter(converter, "Passenger Name"); this.addColumn(converter); converter = new DateConverter(query.getField(Booking.BOOKING_FILE, Booking.BOOKING_DATE), DBConstants.DATE_FORMAT); this.addColumn(converter); converter = query.getField(Booking.BOOKING_FILE, Booking.BOOKING_STATUS_ID); this.addColumn(converter); converter = new DateConverter(query.getField(Booking.BOOKING_FILE, Booking.MOD_DATE), DBConstants.DATE_FORMAT); this.addColumn(converter); this.addColumn(query.getField(Booking.BOOKING_FILE, Booking.GENERIC_NAME)); } /**
/** * Set up all the screen fields. */ public void setupSFields() { Record recVendor = ((ReferenceField)this.getMainRecord().getField(ApTrx.VENDOR_ID)).getReferenceRecord(this); if (recVendor != null) { // Make sure currency is read for LocalCurrencyField(s). Record recCurrencys = ((ReferenceField)recVendor.getField(Vendor.CURRENCYS_ID)).getReferenceRecord(this); recVendor.getField(Vendor.CURRENCYS_ID).addListener(new ReadSecondaryHandler(recCurrencys)); } this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.CODE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.VENDOR_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.TOUR_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.START_SERVICE_DATE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.DESCRIPTION).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); Converter converter = this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.INVOICE_AMOUNT); BaseApplication application = (BaseApplication)this.getTask().getApplication(); String strPrepaymentAmt = application.getResources(ResourceConstants.ACCTPAY_RESOURCE, true).getString("Prepayment amt"); converter = new FieldDescConverter(converter, strPrepaymentAmt); converter.setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.ACCOUNT_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.PREPAYMENT_AP_TRX_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); } /**
/** * Set up all the screen fields. */ public void setupSFields() { Record recVendor = ((ReferenceField)this.getMainRecord().getField(ApTrx.VENDOR_ID)).getReferenceRecord(this); if (recVendor != null) { // Make sure currency is read for LocalCurrencyField(s). Record recCurrencys = ((ReferenceField)recVendor.getField(Vendor.CURRENCYS_ID)).getReferenceRecord(this); recVendor.getField(Vendor.CURRENCYS_ID).addListener(new ReadSecondaryHandler(recCurrencys)); } this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.CODE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.VENDOR_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.TOUR_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.START_SERVICE_DATE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.DESCRIPTION).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); Converter converter = this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.INVOICE_AMOUNT); BaseApplication application = (BaseApplication)this.getTask().getApplication(); String strPrepaymentAmt = application.getResources(ResourceConstants.ACCTPAY_RESOURCE, true).getString("Prepayment amt"); converter = new FieldDescConverter(converter, strPrepaymentAmt); converter.setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.ACCOUNT_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.PREPAYMENT_AP_TRX_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); } /**