-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new model class for project, use ModelView as wrapper around mode…
…l class Show error dialog if user/password incorrect
- Loading branch information
1 parent
1997bb8
commit 1d0e706
Showing
9 changed files
with
71 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
src/main/java/org/jabref/gui/sharelatex/ShareLatexProjectDialogController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 4 additions & 6 deletions
10
src/main/java/org/jabref/gui/sharelatex/ShareLatexProjectDialogViewModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,25 @@ | ||
package org.jabref.gui.sharelatex; | ||
|
||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
|
||
import javafx.beans.property.SimpleListProperty; | ||
import javafx.collections.FXCollections; | ||
|
||
import org.jabref.gui.AbstractViewModel; | ||
import org.jabref.model.sharelatex.ShareLatexProject; | ||
|
||
public class ShareLatexProjectDialogViewModel extends AbstractViewModel { | ||
|
||
private final SimpleListProperty<ShareLatexProjectViewModel> projects = new SimpleListProperty<>( | ||
FXCollections.observableArrayList()); | ||
|
||
public ShareLatexProjectDialogViewModel(List<ShareLatexProjectViewModel> projects) { | ||
this.projects.addAll(projects); | ||
public void addProjects(List<ShareLatexProject> projectsToAdd) { | ||
this.projects.addAll(projectsToAdd.stream().map(ShareLatexProjectViewModel::new).collect(Collectors.toList())); | ||
} | ||
|
||
public SimpleListProperty<ShareLatexProjectViewModel> projectsProperty() { | ||
return this.projects; | ||
} | ||
|
||
public ShareLatexProjectDialogViewModel() { | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/org/jabref/model/sharelatex/ShareLatexProject.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.jabref.model.sharelatex; | ||
|
||
public class ShareLatexProject { | ||
|
||
private final String projectId; | ||
private final String projectTitle; | ||
private final String owner; | ||
private final String lastUpdated; | ||
|
||
public ShareLatexProject(String projectId, String projectTitle, String owner, String lastUpdated) { | ||
this.projectId = projectId; | ||
this.projectTitle = projectTitle; | ||
this.lastUpdated = lastUpdated; | ||
this.owner = owner; | ||
} | ||
|
||
public String getLastUpdated() { | ||
return lastUpdated; | ||
} | ||
|
||
public String getProjectId() { | ||
return projectId; | ||
} | ||
|
||
public String getProjectTitle() { | ||
return projectTitle; | ||
} | ||
|
||
public String getOwner() { | ||
return owner; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
src/test/java/org/jabref/logic/sharelatex/ShareLatexProject.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters