Skip to content
Snippets Groups Projects
Commit 55f2d14d authored by PIQUEREZ Corentin's avatar PIQUEREZ Corentin
Browse files

rajout javadoc

parent 221f3a9b
No related branches found
No related tags found
No related merge requests found
......@@ -156,6 +156,10 @@ public class ShukanController
canvas.repaint ();
}
}
// Manage the double click to open a new window
if (e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1) {
System.out.println("double clicked");
}
if (e.getButton () == MouseEvent.BUTTON3)
{
if (e.isShiftDown ())
......@@ -202,6 +206,11 @@ public class ShukanController
public void mouseReleased (MouseEvent e)
{
}
/** Invoked when a button has been clicked
* Implementation from actionListener
* @param e detected action event
* */
public void actionPerformed(ActionEvent e){
if (e.getSource()== bar.buttons[0])
canvas.saveData ();
......
......@@ -5,11 +5,14 @@ import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/** parameters of Shukan */
class ShukanParameters extends JFrame {
/** panels of the graphic interface */
private JPanel pPrincipal,p, p1;
/** buttons of the graphic interface */
private JButton changerdetheme, theme1, theme2, theme3, retour, changertouches, changercouleurs;
/** built a parameter window */
public ShukanParameters(String titre) {
super(titre);
p = new JPanel();
......
......@@ -3,6 +3,7 @@ package shukan;
import javax.swing.*;
import java.awt.*;
/** toolbar of Shukan */
public class ShukanViewBar extends JPanel {
/** Name of the images files for the buttons of the toolbar */
......@@ -13,7 +14,7 @@ public class ShukanViewBar extends JPanel {
private String imagesExtension = ".png";
/** height in pixel of the toolbar */
private int height;
/** Built the toolbar */
public ShukanViewBar(int height){
this.height = height;
......@@ -24,9 +25,9 @@ public class ShukanViewBar extends JPanel {
add(buttons[i]);
}
}
/** return the height of the toolbar in pixels */
public int getHeight(){return height;}
/** add actions for the different buttons */
public void addActionListener(ShukanController controller){
for(int i =0; i<imagesName.length; i++){
buttons[i].addActionListener(controller);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment