Skip to content

Commit c4e820b

Browse files
Fixed the UI for edit main page so that it looks more organized.
1 parent b51e3d3 commit c4e820b

File tree

5 files changed

+25
-8
lines changed

5 files changed

+25
-8
lines changed

src/data/FlashcardSets.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ title,description,isPrivate,flashcardSetId,ownerUsername,flashcardIds
22
test set 1,for testing study use case,false,0,testUser,0,1,2,3
33
empty test set,for testing study use case with empty set,true,1,testUser
44
Long Test Set,Insert Generic Description,false,2,Anthony,10,11,12,13,14,15,16,17,18,19,20,21
5-
Test 1,Test,false,3,tomomot,22
5+
CSC207 Final Exam Prep,Prepare for the CSC207 final exam with this flashcard set.,false,3,csc207,22,23,24,25,26,27,28,29,30,31,32,33,34,35

src/data/Flashcards.csv

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,17 @@ Term I,Definition I,2022-11-13T15:32:29.666982800,18,2
1515
Term J,Definition J,2022-11-13T15:32:29.666982800,19,2
1616
Same Term,Same Definition,2022-11-13T15:32:29.666982800,20,2
1717
Same Term,Same Definition,2022-11-13T15:32:29.666982800,21,2
18-
term1,definition 1,2022-12-03T21:26:20.070806900,22,3
18+
Entity,A basic bit of data that we are storing in our program.,2022-12-03T21:52:27.507373800,22,3
19+
Factory,An object that knows how to make a class instance typically by calling a constructor.,2022-12-03T21:52:47.933762600,23,3
20+
Use case,Something a user wants to do with the program.,2022-12-03T21:53:04.556680900,24,3
21+
Input boundary,The public interface for calling the use case.,2022-12-03T21:53:17.541271200,25,3
22+
Interactor,The class that runs the use case (a subclass of the input boundary).,2022-12-03T21:53:34.172732200,26,3
23+
Repository,The persistence mechanism (a subclass of the gateway).,2022-12-03T21:53:49.101677400,27,3
24+
Gateway,The methods the repository needs to implement for the interactor to do its job.,2022-12-03T21:54:03.276713900,28,3
25+
Controller,The object that the UI asks to run a use case.,2022-12-03T21:54:14.308815800,29,3
26+
Presenter,The object that tells the UI what to do when a use case finishes.,2022-12-03T21:54:26.957394100,30,3
27+
Downcasting,Casting the type of a variable into its subclass.,2022-12-03T21:55:06.381100300,31,3
28+
Upcasting,Casting the type of a variable into its superclass.,2022-12-03T21:55:16.940754800,32,3
29+
Private,Can only be accessed by code within the same class.,2022-12-03T21:55:28.372671100,33,3
30+
Protected,Can only be accessed by code within the same class or within a class derived from the original.,2022-12-03T21:55:42.829787700,34,3
31+
Variable shadowing,The same variable name is used in two different scopes.,2022-12-03T21:56:00.916802500,35,3

src/data/Users.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ username,password,isAdmin,flashcardSetIds
22
jempio,ilovejempio,false
33
ducas,badpassword,false
44
Anthony,123456,false,2
5-
tomomot,tomomot,true,3
5+
csc207,csc207,false,3
66
testUser,password,false,0,1

src/main/java/frameworks_and_drivers/components/FlashcardDataPanel.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import javax.swing.*;
1010
import javax.swing.border.Border;
11+
import java.awt.*;
1112
import java.awt.event.ActionEvent;
1213
import java.awt.event.ActionListener;
1314
import java.awt.event.WindowEvent;
@@ -31,9 +32,12 @@ public FlashcardDataPanel(DBGateway dbGateway, FlashcardDsRequestModel flashcard
3132
this.flashcardSetId = flashcardSetId;
3233

3334
//Includes flashcard information.
34-
Border border = BorderFactory.createTitledBorder(flashcard.getTerm());
35-
JLabel descriptionLabel = new JLabel(flashcard.getDefinition());
36-
this.add(descriptionLabel);
35+
Border border = BorderFactory.createTitledBorder("<html>"+flashcard.getTerm()+"<html>");
36+
JLabel definitionLabel = new JLabel("<html>"+flashcard.getDefinition()+"<html>");
37+
JPanel definition = new JPanel();
38+
definitionLabel.setPreferredSize(new Dimension(200,200));
39+
definition.add(definitionLabel);
40+
this.add(definition);
3741

3842
//Buttons for this flashcard panel.
3943
JPanel buttons = new JPanel();

src/main/java/frameworks_and_drivers/components/ListOfFlashcardsDataPanel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ public ListOfFlashcardsDataPanel(DBGateway dbGateway, List<FlashcardDsRequestMod
7676
//flashcardPanels customization
7777
flashcardPanels.setLayout(new FlowLayout());
7878
flashcardPanels.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
79-
flashcardPanels.setPreferredSize(new Dimension(1000,500));
79+
flashcardPanels.setPreferredSize(new Dimension(1000,10000));
8080

8181
//This panel customization
8282
this.add(flashcardPanels);
8383
this.setLayout(new FlowLayout());
8484
this.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
85-
this.setPreferredSize(new Dimension(500, 1000));
85+
this.setPreferredSize(new Dimension(1000, 10000));
8686
}
8787

8888
/**

0 commit comments

Comments
 (0)