com.extjs.gxt.ui.client.widget.form
Class Time

java.lang.Object
  extended by com.extjs.gxt.ui.client.data.BaseModelData
      extended by com.extjs.gxt.ui.client.widget.form.Time
All Implemented Interfaces:
ModelData, java.io.Serializable

public class Time
extends BaseModelData

ModelData instance used with TimeField.

See Also:
TimeField, Serialized Form

Field Summary
 
Fields inherited from class com.extjs.gxt.ui.client.data.BaseModelData
allowNestedValues, map
 
Constructor Summary
Time()
          Creates a new time instance.
Time(java.util.Date date)
          Creates a new time instance.
Time(java.util.Date date, java.lang.String text)
          Creates a new time instance.
Time(int hour, int minutes)
          Creates a new time instance.
Time(int hour, int minutes, java.lang.String text)
          Creates a new time instance.
 
Method Summary
 java.util.Date getDate()
          Returns a new date instance form the time information.
 int getHour()
          Returns the hour.
 int getMinutes()
          Returns the mintues.
 java.lang.String getText()
          Gets the display text.
 void setHour(int hour)
          Sets the hour.
 void setMinutes(int minutes)
          Sets the minutes.
 void setText(java.lang.String text)
          Sets the display text.
 
Methods inherited from class com.extjs.gxt.ui.client.data.BaseModelData
get, get, getProperties, getPropertyNames, isAllowNestedValues, remove, set, setAllowNestedValues, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Time

public Time()
Creates a new time instance.


Time

public Time(java.util.Date date)
Creates a new time instance.

Parameters:
date - any date, hours and minutes will be used

Time

public Time(int hour,
            int minutes)
Creates a new time instance.

Parameters:
hour - the (0-23)
minutes - the minutes (0-59)

Time

public Time(java.util.Date date,
            java.lang.String text)
Creates a new time instance.

Parameters:
date - any date, hours and minutes will be used
text - the display text

Time

public Time(int hour,
            int minutes,
            java.lang.String text)
Creates a new time instance.

Parameters:
hour - the (0-23)
minutes - the minutes (0-59)
text - the display text
Method Detail

getDate

public java.util.Date getDate()
Returns a new date instance form the time information.

Returns:
the new date instance

getText

public java.lang.String getText()
Gets the display text.

Returns:
the display text.

getHour

public int getHour()
Returns the hour.

Returns:
the hour

getMinutes

public int getMinutes()
Returns the mintues.

Returns:
the mintues

setText

public void setText(java.lang.String text)
Sets the display text.

Parameters:
text - the display text.

setHour

public void setHour(int hour)
Sets the hour.

Parameters:
hour - the hour

setMinutes

public void setMinutes(int minutes)
Sets the minutes.

Parameters:
minutes - the minutes