/** * Set up the default control for this field (an SEditText). * @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 ScreenField setupDefaultView(ScreenLocation itsLocation, BasePanel targetScreen, Converter converter, int iDisplayFieldDesc) { return new SEditText(itsLocation, targetScreen, converter, iDisplayFieldDesc); } }
/** * Set up the default control for this field (an SEditText). * @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 ScreenField setupDefaultView(ScreenLocation itsLocation, BasePanel targetScreen, Converter converter, int iDisplayFieldDesc) { return new SEditText(itsLocation, targetScreen, converter, iDisplayFieldDesc); } }
/** * Set up this default screen field (default = set them all up for the current record). * @param converter The converter to creat a default screen field for. */ public Object addColumn(Converter converter) { return new SEditText(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), this, converter, ScreenConstants.DEFAULT_DISPLAY); } /**
/** * Set up this default screen field (default = set them all up for the current record). * @param converter The converter to creat a default screen field for. */ public Object addColumn(Converter converter) { return new SEditText(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), this, converter, 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). * @return Return the component or ScreenField that is created for this field. */ public ScreenField setupDefaultView(ScreenLocation itsLocation, BasePanel targetScreen, Converter converter, int iDisplayFieldDesc) // Add this view to the list { ScreenField screenField = null; if (targetScreen instanceof GridScreen) screenField = new SEditText(itsLocation, targetScreen, converter, iDisplayFieldDesc); else screenField = new STEView(itsLocation, targetScreen, converter, iDisplayFieldDesc); return screenField; } /**
/** * Set up the default 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 iDisplayFieldDesc Display the label? (optional). * @return Return the component or ScreenField that is created for this field. */ public ScreenField setupDefaultView(ScreenLocation itsLocation, BasePanel targetScreen, Converter converter, int iDisplayFieldDesc) // Add this view to the list { ScreenField screenField = null; if (targetScreen instanceof GridScreen) screenField = new SEditText(itsLocation, targetScreen, converter, iDisplayFieldDesc); else screenField = new SHtmlView(itsLocation, targetScreen, converter, iDisplayFieldDesc); return screenField; } }
/** * Set up the default 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 iDisplayFieldDesc Display the label? (optional). * @return Return the component or ScreenField that is created for this field. */ public ScreenField setupDefaultView(ScreenLocation itsLocation, BasePanel targetScreen, Converter converter, int iDisplayFieldDesc) // Add this view to the list { ScreenField screenField = null; if (targetScreen instanceof GridScreen) screenField = new SEditText(itsLocation, targetScreen, converter, iDisplayFieldDesc); else screenField = new SHtmlView(itsLocation, targetScreen, converter, iDisplayFieldDesc); 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 ScreenField setupDefaultView(ScreenLocation itsLocation, BasePanel targetScreen, Converter converter, int iDisplayFieldDesc) // Add this view to the list { ScreenField screenField = null; if (targetScreen instanceof GridScreen) screenField = new SEditText(itsLocation, targetScreen, converter, iDisplayFieldDesc); else screenField = new STEView(itsLocation, targetScreen, converter, iDisplayFieldDesc); 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 ScreenField setupDefaultView(ScreenLocation itsLocation, BasePanel targetScreen, Converter converter, int iDisplayFieldDesc) // Add this view to the list { ScreenField screenField = null; if (converter.getMaxLength() <= ScreenConstants.kMaxEditLineChars) screenField = new SEditText(itsLocation, targetScreen, converter, iDisplayFieldDesc); else { if (targetScreen instanceof GridScreen) screenField = new SEditText(itsLocation, targetScreen, converter, iDisplayFieldDesc); else screenField = new STEView(itsLocation, targetScreen, this, iDisplayFieldDesc); } return screenField; } /**
/** * Set up the screen fields (default = set them all up for the current record). * @param converter The converter to creat a default screen field for. . */ public Object addColumn(Converter converter) { if (converter.getField() instanceof ReferenceField) return new SEditText(this.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.SET_ANCHOR), this, converter, ScreenConstants.DEFAULT_DISPLAY); else return super.addColumn(converter); } /**
/** * Set up the screen fields (default = set them all up for the current record). * @param converter The converter to creat a default screen field for. . */ public Object addColumn(Converter converter) { if (converter.getField() instanceof ReferenceField) return new SEditText(this.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.SET_ANCHOR), this, converter, ScreenConstants.DEFAULT_DISPLAY); else return super.addColumn(converter); } /**
/** * AddColumn Method. */ public Object addColumn(Converter converter) { if (converter.getField() instanceof ReferenceField) return new SEditText(this.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.SET_ANCHOR), this, converter, ScreenConstants.DEFAULT_DISPLAY); else return converter.setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), this, ScreenConstants.DEFAULT_DISPLAY); } /**
/** * AddColumn Method. */ public Object addColumn(Converter converter) { if (converter.getField() instanceof ReferenceField) return new SEditText(this.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.SET_ANCHOR), this, converter, ScreenConstants.DEFAULT_DISPLAY); else return converter.setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), 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). * @return Return the component or ScreenField that is created for this field. */ public ScreenField setupDefaultView(ScreenLocation itsLocation, BasePanel targetScreen, Converter converter, int iDisplayFieldDesc) { converter = new PropertiesConverter(converter, "value"); converter = new RsaEncryptedConverter(converter); converter = new FieldLengthConverter(converter, m_iFakeFieldLength); converter = new RsaPropertyConverter(converter); ScreenField screenField = new SEditText(itsLocation, targetScreen, converter, iDisplayFieldDesc); 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 ScreenField setupDefaultView(ScreenLocation itsLocation, BasePanel targetScreen, Converter converter, int iDisplayFieldDesc) { converter = new PropertiesConverter(converter, "value"); converter = new RsaEncryptedConverter(converter); converter = new FieldLengthConverter(converter, m_iFakeFieldLength); converter = new RsaPropertyConverter(converter); ScreenField screenField = new SEditText(itsLocation, targetScreen, converter, iDisplayFieldDesc); return screenField; } /**
/** * Set up the default 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 iDisplayFieldDesc Display the label? (optional). * @return Return the component or ScreenField that is created for this field. */ public ScreenField setupDefaultView(ScreenLocation itsLocation, BasePanel targetScreen, Converter converter, int iDisplayFieldDesc) // Add this view to the list { ScreenField sField = null; BaseField field = (BaseField)this.getField(); if (field != null) { sField = field.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc); if (sField != null) if (sField.getConverter() == null) sField.setConverter(this); } else sField = new SEditText(itsLocation, targetScreen, converter, iDisplayFieldDesc); return sField; } }
/** * Set up the default 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 iDisplayFieldDesc Display the label? (optional). * @return Return the component or ScreenField that is created for this field. */ public ScreenField setupDefaultView(ScreenLocation itsLocation, BasePanel targetScreen, Converter converter, int iDisplayFieldDesc) // Add this view to the list { ScreenField sField = null; BaseField field = (BaseField)this.getField(); if (field != null) { sField = field.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc); if (sField != null) if (sField.getConverter() == null) sField.setConverter(this); } else sField = new SEditText(itsLocation, targetScreen, converter, iDisplayFieldDesc); return sField; } }
/** * SetupSFields Method. */ public void setupSFields() { this.getRecord(BookingPax.BOOKING_PAX_FILE).getField(BookingPax.PAX_CATEGORY_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); FirstMLastConverter converter = new FirstMLastConverter(this.getRecord(BookingPax.BOOKING_PAX_FILE), BookingPax.NAME_PREFIX, BookingPax.FIRST_NAME, BookingPax.MIDDLE_NAME, BookingPax.SUR_NAME); new SEditText(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, converter, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(BookingPax.BOOKING_PAX_FILE).getField(BookingPax.SMOKER).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); }
/** * Set up all the screen fields. */ public void setupSFields() { this.getRecord(Currencys.CURRENCYS_FILE).getField(Currencys.CURRENCY_CODE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(Currencys.CURRENCYS_FILE).getField(Currencys.DESCRIPTION).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); Record query = this.getMainRecord(); for (int fieldSeq = query.getFieldSeq(Currencys.LAST_RATE); fieldSeq <= query.getFieldSeq(Currencys.LANGUAGE_ID); fieldSeq++) { query.getField(fieldSeq).setupFieldView(this); if ((fieldSeq == query.getFieldSeq(Currencys.LAST_RATE)) || (fieldSeq == query.getFieldSeq(Currencys.COSTING_RATE))) { ScreenLocation lastFieldPosition = this.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR); RecipFieldConverter converter = new RecipFieldConverter((NumberField)query.getField(fieldSeq)); SEditText nameView = new SEditText(lastFieldPosition, this, converter, ScreenConstants.DONT_DISPLAY_FIELD_DESC); } } }
/** * Set up all the screen fields. */ public void setupSFields() { FirstMLastConverter converter = new FirstMLastConverter(this.getRecord(BookingPax.BOOKING_PAX_FILE), BookingPax.NAME_PREFIX, BookingPax.FIRST_NAME, BookingPax.MIDDLE_NAME, BookingPax.SUR_NAME); new SEditText(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, converter, ScreenConstants.DISPLAY_FIELD_DESC); this.getRecord(BookingPax.BOOKING_PAX_FILE).getField(BookingPax.PAX_CATEGORY_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(BookingPax.BOOKING_PAX_FILE).getField(BookingPax.NAME_PREFIX).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(BookingPax.BOOKING_PAX_FILE).getField(BookingPax.FIRST_NAME).setupDefaultView(this.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), this, ScreenConstants.DONT_DISPLAY_FIELD_DESC); this.getRecord(BookingPax.BOOKING_PAX_FILE).getField(BookingPax.MIDDLE_NAME).setupDefaultView(this.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), this, ScreenConstants.DONT_DISPLAY_FIELD_DESC); this.getRecord(BookingPax.BOOKING_PAX_FILE).getField(BookingPax.SUR_NAME).setupDefaultView(this.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), this, ScreenConstants.DONT_DISPLAY_FIELD_DESC); this.getRecord(BookingPax.BOOKING_PAX_FILE).getField(BookingPax.DATE_OF_BIRTH).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(BookingPax.BOOKING_PAX_FILE).getField(BookingPax.GENDER).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(BookingPax.BOOKING_PAX_FILE).getField(BookingPax.SMOKER).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(BookingPax.BOOKING_PAX_FILE).getField(BookingPax.PROFILE_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(BookingPax.BOOKING_PAX_FILE).getField(BookingPax.COMMENTS).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.FILL_REMAINDER), this, ScreenConstants.DEFAULT_DISPLAY); }