/** * Set up the default control for this field (using default params). * @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout). * @return Return the component or ScreenField that is created for this field. */ public ScreenComponent setupFieldView(ComponentParent targetScreen) { return this.setupDefaultView(targetScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), targetScreen, ScreenConstants.DISPLAY_DESC); } /**
/** * MakeScreen Method. */ public ScreenParent makeScreen(ScreenLoc itsLocation, ComponentParent parentScreen, int iDocMode, Map<String,Object> properties) { ScreenParent screen = null; if ((iDocMode & ScreenConstants.MAINT_MODE) == ScreenConstants.MAINT_MODE) { if (ScreenConstants.HTML_SCREEN_TYPE.equalsIgnoreCase(((ComponentParent)parentScreen).getViewType())) screen = Record.makeNewScreen(REQUEST_HTML_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true); else screen = Record.makeNewScreen(REQUEST_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true); } else screen = Record.makeNewScreen(REQUEST_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true); return screen; } /**
if (!((ComponentParent)this.getRecord().getRecordOwner()).isPrintReport()) itsLocation = targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR); ScreenComponent sfDesc = conv.setupDefaultView(itsLocation, targetScreen, iDisplayFieldDesc); properties.put(ScreenModel.COMMAND, ThinMenuConstants.LOOKUP); properties.put(ScreenModel.IMAGE, ThinMenuConstants.LOOKUP); screenField = createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties); if (bIncludeFormButton) if (!(targetScreen instanceof GridScreenParent)) properties.put(ScreenModel.COMMAND, ThinMenuConstants.FORM); properties.put(ScreenModel.IMAGE, ThinMenuConstants.FORM); screenField = createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties); properties.put(ScreenModel.COMMAND, ScreenModel.CLEAR); properties.put(ScreenModel.IMAGE, ScreenModel.CLEAR); screenField = createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties); if (((Record)record).getRecordOwner() != targetScreen) if (this.getRecord().getRecordOwner() != targetScreen) if (this.getRecord().getRecordOwner() != targetScreen.getParentScreen()) if (targetScreen.getMainRecord() != null) ((Record)targetScreen.getMainRecord()).addListener(new FileRemoveBOnCloseHandler(behavior)); // Being very careful (remove this behavior when screen closes)
if (ScreenModel.SWING_TYPE.equalsIgnoreCase(targetScreen.getViewType())) recPropertiesInput.addListener(new SyncPropertiesRecordToField(this)); ScreenLoc descLocation = targetScreen.getNextLocation(ScreenConstants.FIELD_DESC, ScreenConstants.DONT_SET_ANCHOR); String strDisplay = converter.getFieldDesc(); if ((strDisplay != null) && (strDisplay.length() > 0)) properties.put(ScreenModel.COMMAND, ScreenModel.EDIT); properties.put(ScreenModel.IMAGE, ScreenModel.EDIT); ScreenComponent sScreenField = createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, iDisplayFieldDesc, properties); sScreenField.setRequestFocusEnabled(false);
return record.makeScreen(itsLocation, parentScreen, iDocMode, properties); if (objObjectID != null) parentScreen.setProperty(DBConstants.STRING_OBJECT_ID_HANDLE, objObjectID.toString()); if (this.getField(BookingDetail.PRODUCT_TYPE_ID).getValue() == ProductType.HOTEL_ID) screen = Record.makeNewScreen(BookingHotel.BOOKING_HOTEL_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
return record.makeScreen(itsLocation, parentScreen, iDocMode, properties); if (objObjectID != null) parentScreen.setProperty(DBConstants.STRING_OBJECT_ID_HANDLE, objObjectID.toString()); if (this.getField(BookingDetail.PRODUCT_TYPE_ID).getValue() == ProductType.HOTEL_ID) screen = Record.makeNewScreen(BookingHotel.BOOKING_HOTEL_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
/** * Set up the default control for this field. * A SCannedBox for a query bitmap converter. * @param itsLocation Location of this component on screen (ie., GridBagConstraint). * @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout). * @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) { properties = new HashMap<String,Object>(); properties.put(ScreenModel.COMMAND, MenuConstants.FORMLINK); properties.put(ScreenModel.IMAGE, MenuConstants.FORM); return BaseField.createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, iDisplayFieldDesc, properties); } }
/** * 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.EMAIL); properties.put(ScreenModel.IMAGE, ScreenModel.EMAIL); 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; } }
/** * 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; } }
/** * 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 = createScreenComponent(ScreenModel.IMAGE_VIEW, itsLocation, targetScreen, converter, iDisplayFieldDesc, properties); properties = new HashMap<String,Object>(); properties.put(ScreenModel.FIELD, this); properties.put(ScreenModel.COMMAND, ScreenModel.OPEN); properties.put(ScreenModel.IMAGE, ScreenModel.OPEN); 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; } /**
/** * 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; } }
/** * 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; } /**
ScreenComponent screenField = createScreenComponent(ScreenModel.STATIC_STRING, targetScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), targetScreen, null, 0, properties); String strDisplay = converter.getFieldDesc(); if ((strDisplay != null) && (strDisplay.length() > 0)) ScreenLoc descLocation = targetScreen.getNextLocation(ScreenConstants.FIELD_DESC, ScreenConstants.DONT_SET_ANCHOR); properties.put(ScreenModel.DISPLAY_STRING, strDisplay); createScreenComponent(ScreenModel.STATIC_STRING, descLocation, targetScreen, null, 0, properties); ScreenLoc location = targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST_CHECKBOX, ScreenConstants.DONT_SET_ANCHOR); screenField = dayConverter.setupDefaultView(location, targetScreen, ScreenConstants.DISPLAY_FIELD_DESC);
ScreenComponent screenField = createScreenComponent(ScreenModel.STATIC_STRING, targetScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), targetScreen, null, 0, properties); String strDisplay = converter.getFieldDesc(); if ((strDisplay != null) && (strDisplay.length() > 0)) ScreenLoc descLocation = targetScreen.getNextLocation(ScreenConstants.FIELD_DESC, ScreenConstants.DONT_SET_ANCHOR); properties.put(ScreenModel.DISPLAY_STRING, strDisplay); createScreenComponent(ScreenModel.STATIC_STRING, descLocation, targetScreen, null, 0, properties); ScreenLoc location = targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST_CHECKBOX, ScreenConstants.DONT_SET_ANCHOR); screenField = dayConverter.setupDefaultView(location, targetScreen, ScreenConstants.DISPLAY_FIELD_DESC);
ScreenComponent sfTemp = BaseField.createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, null, ScreenConstants.DEFAULT_DISPLAY, properties); for (int i = 0; ; i++) properties.put(ScreenModel.COMMAND, ThinMenuConstants.LOOKUP); properties.put(ScreenModel.IMAGE, ThinMenuConstants.LOOKUP); screenField = createScreenComponent(TourHeaderAirHeader.TOUR_HEADER_AIR_HEADER_SFIELD_CLASS, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties); break;
/** * 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) { if (converter.getMaxLength() > ScreenConstants.MAX_SINGLE_CHARS) converter = new FieldLengthConverter((Converter)converter, ScreenConstants.MAX_SINGLE_CHARS); // Show as a single line. ScreenComponent sScreenField = super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc, properties); properties = new HashMap<String,Object>(); properties.put(ScreenModel.FIELD, this); properties.put(ScreenModel.COMMAND, ScreenModel.URL); properties.put(ScreenModel.IMAGE, ScreenModel.URL); ScreenComponent pSScreenField = createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, iDisplayFieldDesc, properties); pSScreenField.setRequestFocusEnabled(false); return sScreenField; } }
ScreenComponent sfTemp = BaseField.createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, null, ScreenConstants.DEFAULT_DISPLAY, properties); for (int i = 0; ; i++) properties.put(ScreenModel.COMMAND, ThinMenuConstants.LOOKUP); properties.put(ScreenModel.IMAGE, ThinMenuConstants.LOOKUP); screenField = createScreenComponent(BookingAirHeader.BOOKING_AIR_HEADER_SCREEN_FIELD_CLASS, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties); break;