apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/pages/SocialPage.java

Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization


 168                     popularListPopulator.handle(null);
 169                 }
 170             }
 171         });
 172     }
 173     
 174     @Override public void reset() {
 175         recentTweetsList.scrollTo(0);
 176         popularTweetsList.scrollTo(0);
 177     }
 178 
 179     @Override protected void layoutChildren() {
 180         final double w = getWidth();
 181         final double h = getHeight();
 182         box.resizeRelocate(0, 0, w, h);
 183     }
 184     
 185     private static class TwitterList extends ListView<Tweet> implements Callback<ListView<Tweet>, ListCell<Tweet>>{
 186         public TwitterList(){
 187             getStyleClass().setAll("twitter-list-view");
 188             skinClassNameProperty().set("com.sun.javafx.scene.control.skin.ListViewSkin");
 189             setCellFactory(this);
 190             setMinHeight(100);
 191         }
 192 
 193         @Override public ListCell<Tweet> call(ListView<Tweet> p) {
 194             return new TweetListCell();
 195         }
 196     }
 197     
 198     private static class ListPopulator implements EventHandler, Callback<Tweet[], Void>, Runnable {
 199         private final ListView<Tweet> list;
 200         private final String searchUrl;
 201         private volatile Tweet[] tweets;
 202 
 203         public ListPopulator(ListView<Tweet> list, String searchUrl) {
 204             this.list = list;
 205             this.searchUrl = searchUrl;
 206         }
 207         
 208 




 168                     popularListPopulator.handle(null);
 169                 }
 170             }
 171         });
 172     }
 173     
 174     @Override public void reset() {
 175         recentTweetsList.scrollTo(0);
 176         popularTweetsList.scrollTo(0);
 177     }
 178 
 179     @Override protected void layoutChildren() {
 180         final double w = getWidth();
 181         final double h = getHeight();
 182         box.resizeRelocate(0, 0, w, h);
 183     }
 184     
 185     private static class TwitterList extends ListView<Tweet> implements Callback<ListView<Tweet>, ListCell<Tweet>>{
 186         public TwitterList(){
 187             getStyleClass().setAll("twitter-list-view");
 188             skinClassNameProperty().set("javafx.scene.control.skin.ListViewSkin");
 189             setCellFactory(this);
 190             setMinHeight(100);
 191         }
 192 
 193         @Override public ListCell<Tweet> call(ListView<Tweet> p) {
 194             return new TweetListCell();
 195         }
 196     }
 197     
 198     private static class ListPopulator implements EventHandler, Callback<Tweet[], Void>, Runnable {
 199         private final ListView<Tweet> list;
 200         private final String searchUrl;
 201         private volatile Tweet[] tweets;
 202 
 203         public ListPopulator(ListView<Tweet> list, String searchUrl) {
 204             this.list = list;
 205             this.searchUrl = searchUrl;
 206         }
 207         
 208