/** * For binary fields, set the current state. * @param state The state to set this field. * @param bDisplayOption Display changed fields if true. * @param iMoveMode The move mode. * @return The error code (or NORMAL_RETURN). */ public int setState(boolean state, boolean bDisplayOption, int moveMode) { double value = 0; if (state) value = 1; return this.setValue(value, bDisplayOption, moveMode); // Move value to this field } /**
/** * For binary fields, set the current state. * @param state The state to set this field. * @param bDisplayOption Display changed fields if true. * @param iMoveMode The move mode. * @return The error code (or NORMAL_RETURN). */ public int setState(boolean state, boolean bDisplayOption, int moveMode) { double value = 0; if (state) value = 1; return this.setValue(value, bDisplayOption, moveMode); // Move value to this field } /**
/** * For binary fields, set the current state. * @param state The state to set this field. * @param bDisplayOption Display changed fields if true. * @param iMoveMode The move mode. * @return The error code (or NORMAL_RETURN). */ public int setState(boolean state, boolean bDisplayOption, int moveMode) { double value = 0; if (state) value = 1; return this.setValue(value, bDisplayOption, moveMode); // Move value to this field } /**
/** * Convert the display's index to the field value and move to field. * @param index The index to convert an set this field to. * @param bDisplayOption If true, display the change in the converters. * @param iMoveMove The type of move. */ public int convertIndexToField(int index, boolean bDisplayOption, int iMoveMode) { return this.setValue(this.convertIndexToValue(index), bDisplayOption, iMoveMode); // Convert to value and move to this field } /**
/** * Convert the display's index to the field value and move to field. * @param index The index to convert an set this field to. * @param bDisplayOption If true, display the change in the converters. * @param iMoveMove The type of move. */ public int convertIndexToField(int index, boolean bDisplayOption, int iMoveMode) { return this.setValue(this.convertIndexToValue(index), bDisplayOption, iMoveMode); // Convert to value and move to this field } /**
/** * Convert the display's index to the field value and move to field. * @param index The index to convert an set this field to. * @param bDisplayOption If true, display the change in the converters. * @param iMoveMove The type of move. */ public int convertIndexToField(int index, boolean bDisplayOption, int iMoveMode) { return this.setValue(this.convertIndexToValue(index), bDisplayOption, iMoveMode); // Convert to value and move to this field } /**
/** * Called when a valid record is read from the table/query. * @param bDisplayOption If true, display any changes. */ public void doValidRecord(boolean bDisplayOption) { super.doValidRecord(bDisplayOption); double checkNo = 1234; ((NumberField)this.getOwner().getField(TimeTrx.PR_CHECK_NUM)).setValue(checkNo); checkNo++; ((TimeTrx)this.getOwner()).calcPay(m_QueryInfo, m_Employee, m_PrDedEarn, m_PrTaxRates, m_EmpControl); //? this.getOwner().UpdateQuery(); }
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); Vendor recVendor = (Vendor)this.getMainRecord(); Record recScreenRecord = this.getScreenRecord(); ((NumberField)recScreenRecord.getField(VendorScreenRecord.VENDOR_KEY)).setValue(0, DBConstants.DISPLAY, DBConstants.INIT_MOVE); recScreenRecord.getField(VendorScreenRecord.VENDOR_KEY).addListener(new RegisterValueHandler(null)); this.setEditing(false); SortOrderHandler keyBehavior = new SortOrderHandler(this); keyBehavior.setGridTable(Vendor.NAME_SORT_KEY, recVendor, 0); keyBehavior.setGridTable(Vendor.CODE_KEY, recVendor, 1); recScreenRecord.getField(VendorScreenRecord.VENDOR_KEY).addListener(keyBehavior); recVendor.addListener(new ExtractRangeFilter(Vendor.NAME_SORT, recScreenRecord.getField(VendorScreenRecord.VENDOR_NAME), ExtractRangeFilter.PAD_END_FIELD)); recVendor.addListener(new ExtractRangeFilter(Vendor.COUNTRY_ID, recScreenRecord.getField(VendorScreenRecord.VENDOR_COUNTRY), ExtractRangeFilter.PAD_END_FIELD)); recScreenRecord.getField(VendorScreenRecord.VENDOR_NAME).addListener(new FieldReSelectHandler(this)); recScreenRecord.getField(VendorScreenRecord.VENDOR_COUNTRY).addListener(new FieldReSelectHandler(this)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); Vendor recVendor = (Vendor)this.getMainRecord(); Record recScreenRecord = this.getScreenRecord(); ((NumberField)recScreenRecord.getField(VendorScreenRecord.VENDOR_KEY)).setValue(0, DBConstants.DISPLAY, DBConstants.INIT_MOVE); recScreenRecord.getField(VendorScreenRecord.VENDOR_KEY).addListener(new RegisterValueHandler(null)); this.setEditing(false); SortOrderHandler keyBehavior = new SortOrderHandler(this); keyBehavior.setGridTable(Vendor.NAME_SORT_KEY, recVendor, 0); keyBehavior.setGridTable(Vendor.CODE_KEY, recVendor, 1); recScreenRecord.getField(VendorScreenRecord.VENDOR_KEY).addListener(keyBehavior); recVendor.addListener(new ExtractRangeFilter(Vendor.NAME_SORT, recScreenRecord.getField(VendorScreenRecord.VENDOR_NAME), ExtractRangeFilter.PAD_END_FIELD)); recVendor.addListener(new ExtractRangeFilter(Vendor.COUNTRY_ID, recScreenRecord.getField(VendorScreenRecord.VENDOR_COUNTRY), ExtractRangeFilter.PAD_END_FIELD)); recScreenRecord.getField(VendorScreenRecord.VENDOR_NAME).addListener(new FieldReSelectHandler(this)); recScreenRecord.getField(VendorScreenRecord.VENDOR_COUNTRY).addListener(new FieldReSelectHandler(this)); } /**
Profile recProfile = (Profile)this.getMainRecord(); Record recScreenQuery = this.getScreenRecord(); ((NumberField)recScreenQuery.getField(ProfileScreenRecord.PROFILE_KEY)).setValue(0, DBConstants.DISPLAY, DBConstants.INIT_MOVE); recScreenQuery.getField(ProfileScreenRecord.PROFILE_KEY).addListener(new RegisterValueHandler(null)); this.setEditing(false);
((NumberField)screenQuery.getField(TourHeaderScreenRecord.KEY_ORDER)).setValue(0); FieldListener behCheckRange = new CheckRangeHandler(0, 2); screenQuery.getField(TourHeaderScreenRecord.KEY_ORDER).addListener(behCheckRange);
((NumberField)screenQuery.getField(TourHeaderScreenRecord.KEY_ORDER)).setValue(0); FieldListener behCheckRange = new CheckRangeHandler(0, 2); screenQuery.getField(TourHeaderScreenRecord.KEY_ORDER).addListener(behCheckRange);
((NumberField)screenRecord.getField(BookingScreenRecord.BK_SUB_SCREEN)).setValue(0); FieldListener behCheckRange = new CheckRangeHandler(0, 3); screenRecord.getField(BookingScreenRecord.BK_SUB_SCREEN).addListener(behCheckRange);
((NumberField)screenQuery.getField(LookupScreenRecord.QUERY_KEY)).setValue(0); FieldListener behCheckRange = new CheckRangeHandler(0, 2); screenQuery.getField(LookupScreenRecord.QUERY_KEY).addListener(behCheckRange);
((NumberField)screenRecord.getField(TourHeaderScreenRecord.KEY_ORDER)).setValue(0); FieldListener behCheckRange = new CheckRangeHandler(0, 2); screenRecord.getField(TourHeaderScreenRecord.KEY_ORDER).addListener(behCheckRange);
((NumberField)screenRecord.getField(TourHeaderScreenRecord.KEY_ORDER)).setValue(0); FieldListener behCheckRange = new CheckRangeHandler(0, 2); screenRecord.getField(TourHeaderScreenRecord.KEY_ORDER).addListener(behCheckRange);
((NumberField)screenRecord.getField(LookupScreenRecord.QUERY_KEY)).setValue(0); FieldListener behCheckRange = new CheckRangeHandler(-5, 5); screenRecord.getField(LookupScreenRecord.QUERY_KEY).addListener(behCheckRange);