Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
graphic-2020-TP5
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MANSOUR Chadi
graphic-2020-TP5
Commits
f9005d7a
Commit
f9005d7a
authored
6 months ago
by
Chadi
Browse files
Options
Downloads
Patches
Plain Diff
need to check in uni
parent
3175d350
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/shape/Circle.java
+1
-2
1 addition, 2 deletions
src/main/java/shape/Circle.java
src/main/java/shape/Rectangle.java
+1
-8
1 addition, 8 deletions
src/main/java/shape/Rectangle.java
with
2 additions
and
10 deletions
src/main/java/shape/Circle.java
+
1
−
2
View file @
f9005d7a
...
@@ -6,7 +6,6 @@ import javafx.scene.paint.Color;
...
@@ -6,7 +6,6 @@ import javafx.scene.paint.Color;
public
class
Circle
implements
Shape
{
public
class
Circle
implements
Shape
{
private
double
radius
,
x
,
y
;
private
double
radius
,
x
,
y
;
public
Color
fillColor
;
private
boolean
isFinished
;
private
boolean
isFinished
;
public
Circle
(
double
x
,
double
y
,
double
radius
)
{
public
Circle
(
double
x
,
double
y
,
double
radius
)
{
...
@@ -22,7 +21,7 @@ public class Circle implements Shape {
...
@@ -22,7 +21,7 @@ public class Circle implements Shape {
graphicsContext
.
setStroke
(
Color
.
BLACK
);
graphicsContext
.
setStroke
(
Color
.
BLACK
);
graphicsContext
.
setLineWidth
(
2
);
graphicsContext
.
setLineWidth
(
2
);
if
(
isFinished
)
{
if
(
isFinished
)
{
graphicsContext
.
setFill
(
Color
.
GREEN
);
graphicsContext
.
setFill
(
Color
.
GREEN
.
deriveColor
(
0
,
1
,
1
,
0.5
)
);
graphicsContext
.
fillOval
(
x
-
radius
,
y
-
radius
,
2
*
radius
,
2
*
radius
);
graphicsContext
.
fillOval
(
x
-
radius
,
y
-
radius
,
2
*
radius
,
2
*
radius
);
}
}
graphicsContext
.
strokeOval
(
x
-
radius
,
y
-
radius
,
2
*
radius
,
2
*
radius
);
graphicsContext
.
strokeOval
(
x
-
radius
,
y
-
radius
,
2
*
radius
,
2
*
radius
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/shape/Rectangle.java
+
1
−
8
View file @
f9005d7a
...
@@ -8,7 +8,6 @@ public class Rectangle implements Shape{
...
@@ -8,7 +8,6 @@ public class Rectangle implements Shape{
private
double
x
,
y
,
width
,
height
;
private
double
x
,
y
,
width
,
height
;
private
boolean
isFinished
;
private
boolean
isFinished
;
public
Color
fillColor
;
public
Rectangle
(
double
x
,
double
y
,
double
width
,
double
height
)
{
public
Rectangle
(
double
x
,
double
y
,
double
width
,
double
height
)
{
this
.
x
=
x
;
this
.
x
=
x
;
...
@@ -23,7 +22,7 @@ public class Rectangle implements Shape{
...
@@ -23,7 +22,7 @@ public class Rectangle implements Shape{
graphicsContext
.
setStroke
(
Color
.
BLACK
);
graphicsContext
.
setStroke
(
Color
.
BLACK
);
graphicsContext
.
setLineWidth
(
2
);
graphicsContext
.
setLineWidth
(
2
);
if
(
isFinished
){
if
(
isFinished
){
graphicsContext
.
setFill
(
Color
.
RED
);
graphicsContext
.
setFill
(
Color
.
RED
.
deriveColor
(
0
,
1
,
1
,
0.5
)
);
graphicsContext
.
fillRect
(
x
,
y
,
width
,
height
);
graphicsContext
.
fillRect
(
x
,
y
,
width
,
height
);
}
}
graphicsContext
.
strokeRect
(
x
,
y
,
width
,
height
);
graphicsContext
.
strokeRect
(
x
,
y
,
width
,
height
);
...
@@ -57,15 +56,9 @@ public class Rectangle implements Shape{
...
@@ -57,15 +56,9 @@ public class Rectangle implements Shape{
}
}
}
}
public
Color
getFillColor
()
{
return
fillColor
;
}
public
void
setFinished
(
boolean
finished
)
{
public
void
setFinished
(
boolean
finished
)
{
isFinished
=
finished
;
isFinished
=
finished
;
}
}
public
void
setFillColor
(
Color
fillColor
)
{
this
.
fillColor
=
fillColor
;
}
}
}
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