⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ezcellview.java

📁 用Java写的报表.功能如下: 0.内建网络打印,网络预览功能! 1.文件操作。包括url 指定的文件。 2.全功能打印支持。包括打印预览。 3.Undo 和 redo。 4.合并单元格。 5.Cel
💻 JAVA
字号:
/*
 * Copyright 2002 EZCell , Inc. All rights reserved.
 * Version  1.0.
 * Author   W.John
 */
package ezcell;

import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import java.net.*;

import javax.swing.*;
import javax.swing.ImageIcon;
import javax.swing.JPanel;


/**
 * put your documentation comment here
 */
public class EZCellView extends javax.swing.JApplet implements ActionListener {
    private EZCell bean;

    /**
     *
     * @param e
     */
    public void actionPerformed(ActionEvent e) {
        try {
            if (e.getActionCommand().equals("printpreview")) {
                EZCellView.this.bean.printPreview();
            } else if (e.getActionCommand().equals("print")) {
                EZCellView.this.bean.print(false);
            }
        } catch (Exception ex) {
        }
    }

    /**
     */
    public void init() {
        JPanel tb = new JPanel();
        tb.setLayout(new GridLayout(1, 5));
        try {
          ImageIcon i = new ImageIcon( getClass().getResource( "/icons/printpreview.gif"));

            JButton b0 = new JButton( i);//new ImageIcon( getClass().getResource( "icons/printpreview.gif")));
            b0.addActionListener(this);
            b0.setActionCommand("printpreview");
            tb.add(b0);
            b0 = new JButton(
                         new ImageIcon( getClass().getResource("/icons/print.gif")));
            b0.addActionListener(this);
            b0.setActionCommand("print");
            tb.add(b0);
            this.getContentPane().add(tb, BorderLayout.NORTH);
            bean = new EZCell();
            this.getContentPane().add(bean, BorderLayout.CENTER);

            //    bean.open(new URL("http://www.ezcell.net/bin/example1.cell"));
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -