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
6cc54b09
Commit
6cc54b09
authored
1 year ago
by
CHEVALIER Noemy
Browse files
Options
Downloads
Patches
Plain Diff
Mise à jour
parent
b8e0e6b5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
shukan/Shukan.java
+3
-5
3 additions, 5 deletions
shukan/Shukan.java
with
3 additions
and
5 deletions
shukan/Shukan.java
+
3
−
5
View file @
6cc54b09
...
@@ -38,7 +38,6 @@ public class Shukan
...
@@ -38,7 +38,6 @@ public class Shukan
JPanel
global
=
new
JPanel
(
new
BorderLayout
());
JPanel
global
=
new
JPanel
(
new
BorderLayout
());
ShukanView
canvas
=
new
ShukanView
(
data
,
io
);
ShukanView
canvas
=
new
ShukanView
(
data
,
io
);
ShukanViewBar
mytoolbar
=
new
ShukanViewBar
(
90
);
ShukanViewBar
mytoolbar
=
new
ShukanViewBar
(
90
);
ShukanStudent
student
=
new
ShukanStudent
(
data
,
60
);
// Getting the display size
// Getting the display size
...
@@ -49,11 +48,10 @@ public class Shukan
...
@@ -49,11 +48,10 @@ public class Shukan
canvas
.
restrictSize
((
int
)
(
gcBounds
.
getWidth
())
-
LEFT_MARGIN
,
canvas
.
restrictSize
((
int
)
(
gcBounds
.
getWidth
())
-
LEFT_MARGIN
,
(
int
)
(
gcBounds
.
getHeight
())
-
TOP_MARGIN
-
mytoolbar
.
getHeight
());
(
int
)
(
gcBounds
.
getHeight
())
-
TOP_MARGIN
-
mytoolbar
.
getHeight
());
mytoolbar
.
setSize
(
new
Dimension
((
int
)
(
gcBounds
.
getWidth
())
-
LEFT_MARGIN
,
mytoolbar
.
getHeight
()));
mytoolbar
.
setSize
(
new
Dimension
((
int
)
(
gcBounds
.
getWidth
())
-
LEFT_MARGIN
,
mytoolbar
.
getHeight
()));
student
.
setSize
(
new
Dimension
((
int
)
(
gcBounds
.
getWidth
())
-
LEFT_MARGIN
,
student
.
getHeight
()));
// Adding a openGL input handler (controller)
// Adding a openGL input handler (controller)
ShukanController
myController
=
new
ShukanController
(
canvas
,
mytoolbar
,
data
,
student
);
ShukanController
myController
=
new
ShukanController
(
canvas
,
mytoolbar
,
data
);
canvas
.
addKeyListener
(
myController
);
canvas
.
addKeyListener
(
myController
);
canvas
.
addMouseListener
(
myController
);
canvas
.
addMouseListener
(
myController
);
mytoolbar
.
addActionListener
(
myController
);
mytoolbar
.
addActionListener
(
myController
);
...
@@ -77,11 +75,11 @@ public class Shukan
...
@@ -77,11 +75,11 @@ public class Shukan
// Setting the window geometry
// Setting the window geometry
global
.
add
(
mytoolbar
,
BorderLayout
.
NORTH
);
global
.
add
(
mytoolbar
,
BorderLayout
.
NORTH
);
global
.
add
(
canvas
,
BorderLayout
.
CENTER
);
global
.
add
(
canvas
,
BorderLayout
.
CENTER
);
global
.
add
(
student
,
BorderLayout
.
SOUTH
);
//
global.add(student, BorderLayout.SOUTH);
frame
.
add
(
global
);
frame
.
add
(
global
);
Insets
ins
=
frame
.
getInsets
();
Insets
ins
=
frame
.
getInsets
();
frame
.
setSize
(
canvas
.
displayWidth
()
+
ins
.
left
+
ins
.
right
,
frame
.
setSize
(
canvas
.
displayWidth
()
+
ins
.
left
+
ins
.
right
,
canvas
.
displayHeight
()+
mytoolbar
.
getHeight
()+
student
.
getHeight
()
+
ins
.
top
+
ins
.
bottom
);
canvas
.
displayHeight
()+
mytoolbar
.
getHeight
()+
ins
.
top
+
ins
.
bottom
);
frame
.
setLocation
(
LEFT_MARGIN
,
0
);
frame
.
setLocation
(
LEFT_MARGIN
,
0
);
frame
.
setBackground
(
Color
.
white
);
frame
.
setBackground
(
Color
.
white
);
frame
.
setVisible
(
true
);
frame
.
setVisible
(
true
);
...
...
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