From 5479c909c98fd211546924d03beac5562005edc2 Mon Sep 17 00:00:00 2001 From: SeekDaSky Date: Tue, 21 Nov 2017 08:38:24 +0100 Subject: [PATCH] fix merge --- controller/RootLayout.java | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/controller/RootLayout.java b/controller/RootLayout.java index d051c7e..8669df1 100644 --- a/controller/RootLayout.java +++ b/controller/RootLayout.java @@ -150,19 +150,21 @@ public class RootLayout extends Application implements EventObserver { System.out.println("Le titre du premier article est: "+NewsListModel.getInstance().getNews().get(0).getTitle()); System.out.println("La description du premier article est: "+NewsListModel.getInstance().getNews().get(0).getDescription()); - // For each news - for( NewsModel news : NewsListModel.getInstance().getNews() ){ - - try{ - - this.articles.addItem( news ); - - }catch(Exception e1){ - - System.out.println("Cannot fetch article data"); - e1.printStackTrace(); + // For each news + for( NewsModel news : NewsListModel.getInstance().getNews() ){ + + try{ + + this.articles.addItem( news ); + }catch(Exception e1){ + + System.out.println("Cannot fetch article data"); + e1.printStackTrace(); + + } } + } break; @@ -179,11 +181,11 @@ public class RootLayout extends Application implements EventObserver { } public void handleMainLayoutChange(String layout) { - /* + NewsListModel.getInstance().addObserver("MainClass", this); NewsListModel.getInstance().setCategory(Category.gaming); NewsListModel.getInstance().setSortType(SortTypes.relevancy); - NewsListModel.getInstance().query("the evil within");*/ + NewsListModel.getInstance().query("the evil within"); DictionaryModel.getInstance().addObserver("MainClass", this); DictionaryModel.getInstance().query("maison");