// Path: src/main/java/com/inovex/zabbixmobile/listeners/OnGraphsLoadedListener.java
// public interface OnGraphsLoadedListener {
// 
// 	/**
// 	 * Called when one or several graphs have been completely loaded.
// 	 */
// 	public void onGraphsLoaded();
// 
// 	/**
// 	 * Called upon a loading progress update.
// 	 * 
// 	 * @param progress
// 	 *            the current progress
// 	 */
// 	public void onGraphsProgressUpdate(int progress);
// 
// }
// 
// Path: src/main/java/com/inovex/zabbixmobile/model/Screen.java
// @DatabaseTable(tableName = "screens")
// public class Screen implements Comparable<Screen> {
// 
// 	private static final String INDEX_SCREENID_HOST = "screen_host_idx";
// 	/** row ID */
// 	public static final String COLUMN_ID = "id";
// 	@DatabaseField(generatedId = true, columnName = COLUMN_ID)
// 	long id;
// 	/** Screen ID */
// 	public static final String COLUMN_SCREENID = "screenid";
// 	@DatabaseField(uniqueIndexName = INDEX_SCREENID_HOST, columnName = COLUMN_SCREENID)
// 	long screenId;
// 	/** Screen name */
// 	public static final String COLUMN_NAME = "name";
// 	@DatabaseField(columnName = COLUMN_NAME)
// 	String name;
// 
// 	/** Host (needed for templates */
// 	public static final String COLUMN_HOST = "host";
// 	@DatabaseField(uniqueIndexName = INDEX_SCREENID_HOST, foreign = true, foreignAutoRefresh = true, columnName = COLUMN_HOST)
// 	Host host;
// 
// 	/** zabbix server */
// 	public static final String COLUMN_ZABBIXSERVER_ID = "zabbixserverid";
// 	@DatabaseField(columnName = COLUMN_ZABBIXSERVER_ID)
// 	private Long zabbixServerId;
// 
// 	Collection<Graph> graphs;
// 
// 	public Screen() {
// 	}
// 
// 	public long getId() {
// 		return id;
// 	}
// 
// 	public void setId(long id) {
// 		this.id = id;
// 	}
// 
// 	public long getScreenId() {
// 		return screenId;
// 	}
// 
// 	public String getName() {
// 		return name;
// 	}
// 
// 	public Collection<Graph> getGraphs() {
// 		return graphs;
// 	}
// 
// 	public void setGraphs(Collection<Graph> graphs) {
// 		this.graphs = graphs;
// 	}
// 
// 	public void setScreenId(long screenId) {
// 		this.screenId = screenId;
// 	}
// 
// 	public void setName(String name) {
// 		this.name = name;
// 	}
// 
// 	@Override
// 	public int compareTo(Screen another) {
// 		if (another.getScreenId() < screenId)
// 			return 1;
// 		if (another.getScreenId() > screenId)
// 			return -1;
// 		if(!another.getHost().equals(host))
// 			return -1;
// 		return 0;
// 	}
// 
// 	public Long getZabbixServerId() {
// 		return zabbixServerId;
// 	}
// 
// 	public void setZabbixServerId(Long zabbixServerId) {
// 		this.zabbixServerId = zabbixServerId;
// 	}
// 
// 	public Host getHost() {
// 		return host;
// 	}
// 
// 	public void setHost(Host host) {
// 		this.host = host;
// 	}
// }


import com.inovex.zabbixmobile.model.Graph;
import com.inovex.zabbixmobile.model.Screen;
import com.inovex.zabbixmobile.util.GraphUtil;
import com.jjoe64.graphview.LineGraphView;
import android.content.ComponentName;
import android.os.Bundle;
import android.os.IBinder;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.inovex.zabbixmobile.R;
import com.inovex.zabbixmobile.listeners.OnGraphsLoadedListener;
/*
This file is part of ZAX.

	ZAX 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.

	ZAX 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 ZAX.  If not, see <http://www.gnu.org/licenses/>.
*/

package com.inovex.zabbixmobile.activities.fragments;



/**
 * Fragment showing one particular screen.
 * 
 */
public class ScreensDetailsFragment extends BaseServiceConnectedFragment
		implements OnGraphsLoadedListener {

	private static final String ARG_GRAPH_SPINNER_VISIBLE = "arg_graph_spinner_visible";

// Path: src/main/java/com/inovex/zabbixmobile/listeners/OnGraphsLoadedListener.java
// public interface OnGraphsLoadedListener {
// 
// 	/**
// 	 * Called when one or several graphs have been completely loaded.
// 	 */
// 	public void onGraphsLoaded();
// 
// 	/**
// 	 * Called upon a loading progress update.
// 	 * 
// 	 * @param progress
// 	 *            the current progress
// 	 */
// 	public void onGraphsProgressUpdate(int progress);
// 
// }
// 
// Path: src/main/java/com/inovex/zabbixmobile/model/Screen.java
// @DatabaseTable(tableName = "screens")
// public class Screen implements Comparable<Screen> {
// 
// 	private static final String INDEX_SCREENID_HOST = "screen_host_idx";
// 	/** row ID */
// 	public static final String COLUMN_ID = "id";
// 	@DatabaseField(generatedId = true, columnName = COLUMN_ID)
// 	long id;
// 	/** Screen ID */
// 	public static final String COLUMN_SCREENID = "screenid";
// 	@DatabaseField(uniqueIndexName = INDEX_SCREENID_HOST, columnName = COLUMN_SCREENID)
// 	long screenId;
// 	/** Screen name */
// 	public static final String COLUMN_NAME = "name";
// 	@DatabaseField(columnName = COLUMN_NAME)
// 	String name;
// 
// 	/** Host (needed for templates */
// 	public static final String COLUMN_HOST = "host";
// 	@DatabaseField(uniqueIndexName = INDEX_SCREENID_HOST, foreign = true, foreignAutoRefresh = true, columnName = COLUMN_HOST)
// 	Host host;
// 
// 	/** zabbix server */
// 	public static final String COLUMN_ZABBIXSERVER_ID = "zabbixserverid";
// 	@DatabaseField(columnName = COLUMN_ZABBIXSERVER_ID)
// 	private Long zabbixServerId;
// 
// 	Collection<Graph> graphs;
// 
// 	public Screen() {
// 	}
// 
// 	public long getId() {
// 		return id;
// 	}
// 
// 	public void setId(long id) {
// 		this.id = id;
// 	}
// 
// 	public long getScreenId() {
// 		return screenId;
// 	}
// 
// 	public String getName() {
// 		return name;
// 	}
// 
// 	public Collection<Graph> getGraphs() {
// 		return graphs;
// 	}
// 
// 	public void setGraphs(Collection<Graph> graphs) {
// 		this.graphs = graphs;
// 	}
// 
// 	public void setScreenId(long screenId) {
// 		this.screenId = screenId;
// 	}
// 
// 	public void setName(String name) {
// 		this.name = name;
// 	}
// 
// 	@Override
// 	public int compareTo(Screen another) {
// 		if (another.getScreenId() < screenId)
// 			return 1;
// 		if (another.getScreenId() > screenId)
// 			return -1;
// 		if(!another.getHost().equals(host))
// 			return -1;
// 		return 0;
// 	}
// 
// 	public Long getZabbixServerId() {
// 		return zabbixServerId;
// 	}
// 
// 	public void setZabbixServerId(Long zabbixServerId) {
// 		this.zabbixServerId = zabbixServerId;
// 	}
// 
// 	public Host getHost() {
// 		return host;
// 	}
// 
// 	public void setHost(Host host) {
// 		this.host = host;
// 	}
// }


// Path: src/main/java/com/inovex/zabbixmobile/activities/fragments/ScreensDetailsFragment.java
import com.inovex.zabbixmobile.model.Graph;
import com.inovex.zabbixmobile.model.Screen;
import com.inovex.zabbixmobile.util.GraphUtil;
import com.jjoe64.graphview.LineGraphView;
import android.content.ComponentName;
import android.os.Bundle;
import android.os.IBinder;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.inovex.zabbixmobile.R;
import com.inovex.zabbixmobile.listeners.OnGraphsLoadedListener;

/*
This file is part of ZAX.

	ZAX 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.

	ZAX 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 ZAX.  If not, see <http://www.gnu.org/licenses/>.
*/

package com.inovex.zabbixmobile.activities.fragments;



/**
 * Fragment showing one particular screen.
 * 
 */
public class ScreensDetailsFragment extends BaseServiceConnectedFragment
		implements OnGraphsLoadedListener {

	private static final String ARG_GRAPH_SPINNER_VISIBLE = "arg_graph_spinner_visible";

	private Screen mScreen;