// Path: src/main/java/gov/wa/wsdot/apps/analytics/shared/Mention.java
// public class Mention extends JavaScriptObject {
// 	protected Mention() {}
// 	
// 	public final native String getText() /*-{ return this.text }-*/;
// 	public final native String getProfileImageUrl() /*-{ return this.profile_image_url }-*/;
// 	public final native String getToUserIdStr() /*-{ return this.to_user_id_str }-*/;
// 	public final native String getFromUser() /*-{ return this.from_user }-*/;
// 	public final native int getFromUserId() /*-{ return this.from_user_id }-*/;
// 	public final native int getToUserId() /*-{ return this.to_user_id }-*/;
// 	public final native String getGeo() /*-{ return this.geo }-*/;
// 	public final native double getId() /*-{ return this.id }-*/;
// 	public final native String getIsoLanguageCode() /*-{ return this.iso_language_code }-*/;
// 	public final native String getFromUserIdStr() /*-{ return this.from_user_id_str }-*/;
// 	public final native String getSource() /*-{ return this.source }-*/;
// 	public final native String getIdStr() /*-{ return this.id_str }-*/;
// 	public final native String getCreatedAt() /*-{ return this.created_at }-*/;
// 	public final native String getSentiment() /*-{ return this.sentiment }-*/;
// 	public final native Entities getEntities() /*-{ return this.entities }-*/;
// 	public final native JsArray<Mention> getMentions() /*-{ return this }-*/;
// 	public final native User getUser() /*-{ return this.user }-*/;
// 	public final native int getRetweet() /*-{ return this.retweet_count }-*/;
// 	public final native int getFavorited() /*-{ return this.favorite_count }-*/;
// }
// 
// Path: src/main/java/gov/wa/wsdot/apps/analytics/util/Consts.java
// public final class Consts {
// 
//     public static final String HOST_URL = "http://127.0.0.1:3001";
// 
//     public static final String DEFAULT_ACCOUNT = "wsdot";
// 
//     /**
//      * The caller references the constants using <tt>Consts.EMPTY_STRING</tt>,
//      * and so on. Thus, the caller should be prevented from constructing objects of
//      * this class, by declaring this private constructor.
//      */
//     private Consts() {
//         //this prevents even the native class from
//         //calling this ctor as well :
//         throw new AssertionError();
//     }
// 
// }


import gwt.material.design.addins.client.pathanimator.MaterialPathAnimator;
import gwt.material.design.client.constants.IconType;
import gwt.material.design.client.ui.*;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.jsonp.client.JsonpRequestBuilder;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
import gov.wa.wsdot.apps.analytics.shared.Mention;
import gov.wa.wsdot.apps.analytics.util.Consts;
/*
 * Copyright (c) 2016 Washington State Department of Transportation
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */
package gov.wa.wsdot.apps.analytics.client.activities.twitter.view.tweet;


/**
 *  A custom view for a tweet. Uses a MaterialCard as a base. Besides displaying content for the tweet has logic for
 *  editing a tweets sentiment value.
 *
 *  Is used by TweetsView
 */
public class TweetView extends Composite {

    private static TweetViewUiBinder uiBinder = GWT
            .create(TweetViewUiBinder.class);

    interface TweetViewUiBinder extends
            UiBinder<Widget, TweetView> {
    }

    @UiField
    MaterialImage image;

    @UiField
    MaterialLabel title;

    @UiField
    MaterialLabel content;

    @UiField
    MaterialLink updated;

    @UiField
    MaterialLink sentiment;

    @UiField
    MaterialCard sentimentDialog;

    @UiField
    MaterialLink positive;

    @UiField
    MaterialLink negative;

    @UiField
    MaterialLink neutral;

    @UiField
    MaterialButton btnClose;

// Path: src/main/java/gov/wa/wsdot/apps/analytics/shared/Mention.java
// public class Mention extends JavaScriptObject {
// 	protected Mention() {}
// 	
// 	public final native String getText() /*-{ return this.text }-*/;
// 	public final native String getProfileImageUrl() /*-{ return this.profile_image_url }-*/;
// 	public final native String getToUserIdStr() /*-{ return this.to_user_id_str }-*/;
// 	public final native String getFromUser() /*-{ return this.from_user }-*/;
// 	public final native int getFromUserId() /*-{ return this.from_user_id }-*/;
// 	public final native int getToUserId() /*-{ return this.to_user_id }-*/;
// 	public final native String getGeo() /*-{ return this.geo }-*/;
// 	public final native double getId() /*-{ return this.id }-*/;
// 	public final native String getIsoLanguageCode() /*-{ return this.iso_language_code }-*/;
// 	public final native String getFromUserIdStr() /*-{ return this.from_user_id_str }-*/;
// 	public final native String getSource() /*-{ return this.source }-*/;
// 	public final native String getIdStr() /*-{ return this.id_str }-*/;
// 	public final native String getCreatedAt() /*-{ return this.created_at }-*/;
// 	public final native String getSentiment() /*-{ return this.sentiment }-*/;
// 	public final native Entities getEntities() /*-{ return this.entities }-*/;
// 	public final native JsArray<Mention> getMentions() /*-{ return this }-*/;
// 	public final native User getUser() /*-{ return this.user }-*/;
// 	public final native int getRetweet() /*-{ return this.retweet_count }-*/;
// 	public final native int getFavorited() /*-{ return this.favorite_count }-*/;
// }
// 
// Path: src/main/java/gov/wa/wsdot/apps/analytics/util/Consts.java
// public final class Consts {
// 
//     public static final String HOST_URL = "http://127.0.0.1:3001";
// 
//     public static final String DEFAULT_ACCOUNT = "wsdot";
// 
//     /**
//      * The caller references the constants using <tt>Consts.EMPTY_STRING</tt>,
//      * and so on. Thus, the caller should be prevented from constructing objects of
//      * this class, by declaring this private constructor.
//      */
//     private Consts() {
//         //this prevents even the native class from
//         //calling this ctor as well :
//         throw new AssertionError();
//     }
// 
// }


// Path: src/main/java/gov/wa/wsdot/apps/analytics/client/activities/twitter/view/tweet/TweetView.java
import gwt.material.design.addins.client.pathanimator.MaterialPathAnimator;
import gwt.material.design.client.constants.IconType;
import gwt.material.design.client.ui.*;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.jsonp.client.JsonpRequestBuilder;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
import gov.wa.wsdot.apps.analytics.shared.Mention;
import gov.wa.wsdot.apps.analytics.util.Consts;

/*
 * Copyright (c) 2016 Washington State Department of Transportation
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */
package gov.wa.wsdot.apps.analytics.client.activities.twitter.view.tweet;


/**
 *  A custom view for a tweet. Uses a MaterialCard as a base. Besides displaying content for the tweet has logic for
 *  editing a tweets sentiment value.
 *
 *  Is used by TweetsView
 */
public class TweetView extends Composite {

    private static TweetViewUiBinder uiBinder = GWT
            .create(TweetViewUiBinder.class);

    interface TweetViewUiBinder extends
            UiBinder<Widget, TweetView> {
    }

    @UiField
    MaterialImage image;

    @UiField
    MaterialLabel title;

    @UiField
    MaterialLabel content;

    @UiField
    MaterialLink updated;

    @UiField
    MaterialLink sentiment;

    @UiField
    MaterialCard sentimentDialog;

    @UiField
    MaterialLink positive;

    @UiField
    MaterialLink negative;

    @UiField
    MaterialLink neutral;

    @UiField
    MaterialButton btnClose;

    private static final String JSON_URL = Consts.HOST_URL + "/mentions/sentiment/edit/";