com.plumtree.uiinfrastructure.pagecontrols.timepicker
Class TimePicker

java.lang.Object
  extended by com.plumtree.uiinfrastructure.pagecontrols.framework.AComponent
      extended by com.plumtree.uiinfrastructure.pagecontrols.timepicker.ATimePicker
          extended by com.plumtree.uiinfrastructure.pagecontrols.timepicker.TimePicker
All Implemented Interfaces:
IManagedObject, IMVCObject, IPageControl

public class TimePicker
extends ATimePicker
implements IPageControl

Author:
JohnO

Field Summary
static java.lang.String AM
          some helpful static Strings
static java.lang.String DOUBLE0
           
static java.lang.String EMPTY
           
static java.lang.String H
           
static java.lang.String HTMLSELECT_AMPM
          The constant part of the name for the AM/PM select list that will optionally be returned by the date picker.
static java.lang.String HTMLSELECT_HOURS
          The constant part of the name for the hours select list that will be returned by the time-picker.
static java.lang.String HTMLSELECT_MINUTES
          The constant part of the name for the minutes select list that will be returned by the time picker.
static java.lang.String PM
           
static java.lang.String STR_MVC_CLASS_NAME
           
static java.lang.String TWELVE
           
 
Fields inherited from class com.plumtree.uiinfrastructure.pagecontrols.framework.AComponent
m_ptPageMgr
 
Constructor Summary
TimePicker()
           
 
Method Summary
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 java.lang.String GetAMPM()
          Returns the AMPM string
 java.lang.String GetAMPMInputName()
          Provides a means of retrieving the HTML Input name for the AMPM portion of the date picker.
 HTMLElementCollection GetComponentHTML()
          Returns the time picker HTML, which consists of either 2 or three select lists, depending on whether AMPM notation is used in the locale
 ComponentMgr GetComponentMgr(PageMgr _ptPageMgr)
          Return a new ComponentMgr of the type that manages this class (a JSDateTimePickerMgr).
 java.lang.String GetComponentMgrName()
          Return the name of the component manager responsible for this page control
 java.lang.String GetHours()
          Returns the hours string
 java.lang.String GetHoursInputName()
          Provides a means of retrieving the HTML Input name for the hours portion of the date picker.
 java.lang.String GetMinutes()
          Returns the minutes string
 java.lang.String GetMinutesInputName()
          Provides a means of retrieving the HTML Input name for the minutes portion of the date picker.
 java.lang.String GetName()
          Return the name of the MVC object.
 java.lang.String GetTimeAsEnglishString()
          Returns the time in the format format: "h:mm:ss a" the default US en time format.
 java.lang.String GetTimeAsString()
          Returns the time portion of the date and time chosen by the user as a String.
 XPArrayList GetValidators()
          Currently validation on the date/time picker page controls is not implemented.
 void Init(int _nHours, int _nMinutes, PageMgr _ptPageMgr, java.lang.String _strUniqueInstanceID)
          Initialize a new TimePicker object.
 void Init(int _nHours, int _nMinutes, java.lang.String _strAMPM, PageMgr _ptPageMgr, java.lang.String _strUniqueInstanceID)
          Creates a new TimePicker object.
 void Init(PageMgr _ptPageMgr, java.lang.String _strTime, java.lang.String _strUniqueInstanceID)
          Creates a new TimePicker object based on a complete time string in XPDateFormat.MEDIUM format using the given time as the preset value.
 int StoreUserInput(XPHashtable _htRequestParameters)
          Saves the items selected by the user into member variables
static java.lang.String TransformTimeToNewLocale(java.lang.String _sTimeAsString, XPLocale _lCurrentLocale, XPLocale _lNewLocale, XPTimeZone _tzCurrentTimeZone)
          Transforms a time from one format to another based on the Locale.
 XPArrayList Validate()
          Currently validation on the date/time picker page controls is not implemented.
 
Methods inherited from class com.plumtree.uiinfrastructure.pagecontrols.framework.AComponent
AppendUniqueIDToElementName, GetComponentHeadContent, GetComponentPostContent, GetComponentPreContent, GetComponentPreFormContent, GetPageMgr, GetSubComponentHTMLByIndex, GetUniqueInstanceID, Init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.plumtree.uiinfrastructure.activityspace.IPageControl
GetUniqueInstanceID
 

Field Detail

AM

public static final java.lang.String AM
some helpful static Strings

See Also:
Constant Field Values

PM

public static final java.lang.String PM
See Also:
Constant Field Values

H

public static final java.lang.String H
See Also:
Constant Field Values

EMPTY

public static final java.lang.String EMPTY
See Also:
Constant Field Values

DOUBLE0

public static final java.lang.String DOUBLE0
See Also:
Constant Field Values

TWELVE

public static final java.lang.String TWELVE
See Also:
Constant Field Values

HTMLSELECT_HOURS

public static final java.lang.String HTMLSELECT_HOURS
The constant part of the name for the hours select list that will be returned by the time-picker. The unique identifier string will be appended to this name on construction of the object.

See Also:
Constant Field Values

HTMLSELECT_MINUTES

public static final java.lang.String HTMLSELECT_MINUTES
The constant part of the name for the minutes select list that will be returned by the time picker. The unique identifier string will be appended to this name on construction of the object.

See Also:
Constant Field Values

HTMLSELECT_AMPM

public static final java.lang.String HTMLSELECT_AMPM
The constant part of the name for the AM/PM select list that will optionally be returned by the date picker. The unique identifier string will be appended to this name on construction of the object.

See Also:
Constant Field Values

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
See Also:
Constant Field Values
Constructor Detail

TimePicker

public TimePicker()
Method Detail

Init

public void Init(PageMgr _ptPageMgr,
                 java.lang.String _strTime,
                 java.lang.String _strUniqueInstanceID)
Creates a new TimePicker object based on a complete time string in XPDateFormat.MEDIUM format using the given time as the preset value.

Specified by:
Init in class ATimePicker
Parameters:
_ptPageMgr - - The page manager
_strTime - - The time string to parse
_strUniqueInstanceID - - The unique identifying string to distinguish multiple time pickers on the page

Init

public void Init(int _nHours,
                 int _nMinutes,
                 java.lang.String _strAMPM,
                 PageMgr _ptPageMgr,
                 java.lang.String _strUniqueInstanceID)
Creates a new TimePicker object.

Specified by:
Init in class ATimePicker
Parameters:
_nHours - The hours value to initially select
_nMinutes - The minutes value to initially select
_strAMPM - The AM/PM string to initially select
_ptComponentMgr - The component manager
_strUniqueInstanceID - The unique identifier string used to distinguish multiple copies of this component on the same page

Init

public void Init(int _nHours,
                 int _nMinutes,
                 PageMgr _ptPageMgr,
                 java.lang.String _strUniqueInstanceID)
Initialize a new TimePicker object.

Specified by:
Init in class ATimePicker
Parameters:
_nHours - The hours value to initially select
_nMinutes - The minutes value to initially select
_ptPageMgr - The page manager
_strUniqueInstanceID - The unique identifier string used to distinguish multiple copies of this component on the same page

GetAMPM

public java.lang.String GetAMPM()
Returns the AMPM string

Specified by:
GetAMPM in class ATimePicker
Returns:
String

GetAMPMInputName

public java.lang.String GetAMPMInputName()
Provides a means of retrieving the HTML Input name for the AMPM portion of the date picker. This allows for using javascript to programmatically set input values, for example.

Specified by:
GetAMPMInputName in class ATimePicker
Returns:
String

GetComponentHTML

public HTMLElementCollection GetComponentHTML()
Returns the time picker HTML, which consists of either 2 or three select lists, depending on whether AMPM notation is used in the locale

Specified by:
GetComponentHTML in interface IPageControl
Specified by:
GetComponentHTML in class AComponent
Returns:
HTMLElementCollection

GetHours

public java.lang.String GetHours()
Returns the hours string

Specified by:
GetHours in class ATimePicker
Returns:
String

GetHoursInputName

public java.lang.String GetHoursInputName()
Provides a means of retrieving the HTML Input name for the hours portion of the date picker. This allows for using javascript to programmatically set input values, for example.

Specified by:
GetHoursInputName in class ATimePicker
Returns:
String

GetMinutes

public java.lang.String GetMinutes()
Returns the minutes string

Specified by:
GetMinutes in class ATimePicker
Returns:
String

GetMinutesInputName

public java.lang.String GetMinutesInputName()
Provides a means of retrieving the HTML Input name for the minutes portion of the date picker. This allows for using javascript to programmatically set input values, for example.

Specified by:
GetMinutesInputName in class ATimePicker
Returns:
String

GetTimeAsString

public java.lang.String GetTimeAsString()
Returns the time portion of the date and time chosen by the user as a String.

Specified by:
GetTimeAsString in class ATimePicker
Returns:
String

GetTimeAsEnglishString

public java.lang.String GetTimeAsEnglishString()
Returns the time in the format format: "h:mm:ss a" the default US en time format. Note this is a poorly named method and in fact what's returned is the time formatted to the default format of the server.

Specified by:
GetTimeAsEnglishString in class ATimePicker
Returns:
String selected time formatted to the default format of the server.

TransformTimeToNewLocale

public static java.lang.String TransformTimeToNewLocale(java.lang.String _sTimeAsString,
                                                        XPLocale _lCurrentLocale,
                                                        XPLocale _lNewLocale,
                                                        XPTimeZone _tzCurrentTimeZone)
Transforms a time from one format to another based on the Locale.

Parameters:
_sTimeAsString -
_lCurrentLocale -
_lNewLocale -
Returns:
String

StoreUserInput

public int StoreUserInput(XPHashtable _htRequestParameters)
Saves the items selected by the user into member variables

Specified by:
StoreUserInput in interface IPageControl
Specified by:
StoreUserInput in class AComponent
Parameters:
_htRequestParameters - - A hashtable containing the contents of the HTML form the user has submitted
Returns:
int - status of the page

Create

public java.lang.Object Create()
This method is used by the ASManager to return new instances of managed objects.

Specified by:
Create in interface IManagedObject
Specified by:
Create in class AComponent
Returns:
A new instance of the managed class (i.e. return new Foo();)

GetName

public java.lang.String GetName()
Return the name of the MVC object.

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class AComponent
Returns:
the name of the object.

GetComponentMgr

public ComponentMgr GetComponentMgr(PageMgr _ptPageMgr)
Return a new ComponentMgr of the type that manages this class (a JSDateTimePickerMgr).

Specified by:
GetComponentMgr in interface IPageControl
Parameters:
_ptPageMgr - this PageMgr
Returns:
a ComponentMgr

GetComponentMgrName

public java.lang.String GetComponentMgrName()
Return the name of the component manager responsible for this page control

Specified by:
GetComponentMgrName in interface IPageControl
Returns:
the name of the ComponentMgr

Validate

public XPArrayList Validate()
Currently validation on the date/time picker page controls is not implemented. This method returns null.

Specified by:
Validate in class AComponent
Returns:
Arraylist of UIErrors.

GetValidators

public XPArrayList GetValidators()
Currently validation on the date/time picker page controls is not implemented. This method returns null.

Specified by:
GetValidators in class AComponent
Returns:



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.