Ontimize 5.2071EN

com.ontimize.gui.alarm
Class Alarm

java.lang.Object
  extended bycom.ontimize.gui.alarm.Alarm
All Implemented Interfaces:
java.lang.Comparable, Internationalization

public class Alarm
extends java.lang.Object
implements java.lang.Comparable, Internationalization

Version:
1.0

Field Summary
protected  java.lang.String code
           
protected  java.text.DateFormat df
           
protected  java.util.Date hour
           
static int INFORMATION
           
protected  java.lang.Object key
           
protected  java.util.Locale locale
           
protected  boolean recognized
           
protected  java.util.ResourceBundle resources
           
protected  java.lang.String text
           
protected  int type
           
static int WARNING
           
 
Fields inherited from interface com.ontimize.gui.i18n.Internationalization
DEBUG_LANGUAGE
 
Constructor Summary
Alarm(java.lang.Object key, java.lang.String code, int type)
           
Alarm(java.lang.Object key, java.lang.String code, int type, boolean recognized)
           
Alarm(java.lang.Object key, java.lang.String code, int type, java.util.Date hour)
           
Alarm(java.lang.Object key, java.lang.String code, int type, java.util.Date hour, boolean recognized)
           
Alarm(java.lang.Object key, java.lang.String text, int type, java.util.Date hour, java.lang.String code)
           
Alarm(java.lang.Object key, java.lang.String text, int type, java.util.Date hour, java.lang.String code, boolean recognized)
           
Alarm(java.lang.Object key, java.lang.String text, int type, java.lang.String code)
           
Alarm(java.lang.Object key, java.lang.String text, int tipo, java.lang.String code, boolean recognized)
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 java.lang.String getCode()
           
 java.util.Date getHour()
           
 java.lang.String getHourAsString()
          Gets the alarm hour with the format specified by the object locale
 java.lang.Object getKey()
           
 java.lang.String getText()
           
 java.util.Vector getTextsToTranslate()
          Returns all the texts in the element suitable for being translated.
 int getType()
           
 boolean isRecognized()
           
 boolean isWarning()
           
 void setComponentLocale(java.util.Locale l)
           
 void setRecognize(boolean rec)
           
 void setResourceBundle(java.util.ResourceBundle res)
          Sets the language resource bundle.
 java.lang.String toString()
          Creates a string with format 'code : text'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INFORMATION

public static int INFORMATION

WARNING

public static int WARNING

type

protected int type

text

protected java.lang.String text

code

protected java.lang.String code

key

protected java.lang.Object key

hour

protected java.util.Date hour

recognized

protected boolean recognized

locale

protected java.util.Locale locale

df

protected java.text.DateFormat df

resources

protected java.util.ResourceBundle resources
Constructor Detail

Alarm

public Alarm(java.lang.Object key,
             java.lang.String code,
             int type)

Alarm

public Alarm(java.lang.Object key,
             java.lang.String text,
             int type,
             java.lang.String code)

Alarm

public Alarm(java.lang.Object key,
             java.lang.String code,
             int type,
             java.util.Date hour)

Alarm

public Alarm(java.lang.Object key,
             java.lang.String text,
             int type,
             java.util.Date hour,
             java.lang.String code)

Alarm

public Alarm(java.lang.Object key,
             java.lang.String code,
             int type,
             boolean recognized)

Alarm

public Alarm(java.lang.Object key,
             java.lang.String text,
             int tipo,
             java.lang.String code,
             boolean recognized)

Alarm

public Alarm(java.lang.Object key,
             java.lang.String code,
             int type,
             java.util.Date hour,
             boolean recognized)

Alarm

public Alarm(java.lang.Object key,
             java.lang.String text,
             int type,
             java.util.Date hour,
             java.lang.String code,
             boolean recognized)
Method Detail

getKey

public java.lang.Object getKey()

getType

public int getType()

getHour

public java.util.Date getHour()

getHourAsString

public java.lang.String getHourAsString()
Gets the alarm hour with the format specified by the object locale

Returns:

getText

public java.lang.String getText()

getCode

public java.lang.String getCode()

toString

public java.lang.String toString()
Creates a string with format 'code : text'. The text can be in the resources file


isRecognized

public boolean isRecognized()

isWarning

public boolean isWarning()

setRecognize

public void setRecognize(boolean rec)

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

getTextsToTranslate

public java.util.Vector getTextsToTranslate()
Description copied from interface: Internationalization
Returns all the texts in the element suitable for being translated.

Specified by:
getTextsToTranslate in interface Internationalization
Returns:
all the texts in the element suitable for being translated.

setResourceBundle

public void setResourceBundle(java.util.ResourceBundle res)
Description copied from interface: Internationalization
Sets the language resource bundle. When the application changes the configured language, for all the objects that implement this interface this method must be called with the new file.
The method must translate all the elements that have texts in the GUI

Specified by:
setResourceBundle in interface Internationalization
Parameters:
res - the new language bundle.

setComponentLocale

public void setComponentLocale(java.util.Locale l)
Specified by:
setComponentLocale in interface Internationalization

Ontimize