protected String tr_string(String tag, String value)
{
if (value != null)
{
return "| " + Shared.getMessage(tag) + " | " + value + " |
";
}
else
{
return "| " + Shared.getMessage(tag) + " | |
";
}
}
protected String tr_string(String tag, String value, String units)
{
if (value != null)
{
return "| " + Shared.getMessage(tag) + " | " + value + " " + units + " |
";
}
else
{
return "| " + Shared.getMessage(tag) + " | |
";
}
}
protected String tr_integer(String tag, long value, String units)
{
DecimalFormat formato1 = new DecimalFormat("###,###,###");
return "| " + Shared.getMessage(tag) + " | " + formato1.format(value) + " " + units + " |
";
}
protected String tr_double(String tag, double value, String units)
{
DecimalFormat formato1 = new DecimalFormat("###,###,###.#");
return "| " + Shared.getMessage(tag) + " | " + formato1.format(value) + " " + units + " |
";
}
protected String tr_boolean(String tag, boolean value, boolean reverse)
{
if (reverse == false)
{
if (value == true)
{
return "| " + Shared.getMessage(tag) + " | |
";
}
else
{
return "| " + Shared.getMessage(tag) + " | |
";
}
}
else
{
if (value == false)
{
return "| " + Shared.getMessage(tag) + " | |
";
}
else
{
return "| " + Shared.getMessage(tag) + " | |
";
}
}
}
protected String tr_datetimeicon(String tag, long timestamp)
{
SimpleDateFormat formato1 = new SimpleDateFormat(Shared.getMessage("dd/MM/yyyy HH:mm:ss"));
if (timestamp > 0)
{
return "| " + tag + " | |
";
}
else
{
return "| " + tag + " | |
";
}
}
protected String tr_datetime(String tag, long timestamp)
{
SimpleDateFormat formato1 = new SimpleDateFormat(Shared.getMessage("dd/MM/yyyy HH:mm:ss"));
if (timestamp == 0)
{
return "| " + tag + " | |
";
}
else
{
return "| " + tag + " | " + formato1.format(timestamp) + " |
";
}
}
protected String tr_datetimemillis(String tag, long timestamp)
{
SimpleDateFormat formato1 = new SimpleDateFormat(Shared.getMessage("dd/MM/yyyy HH:mm:ss.SSS"));
if (timestamp == 0)
{
return "| " + tag + " | |
";
}
else
{
return "| " + tag + " | " + formato1.format(timestamp) + " |
";
}
}
//
//