Skip to content

Commit

Permalink
Merge branch 'develop' into feature-mobile-person-details-view
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemmermann authored Jul 22, 2024
2 parents 2426aa2 + 5eb9a3c commit 023f822
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ protected Task<Void> createTask() {
@Override
protected Void call() throws InterruptedException {
List<Post> posts = DataRepository2.getInstance().loadPosts(blog);
posts.sort((o1, o2) -> o2.getSyndEntry().getPublishedDate().compareTo(o1.getSyndEntry().getPublishedDate()));
Thread.sleep(500);
Platform.runLater(() -> {
listView.getItems().setAll(posts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.dlsc.jfxcentral2.components.SizeSupport;
import com.dlsc.jfxcentral2.model.Size;
import com.dlsc.jfxcentral2.utils.MobileLinkUtil;
import com.dlsc.jfxcentral2.utils.PagePath;
import javafx.beans.binding.Bindings;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
Expand Down Expand Up @@ -52,10 +51,6 @@ public MobileCategoryHeader() {
setMaxHeight(Region.USE_PREF_SIZE);
}

protected String goBackLink() {
return PagePath.HOME;
}

// size support

public final ObjectProperty<Size> sizeProperty() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
public class WelcomePageView extends PageView {

private static final String DEFAULT_STYLE_CLASS = "welcome-page-view";

public record PageDate(String title, String description, String imageUrl) {
}

Expand Down Expand Up @@ -47,6 +48,7 @@ public WelcomePageView() {
}
return cells[index];
});
setCurrentPageIndex((int) (Math.random() * PAGES.length));


Timeline timeline = new Timeline();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@ public List<Node> content() {
Blog blog = getItem();

// header
MobileCategoryHeader header = new MobileCategoryHeader(){
@Override
protected String goBackLink() {
return PagePath.BLOGS;
}
};
header.previewImageProperty().bind(ImageManager.getInstance().blogIconImageProperty(blog));
MobileCategoryHeader header = new MobileCategoryHeader();
header.sizeProperty().bind(sizeProperty());
header.setTitle(blog.getName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@ public List<Node> content() {
Book book = getItem();

// header
MobileCategoryHeader header = new MobileCategoryHeader(){
@Override
protected String goBackLink() {
return PagePath.BOOKS;
}
};
// header.previewImageProperty().bind(ImageManager.getInstance().bookCoverImageProperty(book));
MobileCategoryHeader header = new MobileCategoryHeader();
header.sizeProperty().bind(sizeProperty());
header.setTitle(book.getName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ public List<Node> content() {
Company company = getItem();

// header
MobileCategoryHeader header = new MobileCategoryHeader(){
@Override
protected String goBackLink() {
return PagePath.COMPANIES;
}
};
MobileCategoryHeader header = new MobileCategoryHeader();
header.sizeProperty().bind(sizeProperty());
header.setIcon(IkonUtil.getModelIkon(Company.class));
header.setTitle(company.getName());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
package com.dlsc.jfxcentral2.mobile.pages.details;

import com.dlsc.jfxcentral.data.model.Learn;
import com.dlsc.jfxcentral.data.model.LearnJavaFX;
import com.dlsc.jfxcentral.data.model.LearnMobile;
import com.dlsc.jfxcentral.data.model.LearnRaspberryPi;
import com.dlsc.jfxcentral2.components.PrettyScrollPane;
import com.dlsc.jfxcentral2.components.overviewbox.LearnOverviewBox;
import com.dlsc.jfxcentral2.mobile.components.MobileCategoryHeader;
import com.dlsc.jfxcentral2.model.Size;
import com.dlsc.jfxcentral2.utils.PagePath;
import javafx.beans.property.ObjectProperty;
import javafx.scene.Node;
import javafx.scene.layout.Priority;
Expand All @@ -28,20 +24,7 @@ public List<Node> content() {
Learn learn = getItem();

// header
MobileCategoryHeader header = new MobileCategoryHeader() {
@Override
protected String goBackLink() {
Class<? extends Learn> modelClazz = getModelClazz();
if (modelClazz == LearnJavaFX.class) {
return PagePath.LEARN_JAVAFX;
} else if (modelClazz == LearnRaspberryPi.class) {
return PagePath.LEARN_RASPBERRYPI;
} else if (modelClazz == LearnMobile.class) {
return PagePath.LEARN_MOBILE;
}
return PagePath.HOME;
}
};
MobileCategoryHeader header = new MobileCategoryHeader();
header.sizeProperty().bind(sizeProperty());
header.setTitle(learn.getName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@ public List<Node> content() {
Library library = getItem();

// header
MobileCategoryHeader header = new MobileCategoryHeader(){
@Override
protected String goBackLink() {
return PagePath.LIBRARIES;
}
};
header.previewImageProperty().bind(ImageManager.getInstance().libraryFeaturedImageProperty(library));
MobileCategoryHeader header = new MobileCategoryHeader();
header.sizeProperty().bind(sizeProperty());
header.setTitle(library.getName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@ public List<Node> content() {
RealWorldApp app = getItem();

// header
MobileCategoryHeader header = new MobileCategoryHeader(){
@Override
protected String goBackLink() {
return PagePath.SHOWCASES;
}
};
header.previewImageProperty().bind(ImageManager.getInstance().realWorldAppBannerImageProperty(app));
MobileCategoryHeader header = new MobileCategoryHeader();
header.sizeProperty().bind(sizeProperty());
header.setTitle(app.getName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@ public List<Node> content() {
Tip tip = getItem();

// header
MobileCategoryHeader header = new MobileCategoryHeader(){
@Override
protected String goBackLink() {
return PagePath.TIPS;
}
};
header.previewImageProperty().bind(ImageManager.getInstance().tipBannerImageProperty(tip));
MobileCategoryHeader header = new MobileCategoryHeader();
header.sizeProperty().bind(sizeProperty());
header.setTitle(tip.getName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,7 @@ public List<Node> content() {
Tool tool = getItem();

// header
MobileCategoryHeader header = new MobileCategoryHeader(){
@Override
protected String goBackLink() {
return PagePath.TOOLS;
}
};
header.previewImageProperty().bind(ImageManager.getInstance().toolImageProperty(tool));
MobileCategoryHeader header = new MobileCategoryHeader();
header.sizeProperty().bind(sizeProperty());
header.setTitle(tool.getName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@ public List<Node> content() {
Tutorial tutorial = getItem();

// header
MobileCategoryHeader header = new MobileCategoryHeader(){
@Override
protected String goBackLink() {
return PagePath.TUTORIALS;
}
};
header.previewImageProperty().bind(ImageManager.getInstance().tutorialImageLargeProperty(tutorial));
MobileCategoryHeader header = new MobileCategoryHeader();
header.sizeProperty().bind(sizeProperty());
header.setTitle(tutorial.getName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.dlsc.jfxcentral2.components.overviewbox.VideoOverviewBox;
import com.dlsc.jfxcentral2.mobile.components.MobileCategoryHeader;
import com.dlsc.jfxcentral2.model.Size;
import com.dlsc.jfxcentral2.utils.PagePath;
import javafx.beans.property.ObjectProperty;
import javafx.scene.Node;
import javafx.scene.layout.Priority;
Expand All @@ -26,13 +25,7 @@ public List<Node> content() {
Video video = getItem();

// header
MobileCategoryHeader header = new MobileCategoryHeader(){
@Override
protected String goBackLink() {
return PagePath.VIDEOS;
}
};
header.previewImageProperty().bind(ImageManager.getInstance().youTubeImageProperty(video));
MobileCategoryHeader header = new MobileCategoryHeader();
header.sizeProperty().bind(sizeProperty());
header.setTitle(video.getName());

Expand Down

0 comments on commit 023f822

Please sign in to comment.