/** * Set up the default control for this field (using default params). * @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout). * @return Return the component or ScreenField that is created for this field. */ public ScreenComponent setupFieldView(ComponentParent targetScreen) { return this.setupDefaultView(targetScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), targetScreen, ScreenConstants.DISPLAY_DESC); } /**
/** * Set up the default control for this field. * A SCannedBox for a query bitmap converter. * @param itsLocation Location of this component on screen (ie., GridBagConstraint). * @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout). * @param iDisplayFieldDesc Display the label? (optional). * @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) { properties = new HashMap<String,Object>(); properties.put(ScreenModel.COMMAND, MenuConstants.FORMLINK); properties.put(ScreenModel.IMAGE, MenuConstants.FORM); return BaseField.createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), 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). * @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 = super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc, properties); properties = new HashMap<String,Object>(); properties.put(ScreenModel.FIELD, this); properties.put(ScreenModel.COMMAND, ScreenModel.EMAIL); properties.put(ScreenModel.IMAGE, ScreenModel.EMAIL); ScreenComponent pSScreenField = createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, iDisplayFieldDesc, properties); pSScreenField.setRequestFocusEnabled(false); 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). * @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 = super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc, properties); properties = new HashMap<String,Object>(); properties.put(ScreenModel.FIELD, this); properties.put(ScreenModel.COMMAND, ScreenModel.PHONE); properties.put(ScreenModel.IMAGE, ScreenModel.PHONE); ScreenComponent pSScreenField = createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, iDisplayFieldDesc, properties); pSScreenField.setRequestFocusEnabled(false); 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). * @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 = createScreenComponent(ScreenModel.IMAGE_VIEW, itsLocation, targetScreen, converter, iDisplayFieldDesc, properties); properties = new HashMap<String,Object>(); properties.put(ScreenModel.FIELD, this); properties.put(ScreenModel.COMMAND, ScreenModel.OPEN); properties.put(ScreenModel.IMAGE, ScreenModel.OPEN); ScreenComponent pSScreenField = createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, iDisplayFieldDesc, properties); pSScreenField.setRequestFocusEnabled(false); 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). * @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 = super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc, properties); properties = new HashMap<String,Object>(); properties.put(ScreenModel.FIELD, this); properties.put(ScreenModel.COMMAND, ScreenModel.FAX); properties.put(ScreenModel.IMAGE, ScreenModel.FAX); ScreenComponent pSScreenField = createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, iDisplayFieldDesc, properties); pSScreenField.setRequestFocusEnabled(false); 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). * @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; screenField = super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc, properties); properties = new HashMap<String,Object>(); properties.put(ScreenModel.FIELD, this); properties.put(ScreenModel.COMMAND, ScreenModel.EDIT); properties.put(ScreenModel.IMAGE, ScreenModel.EDIT); ScreenComponent pSScreenField = createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, iDisplayFieldDesc, properties); pSScreenField.setRequestFocusEnabled(false); 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). * @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 (converter.getMaxLength() > ScreenConstants.MAX_SINGLE_CHARS) converter = new FieldLengthConverter((Converter)converter, ScreenConstants.MAX_SINGLE_CHARS); // Show as a single line. ScreenComponent sScreenField = super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc, properties); properties = new HashMap<String,Object>(); properties.put(ScreenModel.FIELD, this); properties.put(ScreenModel.COMMAND, ScreenModel.URL); properties.put(ScreenModel.IMAGE, ScreenModel.URL); ScreenComponent pSScreenField = createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, iDisplayFieldDesc, properties); pSScreenField.setRequestFocusEnabled(false); return sScreenField; } }
properties.put(ScreenModel.TOOLTIP, resources.getString(strKey + "Tip")); properties.put(ScreenModel.RECORD, recProfile); BaseField.createScreenComponent(ScreenModel.CANNED_BOX, toolbar.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.ANCHOR_DEFAULT), toolbar, null, ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties); properties.put(ScreenModel.IMAGE, Booking.BUTTON_LOCATION + "Passenger"); properties.put(ScreenModel.TOOLTIP, resources.getString(strKey + "Tip")); BaseField.createScreenComponent(ScreenModel.BUTTON_BOX, toolbar.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.ANCHOR_DEFAULT), toolbar, converter, ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties);
properties.put(ScreenModel.TOOLTIP, resources.getString(strKey + "Tip")); properties.put(ScreenModel.RECORD, recProfile); BaseField.createScreenComponent(ScreenModel.CANNED_BOX, toolbar.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.ANCHOR_DEFAULT), toolbar, null, ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties); properties.put(ScreenModel.IMAGE, Booking.BUTTON_LOCATION + "Passenger"); properties.put(ScreenModel.TOOLTIP, resources.getString(strKey + "Tip")); BaseField.createScreenComponent(ScreenModel.BUTTON_BOX, toolbar.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.ANCHOR_DEFAULT), toolbar, converter, ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties);
/** * Add icon to popup. */ public ScreenComponent setupPopupView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, boolean bIncludeBlankOption) { ScreenComponent screenField = null; Record record = this.makeReferenceRecord(); // Set up the listener to read the current record on a valid main record screenField = this.setupIconView(itsLocation, targetScreen, converter, iDisplayFieldDesc, bIncludeBlankOption); if ((!(targetScreen instanceof GridScreenParent)) && (iDisplayFieldDesc != ScreenConstants.DONT_DISPLAY_FIELD_DESC)) { // If it is not in a grid screen, add the description if (screenField != null) { itsLocation = targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR); iDisplayFieldDesc = ScreenConstants.DONT_DISPLAY_FIELD_DESC; } screenField = this.setupTablePopup(itsLocation, targetScreen, converter, iDisplayFieldDesc, record, -1, -1, bIncludeBlankOption, false); } 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; } /**
/** * 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; } /**
/** * Add the pax count screen fields to this toolbar. */ public void addToolbarFields(ComponentParent toolbar, Record recBooking) { Converter converter = null; converter = recBooking.getField(Booking.PAX); ScreenComponent sField = converter.setupDefaultView(toolbar.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.ANCHOR_DEFAULT), toolbar, ScreenConstants.DEFAULT_DISPLAY); sField.setEnabled(false); converter = recBooking.getField(Booking.SINGLE_PAX); sField = converter.setupDefaultView(toolbar.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar, ScreenConstants.DEFAULT_DISPLAY); sField.setEnabled(false); converter = new RoomConverter(recBooking.getField(Booking.DOUBLE_PAX), (short)2); sField = converter.setupDefaultView(toolbar.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar, ScreenConstants.DEFAULT_DISPLAY); sField.setEnabled(false); converter = new RoomConverter(recBooking.getField(Booking.TRIPLE_PAX), (short)3); sField = converter.setupDefaultView(toolbar.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar, ScreenConstants.DEFAULT_DISPLAY); sField.setEnabled(false); converter = new RoomConverter(recBooking.getField(Booking.QUAD_PAX), (short)4); sField = converter.setupDefaultView(toolbar.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar, ScreenConstants.DEFAULT_DISPLAY); sField.setEnabled(false); converter = recBooking.getField(Booking.CHILDREN); sField = converter.setupDefaultView(toolbar.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar, ScreenConstants.DEFAULT_DISPLAY); sField.setEnabled(false); } /**
/** * Add the pax count screen fields to this toolbar. */ public void addToolbarFields(ComponentParent toolbar, Record recBooking) { Converter converter = null; converter = recBooking.getField(Booking.PAX); ScreenComponent sField = converter.setupDefaultView(toolbar.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.ANCHOR_DEFAULT), toolbar, ScreenConstants.DEFAULT_DISPLAY); sField.setEnabled(false); converter = recBooking.getField(Booking.SINGLE_PAX); sField = converter.setupDefaultView(toolbar.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar, ScreenConstants.DEFAULT_DISPLAY); sField.setEnabled(false); converter = new RoomConverter(recBooking.getField(Booking.DOUBLE_PAX), (short)2); sField = converter.setupDefaultView(toolbar.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar, ScreenConstants.DEFAULT_DISPLAY); sField.setEnabled(false); converter = new RoomConverter(recBooking.getField(Booking.TRIPLE_PAX), (short)3); sField = converter.setupDefaultView(toolbar.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar, ScreenConstants.DEFAULT_DISPLAY); sField.setEnabled(false); converter = new RoomConverter(recBooking.getField(Booking.QUAD_PAX), (short)4); sField = converter.setupDefaultView(toolbar.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar, ScreenConstants.DEFAULT_DISPLAY); sField.setEnabled(false); converter = recBooking.getField(Booking.CHILDREN); sField = converter.setupDefaultView(toolbar.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar, ScreenConstants.DEFAULT_DISPLAY); sField.setEnabled(false); } /**
/** * 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) { UserInfo user = (UserInfo)this.makeReferenceRecord(); user.addListener(new StringSubFileFilter(Integer.toString(UserGroup.RES_USER), user.getField(UserInfo.USER_GROUP_ID), null, null, null, null)); Converter convName = new FirstMLastConverter(user, null, UserInfo.FIRST_NAME, null, UserInfo.LAST_NAME); ScreenComponent screenField = this.setupTableLookup(itsLocation, targetScreen, converter, iDisplayFieldDesc, user, UserInfo.USER_NAME_KEY, convName, true, false); properties = new HashMap<String,Object>(); properties.put(ScreenModel.FIELD, this); properties.put(ScreenModel.TOOLTIP, ThinMenuConstants.HOME); String userID = ((BaseApplication)this.getRecord().getRecordOwner().getTask().getApplication()).getUserID(); properties.put(ScreenModel.VALUE, userID); properties.put(ScreenModel.IMAGE, ThinMenuConstants.HOME); createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties); 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) { 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); }
properties.put(ScreenModel.COMMAND, MenuConstants.FORMDETAIL); properties.put(ScreenModel.IMAGE, MenuConstants.FORMDETAIL); BaseField.createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, null, ScreenConstants.DEFAULT_DISPLAY, properties); ((BaseField)this.getField()).addListener(new ReferenceChangedHandler(this));
/** * 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; }