/** * 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 MemoField(null, m_strFieldName, m_iMaxLength, m_strFieldDesc, null); field.setRecord(m_record); // Set table without adding to table field list return field; } /**
/** * Move this physical binary data to this field. * @param data The physical data to move to this field (must be the correct raw data class). * @param bDisplayOption If true, display after setting the data. * @param iMoveMode The type of move. * @return an error code (0 if success). */ public int doSetData(Object data, boolean bDisplayOption, int iMoveMode) { int iErrorCode = super.doSetData(data, bDisplayOption, iMoveMode); if (this.isJustModified()) m_propertiesCache = null; // Cache is no longer valid return iErrorCode; } /**
/** * 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 MemoField(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. * @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 = null; screenField = super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc, properties); properties = new HashMap<String,Object>(); properties.put(ScreenModel.FIELD, this); properties.put(ScreenModel.COMMAND, ScreenModel.EDIT); properties.put(ScreenModel.IMAGE, ScreenModel.EDIT); 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; } /**
return super.doMergeData(objData); String strOrigProperties = (String)listener.getOriginalData(); Map<String,Object> propRead = this.getProperties(); // Disk image (with updates from others)
/** * 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; screenField = super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc); ScreenField sScreenField = new SCannedBox(targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, SCannedBox.EDIT, ScreenConstants.DONT_DISPLAY_FIELD_DESC, this); sScreenField.setRequestFocusEnabled(false); return screenField; } /**
return super.doMergeData(objData); String strOrigProperties = (String)listener.getOriginalData(); Map<String,Object> propRead = this.getProperties(); // Disk image (with updates from others)
/** * 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 MemoField(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 MemoField(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. * @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; screenField = super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc); ScreenField sScreenField = new SCannedBox(targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, SCannedBox.EDIT, ScreenConstants.DONT_DISPLAY_FIELD_DESC, this); sScreenField.setRequestFocusEnabled(false); return screenField; } /**
/** * Move this physical binary data to this field. * @param data The physical data to move to this field (must be the correct raw data class). * @param bDisplayOption If true, display after setting the data. * @param iMoveMode The type of move. * @return an error code (0 if success). */ public int doSetData(Object data, boolean bDisplayOption, int iMoveMode) { int iErrorCode = super.doSetData(data, bDisplayOption, iMoveMode); if (this.isJustModified()) m_propertiesCache = null; // Cache is no longer valid return iErrorCode; } /**
return super.doMergeData(objData); String strOrigProperties = (String)listener.getOriginalData(); Map<String,Object> propRead = this.getProperties(); // Disk image (with updates from others)
/** * 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 MemoField(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 MemoField(Record record, String strName, int iDataLength, String strDesc, Object strDefault) { this(); this.init(record, strName, iDataLength, strDesc, strDefault); } /**
screenField = super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc, properties); properties = new HashMap<String,Object>(); properties.put(ScreenModel.FIELD, this);
/** * Move this physical binary data to this field. * @param data The physical data to move to this field (must be the correct raw data class). * @param bDisplayOption If true, display after setting the data. * @param iMoveMode The type of move. * @return an error code (0 if success). */ public int doSetData(Object data, boolean bDisplayOption, int iMoveMode) { int iErrorCode = super.doSetData(data, bDisplayOption, iMoveMode); if (this.isJustModified()) m_propertiesCache = null; // Cache is no longer valid return iErrorCode; } /**
/** * 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, 30, null, null); if (iFieldSeq == 4) field = new MemoField(this, RESOURCE_CLASS, Constants.DEFAULT_FIELD_LENGTH, null, null); if (field == null) field = super.setupField(iFieldSeq); return field; } /**
/** * Initialize this object. * @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 void init(Record record, String strName, int iDataLength, String strDesc, Object strDefault) { super.init(record, strName, iDataLength, strDesc, strDefault); if (iDataLength == DBConstants.DEFAULT_FIELD_LENGTH) m_iMaxLength = BIG_DEFAULT_LENGTH; } /**
screenField = super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc); ScreenField sScreenField = new SCannedBox(targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, SCannedBox.EDIT, ScreenConstants.DONT_DISPLAY_FIELD_DESC, this); sScreenField.setRequestFocusEnabled(false);
field = new StringField(this, DESCRIPTION, 30, null, null); if (iFieldSeq == 5) field = new MemoField(this, ACCESS_MAP, Constants.DEFAULT_FIELD_LENGTH, null, null); if (field == null) field = super.setupField(iFieldSeq);