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
Commits
573c85dc
Commit
573c85dc
authored
5 years ago
by
Nicolay Schiøll-Johansen
Committed by
Simon Jensen
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Automate albums page
parent
a84bab5d
No related branches found
No related tags found
1 merge request
!104
Weekly merge to Master
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/NTNU/IDATT1002/controllers/ExploreAlbums.java
+140
-213
140 additions, 213 deletions
src/main/java/NTNU/IDATT1002/controllers/ExploreAlbums.java
src/main/resources/NTNU/IDATT1002/explore_albums.fxml
+82
-89
82 additions, 89 deletions
src/main/resources/NTNU/IDATT1002/explore_albums.fxml
with
222 additions
and
302 deletions
src/main/java/NTNU/IDATT1002/controllers/ExploreAlbums.java
+
140
−
213
View file @
573c85dc
...
@@ -6,8 +6,10 @@ import NTNU.IDATT1002.models.Tag;
...
@@ -6,8 +6,10 @@ import NTNU.IDATT1002.models.Tag;
import
NTNU.IDATT1002.service.ImageAlbumService
;
import
NTNU.IDATT1002.service.ImageAlbumService
;
import
NTNU.IDATT1002.utils.ImageUtil
;
import
NTNU.IDATT1002.utils.ImageUtil
;
import
javafx.event.ActionEvent
;
import
javafx.event.ActionEvent
;
import
javafx.
fxml.FXML
;
import
javafx.
event.EventHandler
;
import
javafx.fxml.Initializable
;
import
javafx.fxml.Initializable
;
import
javafx.geometry.Insets
;
import
javafx.scene.Node
;
import
javafx.scene.control.Button
;
import
javafx.scene.control.Button
;
import
javafx.scene.control.ChoiceBox
;
import
javafx.scene.control.ChoiceBox
;
import
javafx.scene.control.ScrollPane
;
import
javafx.scene.control.ScrollPane
;
...
@@ -15,10 +17,10 @@ import javafx.scene.control.TextField;
...
@@ -15,10 +17,10 @@ import javafx.scene.control.TextField;
import
javafx.scene.image.Image
;
import
javafx.scene.image.Image
;
import
javafx.scene.image.ImageView
;
import
javafx.scene.image.ImageView
;
import
javafx.scene.input.MouseEvent
;
import
javafx.scene.input.MouseEvent
;
import
javafx.scene.layout.GridPane
;
import
javafx.scene.layout.HBox
;
import
javafx.scene.layout.Pane
;
import
javafx.scene.layout.VBox
;
import
javafx.scene.shape.StrokeType
;
import
javafx.scene.text.Font
;
import
javafx.scene.text.Font
;
import
javafx.scene.text.FontWeight
;
import
javafx.scene.text.Text
;
import
javafx.scene.text.Text
;
import
javax.persistence.EntityManager
;
import
javax.persistence.EntityManager
;
...
@@ -43,24 +45,16 @@ public class ExploreAlbums implements Initializable {
...
@@ -43,24 +45,16 @@ public class ExploreAlbums implements Initializable {
public
Button
tbar_explore
;
public
Button
tbar_explore
;
public
ScrollPane
scrollpane
;
public
ScrollPane
scrollpane
;
public
Button
footer_previous_page
;
//
public Button footer_previous_page;
public
Button
footer_next_page
;
//
public Button footer_next_page;
public
Text
album
_a
mount
;
public
Text
album
A
mount
;
public
ChoiceBox
sorted
_by_c
hoicebox
;
public
ChoiceBox
sorted
ByC
hoicebox
;
public
Button
create
_a
lbum
_b
utton
;
public
Button
create
A
lbum
B
utton
;
public
ImageView
album_image
;
public
ImageView
albumImage
;
public
Text
album_title
;
public
VBox
vBox
;
public
Text
album_author
;
public
Text
album_desc
;
public
Text
album_tags
;
public
Button
open_album
;
@FXML
private
GridPane
albums_grid_pane
;
private
Pane
album_pane_container
;
private
ImageAlbumService
imageAlbumService
;
private
ImageAlbumService
imageAlbumService
;
...
@@ -70,7 +64,7 @@ public class ExploreAlbums implements Initializable {
...
@@ -70,7 +64,7 @@ public class ExploreAlbums implements Initializable {
}
}
/**
/**
* Initialize page with all albums. Max 5 per page.
* Initialize page with all albums. Max 5
0
per page.
*
*
* @param url
* @param url
* @param resourceBundle
* @param resourceBundle
...
@@ -79,240 +73,161 @@ public class ExploreAlbums implements Initializable {
...
@@ -79,240 +73,161 @@ public class ExploreAlbums implements Initializable {
public
void
initialize
(
URL
url
,
ResourceBundle
resourceBundle
)
{
public
void
initialize
(
URL
url
,
ResourceBundle
resourceBundle
)
{
List
<
ImageAlbum
>
albums
=
imageAlbumService
.
getAllImageAlbums
();
List
<
ImageAlbum
>
albums
=
imageAlbumService
.
getAllImageAlbums
();
int
maxPerPage
=
Math
.
min
(
albums
.
size
(),
5
);
int
maxPerPage
=
Math
.
min
(
albums
.
size
(),
5
0
);
for
(
int
i
=
0
;
i
<
maxPerPage
;
i
++)
{
for
(
int
i
=
0
;
i
<
maxPerPage
;
i
++)
{
album_pane_container
=
new
Pane
();
//A container for image and album text
album_pane_container
.
setPrefWidth
(
200
);
HBox
albumContainer
=
new
HBox
();
album_pane_container
.
setPrefHeight
(
100
);
//Stores album id here so that it can be passed to data exchange,
//and the correct album will appear on View Album page when clicked
albumContainer
.
setId
(
albums
.
get
(
i
).
getId
().
toString
());
albumContainer
.
setPrefWidth
(
1520
);
albumContainer
.
setPrefHeight
(
300
);
addSingleAlbumContentToPane
(
albums
.
get
(
i
),
album_pane_container
);
insertAlbumImageToContainer
(
albums
.
get
(
i
),
albumContainer
);
insertAlbumTextToContainer
(
albums
.
get
(
i
),
albumContainer
);
albums_grid_pane
.
add
(
album
_pane_c
ontainer
,
0
,
i
);
vBox
.
getChildren
()
.
add
(
album
C
ontainer
);
}
}
}
}
/**
/**
* Add all components needed to display an album.
* Format and insert the first image in the given album to the given container.
*
* @param album the album to display
* @param pane the pane to add the album to
*/
private
void
addSingleAlbumContentToPane
(
ImageAlbum
album
,
Pane
pane
)
{
insertImageViewToPane
(
album
,
pane
);
insertAlbumTitleLabelToPane
(
pane
);
insertAlbumAuthorLabelToPane
(
pane
);
insertAlbumDescriptionLabelToPane
(
pane
);
insertAlbumAuthorToPane
(
album
,
pane
);
insertAlbumTitleToPane
(
album
,
pane
);
insertAlbumDescriptionToPane
(
album
,
pane
);
insertAlbumTagsLabelToPane
(
pane
);
insertAlbumTagsToPane
(
album
,
pane
);
insertOpenAlbumButtonToPane
(
album
,
pane
);
}
/**
* Format and insert the first image in the given album to the given pane.
*
*
* @param album the album
to display image from
* @param album the album
from the database
* @param
p
ane the
pane to add the image to
* @param a
lbumContai
ne
r
the
container for each separate album
*/
*/
private
void
insertImageViewToPane
(
ImageAlbum
album
,
Pane
pane
)
{
private
void
insertAlbumImageToContainer
(
ImageAlbum
album
,
HBox
albumContainer
)
{
album_image
=
new
ImageView
();
albumImage
=
new
ImageView
();
album_image
.
setFitHeight
(
307.0
);
albumImage
.
setFitHeight
(
300.0
);
album_image
.
setFitWidth
(
516.0
);
albumImage
.
setFitWidth
(
533.0
);
album_image
.
setLayoutX
(-
2.0
);
albumImage
.
setPickOnBounds
(
true
);
album_image
.
setLayoutY
(-
1.0
);
albumImage
.
setPreserveRatio
(
true
);
album_image
.
setPickOnBounds
(
true
);
albumImage
.
setOnMouseClicked
(
new
EventHandler
<
MouseEvent
>()
{
album_image
.
setPreserveRatio
(
true
);
@Override
public
void
handle
(
MouseEvent
mouseEvent
)
{
try
{
switchToViewAlbum
(
mouseEvent
);
}
catch
(
IOException
ex
)
{
ex
.
printStackTrace
();
}
}
});
NTNU
.
IDATT1002
.
models
.
Image
titleImage
=
album
.
getImages
().
get
(
0
);
NTNU
.
IDATT1002
.
models
.
Image
titleImage
=
album
.
getImages
().
get
(
0
);
Image
image
=
ImageUtil
.
convertToFXImage
(
titleImage
);
Image
image
=
ImageUtil
.
convertToFXImage
(
titleImage
);
album
_i
mage
.
setImage
(
image
);
album
I
mage
.
setImage
(
image
);
p
ane
.
getChildren
().
add
(
album
_i
mage
);
a
lbumContai
ne
r
.
getChildren
().
add
(
album
I
mage
);
}
}
/**
/**
*
Insert album title label to given pa
ne
.
*
Att text elements from album to the contai
ne
r
*
*
* @param pane the pane to add the title to
* @param album the album to display
* @param albumContainer the container for each separate album
*/
*/
private
void
insertAlbumTitleLabelToPane
(
Pane
pane
)
{
private
void
insertAlbumTextToContainer
(
ImageAlbum
album
,
HBox
albumContainer
)
{
Text
text
=
new
Text
();
//Creates a vbox so that nodes is aligned in a column
text
.
setText
(
"ALBUM: "
);
VBox
textContainer
=
new
VBox
();
text
.
setFont
(
Font
.
font
(
48.0
));
textContainer
.
setSpacing
(
5
);
text
.
setLayoutX
(
551.0
);
textContainer
.
setPadding
(
new
Insets
(
10
,
0
,
0
,
25
));
text
.
setLayoutY
(
63.0
);
textContainer
.
setPrefHeight
(
300
);
text
.
setStrokeType
(
StrokeType
.
OUTSIDE
);
textContainer
.
setPrefWidth
(
987
);
text
.
setStrokeWidth
(
0.0
);
text
.
setWrappingWidth
(
200
);
insertAlbumTitle
(
album
,
textContainer
);
insertAlbumAuthor
(
album
,
textContainer
);
pane
.
getChildren
().
add
(
text
);
insertAlbumTags
(
album
,
textContainer
);
insertAlbumDescription
(
album
,
textContainer
);
albumContainer
.
getChildren
().
add
(
textContainer
);
}
}
/**
/**
* Insert author label of the given album to the given pane
* Insert title of the given album to the given container
* It is clickable, and switches to View Album page of that album
*
*
* @param pane the pane to add the author label to
* @param album the album which title to display
* @param textContainer container for text elements of an album
*/
*/
private
void
insertAlbumAuthorLabelToPane
(
Pane
pane
)
{
private
void
insertAlbumTitle
(
ImageAlbum
album
,
VBox
textContainer
)
{
Text
authorLabel
=
new
Text
();
HBox
content
=
new
HBox
();
authorLabel
.
setText
(
"AUTHOR: "
);
authorLabel
.
setFont
(
Font
.
font
(
24
));
Text
titleLabel
=
new
Text
(
"Title: "
);
authorLabel
.
setLayoutX
(
551.0
);
titleLabel
.
setFont
(
Font
.
font
(
"System"
,
FontWeight
.
BOLD
,
48
));
authorLabel
.
setLayoutY
(
97.0
);
authorLabel
.
setStrokeType
(
StrokeType
.
OUTSIDE
);
Text
title
=
new
Text
(
album
.
getTitle
());
authorLabel
.
setStrokeWidth
(
0.0
);
title
.
setFont
(
Font
.
font
(
"System"
,
48
));
authorLabel
.
setWrappingWidth
(
150.0
);
content
.
getChildren
().
addAll
(
titleLabel
,
title
);
pane
.
getChildren
().
add
(
authorLabel
);
content
.
setOnMouseClicked
(
new
EventHandler
<
MouseEvent
>()
{
}
@Override
public
void
handle
(
MouseEvent
mouseEvent
)
{
try
{
switchToViewAlbum
(
mouseEvent
);
}
catch
(
IOException
ex
)
{
ex
.
printStackTrace
();
}
}
});
/**
textContainer
.
getChildren
().
add
(
content
);
* Insert description label of the given album to the given pane
*
* @param pane the pane to add the description label to
*/
private
void
insertAlbumDescriptionLabelToPane
(
Pane
pane
)
{
Text
descriptionLabel
=
new
Text
();
descriptionLabel
.
setText
(
"DESCRIPTION: "
);
descriptionLabel
.
setFont
(
Font
.
font
(
18.0
));
descriptionLabel
.
setLayoutX
(
551.0
);
descriptionLabel
.
setLayoutY
(
157.0
);
descriptionLabel
.
setStrokeType
(
StrokeType
.
OUTSIDE
);
descriptionLabel
.
setStrokeWidth
(
0.0
);
descriptionLabel
.
setWrappingWidth
(
129.0
);
pane
.
getChildren
().
add
(
descriptionLabel
);
}
}
/**
/**
* Insert author of the given album to the given
pa
ne
* Insert author of the given album to the given
contai
ne
r
*
*
* @param album the album which author to display
* @param album the album which author to display
* @param
pane the pane to add the author to
* @param
textContainer container for text elements of an album
*/
*/
private
void
insertAlbumAuthorToPane
(
ImageAlbum
album
,
Pane
pane
)
{
private
void
insertAlbumAuthor
(
ImageAlbum
album
,
VBox
textContainer
)
{
album_author
=
new
Text
();
HBox
content
=
new
HBox
();
album_author
.
setId
(
"album_author"
);
Text
authorLabel
=
new
Text
(
"Author: "
);
album_author
.
setText
(
album
.
getUser
().
getUsername
());
authorLabel
.
setFont
(
Font
.
font
(
"System"
,
FontWeight
.
BOLD
,
24
));
album_author
.
setFont
(
Font
.
font
(
24.0
));
album_author
.
setLayoutX
(
707.0
);
album_author
.
setLayoutY
(
97.0
);
album_author
.
setStrokeType
(
StrokeType
.
OUTSIDE
);
album_author
.
setStrokeWidth
(
0.0
);
album_author
.
setWrappingWidth
(
270.0
);
pane
.
getChildren
().
add
(
album_author
);
}
/**
Text
author
=
new
Text
(
album
.
getUser
().
getUsername
());
* Insert title of the given album to the given pane
author
.
setFont
(
Font
.
font
(
"System"
,
24
));
*
* @param album the album which title to display
* @param pane the pane to add the title to
*/
private
void
insertAlbumTitleToPane
(
ImageAlbum
album
,
Pane
pane
)
{
album_title
=
new
Text
();
album_title
.
setId
(
"album_title"
);
album_title
.
setText
(
album
.
getTitle
());
album_title
.
setFont
(
Font
.
font
(
48.0
));
album_title
.
setLayoutX
(
751.0
);
album_title
.
setLayoutY
(
65.0
);
album_title
.
setStrokeType
(
StrokeType
.
OUTSIDE
);
album_title
.
setStrokeWidth
(
0.0
);
album_title
.
setWrappingWidth
(
653.0
);
pane
.
getChildren
().
add
(
album_title
);
}
/**
content
.
getChildren
().
addAll
(
authorLabel
,
author
);
* Insert description of the given album to the given pane
textContainer
.
getChildren
().
add
(
content
);
*
* @param album the album which description to display
* @param pane the pane to add the description to
*/
private
void
insertAlbumDescriptionToPane
(
ImageAlbum
album
,
Pane
pane
)
{
album_desc
=
new
Text
();
album_desc
.
setId
(
"album_desc"
);
album_desc
.
setText
(
album
.
getDescription
());
album_desc
.
setFont
(
Font
.
font
(
18.0
));
album_desc
.
setLayoutX
(
707.0
);
album_desc
.
setLayoutY
(
157.0
);
album_desc
.
setStrokeType
(
StrokeType
.
OUTSIDE
);
album_desc
.
setStrokeWidth
(
0.0
);
album_desc
.
setWrappingWidth
(
229.0
);
pane
.
getChildren
().
add
(
album_desc
);
}
}
/**
/**
* Insert tags label of the given album to the given pane
* Insert tags of the given album to the given container
*
* @param pane the pane to add the tags label to
*/
private
void
insertAlbumTagsLabelToPane
(
Pane
pane
)
{
Text
tagsLabel
=
new
Text
();
tagsLabel
.
setText
(
"TAGS: "
);
tagsLabel
.
setFont
(
Font
.
font
(
24
));
tagsLabel
.
setLayoutX
(
551.0
);
tagsLabel
.
setLayoutY
(
129.0
);
tagsLabel
.
setStrokeType
(
StrokeType
.
OUTSIDE
);
tagsLabel
.
setStrokeWidth
(
0.0
);
tagsLabel
.
setWrappingWidth
(
150.0
);
pane
.
getChildren
().
add
(
tagsLabel
);
}
/**
* Insert tags of the given album to the given pane
*
*
* @param album the album which tags to display
* @param album the album which tags to display
* @param
pane the pane to add the tags to
* @param
textContainer container for text elements of an album
*/
*/
private
void
insertAlbumTagsToPane
(
ImageAlbum
album
,
Pane
pane
)
{
private
void
insertAlbumTags
(
ImageAlbum
album
,
VBox
textContainer
)
{
HBox
content
=
new
HBox
();
Text
tagsLabel
=
new
Text
(
"Tags: "
);
tagsLabel
.
setFont
(
Font
.
font
(
"System"
,
FontWeight
.
BOLD
,
16
));
String
tagsAsString
=
album
.
getTags
().
stream
()
String
tagsAsString
=
album
.
getTags
().
stream
()
.
map
(
Tag:
:
getName
)
.
map
(
Tag:
:
getName
)
.
collect
(
Collectors
.
joining
(
" "
));
.
collect
(
Collectors
.
joining
(
" "
));
Text
tags
=
new
Text
(
tagsAsString
);
tags
.
setFont
(
Font
.
font
(
"System"
,
16
));
album_tags
=
new
Text
();
content
.
getChildren
().
addAll
(
tagsLabel
,
tags
);
album_tags
.
setText
(
tagsAsString
);
textContainer
.
getChildren
().
add
(
content
);
album_tags
.
setFont
(
Font
.
font
(
24.0
));
album_tags
.
setLayoutX
(
707.0
);
album_tags
.
setLayoutY
(
129.0
);
album_tags
.
setStrokeType
(
StrokeType
.
OUTSIDE
);
album_tags
.
setStrokeWidth
(
0.0
);
album_tags
.
setWrappingWidth
(
570.0
);
pane
.
getChildren
().
add
(
album_tags
);
}
}
/**
/**
* Insert an 'open album' button to the given album to the given pane.
* Insert description of the given album to the given container
* If pushed it will take the user to the appropriate album.
*
*
* @param album the album which
the button should take the user to
* @param album the album which
description to display
* @param
pane the pane to add the button to
* @param
textContainer container for text elements of an album
*/
*/
private
void
insertOpenAlbumButtonToPane
(
ImageAlbum
album
,
Pane
pane
)
{
private
void
insertAlbumDescription
(
ImageAlbum
album
,
VBox
textContainer
)
{
// set and format open album button
Text
descriptionLabel
=
new
Text
(
"Description: "
);
open_album
=
new
Button
();
descriptionLabel
.
setFont
(
Font
.
font
(
"System"
,
FontWeight
.
BOLD
,
16
));
open_album
.
setId
(
album
.
getId
().
toString
());
open_album
.
setText
(
"Open Album"
);
Text
description
=
new
Text
(
album
.
getDescription
());
open_album
.
setFont
(
Font
.
font
(
18.0
));
description
.
setWrappingWidth
(
500
);
open_album
.
setLayoutX
(
551.0
);
description
.
setFont
(
Font
.
font
(
"System"
,
16
));
open_album
.
setLayoutY
(
250.0
);
open_album
.
setOnAction
(
event
->
{
try
{
switchToViewAlbum
(
event
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
});
pa
ne
.
getChildren
().
add
(
open_album
);
textContai
ne
r
.
getChildren
().
add
All
(
descriptionLabel
,
description
);
}
}
/**
/**
...
@@ -401,16 +316,28 @@ public class ExploreAlbums implements Initializable {
...
@@ -401,16 +316,28 @@ public class ExploreAlbums implements Initializable {
}
}
/**
/**
* Method to open specific albums using the "Open Album" button
* Method to open specific albums. It takes a clicked element within an album container
* @param actionEvent
* and finds the fx:id of the main parent, (who's id is the same as the album in the database), and
* passes the value to Data Exchange so that Image View will know which album was clicked
* @param mouseEvent
* @throws IOException
* @throws IOException
*/
*/
public
void
switchToViewAlbum
(
ActionEvent
actionEvent
)
throws
IOException
{
public
void
switchToViewAlbum
(
MouseEvent
mouseEvent
)
throws
IOException
{
Button
source
=
(
Button
)
actionEvent
.
getSource
();
boolean
albumIdFound
=
false
;
Long
albumId
=
Long
.
parseLong
(
source
.
getId
());
long
albumId
=
0
;
App
.
ex
.
setChosenAlbumId
(
albumId
);
Node
node
=
(
Node
)
mouseEvent
.
getSource
();
while
(!
albumIdFound
){
if
(
node
.
getId
()
!=
null
){
albumId
=
Long
.
parseLong
(
node
.
getId
());
albumIdFound
=
true
;
}
node
=
node
.
getParent
();
}
App
.
setRoot
(
"view_album"
);
if
(
albumId
!=
0
)
{
App
.
ex
.
setChosenAlbumId
(
albumId
);
App
.
setRoot
(
"view_album"
);
}
}
}
}
}
This diff is collapsed.
Click to expand it.
src/main/resources/NTNU/IDATT1002/explore_albums.fxml
+
82
−
89
View file @
573c85dc
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<?import java.lang.String?>
<?import java.lang.String?>
<?import javafx.collections.FXCollections?>
<?import javafx.collections.FXCollections?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.ScrollPane?>
...
@@ -10,17 +11,15 @@
...
@@ -10,17 +11,15 @@
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.
RowConstraints
?>
<?import javafx.scene.layout.
VBox
?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<?import javafx.scene.text.Text?>
<
AnchorPane
maxHeight=
"2148.0"
maxWidth=
"1920.0"
prefHeight=
"1080.0"
prefWidth=
"1920.0"
xmlns=
"http://javafx.com/javafx/11.0.1"
xmlns:fx=
"http://javafx.com/fxml/1"
fx:controller=
"NTNU.IDATT1002.controllers.ExploreAlbums"
>
<
VBox
prefHeight=
"1080.0"
prefWidth=
"1920.0"
xmlns=
"http://javafx.com/javafx/11.0.1"
xmlns:fx=
"http://javafx.com/fxml/1"
fx:controller=
"NTNU.IDATT1002.controllers.ExploreAlbums"
>
<children>
<children>
<HBox
alignment=
"CENTER"
minHeight=
"100.0"
prefHeight=
"100.0"
prefWidth=
"1920.0"
spacing=
"20.0"
style=
"-fx-background-color: #0c0c0c;"
AnchorPane.leftAnchor=
"0.0"
AnchorPane.rightAnchor=
"0.0"
>
<HBox
alignment=
"CENTER"
minHeight=
"100.0"
prefHeight=
"100.0"
prefWidth=
"1920.0"
spacing=
"20.0"
style=
"-fx-background-color: #0c0c0c;"
>
<children>
<children>
<ImageView
fx:id=
"tbar_logo"
fitHeight=
"69.0"
fitWidth=
"153.0"
onMouseClicked=
"#switchToMain"
pickOnBounds=
"true"
preserveRatio=
"true"
>
<ImageView
fx:id=
"tbar_logo"
fitHeight=
"69.0"
fitWidth=
"153.0"
onMouseClicked=
"#switchToMain"
pickOnBounds=
"true"
preserveRatio=
"true"
>
<image>
<image>
...
@@ -37,87 +36,81 @@
...
@@ -37,87 +36,81 @@
<Button
fx:id=
"tbar_upload"
mnemonicParsing=
"false"
onAction=
"#switchToUpload"
prefHeight=
"25.0"
prefWidth=
"114.0"
text=
"UPLOAD"
/>
<Button
fx:id=
"tbar_upload"
mnemonicParsing=
"false"
onAction=
"#switchToUpload"
prefHeight=
"25.0"
prefWidth=
"114.0"
text=
"UPLOAD"
/>
</children>
</children>
</HBox>
</HBox>
<ScrollPane
fx:id=
"scrollpane"
hbarPolicy=
"NEVER"
layoutY=
"100.0"
prefHeight=
"980.0"
prefWidth=
"1920.0"
AnchorPane.bottomAnchor=
"0.0"
AnchorPane.leftAnchor=
"0.0"
AnchorPane.rightAnchor=
"0.0"
AnchorPane.topAnchor=
"100.0"
>
<HBox
alignment=
"CENTER"
prefHeight=
"990.0"
prefWidth=
"1920.0"
VBox.vgrow=
"ALWAYS"
>
<content>
<children>
<AnchorPane
maxHeight=
"1920.0"
minHeight=
"0.0"
minWidth=
"0.0"
prefHeight=
"2000.0"
prefWidth=
"1920.0"
>
<ScrollPane
fx:id=
"scrollpane"
fitToWidth=
"true"
hbarPolicy=
"NEVER"
prefWidth=
"1920.0"
HBox.hgrow=
"ALWAYS"
>
<children>
<content>
<BorderPane
prefHeight=
"2000.0"
prefWidth=
"1920.0"
AnchorPane.leftAnchor=
"0.0"
AnchorPane.rightAnchor=
"0.0"
AnchorPane.topAnchor=
"0.0"
>
<BorderPane
AnchorPane.leftAnchor=
"0.0"
AnchorPane.rightAnchor=
"0.0"
AnchorPane.topAnchor=
"0.0"
>
<top>
<left>
<Pane
prefHeight=
"246.0"
prefWidth=
"1920.0"
style=
"-fx-background-color: #6d6d6d;"
BorderPane.alignment=
"CENTER"
>
<Pane
minHeight=
"300.0"
prefWidth=
"200.0"
style=
"-fx-background-color: #6d6d6d;"
BorderPane.alignment=
"CENTER"
/>
<children>
</left>
<Text
fill=
"WHITE"
layoutX=
"630.0"
layoutY=
"190.0"
strokeType=
"OUTSIDE"
strokeWidth=
"0.0"
text=
"Found"
>
<right>
<font>
<Pane
minHeight=
"300.0"
prefWidth=
"200.0"
style=
"-fx-background-color: #6d6d6d;"
BorderPane.alignment=
"CENTER"
/>
<Font
size=
"36.0"
/>
</right>
</font>
<bottom>
</Text>
<Pane
prefHeight=
"250.0"
style=
"-fx-background-color: #6d6d6d;"
BorderPane.alignment=
"CENTER"
>
<Text
fx:id=
"album_amount"
fill=
"WHITE"
layoutX=
"758.0"
layoutY=
"190.0"
strokeType=
"OUTSIDE"
strokeWidth=
"0.0"
text=
"X"
>
<children>
<font>
<HBox
alignment=
"CENTER"
layoutY=
"-2.0"
prefHeight=
"84.0"
prefWidth=
"1920.0"
spacing=
"20.0"
/>
<Font
name=
"System Bold Italic"
size=
"36.0"
/>
</children>
</font>
</Pane>
</Text>
</bottom>
<Text
fill=
"WHITE"
layoutX=
"806.0"
layoutY=
"190.0"
strokeType=
"OUTSIDE"
strokeWidth=
"0.0"
text=
"albums, sorted by:"
>
<center>
<font>
<VBox
fx:id=
"vBox"
maxHeight=
"1.7976931348623157E308"
maxWidth=
"Infinity"
minHeight=
"980.0"
spacing=
"10.0"
style=
"-fx-background-color: #555555;"
BorderPane.alignment=
"CENTER"
>
<Font
size=
"36.0"
/>
</VBox>
</font>
</center>
</Text>
<top>
<ChoiceBox
fx:id=
"sorted_by_choicebox"
layoutX=
"1124.0"
layoutY=
"157.0"
prefHeight=
"40.0"
prefWidth=
"166.0"
value=
"Most Popular"
>
<VBox
prefHeight=
"250.0"
style=
"-fx-background-color: #6d6d6d;"
BorderPane.alignment=
"CENTER"
>
<items>
<children>
<FXCollections
fx:factory=
"observableArrayList"
>
<HBox
alignment=
"CENTER"
prefHeight=
"107.0"
prefWidth=
"1905.0"
>
<String
fx:value=
"Most Popular"
/>
<children>
<String
fx:value=
"Newest First"
/>
<Button
fx:id=
"createAlbumButton"
mnemonicParsing=
"false"
onAction=
"#switchToCreateAlbum"
text=
"CREATE ALBUM"
>
<String
fx:value=
"Oldest First"
/>
<font>
</FXCollections>
<Font
name=
"System Bold"
size=
"24.0"
/>
</items>
</font>
</ChoiceBox>
</Button>
<Button
fx:id=
"create_album_button"
layoutX=
"855.0"
layoutY=
"64.0"
mnemonicParsing=
"false"
onAction=
"#switchToCreateAlbum"
text=
"CREATE ALBUM"
>
</children>
<font>
</HBox>
<Font
name=
"System Bold"
size=
"24.0"
/>
<HBox
alignment=
"CENTER"
prefHeight=
"80.0"
prefWidth=
"1905.0"
spacing=
"10.0"
>
</font>
<children>
</Button>
<Text
fill=
"WHITE"
strokeType=
"OUTSIDE"
strokeWidth=
"0.0"
text=
"Found"
>
</children></Pane>
<font>
</top>
<Font
size=
"36.0"
/>
<left>
</font>
<Pane
prefHeight=
"200.0"
prefWidth=
"200.0"
style=
"-fx-background-color: #6d6d6d;"
BorderPane.alignment=
"CENTER"
/>
</Text>
</left>
<Text
fx:id=
"albumAmount"
fill=
"WHITE"
strokeType=
"OUTSIDE"
strokeWidth=
"0.0"
text=
"X"
>
<right>
<font>
<Pane
prefHeight=
"200.0"
prefWidth=
"200.0"
style=
"-fx-background-color: #6d6d6d;"
BorderPane.alignment=
"CENTER"
/>
<Font
name=
"System Bold Italic"
size=
"36.0"
/>
</right>
</font>
<center>
</Text>
<GridPane
fx:id=
"albums_grid_pane"
alignment=
"CENTER"
BorderPane.alignment=
"CENTER"
>
<Text
fill=
"WHITE"
strokeType=
"OUTSIDE"
strokeWidth=
"0.0"
text=
"albums, sorted by:"
>
<columnConstraints>
<font>
<ColumnConstraints
hgrow=
"SOMETIMES"
minWidth=
"10.0"
prefWidth=
"100.0"
/>
<Font
size=
"36.0"
/>
</columnConstraints>
</font>
<rowConstraints>
</Text>
<RowConstraints
minHeight=
"10.0"
prefHeight=
"30.0"
vgrow=
"SOMETIMES"
/>
<ChoiceBox
fx:id=
"sortedByChoicebox"
prefHeight=
"40.0"
prefWidth=
"166.0"
value=
"Most Popular"
>
<RowConstraints
minHeight=
"10.0"
prefHeight=
"30.0"
vgrow=
"SOMETIMES"
/>
<items>
<RowConstraints
minHeight=
"10.0"
prefHeight=
"30.0"
vgrow=
"SOMETIMES"
/>
<FXCollections
fx:factory=
"observableArrayList"
>
<RowConstraints
minHeight=
"10.0"
prefHeight=
"30.0"
vgrow=
"SOMETIMES"
/>
<String
fx:value=
"Most Popular"
/>
<RowConstraints
minHeight=
"10.0"
prefHeight=
"30.0"
vgrow=
"SOMETIMES"
/>
<String
fx:value=
"Newest First"
/>
</rowConstraints>
<String
fx:value=
"Oldest First"
/>
<children>
</FXCollections>
</items>
<Pane
prefHeight=
"200.0"
prefWidth=
"200.0"
>
</ChoiceBox>
</Pane>
</children>
</HBox>
</children>
</children>
</GridPane>
<opaqueInsets>
</center>
<Insets
/>
<bottom>
</opaqueInsets>
<Pane
prefHeight=
"150.0"
prefWidth=
"1920.0"
style=
"-fx-background-color: #6d6d6d;"
BorderPane.alignment=
"CENTER"
>
<padding>
<children>
<Insets
top=
"20.0"
/>
<HBox
alignment=
"CENTER"
layoutY=
"-2.0"
prefHeight=
"84.0"
prefWidth=
"1920.0"
spacing=
"20.0"
>
</padding>
<children>
</VBox>
<Button
fx:id=
"footer_previous_page"
mnemonicParsing=
"false"
onAction=
"#switchToPrevious"
text=
"PREVIOUS"
/>
</top>
<Button
fx:id=
"footer_next_page"
layoutX=
"944.0"
layoutY=
"48.0"
mnemonicParsing=
"false"
onAction=
"#switchToNext"
text=
"NEXT"
/>
</children>
</HBox>
</children>
</Pane>
</bottom>
</BorderPane>
</BorderPane>
</childr
en>
</cont
en
t
>
</Anchor
Pane>
</Scroll
Pane>
</cont
en
t
>
</childr
en>
</ScrollPane
>
</HBox
>
</children>
</children>
</
AnchorPane
>
</
VBox
>
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