Package net.xoetrope.swing

Examples of net.xoetrope.swing.XDialog


        m_trans = trans;
        m_pos = page;
    }

    public String openDlg() {
        XDialog dlg = (XDialog) pageMgr.loadPage(m_pos.getScreenLocation() + "/dialog/SelectProduct");
        m_dialog = dlg;
        dlg.setCaption(UtilProperties.getMessage(PosTransaction.resource, "PosSelectAProduct", Locale.getDefault()));
        //dlg.setModal(true);
        m_productsList = (XList) dlg.findComponent("productsList");
        XEventHelper.addMouseHandler(this, m_productsList, "DoubleClick");

        m_cancel = (XButton) dlg.findComponent("BtnCancel");
        m_select = (XButton) dlg.findComponent("BtnSelect");

        XEventHelper.addMouseHandler(this, m_cancel, "cancel");
        XEventHelper.addMouseHandler(this, m_select, "selectProduct");

        m_listModel = new DefaultListModel();
        for (Iterator i = m_productsMap.entrySet().iterator(); i.hasNext();) {
            Object o = i.next();
            Map.Entry entry = (Map.Entry)o;
            String val = entry.getValue().toString();
            m_listModel.addElement(val);
        }
        m_productsList.setModel(m_listModel);
        m_productsList.setVisibleRowCount(-1);
        m_productsList.ensureIndexIsVisible(m_productsList.getItemCount());
        m_productsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        m_productsList.setToolTipText(UtilProperties.getMessage(PosTransaction.resource, "PosSelectProductListDblClickTip", Locale.getDefault()));

        dlg.pack();
        dlg.showDialog(this);
        return m_productIdSelected;
    }
View Full Code Here


        m_trans = trans;
        m_pos = page;
    }

    public String openDlg() {
        XDialog dlg = (XDialog) pageMgr.loadPage(m_pos.getScreenLocation() + "/dialog/SelectProduct");
        m_dialog = dlg;
        dlg.setCaption(UtilProperties.getMessage(PosTransaction.resource, "PosSelectAProduct", Locale.getDefault()));
        //dlg.setModal(true);
        m_productsList = (XList) dlg.findComponent("productsList");
        XEventHelper.addMouseHandler(this, m_productsList, "DoubleClick");

        m_cancel = (XButton) dlg.findComponent("BtnCancel");
        m_select = (XButton) dlg.findComponent("BtnSelect");

        XEventHelper.addMouseHandler(this, m_cancel, "cancel");
        XEventHelper.addMouseHandler(this, m_select, "selectProduct");

        m_listModel = new DefaultListModel();
        for (Map.Entry<String, Object> entry : m_productsMap.entrySet()) {
            String val = entry.getValue().toString();
            m_listModel.addElement(val);
        }
        m_productsList.setModel(m_listModel);
        m_productsList.setVisibleRowCount(-1);
        m_productsList.ensureIndexIsVisible(m_productsList.getItemCount());
        m_productsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        m_productsList.setToolTipText(UtilProperties.getMessage(PosTransaction.resource, "PosSelectProductListDblClickTip", Locale.getDefault()));

        dlg.pack();
        dlg.showDialog(this);
        return m_productIdSelected;
    }
View Full Code Here

        m_trans = trans;
        m_pos = page;
    }

    public String openDlg() {
        XDialog dlg = (XDialog) pageMgr.loadPage(m_pos.getScreenLocation() + "/dialog/SelectProduct");
        m_dialog = dlg;
        dlg.setCaption(UtilProperties.getMessage("pos", "SelectAProduct", Locale.getDefault()));
        //dlg.setModal(true);
        m_productsList = (XList) dlg.findComponent("productsList");
        XEventHelper.addMouseHandler(this, m_productsList, "DoubleClick");

        m_cancel = (XButton) dlg.findComponent("BtnCancel");
        m_select = (XButton) dlg.findComponent("BtnSelect");
       
        XEventHelper.addMouseHandler(this, m_cancel, "cancel");
        XEventHelper.addMouseHandler(this, m_select, "selectProduct");

        m_listModel = new DefaultListModel();
        for (Iterator i = m_productsMap.entrySet().iterator(); i.hasNext();) {
            Object o = i.next();
            Map.Entry entry = (Map.Entry)o;
            String val = entry.getValue().toString();
            m_listModel.addElement(val);
        }
        m_productsList.setModel(m_listModel);
        m_productsList.setVisibleRowCount(-1);
        m_productsList.ensureIndexIsVisible(m_productsList.getItemCount());
        m_productsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        m_productsList.setToolTipText(UtilProperties.getMessage("pos", "SelectProductListDblClickTip", Locale.getDefault()));

        dlg.pack();
        dlg.showDialog(this);
        return m_productIdSelected;
    }
View Full Code Here

        m_trans = trans;
        m_pos = page;
    }

    public String openDlg() {
        XDialog dlg = (XDialog) pageMgr.loadPage(m_pos.getScreenLocation() + "/dialog/SelectProduct");
        m_dialog = dlg;
        dlg.setCaption(UtilProperties.getMessage("pos", "SelectAProduct", Locale.getDefault()));
        //dlg.setModal(true);
        m_productsList = (XList) dlg.findComponent("productsList");
        addMouseHandler(m_productsList, "DoubleClick");

        m_cancel = (XButton) dlg.findComponent("BtnCancel");
        m_select = (XButton) dlg.findComponent("BtnSelect");
        addMouseHandler(m_cancel, "cancel");
        addMouseHandler(m_select, "selectProduct");

        m_listModel = new DefaultListModel();
        for (Iterator i = m_productsMap.entrySet().iterator(); i.hasNext();) {
            Object o = i.next();
            Map.Entry entry = (Map.Entry)o;
            String val = entry.getValue().toString();
            m_listModel.addElement(val);
        }
        m_productsList.setModel(m_listModel);
        m_productsList.setVisibleRowCount(-1);
        m_productsList.ensureIndexIsVisible(m_productsList.getItemCount());
        m_productsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        m_productsList.setToolTipText(UtilProperties.getMessage("pos", "SelectProductListDblClickTip", Locale.getDefault()));

        dlg.pack();
        dlg.showDialog(this);
        return m_productIdSelected;
    }
View Full Code Here

TOP

Related Classes of net.xoetrope.swing.XDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.