com.android.agf.fragments

## Class DashboardWebViewFragment

- java.lang.Object
- - android.support.v4.app.Fragment
  - - com.actionbarsherlock.app.SherlockFragment
    - - com.android.agf.fragments.Base_WebViewFragment
      - - com.android.agf.fragments.DashboardWebViewFragment

- All Implemented Interfaces:
    ComponentCallbacks, _ActionBarSherlockTrojanHorse.OnCreateOptionsMenuListener, _ActionBarSherlockTrojanHorse.OnOptionsItemSelectedListener, _ActionBarSherlockTrojanHorse.OnPrepareOptionsMenuListener, View.OnCreateContextMenuListener
  Direct Known Subclasses:
    DashboardFourWebviewFragment, DashboardThreeWebviewFragment, DashboardTwoWebviewFragment

      public class DashboardWebViewFragment
      extends Base_WebViewFragment

  fragment que visualitza un dashboard
  Author:
    albert

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `DashboardWebViewFragment.CloseListener` listener per tancar l'edicio del component
    `class` | `DashboardWebViewFragment.EditListener` listener per iniciar l'ediciovdel component
    `(package private) class` | `DashboardWebViewFragment.LoadCDA` classe local que implementa el listener touch
    `(package private) class` | `DashboardWebViewFragment.MyLoadData` classe local per implementar l'asynctask de carrega de dades de CDA
    `class` | `DashboardWebViewFragment.ShowEditListener` listener per mostrar el boto edit

    - ### Nested classes/interfaces inherited from class com.android.agf.fragments.Base_WebViewFragment

      `Base_WebViewFragment.InsideWebChromeClient, Base_WebViewFragment.InsideWebViewClient, Base_WebViewFragment.MyJavaScript, Base_WebViewFragment.MyJavaScriptCDA`

    - ### Nested classes/interfaces inherited from class android.support.v4.app.Fragment

      `Fragment.InstantiationException, Fragment.SavedState`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static int[]` | `ID_CLOSE_BUTTON`
    `protected static int[]` | `ID_EDIT`
    `protected static int[]` | `ID_EDIT_BUTTON`
    `protected static int[]` | `ID_LEGEND`
    `protected static int[]` | `ID_LOAD`
    `protected static int[]` | `ID_TITLE`
    `protected static int[]` | `ID_WEBVIEW`
    `protected ImageButton[]` | `mClose`
    `protected ArrayList<DashComponent>` | `mComponents`
    `protected ImageButton[]` | `mEdit`
    `protected LinearLayout[]` | `mLegend`
    `protected View[]` | `mLoad`
    `protected TextView[]` | `mTitle`
    `protected WebView[]` | `mWebView`

    - ### Fields inherited from class com.android.agf.fragments.Base_WebViewFragment

      `mHandler, mId, mPentaho, mServer, mUser`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DashboardWebViewFragment()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actualitzaLlegenda(List<Legend> entrades, int id)` funcio per actualitzar el contingut de la llegenda del component
    `void` | `editDashboard(DashComponent comp)` inici de l'activity d'editar amb els parametres adients
    `void` | `iniciaLoad(int id)` funcio per modificar views al iniciar la carrega de dades
    `void` | `initWebViews()` funcio on es gestiona l'inici de webviews
    `protected int` | `loadingWebview(WebView webview, String url, JavaScriptInterface js)` funcio on es produeix la petició de carrega amb la url
    `static DashboardWebViewFragment` | `newInstance(String id)` funcio per introduir parametres a la creació del fragment
    `void` | `onActivityCreated(Bundle savedInstanceState)`
    `void` | `onCreate(Bundle savedInstanceState)` crida el primer cop que es crea el fragment, extras i creacio del handler de comunicació amb el thread UI
    `View` | `onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)`
    `void` | `onDestroy()` neteja de camps de dades per afavorir el GC i alliberar memòria
    `void` | `onPause()` control pausa dels webviews per alliberar memoria
    `void` | `onResume()` crida un cop el fragment esta present en el viewpager, usuari servidor pentaho i carrega de dades
    `void` | `startWebview(int id, DashComponent comp)` funcio on s'estableix tots els parametres del webview en cas que sigui CDF
    `void` | `startWebviewCDA(CDAData cda, int id, DashComponent comp)` funcio on s'estableix tots els parametres del webview en cas que sigui CDA
    `void` | `tancaLoad(int id)` funcio per modificar views al finalitzar la carrega de dades
    `protected WebView` | `webviewSettings(WebView webview, JavaScriptInterface js)` funcio on es configura tots els parametres del Webview de forma estandaritzada

    - ### Methods inherited from class com.actionbarsherlock.app.SherlockFragment

      `getSherlockActivity, onAttach, onCreateOptionsMenu, onCreateOptionsMenu, onDetach, onOptionsItemSelected, onOptionsItemSelected, onPrepareOptionsMenu, onPrepareOptionsMenu`

    - ### Methods inherited from class android.support.v4.app.Fragment

      `dump, equals, getActivity, getArguments, getChildFragmentManager, getFragmentManager, getId, getLayoutInflater, getLoaderManager, getParentFragment, getResources, getRetainInstance, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isVisible, onActivityResult, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onDestroyOptionsMenu, onDestroyView, onHiddenChanged, onInflate, onLowMemory, onOptionsMenuClosed, onSaveInstanceState, onStart, onStop, onViewCreated, onViewStateRestored, registerForContextMenu, setArguments, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setRetainInstance, setTargetFragment, setUserVisibleHint, startActivity, startActivityForResult, toString, unregisterForContextMenu`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### mLoad

          protected View[] mLoad

    - #### mTitle

          protected TextView[] mTitle

    - #### mLegend

          protected LinearLayout[] mLegend

    - #### mWebView

          protected WebView[] mWebView

    - #### mComponents

          protected ArrayList<DashComponent> mComponents

    - #### mClose

          protected ImageButton[] mClose

    - #### mEdit

          protected ImageButton[] mEdit

    - #### ID_LOAD

          protected static final int[] ID_LOAD

    - #### ID_TITLE

          protected static final int[] ID_TITLE

    - #### ID_LEGEND

          protected static final int[] ID_LEGEND

    - #### ID_WEBVIEW

          protected static final int[] ID_WEBVIEW

    - #### ID_CLOSE_BUTTON

          protected static final int[] ID_CLOSE_BUTTON

    - #### ID_EDIT_BUTTON

          protected static final int[] ID_EDIT_BUTTON

    - #### ID_EDIT

          protected static final int[] ID_EDIT

  - ### Constructor Detail

    - #### DashboardWebViewFragment

          public DashboardWebViewFragment()

  - ### Method Detail

    - #### newInstance

          public static DashboardWebViewFragment newInstance(String id)

      funcio per introduir parametres a la creació del fragment

    - #### onCreate

          public void onCreate(Bundle savedInstanceState)

      crida el primer cop que es crea el fragment, extras i creacio del handler de comunicació amb el thread UI
      Overrides:
        `onCreate` in class `Fragment`

    - #### onCreateView

          public View onCreateView(LayoutInflater inflater,
                          ViewGroup container,
                          Bundle savedInstanceState)

      Overrides:
        `onCreateView` in class `Fragment`

    - #### onActivityCreated

          public void onActivityCreated(Bundle savedInstanceState)

      Overrides:
        `onActivityCreated` in class `Fragment`

    - #### onResume

          public void onResume()

      crida un cop el fragment esta present en el viewpager, usuari servidor pentaho i carrega de dades
      Overrides:
        `onResume` in class `Fragment`

    - #### onPause

          public void onPause()

      control pausa dels webviews per alliberar memoria
      Overrides:
        `onPause` in class `Fragment`

    - #### onDestroy

          public void onDestroy()

      neteja de camps de dades per afavorir el GC i alliberar memòria
      Overrides:
        `onDestroy` in class `Fragment`

    - #### iniciaLoad

          public void iniciaLoad(int id)

      Description copied from class: `Base_WebViewFragment`
      funcio per modificar views al iniciar la carrega de dades
      Specified by:
        `iniciaLoad` in class `Base_WebViewFragment`

    - #### tancaLoad

          public void tancaLoad(int id)

      Description copied from class: `Base_WebViewFragment`
      funcio per modificar views al finalitzar la carrega de dades
      Specified by:
        `tancaLoad` in class `Base_WebViewFragment`

    - #### actualitzaLlegenda

          public void actualitzaLlegenda(List<Legend> entrades,
                                int id)

      Description copied from class: `Base_WebViewFragment`
      funcio per actualitzar el contingut de la llegenda del component
      Specified by:
        `actualitzaLlegenda` in class `Base_WebViewFragment`

    - #### initWebViews

          public void initWebViews()

      Description copied from class: `Base_WebViewFragment`
      funcio on es gestiona l'inici de webviews
      Specified by:
        `initWebViews` in class `Base_WebViewFragment`

    - #### startWebview

          public void startWebview(int id,
                          DashComponent comp)

      Description copied from class: `Base_WebViewFragment`
      funcio on s'estableix tots els parametres del webview en cas que sigui CDF
      Specified by:
        `startWebview` in class `Base_WebViewFragment`

    - #### startWebviewCDA

          public void startWebviewCDA(CDAData cda,
                             int id,
                             DashComponent comp)

      Description copied from class: `Base_WebViewFragment`
      funcio on s'estableix tots els parametres del webview en cas que sigui CDA
      Specified by:
        `startWebviewCDA` in class `Base_WebViewFragment`

    - #### loadingWebview

          protected int loadingWebview(WebView webview,
                           String url,
                           JavaScriptInterface js)

      Description copied from class: `Base_WebViewFragment`
      funcio on es produeix la petició de carrega amb la url
      Specified by:
        `loadingWebview` in class `Base_WebViewFragment`
      Returns:

    - #### webviewSettings

          protected WebView webviewSettings(WebView webview,
                                JavaScriptInterface js)

      Description copied from class: `Base_WebViewFragment`
      funcio on es configura tots els parametres del Webview de forma estandaritzada
      Specified by:
        `webviewSettings` in class `Base_WebViewFragment`
      Returns:

    - #### editDashboard

          public void editDashboard(DashComponent comp)

      inici de l'activity d'editar amb els parametres adients
      Parameters:
        `comp` -