Site Internet de Blatter.

...et le monde s'ouvre enfin...

Différentes petites démos en java :

Les démos exploitent les fichiers suivants :
    - ressources/logo.png (Fichier de logo pour la fenêtre "A Propos de..."
    - ressources/VISUALIZE-Tour_PCFont.png (Fichier de fonte)
    - packutils/(sources).java (Fichiers sources)
 
Les sources .java et fichiers images sont contenus dans le fichier .jar : democadres.jar.

Démo1 : Applet de 370 x 120. (Classe cCadreBrut).

alt="Votre navigateur comprend le tag <applet> mais ne peut faire exécuter l'application !" Votre navigateur ignore le tag <applet> !

Langage JAVA - Fichier source cCadreBrut.java. Générateur de source : GeSHi - Generic Syntax Highlighter. V1.0.8.6. Look at the GeSHi Website !

  1. /**
  2.  * @auteur      : Dominique Capet aka MG.
  3.  * @copyrights : MG For The Blatter Team. All rights reserved.
  4.  *
  5.  * @projet :            utils
  6.  * @package :           packutils
  7.  * @fichier :           cCadreBrut.java
  8.  * @version :           V1.00.18 févr. 2010
  9.  * @date :                      18 févr. 2010 - 09:00:20
  10.  * @der_modif :     18 févr. 2010 - 09:00:20
  11.  *
  12.  */
  13. package packutils;
  14.  
  15. // Importation.
  16. import java.awt.Graphics;
  17.  
  18. /**
  19.  *
  20.  * @class cCadreBrut
  21.  *
  22.  */
  23. public class cCadreBrut extends cBaseFontePanel
  24. {
  25.         // Constantes privées.
  26.         private static final long serialVersionUID = 8440538455641323344L;
  27.  
  28.         public cCadreBrut(String iTexte, int x, int y)
  29.         {
  30.                 super(iTexte, x, y);
  31.         }
  32.         public void PrintTexteCadre(Graphics g, String[] TabTexte, int x, int y)
  33.         {
  34.                 int Ind = 0;
  35.                 while (TabTexte[ Ind ] != "") {                
  36.                         PrintLine(g, TabTexte[ Ind ], x, y);
  37.                         y += HEIGHT_PIXEL_CHAR;
  38.                         Ind++;
  39.                 }
  40.         }
  41.         public void paintComponent(Graphics g)
  42.         {
  43.                 super.paintComponent(g);
  44.                 PrintTexteCadre(g, this.TabTexte, this.x, this.y);
  45.         }
  46. }
  47.  
  Source copyrights © 2010 Dominique Capet aka MG and The Blatter Team. All rights reserved.
 

Démo2 : Applet de 370 x 150. (Classe cCadre).

alt="Votre navigateur comprend le tag <applet> mais ne peut faire exécuter l'application !" Votre navigateur ignore le tag <applet> !

Langage JAVA - Fichier source cCadre.java. Générateur de source : GeSHi - Generic Syntax Highlighter. V1.0.8.6. Look at the GeSHi Website !

  1. /**
  2.  * @auteur      : Dominique Capet aka MG.
  3.  * @copyrights : MG For The Blatter Team. All rights reserved.
  4.  *
  5.  * @projet :            utils
  6.  * @package :           packutils
  7.  * @fichier :           cCadre.java
  8.  * @version :           V1.00.18 févr. 2010
  9.  * @date :                      18 févr. 2010 - 09:02:19
  10.  * @der_modif :     18 févr. 2010 - 09:02:19
  11.  *
  12.  */
  13. package packutils;
  14.  
  15. // Importations.
  16. import java.awt.Graphics;
  17. import java.util.Random;
  18.  
  19. /**
  20.  *
  21.  * @class cCadre
  22.  *
  23.  */
  24. public class cCadre extends cBaseFontePanel
  25. {
  26.         // Constantes privées.
  27.         private static final long serialVersionUID = -6474397514120567371L;
  28.         // Variables privées.
  29.         private String ligne_haute;
  30.         private String ligne_basse;
  31.         private char[] gen1, gen2;
  32.  
  33.         public cCadre(String iTexte, int x, int y)
  34.         {
  35.                 super(iTexte, x, y);
  36.                 // Génération aléatoire des lignes qui ferment le texte en haut et en bas.             
  37.                 // Length + 2, car on ajoute un espace de part et d'autres du texte.
  38.                 this.ligne_haute = RandomLigne(this.Length + 2, 255-1, 249);
  39.                 this.ligne_basse = RandomLigne(this.Length + 2, 248, 242);
  40.                 this.gen1 = new char[LIGNE_TEXTE_MAX];
  41.                 this.gen2 = new char[LIGNE_TEXTE_MAX];
  42.                 Random generator = new Random();
  43.                 for (int i = 0; i < this.nbLines; i++) {
  44.                         this.gen1[ i ] = (char) (228 + generator.nextInt(235 - 228 + 1));
  45.                         this.gen2[ i ] = (char) (228 + generator.nextInt(235 - 228 + 1));
  46.                 }
  47.         }
  48.         public void PrintTexteCadre(Graphics g, String[] TabTexte, int x, int y)
  49.         {
  50.                 PrintLine(g, (char) 226 + this.ligne_haute + (char) 227, x, y);
  51.                 y += HEIGHT_PIXEL_CHAR;          
  52.                 int Ind = 0;
  53.                 while (TabTexte[ Ind ] != "") {                
  54.                         PrintLine(g, this.gen1[ Ind ]+" "+TabTexte[ Ind ]+" "+this.gen2[ Ind ], x, y);
  55.                         y += HEIGHT_PIXEL_CHAR;
  56.                         Ind++;
  57.                 }
  58.                 PrintLine(g, (char) 224 + this.ligne_basse + (char) 225, x, y);        
  59.         }
  60.         public void paintComponent(Graphics g)
  61.         {
  62.                 super.paintComponent(g);
  63.                 PrintTexteCadre(g, this.TabTexte, this.x, this.y);
  64.         }
  65. }
  66.  
  Source copyrights © 2010 Dominique Capet aka MG and The Blatter Team. All rights reserved.
 

Démo3 : Applet de 415 x 150. (Classe cCadreScroll).

alt="Votre navigateur comprend le tag <applet> mais ne peut faire exécuter l'application !" Votre navigateur ignore le tag <applet> !

Langage JAVA - Fichier source cCadreScroll.java. Générateur de source : GeSHi - Generic Syntax Highlighter. V1.0.8.6. Look at the GeSHi Website !

  1. /**
  2.  * @auteur      : Dominique Capet aka MG.
  3.  * @copyrights : MG For The Blatter Team. All rights reserved.
  4.  *
  5.  * @projet :            utils
  6.  * @package :           packutils
  7.  * @fichier :           cCadreScroll.java
  8.  * @version :           V1.00.18 févr. 2010
  9.  * @date :                      18 févr. 2010 - 09:04:11
  10.  * @der_modif :     18 févr. 2010 - 09:04:11
  11.  *
  12.  */
  13. package packutils;
  14.  
  15. // Importations.
  16. import java.awt.Graphics;
  17. import java.util.Random;
  18.  
  19. /**
  20.  *
  21.  * @class cCadreScroll
  22.  *
  23.  */
  24. public class cCadreScroll extends cBaseFontePanel {
  25.         // Constantes privées.
  26.         private static final long serialVersionUID = 5439666621782555786L;
  27.         private static final int WAIT_BEFORE_ALEATOIRE = 20;
  28.         // Variables privées.
  29.         private String ligne_haute;
  30.         private String ligne_basse;
  31.         private char[] gen1, gen2;
  32.         private Random generator;
  33.         private int CptBeforeAleatoire = 0;
  34.  
  35.         public cCadreScroll(String iTexte, int x, int y) {
  36.                 super(iTexte, x, y);
  37.                 // Préparation de l'écran.
  38.                 // Génération aléatoire des lignes qui ferment le texte en haut et en bas.             
  39.                 // Length + 2, car on ajoute un espace de part et d'autres du texte.
  40.                 this.ligne_haute = RandomLigne(this.Length + 2, 255-1, 249);
  41.                 this.ligne_basse = RandomLigne(this.Length + 2, 248, 242);
  42.                 this.gen1 = new char[LIGNE_TEXTE_MAX];
  43.                 this.gen2 = new char[LIGNE_TEXTE_MAX];
  44.                 this.generator = new Random();
  45.         }
  46.         public void PrintTexteCadre(Graphics g, String[] TabTexte, int x, int y)
  47.         {
  48.                 PrintLine(g, (char) 226 + this.ligne_haute + (char) 227, x, y);
  49.                 y += HEIGHT_PIXEL_CHAR;
  50.                 int Ind = 0;
  51.                 while (TabTexte[ Ind ]!="") {                  
  52.                         if (this.CptBeforeAleatoire == 0) {
  53.                                 this.gen1[Ind] = (char) (228 + this.generator.nextInt(235 - 228 + 1));
  54.                                 this.gen2[Ind] = (char) (228 + this.generator.nextInt(235 - 228 + 1));
  55.                         }
  56.                         PrintLine(g, this.gen1[Ind]+" "+TabTexte[ Ind ]+" "+this.gen2[Ind], x, y);
  57.                         y += HEIGHT_PIXEL_CHAR;
  58.                         Ind++;
  59.                 }
  60.                 this.CptBeforeAleatoire++; if (this.CptBeforeAleatoire > WAIT_BEFORE_ALEATOIRE) this.CptBeforeAleatoire = 0;
  61.                 PrintLine(g, (char) 224 + this.ligne_basse + (char) 225, x, y);        
  62.  
  63.                 String Save = this.ligne_haute.substring(1);
  64.                 this.ligne_haute = Save + (char) (249 + this.generator.nextInt(255 - 249));
  65.                 Save = this.ligne_basse.substring(0, this.ligne_basse.length() - 1);
  66.                 this.ligne_basse = (char) (242 + this.generator.nextInt(248 - 242 + 1)) + Save;
  67.         }
  68.         public void paintComponent(Graphics g)
  69.         {
  70.                 super.paintComponent(g);
  71.                 PrintTexteCadre(g, this.TabTexte, this.x, this.y);
  72.         }
  73. }
  74.  
  Source copyrights © 2010 Dominique Capet aka MG and The Blatter Team. All rights reserved.
 

Démo4 : Applet de 600 x 190. (Classe cLineScroll).
Les coordonnées d'affichage doivent être paramètrables.

alt="Votre navigateur comprend le tag <applet> mais ne peut faire exécuter l'application !" Votre navigateur ignore le tag <applet> !

Démo5 : Applet de 620 x 190. (Classe cLine3dScroll).
Les coordonnées d'affichage doivent être paramètrables.

alt="Votre navigateur comprend le tag <applet> mais ne peut faire exécuter l'application !" Votre navigateur ignore le tag <applet> !