Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Team 14 - IDATT1002
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Eirik Steira
Team 14 - IDATT1002
Merge requests
!144
Added code to extend the gridpane beyond 15 images
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Added code to extend the gridpane beyond 15 images
extendExplore
into
dev
Overview
1
Commits
1
Pipelines
1
Changes
2
Merged
Nicolay Schiøll-Johansen
requested to merge
extendExplore
into
dev
5 years ago
Overview
1
Commits
1
Pipelines
1
Changes
2
Expand
Now up to 200 images!
0
0
Merge request reports
Compare
dev
dev (base)
and
latest version
latest version
4389af74
1 commit,
5 years ago
2 files
+
12
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/main/java/NTNU/IDATT1002/controllers/Explore.java
+
11
−
2
Options
@@ -57,17 +57,26 @@ public class Explore implements Initializable {
@Override
public
void
initialize
(
URL
url
,
ResourceBundle
resourceBundle
)
{
List
<
NTNU
.
IDATT1002
.
models
.
Image
>
images
=
new
ImageService
(
App
.
ex
.
getEntityManager
()).
getAllImages
();
//Limited elements to 15 since grid pane since is 3x
1
5
//Limited elements to 15 since grid pane since is 3x5
//Can implement automatic row adding when this limit exceeded later
for
(
int
i
=
0
;
i
<
images
.
size
()
&&
i
<
1
5
;
i
++)
{
for
(
int
i
=
0
;
i
<
images
.
size
()
&&
i
<
1
00
;
i
++)
{
//Row and column in gripdane
int
column
=
i
%
3
;
int
row
=
(
i
-
column
)/
3
;
//Add rows
if
(
images
.
size
()
>
15
){
gridPane
.
setMinHeight
(
1600
+
(((
i
-
15
)*
160
)));
for
(
int
j
=
0
;
j
<
((
i
-
15
)/
3
);
j
++){
gridPane
.
addRow
(
j
);
}
}
//Make vbox container for content
VBox
vBox
=
new
VBox
();
vBox
.
setPrefHeight
(
400
);
vBox
.
setPrefWidth
(
400
);
vBox
.
setMaxHeight
(
400
);
vBox
.
setAlignment
(
Pos
.
CENTER
);
//vBox.setStyle("-fx-background-color: #999999;");
Loading