当前位置: 首页>>代码示例>>Java>>正文


Java StringUtils类代码示例

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


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

示例1: init

import com.openbravo.pos.util.StringUtils; //导入依赖的package包/类
/**
     *
     * @param app
     * @throws BeanFactoryException
     */
    @Override
    public void init(AppView app) throws BeanFactoryException {
        
        // Resource
        try {
            ScriptEngine eng = ScriptFactory.getScriptEngine(ScriptFactory.BEANSHELL);
            eng.put("app", app);
            
            bean = (BeanFactory) eng.eval(StringUtils.readResource(script));
            if (bean == null) {
                // old definition
                bean = (BeanFactory) eng.get("bean");
            }
            
            // todo // llamar al init del bean
            if (bean instanceof BeanFactoryApp) {
                ((BeanFactoryApp) bean).init(app);
            }
// JG 16 May use multicatch
        } catch (ScriptException | IOException e) {
            throw new BeanFactoryException(e);
        }     
    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:29,代码来源:BeanFactoryScript.java

示例2: getSHA1

import com.openbravo.pos.util.StringUtils; //导入依赖的package包/类
public String getSHA1(String input){
    byte[] output = null;
    try {
        MessageDigest md = MessageDigest.getInstance("SHA1");
        md.update(input.getBytes()); 
        output = md.digest();
    } catch (Exception e) {
        System.out.println("Exception: "+e);
    }
    return StringUtils.byte2hex(output);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:12,代码来源:PaymentGatewayCaixa.java

示例3: getSHA1

import com.openbravo.pos.util.StringUtils; //导入依赖的package包/类
/**
     *
     * @param input
     * @return
     */
    public String getSHA1(String input){
        byte[] output = null;
        try {
            MessageDigest md = MessageDigest.getInstance("SHA1");
            md.update(input.getBytes()); 
            output = md.digest();
        } catch (Exception e) {
//            System.out.println("Exception: "+e);
        }
        return StringUtils.byte2hex(output);
    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:17,代码来源:PaymentGatewayCaixa.java

示例4: jButton2ActionPerformed

import com.openbravo.pos.util.StringUtils; //导入依赖的package包/类
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed

        if (JOptionPane.showConfirmDialog(this, AppLocal.getIntString("message.cardnew"), AppLocal.getIntString("title.editor"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
            jcard.setText(m_App.getUserCard() + StringUtils.getCardNumber());
            m_Dirty.setDirty(true);
        }

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

示例5: getTransactionID

import com.openbravo.pos.util.StringUtils; //导入依赖的package包/类
public String getTransactionID(){
    return (getPayments().size()>0)
        ? ( getPayments().get(getPayments().size()-1) ).getTransactionID()
        : StringUtils.getCardNumber(); //random transaction ID
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:6,代码来源:TicketInfo.java

示例6: printName

import com.openbravo.pos.util.StringUtils; //导入依赖的package包/类
public String printName() {
    return StringUtils.encodeXML(attributes.getProperty("product.name"));
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:4,代码来源:TicketLineInfo.java

示例7: JPrincipalApp

import com.openbravo.pos.util.StringUtils; //导入依赖的package包/类
/** Creates new form JPrincipalApp */
    public JPrincipalApp(JRootApp appview, AppUser appuser) {
        
        m_appview = appview; 
        m_appuser = appuser;
                   
        m_dlSystem = (DataLogicSystem) m_appview.getBean("com.openbravo.pos.forms.DataLogicSystem");
        
        // Cargamos los permisos del usuario
        m_appuser.fillPermissions(m_dlSystem);
               
        m_actionfirst = null;
        m_jLastView = null;
        m_aPreparedViews = new HashMap<String, JPanelView>();
        m_aCreatedViews = new HashMap<String, JPanelView>();
                
        initComponents();
        
        jPanel2.add(Box.createVerticalStrut(50), 0);        
        
        applyComponentOrientation(appview.getComponentOrientation());
        
        m_principalnotificator = new JLabel();
        m_principalnotificator.applyComponentOrientation(getComponentOrientation());
        m_principalnotificator.setText(m_appuser.getName());
        m_principalnotificator.setIcon(m_appuser.getIcon());
//        m_principalnotificator.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createLineBorder(javax.swing.UIManager.getDefaults().getColor("TextField.shadow")), javax.swing.BorderFactory.createEmptyBorder(1, 5, 1, 5)));        
        
        if (jButton1.getComponentOrientation().isLeftToRight()) {
            menu_open = new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/menu-right.png"));
            menu_close = new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/menu-left.png"));
        } else {
            menu_open = new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/menu-left.png"));
            menu_close = new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/menu-right.png"));
        }
        assignMenuButtonIcon();        
                
        // m_jPanelTitle.setUI(new GradientUI());
        m_jPanelTitle.setBorder(RoundedBorder.createGradientBorder());
        m_jPanelTitle.setVisible(false);
        
        // Anado el panel nulo
        m_jPanelContainer.add(new JPanel(), "<NULL>");
        showView("<NULL>");     
        
        try {

            m_jPanelLeft.setViewportView(getScriptMenu(m_dlSystem.getResourceAsText("Menu.Root")));
        } catch (ScriptException e) {
            logger.log(Level.SEVERE, "Cannot read Menu.Root resource. Trying defaut menu.", e);
            try {
                m_jPanelLeft.setViewportView(getScriptMenu(StringUtils.readResource("/com/openbravo/pos/templates/Menu.Root.txt")));
            } catch (IOException ex) {
                logger.log(Level.SEVERE, "Cannot read default menu", ex);
            } catch (ScriptException es) {
                logger.log(Level.SEVERE, "Cannot read default menu", es);
            }
        }               
    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:60,代码来源:JPrincipalApp.java

示例8: checkExpDate

import com.openbravo.pos.util.StringUtils; //导入依赖的package包/类
private boolean checkExpDate(String sDate) {
    return ( sDate.length()==4 && StringUtils.isNumber(sDate.trim()) );
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:4,代码来源:MagCardParserGeneric.java

示例9: jButton2ActionPerformed

import com.openbravo.pos.util.StringUtils; //导入依赖的package包/类
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
    if (JOptionPane.showConfirmDialog(this, AppLocal.getIntString("message.cardnew"), AppLocal.getIntString("title.editor"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {            
        jcard.setText("c" + StringUtils.getCardNumber());
        m_Dirty.setDirty(true);
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:7,代码来源:CustomersView.java

示例10: printTaxid

import com.openbravo.pos.util.StringUtils; //导入依赖的package包/类
public String printTaxid() {
    return StringUtils.encodeXML(taxid);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:4,代码来源:CustomerInfo.java

示例11: printName

import com.openbravo.pos.util.StringUtils; //导入依赖的package包/类
public String printName() {
    return StringUtils.encodeXML(name);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:4,代码来源:CustomerInfo.java

示例12: printHost

import com.openbravo.pos.util.StringUtils; //导入依赖的package包/类
public String printHost() {
    return StringUtils.encodeXML(m_sHost);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:4,代码来源:PaymentsModel.java

示例13: printLocation

import com.openbravo.pos.util.StringUtils; //导入依赖的package包/类
public String printLocation() {
    return StringUtils.encodeXML(m_locationOri.toString());
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:4,代码来源:InventoryRecord.java

示例14: printReason

import com.openbravo.pos.util.StringUtils; //导入依赖的package包/类
public String printReason() {
    return StringUtils.encodeXML(m_reason.toString());
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:4,代码来源:InventoryRecord.java

示例15: printName

import com.openbravo.pos.util.StringUtils; //导入依赖的package包/类
public String printName() {
    return StringUtils.encodeXML(m_sProdName);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:4,代码来源:InventoryLine.java


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