• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java JMessageDialog类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.openbravo.data.gui.JMessageDialog的典型用法代码示例。如果您正苦于以下问题:Java JMessageDialog类的具体用法?Java JMessageDialog怎么用?Java JMessageDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



JMessageDialog类属于com.openbravo.data.gui包,在下文中一共展示了JMessageDialog类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: executeTask

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
/**
 *
 * @param sTaskClass
 */
@Override
public void executeTask(String sTaskClass) {
    
    m_appview.waitCursorBegin();       

    if (m_appuser.hasPermission(sTaskClass)) {
        try {
            ProcessAction myProcess = (ProcessAction) m_appview.getBean(sTaskClass);

            try {
                MessageInf m = myProcess.execute();    
                if (m != null) {
                    JMessageDialog.showMessage(JPrincipalApp.this, m);
                }
            } catch (BasicException eb) {
                JMessageDialog.showMessage(JPrincipalApp.this, new MessageInf(eb));            
            }
        } catch (BeanFactoryException e) {
            JMessageDialog.showMessage(JPrincipalApp.this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("Label.LoadError"), e));            
        }                    
    } else  {
        JMessageDialog.showMessage(JPrincipalApp.this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.notpermissions")));            
    }
    m_appview.waitCursorEnd();    
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:30,代码来源:JPrincipalApp.java


示例2: m_jCatalogAddActionPerformed

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
private void m_jCatalogAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jCatalogAddActionPerformed

        try {
            Object param = m_id;
            m_sentdel.exec(param); // primero borramos
            m_sentadd.exec(param); // y luego insertamos lo que queda
// JG 3 Oct 2013 - simple toggle Category state
// TODO replace with ToggleButton            
            m_jCatalogAdd.setEnabled(false);
            m_jCatalogDelete.setEnabled(true);
            jLabel8.setText(AppLocal.getIntString("label.CatalogueStatusYes"));
         
        } catch (BasicException e) {
            JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotexecute"), e));
        }

    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:18,代码来源:CategoriesEditor.java


示例3: addFKeys

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
/**
 *
 * @return
 */
public Boolean addFKeys() {
    if ("".equals(eScript3)) {
        return (false);
    }
    try {
        BatchSentence bsentence = new BatchSentenceResource(session2, eScript3);
        java.util.List l = bsentence.list();
        if (l.size() > 0) {
            JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("migration.warning"), l.toArray(new Throwable[l.size()])));
        }

    } catch (BasicException e) {
        JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_DANGER, AppLocal.getIntString("database.ScriptNotFound"), e));
        session.close();
    } finally {
    }
    return (true);

}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:24,代码来源:JPaneldbMigrate.java


示例4: activate

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
/**
     *
     * @throws BasicException
     */
    @Override
    public void activate() throws BasicException {
        // connect to the database
        String db_user = (m_props.getProperty("db.user"));
        String db_url = (m_props.getProperty("db.URL"));
        String db_password = (m_props.getProperty("db.password"));

        if (db_user != null && db_password != null && db_password.startsWith("crypt:")) {
            // the password is encrypted
            AltEncrypter cypher = new AltEncrypter("cypherkey" + db_user);
            db_password = cypher.decrypt(db_password.substring(6));
        }

        try {
            session = AppViewConnection.createSession(m_props);
            con = DriverManager.getConnection(db_url, db_user, db_password);
            sdbmanager = con.getMetaData().getDatabaseProductName();
        } catch (BasicException | SQLException e) {
// put some error trap here  

            JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_DANGER, AppLocal.getIntString("database.UnableToConnect"), e));
            System.exit(0);
        }

    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:30,代码来源:JPaneldbMigrate.java


示例5: activate

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
/**
     *
     * @throws BasicException
     */
    @Override
    public void activate() throws BasicException {
       // connect to the database
         String db_user =(m_props.getProperty("db.user"));
         String db_url = (m_props.getProperty("db.URL"));
         String db_password = (m_props.getProperty("db.password"));     
         
         if (db_user != null && db_password != null && db_password.startsWith("crypt:")) {
                // the password is encrypted
                AltEncrypter cypher = new AltEncrypter("cypherkey" + db_user);
                db_password = cypher.decrypt(db_password.substring(6));
         }
        
         try{
            session = AppViewConnection.createSession(m_props);
            con = DriverManager.getConnection(db_url,db_user,db_password);                   
            sdbmanager = con.getMetaData().getDatabaseProductName(); 
            } catch (BasicException | SQLException e) {    
// put some error trap here  
                
         JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_DANGER, AppLocal.getIntString("database.UnableToConnect"), e));
         System.exit(0);
       }        
      
    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:30,代码来源:JPaneldbUpdate.java


示例6: m_jPrintActionPerformed

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
private void m_jPrintActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jPrintActionPerformed

        InputStream schema = getClass().getResourceAsStream(PRINTER_SHEMA);
        InputStream template = getClass().getResourceAsStream(PRINT_TICKET_PREVIEW);

        if (m_ticket != null) {
            m_TTP2 = new TicketParser(schema, m_App.getDeviceTicket());
            try {
                ScriptEngine script = ScriptFactory.getScriptEngine(ScriptFactory.VELOCITY);
                script.put("ticket", m_ticket);
                script.put("local", new AppLocal());
                m_TTP2.printTicket(template, script);
            } catch (ScriptException | TicketPrinterException e) {
                JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_NOTICE, AppLocal.getIntString("message.cannotprint"), e));
            }
        }

    }
 
开发者ID:nordpos,项目名称:nordpos,代码行数:19,代码来源:JTicketsBagTicket.java


示例7: jcmdOKActionPerformed

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
private void jcmdOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmdOKActionPerformed

        if (new String(jtxtPasswordNew.getPassword()).equals(new String(jtxtPasswordRepeat.getPassword()))) {
            if (Hashcypher.authenticate(new String(jtxtPasswordOld.getPassword()), m_sOldPassword)) {
                m_sNewPassword = Hashcypher.hashString(new String(jtxtPasswordNew.getPassword()));
                dispose();
            } else {
                JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.BadPassword")));
            }
        } else {
            JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.changepassworddistinct")));
        }
    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:14,代码来源:JDlgChangePassword.java


示例8: actionPerformed

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
public void actionPerformed(ActionEvent evt) {
               
    String sNewPassword = Hashcypher.changePassword(JPrincipalApp.this, m_appuser.getPassword());
    if (sNewPassword != null) {
        try {
            
            m_dlSystem.execChangePassword(new Object[] {sNewPassword, m_appuser.getId()});
            m_appuser.setPassword(sNewPassword);
        } catch (BasicException e) {
            JMessageDialog.showMessage(JPrincipalApp.this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotchangepassword")));             
        }
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:14,代码来源:JPrincipalApp.java


示例9: executeTask

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
public void executeTask(String sTaskClass) {
    
    m_appview.waitCursorBegin();       

    if (m_appuser.hasPermission(sTaskClass)) {
        try {
            ProcessAction myProcess = (ProcessAction) m_appview.getBean(sTaskClass);

            // execute the proces
            try {
                MessageInf m = myProcess.execute();    
                if (m != null) {
                    // si devuelve un mensaje, lo muestro
                    JMessageDialog.showMessage(JPrincipalApp.this, m);
                }
            } catch (BasicException eb) {
                // Si se produce un error lo muestro.
                JMessageDialog.showMessage(JPrincipalApp.this, new MessageInf(eb));            
            }
        } catch (BeanFactoryException e) {
            JMessageDialog.showMessage(JPrincipalApp.this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("Label.LoadError"), e));            
        }                    
    } else  {
        // No hay permisos para ejecutar la accion...
        JMessageDialog.showMessage(JPrincipalApp.this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.notpermissions")));            
    }
    m_appview.waitCursorEnd();    
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:29,代码来源:JPrincipalApp.java


示例10: selectCategoryPanel

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
private void selectCategoryPanel(String catid) {

        try {
            // Load categories panel if not exists
            if (!m_categoriesset.contains(catid)) {
                
                JCatalogTab jcurrTab = new JCatalogTab();     
                jcurrTab.applyComponentOrientation(getComponentOrientation());
                m_jProducts.add(jcurrTab, catid);
                m_categoriesset.add(catid);
               
                // Add subcategories
                java.util.List<CategoryInfo> categories = m_dlSales.getSubcategories(catid);
                for (CategoryInfo cat : categories) {

                    jcurrTab.addButton(new ImageIcon(tnbbutton.getThumbNailText(cat.getImage(), cat.getName())), new SelectedCategory(cat));
                }
                
                // Add products
                java.util.List<ProductInfoExt> products = m_dlSales.getProductCatalog(catid);
                for (ProductInfoExt prod : products) {
                    jcurrTab.addButton(new ImageIcon(tnbbutton.getThumbNailText(prod.getImage(), getProductLabel(prod))), new SelectedAction(prod));
                }
            }
            
            // Show categories panel
            CardLayout cl = (CardLayout)(m_jProducts.getLayout());
            cl.show(m_jProducts, catid);  
        } catch (BasicException e) {
            JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.notactive"), e));            
        }
    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:33,代码来源:JCatalog.java


示例11: m_jCatalogDeleteActionPerformed

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
private void m_jCatalogDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jCatalogDeleteActionPerformed

        try {
            m_sentdel.exec(m_id);
        } catch (BasicException e) {
            JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotexecute"), e));
        }
        
    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:10,代码来源:CategoriesEditor.java


示例12: m_jCatalogAddActionPerformed

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
private void m_jCatalogAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jCatalogAddActionPerformed

        try {
            Object param = m_id;
            m_sentdel.exec(param); // primero borramos
            m_sentadd.exec(param); // y luego insertamos lo que queda
        } catch (BasicException e) {
            JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotexecute"), e));
        }

    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:12,代码来源:CategoriesEditor.java


示例13: restoreProperties

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
private void restoreProperties() {
    
    if (config.delete()) {
        loadProperties();
    } else {
        JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotdeleteconfig")));            
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:9,代码来源:JPanelConfiguration.java


示例14: saveProperties

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
private void saveProperties() {
    
    // paneles auxiliares
    for (PanelConfig c: m_panelconfig) {
        c.saveProperties(config);
    }
    
    try {
        config.save();
        JOptionPane.showMessageDialog(this, AppLocal.getIntString("message.restartchanges"), AppLocal.getIntString("message.title"), JOptionPane.INFORMATION_MESSAGE);
    } catch (IOException e) {
        JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotsaveconfig"), e));
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:15,代码来源:JPanelConfiguration.java


示例15: activate

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
/**
 *
 * @throws BasicException
 */
@Override
public void activate() throws BasicException {
            
   // connect to the database
     String db_user =(m_props.getProperty("db.user"));
     String db_url = (m_props.getProperty("db.URL"));
     String db_password = (m_props.getProperty("db.password"));     
     
     if (db_user != null && db_password != null && db_password.startsWith("crypt:")) {
            // the password is encrypted
            AltEncrypter cypher = new AltEncrypter("cypherkey" + db_user);
            db_password = cypher.decrypt(db_password.substring(6));
    }
    
     try{
        session = AppViewConnection.createSession(m_props);
        con = DriverManager.getConnection(db_url,db_user,db_password);                   
        sdbmanager = con.getMetaData().getDatabaseProductName(); 
        stmt = (Statement) con.createStatement(); 
        } catch (BasicException | SQLException e) {    
            
     JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_DANGER, AppLocal.getIntString("database.UnableToConnect"), e));
     System.exit(0);
   }        
  
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:31,代码来源:JPanelResetPickupId.java


示例16: printTicket

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
private void printTicket(String sresourcename, TicketInfo ticket, String table) {
           if (ticket != null) {
           try {
               ScriptEngine script = ScriptFactory.getScriptEngine(ScriptFactory.VELOCITY);
               script.put("ticket", ticket);              
               script.put("place",m_restaurant.getTableName());
               m_TTP2.printTicket(script.eval(m_dlSystem.getResourceAsXML(sresourcename)).toString());                
           } catch ( ScriptException | TicketPrinterException e) {
               JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_NOTICE, AppLocal.getIntString("message.cannotprint"), e));
           }
       } 
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:13,代码来源:JTicketsBagRestaurant.java


示例17: actionPerformed

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
@Override
public void actionPerformed(ActionEvent evt) {
               
    String sNewPassword = Hashcypher.changePassword(JPrincipalApp.this, m_appuser.getPassword());
    if (sNewPassword != null) {
        try {
            
            m_dlSystem.execChangePassword(new Object[] {sNewPassword, m_appuser.getId()});
            m_appuser.setPassword(sNewPassword);
        } catch (BasicException e) {
            JMessageDialog.showMessage(JPrincipalApp.this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotchangepassword")));             
        }
    }
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:15,代码来源:JPrincipalApp.java


示例18: selectCategoryPanel

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
private void selectCategoryPanel(String catid) {
        try {
            // Load categories panel if not exists
            if (!m_categoriesset.contains(catid)) {
                
                JCatalogTab jcurrTab = new JCatalogTab();     
                jcurrTab.applyComponentOrientation(getComponentOrientation());
                m_jProducts.add(jcurrTab, catid);
                m_categoriesset.add(catid);
               
// Add subcategories
                java.util.List<CategoryInfo> categories = m_dlSales.getSubcategories(catid);
                for (CategoryInfo cat : categories) {
// these the sub categories displayed in the main products Panel    
                   
                   if (cat.getCatShowName()) {
                    jcurrTab.addButton(new ImageIcon(tnbsubcat.getThumbNailText(cat.getImage(), cat.getName())), new SelectedCategory(cat),cat.getTextTip());
                   }else{
                    jcurrTab.addButton(new ImageIcon(tnbsubcat.getThumbNailText(cat.getImage(), "")), new SelectedCategory(cat),cat.getTextTip());
                   }
                }
                
// Add products
                java.util.List<ProductInfoExt> products = m_dlSales.getProductCatalog(catid);
                for (ProductInfoExt prod : products) {
// These are the products selection panel     
                   jcurrTab.addButton( new ImageIcon(tnbbutton.getThumbNailText(prod.getImage(), getProductLabel(prod))), new SelectedAction(prod),prod.getTextTip());
                }
                }
            
            // Show categories panel
            CardLayout cl = (CardLayout)(m_jProducts.getLayout());
            cl.show(m_jProducts, catid);  
        } catch (BasicException e) {
            JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.notactive"), e));            
        }
    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:38,代码来源:JCatalog.java


示例19: m_jCatalogDeleteActionPerformed

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
private void m_jCatalogDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jCatalogDeleteActionPerformed

        try {
            m_sentdel.exec(m_id);
// JG 3 Oct 2013 - simple toggle Category state         
// TODO replace with ToggleButton
            m_jCatalogDelete.setEnabled(false);            
            m_jCatalogAdd.setEnabled(true);    
            jLabel8.setText(AppLocal.getIntString("label.CatalogueStatusNo"));
        } catch (BasicException e) {
            JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotexecute"), e));
        }
        
    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:15,代码来源:CategoriesEditor.java


示例20: getSeconddbDetails

import com.openbravo.data.gui.JMessageDialog; //导入依赖的package包/类
/**
 *
 * @return
 */
public Boolean getSeconddbDetails() {

    String db_user2 = jtxtDbUser.getText();
    String db_url2 = jtxtDbURL.getText();
    char[] pass = jtxtDbPassword.getPassword();
    String db_password2 = new String(pass);

    Properties connectionProps = new Properties();
    connectionProps.put("user", db_user2);
    connectionProps.put("password", db_password2);
    try {
        Class.forName(jtxtDbDriver.getText());

        ClassLoader cloader = new URLClassLoader(new URL[]{new File(jtxtDbDriverLib.getText()).toURI().toURL()});
        DriverManager.registerDriver(new DriverWrapper((Driver) Class.forName(jtxtDbDriver.getText(), true, cloader).newInstance()));
        con2 = (Connection) DriverManager.getConnection(db_url2, db_user2, db_password2);

        session2 = new Session(db_url2, db_user2, db_password2);
        sdbmanager2 = con2.getMetaData().getDatabaseProductName();
        return (true);
    } catch (ClassNotFoundException | MalformedURLException | InstantiationException | IllegalAccessException | SQLException e) {
        JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_DANGER, AppLocal.getIntString("database.UnableToConnect"), e));
        return (false);
    }


}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:32,代码来源:JPaneldbMigrate.java



注:本文中的com.openbravo.data.gui.JMessageDialog类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java StringValue类代码示例发布时间:2022-05-23
下一篇:
Java PlayerSpawnLocationEvent类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap