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
c2ba2152
Commit
c2ba2152
authored
4 years ago
by
Eirik Steira
Browse files
Options
Downloads
Patches
Plain Diff
Rename album_pdf identifiers to album_document
parent
75f23d3d
No related branches found
No related tags found
1 merge request
!88
Refactor/pdf creation
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/NTNU/IDATT1002/controllers/ViewAlbum.java
+8
-8
8 additions, 8 deletions
src/main/java/NTNU/IDATT1002/controllers/ViewAlbum.java
src/main/resources/NTNU/IDATT1002/view_album.fxml
+1
-1
1 addition, 1 deletion
src/main/resources/NTNU/IDATT1002/view_album.fxml
with
9 additions
and
9 deletions
src/main/java/NTNU/IDATT1002/controllers/ViewAlbum.java
+
8
−
8
View file @
c2ba2152
...
...
@@ -47,7 +47,7 @@ public class ViewAlbum implements Initializable {
public
Text
album_descField
;
public
Pane
metadata_pane
;
public
Button
create_album_
pdf
;
public
Button
create_album_
document
;
public
ImageView
main_picture
;
...
...
@@ -368,15 +368,15 @@ public class ViewAlbum implements Initializable {
}
/**
*
Create and save album pdf to users downloads directory
.
*
Retrieve and display album document
.
*
* @param actionEvent
*/
public
void
create
Pdf
(
ActionEvent
actionEvent
)
{
public
void
create
Document
(
ActionEvent
actionEvent
)
{
Long
currentAlbumId
=
App
.
ex
.
getChosenAlbumId
();
ImageAlbumDocument
document
=
imageAlbumService
.
getDocument
(
currentAlbumId
);
display
Pdf
Link
(
document
.
getDocument
());
display
Document
Link
(
document
.
getDocument
());
}
/**
...
...
@@ -384,9 +384,9 @@ public class ViewAlbum implements Initializable {
*
* @param pdfDocument the pdf document to be opened
*/
private
void
display
Pdf
Link
(
File
pdfDocument
)
{
create_album_
pdf
.
setText
(
"Open PDF"
);
create_album_
pdf
.
setOnAction
(
actionEvent
->
open
Pdf
Document
(
actionEvent
,
pdfDocument
));
private
void
display
Document
Link
(
File
pdfDocument
)
{
create_album_
document
.
setText
(
"Open PDF"
);
create_album_
document
.
setOnAction
(
actionEvent
->
openDocument
(
actionEvent
,
pdfDocument
));
}
/**
...
...
@@ -395,7 +395,7 @@ public class ViewAlbum implements Initializable {
* @param actionEvent
* @param file the file to open
*/
private
void
open
Pdf
Document
(
ActionEvent
actionEvent
,
File
file
)
{
private
void
openDocument
(
ActionEvent
actionEvent
,
File
file
)
{
HostServices
hostServices
=
App
.
ex
.
getHostServices
();
hostServices
.
showDocument
(
file
.
getAbsolutePath
());
}
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/NTNU/IDATT1002/view_album.fxml
+
1
−
1
View file @
c2ba2152
...
...
@@ -104,7 +104,7 @@
</font>
</Text>
<Pane
fx:id=
"metadata_pane"
layoutX=
"76.0"
layoutY=
"371.0"
prefHeight=
"391.0"
prefWidth=
"822.0"
style=
"-fx-background-color: #ffffff;"
/>
<Button
fx:id=
"create_album_
pdf
"
layoutX=
"394.0"
layoutY=
"810.0"
mnemonicParsing=
"false"
onAction=
"#create
Pdf
"
text=
"CREATE ALBUM PDF"
>
<Button
fx:id=
"create_album_
document
"
layoutX=
"394.0"
layoutY=
"810.0"
mnemonicParsing=
"false"
onAction=
"#create
Document
"
text=
"CREATE ALBUM PDF"
>
<font>
<Font
size=
"18.0"
/>
</font>
...
...
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