/** * Initialize class fields. */ public void init(Converter converter, BaseField fldTargetValue, String strAltFieldDesc, boolean bTrueIfMatch) { super.init(converter, null, fldTargetValue, strAltFieldDesc, bTrueIfMatch, null); } /**
/** * Get the on/off state of this radio control. * @return true if the target string is in the field. */ public boolean getState() { boolean bReturnValue; if (m_strTargetValue != null) { if (m_boolMaskValue.booleanValue()) bReturnValue = (this.getString().indexOf(m_strTargetValue) != -1); // Is the target value in the field string else bReturnValue = m_strTargetValue.equals(this.toString()); // Is the target value in the field string } else if (m_fldTargetValue != null) bReturnValue = this.equals(m_fldTargetValue); // Is the target value in the field string else bReturnValue = this.getField().isNull(); // Is the field string null? if (m_bTrueIfMatch) return bReturnValue; else return !bReturnValue; } /**
/** * 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 fieldString = this.getString(); if (m_boolMaskValue.booleanValue()) return this.setString(fieldString, bDisplayOption, iMoveMode); return ((BaseField)this.getField()).moveFieldToThis(m_fldTargetValue, bDisplayOption, iMoveMode); else return ((BaseField)this.getField()).setString(null); // Unchecked = clear it. return ((BaseField)this.getField()).setString(null); else return DBConstants.NORMAL_RETURN; //?
/** * Set the state of this field for binary fields (don't override this). * Usually overidden. * @param bState the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code. */ public int setState(boolean bState, boolean bDisplayOption, int iMoveMode) { int iErrorCode = super.setState(bState, bDisplayOption, iMoveMode); if (iErrorCode == DBConstants.NORMAL_RETURN) if (bState == true) if (this.getState() == false) ((BaseField)this.getField()).moveFieldToThis(((BaseField)this.getField()).getRecord().getField(ApTrx.INVOICE_BALANCE)); return iErrorCode; }
/** * 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); } /**
String fieldString = this.getString(); if (m_boolMaskValue.booleanValue()) return this.setString(fieldString, bDisplayOption, iMoveMode); return ((BaseField)this.getField()).moveFieldToThis(m_fldTargetValue, bDisplayOption, iMoveMode); else return ((BaseField)this.getField()).setString(null); // Unchecked = clear it. return ((BaseField)this.getField()).setString(null); else return DBConstants.NORMAL_RETURN; //?
/** * Set the state of this field for binary fields (don't override this). * Usually overidden. * @param bState the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code. */ public int setState(boolean bState, boolean bDisplayOption, int iMoveMode) { int iErrorCode = super.setState(bState, bDisplayOption, iMoveMode); if (iErrorCode == DBConstants.NORMAL_RETURN) if (bState == true) if (this.getState() == false) ((BaseField)this.getField()).moveFieldToThis(((BaseField)this.getField()).getRecord().getField(TicketTrx.OVERRIDE_AMOUNT)); return iErrorCode; }
/** * Constructor. * @param converter The target converter to set to this string. * @param fldTargetValue The string to set this field if set to true. * @param strAltFieldDesc An alternate description to display. * @param bTrueIfMatch If true, set to the alternate value. */ public CheckConverter(Converter converter, BaseField fldTargetValue, String strAltFieldDesc, boolean bTrueIfMatch) { this(); this.init(converter, null, fldTargetValue, strAltFieldDesc, bTrueIfMatch, null); } /**
/** * SetupSFields Method. */ public void setupSFields() { this.getRecord(MessageDetail.kMessageDetailFile).getField(MessageDetail.kMessageProcessInfoID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); Converter convDefaultTransport = new CheckConverter(this.getRecord(MessageDetail.kMessageDetailFile).getField(MessageDetail.kDefaultMessageTransportID), this.getRecord(MessageDetail.kMessageDetailFile).getField(MessageDetail.kMessageTransportID), null, true); convDefaultTransport.setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(MessageDetail.kMessageDetailFile).getField(MessageDetail.kMessageTransportID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); } /**
/** * Get the on/off state of this radio control. * @return true if the target string is in the field. */ public boolean getState() { boolean bReturnValue; if (m_strTargetValue != null) { if (m_boolMaskValue.booleanValue()) bReturnValue = (this.getString().indexOf(m_strTargetValue) != -1); // Is the target value in the field string else bReturnValue = m_strTargetValue.equals(this.toString()); // Is the target value in the field string } else if (m_fldTargetValue != null) bReturnValue = this.equals(m_fldTargetValue); // Is the target value in the field string else bReturnValue = this.getField().isNull(); // Is the field string null? if (m_bTrueIfMatch) return bReturnValue; else return !bReturnValue; } /**
String fieldString = this.getString(); if (m_boolMaskValue.booleanValue()) return this.setString(fieldString, bDisplayOption, iMoveMode); return ((BaseField)this.getField()).moveFieldToThis(m_fldTargetValue, bDisplayOption, iMoveMode); else return ((BaseField)this.getField()).setString(null); // Unchecked = clear it. return ((BaseField)this.getField()).setString(null); else return DBConstants.NORMAL_RETURN; //?
/** * Set the state of this field for binary fields (don't override this). * Usually overidden. * @param bState the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code. */ public int setState(boolean bState, boolean bDisplayOption, int iMoveMode) { int iErrorCode = super.setState(bState, bDisplayOption, iMoveMode); if (iErrorCode == DBConstants.NORMAL_RETURN) if (bState == true) if (this.getState() == false) ((BaseField)this.getField()).moveFieldToThis(((BaseField)this.getField()).getRecord().getField(ApTrx.INVOICE_BALANCE)); return iErrorCode; }
/** * Initialize class fields. */ public void init(Converter field, String strTargetValue, String strAltFieldDesc, boolean bTrueIfMatch) { super.init(field, strTargetValue, null, strAltFieldDesc, bTrueIfMatch, null); } /**
Converter converterNotInfoManualTransport = new CheckConverter(this.getField(BookingDetail.INFO_MESSAGE_TRANSPORT_ID), strManualTransportID, null, false); Converter converterNotCostManualTransport = new CheckConverter(this.getField(BookingDetail.COST_MESSAGE_TRANSPORT_ID), strManualTransportID, null, false); Converter converterNotInventoryManualTransport = new CheckConverter(this.getField(BookingDetail.INVENTORY_MESSAGE_TRANSPORT_ID), strManualTransportID, null, false); Converter converterNotProductManualTransport = new CheckConverter(this.getField(BookingDetail.PRODUCT_MESSAGE_TRANSPORT_ID), strManualTransportID, null, false);
/** * Get the on/off state of this radio control. * @return true if the target string is in the field. */ public boolean getState() { boolean bReturnValue; if (m_strTargetValue != null) { if (m_boolMaskValue.booleanValue()) bReturnValue = (this.getString().indexOf(m_strTargetValue) != -1); // Is the target value in the field string else bReturnValue = m_strTargetValue.equals(this.toString()); // Is the target value in the field string } else if (m_fldTargetValue != null) bReturnValue = this.equals(m_fldTargetValue); // Is the target value in the field string else bReturnValue = this.getField().isNull(); // Is the field string null? if (m_bTrueIfMatch) return bReturnValue; else return !bReturnValue; } /**
/** * Initialize class fields. */ public void init(Converter field, String strTargetValue, String strAltFieldDesc, boolean bTrueIfMatch) { super.init(field, strTargetValue, null, strAltFieldDesc, bTrueIfMatch, null); } /**
Converter converterNotInfoManualTransport = new CheckConverter(this.getField(BookingDetail.INFO_MESSAGE_TRANSPORT_ID), strManualTransportID, null, false); Converter converterNotCostManualTransport = new CheckConverter(this.getField(BookingDetail.COST_MESSAGE_TRANSPORT_ID), strManualTransportID, null, false); Converter converterNotInventoryManualTransport = new CheckConverter(this.getField(BookingDetail.INVENTORY_MESSAGE_TRANSPORT_ID), strManualTransportID, null, false); Converter converterNotProductManualTransport = new CheckConverter(this.getField(BookingDetail.PRODUCT_MESSAGE_TRANSPORT_ID), strManualTransportID, null, false);
/** * Initialize class fields. */ public void init(Converter field, String strTargetValue, String strAltFieldDesc, boolean bTrueIfMatch) { super.init(field, strTargetValue, null, strAltFieldDesc, bTrueIfMatch, null); } /**
String strAltFieldDesc = null; Converter checkConverter = new CheckConverter(this.getContactTypeField(), PROFILE_CONTACT_TYPE_ID, strAltFieldDesc, true); Converter convContactID = new FlagDepFieldConverter(m_recVendor.getField(Company.ID), m_recProfile.getField(Company.ID), checkConverter); this.addListener(listener = new MoveOnChangeHandler(convContactID)); listener.setRespondsToMode(DBConstants.READ_MOVE, true); checkConverter = new CheckConverter(this.getContactTypeField(), PROFILE_CONTACT_TYPE_ID, strAltFieldDesc, true); Converter conv = new FlagDepFieldConverter(m_recVendor.getField(Company.CODE), m_recProfile.getField(Company.CODE), checkConverter); conv = new FieldDescConverter(conv, this); // Use the description for this field screenField = createScreenComponent(ScreenModel.EDIT_TEXT, itsLocation, targetScreen, conv, iDisplayFieldDesc, properties); checkConverter = new CheckConverter(this.getContactTypeField(), PROFILE_CONTACT_TYPE_ID, strAltFieldDesc, true); itsLocation = targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR);