Etat du code cours isn (2)
16/01/2015 23:24
ETAT DU CODE au 16/01/2015
Sketch :
// Need G4P library
import g4p_controls.*;
public void setup(){
size(480, 320, JAVA2D);
createGUI();
customGUI();
// Place your setup code here
}
public void draw(){
background(230);
}
// Use this method to add additional statements
// to customise the GUI controls
public void customGUI(){
Gui :
println("nompseudo - GTextField event occured " + System.currentTimeMillis()%10000000 );
} //_CODE_:nompseudo:809295:
public void button1_click1(GButton source, GEvent event) { //_CODE_:Niveau1:992170:
println("Niveau1 - GButton event occured " + System.currentTimeMillis()%10000000 );
} //_CODE_:Niveau1:992170:
public void button1_click2(GButton source, GEvent event) { //_CODE_:Niveau2:282373:
println("Niveau2 - GButton event occured " + System.currentTimeMillis()%10000000 );
} //_CODE_:Niveau2:282373:
public void button1_click3(GButton source, GEvent event) { //_CODE_:Niveau3:287706:
println("Niveau3 - GButton event occured " + System.currentTimeMillis()%10000000 );
} //_CODE_:Niveau3:287706:
public void button1_click4(GButton source, GEvent event) { //_CODE_:Niveau4:400033:
println("Niveau4 - GButton event occured " + System.currentTimeMillis()%10000000 );
} //_CODE_:Niveau4:400033:
synchronized public void win_draw1(GWinApplet appc, GWinData data) { //_CODE_:window1:797102:
appc.background(230);
} //_CODE_:window1:797102:
// Create all the GUI controls.
// autogenerated do not edit
public void createGUI(){
G4P.messagesEnabled(false);
G4P.setGlobalColorScheme(GCScheme.BLUE_SCHEME);
G4P.setCursor(ARROW);
if(frame != null)
frame.setTitle("Sketch Window");
CALCULATOR = new GLabel(this, 150, 19, 167, 31);
CALCULATOR.setText("CALCULATOR");
CALCULATOR.setTextBold();
CALCULATOR.setLocalColorScheme(GCScheme.RED_SCHEME);
CALCULATOR.setOpaque(true);
Pseudo = new GLabel(this, 9, 97, 80, 20);
Pseudo.setText("Pseudo :");
Pseudo.setTextBold();
Pseudo.setTextItalic();
Pseudo.setOpaque(true);
nompseudo = new GTextField(this, 90, 97, 281, 20, G4P.SCROLLBARS_NONE);
nompseudo.setOpaque(true);
nompseudo.addEventHandler(this, "textfield1_change1");
Niveaux = new GLabel(this, 192, 140, 86, 20);
Niveaux.setText("Niveaux");
Niveaux.setTextBold();
Niveaux.setLocalColorScheme(GCScheme.PURPLE_SCHEME);
Niveaux.setOpaque(true);
Niveau1 = new GButton(this, 21, 233, 80, 30);
Niveau1.setText("Niveau 1");
Niveau1.setTextBold();
Niveau1.setTextItalic();
Niveau1.setLocalColorScheme(GCScheme.GREEN_SCHEME);
Niveau1.addEventHandler(this, "button1_click1");
Niveau2 = new GButton(this, 135, 232, 80, 30);
Niveau2.setText("Niveau 2");
Niveau2.setTextBold();
Niveau2.setTextItalic();
Niveau2.setLocalColorScheme(GCScheme.YELLOW_SCHEME);
Niveau2.addEventHandler(this, "button1_click2");
Niveau3 = new GButton(this, 258, 231, 80, 30);
Niveau3.setText("Niveau 3");
Niveau3.setTextBold();
Niveau3.setTextItalic();
Niveau3.setLocalColorScheme(GCScheme.ORANGE_SCHEME);
Niveau3.addEventHandler(this, "button1_click3");
Niveau4 = new GButton(this, 372, 230, 80, 30);
Niveau4.setText("Niveau 4");
Niveau4.setTextBold();
Niveau4.setTextItalic();
Niveau4.setLocalColorScheme(GCScheme.RED_SCHEME);
Niveau4.addEventHandler(this, "button1_click4");
}
// Variable declarations
// autogenerated do not edit
GLabel CALCULATOR;
GLabel Pseudo;
GTextField nompseudo;
GLabel Niveaux;
GButton Niveau1;
GButton Niveau2;
GButton Niveau3;
GButton Niveau4;
GWindow window1;
GLabel level1;