IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Java Discussion :

Concaténation deux affichages


Sujet :

Java

  1. #1
    Membre régulier
    Femme Profil pro
    étudiante chercheuse
    Inscrit en
    Septembre 2013
    Messages
    274
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : étudiante chercheuse
    Secteur : Enseignement

    Informations forums :
    Inscription : Septembre 2013
    Messages : 274
    Points : 101
    Points
    101
    Par défaut Concaténation deux affichages
    bonjour
    j'en ai 2 fonction d'affichage l'une affiche l’entête d'une matrice appelé "afficheentete " et l'autre affiche le contenu de matrice appelé "affiche contenu" je veux faire une méthode appelé affiche qui affiche le conteu au sein de l’entête .
    le code de la fonction afficheentete est :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    public static void afficheentete()throws JDOMException, IOException
    	{
    		TestXml xml = new TestXml() ; 
    		Element root = xml.getRoot("C:\\Users\\faten\\Desktop\\Tentative FiNALParcTool\\xmlparser\\src\\default.editeurparctool.xml") ;
    		ArrayList<ContainTask> TaskC = xml.getContainTask(root);
    		ArrayList<Place> Places = xml.getPlaces(root);
     
    		ArrayList<Inarcttp> INTTP = xml.getInputArcTTP(root);
     
    		ArrayList <ArrayList> Matrice = new ArrayList<ArrayList>();
     
    		  Matrice.add(0,TaskC);
    	      Matrice.add(1,Places);
    		 ArrayList<Place> Procstab = new ArrayList<Place>(); 
    		  ArrayList<Place> TitoTi = new ArrayList<Place>();  // if  (p.getIplace == p.getJplaace) ==> titoTi
    		  ArrayList<Place> TitoTj = new ArrayList<Place>(); 
     
     
    			int nbTache= TaskC.size();
    			int nbLigne=15;
    			int nbColonne=9;
    			int nbPlaces=Places.size();
    	     //System.out.println();
     
    			for(int i = 0; i <= 1; i++)
    	        { 
    	            ArrayList s = Matrice.get(i);
     
    	            if(i==1)
    	            {
    	            for (int j = 0; j < s.size(); j++) 
    	            { 
    	        		Place  p = new Place();  
    	        		p = (Place) s.get(j) ; 
     
    	        		 if(p.getTypePlace()==9) // proc
    	        		{      
    	        		    	Procstab.add(p) ; 
     
    	        		 }//System.out.print(Procstab);
    	        		 if(p.getTypePlace()==10)
    	        		{ 
     
    			    	 TitoTi.add(p) ;  
     
    	        		 }//System.out.print(TitoTi);
    			     if(p.getTypePlace()==11)
    	        		{ 
    	        		    	TitoTj.add(p) ;  
     
    	        		 }
    			    // System.out.print(TitoTj);
    	            }
    	            }
     
    	        }
     
    			// l affichage du contenu 	
    	        System.out.print("             ");
    	        for ( int j = 0 ; j < nbTache; j++ ) //colonne 
    	        {  System.out.print("   ");
    	        for ( int k = 0 ; k <nbColonne; k++ ) 
    	        {
    	       	 System.out.print("  ");
    	      	     if (k ==0){System.out.print("T"+(j+1)+"Creation" );}
    	      	     if (k ==1)	{System.out.print("T" +(j+1)+"IncremtPeriod" );}
    	        	 if (k ==2)	{System.out.print("T" +(j+1)+"Reset" );}
    	        	 if (k ==3)	{System.out.print("T" +(j+1)+"Activation" );} 
    	        	 if (k ==4)	{System.out.print("T" +(j+1)+"Execution" );}
    	        	 if (k ==5)	{System.out.print("T" +(j+1)+"Incrementing " );}
    	        	 if (k ==6)	{System.out.print("T" +(j+1)+"Receiving" );}
    	         	 if (k ==7)	{System.out.print("T" +(j+1)+"Releasing" );}
    	         	 if (k ==8)	{System.out.print("T" +(j+1)+"Sending" );}
     
    	        }
     
    		}System.out.println();
     
    		for ( int i = 0 ; i < nbTache; i++ ) //ligne 
    	        { 
    	        for ( int l = 0 ; l <nbLigne; l++ ) 
    	        {if (l ==0){System.out.println("P" +(i+1)+"Uncreated      " );}
    	     	 if (l ==1){System.out.println("P" +(i+1)+"DeadLine       " );}
    	      	 if (l ==2){System.out.println("P" +(i+1)+"RemainingPeriod" );}
    	      	 if (l ==3){System.out.println("P" +(i+1)+"Created        " );} 
    	      	 if (l ==4){System.out.println("P" +(i+1)+"ElapsedPeriod  " );}
    	      	 if (l ==5){System.out.println("P" +(i+1)+"ReceivedData   " );}
    	      	 if (l ==6){System.out.println("P" +(i+1)+"Ready          " );}
    	       	 if (l ==7){System.out.println("P" +(i+1)+"Disabled       " );}
    	       	 if (l ==8){System.out.println("P" +(i+1)+"Activated      " );}
    	      	 if (l ==9){System.out.println("P" +(i+1)+"GetProc        " );}
    	     	 if (l ==10){System.out.println("P" +(i+1)+"IncreExec      " ); }
    	     	 if (l ==11){System.out.println("P" +(i+1)+"Maker          " ); }
    	     	 if (l ==12){System.out.println("P" +(i+1)+"e" +(i+1)+"             " ); }
    	      	 if (l ==13){System.out.println("P" +(i+1)+"ReleaseProc    " );}
    	      	 if (l ==14){System.out.println("P" +(i+1)+"DataToSend     " );}
    	        }
    	        }
    		//System.out.println();
     
    	    for ( int l = nbTache*nbLigne ; l <=nbTache*nbLigne+nbPlaces ; l++ ) 
     
    	    {int tailleProcstab =Procstab.size();
    	    int tailleTitoTi=TitoTi.size();
    	    int tailleTitoTj=TitoTj.size();
    	    //affichage des lignes string normal
    		 /*ordre dont j'ai fait le traitement indice place/task/xml
    		   l'ordre: "uncreated""DeadLine" "RemainingPeriod" "Ready" "GetProc" "Releasing" "DataToSend" "ReceivedData"*/
    	    int nb = nbTache*nbLigne+tailleTitoTi; 
    		int nb1 =nb+tailleProcstab ;
    	 if(l>=nbTache*nbLigne && l <(nbTache*nbLigne+tailleTitoTi))   //TitoTi
    	 {    
    		 for(l=nbTache*nbLigne;l <(nbTache*nbLigne+tailleTitoTi);l++)
    		 {
     
    		System.out.println(TitoTi.get(l-nbTache*nbLigne)+"            " );//T1toT1.....T1toT13 
     
    	 }
    	 }
     
    		 if(l>=nb && l < (nb + tailleProcstab+1)&& l <nb1) //  Proc
    	      {
    			 for(l=nb;l <(nb + tailleTitoTi+1)&& l <nb1;l++)
    		 {
     
    				 System.out.println(Procstab.get(l-nb)+"           ");//proc 1/2/3/4 
    		 }
     
    	     }
     
     
    	 	   if(l>=nb1 && l < (nb1+tailleTitoTj))//TitoTj
     
    	         {
    	 		 for(l=nb1;l <(nb1+tailleTitoTj);l++)
    	 		 {
    	     	   System.out.println(TitoTj.get(l-nb1)+"           ");
    	 		 }
     
    	        }
    	    }
     
    	}
    Le code de la fonction affichecontenu est
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    public static void affichecontenu(int mat[][], int n, int m)
    	{
    		for (int i=0;i<n;i++)
    		{System.out.print("             ");
    			for (int j=0;j<m;j++)
    			{
    				System.out.print(mat[i][j]);
     
    		     }
    			System.out.println();
     
    		}
    	}
    merci d'avance

  2. #2
    Modérateur
    Avatar de wax78
    Homme Profil pro
    Chef programmeur
    Inscrit en
    Août 2006
    Messages
    4 084
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : Belgique

    Informations professionnelles :
    Activité : Chef programmeur
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Août 2006
    Messages : 4 084
    Points : 7 996
    Points
    7 996
    Par défaut
    Ha mais de rien et bonne chance

    T'aurais pas oublié quelques chose genre la question ?

    Il serait, de plus, de bon aloi de poster un code un peu plus épuré de toutes les choses inutiles car a mon avis 80% du code n'a rien avoir avec ton problème, ce qui fait que personne n'aura envie de lire le code pour essayer de le comprendre et donc de t'aider.

  3. #3
    Membre régulier
    Femme Profil pro
    étudiante chercheuse
    Inscrit en
    Septembre 2013
    Messages
    274
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : étudiante chercheuse
    Secteur : Enseignement

    Informations forums :
    Inscription : Septembre 2013
    Messages : 274
    Points : 101
    Points
    101
    Par défaut
    j'ai déjà poster le question je veux savoir comment concatiner les 2 fonction dans une même fonction qui permet d'afficher le contenu de matrice au sein des entête ligne et colonne
    merci

  4. #4
    Membre expérimenté Avatar de Nico02
    Homme Profil pro
    Developpeur Java/JEE
    Inscrit en
    Février 2011
    Messages
    728
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Developpeur Java/JEE
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Février 2011
    Messages : 728
    Points : 1 622
    Points
    1 622
    Par défaut
    Au hasard, pourquoi ne pas les appeler l'une après l'autre ?

  5. #5
    Membre régulier
    Femme Profil pro
    étudiante chercheuse
    Inscrit en
    Septembre 2013
    Messages
    274
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : étudiante chercheuse
    Secteur : Enseignement

    Informations forums :
    Inscription : Septembre 2013
    Messages : 274
    Points : 101
    Points
    101
    Par défaut
    j'ai déjà appelé l'une aprés l'autre mais le contenu de matrice sera afficher juste après les entête pas au sein d'eux

  6. #6
    Membre régulier
    Femme Profil pro
    étudiante chercheuse
    Inscrit en
    Septembre 2013
    Messages
    274
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : étudiante chercheuse
    Secteur : Enseignement

    Informations forums :
    Inscription : Septembre 2013
    Messages : 274
    Points : 101
    Points
    101
    Par défaut
    voilà j'ai diviser l'affichage des entete en 2 l'une pour les ligne et l'autre pour les colonne cava , mais pour les ligne j'ai pas trouver où appelé la méthode afficheenteteLigne (voir méthode affiche -->ka dernière)
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    public static void afficheenteteLigne()throws JDOMException, IOException
    	{
    		TestXml xml = new TestXml() ; 
    		Element root = xml.getRoot("C:\\Users\\faten\\Desktop\\Tentative FiNALParcTool\\xmlparser\\src\\default.editeurparctool.xml") ;
    		ArrayList<ContainTask> TaskC = xml.getContainTask(root);
    		ArrayList<Place> Places = xml.getPlaces(root);
     
    		ArrayList <ArrayList> Matrice = new ArrayList<ArrayList>();
     
    		  Matrice.add(0,TaskC);
    	      Matrice.add(1,Places);
    		 ArrayList<Place> Procstab = new ArrayList<Place>(); 
    		  ArrayList<Place> TitoTi = new ArrayList<Place>();  // if  (p.getIplace == p.getJplaace) ==> titoTi
    		  ArrayList<Place> TitoTj = new ArrayList<Place>(); 
     
     
    			int nbTache= TaskC.size();
    			int nbLigne=15;
    			int nbPlaces=Places.size();
    	     //System.out.println();
     
    			for(int i = 0; i <= 1; i++)
    	        { 
    	            ArrayList s = Matrice.get(i);
     
    	            if(i==1)
    	            {
    	            for (int j = 0; j < s.size(); j++) 
    	            { 
    	        		Place  p = new Place();  
    	        		p = (Place) s.get(j) ; 
     
    	        		 if(p.getTypePlace()==9) // proc
    	        		{      
    	        		    	Procstab.add(p) ; 
     
    	        		 }//System.out.print(Procstab);
    	        		 if(p.getTypePlace()==10)
    	        		{ 
     
    			    	 TitoTi.add(p) ;  
     
    	        		 }//System.out.print(TitoTi);
    			     if(p.getTypePlace()==11)
    	        		{ 
    	        		    	TitoTj.add(p) ;  
     
    	        		 }
    			    // System.out.print(TitoTj);
    	            }
    	            }
     
    	        }
     
     
     
    		for ( int i = 0 ; i < nbTache; i++ ) //ligne 
    	        { 
    	        for ( int l = 0 ; l <nbLigne; l++ ) 
    	        {if (l ==0){System.out.println("P" +(i+1)+"Uncreated      " );}
    	     	 if (l ==1){System.out.println("P" +(i+1)+"DeadLine       " );}
    	      	 if (l ==2){System.out.println("P" +(i+1)+"RemainingPeriod" );}
    	      	 if (l ==3){System.out.println("P" +(i+1)+"Created        " );} 
    	      	 if (l ==4){System.out.println("P" +(i+1)+"ElapsedPeriod  " );}
    	      	 if (l ==5){System.out.println("P" +(i+1)+"ReceivedData   " );}
    	      	 if (l ==6){System.out.println("P" +(i+1)+"Ready          " );}
    	       	 if (l ==7){System.out.println("P" +(i+1)+"Disabled       " );}
    	       	 if (l ==8){System.out.println("P" +(i+1)+"Activated      " );}
    	      	 if (l ==9){System.out.println("P" +(i+1)+"GetProc        " );}
    	     	 if (l ==10){System.out.println("P" +(i+1)+"IncreExec      " ); }
    	     	 if (l ==11){System.out.println("P" +(i+1)+"Maker          " ); }
    	     	 if (l ==12){System.out.println("P" +(i+1)+"e" +(i+1)+"             " ); }
    	      	 if (l ==13){System.out.println("P" +(i+1)+"ReleaseProc    " );}
    	      	 if (l ==14){System.out.println("P" +(i+1)+"DataToSend     " );}
    	        }
    	        }
    		//System.out.println();
     
    	    for ( int l = nbTache*nbLigne ; l <=nbTache*nbLigne+nbPlaces ; l++ ) 
     
    	    {int tailleProcstab =Procstab.size();
    	    int tailleTitoTi=TitoTi.size();
    	    int tailleTitoTj=TitoTj.size();
    	    //affichage des lignes string normal
    		 /*ordre dont j'ai fait le traitement indice place/task/xml
    		   l'ordre: "uncreated""DeadLine" "RemainingPeriod" "Ready" "GetProc" "Releasing" "DataToSend" "ReceivedData"*/
    	    int nb = nbTache*nbLigne+tailleTitoTi; 
    		int nb1 =nb+tailleProcstab ;
    	 if(l>=nbTache*nbLigne && l <(nbTache*nbLigne+tailleTitoTi))   //TitoTi
    	 {    
    		 for(l=nbTache*nbLigne;l <(nbTache*nbLigne+tailleTitoTi);l++)
    		 {
     
    		System.out.println(TitoTi.get(l-nbTache*nbLigne)+"            " );//T1toT1.....T1toT13 
     
    	 }
    	 }
     
    		 if(l>=nb && l < (nb + tailleProcstab+1)&& l <nb1) //  Proc
    	      {
    			 for(l=nb;l <(nb + tailleTitoTi+1)&& l <nb1;l++)
    		 {
     
    				 System.out.println(Procstab.get(l-nb)+"           ");//proc 1/2/3/4 
    		 }
     
    	     }
     
     
    	 	   if(l>=nb1 && l < (nb1+tailleTitoTj))//TitoTj
     
    	         {
    	 		 for(l=nb1;l <(nb1+tailleTitoTj);l++)
    	 		 {
    	     	   System.out.println(TitoTj.get(l-nb1)+"           ");
    	 		 }
     
    	        }
    	    }
     
    	}
    	public static void afficheenteteColonne()throws JDOMException, IOException{
    		TestXml xml = new TestXml() ; 
    		Element root = xml.getRoot("C:\\Users\\faten\\Desktop\\Tentative FiNALParcTool\\xmlparser\\src\\default.editeurparctool.xml") ;
    		ArrayList<ContainTask> TaskC = xml.getContainTask(root);
    		int nbTache= TaskC.size();
    		int nbColonne=9;
        System.out.print("             ");
        for ( int j = 0 ; j < nbTache; j++ ) //colonne 
        {  System.out.print("   ");
        for ( int k = 0 ; k <nbColonne; k++ ) 
        {
       	 System.out.print("  ");
      	     if (k ==0){System.out.print("T"+(j+1)+"Creation" );}
      	     if (k ==1)	{System.out.print("T" +(j+1)+"IncremtPeriod" );}
        	 if (k ==2)	{System.out.print("T" +(j+1)+"Reset" );}
        	 if (k ==3)	{System.out.print("T" +(j+1)+"Activation" );} 
        	 if (k ==4)	{System.out.print("T" +(j+1)+"Execution" );}
        	 if (k ==5)	{System.out.print("T" +(j+1)+"Incrementing " );}
        	 if (k ==6)	{System.out.print("T" +(j+1)+"Receiving" );}
         	 if (k ==7)	{System.out.print("T" +(j+1)+"Releasing" );}
         	 if (k ==8)	{System.out.print("T" +(j+1)+"Sending" );}
     
        }
     
    }System.out.println();
    	}
    	public static void affiche(int mat[][], int n, int m)throws JDOMException, IOException
    	{
    		afficheenteteColonne();
    		for (int i=0;i<n;i++)
    		{System.out.print("             ");
    			for (int j=0;j<m;j++)
    			{
     
    				System.out.print(mat[i][j]);
     
    		     }
    			System.out.println();
     
    		}
    	}
    help

  7. #7
    Modérateur
    Avatar de wax78
    Homme Profil pro
    Chef programmeur
    Inscrit en
    Août 2006
    Messages
    4 084
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : Belgique

    Informations professionnelles :
    Activité : Chef programmeur
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Août 2006
    Messages : 4 084
    Points : 7 996
    Points
    7 996
    Par défaut
    Mmmm si j'en crois ce que tu dis, tu voudrais une concatenation style :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    Entete1 ; matrice_value[0][0]; matrice_value[1][0]; matrice_value[2][0];
    Entete2 ; matrice_value[0][1]; matrice_value[1][1]; matrice_value[2][1];
    Entete3 ; matrice_value[0][2]; matrice_value[1][2]; matrice_value[2][2];
    ...

    et non un concatenation "verticale" avec les entete sur la premiere ligne et la matrice qui vient sur les lignes suivante ?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    Entete1; Entete2; Entete3;
    matrice_value[0][1];matrice_value[0][1];matrice_value[0][2];
    matrice_value[1][1];matrice_value[1][1];matrice_value[1][2];
    matrice_value[2][1];matrice_value[2][1];matrice_value[2][2];
    C'est bien ça ?

  8. #8
    Membre régulier
    Femme Profil pro
    étudiante chercheuse
    Inscrit en
    Septembre 2013
    Messages
    274
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : étudiante chercheuse
    Secteur : Enseignement

    Informations forums :
    Inscription : Septembre 2013
    Messages : 274
    Points : 101
    Points
    101
    Par défaut
    oui c'est ça
    par exemple les lettre sont les entête l'un de ligne et l'autre de colonne et le contenu sont les chiffres qui sort comme tout un bloc déjà créer(matrice)


    a b c d
    e 1 0 4 5
    f 1 0 4 5
    g 1 0 4 5
    h 1 0 4 5

  9. #9
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 45
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Points : 48 807
    Points
    48 807
    Par défaut
    Citation Envoyé par FATENMRABET Voir le message
    j'ai déjà poster le question je veux savoir comment concatiner les 2 fonction dans une même fonction qui permet d'afficher le contenu de matrice au sein des entête ligne et colonne
    merci
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    public void afficheTout(int mat[][], int n, int m){
        afficheenteteLigne()
        affichecontenu(mat, n, m)
    }

  10. #10
    Membre régulier
    Femme Profil pro
    étudiante chercheuse
    Inscrit en
    Septembre 2013
    Messages
    274
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : étudiante chercheuse
    Secteur : Enseignement

    Informations forums :
    Inscription : Septembre 2013
    Messages : 274
    Points : 101
    Points
    101
    Par défaut
    même problème les entêtes s'affiche au début puis vient par la suite le contenu

  11. #11
    Membre régulier
    Femme Profil pro
    étudiante chercheuse
    Inscrit en
    Septembre 2013
    Messages
    274
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : étudiante chercheuse
    Secteur : Enseignement

    Informations forums :
    Inscription : Septembre 2013
    Messages : 274
    Points : 101
    Points
    101
    Par défaut
    affichage courante de dernier code que j'ai poster c bon just où il ya des X JE VEUX AFFICHER L'ENTETE DES LIGNEs
    T1Creation T1IncremtPeriod T1Reset T1Activation
    xxxxxx 1000000000000000000000000000000000000000000000000000000

  12. #12
    Modérateur

    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    12 559
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 12 559
    Points : 21 621
    Points
    21 621
    Par défaut
    Il suffit d'afficher les lignes une par une, au lieu de faire des méthodes qui affichent tous les en-têtes à la fois ou toutes les données à la fois.

    C'est quand même pas difficile à deviner -_-°...

  13. #13
    Membre régulier
    Femme Profil pro
    étudiante chercheuse
    Inscrit en
    Septembre 2013
    Messages
    274
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : étudiante chercheuse
    Secteur : Enseignement

    Informations forums :
    Inscription : Septembre 2013
    Messages : 274
    Points : 101
    Points
    101
    Par défaut
    oui je c bien mais j'ai des contraintes d'extraction d'xml .............

  14. #14
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 45
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Points : 48 807
    Points
    48 807
    Par défaut
    Et en quoi est-ce un problème? Tu extrait ton xml (d'ailleurs, je ne vois pas ce qu'une fonction de parsing de xml viens faire dans une méthode portant le nom de "afficheenteteLigne" dont le seul rôle devrait être de l'affichage), tu parse tes données, puis t'affiche ligne par ligne: entête et données.
    En pseudo code:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    pour chaque colonne
       afficher l'entête de colonne
    nouvelle ligne
    pour chaque ligne
       afficher l'entête de la ligne
       pour chaque colonne
          afficher la valeur
       nouvelle ligne

  15. #15
    Membre régulier
    Femme Profil pro
    étudiante chercheuse
    Inscrit en
    Septembre 2013
    Messages
    274
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : étudiante chercheuse
    Secteur : Enseignement

    Informations forums :
    Inscription : Septembre 2013
    Messages : 274
    Points : 101
    Points
    101
    Par défaut
    merci

  16. #16
    Membre régulier
    Femme Profil pro
    étudiante chercheuse
    Inscrit en
    Septembre 2013
    Messages
    274
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : étudiante chercheuse
    Secteur : Enseignement

    Informations forums :
    Inscription : Septembre 2013
    Messages : 274
    Points : 101
    Points
    101
    Par défaut
    vous m'avez pas compris si c'été à ce point facile je pose pas la question le problème que l’entête de matrice que je vais afficher n'est ni extrait dynamiquement ni taper à la main c'est une combinaison des 2 et pour le dégager dans l'ordre c’est déjà un long travail pour moi c'est pourquoi j'ai diviser en fonction l’extraction des ligne et des colonne et le contenu a part puisque le contenu est int et l’entête est String j’espère que vous m'avez compris .
    si c'été comme vous le disiez donc ça serais la vie en rose pour moi et j'avais même pas demander l'aide :/

  17. #17
    Modérateur

    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    12 559
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 12 559
    Points : 21 621
    Points
    21 621
    Par défaut
    Je ne vois pas comment il pourrait être difficile de faire ce que tchize_ propose.
    Peut-être que tu pourrais commencer à le prouver avec du concret ?

Discussions similaires

  1. Réponses: 12
    Dernier message: 12/04/2010, 17h27
  2. Concaténer deux listes
    Par Dunk dans le forum Pascal
    Réponses: 13
    Dernier message: 25/04/2006, 18h09
  3. concaténation et affichage
    Par ph_anrys dans le forum Général JavaScript
    Réponses: 1
    Dernier message: 30/08/2005, 15h43
  4. Réponses: 6
    Dernier message: 27/05/2004, 10h41
  5. Concaténer deux variables ?
    Par glsn dans le forum ASP
    Réponses: 2
    Dernier message: 19/12/2003, 13h53

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo