/** * Standard Constructor * * @param frame frame * @param modal modal * @param WindowNo window no * @param M_Warehouse_ID warehouse * @param M_PriceList_ID price list * @param value Query Value or Name if enclosed in @ * @param multiSelection multiple selections * @param whereClause where clause */ public InfoProduct( Frame frame, boolean modal, int WindowNo, int M_Warehouse_ID, int M_PriceList_ID, String value, boolean multiSelection, String whereClause) { super(frame, modal, WindowNo, "p", "M_Product_ID", multiSelection, whereClause); log.info( value + ", Wh=" + M_Warehouse_ID + ", PL=" + M_PriceList_ID + ", WHERE=" + whereClause); setTitle(Msg.getMsg(Env.getCtx(), "InfoProduct")); // statInit(); initInfo(value, M_Warehouse_ID, M_PriceList_ID); m_C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), WindowNo, "C_BPartner_ID"); // int no = p_table.getRowCount(); setStatusLine( Integer.toString(no) + " " + Msg.getMsg(Env.getCtx(), "SearchRows_EnterQuery"), false); setStatusDB(Integer.toString(no)); // AutoQuery if (value != null && value.length() > 0) executeQuery(); p_loadedOK = true; // Focus fieldValue.requestFocus(); // Begin - fer_luck @ centuryon mWindowNo = WindowNo; // End - fer_luck @ centuryon AEnv.positionCenterWindow(frame, this); } // InfoProduct
/** * Constructor * * @param frame parent * @param title title (field name) * @param location Model Location */ public VLocationDialog(Frame frame, String title, MLocation location) { super(frame, title, true); try { jbInit(); } catch (Exception ex) { log.log(Level.SEVERE, ex.getMessage()); } m_location = location; if (m_location == null) { m_location = m_tempLocation; } // Overwrite title if (m_location.getC_Location_ID() == 0) setTitle(Msg.getMsg(Env.getCtx(), "LocationNew")); else setTitle(Msg.getMsg(Env.getCtx(), "LocationUpdate")); // Current Country // MCountry.setDisplayLanguage(Env.getAD_Language(Env.getCtx())); fCountry = new CComboBox(MCountry.getCountries(Env.getCtx())); fCountry.setSelectedItem(m_location.getCountry()); m_origCountry_ID = m_location.getC_Country_ID(); // Current Region fRegion = new CComboBox(MRegion.getRegions(Env.getCtx(), m_origCountry_ID)); if (m_location.getCountry().isHasRegion()) lRegion.setText(m_location.getCountry().getRegionName()); // name for region fRegion.setSelectedItem(m_location.getRegion()); // Kenos - Faire // Current City if (m_location.getC_Region_ID() != 0) { fCity = new CComboBox(getCCity()); fCity.setSelectedItem(new MCity(Env.getCtx(), m_location.getC_City_ID(), null)); } else fCity = new CComboBox(); // initLocation(); fCountry.addActionListener(this); // Kenos fRegion.addActionListener(this); // AEnv.positionCenterWindow(frame, this); } // VLocationDialog