Compare commits
6 Commits
correction
...
master
Author | SHA1 | Date |
---|---|---|
NicolasFau | c5ba647f68 | 6 years ago |
NicolasFau | 92c3b7d56a | 6 years ago |
NicolasFau | b0f9825d94 | 6 years ago |
NicolasFau | 21744392ca | 6 years ago |
NicolasFau | eea9162ef4 | 6 years ago |
NicolasFau | e9b3a5aea6 | 6 years ago |
@ -1,20 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry exported="true" kind="lib" path="/home/nicolas/Bureau/jdbc-support-1.0.23-sources.jar">
|
||||
<classpathentry kind="lib" path="/home/nicolas/eclipse-workspace/Projet_Java/JAVA/PROJET-PMT_STRI1A/src/jdbc.jar">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry exported="true" kind="lib" path="/home/nicolas/Téléchargements/gson-2.8.5.jar">
|
||||
<classpathentry kind="lib" path="/home/nicolas/eclipse-workspace/Projet_Java/JAVA/PROJET-PMT_STRI1A/src/gson-2.6.2.jar">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="/home/nicolas/eclipse-workspace/Projet_Java/JAVA/PROJET-PMT_STRI1A/src/javatuples-1.2.jar"/>
|
||||
<classpathentry kind="lib" path="/home/nicolas/Téléchargements/swt-linux-gtk-x64.jar/swt-linux-gtk-x64.jar"/>
|
||||
<classpathentry kind="lib" path="swing2swt.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
@ -1,12 +1,12 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=11
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=11
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 939 KiB |
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="src" path=""/>
|
||||
<classpathentry kind="output" path=""/>
|
||||
</classpath>
|
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>src</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,33 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package gui;
|
||||
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.GridBagLayout;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
/**
|
||||
* @author nicolas
|
||||
*
|
||||
*/
|
||||
public class Background extends JPanel{
|
||||
private ImageIcon image;
|
||||
public Background(String path) {
|
||||
super();
|
||||
//this.setLayout(new FlowLayout());
|
||||
this.image=new ImageIcon(path);
|
||||
}
|
||||
public void setBackground(ImageIcon back) {
|
||||
this.image=back;
|
||||
}
|
||||
public void paintComponent(Graphics gr) {
|
||||
super.paintComponent(gr);
|
||||
gr.drawImage(image.getImage(),0,0,this);
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package gui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.FlowLayout;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.SwingConstants;
|
||||
|
||||
/**
|
||||
* @author nicolas
|
||||
*
|
||||
*/
|
||||
public class Boutton extends JButton {
|
||||
public Boutton(String txt) {
|
||||
super(txt);
|
||||
//this.setLayout(new FlowLayout());
|
||||
setForeground(Color.WHITE);
|
||||
setOpaque(true);
|
||||
setContentAreaFilled(false);
|
||||
setBorderPainted(true);
|
||||
setFocusPainted(false);
|
||||
setHorizontalAlignment(SwingConstants.CENTER);
|
||||
setVerticalAlignment(SwingConstants.CENTER);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package gui;
|
||||
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.KeyListener;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
|
||||
import modeles.Labyrinthe;
|
||||
import modeles.Menu;
|
||||
import modeles.Salle;
|
||||
|
||||
/**
|
||||
* @author nicolas
|
||||
*
|
||||
*/
|
||||
public class JeuSalle extends JFrame implements KeyListener,ActionListener{
|
||||
public int nb;
|
||||
public Menu menu;
|
||||
public Labyrinthe lab = null;
|
||||
public JeuSalle() {
|
||||
setTitle("Labyrinthe");
|
||||
setSize(1200,600);
|
||||
setLocationRelativeTo(null);
|
||||
setResizable(false);
|
||||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
|
||||
this.setVisible(true);
|
||||
|
||||
|
||||
}
|
||||
/*Méthode permettant d'écrire du texte dans la fenetre de jeu*/
|
||||
public JPanel ecrire(String str) {
|
||||
JPanel panel = new JPanel();
|
||||
panel.setLayout(new FlowLayout());
|
||||
JLabel label = new JLabel(str);
|
||||
panel.add(label);
|
||||
this.setFocusable(true);
|
||||
this.setContentPane(panel);
|
||||
this.addKeyListener(this);
|
||||
this.requestFocus();
|
||||
this.setVisible(true);
|
||||
return panel;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see java.awt.event.KeyListener#keyPressed(java.awt.event.KeyEvent)
|
||||
*/
|
||||
@Override
|
||||
public void keyPressed(KeyEvent e) {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see java.awt.event.KeyListener#keyReleased(java.awt.event.KeyEvent)
|
||||
*/
|
||||
@Override
|
||||
public void keyReleased(KeyEvent e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see java.awt.event.KeyListener#keyTyped(java.awt.event.KeyEvent)
|
||||
Entrer du clavier
|
||||
*/
|
||||
@Override
|
||||
public void keyTyped(KeyEvent e) {
|
||||
nb = e.getKeyChar();
|
||||
System.out.println(nb);
|
||||
|
||||
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
|
||||
*/
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
|
||||
|
||||
}
|
||||
/*Méthode qui récupère les entrés de type int du clavier*/
|
||||
public int toucheint() {
|
||||
System.out.println("sortie"+nb);
|
||||
return nb;
|
||||
}
|
||||
/*Méthode que permet de cacher un texte affiché dans la fenetre*/
|
||||
public void cacher(JPanel panel) {
|
||||
panel.setVisible(false);
|
||||
}
|
||||
/**
|
||||
* @return the lab
|
||||
*/
|
||||
public Labyrinthe getLab() {
|
||||
return lab;
|
||||
}
|
||||
/**
|
||||
* @param lab the lab to set
|
||||
*/
|
||||
public void setLab(Labyrinthe lab) {
|
||||
this.lab = lab;
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
Loading…
Reference in New Issue