org.hdtourist.view.utils
Class NotificationProgress

java.lang.Object
  extended by org.hdtourist.view.utils.IProgress
      extended by org.hdtourist.view.utils.NotificationProgress

public class NotificationProgress
extends IProgress

The Class NotificationProgress.


Field Summary
private  android.content.Context contexto
          The contexto.
private  int ID
          The id.
private  android.support.v4.app.NotificationCompat.Builder mBuilder
          The m builder.
private  android.app.NotificationManager mNotifyManager
          The m notify manager.
private  long notificacionAnterior
          The notificacion anterior.
static int NOTIFICATION_MAPAS_ID
          La constante NOTIFICATION_MAPAS_ID.
static int NOTIFICATION_SEG
          La constante NOTIFICATION_SEG.
private  int numProcesos
          The num procesos.
private  int numProcesosPendientes
          The num procesos pendientes.
private  java.lang.String textoDelProgreso
          The texto del progreso.
 
Constructor Summary
NotificationProgress(android.content.Intent intent, int id, java.lang.String title)
          Instantiates a new notification progress.
NotificationProgress(int id, java.lang.String title)
          Instantiates a new notification progress.
 
Method Summary
 void forzarNotificacion()
          Fuerza la notificación, no hacer muchas llamadas seguidas a este método ya que se puede bloquear el terminal.
 int getNumProcesos()
          Gets the num procesos.
protected  int getNumProcesosPendientes()
          Gets the num procesos pendientes.
 boolean isShowing()
          Checks if is showing.
 void notifica()
          Actualiza la notificación, solo si han pasado NOTIFICACION_SEG segundos (para que nose bloquee).
private  void reset()
          Reset.
 void setErrorProceso()
          Fija el error proceso.
 void setFinProceso()
          Fija el fin proceso.
 void setIcono(int id)
          Sets the icono.
 void setId(int ID)
          Sets the id.
 void setInicioProceso()
          Fija el inicio proceso.
 void setNumProcesos(int numProcesos)
          Sets the num procesos.
 void setProgresoProceso(int progresoActual)
          Sets the progreso proceso.
 void setTexto(java.lang.String texto)
          Sets the texto.
 void setTitulo(java.lang.String title)
          Sets the titulo.
 
Methods inherited from class org.hdtourist.view.utils.IProgress
calcularProgreso
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOTIFICATION_MAPAS_ID

public static final int NOTIFICATION_MAPAS_ID
La constante NOTIFICATION_MAPAS_ID.

See Also:
Constant Field Values

NOTIFICATION_SEG

public static final int NOTIFICATION_SEG
La constante NOTIFICATION_SEG.

See Also:
Constant Field Values

contexto

private android.content.Context contexto
The contexto.


ID

private int ID
The id.


mBuilder

private android.support.v4.app.NotificationCompat.Builder mBuilder
The m builder.


mNotifyManager

private android.app.NotificationManager mNotifyManager
The m notify manager.


notificacionAnterior

private long notificacionAnterior
The notificacion anterior.


numProcesos

private int numProcesos
The num procesos.


numProcesosPendientes

private int numProcesosPendientes
The num procesos pendientes.


textoDelProgreso

private java.lang.String textoDelProgreso
The texto del progreso.

Constructor Detail

NotificationProgress

public NotificationProgress(int id,
                            java.lang.String title)
Instantiates a new notification progress.

Parameters:
id - the id
title - the title

NotificationProgress

public NotificationProgress(android.content.Intent intent,
                            int id,
                            java.lang.String title)
Instantiates a new notification progress.

Parameters:
intent - the intent
id - the id
title - the title
Method Detail

forzarNotificacion

public void forzarNotificacion()
Fuerza la notificación, no hacer muchas llamadas seguidas a este método ya que se puede bloquear el terminal.

Specified by:
forzarNotificacion in class IProgress

getNumProcesos

public int getNumProcesos()
Gets the num procesos.

Specified by:
getNumProcesos in class IProgress
Returns:
the numProcesos

isShowing

public boolean isShowing()
Description copied from class: IProgress
Checks if is showing.

Specified by:
isShowing in class IProgress
Returns:
true, if is showing

notifica

public void notifica()
Actualiza la notificación, solo si han pasado NOTIFICACION_SEG segundos (para que nose bloquee).

Specified by:
notifica in class IProgress

setErrorProceso

public void setErrorProceso()
Description copied from class: IProgress
Fija el error proceso.

Specified by:
setErrorProceso in class IProgress

setFinProceso

public void setFinProceso()
Description copied from class: IProgress
Fija el fin proceso.

Specified by:
setFinProceso in class IProgress

setIcono

public void setIcono(int id)
Description copied from class: IProgress
Sets the icono.

Specified by:
setIcono in class IProgress
Parameters:
id - the new icono

setId

public void setId(int ID)
Description copied from class: IProgress
Sets the id.

Specified by:
setId in class IProgress
Parameters:
ID - the new id

setInicioProceso

public void setInicioProceso()
Description copied from class: IProgress
Fija el inicio proceso.

Specified by:
setInicioProceso in class IProgress

setNumProcesos

public void setNumProcesos(int numProcesos)
Sets the num procesos.

Specified by:
setNumProcesos in class IProgress
Parameters:
numProcesos - el número de procesos totales que se van a ejecutar

setProgresoProceso

public void setProgresoProceso(int progresoActual)
Description copied from class: IProgress
Sets the progreso proceso.

Specified by:
setProgresoProceso in class IProgress
Parameters:
progresoActual - the new progreso proceso

setTexto

public void setTexto(java.lang.String texto)
Description copied from class: IProgress
Sets the texto.

Specified by:
setTexto in class IProgress
Parameters:
texto - the new texto

setTitulo

public void setTitulo(java.lang.String title)
Description copied from class: IProgress
Sets the titulo.

Specified by:
setTitulo in class IProgress
Parameters:
title - the new titulo

reset

private void reset()
Reset.


getNumProcesosPendientes

protected int getNumProcesosPendientes()
Description copied from class: IProgress
Gets the num procesos pendientes.

Specified by:
getNumProcesosPendientes in class IProgress
Returns:
the num procesos pendientes