Skip to content

Commit

Permalink
Added up to TweetData additions
Browse files Browse the repository at this point in the history
  • Loading branch information
nishand17 committed Jul 5, 2016
1 parent 8f4a479 commit 1e26361
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 5 deletions.
Binary file modified MainFrame$1FavoriteListener.class
Binary file not shown.
Binary file modified MainFrame$1RetweetListener.class
Binary file not shown.
Binary file modified MainFrame$1UserLabelListener.class
Binary file not shown.
Binary file modified MainFrame.class
Binary file not shown.
12 changes: 11 additions & 1 deletion MainFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ private void addCenterPanel () {
picURL = new URL(strUrl);
profileImg = new ImageIcon(picURL);
long tweetID = statusList.get(i).getId();
tweetDataList.add(new TweetData("@" + statusList.get(i).getUser().getScreenName(), statusList.get(i).getText(), profileImg, statusList.get(i).getRetweetCount(), statusList.get(i).getFavoriteCount(), statusList.get(i).getUser().getStatusesCount(), statusList.get(i).getUser().getFollowersCount(), statusList.get(i).getUser().getFriendsCount(), tweetID));
long userID = statusList.get(i).getUser().getId();
tweetDataList.add(new TweetData("@" + statusList.get(i).getUser().getScreenName(), statusList.get(i).getText(), profileImg, statusList.get(i).getRetweetCount(), statusList.get(i).getFavoriteCount(), statusList.get(i).getUser().getStatusesCount(), statusList.get(i).getUser().getFollowersCount(), statusList.get(i).getUser().getFriendsCount(), tweetID, userID));
} catch(MalformedURLException te) {
}
}
Expand Down Expand Up @@ -475,6 +476,15 @@ public void mousePressed (MouseEvent e) {
profileViewNumFollowersLabel.setText(t.getUserFollowers() + " Followers");
profileViewNumFollowingLabel.setText(t.getUserFollowing() + " Following");

ResponseList<Status> userTweets;
ArrayList<TweetData> userTweetDataList = new ArrayList<TweetData>();
try {
userTweets = twitter.getUserTimeline(t.getUserID());
for(int i = 0; i < 4; i++) {
}
} catch(TwitterException te) {}


}

public void mouseReleased (MouseEvent e) {
Expand Down
Binary file modified TweetData.class
Binary file not shown.
8 changes: 5 additions & 3 deletions TweetData.ctxt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#BlueJ class context
comment0.params=u\ t\ i\ r\ f\ numTweets\ followers\ following\ id
comment0.target=TweetData(java.lang.String,\ java.lang.String,\ javax.swing.ImageIcon,\ int,\ int,\ int,\ int,\ int,\ long)
comment0.params=u\ t\ i\ r\ f\ numTweets\ followers\ following\ id\ uid
comment0.target=TweetData(java.lang.String,\ java.lang.String,\ javax.swing.ImageIcon,\ int,\ int,\ int,\ int,\ int,\ long,\ long)
comment1.params=
comment1.target=java.lang.String\ getUserHandle()
comment10.params=
comment10.target=long\ getUserID()
comment2.params=
comment2.target=java.lang.String\ getTweetText()
comment3.params=
Expand All @@ -19,4 +21,4 @@ comment8.params=
comment8.target=int\ getUserFollowing()
comment9.params=
comment9.target=long\ getID()
numComments=10
numComments=11
7 changes: 6 additions & 1 deletion TweetData.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ public class TweetData
private int followersCount;
private int followingCount;
private long tweetID;
private long userID;
// various private instance fields to hold the values of the twitter object
public TweetData(String u, String t, ImageIcon i, int r, int f, int numTweets, int followers, int following, long id) {
public TweetData(String u, String t, ImageIcon i, int r, int f, int numTweets, int followers, int following, long id, long uid) {
userHandle = u;
tweetText = t;
userIcon = i;
Expand All @@ -31,6 +32,7 @@ public TweetData(String u, String t, ImageIcon i, int r, int f, int numTweets, i
followersCount = followers;
followingCount = following;
tweetID = id;
userID = uid;
}
// various accessor methods for the TweetDate class
public String getUserHandle() {
Expand Down Expand Up @@ -67,4 +69,7 @@ public int getUserFollowing() {
public long getID() {
return tweetID;
}
public long getUserID() {
return userID;
}
}

0 comments on commit 1e26361

Please sign in to comment.