📄 somcolorui.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 baseui.*;
/**
* <p>Title: Interface utilisateur</p>
* <p>Description: Interface utilisateur de l'applet.</p>
*/
public class SOMColorUI extends Cui { // Frame Cui
/** Applet */
public SOMColor applet;
/** processus */
public SOMColorProcess processSOM;
/** Taille du r閟eau */
public int tailleReseau;
/** Maximum it閞ations */
public int maxIterations;
/** Nb couleurs ^1/3 */
public int nbCouleurs;
/** Eta0 */
public double eta0;
/** Sigma0 */
public double sigma0;
Label statusBar = new Label();
Panel panel1 = new Panel();
BorderLayout borderLayout1 = new BorderLayout();
Panel panel2 = new Panel();
GridLayout gridLayout1 = new GridLayout();
Button btnReset = new Button();
Button btnAbout = new Button();
Button btnGo = new Button();
Button btnPas = new Button();
Panel panelVue = new Panel();
GridLayout gridLayout2 = new GridLayout();
Panel panel3 = new Panel();
TextField txtTaille = new TextField();
Label label1 = new Label();
Label label2 = new Label();
TextField txtCouleurs = new TextField();
Label label3 = new Label();
TextField txtIterations = new TextField();
GridLayout gridLayout3 = new GridLayout();
Label label4 = new Label();
TextField txtEta0 = new TextField();
Label label5 = new Label();
TextField txtSigma0 = new TextField();
Button btnModif = new Button();
public SOMColorUI(SOMColor ap, int t) {
applet = ap;
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
processSOM = new SOMColorProcess(this);
process = (Cprocess) processSOM;
try {
jbInit();
}
catch (Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.setTitle(applet.comments + " " + applet.version + " " + applet.auteur);
statusBar.setText(" It閞ation :");
panel1.setLayout(borderLayout1);
panel2.setLayout(gridLayout1);
gridLayout1.setColumns(4);
gridLayout1.setHgap(0);
btnReset.setLabel("Reset");
btnReset.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
btnReset_actionPerformed(e);
}
});
btnAbout.setLabel("A propos");
btnAbout.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
btnAbout_actionPerformed(e);
}
});
btnGo.setLabel("GO");
btnGo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
btnGo_actionPerformed(e);
}
});
btnPas.setLabel("Pas
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -