|
@@ -247,7 +247,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
/**Configures the given rootview.
|
|
|
* Sets the Spinner, the list and all requiered buttons.
|
|
|
* It also actualises the current plot type.
|
|
|
- * @param View rootView
|
|
|
+ * @param rootView View
|
|
|
* */
|
|
|
public void configureRootView(View rootView){
|
|
|
LinearLayout plotLayout = (LinearLayout) rootView.findViewById(R.id.plot_layout);
|
|
@@ -301,7 +301,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
}
|
|
|
|
|
|
/**Sets the title over the plot view.
|
|
|
- * @param String title
|
|
|
+ * @param title String
|
|
|
* */
|
|
|
public void setTitle(String title){
|
|
|
TextView titleView = (TextView) this.rootView.findViewById(R.id.title_text_view);
|
|
@@ -336,7 +336,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
}
|
|
|
|
|
|
/**Sets the current chart to the given type and acualises it.
|
|
|
- * @param ChartType type
|
|
|
+ * @param type {@link de.tudarmstadt.informatik.hostage.ui2.fragment.StatisticsFragment.ChartType ChartType}
|
|
|
* */
|
|
|
public void setChartType(ChartType type){
|
|
|
boolean shouldChange = true;
|
|
@@ -379,7 +379,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
}
|
|
|
|
|
|
/**Returns the plot view for a given type.
|
|
|
- * @param ChartType type.
|
|
|
+ * @param type {@link de.tudarmstadt.informatik.hostage.ui2.fragment.StatisticsFragment.ChartType ChartType}
|
|
|
* */
|
|
|
public View getPlotViewForType(ChartType type){
|
|
|
switch (type){
|
|
@@ -443,7 +443,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
* MENU
|
|
|
* */
|
|
|
/**Opens the Bar Option Menu above the given anchor view.
|
|
|
- * @param View the anchor view*/
|
|
|
+ * @param anchorView View*/
|
|
|
private void openBarSelectionMenuOnView(View anchorView){
|
|
|
SimplePopupTable visualiseMenu = new SimplePopupTable(this.getActivity(), new AbstractPopup.OnPopupItemClickListener() {
|
|
|
public void onItemClick(Object ob) {
|
|
@@ -523,7 +523,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
* */
|
|
|
/**
|
|
|
* Will be called if the user selects the positiv button on an checklist dialog.
|
|
|
- * @param ChecklistDialog dialog
|
|
|
+ * @param dialog {@link ChecklistDialog ChecklistDialog}
|
|
|
* */
|
|
|
public void onDialogPositiveClick(ChecklistDialog dialog) {
|
|
|
String title = dialog.getTitle();
|
|
@@ -588,7 +588,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
|
|
|
/**
|
|
|
* Will be called if the user selects the negativ button on an checklist dialog.
|
|
|
- * @param ChecklistDialog dialog
|
|
|
+ * @param dialog {@link ChecklistDialog ChecklistDialog}
|
|
|
* */
|
|
|
public void onDialogNegativeClick(ChecklistDialog dialog) {
|
|
|
|
|
@@ -663,7 +663,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
|
|
|
/**
|
|
|
* Opens the filter menu above an given anchor view.
|
|
|
- * @param View anchor view
|
|
|
+ * @param anchor View
|
|
|
*/
|
|
|
private void openFilterMenuOnView(View anchor){
|
|
|
SimplePopupTable filterMenu = new SimplePopupTable(this.getActivity(), new AbstractPopup.OnPopupItemClickListener() {
|
|
@@ -702,7 +702,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
|
|
|
/**
|
|
|
* Will be called if the user selected an filter item.
|
|
|
- * @param AbstractPopupItem item
|
|
|
+ * @param item {@link AbstractPopupItem AbstractPopupItem}
|
|
|
*/
|
|
|
private void onFilterMenuItemSelected(AbstractPopupItem item){
|
|
|
if (item instanceof SplitPopupItem){
|
|
@@ -926,7 +926,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Returns the current line graph.
|
|
|
+ * Returns the current {@link com.echo.holographlibrary.LineGraph Linegraph} .
|
|
|
* @return LineGraph current line graph
|
|
|
*/
|
|
|
public LineGraph getLineGraphView(){
|
|
@@ -940,7 +940,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Returns the current BarGraph.
|
|
|
+ * Returns the current {@link com.echo.holographlibrary.BarGraph BarGraph} .
|
|
|
* @return BarGraph the current bar graph
|
|
|
*/
|
|
|
public BarGraph getBarGraphView(){
|
|
@@ -967,7 +967,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
|
|
|
/**
|
|
|
* Sets the data for the given PieGraph
|
|
|
- * @param PieGraph piegraph
|
|
|
+ * @param piegraph {@link com.echo.holographlibrary.PieGraph PieGraph}
|
|
|
*/
|
|
|
public void setPieGraphData(PieGraph piegraph){
|
|
|
this.currentData = this.getPieData();
|
|
@@ -992,7 +992,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
|
|
|
/**
|
|
|
* Sets the data for the given LineGraph
|
|
|
- * @param LineGraph linegraph
|
|
|
+ * @param linegraph {@link LineGraph Linegraph}
|
|
|
*/
|
|
|
public void setLineGraphData(LineGraph linegraph){
|
|
|
this.currentData = this.getLineData();
|
|
@@ -1092,7 +1092,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
|
|
|
/**
|
|
|
* Set the graph data to the given graph
|
|
|
- * @param BarGraph bargraph
|
|
|
+ * @param bargraph {@link BarGraph BarGraph}
|
|
|
* */
|
|
|
public void setBarGraphData(BarGraph bargraph){
|
|
|
this.currentData = this.getBarData();
|
|
@@ -1121,7 +1121,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
* */
|
|
|
/**
|
|
|
* Returns the DataBaseHandler result for the current filter.
|
|
|
- * @param ArrayList<Record> records
|
|
|
+ * @return records {@link java.util.ArrayList}, {@link Record Record}
|
|
|
*/
|
|
|
public ArrayList<Record> getFetchedRecords(){
|
|
|
if (this.filter == null) this.clearFilter();
|
|
@@ -1330,9 +1330,11 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
* LINE PLOT DATA
|
|
|
*/
|
|
|
|
|
|
- /**Returns the line graph data responding to the selectedCompareData key.
|
|
|
+ /**
|
|
|
+ * Returns the line graph data responding to the selectedCompareData key.
|
|
|
* The returned data is resized to the specified limit.
|
|
|
- * @return ArrayList<PlotComparisonItem attacksPerTime or attacksPerDate*/
|
|
|
+ * @return plotItems {@link PlotComparisonItem PlotComparisonItems}
|
|
|
+ */
|
|
|
public ArrayList<PlotComparisonItem> attacksPerTime(){
|
|
|
HashMap<String,HashMap<Long, ArrayList<Record> > > lineMap = new HashMap<String, HashMap<Long, ArrayList<Record>>>();
|
|
|
|
|
@@ -1412,7 +1414,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
*/
|
|
|
/**Returns plotitems for the comparison "attacks per bssid"
|
|
|
* The returned data is resized to the specified limit.
|
|
|
- * @return ArrayList<PlotComparisonItem> the data
|
|
|
+ * @return ArrayList of {@link PlotComparisonItem PlotComparisonItems}
|
|
|
*/
|
|
|
public ArrayList<PlotComparisonItem> attacksPerBSSID(String protocol){
|
|
|
LogFilter filter = new LogFilter();
|
|
@@ -1452,7 +1454,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
return this.resizeData(plotItems);
|
|
|
}
|
|
|
/**Returns plotitems for the comparison "attacks per essid"
|
|
|
- * @return ArrayList<PlotComparisonItem> the data
|
|
|
+ * @return ArrayList of {@link PlotComparisonItem PlotComparisonItems}
|
|
|
*/
|
|
|
public ArrayList<PlotComparisonItem> attacksPerESSID(String protocol){
|
|
|
LogFilter filter = new LogFilter();
|
|
@@ -1498,8 +1500,8 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
* Creates an "others" group, containing all objects after the (MAX_NUMBER_OF_CHART_OBJECTS - 1)th object from the given list.
|
|
|
* If the given list does contain MAX_NUMBER_OF_CHART_OBJECTS+1 or more objects, nothing will change.
|
|
|
*
|
|
|
- * @param AtrrayList<PlotComparisonItem> the list to normalize
|
|
|
- * @return ArrayList<PlotComparisonItem> the normalized data
|
|
|
+ * @param plotItems to normalize {@link PlotComparisonItem PlotComparisonItems}
|
|
|
+ * @return the normalized ArrayList of {@link PlotComparisonItem PlotComparisonItems}
|
|
|
*/
|
|
|
private ArrayList<PlotComparisonItem> resizeData(ArrayList<PlotComparisonItem> plotItems){
|
|
|
if (plotItems != null){
|
|
@@ -1634,7 +1636,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
* */
|
|
|
/**
|
|
|
* Returns true if the current filter is set for a given filter menu title.
|
|
|
- * @param String filter menu title
|
|
|
+ * @param title of the filter menu item {@link String String}
|
|
|
* @return boolean b
|
|
|
*/
|
|
|
private boolean isFilterSetForTitle(String title){
|
|
@@ -1672,8 +1674,8 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
|
|
|
/**
|
|
|
* Returns the current hour from a date.
|
|
|
- * @param timeInMillis
|
|
|
- * @return
|
|
|
+ * @param timeInMillis long
|
|
|
+ * @return milliseconds in long
|
|
|
*/
|
|
|
public long getDayHourFromDate(long timeInMillis){
|
|
|
|
|
@@ -1688,7 +1690,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
}
|
|
|
/**
|
|
|
* Returns the current date without the seconds, minutes, hours.
|
|
|
- * @param long date
|
|
|
+ * @param timeInMillis long
|
|
|
* @return long date with time 00:00:00
|
|
|
* */
|
|
|
public long getDateFromMilliseconds(long timeInMillis){
|
|
@@ -1708,7 +1710,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
static final DateFormat dateFormat = new SimpleDateFormat("d.M.yy");
|
|
|
|
|
|
/**Returns a date as a formated string
|
|
|
- * @param long date
|
|
|
+ * @param timeStamp date
|
|
|
* @return String date format (d.M.yy)*/
|
|
|
@SuppressLint("SimpleDateFormat")
|
|
|
private String getDateAsDayString(long timeStamp) {
|
|
@@ -1742,7 +1744,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
*/
|
|
|
/**
|
|
|
* Will be called if the users taps on a list row.
|
|
|
- * @param int index
|
|
|
+ * @param index int
|
|
|
*/
|
|
|
private void userTappedOnLegendItem(int index){
|
|
|
if (index < this.currentData.size()){
|
|
@@ -1793,19 +1795,19 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
}
|
|
|
|
|
|
/**Will be called if the user clicked on a slice
|
|
|
- * @param int slice index*/
|
|
|
+ * @param index of the slice (int)*/
|
|
|
public void onSliceClick(int index){
|
|
|
}
|
|
|
/**Will be called if the user clicked on a bar
|
|
|
- * @param int bar index*/
|
|
|
+ * @param index of the bar (int)*/
|
|
|
public void onBarClick(int index){
|
|
|
this.userTappedOnLegendItem(index);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Displays a record over view fragment.
|
|
|
- * @param LogFilter filter
|
|
|
- * @param String sortKey
|
|
|
+ * @param filter {@link de.tudarmstadt.informatik.hostage.ui.LogFilter LogFilter}
|
|
|
+ * @param sortKey String
|
|
|
*/
|
|
|
private void pushRecordOverviewForFilter(LogFilter filter, String sortKey){
|
|
|
|