5 Octobre
							
								
								
									
										
											BIN
										
									
								
								DEV3.1/TP2:Transitions/Changement.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										29
									
								
								DEV3.1/TP2:Transitions/Changement.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,29 @@
 | 
				
			|||||||
 | 
					import java.awt.*;
 | 
				
			||||||
 | 
					import javax.swing.*;
 | 
				
			||||||
 | 
					import java.util.*;
 | 
				
			||||||
 | 
					import java.io.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class Changement{
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							ClassLoader loader = Thread.currentThread().getContextClassLoader();
 | 
				
			||||||
 | 
							InputStream file = loader.getResourceAsStream("Main.java");
 | 
				
			||||||
 | 
							InputStream file2 = loader.getResourceAsStream("Listeimage.java");
 | 
				
			||||||
 | 
							static public void fenetreCliquer(int LR){
 | 
				
			||||||
 | 
							Main.fenetre.remove(Main.pan);
 | 
				
			||||||
 | 
							Main.pan.remove(Listeimage.liste[Listeimage.index]);
 | 
				
			||||||
 | 
							if (LR==1){
 | 
				
			||||||
 | 
								Listeimage.index=Listeimage.index+1;
 | 
				
			||||||
 | 
								if(Listeimage.index>4){
 | 
				
			||||||
 | 
									Listeimage.index=0;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}else {
 | 
				
			||||||
 | 
								Listeimage.index=Listeimage.index-1;
 | 
				
			||||||
 | 
								if(Listeimage.index<0){
 | 
				
			||||||
 | 
									Listeimage.index=4;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							Main.pan.add(Listeimage.liste[Listeimage.index]);
 | 
				
			||||||
 | 
							Main.fenetre.setContentPane(Main.pan);
 | 
				
			||||||
 | 
							Main.fenetre.repaint();
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								DEV3.1/TP2:Transitions/Galerie.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -2,9 +2,13 @@ import java.awt.*;
 | 
				
			|||||||
import javax.swing.*;
 | 
					import javax.swing.*;
 | 
				
			||||||
import java.awt.event.*;
 | 
					import java.awt.event.*;
 | 
				
			||||||
import java.util.*;
 | 
					import java.util.*;
 | 
				
			||||||
 | 
					import java.io.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class Galerie extends JPanel implements MouseListener{
 | 
					public class Galerie extends JPanel implements MouseListener{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ClassLoader loader = Thread.currentThread().getContextClassLoader();
 | 
				
			||||||
 | 
						InputStream file = loader.getResourceAsStream("Changement.java");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public Galerie(){
 | 
						public Galerie(){
 | 
				
			||||||
		super();
 | 
							super();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -1,23 +0,0 @@
 | 
				
			|||||||
import java.awt.*;
 | 
					 | 
				
			||||||
import javax.swing.*;
 | 
					 | 
				
			||||||
import java.util.*;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public class Changement{
 | 
					 | 
				
			||||||
		
 | 
					 | 
				
			||||||
		static public void fenetreCliquer(int LR){
 | 
					 | 
				
			||||||
		Main.pan.remove(Listeimage.liste[Listeimage.index]);
 | 
					 | 
				
			||||||
		if (LR==1){
 | 
					 | 
				
			||||||
			Listeimage.index+=1;
 | 
					 | 
				
			||||||
			if(Listeimage.index==-1){
 | 
					 | 
				
			||||||
				Listeimage.index=5;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}else {
 | 
					 | 
				
			||||||
			Listeimage.index-=1;
 | 
					 | 
				
			||||||
			if(Listeimage.index==6){
 | 
					 | 
				
			||||||
				Listeimage.index=0;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		Main.pan.add(Listeimage.liste[Listeimage.index]);
 | 
					 | 
				
			||||||
		Main.pan.repaint();
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,15 +0,0 @@
 | 
				
			|||||||
import java.awt.*;
 | 
					 | 
				
			||||||
import javax.swing.*;
 | 
					 | 
				
			||||||
import java.awt.event.*;
 | 
					 | 
				
			||||||
import java.util.*;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public class Listeimage{
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		static JLabel image1 = new JLabel(new ImageIcon("image1.jpg"));
 | 
					 | 
				
			||||||
		static JLabel image2 = new JLabel(new ImageIcon("image2.jpg"));
 | 
					 | 
				
			||||||
		static JLabel image3 = new JLabel(new ImageIcon("image3.jpg"));
 | 
					 | 
				
			||||||
		static JLabel image4 = new JLabel(new ImageIcon("image4.jpg"));
 | 
					 | 
				
			||||||
		static JLabel image5 = new JLabel(new ImageIcon("image5.jpg"));
 | 
					 | 
				
			||||||
		static JLabel[] liste = {image1, image2, image3, image4, image5};
 | 
					 | 
				
			||||||
		static int index=0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								DEV3.1/TP2:Transitions/Listeimage.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										18
									
								
								DEV3.1/TP2:Transitions/Listeimage.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,18 @@
 | 
				
			|||||||
 | 
					import java.awt.*;
 | 
				
			||||||
 | 
					import javax.swing.*;
 | 
				
			||||||
 | 
					import java.awt.event.*;
 | 
				
			||||||
 | 
					import java.util.*;
 | 
				
			||||||
 | 
					import java.io.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class Listeimage{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							ClassLoader loader = Thread.currentThread().getContextClassLoader();
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							static JLabel image1 = new JLabel(new ImageIcon("./img/image1.jpg"));
 | 
				
			||||||
 | 
							static JLabel image2 = new JLabel(new ImageIcon("./img/image2.jpg"));
 | 
				
			||||||
 | 
							static JLabel image3 = new JLabel(new ImageIcon("./img/image3.jpg"));
 | 
				
			||||||
 | 
							static JLabel image4 = new JLabel(new ImageIcon("./img/image4.jpg"));
 | 
				
			||||||
 | 
							static JLabel image5 = new JLabel(new ImageIcon("./img/image5.jpg"));
 | 
				
			||||||
 | 
							static JLabel[] liste = {image1, image2, image3, image4, image5};
 | 
				
			||||||
 | 
							static int index=0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								DEV3.1/TP2:Transitions/Main.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -1,15 +1,18 @@
 | 
				
			|||||||
import java.awt.*;
 | 
					import java.awt.*;
 | 
				
			||||||
import javax.swing.*;
 | 
					import javax.swing.*;
 | 
				
			||||||
import java.util.*;
 | 
					import java.util.*;
 | 
				
			||||||
 | 
					import java.io.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class Main{
 | 
					public class Main{
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		static JFrame fenetre = new JFrame();
 | 
							static JFrame fenetre = new JFrame();
 | 
				
			||||||
		static Galerie pan = new Galerie();
 | 
							static Galerie pan = new Galerie();
 | 
				
			||||||
 | 
							ClassLoader loader = Thread.currentThread().getContextClassLoader();
 | 
				
			||||||
 | 
							InputStream file = loader.getResourceAsStream("Galerie.java");
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		public static void main(String[] args) {
 | 
							public static void main(String[] args) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		pan.add(Listeimage.image1);
 | 
							pan.add(Listeimage.liste[Listeimage.index]);
 | 
				
			||||||
		fenetre.setSize(250, 250);
 | 
							fenetre.setSize(250, 250);
 | 
				
			||||||
    	fenetre.setLocation(250, 250);
 | 
					    	fenetre.setLocation(250, 250);
 | 
				
			||||||
    	fenetre.addMouseListener(pan);
 | 
					    	fenetre.addMouseListener(pan);
 | 
				
			||||||
| 
		 Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB  | 
| 
		 Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB  | 
| 
		 Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB  | 
| 
		 Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB  | 
| 
		 Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								DEV3.1/TP4:OrganisationCode/Galerie/Changement.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										29
									
								
								DEV3.1/TP4:OrganisationCode/Galerie/Changement.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,29 @@
 | 
				
			|||||||
 | 
					import java.awt.*;
 | 
				
			||||||
 | 
					import javax.swing.*;
 | 
				
			||||||
 | 
					import java.util.*;
 | 
				
			||||||
 | 
					import java.io.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class Changement{
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							ClassLoader loader = Thread.currentThread().getContextClassLoader();
 | 
				
			||||||
 | 
							InputStream file = loader.getResourceAsStream("Main.java");
 | 
				
			||||||
 | 
							InputStream file2 = loader.getResourceAsStream("Listeimage.java");
 | 
				
			||||||
 | 
							static public void fenetreCliquer(int LR){
 | 
				
			||||||
 | 
							Main.fenetre.remove(Main.pan);
 | 
				
			||||||
 | 
							Main.pan.remove(Listeimage.liste[Listeimage.index]);
 | 
				
			||||||
 | 
							if (LR==1){
 | 
				
			||||||
 | 
								Listeimage.index=Listeimage.index+1;
 | 
				
			||||||
 | 
								if(Listeimage.index>4){
 | 
				
			||||||
 | 
									Listeimage.index=0;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}else {
 | 
				
			||||||
 | 
								Listeimage.index=Listeimage.index-1;
 | 
				
			||||||
 | 
								if(Listeimage.index<0){
 | 
				
			||||||
 | 
									Listeimage.index=4;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							Main.pan.add(Listeimage.liste[Listeimage.index]);
 | 
				
			||||||
 | 
							Main.fenetre.setContentPane(Main.pan);
 | 
				
			||||||
 | 
							Main.fenetre.repaint();
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								DEV3.1/TP4:OrganisationCode/Galerie/Galerie.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										36
									
								
								DEV3.1/TP4:OrganisationCode/Galerie/Galerie.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,36 @@
 | 
				
			|||||||
 | 
					import java.awt.*;
 | 
				
			||||||
 | 
					import javax.swing.*;
 | 
				
			||||||
 | 
					import java.awt.event.*;
 | 
				
			||||||
 | 
					import java.util.*;
 | 
				
			||||||
 | 
					import java.io.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class Galerie extends JPanel implements MouseListener{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ClassLoader loader = Thread.currentThread().getContextClassLoader();
 | 
				
			||||||
 | 
						InputStream file = loader.getResourceAsStream("Changement.java");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public Galerie(){
 | 
				
			||||||
 | 
							super();
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void mouseClicked(MouseEvent e){
 | 
				
			||||||
 | 
							int x = e.getX();
 | 
				
			||||||
 | 
							if (x <= this.getWidth()/5){
 | 
				
			||||||
 | 
								Changement.fenetreCliquer(0);
 | 
				
			||||||
 | 
							}else if(x >= (this.getWidth()/5)*4){
 | 
				
			||||||
 | 
								Changement.fenetreCliquer(1);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						public void mouseEntered(MouseEvent evenement){
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						public void mouseExited(MouseEvent evenement){
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						public void mousePressed(MouseEvent evenement){
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						public void mouseReleased(MouseEvent evenement){
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								DEV3.1/TP4:OrganisationCode/Galerie/Listeimage.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										23
									
								
								DEV3.1/TP4:OrganisationCode/Galerie/Listeimage.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					import java.awt.*;
 | 
				
			||||||
 | 
					import javax.swing.*;
 | 
				
			||||||
 | 
					import java.awt.event.*;
 | 
				
			||||||
 | 
					import java.util.*;
 | 
				
			||||||
 | 
					import java.io.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class Listeimage{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							ClassLoader loader = Thread.currentThread().getContextClassLoader();
 | 
				
			||||||
 | 
							InputStream file = loader.getResourceAsStream("img/image1.jpg");
 | 
				
			||||||
 | 
							InputStream file2 = loader.getResourceAsStream("img/image2.jpg");
 | 
				
			||||||
 | 
							InputStream file3 = loader.getResourceAsStream("img/image3.jpg");
 | 
				
			||||||
 | 
							InputStream file4 = loader.getResourceAsStream("img/image4.jpg");
 | 
				
			||||||
 | 
							InputStream file5 = loader.getResourceAsStream("img/image5.jpg");
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							static JLabel image1 = new JLabel(new ImageIcon("./img/image1.jpg"));
 | 
				
			||||||
 | 
							static JLabel image2 = new JLabel(new ImageIcon("./img/image2.jpg"));
 | 
				
			||||||
 | 
							static JLabel image3 = new JLabel(new ImageIcon("./img/image3.jpg"));
 | 
				
			||||||
 | 
							static JLabel image4 = new JLabel(new ImageIcon("./img/image4.jpg"));
 | 
				
			||||||
 | 
							static JLabel image5 = new JLabel(new ImageIcon("./img/image5.jpg"));
 | 
				
			||||||
 | 
							static JLabel[] liste = {image1, image2, image3, image4, image5};
 | 
				
			||||||
 | 
							static int index=0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								DEV3.1/TP4:OrganisationCode/Galerie/Main.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										25
									
								
								DEV3.1/TP4:OrganisationCode/Galerie/Main.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,25 @@
 | 
				
			|||||||
 | 
					import java.awt.*;
 | 
				
			||||||
 | 
					import javax.swing.*;
 | 
				
			||||||
 | 
					import java.util.*;
 | 
				
			||||||
 | 
					import java.io.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class Main{
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							static JFrame fenetre = new JFrame();
 | 
				
			||||||
 | 
							static Galerie pan = new Galerie();
 | 
				
			||||||
 | 
							ClassLoader loader = Thread.currentThread().getContextClassLoader();
 | 
				
			||||||
 | 
							InputStream file = loader.getResourceAsStream("Galerie.java");
 | 
				
			||||||
 | 
							InputStream file2 = loader.getResourceAsStream("Listeimage.java");
 | 
				
			||||||
 | 
							InputStream file3 = loader.getResourceAsStream("Changement.java");
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							public static void main(String[] args) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							pan.add(Listeimage.liste[Listeimage.index]);
 | 
				
			||||||
 | 
							fenetre.setSize(250, 250);
 | 
				
			||||||
 | 
					    	fenetre.setLocation(250, 250);
 | 
				
			||||||
 | 
					    	fenetre.addMouseListener(pan);
 | 
				
			||||||
 | 
					    	fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 | 
				
			||||||
 | 
							fenetre.setContentPane(pan);
 | 
				
			||||||
 | 
							fenetre.setVisible(true);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								DEV3.1/TP4:OrganisationCode/Galerie/galerie.jar
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								DEV3.1/TP4:OrganisationCode/Galerie/img/image1.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 5.7 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								DEV3.1/TP4:OrganisationCode/Galerie/img/image2.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 4.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								DEV3.1/TP4:OrganisationCode/Galerie/img/image3.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 8.3 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								DEV3.1/TP4:OrganisationCode/Galerie/img/image4.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 19 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								DEV3.1/TP4:OrganisationCode/Galerie/img/image5.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 3.7 KiB  |