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

Java AppConfig类代码示例

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

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



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

示例1: loadProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
@Override
public void loadProperties(AppConfig config) {
    
    String sCommerceID = config.getProperty("payment.commerceid");
    String sCommerceTerminal = config.getProperty("payment.terminal");
    String sCommerceSign = config.getProperty("payment.commercesign");
    String sCommerceSHA = config.getProperty("payment.SHA");
    
    if (sCommerceID!=null && sCommerceTerminal!=null && sCommerceSign!=null && sCommerceSHA!=null && sCommerceSign.startsWith("crypt:")) {
        jtxtCommerceCode.setText(config.getProperty("payment.commerceid"));
        AltEncrypter cypher = new AltEncrypter("cypherkey");
        jtxtCommerceTerminal.setText(comboValue(config.getProperty("payment.terminal")));
        jtxtCommerceSign.setText(cypher.decrypt(config.getProperty("payment.commercesign").substring(6)));
        jCheckBox1.setSelected(Boolean.valueOf(config.getProperty("payment.SHA")).booleanValue());
    }
 
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:18,代码来源:ConfigPaymentPanelCaixa.java


示例2: saveProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
public void saveProperties(AppConfig config) {
    
    Locale l = ((LocaleInfo) jcboLocale.getSelectedItem()).getLocale();
    if (l == null) {
        config.setProperty("user.language", "");
        config.setProperty("user.country", "");
        config.setProperty("user.variant", "");
    } else {
        config.setProperty("user.language", l.getLanguage());
        config.setProperty("user.country", l.getCountry());
        config.setProperty("user.variant", l.getVariant());
    }
     
    config.setProperty("format.integer", readWithDefault(jcboInteger.getSelectedItem()));
    config.setProperty("format.double", readWithDefault(jcboDouble.getSelectedItem()));
    config.setProperty("format.currency", readWithDefault(jcboCurrency.getSelectedItem()));
    config.setProperty("format.percent", readWithDefault(jcboPercent.getSelectedItem()));
    config.setProperty("format.date", readWithDefault(jcboDate.getSelectedItem()));
    config.setProperty("format.time", readWithDefault(jcboTime.getSelectedItem()));
    config.setProperty("format.datetime", readWithDefault(jcboDatetime.getSelectedItem()));
    
    dirty.setDirty(false);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:24,代码来源:JPanelConfigLocale.java


示例3: loadProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
public void loadProperties(AppConfig config) {

        jtxtUrl.setText(config.getProperty("erp.URL"));    
        jtxtId.setText(config.getProperty("erp.id"));
        jTextField2.setText(config.getProperty("erp.pos"));
        jTextField1.setText(config.getProperty("erp.org"));
        
        String sERPUser = config.getProperty("erp.user");
        String sERPPassword = config.getProperty("erp.password");        
        if (sERPUser != null && sERPPassword != null && sERPPassword.startsWith("crypt:")) {
            // La clave esta encriptada.
            AltEncrypter cypher = new AltEncrypter("cypherkey" + sERPUser);
            sERPPassword = cypher.decrypt(sERPPassword.substring(6));
        }        
        jtxtName.setText(sERPUser);
        jtxtPassword.setText(sERPPassword);    
        
        dirty.setDirty(false);
    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:20,代码来源:JPanelConfigERP.java


示例4: loadProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
public void loadProperties(AppConfig config) {
    
    jtxtDbDriverLib.setText(config.getProperty("db.driverlib"));
    jtxtDbDriver.setText(config.getProperty("db.driver"));
    jtxtDbURL.setText(config.getProperty("db.URL"));
    
    String sDBUser = config.getProperty("db.user");
    String sDBPassword = config.getProperty("db.password");        
    if (sDBUser != null && sDBPassword != null && sDBPassword.startsWith("crypt:")) {
        // La clave esta encriptada.
        AltEncrypter cypher = new AltEncrypter("cypherkey" + sDBUser);
        sDBPassword = cypher.decrypt(sDBPassword.substring(6));
    }        
    jtxtDbUser.setText(sDBUser);
    jtxtDbPassword.setText(sDBPassword);   
    
    dirty.setDirty(false);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:19,代码来源:JPanelConfigDatabase.java


示例5: saveProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
     *
     * @param config
     */
    @Override
    public void saveProperties(AppConfig config) {
        
        config.setProperty("till.receiptprefix", jTextReceiptPrefix.getText());
        config.setProperty("till.receiptsize", jReceiptSize.getValue().toString());
        config.setProperty("till.pickupsize", jPickupSize.getValue().toString());        
        config.setProperty("till.receiptprintoff",Boolean.toString(m_jReceiptPrintOff.isSelected()));
        
/** Added: JG 23 July 13 */
        config.setProperty("till.SCOnOff",Boolean.toString(jchkSCOnOff.isSelected()));
        config.setProperty("till.SCRate",jTextSCRate.getText());
        config.setProperty("till.SCRestaurant",Boolean.toString(jchkSCRestaurant.isSelected()));
/** - */             
        
        dirty.setDirty(false);
    }
 
开发者ID:herbiehp,项目名称:unicenta,代码行数:21,代码来源:JPanelTicketSetup.java


示例6: loadProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
 *
 * @param config
 */
@Override
public void loadProperties(AppConfig config) {
    
    String sCommerceID = config.getProperty("payment.commerceid");
    String sCommerceTerminal = config.getProperty("payment.terminal");
    String sCommerceSign = config.getProperty("payment.commercesign");
    String sCommerceSHA = config.getProperty("payment.SHA");
    
    if (sCommerceID!=null && sCommerceTerminal!=null && sCommerceSign!=null && sCommerceSHA!=null && sCommerceSign.startsWith("crypt:")) {
        jtxtCommerceCode.setText(config.getProperty("payment.commerceid"));
        AltEncrypter cypher = new AltEncrypter("cypherkey");
        jtxtCommerceTerminal.setText(comboValue(config.getProperty("payment.terminal")));
        jtxtCommerceSign.setText(cypher.decrypt(config.getProperty("payment.commercesign").substring(6)));
        jCheckBox1.setSelected(Boolean.valueOf(config.getProperty("payment.SHA")).booleanValue());
    }
 
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:22,代码来源:ConfigPaymentPanelCaixa.java


示例7: saveProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
 *
 * @param config
 */
public void saveProperties(AppConfig config) {
    
    Locale l = ((LocaleInfo) jcboLocale.getSelectedItem()).getLocale();
    if (l == null) {
        config.setProperty("user.language", "");
        config.setProperty("user.country", "");
        config.setProperty("user.variant", "");
    } else {
        config.setProperty("user.language", l.getLanguage());
        config.setProperty("user.country", l.getCountry());
        config.setProperty("user.variant", l.getVariant());
    }
     
    config.setProperty("format.integer", readWithDefault(jcboInteger.getSelectedItem()));
    config.setProperty("format.double", readWithDefault(jcboDouble.getSelectedItem()));
    config.setProperty("format.currency", readWithDefault(jcboCurrency.getSelectedItem()));
    config.setProperty("format.percent", readWithDefault(jcboPercent.getSelectedItem()));
    config.setProperty("format.date", readWithDefault(jcboDate.getSelectedItem()));
    config.setProperty("format.time", readWithDefault(jcboTime.getSelectedItem()));
    config.setProperty("format.datetime", readWithDefault(jcboDatetime.getSelectedItem()));
    
    dirty.setDirty(false);
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:28,代码来源:JPanelConfigLocale.java


示例8: main

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
     * @param args the command line arguments
     */
    public static void main(final String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                
                AppConfig config = new AppConfig(args);
                config.load();    
                
// Set the look and feel.
// JG 6 May 2013 to Multicatch                
                try {                    
                    UIManager.setLookAndFeel(config.getProperty("swing.defaultlaf"));
                } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
                }
                
                new JFrmConfig(config).setVisible(true);
            }
        });
    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:23,代码来源:JFrmConfig.java


示例9: saveProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
 *
 * @param config
 */
@Override
public void saveProperties(AppConfig config) {
    
    config.setProperty("till.autotimer",jTextAutoLogoffTime.getText());
    config.setProperty("till.marineoption", Boolean.toString(jMarineOpt.isSelected()));
    config.setProperty("table.showcustomerdetails", Boolean.toString(jchkShowCustomerDetails.isSelected()));
    config.setProperty("table.showwaiterdetails", Boolean.toString(jchkShowWaiterDetails.isSelected()));        
    config.setProperty("payments.textoverlay", Boolean.toString(jchkTextOverlay.isSelected()));         
    config.setProperty("till.autoLogoff", Boolean.toString(jchkAutoLogoff.isSelected()));                 
    config.setProperty("till.autoLogoffrestaurant", Boolean.toString(jchkAutoLogoffToTables.isSelected()));                        
    config.setProperty("table.customercolour",jCustomerColour.getSelectedItem().toString());
    config.setProperty("table.waitercolour",jWaiterColour.getSelectedItem().toString());
    config.setProperty("table.tablecolour",jTableNameColour.getSelectedItem().toString());         
    config.setProperty("till.taxincluded",Boolean.toString(jTaxIncluded.isSelected()));                     
    config.setProperty("till.pricewith00",Boolean.toString(jCheckPrice00.isSelected()));                         
    config.setProperty("till.amountattop",Boolean.toString(jMoveAMountBoxToTop.isSelected()));         
    config.setProperty("screen.600800",Boolean.toString(jCloseCashbtn.isSelected())); 
    
     
    dirty.setDirty(false);
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:26,代码来源:JPanelConfigSystem.java


示例10: loadProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
 *
 * @param config
 */
@Override
public void loadProperties(AppConfig config) {
  
    jcboDBDriver.setSelectedItem(config.getProperty("db.engine"));
    jtxtDbDriverLib.setText(config.getProperty("db.driverlib"));
    jtxtDbDriver.setText(config.getProperty("db.driver"));
    jtxtDbURL.setText(config.getProperty("db.URL"));
    
    String sDBUser = config.getProperty("db.user");
    String sDBPassword = config.getProperty("db.password");        
    if (sDBUser != null && sDBPassword != null && sDBPassword.startsWith("crypt:")) {
        // La clave esta encriptada.
        AltEncrypter cypher = new AltEncrypter("cypherkey" + sDBUser);
        sDBPassword = cypher.decrypt(sDBPassword.substring(6));
    }        
    jtxtDbUser.setText(sDBUser);
    jtxtDbPassword.setText(sDBPassword);   
    
    dirty.setDirty(false);
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:25,代码来源:JPanelConfigDatabase.java


示例11: loadProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
 *
 * @param config
 */
@Override
public void loadProperties(AppConfig config) {

    jtxtMachineHostname.setText(config.getProperty("machine.hostname"));

    String lafclass = config.getProperty("swing.defaultlaf");
    jcboLAF.setSelectedItem(null);
    for (int i = 0; i < jcboLAF.getItemCount(); i++) {
        LAFInfo lafinfo = (LAFInfo) jcboLAF.getItemAt(i);
        if (lafinfo.getClassName().equals(lafclass)) {
            jcboLAF.setSelectedIndex(i);
            break;
        }
    }
    // jcboLAF.setSelectedItem(new LookAndFeelInfo());

    jcboMachineScreenmode.setSelectedItem(config.getProperty("machine.screenmode"));
    jcboTicketsBag.setSelectedItem(config.getProperty("machine.ticketsbag"));
    jchkHideInfo.setSelected(Boolean.valueOf(config.getProperty("till.hideinfo")).booleanValue());        
    jtxtStartupLogo.setText(config.getProperty("start.logo"));
    jtxtStartupText.setText(config.getProperty("start.text"));          
  
    dirty.setDirty(false);
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:29,代码来源:JPanelConfigGeneral.java


示例12: saveProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
 *
 * @param config
 */
@Override
public void saveProperties(AppConfig config) {

    config.setProperty("machine.hostname", jtxtMachineHostname.getText());
    
    LAFInfo laf = (LAFInfo) jcboLAF.getSelectedItem();
    config.setProperty("swing.defaultlaf", laf == null
            ? System.getProperty("swing.defaultlaf", "javax.swing.plaf.metal.MetalLookAndFeel")
            : laf.getClassName());

    config.setProperty("machine.screenmode", comboValue(jcboMachineScreenmode.getSelectedItem()));
    config.setProperty("machine.ticketsbag", comboValue(jcboTicketsBag.getSelectedItem()));
    config.setProperty("till.hideinfo", Boolean.toString(jchkHideInfo.isSelected()));         
    config.setProperty("start.logo", jtxtStartupLogo.getText());
    config.setProperty("start.text", jtxtStartupText.getText());
    
    dirty.setDirty(false);
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:23,代码来源:JPanelConfigGeneral.java


示例13: main

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
     * @param args the command line arguments
     */
    public static void main(final String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                
                AppConfig config = new AppConfig(args);
                config.load();    
                
// Set the look and feel.
// JG 6 May 2013 to Multicatch                
             //   try {                    
               //     UIManager.setLookAndFeel(config.getProperty("swing.defaultlaf"));
               // } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
               // }

                new JFrmMigrate(config).setVisible(true);                

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


示例14: main

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
     * @param args the command line arguments
     */
    public static void main(final String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                
                AppConfig config = new AppConfig(args);
                config.load();    
                
// Set the look and feel.
// JG 6 May 2013 to Multicatch                
                try {                    
                    Object laf = Class.forName(config.getProperty("swing.defaultlaf")).newInstance();                    
                    if (laf instanceof LookAndFeel){
                        UIManager.setLookAndFeel((LookAndFeel) laf);
                    } else if (laf instanceof SubstanceSkin) {                      
                        SubstanceLookAndFeel.setSkin((SubstanceSkin) laf);                   
                    }
// JG 6 May 2013 to multicatch
                } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
                }
                
                new JdbUpdate(config).setVisible(true);
            }
        });
    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:29,代码来源:JdbUpdate.java


示例15: loadProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
 *
 * @param config
 */
@Override
public void loadProperties(AppConfig config) {

    jtxtUrl.setText(config.getProperty("erp.URL"));    
    jtxtId.setText(config.getProperty("erp.id"));
    jTextField2.setText(config.getProperty("erp.pos"));
    jTextField1.setText(config.getProperty("erp.org"));
    
    String sERPUser = config.getProperty("erp.user");
    String sERPPassword = config.getProperty("erp.password");        
    if (sERPUser != null && sERPPassword != null && sERPPassword.startsWith("crypt:")) {
        // La clave esta encriptada.
        AltEncrypter cypher = new AltEncrypter("cypherkey" + sERPUser);
        sERPPassword = cypher.decrypt(sERPPassword.substring(6));
    }        
    jtxtName.setText(sERPUser);
    jtxtPassword.setText(sERPPassword);    
    
    dirty.setDirty(false);
}
 
开发者ID:herbiehp,项目名称:unicenta,代码行数:25,代码来源:JPanelConfigERP.java


示例16: loadProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
@Override
public void loadProperties(AppConfig config) {
    String sCommerceID = config.getProperty("payment.commerceid");
    String sCertificatePass = config.getProperty("payment.certificatePassword");
    String sCertificatePath = config.getProperty("payment.certificatePath");
    
    if (sCommerceID!=null && sCertificatePath!=null && sCertificatePass!=null && sCertificatePass.startsWith("crypt:")) {
        jtxtStoreName.setText(config.getProperty("payment.commerceid"));
        AltEncrypter cypher = new AltEncrypter("cypherkey");
        jtxtCertificatePass.setText(cypher.decrypt(config.getProperty("payment.certificatePassword").substring(6)));
        jtxtCertificatePath.setText(config.getProperty("payment.certificatePath"));
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:14,代码来源:ConfigPaymentPanelLinkPoint.java


示例17: saveProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
@Override
public void saveProperties(AppConfig config) {
    AltEncrypter cypher = new AltEncrypter("cypherkey");      
    config.setProperty("payment.commerceid", comboValue(jtxtStoreName.getText()));
    config.setProperty("payment.certificatePath", comboValue(jtxtCertificatePath.getText()));
    config.setProperty("payment.certificatePassword", "crypt:" + cypher.encrypt(new String(jtxtCertificatePass.getPassword())));
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:8,代码来源:ConfigPaymentPanelLinkPoint.java


示例18: loadProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
@Override
public void loadProperties(AppConfig config) {
    String sCommerceID = config.getProperty("payment.commerceid");
    String sCommercePass = config.getProperty("payment.commercepassword");
    
    if (sCommerceID != null && sCommercePass != null && sCommercePass.startsWith("crypt:")) {
        jtxtCommerceID.setText(config.getProperty("payment.commerceid"));
        AltEncrypter cypher = new AltEncrypter("cypherkey" + config.getProperty("payment.commerceid"));
        jtxtCommercePwd.setText(cypher.decrypt(config.getProperty("payment.commercepassword").substring(6)));
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:12,代码来源:ConfigPaymentPanelGeneric.java


示例19: saveProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
@Override
public void saveProperties(AppConfig config) {
    config.setProperty("payment.commerceid", comboValue(jtxtCommerceCode.getText()));
    config.setProperty("payment.terminal", comboValue(jtxtCommerceTerminal.getText()));
    AltEncrypter cypher = new AltEncrypter("cypherkey");
    config.setProperty("payment.commercesign", "crypt:" + cypher.encrypt(new String(jtxtCommerceSign.getPassword())));
    config.setProperty("payment.SHA", comboValue(jCheckBox1.isSelected()));
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:9,代码来源:ConfigPaymentPanelCaixa.java


示例20: loadProperties

import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
public void loadProperties(AppConfig config) {
    
    String slang = config.getProperty("user.language");
    String scountry = config.getProperty("user.country");
    String svariant = config.getProperty("user.variant");
    
    if (slang != null && !slang.equals("") && scountry != null && svariant != null) {                    
        Locale currentlocale = new Locale(slang, scountry, svariant);
        for (int i = 0 ; i < jcboLocale.getItemCount(); i++)  {
            LocaleInfo l = (LocaleInfo) jcboLocale.getItemAt(i);
            if (currentlocale.equals(l.getLocale())) {
                jcboLocale.setSelectedIndex(i);
                break;
            }
        }        
    } else {
        jcboLocale.setSelectedIndex(0);
    }
    
    jcboInteger.setSelectedItem(writeWithDefault(config.getProperty("format.integer")));
    jcboDouble.setSelectedItem(writeWithDefault(config.getProperty("format.double")));
    jcboCurrency.setSelectedItem(writeWithDefault(config.getProperty("format.currency")));
    jcboPercent.setSelectedItem(writeWithDefault(config.getProperty("format.percent")));
    jcboDate.setSelectedItem(writeWithDefault(config.getProperty("format.date")));
    jcboTime.setSelectedItem(writeWithDefault(config.getProperty("format.time")));
    jcboDatetime.setSelectedItem(writeWithDefault(config.getProperty("format.datetime")));
           
    dirty.setDirty(false);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:30,代码来源:JPanelConfigLocale.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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