Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SAE2.01 - Developpement application
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PIQUEREZ Corentin
SAE2.01 - Developpement application
Commits
55f2d14d
Commit
55f2d14d
authored
1 year ago
by
PIQUEREZ Corentin
Browse files
Options
Downloads
Patches
Plain Diff
rajout javadoc
parent
221f3a9b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
shukan/ShukanController.java
+9
-0
9 additions, 0 deletions
shukan/ShukanController.java
shukan/ShukanParameters.java
+4
-1
4 additions, 1 deletion
shukan/ShukanParameters.java
shukan/ShukanViewBar.java
+4
-3
4 additions, 3 deletions
shukan/ShukanViewBar.java
with
17 additions
and
4 deletions
shukan/ShukanController.java
+
9
−
0
View file @
55f2d14d
...
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
shukan/ShukanParameters.java
+
4
−
1
View file @
55f2d14d
...
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
shukan/ShukanViewBar.java
+
4
−
3
View file @
55f2d14d
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment