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

Java ImageUtils类代码示例

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

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



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

示例1: getSerializerRead

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
public static SerializerRead getSerializerRead() {
    return new SerializerRead() { public Object readValues(DataRead dr) throws BasicException {
        ProductInfoExt product = new ProductInfoExt();
        product.m_ID = dr.getString(1);
        product.m_sRef = dr.getString(2);
        product.m_sCode = dr.getString(3);
        product.m_sName = dr.getString(4);
        product.m_bCom = dr.getBoolean(5).booleanValue();
        product.m_bScale = dr.getBoolean(6).booleanValue();
        product.m_dPriceBuy = dr.getDouble(7).doubleValue();
        product.m_dPriceSell = dr.getDouble(8).doubleValue();
        product.taxcategoryid = dr.getString(9);
        product.categoryid = dr.getString(10);
        product.attributesetid = dr.getString(11);
        product.m_Image = ImageUtils.readImage(dr.getBytes(12));
        product.attributes = ImageUtils.readProperties(dr.getBytes(13));
        return product;
    }};
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:20,代码来源:ProductInfoExt.java


示例2: createValue

import com.openbravo.data.loader.ImageUtils; //导入依赖的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


示例3: createValue

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
/**
 *
 * @return
 * @throws BasicException
 */
@Override
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:gnoopy,项目名称:wifepos,代码行数:27,代码来源:ResourcesView.java


示例4: printImage

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
/**
     *
     * @param image
     */
    @Override
    public void printImage(BufferedImage image) {
        try {
            if (m_printer.getCapRecBitmap()) { // si podemos imprimir bitmaps.
                
                File f = File.createTempFile("jposimg", ".png");
                try (OutputStream out = new FileOutputStream(f)) {
                    out.write(ImageUtils.writeImage(image));
                }
                
                m_printer.printBitmap(POSPrinterConst.PTR_S_RECEIPT, f.getAbsolutePath(), POSPrinterConst.PTR_BM_ASIS, POSPrinterConst.PTR_BM_CENTER);
            }
// JG 16 May 12 use multicatch
        } catch (IOException | JposException eIO) {
        }
    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:21,代码来源:DevicePrinterJavaPOS.java


示例5: setLines

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
public void setLines(List aRefundLines) {
    
    m_aLines = aRefundLines;
            
    m_aLinesAll.clear();
    for (int i = 0; i < m_aLines.size(); i++ ){
        byte[] aSerLine; 
        aSerLine = ImageUtils.writeSerializable(m_aLines.get(i));
        m_aLinesAll.add(ImageUtils.readSerializable(aSerLine)); 
    }

    ticketlines.clearTicketLines();
    
    if (m_aLines != null) {
        for (int i = 0; i < m_aLines.size(); i++) {
            ticketlines.addTicketLine((TicketLineInfo) m_aLines.get(i));
        }
    }
}
 
开发者ID:nordpos,项目名称:nordpos,代码行数:20,代码来源:JRefundLines.java


示例6: createValue

import com.openbravo.data.loader.ImageUtils; //导入依赖的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:nordpos,项目名称:nordpos,代码行数:21,代码来源:ResourcesView.java


示例7: getSerializerRead

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
public static SerializerRead getSerializerRead() {
    return new SerializerRead() { public Object readValues(DataRead dr) throws BasicException {
        ProductInfoExt product = new ProductInfoExt();
        product.m_ID = dr.getString(1);
        product.m_sRef = dr.getString(2);
        product.m_sCode = dr.getString(3);
        product.m_sName = dr.getString(4);
        product.m_bCom = dr.getBoolean(5).booleanValue();
        product.m_bScale = dr.getBoolean(6).booleanValue();
        product.m_bKitchenPrint = dr.getBoolean(7).booleanValue();
        product.m_dPriceBuy = dr.getDouble(8).doubleValue();
        product.m_dPriceSell = dr.getDouble(9).doubleValue();
        product.taxcategoryid = dr.getString(10);
        product.categoryid = dr.getString(11);
        product.attributesetid = dr.getString(12);
        product.m_Image = ImageUtils.readImage(dr.getBytes(13));
        product.attributes = ImageUtils.readProperties(dr.getBytes(14));
        return product;
    }};
}
 
开发者ID:ZarGate,项目名称:OpenbravoPOS,代码行数:21,代码来源:ProductInfoExt.java


示例8: readValues

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
public void readValues(DataRead dr) throws BasicException {
    m_sID = dr.getString(1);
    m_sName = dr.getString(2);
    BufferedImage img = ImageUtils.readImage(dr.getBytes(3));
    ThumbNailBuilder tnbcat = new ThumbNailBuilder(32, 32, defimg);
    m_container = new JPanelDrawing(img);
    m_icon = new ImageIcon(tnbcat.getThumbNail(img));        
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:9,代码来源:Floor.java


示例9: writeValueDelete

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
public void writeValueDelete(Object value) {
    Object[] resource = (Object[]) value;
    m_oId = resource[0];
    m_jName.setText((String) resource[1]);
    m_ResourceModel.setSelectedKey(resource[2]);
    
    ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
    if (restype == ResourceType.TEXT) {
        m_jText.setText(Formats.BYTEA.formatValue(resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else if (restype == ResourceType.IMAGE) {
        m_jText.setText(null);
        m_jImage.setImage(ImageUtils.readImage((byte[]) resource[3]));
    } else if (restype == ResourceType.BINARY) {
        m_jText.setText(resource[3] == null
                ? null
                : Base64Encoder.encodeChunked((byte[]) resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else {
        m_jText.setText(null);
        m_jImage.setImage(null);
    }
    m_jName.setEnabled(false);
    m_jType.setEnabled(false);
    m_jText.setEnabled(false);
    m_jImage.setEnabled(false);       
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:30,代码来源:ResourcesView.java


示例10: writeValueEdit

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
public void writeValueEdit(Object value) {
    Object[] resource = (Object[]) value;
    m_oId = resource[0];
    m_jName.setText((String) resource[1]);
    m_ResourceModel.setSelectedKey(resource[2]);
    
    ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
    if (restype == ResourceType.TEXT) {
        m_jText.setText(Formats.BYTEA.formatValue(resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else if (restype == ResourceType.IMAGE) {
        m_jText.setText(null);
        m_jImage.setImage(ImageUtils.readImage((byte[]) resource[3]));
    } else if (restype == ResourceType.BINARY) {
        m_jText.setText(resource[2] == null
                ? null
                : Base64Encoder.encodeChunked((byte[]) resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else {
        m_jText.setText(null);
        m_jImage.setImage(null);
    }
    m_jName.setEnabled(true);
    m_jType.setEnabled(true);
    m_jText.setEnabled(true);
    m_jImage.setEnabled(true);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:30,代码来源:ResourcesView.java


示例11: printImage

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
public void printImage(BufferedImage image) {
    try {
        if (m_printer.getCapRecBitmap()) { // si podemos imprimir bitmaps.
            
            File f = File.createTempFile("jposimg", ".png");
            OutputStream out = new FileOutputStream(f);
            out.write(ImageUtils.writeImage(image));
            out.close();
            
            m_printer.printBitmap(POSPrinterConst.PTR_S_RECEIPT, f.getAbsolutePath(), POSPrinterConst.PTR_BM_ASIS, POSPrinterConst.PTR_BM_CENTER);
        }
    } catch (IOException eIO) {
    } catch (JposException e) {
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:16,代码来源:DevicePrinterJavaPOS.java


示例12: syncCategory

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
public void syncCategory(final CategoryInfo cat) throws BasicException {
    
    Transaction t = new Transaction(s) {
        public Object transact() throws BasicException {
            // Sync the Category in a transaction
            
            // Try to update
            if (new PreparedSentence(s, 
                        "UPDATE CATEGORIES SET NAME = ?, IMAGE = ? WHERE ID = ?", 
                        SerializerWriteParams.INSTANCE
                        ).exec(new DataParams() { public void writeValues() throws BasicException {
                             setString(1, cat.getName());
                             setBytes(2, ImageUtils.writeImage(cat.getImage()));
                             setString(3, cat.getID());                                   
                        }}) == 0) {
                   
                // If not updated, try to insert
                new PreparedSentence(s, 
                    "INSERT INTO CATEGORIES(ID, NAME, IMAGE) VALUES (?, ?, ?)",
                    SerializerWriteParams.INSTANCE
                    ).exec(new DataParams() { public void writeValues() throws BasicException {
                        setString(1, cat.getID());
                        setString(2, cat.getName());
                        setBytes(3, ImageUtils.writeImage(cat.getImage()));
                    }});
            }
            return null;        
        }
    };
    t.execute();        
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:32,代码来源:DataLogicIntegration.java


示例13: readValues

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
/**
 *
 * @param dr
 * @throws BasicException
 */
@Override
public void readValues(DataRead dr) throws BasicException {
    m_sID = dr.getString(1);
    m_sName = dr.getString(2);
    BufferedImage img = ImageUtils.readImage(dr.getBytes(3));
    ThumbNailBuilder tnbcat = new ThumbNailBuilder(32, 32, defimg);
    m_container = new JPanelDrawing(img);
    m_icon = new ImageIcon(tnbcat.getThumbNail(img));        
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:15,代码来源:Floor.java


示例14: getSerializerRead

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
/**
     *
     * @return
     */
    public static SerializerRead getSerializerRead() {
        return new SerializerRead() {
            @Override
            public Object readValues(DataRead dr) throws BasicException {
                System.out.println("dr.getDataField().length:"+dr.getDataField().length);
                ProductInfoExt product = new ProductInfoExt();
                product.m_ID = dr.getString(1);                                 
                product.m_sRef = dr.getString(2);                               
                product.m_sCode = dr.getString(3);                              
                product.m_sName = dr.getString(4);                              
                product.m_bCom = dr.getBoolean(5);                              
                product.m_bScale = dr.getBoolean(6);                            
                product.m_dPriceBuy = dr.getDouble(7);                          
                product.m_dPriceSell = dr.getDouble(8);                         
                product.taxcategoryid = dr.getString(9);                        
                product.categoryid = dr.getString(10);                          
                product.attributesetid = dr.getString(11);                      
                product.m_Image = ImageUtils.readImage(dr.getBytes(12));            
                product.attributes = ImageUtils.readProperties(dr.getBytes(13));
                product.m_bKitchen = dr.getBoolean(14);                         
                product.m_bService = dr.getBoolean(15);                         
// ADDED JG 13 Nov 12 - Display
                product.m_sDisplay = dr.getString(16);                          
// ADDED JDL 19.12.12   
                product.m_bVprice = dr.getBoolean(17);                          
// ADDED JDL 09.0.2.13 for Chris
                product.m_bVerpatrib = dr.getBoolean(18);                       
// ADDED JDL 09.04.13
                product.m_sTextTip = dr.getString(19);                          
// ADDED JDL 25.04.13
                product.m_bWarranty = dr.getBoolean(20);                        
// JG July 2014 - added for Stock count
                product.m_dStockUnits = dr.getDouble(21);                       

                return product;
            }
        };
    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:43,代码来源:ProductInfoExt.java


示例15: getSerializerRead

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
/**
    *
    * @return
    */
   public static SerializerRead getSerializerRead() {
       return new SerializerRead() {@Override
public Object readValues(DataRead dr) throws BasicException {
           return new CategoryInfo(dr.getString(1), dr.getString(2), ImageUtils.readImage(dr.getBytes(3)),dr.getString(4),dr.getBoolean(5));
       }};
   }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:11,代码来源:CategoryInfo.java


示例16: writeValueDelete

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
/**
 *
 * @param value
 */
@Override
public void writeValueDelete(Object value) {
    Object[] resource = (Object[]) value;
    m_oId = resource[0];
    m_jName.setText((String) resource[1]);
    m_ResourceModel.setSelectedKey(resource[2]);
    
    ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
    if (restype == ResourceType.TEXT) {
        m_jText.setText(Formats.BYTEA.formatValue(resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else if (restype == ResourceType.IMAGE) {
        m_jText.setText(null);
        m_jImage.setImage(ImageUtils.readImage((byte[]) resource[3]));
    } else if (restype == ResourceType.BINARY) {
        m_jText.setText(resource[3] == null
                ? null
                : Base64Encoder.encodeChunked((byte[]) resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else {
        m_jText.setText(null);
        m_jImage.setImage(null);
    }
    m_jName.setEnabled(false);
    m_jType.setEnabled(false);
    m_jText.setEnabled(false);
    m_jImage.setEnabled(false);       
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:35,代码来源:ResourcesView.java


示例17: writeValueEdit

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
/**
 *
 * @param value
 */
@Override
public void writeValueEdit(Object value) {
    Object[] resource = (Object[]) value;
    m_oId = resource[0];
    m_jName.setText((String) resource[1]);
    m_ResourceModel.setSelectedKey(resource[2]);
    
    ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
    if (restype == ResourceType.TEXT) {
        m_jText.setText(Formats.BYTEA.formatValue(resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else if (restype == ResourceType.IMAGE) {
        m_jText.setText(null);
        m_jImage.setImage(ImageUtils.readImage((byte[]) resource[3]));
    } else if (restype == ResourceType.BINARY) {
        m_jText.setText(resource[2] == null
                ? null
                : Base64Encoder.encodeChunked((byte[]) resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else {
        m_jText.setText(null);
        m_jImage.setImage(null);
    }
    m_jName.setEnabled(true);
    m_jType.setEnabled(true);
    m_jText.setEnabled(true);
    m_jImage.setEnabled(true);
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:35,代码来源:ResourcesView.java


示例18: getSerializerRead

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
/**
     *
     * @return
     */
    public static SerializerRead getSerializerRead() {
        return new SerializerRead() {
            @Override
            public Object readValues(DataRead dr) throws BasicException {
                ProductInfoExt product = new ProductInfoExt();
                product.m_ID = dr.getString(1);                                 
                product.m_sRef = dr.getString(2);                               
                product.m_sCode = dr.getString(3);                              
                product.m_sName = dr.getString(4);                              
                product.m_bCom = dr.getBoolean(5);                              
                product.m_bScale = dr.getBoolean(6);                            
                product.m_dPriceBuy = dr.getDouble(7);                          
                product.m_dPriceSell = dr.getDouble(8);                         
                product.taxcategoryid = dr.getString(9);                        
                product.categoryid = dr.getString(10);                          
                product.attributesetid = dr.getString(11);                      
                product.m_Image = ImageUtils.readImage(dr.getBytes(12));            
                product.attributes = ImageUtils.readProperties(dr.getBytes(13));
                product.m_bKitchen = dr.getBoolean(14);                         
                product.m_bService = dr.getBoolean(15);                         
// ADDED JG 13 Nov 12 - Display
                product.m_sDisplay = dr.getString(16);                          
// ADDED JDL 19.12.12   
                product.m_bVprice = dr.getBoolean(17);                          
// ADDED JDL 09.0.2.13 for Chris
                product.m_bVerpatrib = dr.getBoolean(18);                       
// ADDED JDL 09.04.13
                product.m_sTextTip = dr.getString(19);                          
// ADDED JDL 25.04.13
                product.m_bWarranty = dr.getBoolean(20);                        
// JG July 2014 - added for Stock count
                product.m_dStockUnits = dr.getDouble(21);                       

                return product;
            }
        };
    }
 
开发者ID:sbandur84,项目名称:micro-Blagajna,代码行数:42,代码来源:ProductInfoExt.java


示例19: m_jbtnCancelAllActionPerformed

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
private void m_jbtnCancelAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jbtnCancelAllActionPerformed
    m_aLines.clear();
    for (int i = 0; i < m_aLinesAll.size(); i++ ){
        byte[] aSerLine; 
        aSerLine = ImageUtils.writeSerializable(m_aLinesAll.get(i));
        m_aLines.add(ImageUtils.readSerializable(aSerLine)); 
    }
    ticketlines.clearTicketLines();
    if (m_aLines != null) {
        for (int i = 0; i < m_aLines.size(); i++) {
            ticketlines.addTicketLine((TicketLineInfo) m_aLines.get(i));
        }
    }
    while(m_jTicketEdit.getActiveTicket().getLinesCount()>0) m_jTicketEdit.removeTicketLine(0);
}
 
开发者ID:nordpos,项目名称:nordpos,代码行数:16,代码来源:JRefundLines.java


示例20: readValues

import com.openbravo.data.loader.ImageUtils; //导入依赖的package包/类
public void readValues(DataRead dr) throws BasicException {
    m_sID = dr.getString(1);
    m_sName = dr.getString(2);
    BufferedImage img = ImageUtils.readImage(dr.getBytes(3));
    ThumbNailBuilder tnbcat = new ThumbNailBuilder(32, 32, 12, defimg);
    m_container = new JPanelDrawing(img);
    m_icon = new ImageIcon(tnbcat.getThumbNail(img));        
}
 
开发者ID:nordpos,项目名称:nordpos,代码行数:9,代码来源:Floor.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java Item类代码示例发布时间:2022-05-23
下一篇:
Java WebScrollPane类代码示例发布时间: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