📄 somcolor.java
字号:
package somcolorapp;/** * Package somcolorapp * Classification des couleurs avec un r閟eau de Kohonen. * R閟eaux Neauronaux, Vuibert 2006. * Jean-Philippe Rennard * version 1.0, 17/3/2006 */import java.awt.*;import java.awt.event.*;import java.applet.*;/** * <p>Title: SOMColor</p> * <p>Description: Classification des couleurs par un r閟eau de Kohonen</p> */public class SOMColor extends Applet { /** Pointeur sur l'interface utilisateur */ SOMColorUI scUI; // Data String product = "SOMColor"; String version = "1.0"; String date = "17 mars 2006"; String comments = "Classification de couleurs par un r閟eau de Kohonen."; String auteur = "Jean-Philippe Rennard"; String editeur = "R閟eaux neuronaux et mod鑜e objet. Vuibert, ISBN 2-7117-4830-8."; String copyright = "Copyright (c) 2006."; String GNU1 = new String("This program is free software; you can redistribute it and/or"); String GNU2 = "modify it under the terms of the GNU General Public License"; String GNU3 = "as published by the Free Software Foundation."; FlowLayout flowLayout1 = new FlowLayout(); Button btngo = new Button(); private boolean isStandalone = false; //Get a parameter value public String getParameter(String key, String def) { return isStandalone ? System.getProperty(key, def) : (getParameter(key) != null ? getParameter(key) : def); } //Construct the applet public SOMColor() { } //Initialize the applet public void init() { try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } //Component initialization private void jbInit() throws Exception { btngo.setLabel("Go"); btngo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { btngo_actionPerformed(e); } }); this.setLayout(flowLayout1); this.add(btngo, null); } //Get Applet information public String getAppletInfo() { return "Applet Information"; } //Get parameter info public String[][] getParameterInfo() { return null; } // Lance la fen阾re de l'applet public void launch() { Dimension dim= getToolkit().getScreenSize(); scUI.setSize((int)(0.75*dim.width), (int)(0.75*dim.height)); scUI.setLocation(20,20); scUI.show(); } public void btngo_actionPerformed(ActionEvent e) { scUI=new SOMColorUI(this, 50); launch(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -