/** * Creates a new object of the same class as this object. * @return a clone of this instance. * @exception CloneNotSupportedException if the object's class does not support the <code>Cloneable</code> interface. * @see java.lang.Cloneable */ public Object clone() throws CloneNotSupportedException { BaseField field = new PercentField(null, m_strFieldName, m_iMaxLength, m_strFieldDesc, null); field.setRecord(m_record); // Set table without adding to table field list return field; } /**
/** * Constructor. * @param record The parent record. * @param strName The field name. * @param iDataLength The maximum string length (pass -1 for default). * @param strDesc The string description (usually pass null, to use the resource file desc). * @param strDefault The default value (if object, this value is the default value, if string, the string is the default). */ public PercentField(Record record, String strName, int iDataLength, String strDesc, Object strDefault) { this(); this.init(record, strName, iDataLength, strDesc, strDefault); } /**
/** * Set up the default screen control for this field (using this PercentConverter). * @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. * For a Percent field, use PercentConverter. */ public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties) { FieldConverter percentConverter = new PercentConverter(this); return createScreenComponent(ScreenModel.NUMBER_TEXT, itsLocation, targetScreen, percentConverter, iDisplayFieldDesc, properties); } }
/** * Creates a new object of the same class as this object. * @return a clone of this instance. * @exception CloneNotSupportedException if the object's class does not support the <code>Cloneable</code> interface. * @see java.lang.Cloneable */ public Object clone() throws CloneNotSupportedException { BaseField field = new PercentField(null, m_strFieldName, m_iMaxLength, m_strFieldDesc, null); field.setRecord(m_record); // Set table without adding to table field list return field; } /**
/** * Constructor. * @param record The parent record. * @param strName The field name. * @param iDataLength The maximum string length (pass -1 for default). * @param strDesc The string description (usually pass null, to use the resource file desc). * @param strDefault The default value (if object, this value is the default value, if string, the string is the default). */ public PercentField(Record record, String strName, int iDataLength, String strDesc, Object strDefault) { this(); this.init(record, strName, iDataLength, strDesc, strDefault); } /**
/** * Creates a new object of the same class as this object. * @return a clone of this instance. * @exception CloneNotSupportedException if the object's class does not support the <code>Cloneable</code> interface. * @see java.lang.Cloneable */ public Object clone() throws CloneNotSupportedException { BaseField field = new PercentField(null, m_strFieldName, m_iMaxLength, m_strFieldDesc, null); field.setRecord(m_record); // Set table without adding to table field list return field; } /**
/** * Constructor. * @param record The parent record. * @param strName The field name. * @param iDataLength The maximum string length (pass -1 for default). * @param strDesc The string description (usually pass null, to use the resource file desc). * @param strDefault The default value (if object, this value is the default value, if string, the string is the default). */ public PercentField(Record record, String strName, int iDataLength, String strDesc, Object strDefault) { this(); this.init(record, strName, iDataLength, strDesc, strDefault); } /**
field = new StringField(this, DESCRIPTION, 20, null, null); if (iFieldSeq == 4) field = new PercentField(this, TAX_RATE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 5) field = new PercentField(this, SERVICE_CHARGE_RATE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 6) field = new PercentField(this, COMMISSION_RATE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (field == null) field = super.setupField(iFieldSeq);
field = new StringField(this, DESCRIPTION, 20, null, null); if (iFieldSeq == 4) field = new PercentField(this, TAX_RATE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 5) field = new PercentField(this, SERVICE_CHARGE_RATE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 6) field = new PercentField(this, COMMISSION_RATE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (field == null) field = super.setupField(iFieldSeq);
field = new BooleanField(this, CHECK_DEP, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(true)); if (iFieldSeq == 9) field = new PercentField(this, MCO_PER, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 10) field = new BooleanField(this, CHECK_FINAL, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(true));
field = new AccountField(this, MCO_SUSPENSE_ACCOUNT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 8) field = new PercentField(this, MCO_COMM_PER, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 9) field = new PercentField(this, MCO_SVC_PER, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 10) field = new PercentField(this, MCO_TAX_PER, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 11) field = new AccountField(this, NON_TOUR_ACCOUNT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); field = new AccountField(this, CREDIT_CARD_VAR_ACCOUNT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 19) field = new PercentField(this, CREDIT_CARD_SVC_PER, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 20) field = new AccountField(this, CREDIT_DEBIT_ACCOUNT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
field = new AccountField(this, MCO_SUSPENSE_ACCOUNT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 8) field = new PercentField(this, MCO_COMM_PER, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 9) field = new PercentField(this, MCO_SVC_PER, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 10) field = new PercentField(this, MCO_TAX_PER, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 11) field = new AccountField(this, NON_TOUR_ACCOUNT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); field = new AccountField(this, CREDIT_CARD_VAR_ACCOUNT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 19) field = new PercentField(this, CREDIT_CARD_SVC_PER, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 20) field = new AccountField(this, CREDIT_DEBIT_ACCOUNT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
field = new BooleanField(this, AUTO_BOOKING_CODE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 4) field = new PercentField(this, AGENCY_COMM, 5, null, new Float(0.10)); if (iFieldSeq == 5) field = new ShortField(this, DEPOSIT_DAYS, 3, null, new Short((short)10)); field = new ShortField(this, NIGHTS, 2, null, new Short((short)1)); if (iFieldSeq == 27) field = new PercentField(this, MARKUP, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 28) field = new PricingTypeField(this, TOUR_PRICING_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
field = new BooleanField(this, AUTO_BOOKING_CODE, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 4) field = new PercentField(this, AGENCY_COMM, 5, null, new Float(0.10)); if (iFieldSeq == 5) field = new ShortField(this, DEPOSIT_DAYS, 3, null, new Short((short)10)); field = new ShortField(this, NIGHTS, 2, null, new Short((short)1)); if (iFieldSeq == 27) field = new PercentField(this, MARKUP, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 28) field = new PricingTypeField(this, TOUR_PRICING_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
if (iFieldSeq == 11) field = new PercentField(this, COMMISSION_RATE, Constants.DEFAULT_FIELD_LENGTH, null, null); field.addListener(new InitOnceFieldHandler(null));
if (iFieldSeq == 11) field = new PercentField(this, COMMISSION_RATE, Constants.DEFAULT_FIELD_LENGTH, null, null); field.addListener(new InitOnceFieldHandler(null));
field = new PercentField(this, COMM_PER, 5, null, new Float(0.10)); if (iFieldSeq == 22) field = new PercentField(this, TAX_PER, 5, null, null); field.addListener(new InitOnceFieldHandler(null)); field = new PercentField(this, CARRIER_SVC_PER, Constants.DEFAULT_FIELD_LENGTH, null, null); if (field == null) field = super.setupField(iFieldSeq);
field = new PercentField(this, COMM_PER, 5, null, new Float(0.10)); if (iFieldSeq == 22) field = new PercentField(this, TAX_PER, 5, null, null); field.addListener(new InitOnceFieldHandler(null)); field = new PercentField(this, CARRIER_SVC_PER, Constants.DEFAULT_FIELD_LENGTH, null, null); if (field == null) field = super.setupField(iFieldSeq);
field = new CurrencyField(this, CUT_OFF_AMOUNT, 8, null, null); if (iFieldSeq == 6) field = new PercentField(this, TAX_RATE, 5, null, null); if (field == null) field = super.setupField(iFieldSeq);
field = new StringField(this, FICA_TAX_DESC, 15, null, null); if (iFieldSeq == 16) field = new PercentField(this, FICA_EMPLOYEE, 5, null, null); if (iFieldSeq == 17) field = new PercentField(this, FICA_EMPLOYER, 5, null, null); if (iFieldSeq == 18) field = new StringField(this, MEDICARE_TAX_DESC, 15, null, null); if (iFieldSeq == 21) field = new PercentField(this, MEDICARE_EMPLOYEE, 4, null, null); if (iFieldSeq == 22) field = new CurrencyField(this, MAX_MEDICARE, 8, null, null); field = new CurrencyField(this, MAX_EMPLOYER_FICA, 8, null, null); if (iFieldSeq == 24) field = new PercentField(this, MEDICARE_EMPLOYER, 4, null, null); if (iFieldSeq == 25) field = new CurrencyField(this, MAX_EMPLOYER_MEDICARE, 8, null, null); if (iFieldSeq == 26) field = new PercentField(this, FUI_PER, 5, null, null); if (iFieldSeq == 27) field = new CurrencyField(this, FUI_MAX, 6, null, null); field = new StringField(this, DEFAULT_STATE, 10, null, null); if (iFieldSeq == 32) field = new PercentField(this, SUI_PER, 5, null, null); if (iFieldSeq == 33) field = new CurrencyField(this, SUI_MAX, 6, null, null);