/** * Free this converter. */ public void free() { super.free(); m_strTargetValue = null; m_fldTargetValue = null; } /**
/** * Constructor. * @param converter The next converter in the converter chain. * @param strAltDesc The description to use. */ public FieldDescConverter(Converter converter, String strAltDesc) { this(); this.init(converter, strAltDesc, null); } /**
/** * Initialize. * @param itsLocation The location of this component within the parent. * @param parentScreen The parent screen. * @param fieldConverter The field this screen field is linked to. * @param iDisplayFieldDesc Do I display the field desc? */ public void init(ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, String strValue, String strDesc, String strImage, String strCommand, String strToolTip) { m_strImageButton = strImage; // Image for this button m_strToolTip = strToolTip; Converter converter = null; if (strValue != null) converter = new CheckConverter(fieldConverter, strValue, strDesc, true); else if (strDesc != null) converter = new FieldDescConverter(fieldConverter, strDesc); if (converter != null) { if (fieldConverter == null) m_DependentConverter = converter; // Remember to remove this fieldConverter = converter; } super.init(itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc); } /**
/** * Initialize. * @param itsLocation The location of this component within the parent. * @param parentScreen The parent screen. * @param fieldConverter The field this screen field is linked to. * @param iDisplayFieldDesc Do I display the field desc? */ public void init(ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, String strValue, String strDesc, String strImage, String strCommand, String strToolTip) { m_strImageButton = strImage; // Image for this button m_strToolTip = strToolTip; Converter converter = null; if (strValue != null) converter = new CheckConverter(fieldConverter, strValue, strDesc, true); else if (strDesc != null) converter = new FieldDescConverter(fieldConverter, strDesc); if (converter != null) { if (fieldConverter == null) m_DependentConverter = converter; // Remember to remove this fieldConverter = converter; } super.init(itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc, null); } /**
String strWeek = this.getDateString(calendar.getTime(), DateFormat.DAY_OF_WEEK_FIELD); if (strWeek.length() > 0) dayConverter = new FieldDescConverter(dayConverter, strWeek.substring(0, 1)); int sBitPosition = this.getBitDayOfWeek(calendar); dayConverter = new BitConverter(dayConverter, sBitPosition, false, true);
/** * Constructor. * @param converter The next converter in the converter chain. * @param strAltDesc The description to use. */ public FieldDescConverter(Converter converter, String strAltDesc) { this(); this.init(converter, strAltDesc, null); } /**
/** * Free this converter. */ public void free() { super.free(); m_objTarget = null; } /**
String strWeek = this.getDateString(calendar.getTime(), DateFormat.DAY_OF_WEEK_FIELD); if (strWeek.length() > 0) dayConverter = new FieldDescConverter(dayConverter, strWeek.substring(0, 1)); int sBitPosition = this.getBitDayOfWeek(calendar); dayConverter = new BitConverter(dayConverter, sBitPosition, false, true);
/** * Constructor. * @param converter The next converter in the converter chain. * @param strAltDesc The description to use. */ public FieldDescConverter(Converter converter, String strAltDesc) { this(); this.init(converter, strAltDesc, null); } /**
/** * Free this converter. */ public void free() { super.free(); m_objTarget = null; } /**
/** * 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; } /**
/** * Constructor. * @param converter The next converter in the converter chain. * @param convDescField The converter to get the description from. */ public FieldDescConverter(Converter converter, Converter convDescField) { this(); this.init(converter, null, convDescField); } /**
/** * Free this converter. */ public void free() { super.free(); m_objTarget = null; } /**
/** * 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; } /**
/** * Constructor. * @param converter The next converter in the converter chain. * @param convDescField The converter to get the description from. */ public FieldDescConverter(Converter converter, Converter convDescField) { this(); this.init(converter, null, convDescField); } /**
/** * Free this converter. */ public void free() { super.free(); m_strTargetValue = null; m_fldTargetValue = null; } /**
Converter dayConverter = new FieldDescConverter((Converter)converter, "+" + Short.toString(sBitPosition)); dayConverter = new BitConverter(dayConverter, sBitPosition, false, true); ScreenLoc location = targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST_CHECKBOX, ScreenConstants.DONT_SET_ANCHOR);
/** * Constructor. * @param converter The next converter in the converter chain. * @param convDescField The converter to get the description from. */ public FieldDescConverter(Converter converter, Converter convDescField) { this(); this.init(converter, null, convDescField); } /**
/** * Free this converter. */ public void free() { super.free(); m_strTargetValue = null; m_fldTargetValue = null; } /**
Converter dayConverter = new FieldDescConverter((Converter)converter, "+" + Short.toString(sBitPosition)); dayConverter = new BitConverter(dayConverter, sBitPosition, false, true); ScreenLoc location = targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST_CHECKBOX, ScreenConstants.DONT_SET_ANCHOR);