Skip to content

Commit c711960

Browse files
committed
java doc for list of flashcard set data panel
1 parent 6052505 commit c711960

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

src/main/java/frameworks_and_drivers/components/FlashcardSetDataPanel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public void windowOpened(WindowEvent e) {}
106106
public void windowClosing(WindowEvent e) {}
107107
@Override
108108
public void windowClosed(WindowEvent e) {
109-
// When a window is closed we will refresh the page.
109+
// When a window is closed the page will be refreshed.
110110
home.refresh();
111111
}
112112
@Override

src/main/java/frameworks_and_drivers/components/ListOfFlashcardSetsDataPanel.java

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,24 @@
77

88
import javax.swing.*;
99
import java.awt.*;
10-
import java.io.IOException;
1110
import java.util.Map;
1211
import java.util.Set;
1312

13+
/**
14+
* Abstract class that represents a panel for all flashcard set panels for a user.
15+
* This panel includes all FlashcardSetDataPanel objects and their buttons.
16+
* Frameworks & Drivers
17+
* @author Justin Li
18+
*/
1419
public class ListOfFlashcardSetsDataPanel extends JPanel {
15-
20+
/**
21+
*Creates a ListOfFlashcardSetDataPanel object that includes the idsToFlashcardSetData,
22+
* gateway, user, and home.
23+
* @param idsToFlashcardSetData the ids of the flashcard sets.
24+
* @param gateway the gateway to reach all the flashcard sets.
25+
* @param user the user that contains all the flashcard sets.
26+
* @param home the home page that the list of flashcard set panels will be displayed on.
27+
*/
1628
public ListOfFlashcardSetsDataPanel(Map<Integer, String[]> idsToFlashcardSetData,
1729
DBGateway gateway, UserLoginResponseModel user, HomeScreen home) {
1830
Set<Integer> flashcardSetIds = idsToFlashcardSetData.keySet();
@@ -29,19 +41,4 @@ public ListOfFlashcardSetsDataPanel(Map<Integer, String[]> idsToFlashcardSetData
2941
this.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
3042
this.setPreferredSize(new Dimension(500, 1000));
3143
}
32-
33-
public static void main(String[] args) throws IOException {
34-
// JFrame f = new JFrame();
35-
//
36-
// Map<Integer, String[]> map = new HashMap<>();
37-
// map.put(0, new String[] {"test set", "for testing study use case"});
38-
// map.put(1, new String[] {"empty test set", "for testing study use case with empty set"});
39-
// DBGateway gateway = new DBGateway(new FlashcardDataAccess(DBGateway.getFlashcardPath()),
40-
// new FlashcardSetDataAccess(DBGateway.getFlashcardSetPath()),
41-
// null);
42-
//
43-
// f.add(new ListOfFlashcardSetsDataPanel(map, gateway, user));
44-
// f.setVisible(true);
45-
// f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
46-
}
4744
}

0 commit comments

Comments
 (0)