/** * 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 { StringSubFileFilter newBehavior = new StringSubFileFilter(m_strFirst, m_iThisFileFieldSeq, m_strSecond, m_iThisFileFieldSeq2, m_strThird, m_iThisFileFieldSeq3); return newBehavior; } /**
/** * 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 { StringSubFileFilter newBehavior = new StringSubFileFilter(m_strFirst, m_iThisFileFieldSeq, m_strSecond, m_iThisFileFieldSeq2, m_strThird, m_iThisFileFieldSeq3); return newBehavior; } /**
/** * 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 { StringSubFileFilter newBehavior = null; newBehavior = new StringSubFileFilter(m_strFirst, thisFileFieldName, m_strSecond, thisFileFieldName2, m_strThird, thisFileFieldName3); return newBehavior; } /**
/** * Code to display a Menu. */ public void preSetupGrid(String strMenu) { if (strMenu == null) // Always strMenu = m_recDetail.getField(Menus.kID).toString(); m_recDetail.setKeyArea(Menus.kParentFolderIDKey); m_recDetail.addListener(new StringSubFileFilter(strMenu, Menus.kParentFolderID, null, -1, null, -1)); } /**
/** * Add behaviors to this session. */ public void addListeners() { super.addListeners(); this.getRecord(Region.REGION_FILE).setKeyArea(Region.CONTINENT_ID_KEY); this.getRecord(Region.REGION_FILE).addListener(new StringSubFileFilter(null, Region.CONTINENT_ID, null, null, null, null)); this.getRecord(Country.COUNTRY_FILE).setKeyArea(Country.REGION_ID_KEY); this.getRecord(Country.COUNTRY_FILE).addListener(new StringSubFileFilter(null, Country.REGION_ID, null, null, null, null)); this.getRecord(State.STATE_FILE).setKeyArea(State.COUNTRY_ID_KEY); this.getRecord(State.STATE_FILE).addListener(new StringSubFileFilter(null, State.COUNTRY_ID, null, null, null, null)); this.getRecord(City.CITY_FILE).setKeyArea(City.COUNTRY_ID_KEY); this.getRecord(City.CITY_FILE).addListener(new StringSubFileFilter(null, City.COUNTRY_ID, null, null, null, null)); } /**
/** * Code to display a Menu. */ public void preSetupGrid(String strMenu) { if (strMenu == null) // Always strMenu = m_recDetail.getField(MenusModel.ID).toString(); m_recDetail.setKeyArea(MenusModel.PARENT_FOLDER_ID_KEY); m_recDetail.addListener(new StringSubFileFilter(strMenu, m_recDetail.getField(MenusModel.PARENT_FOLDER_ID), null, null, null, null)); } /**
/** * Add behaviors to this session. */ public void addListeners() { super.addListeners(); this.getRecord(Region.REGION_FILE).setKeyArea(Region.CONTINENT_ID_KEY); this.getRecord(Region.REGION_FILE).addListener(new StringSubFileFilter(null, Region.CONTINENT_ID, null, null, null, null)); this.getRecord(Country.COUNTRY_FILE).setKeyArea(Country.REGION_ID_KEY); this.getRecord(Country.COUNTRY_FILE).addListener(new StringSubFileFilter(null, Country.REGION_ID, null, null, null, null)); this.getRecord(State.STATE_FILE).setKeyArea(State.COUNTRY_ID_KEY); this.getRecord(State.STATE_FILE).addListener(new StringSubFileFilter(null, State.COUNTRY_ID, null, null, null, null)); this.getRecord(City.CITY_FILE).setKeyArea(City.COUNTRY_ID_KEY); this.getRecord(City.CITY_FILE).addListener(new StringSubFileFilter(null, City.COUNTRY_ID, null, null, null, null)); } /**
/** * 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) { UserInfo user = (UserInfo)this.makeReferenceRecord(); user.addListener(new StringSubFileFilter(Integer.toString(UserGroup.RES_USER), user.getField(UserInfo.USER_GROUP_ID), null, null, null, null)); Converter convName = new FirstMLastConverter(user, null, UserInfo.FIRST_NAME, null, UserInfo.LAST_NAME); ScreenComponent screenField = this.setupTableLookup(itsLocation, targetScreen, converter, iDisplayFieldDesc, user, UserInfo.USER_NAME_KEY, convName, true, false); properties = new HashMap<String,Object>(); properties.put(ScreenModel.FIELD, this); properties.put(ScreenModel.TOOLTIP, ThinMenuConstants.HOME); String userID = ((BaseApplication)this.getRecord().getRecordOwner().getTask().getApplication()).getUserID(); properties.put(ScreenModel.VALUE, userID); properties.put(ScreenModel.IMAGE, ThinMenuConstants.HOME); createScreenComponent(ScreenModel.CANNED_BOX, targetScreen.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), targetScreen, converter, ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties); return screenField; }
user.addListener(new StringSubFileFilter(Integer.toString(UserGroup.RES_USER), UserInfo.kUserGroupID, null, -1, null, -1)); Converter convName = new FirstMLastConverter(user, -1, UserInfo.kFirstName, -1, UserInfo.kLastName);
/** * Code to display a Menu. * @param strMenu The name of the menu to set up. */ public void preSetupGrid(String strMenu) { super.preSetupGrid(strMenu); if (m_strMenuObjectID == null) this.setMenuProperty(strMenu); Menus menu = (Menus)this.getMainRecord(); menu.setKeyArea(Menus.kParentFolderIDKey); if (m_strMenuObjectID != null) strMenu = m_strMenuObjectID; StringSubFileFilter behMenu = new StringSubFileFilter(strMenu, Menus.kParentFolderID, null, -1, null, -1); menu.addListener(behMenu); } /**
String strMenu = this.getField(Menus.kID).toString(); this.setKeyArea(Menus.kParentFolderIDKey); FileListener behavior = new StringSubFileFilter(strMenu, Menus.kParentFolderID, null, -1, null, -1); this.addListener(behavior); this.close();
/** * Code to display a Menu. * @param strMenu The name of the menu to set up. */ public void preSetupGrid(String strMenu) { super.preSetupGrid(strMenu); if (m_strMenuObjectID == null) this.setMenuProperty(strMenu); Record menu = this.getMainRecord(); menu.setKeyArea(MenusModel.PARENT_FOLDER_ID_KEY); if (m_strMenuObjectID != null) strMenu = m_strMenuObjectID; StringSubFileFilter behMenu = new StringSubFileFilter(strMenu, menu.getField(MenusModel.PARENT_FOLDER_ID), null, null, null, null); menu.addListener(behMenu); } /**
String strMenu = this.getField(Menus.ID).toString(); this.setKeyArea(Menus.PARENT_FOLDER_ID_KEY); FileListener behavior = new StringSubFileFilter(strMenu, this.getField(Menus.PARENT_FOLDER_ID), null, null, null, null); this.addListener(behavior); this.close();
recMenu.addListener(new StringSubFileFilter(strParentID, Menus.kParentFolderID, null, -1, null, -1));
try { recTourHeaderOption.setKeyArea(TourHeaderOption.TOUR_OR_OPTION_KEY); recTourHeaderOption.addListener(new StringSubFileFilter(strTourOrOption, TourHeaderOption.TOUR_OR_OPTION, fldTourOrOptionID.getData().toString(), TourHeaderOption.TOUR_OR_OPTION_ID, null, null)); recTourHeaderOption.close(); while (recTourHeaderOption.hasNext())
try { recTourHeaderOption.setKeyArea(TourHeaderOption.TOUR_OR_OPTION_KEY); recTourHeaderOption.addListener(new StringSubFileFilter(strTourOrOption, TourHeaderOption.TOUR_OR_OPTION, fldTourOrOptionID.getData().toString(), TourHeaderOption.TOUR_OR_OPTION_ID, null, null)); recTourHeaderOption.close(); while (recTourHeaderOption.hasNext())
strSave = this.getField(TourHeader.DESC_SORT).toString(); this.addNew(); FileListener fileBehavior = new StringSubFileFilter(strSave, TourHeader.DESC_SORT, null, null, null, null); this.addListener(fileBehavior); FileListener fileBehavior2 = null; FileListener fileBehavior = new StringSubFileFilter(strSave, TourHeader.CODE, null, null, null, null); this.addListener(fileBehavior); FileListener fileBehavior2 = null;
strSave = this.getField(TourHeader.DESC_SORT).toString(); this.addNew(); FileListener fileBehavior = new StringSubFileFilter(strSave, TourHeader.DESC_SORT, null, null, null, null); this.addListener(fileBehavior); FileListener fileBehavior2 = null; FileListener fileBehavior = new StringSubFileFilter(strSave, TourHeader.CODE, null, null, null, null); this.addListener(fileBehavior); FileListener fileBehavior2 = null;
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.getMainRecord().getField(BookingAnswer.DESCRIPTION).setEnabled(false); Record recTourHeader = this.getRecord(TourHeader.TOUR_HEADER_FILE); Record recBooking = this.getRecord(Booking.BOOKING_FILE); m_fldModuleStart.setString(m_strModuleStartDate); this.getMainRecord().setKeyArea(BookingAnswer.BOOKING_ID_KEY); this.getMainRecord().addListener(new SubFileFilter(recBooking.getField(Booking.ID), BookingAnswer.BOOKING_ID, m_recBookingPax.getField(BookingPax.ID), BookingAnswer.BOOKING_PAX_ID, recTourHeader.getField(TourHeader.ID), BookingAnswer.MODULE_ID)); this.getMainRecord().addListener(new StringSubFileFilter(m_strTourOrOption, BookingAnswer.TOUR_OR_OPTION, m_strTourOrOptionID, BookingAnswer.TOUR_OR_OPTION_ID, null, null)); this.getMainRecord().addListener(new SubFileFilter(m_fldModuleStart, BookingAnswer.MODULE_START_DATE, null, null, null, null)); BooleanField fldTrue = new BooleanField(null, DBConstants.BLANK, DBConstants.DEFAULT_FIELD_LENGTH, DBConstants.BLANK, null); fldTrue.setState(true); this.getMainRecord().addListener(new FreeOnFreeHandler(fldTrue)); this.getMainRecord().addListener(new CompareFileFilter(BookingAnswer.ASK_FOR_ANSWER, fldTrue, DBConstants.EQUALS, null, false)); this.setAppending(false); this.getMainRecord().getField(BookingAnswer.SELECTED).addListener(new BookingAnswerSelectHandler(null)); } /**
try { recMessageDetail.setKeyArea(MessageDetail.kContactTypeIDKey); recMessageDetail.addListener(new StringSubFileFilter(this.getOwner().getField(MessageDetail.kContactTypeID).toString(), MessageDetail.kContactTypeID, this.getOwner().getField(MessageDetail.kPersonID).toString(), MessageDetail.kPersonID, this.getOwner().getField(MessageDetail.kMessageProcessInfoID).toString(), MessageDetail.kMessageProcessInfoID)); if (newDefaultMessageTransport != null) if (newDefaultMessageTransport == -2)