亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? main.java

?? jpeg2000編解碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package gui;import jj2000.j2k.image.input.*;import jj2000.j2k.image.*;import jj2000.j2k.util.*;import jj2000.disp.*;import jj2000.j2k.*;import security.*;import gui.rsa.*;import javax.swing.border.*;import javax.swing.event.*;import java.awt.event.*;import javax.swing.*;import java.text.*;import java.util.*;import java.awt.*;import java.io.*;public class Main extends JFrame     implements InternalFrameListener, ProgressWatch {    /** JDesktopPane of the main frame*/    protected JDesktopPane desktop;    /** Properties instance keeping configuration */    protected Properties configProp = new Properties();    /** Original offset between successive internal frames */    public final static int FRAME_INCR = 25;    /** Action to open files */    private Action openFile;    /** Action to save files */    private Action saveFile;    /** Action to show image properties */    private Action infoFile;    /** Generate/save a public/private keys pair */    private JMenuItem genKey, saveKey;    /** Number of opened frame (even if one has been closed meanwhile) */    private int numOpenedFrame = 0;    /** Zoom in the image */    private JMenuItem zoomIn;    /** Zoom out of the image */    private JMenuItem zoomOut;    /** Display the image at its full resolution */    private JMenuItem zoomOrig;    /** Reference to the RSASupport instance */    private RSASupport rsaSupport = new RSASupport();    /** Window menu */    protected JMenu menuWindow;    /** Button group for the window menu */    protected ButtonGroup windowGroup = new ButtonGroup();    /** Hashtable for the window menu (The key is the frame and the     * value is the JCheckBoxMenuItem in the window Menu) */    protected Hashtable windowHt = new Hashtable();    /** Whether or not to display rules for the selected frame */    private JCheckBoxMenuItem rulesItem;    /** To keep reference to the opened images and extra information     * stored in a FrameAttribute instance */    protected Hashtable intFrameHt = new Hashtable();    /** Label at the bottom of the frame to display some image's     * information */    protected JLabel statusLbl = null;    /** Progress bar at the bottom of the frame to display some task's     * advancement. */    protected JProgressBar progressBar = new JProgressBar();    /** Five last opened files */    private File[] lastOpenedFiles = new File[5];    /** Menu items for the last opened files */    private JMenuItem[] lofItem = new JMenuItem[5];    /** Menu for last opened files */    private JMenu mOpenedFile = new JMenu("Recent images");    /** Message to be displayed in the About box. */    private String aboutMessage = "GUI v1.5b - EPFL\n"+	"Wrapped around JJ2000 "+JJ2KInfo.version+"\n\nAuthors:\n Raphael "+	"Grosbois, Mohamed Tahar Ktari\n"+        "\nThis interface was "+	"developed in\nthe framework of the 2KAN project.";//     private ImageIcon iconOpen = new ImageIcon("gui/icons/open.gif");//     private ImageIcon iconSave = new ImageIcon("gui/icons/save.gif");//     private ImageIcon iconInfo = new ImageIcon("gui/icons/info.gif");    private ImageIcon iconOpen =         new ImageIcon(this.getClass().getResource("icons/open.gif"));    private ImageIcon iconSave =         new ImageIcon(this.getClass().getResource("icons/save.gif"));    private ImageIcon iconInfo =             new ImageIcon(this.getClass().getResource("icons/info.gif"));    /** Class constructor. Creates the menu bar, the status bar and     * the tool bar.  */    public Main() {        super("JPEG 2000 Graphic User Interface");	// Read save settings	File homeDir = new File(System.getProperty("user.home"));	if(!homeDir.exists()) {	    homeDir = new File(".");	}	File jj2kDir = new File(homeDir.getPath()+File.separator+".jj2000");	if(jj2kDir.exists() && jj2kDir.isFile()) {	    jj2kDir.renameTo(new File(homeDir.getPath()+File.separator+				      ".jj2000-saved"));	} else if(!jj2kDir.exists()) {	    jj2kDir.mkdir();	}	File configFile = new File(jj2kDir.getPath()+File.separator+"config");	if(configFile.exists()) {	    try {		FileInputStream fis = new FileInputStream(configFile);		configProp.load(fis);	    } catch(IOException e) {}	    	    // Read last opened files	    if(configProp.get("lastOpenedFiles")!=null) {		String str = (String)configProp.get("lastOpenedFiles");		StringTokenizer stk = new StringTokenizer(str);		File file;		while(stk.hasMoreElements()) {		    file = new File((String)stk.nextElement());		    saveOpenedFile(file);		}	    }	}        // Dimension	Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();	setSize(dim.width*3/4,dim.height*3/4);        // Define a JDesktopPane	desktop = new JDesktopPane(); 	desktop.setBackground(Color.white);        desktop.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));	desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);        // Status and progress bar	GridBagLayout gridbag = new GridBagLayout();	GridBagConstraints c = new GridBagConstraints();	JPanel bottomPanel = new JPanel(gridbag);	c.fill = GridBagConstraints.BOTH;        statusLbl = new JLabel("");        statusLbl.            setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));	statusLbl.setFont(new Font("SansSerif",Font.PLAIN,12));	c.weightx = 5.0;	gridbag.setConstraints(statusLbl,c);	bottomPanel.add(statusLbl);	progressBar.setIndeterminate(true);	progressBar.setOrientation(JProgressBar.HORIZONTAL);        progressBar.            setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));	progressBar.setFont(new Font("SansSerif",Font.PLAIN,10));	c.weightx = 1.0;	gridbag.setConstraints(progressBar,c);	bottomPanel.add(progressBar);        Container content = getContentPane();        content.add(desktop,BorderLayout.CENTER);        content.add(bottomPanel,BorderLayout.SOUTH);               // Actions        createActions();        // MenuBar        setJMenuBar(createMenuBar());        // Toolbar        JToolBar toolBar = createToolBar();	getContentPane().add(toolBar,BorderLayout.NORTH);        // Look and feel        try {            UIManager.                setLookAndFeel(UIManager.getSystemLookAndFeelClassName());            SwingUtilities.updateComponentTreeUI(this);        } catch (Exception e) {}        // Main frame's listeners        addWindowListener(new WindowAdapter() {                public void windowClosing(WindowEvent e) { 		    terminateApplication(); 		}            });    }    /** Add the current file to the list of last opened files */    protected void saveOpenedFile(File file) {	// Check if this file path has already been saved	for(int i=0; i<lastOpenedFiles.length; i++) {	    if(lastOpenedFiles[i]!=null && 	       file.getPath().equalsIgnoreCase(lastOpenedFiles[i].					       getPath())) {		return;	    }	}	// Put this file at the beginning of the list	for(int i=lastOpenedFiles.length-1; i>0; i--) {	    lastOpenedFiles[i] = lastOpenedFiles[i-1];	}	lastOpenedFiles[0] = file;	// Create a new menu item for this file	lofItem[0] = new JMenuItem(lastOpenedFiles[0].getPath());	lofItem[0].addActionListener(new ActionListener() {		public void actionPerformed(ActionEvent e) {		    OpenImage oi = new OpenImage(Main.this,desktop,						 e.getActionCommand());		    if(oi.isFileSelected()) {			oi.run();		    }		}	    });	// Remove actual menu items	for(int i=0; i<lastOpenedFiles.length; i++) {	    if(lofItem[i]!=null) {		mOpenedFile.remove(lofItem[i]);	    }	}	// Add new ones	for(int i=0; i<lastOpenedFiles.length; i++) {	    if(lofItem[i]!=null) {		mOpenedFile.add(lofItem[i]);	    }	}    }    /**      * Initialize the progress watching process      * */    public void initProgressWatch(int min, int max,String info) {	progressBar.setMinimum(min);	progressBar.setMaximum(max);	progressBar.setIndeterminate(false);	progressBar.setValue(min);	progressBar.setStringPainted(true);	statusLbl.setText(info);    }    /**      * Returns the reference to the RSA support module     * */    public RSASupport getRSASupport() {	return rsaSupport;    }    /**      * Terminate the application      * */    private void terminateApplication() {	// Remove temporary files if needed	JInternalFrame[] frame = desktop.getAllFrames();	if(frame!=null) {	    for(int i=0; i<frame.length; i++) {		FrameAttribute fa = 		    (FrameAttribute)intFrameHt.get(frame[i]);		if(fa.isTemporaryFile) {		    String name = fa.srcFile.getPath();		    String ext = name.			substring(name.lastIndexOf('.'),				  name.length());		    String prefix = name.			substring(0,name.lastIndexOf('.'));		    if((ext.equalsIgnoreCase(".pgm") && fa.nc!=1) 		       ||		       (ext.equalsIgnoreCase(".pgx") && fa.nc!=1)){			for(int c=1; c<=fa.nc; c++) {			    (new File(prefix+"-"+c+ext)).delete();			}		    } else {			fa.srcFile.delete();		    }		}	    }	}	// Terminate RSA module	rsaSupport.terminate();	// Save last opened files	String str = "";	for(int i=0; i<lastOpenedFiles.length; i++) {	    if(!(lastOpenedFiles[i]==null)) {		str += lastOpenedFiles[i]+" ";	    }	}	configProp.put("lastOpenedFiles", str);	// Save configuration	File homeDir = new File(System.getProperty("user.home"));	if(!homeDir.exists()) {	    homeDir = new File(".");	}	File jj2kDir = new File(homeDir.getPath()+File.separator+".jj2000");	if(jj2kDir.exists() && jj2kDir.isFile()) {	    jj2kDir.renameTo(new File(homeDir.getPath()+File.separator+				      ".jj2000-saved"));	} else if(!jj2kDir.exists()) {	    jj2kDir.mkdir();	}	File configFile = new File(jj2kDir.getPath()+File.separator+"config");	try {	    FileOutputStream fos = new FileOutputStream(configFile);	    configProp.store(fos, "JJ2000 GUI settings");	} catch(IOException e) { }	// Exit the application	System.exit(0);     }    /**      * Update the progress watching process to the specified value     * */    public void updateProgressWatch(int val,String info) {	if(val>progressBar.getValue()) {	    int start = progressBar.getValue();	    for(int i=start; i<=val; i++) {		progressBar.setValue(i);	    }	} else {	    progressBar.setValue(val);	}	if(info!=null) {	    statusLbl.setText(info);	}    }    /**      * Terminate the progress watch process     * */    public void terminateProgressWatch() {	progressBar.setValue(progressBar.getMinimum());	progressBar.setStringPainted(false);	statusLbl.setText("");    }    /**      * Create Action instances for opening and saving files and for     * displaying internal frame information. These Actions are then     * used in the menu bar and in the tool bar.      * */    private void createActions() {	// Opening files        openFile = new AbstractAction("Open...",iconOpen) {                public void actionPerformed(ActionEvent e) {                    OpenImage oi = new OpenImage(Main.this,desktop);                    if(oi.isFileSelected()) {			oi.run();                    }                }            };	// Display file information (disabled at startup as no image is	// displayed)        infoFile = new AbstractAction("Properties",iconInfo) {                public void actionPerformed(ActionEvent e) {                    JInternalFrame f = desktop.getSelectedFrame();                    FrameAttribute fA = (FrameAttribute)intFrameHt.get(f);                    if(fA==null) return;                    String info = "Input: "+fA.title+"\n";                    info += "Number of components: "+fA.nc+"\n";                    info += "Dimension: "+fA.imgCo.width+"x"+			fA.imgCo.height+"\n";		    info += "Offset: "+fA.imgCo.x+","+fA.imgCo.y+"\n";                    info += "Zoom Factor: "+fA.imgPan.getZoomFactor()+"\n";                    if(fA.info!=null) {                        info += fA.info;                    }                    JOptionPane.showMessageDialog(Main.this,info,                                                  "Image information",                                                  JOptionPane.                                                  INFORMATION_MESSAGE);                }            };        infoFile.setEnabled(false);	// Saving files (disabled at startup as no image can be saved)        saveFile = new AbstractAction("Save As...",iconSave) {                public void actionPerformed(ActionEvent e) {                    JInternalFrame f = desktop.getSelectedFrame();                    FrameAttribute fA = (FrameAttribute)intFrameHt.get(f);                    if(fA==null) return;		    Dimension inDim = 			new Dimension(fA.imgCo.width,fA.imgCo.height);                    SaveImage si = new SaveImage(Main.this,desktop,fA.srcFile,                                                 inDim,fA.imgPan);                    if(si.isFileSelected()) {                        if(si.getFileType()==SaveImage.FILE_TYPE_UNKNOWN) {                            JOptionPane.showMessageDialog(null,                                                          "Unknown "+                                                          "output file type",                                                          "Error",                                                          JOptionPane.                                                          ERROR_MESSAGE);                        }			fA.imgPan.setOffset(0,0);                        new Thread(si).start();                    }                }            };        saveFile.setEnabled(false);     }    /** Reset everything when all internal frames have been closed. */    public void internalFrameClosed(InternalFrameEvent e) {        int nf = desktop.getAllFrames().length;        if(nf==0) {            saveFile.setEnabled(false);            infoFile.setEnabled(false);            statusLbl.setText("");            enableZoom(false);            return;        }    }    /** Remove frame from Hashtable when closing it */    public void internalFrameClosing(InternalFrameEvent e) {        JInternalFrame f = e.getInternalFrame();	FrameAttribute fa = (FrameAttribute)intFrameHt.get(f);	if(fa.isTemporaryFile) {	    String name = fa.srcFile.getPath();	    String ext = name.substring(name.lastIndexOf('.'),name.length());	    String prefix = name.substring(0,name.lastIndexOf('.'));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久99久久精品免费看蜜桃| 日韩一级片在线观看| 欧美成人精品福利| 欧美激情资源网| 日韩av电影天堂| 91女厕偷拍女厕偷拍高清| 日韩亚洲欧美在线| 亚洲精品国产高清久久伦理二区| 免费一级片91| 在线中文字幕一区| 国产精品盗摄一区二区三区| 日本成人中文字幕| 欧美怡红院视频| 18成人在线观看| 国产精品亚洲一区二区三区在线| 精品视频1区2区3区| 国产精品二三区| 高清久久久久久| 久久综合色播五月| 日韩精品免费视频人成| 欧美在线观看视频一区二区三区| 久久先锋影音av| 九色综合国产一区二区三区| 欧美另类z0zxhd电影| 亚洲精品美国一| 97精品国产97久久久久久久久久久久 | 一区二区免费视频| 成人动漫av在线| 亚洲国产精品精华液2区45| 久久99久久久欧美国产| 欧美一区二区人人喊爽| 亚洲v日本v欧美v久久精品| 91传媒视频在线播放| 亚洲女与黑人做爰| 91丨九色丨黑人外教| 欧美激情一区二区三区蜜桃视频 | 日本最新不卡在线| 欧美另类videos死尸| 日韩福利电影在线| 中文字幕一区免费在线观看| 国产成人精品在线看| 中文字幕不卡三区| 成+人+亚洲+综合天堂| 综合久久给合久久狠狠狠97色 | 偷拍与自拍一区| 欧美精品成人一区二区三区四区| 亚洲.国产.中文慕字在线| 欧美狂野另类xxxxoooo| 欧美aa在线视频| 久久九九久精品国产免费直播| 国产精品中文字幕欧美| 国产精品视频一二三| 一本久久精品一区二区| 亚洲一区二区三区视频在线| 欧美日韩综合一区| 美女视频一区在线观看| 久久久综合视频| av在线播放不卡| 亚洲第一久久影院| 2021中文字幕一区亚洲| 成人精品电影在线观看| 亚洲精品免费看| 日韩免费看的电影| 成人av一区二区三区| 亚洲高清在线视频| 欧美成va人片在线观看| 国产盗摄一区二区| 亚洲精品视频免费观看| 制服丝袜亚洲色图| 成人一区在线看| 午夜电影一区二区三区| 精品国产乱码91久久久久久网站| 成人免费福利片| 免费在线观看成人| 亚洲人成7777| 久久免费国产精品| 欧美私人免费视频| 成人美女视频在线看| 丝袜脚交一区二区| 亚洲视频中文字幕| 精品国产成人在线影院| 欧美在线一区二区| 成人免费精品视频| 一本一本久久a久久精品综合麻豆| 日本亚洲视频在线| 怡红院av一区二区三区| 26uuu国产一区二区三区| 91国偷自产一区二区开放时间 | 亚洲欧美日韩国产一区二区三区 | 一本色道a无线码一区v| 韩国v欧美v亚洲v日本v| 亚洲一区二区五区| 中文字幕一区三区| 国产午夜精品久久久久久久| 欧美日韩国产综合一区二区三区| 国产福利精品导航| 久久成人麻豆午夜电影| 五月婷婷激情综合| 亚洲精品国产品国语在线app| 国产女人18水真多18精品一级做| 51精品国自产在线| 欧美自拍丝袜亚洲| 色哟哟国产精品免费观看| 国产成人综合精品三级| 美日韩一级片在线观看| 日日摸夜夜添夜夜添国产精品| 亚洲精品中文字幕在线观看| 国产精品少妇自拍| 国产亲近乱来精品视频| 久久久久久一二三区| 欧美α欧美αv大片| 日韩亚洲欧美一区| 欧美xxxx老人做受| 欧美成人精品二区三区99精品| 这里只有精品电影| 91麻豆精品国产91久久久更新时间| 日本精品裸体写真集在线观看| 95精品视频在线| 色综合色综合色综合色综合色综合| 成人激情文学综合网| 成人免费视频一区二区| 99久免费精品视频在线观看 | 欧美激情一区二区在线| 久久久欧美精品sm网站| 精品国产制服丝袜高跟| 精品成人一区二区三区| 26uuu精品一区二区在线观看| 久久久久久久av麻豆果冻| 国产亚洲精品7777| 国产精品高清亚洲| 亚洲综合久久久| 日本女人一区二区三区| 久久精品国产一区二区三| 国产一区二区三区美女| 国产成人av电影在线播放| 成人动漫一区二区三区| 91高清视频免费看| 91精品国产高清一区二区三区蜜臀| 日韩一卡二卡三卡四卡| 久久女同精品一区二区| 国产精品福利在线播放| 一区二区成人在线| 理论电影国产精品| 成人免费毛片嘿嘿连载视频| 91蜜桃婷婷狠狠久久综合9色| 欧美色中文字幕| 欧美成人精品1314www| 国产精品萝li| 三级不卡在线观看| 国产精品亚洲专一区二区三区| 99久久久久久| 日韩精品影音先锋| 一区在线播放视频| 免费在线观看一区| 99v久久综合狠狠综合久久| 欧美精品日日鲁夜夜添| 久久久久国产精品厨房| 亚洲一区国产视频| 国产成人自拍网| 欧美二区乱c少妇| 中文一区在线播放| 男女视频一区二区| 99精品偷自拍| 精品国产一区久久| 亚洲va欧美va国产va天堂影院| 国产剧情一区二区| 欧美老肥妇做.爰bbww| 国产精品久久久久久户外露出| 日韩精品亚洲专区| 91丝袜国产在线播放| 精品久久一区二区三区| 亚洲综合色噜噜狠狠| 成人午夜精品在线| 精品乱人伦一区二区三区| 一区二区三区免费网站| 国产·精品毛片| 精品久久一区二区| 热久久久久久久| 欧美熟乱第一页| 亚洲乱码国产乱码精品精的特点| 国产揄拍国内精品对白| 欧美理论电影在线| 亚洲愉拍自拍另类高清精品| 国产成人在线网站| 久久亚洲精精品中文字幕早川悠里| 亚洲va天堂va国产va久| 91蝌蚪porny| 综合婷婷亚洲小说| 成人成人成人在线视频| 久久蜜桃一区二区| 狠狠狠色丁香婷婷综合激情 | 亚洲欧美日韩成人高清在线一区| 国产精品影音先锋| 久久综合九色综合97婷婷| 日本亚洲最大的色成网站www| 欧美日韩免费高清一区色橹橹| 亚洲精品大片www| 色综合一区二区| 亚洲欧美激情在线| 色哟哟在线观看一区二区三区|