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


Java Formats类代码示例

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


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

示例1: TableDefinition

import com.openbravo.format.Formats; //导入依赖的package包/类
/** Creates a new instance of TableDefinition */
public TableDefinition(
        Session s,
        String tablename, 
        String[] fieldname, String[] fieldtran, Datas[] fielddata, Formats[] fieldformat,
        int[] idinx) {
    
    m_s = s;
    this.tablename = tablename;       
    
    this.fieldname = fieldname;
    this.fieldtran = fieldtran;
    this.fielddata = fielddata;
    this.fieldformat = fieldformat;
  
    this.idinx = idinx;
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:18,代码来源:TableDefinition.java

示例2: calculatePriceSellTax

import com.openbravo.format.Formats; //导入依赖的package包/类
private void calculatePriceSellTax() {
    
    if (!reportlock) {
        reportlock = true;
        
        Double dPriceSell = (Double) pricesell;
        
        if (dPriceSell == null) {
            m_jPriceSellTax.setText(null);
        } else {               
            double dTaxRate = taxeslogic.getTaxRate((TaxCategoryInfo) taxcatmodel.getSelectedItem(), new Date());
            m_jPriceSellTax.setText(Formats.CURRENCY.formatValue(new Double(dPriceSell.doubleValue() * (1.0 + dTaxRate))));
        }            
        reportlock = false;
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:ProductsEditor.java

示例3: writeValueEdit

import com.openbravo.format.Formats; //导入依赖的package包/类
public void writeValueEdit(Object value) {
    Object[] res = (Object[]) value;
    m_sID = res[0];
    m_dCreated = (Date) res[1];
    m_timereservation.setCheckDates(m_dcurrentday, new Date(m_dcurrentday.getTime() + 3600000L));
    m_timereservation.setDate((Date) res[2]);
    CustomerInfo c = new CustomerInfo((String) res[3]);
    c.setTaxid((String) res[4]);
    c.setSearchkey((String) res[5]);
    c.setName((String) res[6]);
    assignCustomer(c);  
    m_jtxtChairs.setValueInteger(((Integer)res[7]).intValue());
    m_bReceived = ((Boolean)res[8]).booleanValue();
    m_jtxtDescription.setText(Formats.STRING.formatValue(res[9]));
    m_timereservation.setEnabled(true);
    txtCustomer.setEnabled(true);
    m_jtxtChairs.setEnabled(true);
    m_jtxtDescription.setEnabled(true);
    m_jKeys.setEnabled(true);

    m_jbtnReceive.setEnabled(!m_bReceived); // se habilita si no se ha recibido al cliente

    txtCustomer.activate();
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:25,代码来源:JTicketsBagRestaurantRes.java

示例4: calculateMargin

import com.openbravo.format.Formats; //导入依赖的package包/类
private void calculateMargin() {
    
    if (!reportlock) {
        reportlock = true;
        
        Double dPriceBuy = readCurrency(m_jPriceBuy.getText());
        Double dPriceSell = (Double) pricesell;

        if (dPriceBuy == null || dPriceSell == null) {
            m_jmargin.setText(null);
        } else {
            m_jmargin.setText(Formats.PERCENT.formatValue(new Double(dPriceSell.doubleValue() / dPriceBuy.doubleValue() - 1.0)));
        }    
        reportlock = false;
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:ProductsEditor.java

示例5: writeValueEdit

import com.openbravo.format.Formats; //导入依赖的package包/类
public void writeValueEdit(Object value) {
    Object[] people = (Object[]) value;
    m_oId = people[0];
    m_jName.setText(Formats.STRING.formatValue(people[1]));
    m_sPassword = Formats.STRING.formatValue(people[2]);
    m_RoleModel.setSelectedKey(people[3]);
    m_jVisible.setSelected(((Boolean) people[4]).booleanValue());
    jcard.setText(Formats.STRING.formatValue(people[5]));
    m_jImage.setImage((BufferedImage) people[6]);
    m_jName.setEnabled(true);
    m_jRole.setEnabled(true);
    m_jVisible.setEnabled(true);
    jcard.setEnabled(true);
    m_jImage.setEnabled(true);
    jButton1.setEnabled(true);
    jButton2.setEnabled(true);
    jButton3.setEnabled(true);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:19,代码来源:PeopleView.java

示例6: createValue

import com.openbravo.format.Formats; //导入依赖的package包/类
public Object createValue() throws BasicException {
    Object[] resource = new Object[4];

    resource[0] = m_oId == null ? UUID.randomUUID().toString() : m_oId;
    resource[1] = m_jName.getText();
    
    ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
    resource[2] = restype.getKey();
    if (restype == ResourceType.TEXT) {
        resource[3] = Formats.BYTEA.parseValue(m_jText.getText());
    } else if (restype == ResourceType.IMAGE) {
        resource[3] = ImageUtils.writeImage(m_jImage.getImage());
    } else if (restype == ResourceType.BINARY) {
        resource[3] = Base64Encoder.decode(m_jText.getText());
    } else {
        resource[3] = null;
    }

    return resource;
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:21,代码来源:ResourcesView.java

示例7: DataLogicSales

import com.openbravo.format.Formats; //导入依赖的package包/类
/** Creates a new instance of SentenceContainerGeneric */
public DataLogicSales() {
    stockdiaryDatas = new Datas[] {Datas.STRING, Datas.TIMESTAMP, Datas.INT, Datas.STRING, Datas.STRING, Datas.STRING, Datas.DOUBLE, Datas.DOUBLE};
    paymenttabledatas = new Datas[] {Datas.STRING, Datas.STRING, Datas.TIMESTAMP, Datas.STRING, Datas.STRING, Datas.DOUBLE};
    stockdatas = new Datas[] {Datas.STRING, Datas.STRING, Datas.STRING, Datas.DOUBLE, Datas.DOUBLE, Datas.DOUBLE};
    auxiliarDatas = new Datas[] {Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING};

    productsRow = new Row(
            new Field("ID", Datas.STRING, Formats.STRING),
            new Field(AppLocal.getIntString("label.prodref"), Datas.STRING, Formats.STRING, true, true, true),
            new Field(AppLocal.getIntString("label.prodbarcode"), Datas.STRING, Formats.STRING, false, true, true),
            new Field(AppLocal.getIntString("label.prodname"), Datas.STRING, Formats.STRING, true, true, true),
            new Field("ISCOM", Datas.BOOLEAN, Formats.BOOLEAN),
            new Field("ISSCALE", Datas.BOOLEAN, Formats.BOOLEAN),
            new Field(AppLocal.getIntString("label.prodpricebuy"), Datas.DOUBLE, Formats.CURRENCY, false, true, true),
            new Field(AppLocal.getIntString("label.prodpricesell"), Datas.DOUBLE, Formats.CURRENCY, false, true, true),
            new Field(AppLocal.getIntString("label.prodcategory"), Datas.STRING, Formats.STRING, false, false, true),
            new Field(AppLocal.getIntString("label.taxcategory"), Datas.STRING, Formats.STRING, false, false, true),
            new Field(AppLocal.getIntString("label.attributeset"), Datas.STRING, Formats.STRING, false, false, true),
            new Field("IMAGE", Datas.IMAGE, Formats.NULL),
            new Field("STOCKCOST", Datas.DOUBLE, Formats.CURRENCY),
            new Field("STOCKVOLUME", Datas.DOUBLE, Formats.DOUBLE),
            new Field("ISCATALOG", Datas.BOOLEAN, Formats.BOOLEAN),
            new Field("CATORDER", Datas.INT, Formats.INT),
            new Field("PROPERTIES", Datas.BYTES, Formats.NULL));
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:27,代码来源:DataLogicSales.java

示例8: printState

import com.openbravo.format.Formats; //导入依赖的package包/类
private void printState() {
    
    Double value = m_jTendered.getDoubleValue();
    if (value == null) {
        m_dPaid = m_dTotal;
    } else {
        m_dPaid = value;
    } 

    m_jMoneyEuros.setText(Formats.CURRENCY.formatValue(new Double(m_dPaid)));
    
    int iCompare = RoundUtils.compare(m_dPaid, m_dTotal);
    
    // if iCompare > 0 then the payment is not valid
    m_notifier.setStatus(m_dPaid > 0.0 && iCompare <= 0, iCompare == 0);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:JPaymentCheque.java

示例9: init

import com.openbravo.format.Formats; //导入依赖的package包/类
protected void init() {

        filter = new AttributeFilter();
        filter.init(app);
        filter.addActionListener(new ReloadActionListener());

        row = new Row(
                new Field("ID", Datas.STRING, Formats.STRING),
                new Field("ATTRIBUTE_ID", Datas.STRING, Formats.STRING),
                new Field(AppLocal.getIntString("label.value"), Datas.STRING, Formats.STRING, true, true, true)
        );

        Table table = new Table(
                "ATTRIBUTEVALUE",
                new PrimaryKey("ID"),
                new Column("ATTRIBUTE_ID"),
                new Column("VALUE"));

        lpr = row.getListProvider(app.getSession(),
                "SELECT ID, ATTRIBUTE_ID, VALUE FROM ATTRIBUTEVALUE WHERE ATTRIBUTE_ID = ? ", filter);
        spr = row.getSaveProvider(app.getSession(), table);

        editor = new AttributeValuesEditor(dirty);
    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:25,代码来源:AttributeValuesPanel.java

示例10: printState

import com.openbravo.format.Formats; //导入依赖的package包/类
private void printState() {

        Double value = m_jTendered.getDoubleValue();
        if (value == null || value == 0.0) {
            m_dPaid = m_dTotal;
        } else {            
            m_dPaid = value;
        }   

        int iCompare = RoundUtils.compare(m_dPaid, m_dTotal);
        
        m_jMoneyEuros.setText(Formats.CURRENCY.formatValue(new Double(m_dPaid)));
        m_jChangeEuros.setText(iCompare > 0 
                ? Formats.CURRENCY.formatValue(new Double(m_dPaid - m_dTotal))
                : null); 
        
        m_notifier.setStatus(m_dPaid > 0.0, iCompare >= 0);
    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:19,代码来源:JPaymentCashPos.java

示例11: editCustomer

import com.openbravo.format.Formats; //导入依赖的package包/类
private void editCustomer(CustomerInfoExt customer) {

        customerext = customer;

        txtTaxId.setText(customer.getTaxid());
        txtName.setText(customer.getName());
        txtCard.setText(customer.getCard());
        txtNotes.reset();
        txtNotes.setText(customer.getNotes());
        txtMaxdebt.setText(Formats.CURRENCY.formatValue(customer.getMaxdebt()));
        txtCurdebt.setText(Formats.CURRENCY.formatValue(customer.getCurdebt()));
        txtCurdate.setText(Formats.DATE.formatValue(customer.getCurdate()));

        txtNotes.setEnabled(true);

        dirty.setDirty(false);

        btnSave.setEnabled(true);    
        btnPay.setEnabled(customer.getCurdebt() != null && customer.getCurdebt().doubleValue() > 0.0);
    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:21,代码来源:CustomersPayment.java

示例12: init

import com.openbravo.format.Formats; //导入依赖的package包/类
protected void init() {          
    
    row = new Row(
            new Field("ID", Datas.STRING, Formats.STRING),
            new Field(AppLocal.getIntString("Label.Name"), Datas.STRING, Formats.STRING, true, true, true)
    );
    
    Table table = new Table(
            "ATTRIBUTE",
            new PrimaryKey("ID"),
            new Column("NAME"));
    
    lpr = row.getListProvider(app.getSession(), table);
    spr = row.getSaveProvider(app.getSession(), table);        
    
    editor = new AttributesEditor(dirty);    
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:18,代码来源:AttributesPanel.java

示例13: init

import com.openbravo.format.Formats; //导入依赖的package包/类
public void init(Session s){
    
    this.s = s;
    tcustomers = new TableDefinition(s
        , "CUSTOMERS"
        , new String[] { "ID", "TAXID", "SEARCHKEY", "NAME", "NOTES", "VISIBLE", "CARD", "MAXDEBT", "CURDATE", "CURDEBT"
                       , "FIRSTNAME", "LASTNAME", "EMAIL", "PHONE", "PHONE2", "FAX"
                       , "ADDRESS", "ADDRESS2", "POSTAL", "CITY", "REGION", "COUNTRY"
                       , "TAXCATEGORY" }
        , new String[] { "ID", AppLocal.getIntString("label.taxid"), AppLocal.getIntString("label.searchkey"), AppLocal.getIntString("label.name"), AppLocal.getIntString("label.notes"), "VISIBLE", "CARD", AppLocal.getIntString("label.maxdebt"), AppLocal.getIntString("label.curdate"), AppLocal.getIntString("label.curdebt")
                       , AppLocal.getIntString("label.firstname"), AppLocal.getIntString("label.lastname"), AppLocal.getIntString("label.email"), AppLocal.getIntString("label.phone"), AppLocal.getIntString("label.phone2"), AppLocal.getIntString("label.fax")
                       , AppLocal.getIntString("label.address"), AppLocal.getIntString("label.address2"), AppLocal.getIntString("label.postal"), AppLocal.getIntString("label.city"), AppLocal.getIntString("label.region"), AppLocal.getIntString("label.country")
                       , "TAXCATEGORY"}
        , new Datas[] { Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.BOOLEAN, Datas.STRING, Datas.DOUBLE, Datas.TIMESTAMP, Datas.DOUBLE
                      , Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING
                      , Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING
                      , Datas.STRING}
        , new Formats[] { Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.BOOLEAN, Formats.STRING, Formats.CURRENCY, Formats.TIMESTAMP, Formats.CURRENCY
                        , Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING
                        , Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING
                        , Formats.STRING}
        , new int[] {0}
    );   
    
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:26,代码来源:DataLogicCustomers.java

示例14: writeValueDelete

import com.openbravo.format.Formats; //导入依赖的package包/类
public void writeValueDelete(Object value) {

        Object[] tax = (Object[]) value;
        m_oId = tax[0];
        m_jName.setText(Formats.STRING.formatValue(tax[1]));
        taxcatmodel.setSelectedKey(tax[2]);
        txtValidFrom.setText(Formats.TIMESTAMP.formatValue(tax[3]));
        taxcustcatmodel.setSelectedKey(tax[4]);
        taxparentmodel.setSelectedKey(tax[5]);
        m_jRate.setText(Formats.PERCENT.formatValue(tax[6]));
        jCascade.setSelected((Boolean) tax[7]);
        jOrder.setText(Formats.INT.formatValue(tax[8]));
        
        m_jName.setEnabled(false);
        m_jTaxCategory.setEnabled(false);
        txtValidFrom.setEnabled(false);
        btnValidFrom.setEnabled(false);
        m_jCustTaxCategory.setEnabled(false);
        m_jTaxParent.setEnabled(false);
        m_jRate.setEnabled(false);
        jCascade.setEnabled(false);
        jOrder.setEnabled(false);
    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:24,代码来源:TaxEditor.java

示例15: writeValueEdit

import com.openbravo.format.Formats; //导入依赖的package包/类
public void writeValueEdit(Object value) {

        Object[] tax = (Object[]) value;
        m_oId = tax[0];
        m_jName.setText(Formats.STRING.formatValue(tax[1]));
        taxcatmodel.setSelectedKey(tax[2]);
        txtValidFrom.setText(Formats.TIMESTAMP.formatValue(tax[3]));
        taxcustcatmodel.setSelectedKey(tax[4]);
        taxparentmodel.setSelectedKey(tax[5]);
        m_jRate.setText(Formats.PERCENT.formatValue(tax[6]));
        jCascade.setSelected((Boolean) tax[7]);
        jOrder.setText(Formats.INT.formatValue(tax[8]));
        
        m_jName.setEnabled(true);
        m_jTaxCategory.setEnabled(true);
        txtValidFrom.setEnabled(true);
        btnValidFrom.setEnabled(true);
        m_jCustTaxCategory.setEnabled(true);
        m_jTaxParent.setEnabled(true);        
        m_jRate.setEnabled(true);
        jCascade.setEnabled(true);
        jOrder.setEnabled(true);
    }
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:24,代码来源:TaxEditor.java


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