/** * 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; } /**
/** * Constructor. * @param strFirst First string in the key fields. * @param strSecond Second string in the key fields. * @param strThird Third string in the key fields. * @param iFieldSeq The First field sequence of the key. * @param iFieldSeq2 The Second field sequence of the key (-1 for none). * @param iFieldSeq3 The Third field sequence of the key (-1 for none). */ public StringSubFileFilter(String mainString, int iFieldSeq, String strSecond, int secondFilesField, String strThird, int thirdFilesField) { this(); this.init(null, mainString, iFieldSeq, strSecond, secondFilesField, strThird, thirdFilesField); } /**
String strID = (String)properties.get("id"); if (listener != null) listener.setFirst(strID); record.close();
String strID = (String)properties.get("id"); if (listener != null) listener.setFirst(strID); record.close();
/** * 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; } /**
/** * Constructor. * @param strFirst First string in the key fields. * @param strSecond Second string in the key fields. * @param strThird Third string in the key fields. * @param iFieldSeq The First field sequence of the key. * @param iFieldSeq2 The Second field sequence of the key (-1 for none). * @param iFieldSeq3 The Third field sequence of the key (-1 for none). */ public StringSubFileFilter(String mainString, int iFieldSeq, String strSecond, int secondFilesField, String strThird, int thirdFilesField) { this(); this.init(null, mainString, iFieldSeq, strSecond, secondFilesField, strThird, thirdFilesField); } /**
/** * 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; } /**
/** * Constructor. * @param strFirst First string in the key fields. * @param strSecond Second string in the key fields. * @param strThird Third string in the key fields. * @param iFieldSeq The First field sequence of the key. * @param iFieldSeq2 The Second field sequence of the key (-1 for none). * @param iFieldSeq3 The Third field sequence of the key (-1 for none). */ public StringSubFileFilter(String mainString, BaseField fldThisFile, String strSecond, BaseField fldThisFile2, String strThird, BaseField fldThisFile3) { this(); this.init(null, mainString, null, fldThisFile, strSecond, null, fldThisFile2, strThird, null, fldThisFile3); } /**
/** * 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)); } /**
/** * Constructor. * @param strFirst First string in the key fields. * @param strSecond Second string in the key fields. * @param strThird Third string in the key fields. * @param iFieldSeq The First field sequence of the key. * @param iFieldSeq2 The Second field sequence of the key (-1 for none). * @param iFieldSeq3 The Third field sequence of the key (-1 for none). */ public StringSubFileFilter(String mainString, String fieldName, String strSecond, String fieldName2, String strThird, String fieldName3) { this(); this.init(null, mainString, fieldName, null, strSecond, fieldName2, null, strThird, fieldName3, 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)); } /**
/** * 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();
StringSubFileFilter behMenu = new StringSubFileFilter(strMenuObjectID, recMenu.getField(MenusModel.PARENT_FOLDER_ID), null, null, null, null); recMenu.addListener(behMenu); while (recMenu.hasNext())