Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Modify function_name: getMajor
Browse files Browse the repository at this point in the history
  • Loading branch information
junghoon-vans committed Dec 12, 2019
1 parent 7b86231 commit 5c815c8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
12 changes: 6 additions & 6 deletions src/Account/SelectionFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ public SelectionFrame(MouseListener mouseListener) {
private void refresh(Object source) {
try {
if (source == null) {
major = this.campus.refresh("root");
major = this.college.refresh(major, false);
major = this.department.refresh(major);
major = this.campus.getMajor("root");
major = this.college.getMajor(major);
major = this.department.getMajor(major);
} else if (source == this.campus) {
major = this.campus.getSelectedFileName();
major = this.college.refresh(major, false);
major = this.department.refresh(major);
major = this.college.getMajor(major);
major = this.department.getMajor(major);
} else if (source == this.college) {
major = this.college.getSelectedFileName();
major = this.department.refresh(major);
major = this.department.getMajor(major);
} else if (source == this.department) {
major = this.department.getSelectedFileName();
}
Expand Down
1 change: 0 additions & 1 deletion src/Cource/CourceFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ public void addLectures(String opt) {
}

public void deleteLectures() {

if (basket) {
lectures = this.enrollmentPanel.basketTable.getSelectedLectures();
try {
Expand Down
9 changes: 3 additions & 6 deletions src/Cource/DirectoryList.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ public String refresh(String fileName) throws FileNotFoundException {
return this.eDirectories.get(0).getHyperLink();
}

public String refresh(String fileName, boolean opt) throws FileNotFoundException {
public String getMajor(String fileName) throws FileNotFoundException {
try {
this.eDirectories = this.iCDirectory.getItems(fileName);
this.eDirectories.remove(0);
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Expand All @@ -78,11 +79,7 @@ public String refresh(String fileName, boolean opt) throws FileNotFoundException
this.listData.clear();

for(EDirectory eDirectory: eDirectories) {
if(opt==false) {
opt = true;
}else {
this.listData.add(eDirectory.getName());
}
this.listData.add(eDirectory.getName());
}

this.setSelectedIndex(0);
Expand Down

0 comments on commit 5c815c8

Please sign in to comment.