/** * Initialize class fields. */ public void init(BaseField fldToCheck, BaseField fldToCompare) { BaseField falseField = new BooleanField(null, "Name", 1, "Name", new Boolean(false)); super.init(null, null, null, ">", falseField, true, fldToCheck, fldToCompare); } /**
/** * 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() throws CloneNotSupportedException { BaseField field = new BooleanField(null, m_strFieldName, m_iMaxLength, m_strFieldDesc, null); field.setRecord(m_record); // Set table without adding to table field list return field; } /**
/** * 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() throws CloneNotSupportedException { BaseField field = new BooleanField(null, m_strFieldName, m_iMaxLength, m_strFieldDesc, null); field.setRecord(m_record); // Set table without adding to table field list return field; } /**
/** * 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() throws CloneNotSupportedException { BaseField field = new BooleanField(null, m_strFieldName, m_iMaxLength, m_strFieldDesc, null); field.setRecord(m_record); // Set table without adding to table field list return field; } /**
/** * Add this field in the Record's field sequence. */ public BaseField setupField(int iFieldSeq) { BaseField field = null; if (iFieldSeq == 0) field = new AcctBatchScreenRecord_UserID(this, USER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 1) field = new BooleanField(this, RECURRING, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false)); if (field == null) field = super.setupField(iFieldSeq); return field; }
/** * Add this field in the Record's field sequence. */ public BaseField setupField(int iFieldSeq) { BaseField field = null; if (iFieldSeq == 0) field = new TourEventScreenRecord_ActionCutoffDate(this, ACTION_CUTOFF_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 1) field = new BooleanField(this, BOOKING_UPDATE, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(true)); if (iFieldSeq == 2) field = new BooleanField(this, TOUR_UPDATE, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(true)); if (iFieldSeq == 3) field = new RunProcessInField(this, RUN_PROCESS_IN, Constants.DEFAULT_FIELD_LENGTH, null, null); if (field == null) field = super.setupField(iFieldSeq); return field; }
/** * Add this field in the Record's field sequence. */ public BaseField setupField(int iFieldSeq) { BaseField field = null; if (iFieldSeq == 0) field = new TourEventScreenRecord_ActionCutoffDate(this, ACTION_CUTOFF_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 1) field = new BooleanField(this, BOOKING_UPDATE, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(true)); if (iFieldSeq == 2) field = new BooleanField(this, TOUR_UPDATE, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(true)); if (iFieldSeq == 3) field = new RunProcessInField(this, RUN_PROCESS_IN, Constants.DEFAULT_FIELD_LENGTH, null, null); if (field == null) field = super.setupField(iFieldSeq); return field; }
/** * Add this field in the Record's field sequence. */ public BaseField setupField(int iFieldSeq) { BaseField field = null; if (iFieldSeq == 0) field = new BankAcctField(this, BANK_ACCT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 1) field = new FullCurrencyField(this, REQUEST_TOTAL, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 2) field = new BooleanField(this, MANUAL_CHECKS, Constants.DEFAULT_FIELD_LENGTH, null, null); if (field == null) field = super.setupField(iFieldSeq); return field; }
/** * Add this field in the Record's field sequence. */ public BaseField setupField(int iFieldSeq) { BaseField field = null; if (iFieldSeq == 0) field = new BankAcctField(this, BANK_ACCT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 1) field = new FullCurrencyField(this, REQUEST_TOTAL, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 2) field = new BooleanField(this, MANUAL_CHECKS, Constants.DEFAULT_FIELD_LENGTH, null, null); if (field == null) field = super.setupField(iFieldSeq); return field; }
/** * Add this field in the Record's field sequence. */ public BaseField setupField(int iFieldSeq) { BaseField field = null; //if (iFieldSeq == 0) // field = new CurrencyField(this, PP_COST_LOCAL, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 1) field = new CurrencyField(this, SIC_COST_LOCAL, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 2) field = new CurrencyField(this, PMC_COST_LOCAL, Constants.DEFAULT_FIELD_LENGTH, null, null); //if (iFieldSeq == 3) // field = new StringField(this, MARKUP_FROM_LAST, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 4) field = new BooleanField(this, LAND_INFO_FLAG, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 5) field = new ShortField(this, VARY_QTY, Constants.DEFAULT_FIELD_LENGTH, null, null); if (field == null) field = super.setupField(iFieldSeq); return field; }
/** * Add this field in the Record's field sequence. */ public BaseField setupField(int iFieldSeq) { BaseField field = null; if (iFieldSeq == 0) field = new SendViaFilter(this, SEND_VIA_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 1) field = new DateTimeField(this, RESTORE_FROM_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 2) field = new StringField(this, STYLESHEET, 127, null, null); if (iFieldSeq == 3) field = new StringField(this, FULL_ADDRESS, 255, null, null); if (iFieldSeq == 4) field = new StringField(this, REQUEST_TEXT, 255, null, null); if (iFieldSeq == 5) field = new BooleanField(this, TRUE_FIELD, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(true)); if (iFieldSeq == 6) field = new StringField(this, TEMPLATE, 40, null, "tour/labels"); if (field == null) field = super.setupField(iFieldSeq); return field; }
/** * Add this field in the Record's field sequence. */ public BaseField setupField(int iFieldSeq) { BaseField field = null; if (iFieldSeq == 0) field = new SendViaFilter(this, SEND_VIA_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 1) field = new DateTimeField(this, RESTORE_FROM_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 2) field = new StringField(this, STYLESHEET, 127, null, null); if (iFieldSeq == 3) field = new StringField(this, FULL_ADDRESS, 255, null, null); if (iFieldSeq == 4) field = new StringField(this, REQUEST_TEXT, 255, null, null); if (iFieldSeq == 5) field = new BooleanField(this, TRUE_FIELD, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(true)); if (iFieldSeq == 6) field = new StringField(this, TEMPLATE, 40, null, "tour/labels"); if (field == null) field = super.setupField(iFieldSeq); return field; }
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getMainRecord().setKeyArea(CalendarEntry.kStartDateTimeKey); BaseField fieldTrue = new BooleanField(null, "FalseField", DBConstants.DEFAULT_FIELD_LENGTH, "FalseField", null); fieldTrue.setState(true); this.getMainRecord().addListener(new FreeOnFreeHandler(fieldTrue)); //+this.getMainRecord().addListener(new CompareFileFilter(CalendarEntry.kHidden, fieldTrue, "<>", null, true)); this.setEditing(true); } /**
/** * Add this field in the Record's field sequence. */ public BaseField setupField(int iFieldSeq) { BaseField field = null; if (iFieldSeq == 0) field = new AccountField(this, ACCOUNT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 1) field = new BooleanField(this, CALC_START, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 2) field = new DateField(this, START_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 3) field = new DateField(this, END_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 4) field = new CurrencyField(this, START_BALANCE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 5) field = new CurrencyField(this, END_BALANCE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 6) field = new CurrencyField(this, CHANGE_BALANCE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (field == null) field = super.setupField(iFieldSeq); return field; }
/** * AddProductTypeFilter Method. */ public void addProductTypeFilter(ReferenceField field) { Record recProductSearchType = field.getReferenceRecord(); String strProductType = this.getHeaderRecord().getTableNames(false); BaseField fldToCheck = recProductSearchType.getField(strProductType); BaseField fldToCompare = new BooleanField(null, "TrueField", -1, null, null); fldToCompare.setState(true); recProductSearchType.addListener(new FreeOnFreeHandler(fldToCompare)); recProductSearchType.addListener(new CompareFileFilter(fldToCheck, fldToCompare, DBConstants.EQUALS)); } /**
/** * AddProductTypeFilter Method. */ public void addProductTypeFilter(ReferenceField field) { Record recProductSearchType = field.getReferenceRecord(); String strProductType = this.getHeaderRecord().getTableNames(false); BaseField fldToCheck = recProductSearchType.getField(strProductType); BaseField fldToCompare = new BooleanField(null, "TrueField", -1, null, null); fldToCompare.setState(true); recProductSearchType.addListener(new FreeOnFreeHandler(fldToCompare)); recProductSearchType.addListener(new CompareFileFilter(fldToCheck, fldToCompare, DBConstants.EQUALS)); } /**
/** * AddProductTypeFilter Method. */ public void addProductTypeFilter(ReferenceField field) { Record recProductSearchType = field.getReferenceRecord(); String strProductType = this.getHeaderRecord().getTableNames(false); BaseField fldToCheck = recProductSearchType.getField(strProductType); BaseField fldToCompare = new BooleanField(null, "TrueField", -1, null, null); fldToCompare.setState(true); recProductSearchType.addListener(new FreeOnFreeHandler(fldToCompare)); recProductSearchType.addListener(new CompareFileFilter(fldToCheck, fldToCompare, DBConstants.EQUALS)); } /**
/** * AddProductTypeFilter Method. */ public void addProductTypeFilter(ReferenceField field) { Record recProductSearchType = field.getReferenceRecord(); String strProductType = this.getHeaderRecord().getTableNames(false); BaseField fldToCheck = recProductSearchType.getField(strProductType); BaseField fldToCompare = new BooleanField(null, "TrueField", -1, null, null); fldToCompare.setState(true); recProductSearchType.addListener(new FreeOnFreeHandler(fldToCompare)); recProductSearchType.addListener(new CompareFileFilter(fldToCheck, fldToCompare, DBConstants.EQUALS)); } /**
/** * 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.getMainRecord().getField(BookingAnswer.DESCRIPTION).setEnabled(false); Record recTourHeader = this.getRecord(TourHeader.TOUR_HEADER_FILE); Record recBooking = this.getRecord(Booking.BOOKING_FILE); m_fldModuleStart.setString(m_strModuleStartDate); this.getMainRecord().setKeyArea(BookingAnswer.BOOKING_ID_KEY); this.getMainRecord().addListener(new SubFileFilter(recBooking.getField(Booking.ID), BookingAnswer.BOOKING_ID, m_recBookingPax.getField(BookingPax.ID), BookingAnswer.BOOKING_PAX_ID, recTourHeader.getField(TourHeader.ID), BookingAnswer.MODULE_ID)); this.getMainRecord().addListener(new StringSubFileFilter(m_strTourOrOption, BookingAnswer.TOUR_OR_OPTION, m_strTourOrOptionID, BookingAnswer.TOUR_OR_OPTION_ID, null, null)); this.getMainRecord().addListener(new SubFileFilter(m_fldModuleStart, BookingAnswer.MODULE_START_DATE, null, null, null, null)); BooleanField fldTrue = new BooleanField(null, DBConstants.BLANK, DBConstants.DEFAULT_FIELD_LENGTH, DBConstants.BLANK, null); fldTrue.setState(true); this.getMainRecord().addListener(new FreeOnFreeHandler(fldTrue)); this.getMainRecord().addListener(new CompareFileFilter(BookingAnswer.ASK_FOR_ANSWER, fldTrue, DBConstants.EQUALS, null, false)); this.setAppending(false); this.getMainRecord().getField(BookingAnswer.SELECTED).addListener(new BookingAnswerSelectHandler(null)); } /**