示例#1
0
 @Override
 public void activate() {
   this.active = true;
   for (Callback<Boolean, Void> c : activationCallbacks) {
     c.call(Boolean.TRUE);
   }
 }
示例#2
0
 @Override
 public void deactivate() {
   this.active = false;
   for (Callback<Boolean, Void> c : activationCallbacks) {
     c.call(Boolean.FALSE);
   }
 }
 @Override
 public void endObject(String objectName, int depth) {
   if (depth == 0) {
     gotTweetCallBack.call(tweets.toArray(new Tweet[tweets.size()]));
   }
   if (depth == 2) {
     tweets.add(new Tweet(createdAt, fromUser, fromUserName, profileImageUrl, text));
   }
 }
示例#4
0
 /**
  * Return the height of a row. It will first look into the {@link Callback}provided at the
  * initialization. If nothing's found, {@link #AUTOFIT} will be returned.
  *
  * @param row
  * @return the height of a row.
  */
 @Override
 public double getRowHeight(int row) {
   return rowHeightFactory.call((Integer) row);
 }