/** * Creates a new object of the same class as this object. * @return a clone of this instance. * @exception CloneNotSupportedException if the object's class does not support the <code>Cloneable</code> interface. * @see java.lang.Cloneable */ public Object clone() { // The listener is cloned along with any cloned files return new SubCountHandler(m_fldMain, m_fsToCount, m_bRecountOnSelect, m_bVerifyOnEOF); // Init this field override for other value } /**
/** * Creates a new object of the same class as this object. * @return a clone of this instance. * @exception CloneNotSupportedException if the object's class does not support the <code>Cloneable</code> interface. * @see java.lang.Cloneable */ public Object clone() { // The listener is cloned along with any cloned files return new SubCountHandler(m_fldMain, m_fsToCount, m_bRecountOnSelect, m_bVerifyOnEOF); // Init this field override for other value } /**
/** * Creates a new object of the same class as this object. * @return a clone of this instance. * @exception CloneNotSupportedException if the object's class does not support the <code>Cloneable</code> interface. * @see java.lang.Cloneable */ public Object clone() { // The listener is cloned along with any cloned files SubCountHandler handler = new SubCountHandler(); handler.init(null, null, null, m_fldMain, fsToCount, m_bRecountOnSelect, m_bVerifyOnEOF, m_bResetOnBreak); // Init this field override for other value return handler; } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); String iFieldSeq = TourHeaderOption.DETAIL_TOUR_DETAIL_COUNT; if (TourHeaderLine.TOUR_HEADER_LINE_FILE.equals(this.getMainRecord().getTableNames(false))) iFieldSeq = TourHeaderOption.DETAIL_PRICE_COUNT; if (TourHeaderAirHeader.TOUR_HEADER_AIR_HEADER_FILE.equals(this.getMainRecord().getTableNames(false))) iFieldSeq = TourHeaderOption.DETAIL_AIR_HEADER_COUNT; this.getMainRecord().addListener(new SubCountHandler(this.getHeaderRecord().getField(iFieldSeq), false, true)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); String iFieldSeq = TourHeaderOption.DETAIL_TOUR_DETAIL_COUNT; if (TourHeaderLine.TOUR_HEADER_LINE_FILE.equals(this.getMainRecord().getTableNames(false))) iFieldSeq = TourHeaderOption.DETAIL_PRICE_COUNT; if (TourHeaderAirHeader.TOUR_HEADER_AIR_HEADER_FILE.equals(this.getMainRecord().getTableNames(false))) iFieldSeq = TourHeaderOption.DETAIL_AIR_HEADER_COUNT; this.getMainRecord().addListener(new SubCountHandler(this.getHeaderRecord().getField(iFieldSeq), false, true)); } /**
/** * Add the behaviors to calculate the "Amount Selected" and Balance field. */ public ApTrx addSelectBehaviors() { RecordOwner recordOwner = this.findRecordOwner(); ApTrx recApTrx2 = new ApTrx(recordOwner); // Don't add second copy to screen if (recordOwner != null) recordOwner.removeRecord(recApTrx2); this.addListener(new FreeOnFreeHandler(recApTrx2)); // ...but be sure to free it recApTrx2.addListener(new SubFileFilter(this)); this.addListener(new RecountOnValidHandler(recApTrx2)); BooleanField fldTrue = new BooleanField(null, "True", 1, null, new Boolean(true)); recApTrx2.addListener(new FreeOnFreeHandler(fldTrue)); recApTrx2.addListener(new CompareFileFilter(ApTrx.ACTIVE_TRX, fldTrue, "=", fldTrue, true)); recApTrx2.addListener(new SubCountHandler(this.getField(Vendor.AMOUNT_SELECTED), ApTrx.AMOUNT_SELECTED, true, true)); recApTrx2.addListener(new SubCountHandler(this.getField(Vendor.VENDOR_BALANCE), ApTrx.INVOICE_BALANCE, true, true)); return recApTrx2; } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getRecord(CashBatch.CASH_BATCH_FILE).getField(CashBatch.ID).addListener(new FieldReSelectHandler(this)); this.getRecord(CashBatchDetail.CASH_BATCH_DETAIL_FILE).addListener(new SubCountHandler(this.getRecord(CashBatch.CASH_BATCH_FILE).getField(CashBatch.BATCH_CHECKS_ACTUAL), false, true)); this.getRecord(CashBatchDetail.CASH_BATCH_DETAIL_FILE).addListener(new SubCountHandler(this.getRecord(CashBatch.CASH_BATCH_FILE).getField(CashBatch.BATCH_TOTAL_ACTUAL), CashBatchDetail.AMOUNT, false, true)); this.getRecord(CashBatchDetail.CASH_BATCH_DETAIL_FILE).getField(CashBatchDetail.BOOKING_ID).addListener(new BookingDefaultHandler(null)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getMainRecord().setKeyArea(Vendor.CURRENCYS_ID_KEY); this.getMainRecord().addListener(new SubFileFilter(this.getScreenRecord().getField(CurrencyReqScreenRecord.CURRENCYS_ID), Vendor.CURRENCYS_ID, null, null, null, null, true)); this.getScreenRecord().getField(CurrencyReqScreenRecord.CURRENCYS_ID).addListener(new FieldReSelectHandler(this)); ApTrx recApTrx = ((Vendor)this.getMainRecord()).addSelectBehaviors(); this.getMainRecord().addListener(new SubCountHandler(this.getScreenRecord().getField(CurrencyReqScreenRecord.BALANCE_TOTAL), Vendor.VENDOR_BALANCE, true, true)); this.getMainRecord().addListener(new SubCountHandler(this.getScreenRecord().getField(CurrencyReqScreenRecord.TOTAL_TOTAL), Vendor.AMOUNT_SELECTED, true, true)); this.setEnabled(false); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getMainRecord().setKeyArea(Vendor.CURRENCYS_ID_KEY); this.getMainRecord().addListener(new SubFileFilter(this.getScreenRecord().getField(CurrencyReqScreenRecord.CURRENCYS_ID), Vendor.CURRENCYS_ID, null, null, null, null, true)); this.getScreenRecord().getField(CurrencyReqScreenRecord.CURRENCYS_ID).addListener(new FieldReSelectHandler(this)); ApTrx recApTrx = ((Vendor)this.getMainRecord()).addSelectBehaviors(); this.getMainRecord().addListener(new SubCountHandler(this.getScreenRecord().getField(CurrencyReqScreenRecord.BALANCE_TOTAL), Vendor.VENDOR_BALANCE, true, true)); this.getMainRecord().addListener(new SubCountHandler(this.getScreenRecord().getField(CurrencyReqScreenRecord.TOTAL_TOTAL), Vendor.AMOUNT_SELECTED, true, true)); this.setEnabled(false); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getMainRecord().addListener(new SubCountHandler(this.getScreenRecord().getField(VendorScreenRecord.TOTAL_SELECTED), ApTrx.AMOUNT_SELECTED, false, true)); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.AMOUNT_SELECTED).setEnabled(true); FilterApTrxHandler listener = (FilterApTrxHandler)this.getMainRecord().getListener(FilterApTrxHandler.class.getName()); listener.clearFilter(); listener.addTrxStatusID(ApTrx.INVOICE); listener.addTrxStatusID(ApTrx.INVOICE_NON_TOUR); listener.addTrxStatusID(ApTrx.PREPAYMENT_REQUEST); listener.addTrxStatusID(ApTrx.BROKER_PAYMENT_HEADER); listener.addTrxStatusID(ApTrx.BROKER_PAYMENT); listener.addTrxStatusID(ApTrx.CREDIT_MEMO); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); ((ReferenceField)this.getRecord(CashBatchDetail.CASH_BATCH_DETAIL_FILE).getField(CashBatchDetail.CASH_BATCH_ID)).setReferenceRecord(this.getRecord(CashBatch.CASH_BATCH_FILE)); ((ReferenceField)this.getRecord(CashBatchDetail.CASH_BATCH_DETAIL_FILE).getField(CashBatchDetail.CASH_BATCH_ID)).getReference(); this.getRecord(CashBatchDetail.CASH_BATCH_DETAIL_FILE).setKeyArea(CashBatchDetail.CASH_BATCH_ID_KEY); this.getRecord(CashBatchDetail.CASH_BATCH_DETAIL_FILE).addListener(new SubFileFilter(this.getRecord(CashBatch.CASH_BATCH_FILE))); this.getRecord(CashBatch.CASH_BATCH_FILE).addListener(new UpdateOnCloseHandler(null)); this.getRecord(CashBatchDetail.CASH_BATCH_DETAIL_FILE).addListener(new SubCountHandler(this.getRecord(CashBatch.CASH_BATCH_FILE).getField(CashBatch.BATCH_CHECKS_ACTUAL), false, true)); this.getRecord(CashBatchDetail.CASH_BATCH_DETAIL_FILE).addListener(new SubCountHandler(this.getRecord(CashBatch.CASH_BATCH_FILE).getField(CashBatch.BATCH_TOTAL_ACTUAL), CashBatchDetail.AMOUNT, false, true)); this.getRecord(CashBatchDetail.CASH_BATCH_DETAIL_FILE).getField(CashBatchDetail.BOOKING_ID).addListener(new BookingDefaultHandler(null)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getRecord(AcctBatchDetail.ACCT_BATCH_DETAIL_FILE).addListener(new SubCountHandler(this.getRecord(AcctBatch.ACCT_BATCH_FILE).getField(AcctBatch.BALANCE), AcctBatchDetail.AMOUNT, false, true)); this.getRecord(AcctBatchDetail.ACCT_BATCH_DETAIL_FILE).addListener(new BatchSequenceHandler(this.getRecord(AcctBatchDetail.ACCT_BATCH_DETAIL_FILE).getField(AcctBatchDetail.SEQUENCE), this.getRecord(AcctBatch.ACCT_BATCH_FILE).getField(AcctBatch.NEXT_SEQUENCE), this.getRecord(AcctBatch.ACCT_BATCH_FILE).getField(AcctBatch.BALANCE))); this.getMainRecord().addListener(new AcctBatchValidateBeh(null)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getRecord(Mco.MCO_FILE).getField(Mco.ID).addListener(new FieldReSelectHandler(this)); this.getRecord(McoBatchDist.MCO_BATCH_DIST_FILE).addListener(new SubCountHandler(this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE), McoBatchDist.AMOUNT, false, true)); this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE).addListener(new CalcBalanceHandler(this.getScreenRecord().getField(CashBatchScreenRecord.END_BALANCE), this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE), this.getRecord(Mco.MCO_FILE).getField(Mco.NET), true)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getMainRecord().addListener(new SubFileFilter(this.getHeaderRecord())); this.getRecord(CashBatchDist.CASH_BATCH_DIST_FILE).addListener(new SubCountHandler(this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE), CashBatchDist.AMOUNT, false, true)); this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE).addListener(new CalcBalanceHandler(this.getScreenRecord().getField(CashBatchScreenRecord.END_BALANCE), this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE), this.getRecord(CashBatchDetail.CASH_BATCH_DETAIL_FILE).getField(CashBatchDetail.AMOUNT), true)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getMainRecord().addListener(new SubFileFilter(this.getHeaderRecord())); this.getRecord(McoBatchDist.MCO_BATCH_DIST_FILE).addListener(new SubCountHandler(this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE), Mco.NET, false, true)); this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE).addListener(new CalcBalanceHandler(this.getScreenRecord().getField(CashBatchScreenRecord.END_BALANCE), this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE), this.getRecord(Mco.MCO_FILE).getField(Mco.NET), true)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getMainRecord().addListener(new SubFileFilter(this.getHeaderRecord())); this.getRecord(CreditCardBatchDist.CREDIT_CARD_BATCH_DIST_FILE).addListener(new SubCountHandler(this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE), CreditCard.NET, false, true)); this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE).addListener(new CalcBalanceHandler(this.getScreenRecord().getField(CashBatchScreenRecord.END_BALANCE), this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE), this.getRecord(CreditCard.CREDIT_CARD_FILE).getField(CreditCard.NET), true)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getRecord(CreditCard.CREDIT_CARD_FILE).getField(CreditCard.ID).addListener(new FieldReSelectHandler(this)); this.getRecord(CreditCardBatchDist.CREDIT_CARD_BATCH_DIST_FILE).addListener(new SubCountHandler(this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE), CreditCardBatchDist.AMOUNT, false, true)); this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE).addListener(new CalcBalanceHandler(this.getScreenRecord().getField(CashBatchScreenRecord.END_BALANCE), this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE), this.getRecord(CreditCard.CREDIT_CARD_FILE).getField(CreditCard.NET), true)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getRecord(CashBatchDetail.CASH_BATCH_DETAIL_FILE).getField(CashBatchDetail.ID).addListener(new FieldReSelectHandler(this)); this.getRecord(CashBatchDist.CASH_BATCH_DIST_FILE).addListener(new SubCountHandler(this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE), CashBatchDist.AMOUNT, false, true)); this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE).addListener(new CalcBalanceHandler(this.getScreenRecord().getField(CashBatchScreenRecord.END_BALANCE), this.getScreenRecord().getField(CashBatchScreenRecord.CHANGE_BALANCE), this.getRecord(CashBatchDetail.CASH_BATCH_DETAIL_FILE).getField(CashBatchDetail.AMOUNT), true)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getRecord(AcctBatch.ACCT_BATCH_FILE).getField(AcctBatch.ID).addListener(new FieldReSelectHandler(this)); this.getRecord(AcctBatchDetail.ACCT_BATCH_DETAIL_FILE).addListener(new SubCountHandler(this.getRecord(AcctBatch.ACCT_BATCH_FILE).getField(AcctBatch.BALANCE), AcctBatchDetail.AMOUNT, false, true)); this.getRecord(AcctBatchDetail.ACCT_BATCH_DETAIL_FILE).addListener(new BatchSequenceHandler(this.getRecord(AcctBatchDetail.ACCT_BATCH_DETAIL_FILE).getField(AcctBatchDetail.SEQUENCE), this.getRecord(AcctBatch.ACCT_BATCH_FILE).getField(AcctBatch.NEXT_SEQUENCE), this.getRecord(AcctBatch.ACCT_BATCH_FILE).getField(AcctBatch.BALANCE))); this.getMainRecord().addListener(new AcctBatchValidateBeh(null)); } /**
/** * Add the booking detail behaviors. */ public void addDetailBehaviors(Rec recBooking) { this.addListener(new SubFileFilter((Record)recBooking, true)); this.addListener(new InitArTrxHandler((Record)recBooking)); if (this.getRecordOwner() instanceof GridScreenParent) ((BaseField)recBooking.getField(BookingModel.ID)).addListener(new FieldReSelectHandler((GridScreenParent)this.getRecordOwner())); if (recBooking != null) { // Sub counts must be first. this.addListener(new SubCountHandler((BaseField)recBooking.getField(BookingModel.BALANCE), ArTrx.AMOUNT, true, true)); this.addListener(new ArTrxInvoiceSubCountHandler(null, ArTrx.AMOUNT, true, true)); } this.addListener(new CheckBookingStatusHandler((BookingModel)recBooking)); this.addListener(new UpdateArTrxAcctDetailHandler((Record)recBooking)); } /**