/** * Add this field in the Record's field sequence. */ public BaseField setupField(int iFieldSeq) { BaseField field = null; if (iFieldSeq == 0) field = new StringField(this, CURRENT_MENU, 30, null, null); if (iFieldSeq == 1) field = new StringField(this, MENU_TITLE, 255, null, null); if (iFieldSeq == 2) field = new StringField(this, MENU_FILTER, 255, null, null); if (iFieldSeq == 3) field = new StringField(this, MENU_HISTORY, 255, null, null); if (iFieldSeq == 4) field = new MenuVariables_MenuFormat(this, MENU_FORMAT, Constants.DEFAULT_FIELD_LENGTH, null, null); if (field == null) field = super.setupField(iFieldSeq); return field; }
/** * Initialize class fields. */ public void init(Record record, String strName, int iDataLength, String strDesc, Object strDefault) { super.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 StringField(null, this.getFieldName(), m_iMaxLength, this.getFieldDesc(), null); field.setRecord(m_record); // Set table without adding to table field list return field; } /**
public Record getSubRecord() { if (m_recDependent == null) m_recDependent = this.createSubRecord(); if (m_recDependent != null) { m_recDependent.setKeyArea(TourHeaderOption.TOUR_OR_OPTION_KEY); StringField fldTourOrOption = new StringField(null, TourHeaderOption.TOUR_OR_OPTION, 1, null, null); m_recDependent.addListener(new FreeOnFreeHandler(fldTourOrOption)); fldTourOrOption.setString(TourHeaderOption.OPTION); if (m_recDependent.getListener(SubFileFilter.class.getName()) == null) m_recDependent.addListener(new SubFileFilter(fldTourOrOption, TourHeaderOption.TOUR_OR_OPTION, (BaseField)this.getOwner().getCounterField(), TourHeaderOption.TOUR_OR_OPTION_ID, null, null)); } return m_recDependent; } public Record createSubRecord()
/** * 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 FieldLengthConverter(converter, 30); return super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc); }
public Record getSubRecord() { if (m_recDependent == null) m_recDependent = this.createSubRecord(); if (m_recDependent != null) { m_recDependent.setKeyArea(TourHeaderOption.TOUR_OR_OPTION_KEY); StringField fldTourOrOption = new StringField(null, TourHeaderOption.TOUR_OR_OPTION, 1, null, null); m_recDependent.addListener(new FreeOnFreeHandler(fldTourOrOption)); fldTourOrOption.setString(TourHeaderOption.TOUR); if (m_recDependent.getListener(SubFileFilter.class.getName()) == null) m_recDependent.addListener(new SubFileFilter(fldTourOrOption, TourHeaderOption.TOUR_OR_OPTION, (BaseField)this.getOwner().getCounterField(), TourHeaderOption.TOUR_OR_OPTION_ID, null, null)); } return m_recDependent; } public Record createSubRecord()
/** * 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 StringField(null, this.getFieldName(), m_iMaxLength, this.getFieldDesc(), null); field.setRecord(m_record); // Set table without adding to table field list return field; } /**
/** * 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) { converter = new FieldLengthConverter((Converter)converter, 30); return super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc, properties); }
/** * Add this field in the Record's field sequence. */ public BaseField setupField(int iFieldSeq) { BaseField field = null; //if (iFieldSeq == 0) //{ // field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null); // field.setHidden(true); //} //if (iFieldSeq == 1) //{ // field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null); // field.setHidden(true); //} //if (iFieldSeq == 2) //{ // field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false)); // field.setHidden(true); //} if (iFieldSeq == 3) field = new StringField(this, DESCRIPTION, 20, null, null); if (iFieldSeq == 4) field = new StringField(this, CODE, 2, null, null); if (field == null) field = super.setupField(iFieldSeq); return field; }
public Record getSubRecord() { if (m_recDependent == null) m_recDependent = this.createSubRecord(); if (m_recDependent != null) { m_recDependent.setKeyArea(TourHeaderOption.TOUR_OR_OPTION_KEY); StringField fldTourOrOption = new StringField(null, TourHeaderOption.TOUR_OR_OPTION, 1, null, null); m_recDependent.addListener(new FreeOnFreeHandler(fldTourOrOption)); fldTourOrOption.setString(TourHeaderOption.TOUR); if (m_recDependent.getListener(SubFileFilter.class.getName()) == null) m_recDependent.addListener(new SubFileFilter(fldTourOrOption, TourHeaderOption.TOUR_OR_OPTION, (BaseField)this.getOwner().getCounterField(), TourHeaderOption.TOUR_OR_OPTION_ID, null, null)); } return m_recDependent; } public Record createSubRecord()
/** * 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 StringField(null, this.getFieldName(), m_iMaxLength, this.getFieldDesc(), null); field.setRecord(m_record); // Set table without adding to table field list return field; } /**
/** * Initialize class fields. */ public void init(Record record, String strName, int iDataLength, String strDesc, Object strDefault) { super.init(record, strName, iDataLength, strDesc, strDefault); }
/** * 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; } }
/** * Add this field in the Record's field sequence. */ public BaseField setupField(int iFieldSeq) { BaseField field = null; if (iFieldSeq == kCurrentMenu) field = new StringField(this, "CurrentMenu", 30, null, null); if (iFieldSeq == kMenuTitle) field = new StringField(this, "MenuTitle", 255, null, null); if (iFieldSeq == kMenuFilter) field = new StringField(this, "MenuFilter", 255, null, null); if (iFieldSeq == kMenuHistory) field = new StringField(this, "MenuHistory", 255, null, null); if (iFieldSeq == kMenuFormat) field = new MenuVariables_MenuFormat(this, "MenuFormat", Constants.DEFAULT_FIELD_LENGTH, null, null); if (field == null) { field = super.setupField(iFieldSeq); if (field == null) if (iFieldSeq < kMenuVariablesLastField) field = new EmptyField(this); } return field; }
public Record getSubRecord() { if (m_recDependent == null) m_recDependent = this.createSubRecord(); if (m_recDependent != null) { m_recDependent.setKeyArea(TourHeaderOption.TOUR_OR_OPTION_KEY); StringField fldTourOrOption = new StringField(null, TourHeaderOption.TOUR_OR_OPTION, 1, null, null); m_recDependent.addListener(new FreeOnFreeHandler(fldTourOrOption)); fldTourOrOption.setString(TourHeaderOption.OPTION); if (m_recDependent.getListener(SubFileFilter.class.getName()) == null) m_recDependent.addListener(new SubFileFilter(fldTourOrOption, TourHeaderOption.TOUR_OR_OPTION, (BaseField)this.getOwner().getCounterField(), TourHeaderOption.TOUR_OR_OPTION_ID, null, null)); } return m_recDependent; } public Record createSubRecord()
/** * Initialize class fields. */ public void init(Record record, String strName, int iDataLength, String strDesc, Object strDefault) { super.init(record, strName, iDataLength, strDesc, strDefault); } /**
/** * 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; } }
/** * Add this field in the Record's field sequence. */ public BaseField setupField(int iFieldSeq) { BaseField field = null; if (iFieldSeq == kID) field = new CounterField(this, "ID", Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == kKey) field = new StringField(this, "Key", 128, null, null); if (iFieldSeq == kValue) field = new StringField(this, "Value", 255, null, null); if (iFieldSeq == kComment) field = new StringField(this, "Comment", 255, null, null); if (field == null) { field = super.setupField(iFieldSeq); if (field == null) if (iFieldSeq < kPropertiesInputLastField) field = new EmptyField(this); } return field; } /**
/** * AddSubFileFilter Method. */ public void addSubFileFilter() { this.getMainRecord().setKeyArea(TourHeaderOption.TOUR_OR_OPTION_KEY); StringField fldTourOrOption = new StringField(null, TourHeaderOption.TOUR_OR_OPTION, 1, null, null); if (this.getHeaderRecord() instanceof TourHeader) fldTourOrOption.setString(TourHeaderOption.TOUR); else { fldTourOrOption.setString(TourHeaderOption.OPTION); this.getMainRecord().addListener(new SubCountHandler(this.getHeaderRecord().getField(TourHeaderOption.DETAIL_OPTION_COUNT), false, true)); } this.getMainRecord().addListener(new FreeOnFreeHandler(fldTourOrOption)); this.getMainRecord().addListener(new SubFileFilter(fldTourOrOption, TourHeaderOption.TOUR_OR_OPTION, (BaseField)this.getHeaderRecord().getCounterField(), TourHeaderOption.TOUR_OR_OPTION_ID, null, null)); } /**
/** * Initialize class fields. */ public void init(Record record, String strName, int iDataLength, String strDesc, Object strDefault) { super.init(record, strName, iDataLength, strDesc, strDefault); } /**